-
Notifications
You must be signed in to change notification settings - Fork 132
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
refactor(lib/runtime/storage): Don't rely on trie snapshots for storage transactions #3777
Merged
dimartiro
merged 60 commits into
development
from
diego/decouple-storage_transaction-management
Mar 26, 2024
Merged
refactor(lib/runtime/storage): Don't rely on trie snapshots for storage transactions #3777
dimartiro
merged 60 commits into
development
from
diego/decouple-storage_transaction-management
Mar 26, 2024
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
…nto diego/decouple-storage_transaction-management
da441fb
to
3c20dae
Compare
…nto diego/decouple-storage_transaction-management
…nto diego/decouple-storage_transaction-management
…3.14 (#3786) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1.19.0 (#3785) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… to 10.19.0 (#3784) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Diego <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…3793) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nto diego/decouple-storage_transaction-management
EclesioMeloJunior
requested changes
Mar 21, 2024
EclesioMeloJunior
approved these changes
Mar 22, 2024
…b.com:ChainSafe/gossamer into diego/decouple-storage_transaction-management
…b.com:ChainSafe/gossamer into diego/decouple-storage_transaction-management
timwu20
pushed a commit
that referenced
this pull request
Apr 19, 2024
…ge transactions (#3777) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Radosvet M <[email protected]> Co-authored-by: Kirill <[email protected]> Co-authored-by: JimboJ <[email protected]>
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.
Changes
This PR aims to change the way we manage storage transactions to rely on a new
StorageDiff
structure instead of using trie snapshots.Trie snapshots are a feature that makes sense for in-memory tries but makes our code too coupled and prevents us from starting to use lazy loading tries.
What I'm doing is storing the diff (trie changes) between different transactions and applying them to the trie when the last transaction is committed.
This is not only useful for decoupling this from our trie implementation but will also reduce the amount of memory we need to perform storage transactions.
Tests
make test
Issues
closes #3775
Note to reviewers
Most of the changes happen in
lib/runtime/storage/trie.go
andlib/runtime/storage/trie_test.go
but github collapses those files. I encourage you to expand and review these files because these are the most important changesPrimary Reviewer
@EclesioMeloJunior