Skip to content
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

cmd/geth: add hbss to pbss convert tool #79

Merged
merged 4 commits into from
Apr 9, 2024
Merged

cmd/geth: add hbss to pbss convert tool #79

merged 4 commits into from
Apr 9, 2024

Conversation

sysvm
Copy link
Contributor

@sysvm sysvm commented Apr 2, 2024

Description

Add hbss to pbss convert tool for generate opBNB snapshot more quickly.

Rationale

If starts from the genesis block to make the opBNB snapshot, it will takes some time.

If using the convert tools and convert hbss trie node to pbss trie node, it will takes about 2 days.

Example

./geth db hbss-to-pbss --datadir ./node 1000 
./geth db prune-hash-trie  --datadir ./node
./geth db compact --datadir ./node

NOTICE: it will take a long time to iterate the entrie databse.

Changes

Notable changes:

  • Add hash2path/prune-hash-trie tools for convert and prune the hbss trie node.
  • Add trieGet/trieDelete for pbss to debug and handle exceptions.

@sysvm sysvm force-pushed the feat-hbss2pbss branch 2 times, most recently from 20de6e1 to 1f89962 Compare April 3, 2024 02:55
Copy link
Contributor

@krish-nr krish-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After discussing with the PR author, this is an enhanced tool picked from an existing feature on BSC. The author has optimized some of the logs, and there is no special handling in opbnb.

@sysvm sysvm merged commit 3813e13 into develop Apr 9, 2024
1 check passed
@sysvm sysvm deleted the feat-hbss2pbss branch April 9, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants