mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 04:24:05 +00:00
rm ncli_signing_root
This commit is contained in:
parent
c824416f56
commit
79893cd241
1
Makefile
1
Makefile
@ -21,7 +21,6 @@ TOOLS := \
|
||||
deposit_contract \
|
||||
ncli_hash_tree_root \
|
||||
ncli_pretty \
|
||||
ncli_signing_root \
|
||||
ncli_transition \
|
||||
process_dashboard
|
||||
TOOLS_DIRS := \
|
||||
|
1
ncli/.gitignore
vendored
1
ncli/.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
ncli_pretty
|
||||
ncli_signing_root
|
||||
ncli_hash_tree_root
|
||||
ncli_transition
|
||||
|
@ -5,7 +5,7 @@
|
||||
# Tools
|
||||
|
||||
* transition: Perform state transition given a pre-state and a block to apply (both in SSZ format)
|
||||
* signing_root/hash_tree_root: Print tree root of an SSZ object
|
||||
* hash_tree_root: Print tree root of an SSZ object
|
||||
* pretty: Pretty-print SSZ object as JSON
|
||||
|
||||
# Building
|
||||
|
@ -1,35 +0,0 @@
|
||||
import
|
||||
confutils, os, strutils, chronicles, json_serialization,
|
||||
nimcrypto/utils,
|
||||
../beacon_chain/spec/[crypto, datatypes, digest],
|
||||
../beacon_chain/[ssz]
|
||||
|
||||
# TODO turn into arguments
|
||||
cli do(kind: string, file: string):
|
||||
|
||||
template printit(t: untyped) {.dirty.} =
|
||||
let v =
|
||||
if cmpIgnoreCase(ext, ".ssz") == 0:
|
||||
SSZ.loadFile(file, t)
|
||||
elif cmpIgnoreCase(ext, ".json") == 0:
|
||||
JSON.loadFile(file, t)
|
||||
else:
|
||||
echo "Unknown file type: ", ext
|
||||
quit 1
|
||||
|
||||
echo signing_root(v).data.toHex(true)
|
||||
|
||||
let ext = splitFile(file).ext
|
||||
|
||||
case kind
|
||||
of "attester_slashing": printit(AttesterSlashing)
|
||||
of "attestation": printit(Attestation)
|
||||
of "block": printit(BeaconBlock)
|
||||
of "block_body": printit(BeaconBlockBody)
|
||||
of "block_header": printit(BeaconBlockHeader)
|
||||
of "deposit": printit(Deposit)
|
||||
of "deposit_data": printit(DepositData)
|
||||
of "eth1_data": printit(Eth1Data)
|
||||
of "state": printit(BeaconState)
|
||||
of "proposer_slashing": printit(ProposerSlashing)
|
||||
of "voluntary_exit": printit(VoluntaryExit)
|
Loading…
x
Reference in New Issue
Block a user