cmd/geth: fix parse state scheme#2107
Merged
sysvm merged 4 commits intobnb-chain:developfrom Jan 3, 2024
Merged
Conversation
flywukong
reviewed
Dec 26, 2023
cmd/utils/flags.go
Outdated
|
|
||
| // MakeTrieDatabase constructs a trie database based on the configured scheme. | ||
| func MakeTrieDatabase(ctx *cli.Context, disk ethdb.Database, preimage bool, readOnly bool) *trie.Database { | ||
| log.Info("enter MakeTrieDatabase") |
db19960 to
8f9d15a
Compare
962684c to
3f00ce4
Compare
3f00ce4 to
857c459
Compare
flywukong
approved these changes
Jan 3, 2024
This was referenced Jan 22, 2024
Merged
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.
Description
Provide explicit for which state scheme geth can use to start or init. And add check function to validate provided state scheme.
Rationale
Users can use
CLIorconfig.tomlto specify using which mode to start. And if you use snapshot(PBSS or HBSS) to start, there is meta info in db. Therefore, there are three items containing state scheme:diskdb,config.toml,CLI. Now valid state schemes arehashandpath. Here are the rules:config.tomlandCLI, so if you don't set, it's empty string.hashto run. If all of three are provided, they all should be equal.Example
N/A
Changes
Notable changes: