Skip to main content

fake_orchard_bundle

Function fake_orchard_bundle 

Source
pub fn fake_orchard_bundle(
    flags: Flags,
    value_balance: ZatBalance,
    n_actions: usize,
    seed: u64,
    bundle_version: BundleVersion,
) -> Bundle<Authorized, ZatBalance>
Expand description

Builds a structurally valid Orchard-shaped bundle.

  • flags must be representable under bundle_version, otherwise this panics. In particular the enableCrossAddress bit is representable only for [BundleVersion::ironwood_v3].
  • n_actions must be non-zero.
  • seed selects the action contents; bundles built with different seeds have disjoint nullifier sets, which matters for the mempool and state conflict tests.

The proof is zeroed but has the canonical length for n_actions, so the bundle passes [Bundle::try_from_parts]’s proof-size check and Zebra’s own canonical-size rule.