-
Notifications
You must be signed in to change notification settings - Fork 115
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
import: read from era files #2254
Conversation
This PR extends the `nimbus import` command to also allow reading from era files - this command allows creating or topping up an existing database with data coming from era files instead of network sync. * add `--era1-dir` and `--max-blocks` options to command line * make `persistBlocks` report basic stats like transactions and gas * improve error reporting in several API * allow importing multiple RLP files in one go * clean up logging options to match nimbus-eth2 * make sure database is closed properly on shutdown
currently, when running the command twice, it fails sometimes depending on the chunk size, ie |
nimbus/nimbus.nim
Outdated
|
||
case conf.cmd | ||
of NimbusCmd.`import`: | ||
importBlocks(conf, com) | ||
else: | ||
if conf.trustedSetupFile.isSome: |
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.
loadKzgTrustedSetup
should be called before importing blocks or subsequent call to kzg functions in block validation will return error if Cancun hardfork is active.
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.
ah - it was explicitly disabled for import
, for some reason. I'll move it back then.
This PR extends the
nimbus import
command to also allow reading from era files - this command allows creating or topping up an existing database with data coming from era files instead of network sync.--era1-dir
and--max-blocks
options to command linepersistBlocks
report basic stats like transactions and gas