-
Notifications
You must be signed in to change notification settings - Fork 120
perf(l1): revert optimistic transactions in rocksdb and remove the explicit configured cache #4853
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
14 commits
Select commit
Hold shift + click to select a range
e0b2e58
Revert "fix(l1): use transactional database with RocksDB (#4599)"
rodrigo-o 9af9191
remove cache explicit setup for rocksdb
rodrigo-o 23ee55e
Formatting and added changelog
rodrigo-o 71317f0
update changelog date
rodrigo-o ec1ddd8
Merge branch 'main' into perf/rocksdb-config-memory-enhancement
rodrigo-o aaa2ddc
Merge branch 'main' into perf/rocksdb-config-memory-enhancement
Oppen 9c2109b
Merge branch 'main' into perf/rocksdb-config-memory-enhancement
rodrigo-o 7722b5e
Merge branch 'main' into perf/rocksdb-config-memory-enhancement
rodrigo-o 66f1d04
Merge branch 'main' into perf/rocksdb-config-memory-enhancement
rodrigo-o 721ce12
formatting
rodrigo-o 9335d43
remove a new WriteBatchWithTransaction from merging main
rodrigo-o 47887f9
Merge branch 'main' into perf/rocksdb-config-memory-enhancement
rodrigo-o de054a9
remove another WriteBatchWithTransaction
rodrigo-o 340640e
Add documentation on safety
jrchatruc 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
Some comments aren't visible on the classic Files Changed page.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # Database safety without Rocksdb transactions | ||
|
|
||
| ## Content addressed tables | ||
|
|
||
| - (block)`headers` | ||
| - (block)`bodies` | ||
| - `account_codes` | ||
| - `pending_blocks` | ||
|
|
||
| These tables are content addressed, which makes them safe because writes to them are atomic, | ||
| and them being content addressable means anyone reading from them either sees their | ||
| only possible value or they don't, but nothing else. | ||
|
|
||
| ## Other Tables | ||
|
|
||
| - `block_numbers` | ||
| - `transaction_locations` | ||
| These tables are only written to in the `apply_updates` function, which means there are no concurrent writes to them. | ||
|
|
||
| ### `canonical_block_hashes` | ||
|
|
||
| Written to only in `forkchoice_update` and `remove_blocks`, but the last one is used to revert batches from a CLI | ||
| option, not in runtime. | ||
|
|
||
| ## `chain_data` | ||
|
|
||
| Written to during ethrex initialization and then read on forkchoice_update. | ||
|
|
||
| ## `receipts` | ||
|
|
||
| Written to only in `apply_updates`. | ||
|
|
||
| ## `snap_state` | ||
|
|
||
| Written to only during snap sync and mostly a legacy table used to signal the rest of the code when snap sync has finished. | ||
|
|
||
| ## `trie_nodes` | ||
|
|
||
| All writes to the state and storage tries are done through the `apply_updates` function, | ||
| called only after block execution. | ||
| There is only one other place where we write to the tries, and that's during snap | ||
| sync, through the `write_storage_trie_nodes_batch` function (and similarly for state trie nodes); | ||
| this does not pose a problem because there is no block execution until snap sync is done. | ||
|
|
||
| There is also a `put_batch` function for the trie itself, but it is only used inside snap sync and | ||
| genesis setup, but nowhere else. | ||
|
|
||
| ## `invalid_ancestors` | ||
|
|
||
| Written to in `set_latest_valid_ancestor`, called from every engine api endpoint and during full sync. | ||
|
|
||
| TODO: check validity of this. | ||
|
|
||
| ## `full_sync_headers` | ||
|
|
||
| Written to and read only sequentially on the same function during full sync. |
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.
Uh oh!
There was an error while loading. Please reload this page.