add capella/deneb support to ncli and clean up imports (#4771)

This commit is contained in:
tersec 2023-03-29 08:34:22 +00:00 committed by GitHub
parent e6043f656f
commit 865d95bcbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 8 deletions

View File

@ -1,14 +1,15 @@
import
std/[os, strutils, stats],
confutils, chronicles, json_serialization,
stew/[byteutils, io2],
confutils, json_serialization,
snappy,
../research/simutils,
../beacon_chain/spec/eth2_apis/eth2_rest_serialization,
../beacon_chain/spec/datatypes/[phase0, altair, bellatrix],
../beacon_chain/spec/[
eth2_ssz_serialization, forks, helpers, state_transition],
../beacon_chain/networking/network_metadata
../beacon_chain/spec/[eth2_ssz_serialization, state_transition]
from std/os import splitFile
from std/stats import RunningStat
from stew/byteutils import toHex
from stew/io2 import readAllBytes
from ../beacon_chain/networking/network_metadata import getRuntimeConfig
from ../research/simutils import printTimers, withTimer, withTimerRet
type
Cmd* = enum
@ -207,12 +208,18 @@ proc doSSZ(conf: NcliConf) =
of "phase0_signed_block": printit(phase0.SignedBeaconBlock)
of "altair_signed_block": printit(altair.SignedBeaconBlock)
of "bellatrix_signed_block": printit(bellatrix.SignedBeaconBlock)
of "capella_signed_block": printit(capella.SignedBeaconBlock)
of "deneb_signed_block": printit(deneb.SignedBeaconBlock)
of "phase0_block": printit(phase0.BeaconBlock)
of "altair_block": printit(altair.BeaconBlock)
of "bellatrix_block": printit(bellatrix.BeaconBlock)
of "capella_block": printit(capella.BeaconBlock)
of "deneb_block": printit(deneb.BeaconBlock)
of "phase0_block_body": printit(phase0.BeaconBlockBody)
of "altair_block_body": printit(altair.BeaconBlockBody)
of "bellatrix_block_body": printit(bellatrix.BeaconBlockBody)
of "capella_block_body": printit(capella.BeaconBlockBody)
of "deneb_block_body": printit(deneb.BeaconBlockBody)
of "block_header": printit(BeaconBlockHeader)
of "deposit": printit(Deposit)
of "deposit_data": printit(DepositData)
@ -220,6 +227,8 @@ proc doSSZ(conf: NcliConf) =
of "phase0_state": printit(phase0.BeaconState)
of "altair_state": printit(altair.BeaconState)
of "bellatrix_state": printit(bellatrix.BeaconState)
of "capella_state": printit(capella.BeaconState)
of "deneb_state": printit(deneb.BeaconState)
of "proposer_slashing": printit(ProposerSlashing)
of "voluntary_exit": printit(VoluntaryExit)