Run
To get a full list of commands and options, run the following command:
./zig-out/bin/sig --help
The binary located at ./zig-out/bin/sig
will be abbreviated to sig
in the rest of this document.
Validator
Startup the validator with the following command:
sig validator
Note: this command is modified as more validator components are completed.
Identity
Sig stores its private key in ~/.sig/identity.key
.
On its first run, Sig will automatically generate a key if no key exists.
To see the public key, use the identity
subcommand.
sig identity
Gossip
To run Sig as a Solana gossip client, use the gossip
subcommand.
- Specify entrypoints to connect to a cluster using
-e
or use pre-defined entrypoints with the-n
option, followed by the network you are connecting to. - Optionally use
-p
to specify a custom listening port (default is 8001).
For more info about gossip, see the readme.
sig gossip -n <NETWORK>
where <NETWORK>
is either mainnet
, devnet
, or testnet
.
or
sig gossip -p <PORT> --entrypoint <IP>:<PORT>
AccountsDB
We also support a few accounts-db related commands.
Download a snapshot
You can download a snapshot from the network:
sig download_snapshot \
# where to save snapshot
-s test_data/tmp \
# use default testnet entrypoints for gossip
-n testnet \
# pubkeys of validators who you trust
--trusted-validator 3gxDv5XbkkXUiqKiqt5WbsfGN7i9GHB1xMWBqhg4UDzj \
# minimum MB/s speed when downloading snapshot
--min-snapshot-download-speed 50
Note: we dont support downloading genesis files, however they can be found
in data/genesis-files/
in the repo.
Validate a snapshot
You can also validate an existing snapshot:
sig snapshot-validate \
# path to snapshot
-s test_data/tmp \
# validate against the genesis file for testnet
-n testnet \
# stream the accounts out of the snapshot (see the geyser readme to know how to read from the stream)
--enable-geyser \
# save the index generated for faster loads in the future (use --fastload in future runs)
--save-index \
# preallocate some accounts to increase the speed of the snapshot validation
--accounts-per-file-estimate 500
Note:
if you are running out-of-memory when loading, you can either reduce the preallocations
using a smaller value for --accounts-per-file-estimate
or use --use-disk-index
to use disk memory
instead of RAM.
Note:
you can also define a specifc genesis file to validate against using -g
.
Collect Shreds
You can also connect to the network and collect shreds:
sig shred-network \
# collect shreds from testnet
-n testnet \
# dont re-transmit the shreds in the turbine-tree (only recv)
--no-retransmit