Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(finalizer): polygon #1538

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

james-a-morris
Copy link
Contributor

TokenBridge events that use CCTP to transfer tokens off Polygon are causing UNKNOWN errors to be thrown in the GCP logs. The reasoning is that our simulations are trying to simulate exit() with bridge events that did not originate on the canonical bridge.

We can't directly filter out the TokenBridge events before the simulation logic because we need to be aware of potentially multiple events in one transaction for the getUniqueLogIndex and the subsequent call to buildPayloadForExit.

This PR simply makes these CCTP message have an error code of NON_CANONICAL_BRIDGE which prevents the message from actually being simulated and being pushed to the finalizableMessages array.

--

Note: this bug is mainly causes noise & shouldn't directly impact finalization since we catch this error and log as a debug

@nicholaspai
Copy link
Member

I added filters for arbitrum and optimism in this PR which you can merge into your branch #1539

…#1539)

* fix(Finalizer): Dedup transaction hash list when creating list of transactions to query for CCTP l2->l1 transactions

We’re not de-duping the set of txn receipts to query for CCTP l2 to l1 deposits, but we do this in the l1 to l2 direciton.

What’s unique for L2 to L1 is we look for SpokePool.TokensBridged() events but we forget there might be multiple of these in the same block

* improve(finalizer): Increase margin of error for finalizer to cover for multiple day downtime

Currently the finalizer is optimized for run-time speed and tries to look over as short of an event search window as possible.

However, this provides very little margin for error in case the finalizer goes down for multiple days.

* Update l2ToL1.ts

* add arbitrum/optimism filters

* Update l2ToL1.ts

* Update arbitrum.ts
Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to fix the immediate issue and follow up with a better fix

@nicholaspai nicholaspai merged commit 2af75df into master May 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants