mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-02 09:46:26 +00:00
0ba9fc4ede
Introduce (optional) pruning of historical data - a pruned node will continue to answer queries for historical data up to `MIN_EPOCHS_FOR_BLOCK_REQUESTS` epochs, or roughly 5 months, capping typical database usage at around 60-70gb. To enable pruning, add `--history=prune` to the command line - on the first start, old data will be cleared (which may take a while) - after that, data is pruned continuously. When pruning an existing database, the database will not shrink - instead, the freed space is recycled as the node continues to run - to free up space, perform a trusted node sync with a fresh database. When switching on archive mode in a pruned node, history is retained from that point onwards. History pruning is scheduled to be enabled by default in a future release. In this PR, `minimal` mode from #4419 is not implemented meaning retention periods for states and blocks are always the same - depending on user demand, a future PR may implement `minimal` as well.
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