-
Notifications
You must be signed in to change notification settings - Fork 82
fix(l2): ignore deposits after state reconstruction #2642
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lines of code reportTotal lines added: Detailed view
|
ilitteri
reviewed
Apr 30, 2025
ilitteri
reviewed
Apr 30, 2025
ilitteri
reviewed
Apr 30, 2025
tomip01
reviewed
Apr 30, 2025
tomip01
approved these changes
Apr 30, 2025
ilitteri
previously approved these changes
Apr 30, 2025
We should wait for the deposit in the 3 L2 tests
ilitteri
requested changes
Apr 30, 2025
ilitteri
approved these changes
May 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Currently, If we start our l2 node with a reconstructed state, the node will process all deposit logs from l1 and mint them again in l2. This is because, in a reconstructed store, we don't have the included transactions to determine whether a deposit was previously processed or not.
Description
l2MintTxHash
emitted in theCommonBridge
contract.integration_test
to wait for the deposit receipt on L2.l2MintTxHash
instead of recalculating it in the watcher.CommonBridge
contract, whether a deposit is pending or not before minting the transaction.DepositData
struct inl1_watcher
How to test
Here we are going to run the integration test on a node with a reconstructed state.
You may want to lower the
commit_time_ms
.ctrl + c
:Note
This is because we are going to use already created blobs with 6 batches and we need
to advance the L1 until that point.
path_to_store
:path_to_store
:You should observe that all deposits are skipped now.
Warning
Before running the integration test, wait for 20 blocks to be built in the L2.
This is because the test currently uses estimate_gas_tip that needs at least 20 blocks to estimate the gas price.
Closes #1279