cmd/geth: add hbss to pbss convert tool#1882
Merged
fynnss merged 1 commit intobnb-chain:developfrom Oct 5, 2023
Merged
Conversation
2c99dfe to
82fe65e
Compare
d21a74a to
ac1779a
Compare
ac71133 to
85097dd
Compare
bff171f to
ad0d995
Compare
85097dd to
f60e666
Compare
f60e666 to
cd8817c
Compare
joey0612
reviewed
Sep 25, 2023
cmd/geth/dbcmd.go
Outdated
| config := trie.HashDefaults | ||
| triedb := trie.NewDatabase(db, config) | ||
| triedb.Cap(0) | ||
| fmt.Println("triedb scheme: ", triedb.Scheme()) |
Contributor
There was a problem hiding this comment.
log is better, consistent with other cmds.
Contributor
There was a problem hiding this comment.
and ditto to other fmt.Println
| db := utils.MakeChainDatabase(ctx, stack, false, false) | ||
| defer db.Close() | ||
|
|
||
| scheme := ctx.String(utils.StateSchemeFlag.Name) |
Contributor
There was a problem hiding this comment.
change to ParseStateScheme?
Contributor
Author
There was a problem hiding this comment.
This tool may be used in the scenarios that the database which both the HBSS and PBSS trienode exist, so flags are required
Contributor
There was a problem hiding this comment.
ParseStateScheme is uesed to handle utils.StateSchemeFlag.
4145f32 to
e4b69f7
Compare
e928905 to
b260cc9
Compare
6d75830 to
5c6dd3e
Compare
NathanBSC
reviewed
Sep 26, 2023
cmd/geth/dbcmd.go
Outdated
| } | ||
|
|
||
| func ancientInspect(ctx *cli.Context) error { | ||
| func inspect(ctx *cli.Context) error { |
Contributor
There was a problem hiding this comment.
why change the function of inspect?
from code logic, new logic is totally for different usage
Contributor
Author
There was a problem hiding this comment.
Fixed. Made a mistake when rebase code.
5c6dd3e to
e3a7214
Compare
e3a7214 to
b8bad31
Compare
joey0612
approved these changes
Sep 27, 2023
Contributor
|
LGTM |
NathanBSC
approved these changes
Sep 27, 2023
Contributor
|
LGTM |
This was referenced Oct 18, 2023
Merged
Closed
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
add hbss to pbss convert tool for generate bsc snapshot more quickly.
Rationale
If starts from the genesis block to make the bsc snaoshot, it will takes 1.5~2 months.
if using the convert tools and convert hbss trie node to pbss trie node, it will takes 2~3 days.
Example
NOTICE: it will take a long time to iterate the entrie databse.
Changes
Notable changes: