zcli

command module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 5 Imported by: 0

README

ZRNT CLI

Debugging command line tool, to work with SSZ files, process ETH 2.0 state transitions, and compute proofs and meta-data.

Based on the Go-spec: ZRNT

Installation

Pre-requisites
  • Install Go 1.16+
  • Add $HOME/go/bin to your PATH.
Install

Options:

  • -u to force-update dependencies
  • -tags bls_off to disable BLS for testing purposes (not secure!!!)
# outside of an existing go module directory
go install github.com/protolambda/zcli@latest

Usage

The help commands guide you through the usage

zcli --help

Quick overview of all commands (run zcli <sub command> --help to get usage options and info).

zcli
  pretty <phase> <type> <input>                  Pretty-print spec object (output indented JSON)
  convert <phase> <type> <input> <output>        Convert spec object from one format to another
  diff <phase> <type> <a> <b>                    Diff spec data
  meta <phase> <subcmd>                          List metadata of beacon state
  proof <phase> <type> <input> --gindices        Create SSZ merkle proofs over any spec object
  root <phase> <type> <input>                    Compute the SSZ hash-tree-root of a spec object
  transition <pre-phase> <slots/blocks/sub>      Run state transitions and sub-processes
  tree <phase> <type>                            Dump SSZ merkle tree of any spec object
  version                                        Print ZCLI and ZRNT version

All commands have a --help for additional information, flags, etc.

And for many commands, use --config and --preset-{forkname} to select a known (minimal, mainnet, etc.) or custom YAML config/preset file! E.g. --config=local_testnet.yaml

Inputs/outputs can:

  • be specified as empty "", to read from STDIN/STDOUT
  • be specified with a prefix json:, yaml:, ssz_snappy: or ssz: to read/write that format. Writing can also use pretty: (indented JSON).

License

MIT, see LICENSE file.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL