refactor(state): split the old state into state reader and state writer structs#3291
Open
MaksymMalicki wants to merge 9 commits intomainfrom
Open
refactor(state): split the old state into state reader and state writer structs#3291MaksymMalicki wants to merge 9 commits intomainfrom
MaksymMalicki wants to merge 9 commits intomainfrom
Conversation
infrmtcs
reviewed
Nov 24, 2025
7141eaa to
b9b068f
Compare
infrmtcs
reviewed
Dec 2, 2025
b9b068f to
2ad7d63
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3291 +/- ##
==========================================
- Coverage 75.98% 74.96% -1.03%
==========================================
Files 377 378 +1
Lines 34614 34950 +336
==========================================
- Hits 26301 26199 -102
- Misses 6466 6719 +253
- Partials 1847 2032 +185 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c64de27 to
0d38a9e
Compare
0d38a9e to
8f413db
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 introduces the following change. The current implementation of the
Stategets split into two structs:StateReader- a structure, which sole purpose is reading the state. It's fed withdb.KeyValueReaderto enforce read-only mode for the state. Eventually we want to feed it only with thedb.Snapshot. It is going to be mainly used during the RPC requests.State- a structure which purpose is reading and writing. TheStateReaderis a part of it. It is used during the synchronisation and execution. Currently it runs using anIndexedBatch, but eventually we want to feed it with anIndexedBatch-like structure, which will contain a write layer anddb.Snapshotfor reads.