nimbus-eth2/ncli
zah 9c1ff78f84
Fix a reward calculation bug affecting Prater epoch 64781 (#3428)
To calculate the deltas correctly, the `process_inactivity_updates` function
must be called before the rewards and penalties processing code in order to
update the `inactivity_scores` field in the state. This would have required
duplicating more logic from the spec in the ncli modules, so I've decided to
pay the price of introducing a run-time copy of the state at each epoch which
eliminates the need to duplicate logic (both for this fix and the previous one).

Other changes:

* Fixes for the read-only mode of the `BeaconChainDb`
* Fix an uint64 underflow in the debug output procedure for printing
  balance deltas
* Allow Bellatrix states in the reward computation helpers
2022-02-22 14:14:17 +02: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 ncli_db: import states and blocks from era file (#3313) 2022-01-25 09:28:26 +01:00
e2store.py update era file documentation / impl (#3226) 2022-01-07 11:13:19 +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 rename mergeData to bellatrixData and mergeFork to bellatrixFork (#3315) 2022-01-24 16:23:13 +00:00
ncli_common.nim Fix a reward calculation bug affecting Prater epoch 64781 (#3428) 2022-02-22 14:14:17 +02:00
ncli_db.nim Fix a reward calculation bug affecting Prater epoch 64781 (#3428) 2022-02-22 14:14:17 +02: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
requirements.txt Bump ipython (security advisory) 2022-02-15 23:13:23 +02:00
resttest-rules.json rename MERGE_FORK_EPOCH to BELLATRIX_FORK_EPOCH (#3350) 2022-02-02 14:06:55 +01:00
resttest.nim REST cleanups (#3255) 2022-01-08 22:06:34 +02:00
validator_db_aggregator.nim Streamline the validator reward analysis 2022-02-01 11:30:14 +02:00
validator_db_reports.ipynb Streamline the validator reward analysis 2022-02-01 11:30:14 +02: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