-
Notifications
You must be signed in to change notification settings - Fork 21.6k
core, eth, les, tests, trie: abstract node scheme #25532
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
Conversation
443ca34 to
4b831b6
Compare
core/blockchain.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a mistake before. If we rewind the chain state to disk layer, then in this case recovery mode should be enabled.
trie/stacktrie.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hexToCompactInPlace is replaced by hexToCompact for not changing the st.key. Otherwise the path prefix of children will be affected since they are sharing the same byte slice.
6eb4c1e to
32791cc
Compare
holiman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly ok, but it's a kind of complex PR -- the introductin of different node schemes takes some getting used to. I think we should have a review call about this one.
|
@holiman for sure, we can have a call for it! |
56f9252 to
7065f7e
Compare
7cb0c4e to
899d4bd
Compare
e952201 to
61f6832
Compare
61f6832 to
b7351bc
Compare
|
Rebased against the latest master |
cmd/geth/chaincmd.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we enable preimage-recording by default? Or just based on the flags passed by users.
620ef60 to
5d88940
Compare
holiman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I think I've reviewed as far as I can. I think we need to run it a bit, e..g do syncs and generate snapshot.
Perhaps snapshot verify-state too?
|
@holiman Yes.
|
b76217e to
1990893
Compare
Co-authored-by: Martin Holst Swende <[email protected]>
1990893 to
539f809
Compare
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon. Apart from that, a few changes are also included which is worth mentioning: - port the changes in the stacktrie, tracking the path prefix of nodes during commit - use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon. Apart from that, a few changes are also included which is worth mentioning: - port the changes in the stacktrie, tracking the path prefix of nodes during commit - use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon. Apart from that, a few changes are also included which is worth mentioning: - port the changes in the stacktrie, tracking the path prefix of nodes during commit - use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer
This PR introduces a node scheme abstraction. The interface is only implemented by `hashScheme` at the moment, but will be extended by `pathScheme` very soon. Apart from that, a few changes are also included which is worth mentioning: - port the changes in the stacktrie, tracking the path prefix of nodes during commit - use ethdb.Database for constructing trie.Database. This is not necessary right now, but it is required for path-based used to open reverse diff freezer Co-authored-by: rjl493456442 <[email protected]>
This PR mainly introduces a node scheme abstraction. The interface is only implemented by
hashSchemenow and will also be implemented bypathSchemevery soon.Apart from that, a few changes are also included and highlight them here:
ethdb.Databasefor constructingtrie.Database, it's not necessary right now, but it's required for path-based used to open reverse diff freezer