nimbus-eth2/ncli
Jacek Sieka f19a497eec
ncli_db: add putState, putBlock (#3096)
* ncli_db: add putState, putBlock

These tools allow modifying an existing nimbus database for the purpose
of recovery or reorg, moving the head, tail and genesis to arbitrary
points.

* remove potentially expensive `putState` in `BeaconStateDB`
* introduce `latest_block_root` which computes the root of the latest
applied block from the `latest_block_header` field (instead of passing
it in separately)
* avoid some unnecessary BeaconState copies during init
* discover https://github.com/nim-lang/Nim/issues/19094
* prefer `HashedBeaconState` in a few places to avoid recomputing state
root
* fetch latest block root from state when creating blocks
* harden `get_beacon_proposer_index` against invalid slots and document
* move random spec function tests to `test_spec.nim`
* avoid unnecessary state root computation before block proposal
2021-11-18 13:02:43 +01:00
..
.gitignore A simple script for fetching detailed deposit data 2021-05-28 19:34:20 +03:00
README.md update spec references from eth2.0-specs to consensus-specs and to v1.1.0-beta.2 (#2822) 2021-08-26 10:21:52 +02:00
deposit_downloader.nim A simple script for fetching detailed deposit data 2021-05-28 19:34:20 +03:00
download_mainnet_deposits.sh A simple script for fetching detailed deposit data 2021-05-28 19:34:20 +03:00
e2store.nim proc -> func in ncli/, research/, and test/ (#2818) 2021-08-25 14:51:52 +00:00
e2store.py e2store: add era format (#2382) 2021-03-15 11:31:39 +01:00
logtrace.nim switch result = foo to expression return; unexport rest of logtrace symbols (#2788) 2021-08-17 09:51:39 +00:00
ncli.nim Support starting from altair (#3054) 2021-11-10 13:39:08 +02:00
ncli_db.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
ncli_query.nim 12x speedup on state sim with 100k validators sans BLS by caching get_beacon_proposer_index(...) 2020-06-04 17:07:51 +00:00
nim.cfg minimize imports, specially for spec - cuts 2/3 of ncli build time (#500) 2019-10-25 12:59:56 +02:00
nimquery.nim Move tools (#2370) 2021-03-02 15:02:10 +01:00
resttest-rules.json extend REST config with more spec constants (#2962) 2021-11-02 19:23:31 +01:00
resttest.nim REST API test framework and tests. (#2492) 2021-04-27 23:46:24 +03:00

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