Skip to main content

CLI options

This reference describes the command-line interface of the native zesu binary. You can install the native binary and build it from source to:

  • Debug a failing block.
  • Validate a zkVM integration's commitment against a known-correct value.
note

Zesu's standalone debug mode is being refactored. The options and behavior on this page may change.

Specify options

You can specify Zesu options on the command line:

zesu [OPTIONS]

The binary reads one environment variable, ZESU_INPUT, which controls where it reads input bytes from when no input flag is provided.

Options

fork

--fork <NAME>

Overrides the fork name declared in the input's chain_config.

ssz

--ssz [<FILE>]

Reads SSZ-encoded input from a binary file. If supplied without an argument, Zesu falls back to standard input or ZESU_INPUT.

json

--json <BLOCK_FILE> <WITNESS_FILE>

Reads input from two JSON files, one containing the block and one containing the witness. Both arguments are required.

The binary accepts two formats for each file:

FileAccepted formats
Block file{"result":"0x<rlp>"} (raw debug_getRawBlock response) or {"block":"0x<rlp>"}
Witness file{"state":[...],"codes":[...],"keys":[...],"headers":[...]} (direct) or {"jsonrpc":"2.0","result":{...}}

Environment variables

ZESU_INPUT

ZESU_INPUT=<FILE>

Path to a file containing SSZ-encoded input bytes. Used only when no --ssz or --json flag is present on the command line. If ZESU_INPUT is not set, Zesu reads from standard input.

Output streams

Zesu writes its public output (the 105-byte SSZ commitment, or the JSON summary for --json input) to standard output. Diagnostic messages go to standard error. See Inputs and outputs for the output format.

Exit codes

CodeMeaning
0Block executed successfully and the post-state root and receipts root match the expected values.
1Argument parsing failed, the input could not be loaded, execution returned an error, or the resulting state root or receipts root did not match the expected values.