146fa48454
* use ForkedHashedBeaconState in StateData * fix FAR_FUTURE_EPOCH -> slot overflow; almost always use assign() * avoid stack allocation in maybeUpgradeStateToAltair() * create and use dispatch functions for check_attester_slashing(), check_proposer_slashing(), and check_voluntary_exit() * use getStateRoot() instead of various state.data.hbsPhase0.root * remove withStateVars.hashedState(), which doesn't work as a design anymore * introduce spec/datatypes/altair into beacon_chain_db * fix inefficient codegen for getStateField(largeStateField) * state_transition_slots() doesn't either need/use blocks or runtime presets * combine process_slots(HBS)/state_transition_slots(HBS) which differ only in last-slot htr optimization * getStateField(StateData, ...) was replaced by getStateField(ForkedHashedBeaconState, ...) * fix rollback * switch some state_transition(), process_slots, makeTestBlocks(), etc to use ForkedHashedBeaconState * remove state_transition(phase0.HashedBeaconState) * remove process_slots(phase0.HashedBeaconState) * remove state_transition_block(phase0.HashedBeaconState) * remove unused callWithBS(); separate case expression from if statement * switch back from nested-ref-object construction to (ref Foo)(Bar()) |
||
---|---|---|
.. | ||
.gitignore | ||
README.md | ||
deposit_downloader.nim | ||
download_mainnet_deposits.sh | ||
e2store.nim | ||
e2store.py | ||
inspector.nim | ||
inspector.nim.cfg | ||
logtrace.nim | ||
ncli.nim | ||
ncli_db.nim | ||
ncli_query.nim | ||
nim.cfg | ||
nimquery.nim | ||
resttest-rules.json | ||
resttest.nim |
README.md
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