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

Create scripts/gethimport.py #1888

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Conversation

lithp
Copy link
Contributor

@lithp lithp commented Dec 5, 2019

What was wrong?

Nothing was wrong, per say, but it wasn't previously possible to get a full-syncing trinity node this far:

Selection_048

How was it fixed?

I wrote a script with a few helpful subcommands which can be used to create a trinity database, bootstrapping off an already-synced geth node.

To-Do

  • Why is the build failing while building snappy? (needed for decoding ancient blocks)
  • Appease lint and such
  • Break into multiple PRs
  • Remove the code which iterates over the state trie? It's too slow to be practical except for very early blocks.
  • Support simulating a full sync, starting from genesis, by also importing the genesis state when creating a trinity database. This depends on moving the EIP1085 code over from trinity -> py-evm, so it probably doesn't belong in this PR.
  • Figure out how to test any of this without committing large example geth databases to the repo.
  • Clean up commit history
  • Add entry to the release notes
  • Find a cute animal pic
  • Add a command to compact the database. If the database is not compacted it will compact itself,
    freezing your process for an uncomfortably long amount of time.
  • Document how to use this script to build a trinity database to reproduce the above screenshot
  • Remove import_block_flame.svg
  • Apply some bug fixes I made on my server, but not locally.
  • Rebase onto Improve header chain extension performance #1891
  • Make sure this is modular enough that a wrapper script in trinity could call it

Cute Animal Picture

A hermit crab swapping out shells:

hermit-crab-swap

@lithp lithp requested a review from carver December 5, 2019 02:14
scripts/gethimport.py Outdated Show resolved Hide resolved
eth/db/chain.py Outdated Show resolved Hide resolved
@lithp lithp force-pushed the lithp/geth-importer branch 2 times, most recently from 5853970 to f8cd2b7 Compare December 10, 2019 23:49
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.

None yet

2 participants