1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/// Filename of the marker recording which CLI version produced the bins.
/// When the CLI is upgraded this mismatches and the runtime regenerates.
/// Shared by `build.rs` and `crate::bins` via `include!`.
const VERSION_MARKER: &str = ".quantus-cli-version";
/// Filename of the manifest binding generated circuit artifacts to hashes and sizing.
/// Shared by `build.rs` and `crate::bins` via `include!`.
const MANIFEST_FILE: &str = "manifest.json";
/// Files hashed into `manifest.json` by `build.rs` and authenticated by
/// `crate::bins` at runtime. Defined once here so the two sides cannot drift
/// into a "file set mismatch" rejection of freshly built artifacts.
// No `*_prover.bin` entries: qp-wormhole-circuit-builder 4.2.0+ never emits
// them (provers rebuild circuits from source so a poisoned prover artifact
// cannot exfiltrate witness data).
const MANIFESTED_FILES: & = &;
/// Number of leaf proofs aggregated into a single batch.
///
/// 7 is optimal for mobile devices: fits in degree_bits=15 (~1.5 GB peak memory).
/// 8+ leaves require degree_bits=16 (~2.5 GB peak), limiting to 6GB+ devices.
///
/// Used by:
/// - build.rs: build-time circuit generation
/// - bins.rs: runtime lazy circuit generation
/// - collect_rewards_lib.rs: batching proofs for aggregation
pub const DEFAULT_NUM_LEAF_PROOFS: usize = 7;
/// Number of private-batch proofs aggregated into a single public batch.
///
/// Must match the chain's pallet-wormhole build default (QP_NUM_PRIVATE_BATCH_PROOFS)
/// or on-chain verification of public batches will fail. The chain moved to 53
/// (larger batches amortize aggregator proving cost at the 4-bps volume fee);
/// nodes reject public batches generated with the previous sizing of 4 as
/// InvalidTransaction.
pub const DEFAULT_NUM_PRIVATE_BATCH_PROOFS: usize = 53;