feat: refactor the node key as version + path#650
Closed
cool-develope wants to merge 41 commits intomasterfrom
Closed
feat: refactor the node key as version + path#650cool-develope wants to merge 41 commits intomasterfrom
version + path#650cool-develope wants to merge 41 commits intomasterfrom
Conversation
Contributor
|
@cool-develope can you give a short summary of all the changes in the pr in the description |
tac0turtle
reviewed
Dec 26, 2022
tac0turtle
reviewed
Dec 26, 2022
tac0turtle
reviewed
Dec 26, 2022
import_test.go
Outdated
| require.NoError(t, err) | ||
|
|
||
| err = importer.Add(&ExportNode{Key: []byte("key"), Value: []byte("value"), Version: 1, Height: 0}) | ||
| err = importer.Add(&ExportNode{Key: []byte("key"), Value: []byte("value"), NodeKey: &NodeKey{version: 1, path: big.NewInt(1)}, Height: 0}) |
Contributor
There was a problem hiding this comment.
how does this work for existing exports?or is the migration path planned to be different ?
Contributor
Author
There was a problem hiding this comment.
I believe it would look different, please refer #662
tac0turtle
reviewed
Dec 26, 2022
|
|
||
| if tree.allRootLoaded { | ||
| return tree.versions[version] | ||
| firstVersion, err := tree.ndb.getFirstVersion() |
Contributor
There was a problem hiding this comment.
is there not a need to lock here anymore?
Contributor
Author
There was a problem hiding this comment.
yeah, we don't use the map of versions,since we are keeping the range of versions (fristVersion, latestVersion)
This was referenced Jan 2, 2023
Merged
946c32d to
6ecc833
Compare
Contributor
Author
|
This PR has two problems, the |
Contributor
|
in the storage working group we decided to move forward with local nonce + version, closing this pr |
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.
ref: #571, #608
Context
As discussed in #608, it suggests the node key format as
version + pathinstead ofhash. It introduces a new way to get new nodes and orphans and remove the root and orphans from storage.What does this PR do?
version + path