-
Notifications
You must be signed in to change notification settings - Fork 110
feat(l1): process blocks in batches when syncing and importing #2174
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
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
3653b85
feat: add_blocks_in_batch
MarcosNicolau 6b8161d
feat: add_blocks_in_batch in full sync
MarcosNicolau 1220097
feat: store batch of receipts in libmdbx and in-memory
MarcosNicolau f78db0d
feat: store batch of blocks in single tx for libmdbx and in-memory
MarcosNicolau 565eb60
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 0acc5e2
fix: merge with main
MarcosNicolau 7a4bcea
Merge branch 'main' into feat/store-state-trie-n-blocks
mpaulucci 80384ad
fix: parent hash check and block execution state
MarcosNicolau 3746d40
fix: withdrawal test regression
MarcosNicolau 88a8d04
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 5d5a97c
feat: use blocks_in_batch in ethrex cmd import chain.rlp
MarcosNicolau 56114b7
fix: import blocks in batch
MarcosNicolau e1a86ed
refactor: add_block call add_blocks_in_batch, take ownership to avoid…
MarcosNicolau 44c820a
fix: rpc-compat hive tests
MarcosNicolau 23bdd74
fix: add max tries to store in db
MarcosNicolau 7fc9414
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau bc9ab4b
fix: merge
MarcosNicolau 6e4dc5e
feat: re-introduce ancestors
MarcosNicolau a31e0c3
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 42a6af8
refactor: don't panic on levm, instead store every state trie
MarcosNicolau d4097b6
fix: remaining hive tests
MarcosNicolau bf76b77
fix: merge with main execute block + store block for the l2
MarcosNicolau 73afe24
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 88614dd
fix: ethrex build
MarcosNicolau aa73736
chore: add entry to perf changelog
MarcosNicolau 673d2b3
refactor: general
MarcosNicolau 1948a38
fix: hive regression on cancun suite
MarcosNicolau 61ff491
refactor: remove unwraps
MarcosNicolau d8cab93
reafactor: add blocks in batch match engine
MarcosNicolau 0d1aed8
refactor: error return type in block in batch
MarcosNicolau 9d32824
refactor: take slice of blocks instead of vec
MarcosNicolau e439e62
feat: implement redb new store batch function
MarcosNicolau 75b9b40
revert: batch import
MarcosNicolau 5561b27
feat: show throughput for range of blocks
MarcosNicolau 7a7b1bf
feat: import block commands in batch
MarcosNicolau 132c1d4
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 14a20da
refactor: remove import-in-batch command and instead add a flag to ex…
MarcosNicolau b14780f
refactor: apply if let fede suggestion
MarcosNicolau 1aa6f62
temporarily import in batch to view diff in performance
MarcosNicolau 4c9ea14
perf: redb open tables once before blocks loop
MarcosNicolau 9b1e4d5
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau eda77bb
revert force blocks import in batch for normal imports
MarcosNicolau 67c4316
fix: redb add batch of blocks
MarcosNicolau 5f11410
refactor: panic on levm when trying to add in batch
MarcosNicolau e995b90
refactor: simplified execute blocks in batch
MarcosNicolau c39dc73
feat: implement mark_chain_as_canonical for dbs
MarcosNicolau 035fe2c
fix: various full syncing bugs
MarcosNicolau 2e6ba2e
refactor: increase block header limit to 1024
MarcosNicolau 1602e15
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 9fd0030
refactor: use existing block header limit
MarcosNicolau fb61aae
feat: trie don't commit and return data to commit instead
MarcosNicolau 9a66a23
feat: store all block related info in a single tx
MarcosNicolau e1e8e41
feat: add blocks batcha account updates and write in a single tx
MarcosNicolau 937cdfb
chore: remove unused code
MarcosNicolau c398a58
chore: update changelog perf entry
MarcosNicolau c4c3a15
refactor: simplify metrics log
MarcosNicolau aff5cbf
feat: import blocks sequentially if we are within STATE_TRIES_TO_KEEP…
MarcosNicolau 81ee241
chore: address clippy warnings
MarcosNicolau c4cc9bb
revert: add_blocks_with_state_and_receipts
MarcosNicolau a5107df
chore: address clippy warnings
MarcosNicolau 33929bc
Merge branch 'main' of github.com:lambdaclass/lambda_ethereum_rust in…
mpaulucci 9e3f59b
Remove apply_account_updates_to_trie.
mpaulucci f7a6018
Simplify add_block
mpaulucci 2139269
Update changelog date.
mpaulucci 1b87f6c
Remove block importing code.
mpaulucci 004ba50
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau b7b0646
refactor: full sync move shared variables to SyncManager struct and s…
MarcosNicolau 432cc10
Merge branch 'main' into feat/store-state-trie-n-blocks
MarcosNicolau 89413d8
revert: moving heads into SyncManager struct
MarcosNicolau cd705a0
Update crates/networking/p2p/peer_handler.rs
MarcosNicolau c986f4e
chore: derive debug for BatchBlockProcessingFailure
MarcosNicolau 6c037c7
fix: lint
MarcosNicolau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this? can't we just call
execute_block
(previously moving the find_parent_header part)?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes because this one takes a vm in the param and does not clear its state after the block execution since it calls
vm.execute_block_without_clearing_state
instead ofvm.execute_block()
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does it take vm as param instead of using self.vm?