Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

zair config

Build the airdrop snapshot configuration from on-chain data.

zair config build

Connects to a lightwalletd node, fetches Sapling and/or Orchard nullifiers up to the snapshot height, builds gap trees for non-membership proofs, and writes the configuration and artifacts to files.

zair config build --network testnet --height 3663119

Parameters

FlagDefaultDescription
--networkmainnetNetwork: mainnet or testnet
--height(required)Height of snapshot
--lightwalletd(hardcoded)Endpoint for lightwalletd
--poolbothPool: sapling, orchard, or both

Airdrop parameters

FlagDefaultDescription
--target-saplingZAIRTESTSapling target ID for hiding nullifier derivation (exactly 8 bytes)
--target-orchardZAIRTEST:OOrchard target ID for hiding nullifier derivation (up to 32 bytes)
--scheme-saplingnativeSapling value commitment scheme: native or sha256
--scheme-orchardnativeOrchard value commitment scheme: native or sha256

Info

When choosing a custom --target-sapling for deployment, you must update the constant

HIDING_NF_PERSONALIZATION = "ZAIRTEST"

in

crates/zair-sapling-circuit/src/circuit.rs

as well, and run a trusted setup for Sapling using the new custom circuit.

Output files

FlagDefaultDescription
--config-outconfig.jsonConfiguration output
--snapshot-out-saplingsnapshot-sapling.binSapling snapshot nullifiers
--snapshot-out-orchardsnapshot-orchard.binOrchard snapshot nullifiers
--gap-tree-out-saplinggaptree-sapling.binSapling gap tree
--gap-tree-out-orchardgaptree-orchard.binOrchard gap tree
--no-gap-treefalseDo not output gap-tree artifacts