refactor(juno): integrate common interface with rawDB as trieDB engine#3187
Open
MaksymMalicki wants to merge 9 commits intomaksym/state-atomicityfrom
Open
refactor(juno): integrate common interface with rawDB as trieDB engine#3187MaksymMalicki wants to merge 9 commits intomaksym/state-atomicityfrom
MaksymMalicki wants to merge 9 commits intomaksym/state-atomicityfrom
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (35.49%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## maksym/state-atomicity #3187 +/- ##
==========================================================
- Coverage 75.53% 74.93% -0.60%
==========================================================
Files 384 385 +1
Lines 34910 35284 +374
==========================================================
+ Hits 26368 26440 +72
- Misses 6684 6981 +297
- Partials 1858 1863 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
infrmtcs
reviewed
Oct 21, 2025
33d81d5 to
dc23482
Compare
dc23482 to
ddded14
Compare
374fcf7 to
1ba0bf0
Compare
6eb0933 to
386d97c
Compare
7740498 to
1f4a9a6
Compare
1f4a9a6 to
b95e87a
Compare
b95e87a to
514d9fa
Compare
7b87b1c to
98cf47e
Compare
dc41ffd to
417651d
Compare
417651d to
8428b18
Compare
d5e5028 to
2b58353
Compare
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
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.
This PR should be reviewed after refactor(state): remove DB writes from the new state to make writes atomic #3360
It integrates the common interfaces across the project, including in utilities and tests. This PR uses
rawDB- direct pebbleDB reads/writes - as a trieDB engine. New components of the pathDB engine will be introduced in the follow-up PRs.Some parts of the logic weren’t straightforward to unify due to the different ways the old and new states interact with PebbleDB. The old state is tightly coupled with
IndexedBatchfor reads and writes, while the new state is designed to read using raw DB/snapshotsand write using regular PebbleDBBatch. As a result, the following methods were "duplicated" and tailored to the way the respectivestateandtriefunctionalities are meant to interact with the DB:blockchain.Storeblockchain.GetReverseStateDiffblockchain.FinaliseThe adapting had to be also done for the prove logic inside of
rpc/v8/storage.go,rpc/v8/storage_test.go,rpc/v9/storage.go,rpc/v9/storage_test.goThe experimental --new-state boolean CLI flag is now fully integrated. It can be used via the command line and in the
dbcmdutilities.The new state package includes some minor bug fixes discovered during previous work (#2912) while debugging sync, RPC, and E2E tests.
A new command was added to the
Makefile, to run the unit tests strictly with the new state and trie implementations in the future CI/CD: