mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 22:06:21 +00:00
22ddf74752
The `kvstore` design we're using now turns out to not be the best way to use `sqlite` - in particular, there are some significant benefits to using rowid in certain situations and to keep data in separate tables. With this branch, there are massive improvements in startup time (seconds instead of minutes) and state/block storage and pruning times (milliseconds instead of seconds) - these improvements can in particular be seen on slow drives and translate directly into better attestation performance. * update kvstore to new keyspace design * remove `DirStoreRef` and the hidden `--state-db-kind` option - this was an experiment to store large blobs in files, but with the new kvstore, there's no compelling reason to do so * remove `DbMap` - unused and would need updating for new keyspace design * introduce separate tables for each data type (blocks, states etc) * remove "WITHOUT ROWID" pessimization for tables with large blobs * close DbSeq statements explicitly (and earlier) * store beacon block summaries in separate table, without SSZ compression and load them all with single query on startup * stop storing backwards compat full states * mark genesis beacon block as trusted * avoid faststreams when loading SSZ data * remove `DisagreementBehavior` (unused)
Introduction
ncli
is a set of low level / debugging tools to interact with the nimbus beacon chain specification implementation, simliar to zcli. With it, you explore SSZ, make state transitions and compute hash tree roots.
Tools
- transition: Perform state transition given a pre-state and a block to apply (both in SSZ format)
- hash_tree_root: Print tree root of an SSZ object
- pretty: Pretty-print SSZ object as JSON
Building
Follow the instructions from nimbus-eth2
git clone https://github.com/status-im/nimbus-eth2.git
cd nimbus-eth2
make
Usage
# Build with minimal config
../env.sh nim c -d:const_preset=minimal ncli_transition
# Build with mainnet config
../env.sh nim c -d:const_preset=mainnet ncli_transition
# Run..
./ncli_transition --help