-
Notifications
You must be signed in to change notification settings - Fork 111
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
Integrating Nested Prover Storage Management #1197
Merged
citizen-stig
merged 2 commits into
nightly
from
nikolai/fork_manager_integration_stage_1
Dec 18, 2023
Merged
Integrating Nested Prover Storage Management #1197
citizen-stig
merged 2 commits into
nightly
from
nikolai/fork_manager_integration_stage_1
Dec 18, 2023
Conversation
This file contains 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
citizen-stig
force-pushed
the
nikolai/fork_manager_integration_stage_1
branch
from
December 6, 2023 12:26
546765a
to
5eec43d
Compare
Codecov Report
Additional details and impacted files
|
citizen-stig
changed the title
WIP: Integrating Fork Management
Integrating Nested Prover Storage Management
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
bkolad
reviewed
Dec 8, 2023
This was referenced Dec 13, 2023
citizen-stig
force-pushed
the
nikolai/fork_manager_integration_stage_1
branch
2 times, most recently
from
December 13, 2023 23:36
f3b0a0b
to
2d3237b
Compare
citizen-stig
commented
Dec 13, 2023
bkolad
approved these changes
Dec 15, 2023
citizen-stig
force-pushed
the
nikolai/fork_manager_integration_stage_1
branch
from
December 18, 2023 10:30
89f65e2
to
8d8b2ce
Compare
* Concrete Snapshot Manager in default context * Updating sov-db to point to snapshots * Initialize ProverStorage inside NewProverStorageManager * Remove old storage manager * Update MockDa to have block zero finalized in the beginning * Adding more logging to sov-prover-storage-manager * Rename `FrozenDbSnapshot` to `ReadOnlyDbSnapshot` * Remove arbitrary from sov-db * Fixes in benchmarks * Add range iterator to `SchemaBatch`
citizen-stig
force-pushed
the
nikolai/fork_manager_integration_stage_1
branch
from
December 18, 2023 15:54
80d87e7
to
847f43b
Compare
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.
Description
Main Changes
sov_db::StateDB
andsov_db::NativeDB
are both usingDbSnapshot
. This means that fork management is supported, as each fork can have its own instance ofProverStorage
that points correctly to previous storages and DBStorageManager
trait has bee changed toHierarchicalStorageManager
trait, that reflects DA driven nature of creating storage snapshots.stf-runner
uses new implementation ofProverStorageManager
that creates snapshots based on DA blocks and maintains all forking related machinery.What is not included
sov-stf-runner
should handle DA head change. #1217RPC
endpoint should point to head storage, instead of finalized storage #1218get_finalized_storage
added toHierarchicalStorageManager
, so it can give storage without attaching it to a block.max_out_version
method added tostate_db
, so this "finalized" db can query latest version. All this should be removed in favour of updatingRPC
storage with each block progressionOtherChanges
Spec
forDefaultContex
have declared concreteSnapshotManager
forStorage
:sov_prover_storage_manager
to becomedev-dependency
almost everywhere where storage is needed. Even though, there'sNoopQueryManager
fromsov-schema-db
, it cannot be used outside, because of this spec declration. Another option would be to declareDefaultTestContext
where NoopQueryManager would be used, which result in simpler testing and no need to creating temporary folders everywhere.MockDa
has hard coded genesis header at height 0.MockBlockHeader
now havefrom_height
constructor which always gives coherent and deterministic headers. Convenient in testsMethod
with_config
fromStorage
trait is removed, as all storages are built externallyStf::PreState and Stf::ChangeSet are the same type C::Storage in case of app template.
FrozenDbSnapshot
is renamed toReadOnlyDbSnapshot
demo-rollup
hasinitialize_logging
function, so it is easy to plug in test/bench to get same loggingImportant traits
These 2 traits have been aded or updated and it is important to review naming/documentation:
Linked Issues
Testing
All tests have been updated.
Docs
Documentation has been updated.
Benchmarking
Baseling Nightly
Run 1
Run 2
This PR
Fork length 1 block
Fork length 3 blocks
Fork lenght 50 blocks