Skip to main content

dig_constants/
lib.rs

1//! DIG Network Constants
2//!
3//! Defines network parameters for the DIG L2 blockchain. This crate exists
4//! separately so that any DIG crate can import network constants without
5//! pulling in the full CLVM engine or other heavy dependencies.
6//!
7//! The core type is [`NetworkConstants`], which wraps `chia-consensus`'s
8//! `ConsensusConstants` with DIG-specific values (genesis challenge,
9//! AGG_SIG additional data, cost limits, etc.).
10//!
11//! # Usage
12//!
13//! ```rust,ignore
14//! use dig_constants::DIG_MAINNET;
15//!
16//! let genesis = DIG_MAINNET.genesis_challenge();
17//! let consensus = DIG_MAINNET.consensus();
18//! ```
19
20use chia_consensus::consensus_constants::ConsensusConstants;
21use chia_protocol::Bytes32;
22use hex_literal::hex;
23
24/// DIG network constants.
25///
26/// Wraps `chia-consensus::ConsensusConstants` with accessors for the fields
27/// that DIG validators and wallet code commonly need. The underlying
28/// `ConsensusConstants` is available via [`consensus()`](Self::consensus)
29/// for direct use with `chia-consensus` functions like `run_spendbundle()`.
30#[derive(Debug, Clone)]
31pub struct NetworkConstants {
32    inner: ConsensusConstants,
33}
34
35impl NetworkConstants {
36    /// The underlying `chia-consensus` constants, for passing directly to
37    /// `run_spendbundle()`, `validate_clvm_and_signature()`, etc.
38    pub fn consensus(&self) -> &ConsensusConstants {
39        &self.inner
40    }
41
42    /// DIG genesis challenge.
43    pub fn genesis_challenge(&self) -> Bytes32 {
44        self.inner.genesis_challenge
45    }
46
47    /// AGG_SIG_ME additional data (== genesis_challenge on Chia L1).
48    pub fn agg_sig_me_additional_data(&self) -> Bytes32 {
49        self.inner.agg_sig_me_additional_data
50    }
51
52    /// Maximum CLVM cost per block.
53    pub fn max_block_cost_clvm(&self) -> u64 {
54        self.inner.max_block_cost_clvm
55    }
56
57    /// Cost per byte of generator program.
58    pub fn cost_per_byte(&self) -> u64 {
59        self.inner.cost_per_byte
60    }
61
62    /// Maximum coin amount (u64::MAX).
63    pub fn max_coin_amount(&self) -> u64 {
64        self.inner.max_coin_amount
65    }
66}
67
68// =============================================================================
69// AGG_SIG additional data derivation
70//
71// On Chia L1, each AGG_SIG_* variant's additional_data is:
72//   sha256(genesis_challenge || opcode_byte)
73// except AGG_SIG_ME which uses genesis_challenge directly.
74//
75// See: condition_tools.py:58-71
76//   https://github.com/Chia-Network/chia-blockchain/blob/main/chia/consensus/condition_tools.py#L58
77// =============================================================================
78
79// ---------------------------------------------------------------------------
80// DIG Mainnet
81//
82// The genesis challenge is the 32-byte consensus anchor for the DIG L2 network.
83// It doubles as the gossip `network_id` gate: `dig-gossip` REJECTS an all-zero
84// network_id, so this value MUST be non-zero for the node's gossip pool / DHT /
85// PEX to start.
86//
87// DIG_MAINNET L2 genesis = the Chia mainnet header hash @ height 9,021,277
88//   (0af981...1abf), pinned 2026-07-17 — anchors the DIG L2 genesis to a real,
89//   verifiable Chia block (captured via coinset.org get_blockchain_state).
90//
91//   DIG_MAINNET_GENESIS_CHALLENGE
92//     = 0af981862a4df51f51ec59c312315d959931d917c375730b89b9e2b0854d1abf
93//
94// This is the PRE-LAUNCH canonical DIG mainnet genesis. Per CLAUDE.md §3.7 the
95// ecosystem is pre-release with no live users, so this value is revisable at
96// true mainnet launch — re-anchor to the launch-time Chia header hash and
97// recompute every derived value below if it is ever changed.
98//
99// All `agg_sig_*_additional_data` values are derived from this genesis as
100// `sha256(genesis_challenge || opcode_byte)` (AGG_SIG_ME = genesis directly),
101// so they were all recomputed for this genesis.
102// ---------------------------------------------------------------------------
103
104/// Canonical DIG mainnet genesis challenge.
105///
106/// The Chia mainnet header hash at block height 9,021,277 (`0af981…1abf`),
107/// pinned 2026-07-17 — a real, verifiable, fixed 32-byte value anchoring the
108/// DIG L2 genesis to a real Chia block. This is the pre-launch canonical value;
109/// per §3.7 it is revisable at true mainnet launch. All
110/// `agg_sig_*_additional_data` fields are derived from this.
111const DIG_MAINNET_GENESIS_CHALLENGE: [u8; 32] =
112    hex!("0af981862a4df51f51ec59c312315d959931d917c375730b89b9e2b0854d1abf");
113
114/// DIG mainnet constants.
115///
116/// Uses DIG's own genesis challenge and AGG_SIG domain separation.
117/// Proof-of-space and VDF fields are set to neutral values since DIG L2
118/// does not use Chia's proof-of-space consensus.
119pub const DIG_MAINNET: NetworkConstants = NetworkConstants {
120    inner: ConsensusConstants {
121        // -- DIG-specific values --
122        genesis_challenge: Bytes32::new(DIG_MAINNET_GENESIS_CHALLENGE),
123
124        // AGG_SIG additional data: derived from genesis_challenge.
125        // AGG_SIG_ME = genesis_challenge directly.
126        // Others = sha256(genesis_challenge || opcode_byte).
127        // Derivation: condition_tools.py:58-71
128        //   https://github.com/Chia-Network/chia-blockchain/blob/main/chia/consensus/condition_tools.py#L58
129        // Opcode bytes: AGG_SIG_PARENT=43, PUZZLE=44, AMOUNT=45,
130        //   PUZZLE_AMOUNT=46, PARENT_AMOUNT=47, PARENT_PUZZLE=48
131        // NOTE: Recompute ALL values when genesis_challenge is finalized.
132        agg_sig_me_additional_data: Bytes32::new(DIG_MAINNET_GENESIS_CHALLENGE),
133        agg_sig_parent_additional_data: Bytes32::new(hex!(
134            "196d63b6dfbd4440656f9c1eadc686cacfaae771c565762a8cd6e51c892a0077"
135        )),
136        agg_sig_puzzle_additional_data: Bytes32::new(hex!(
137            "9ca719659b5e2355a91ff330c8612cb58c74f1063eaff99e507602d450b1f71f"
138        )),
139        agg_sig_amount_additional_data: Bytes32::new(hex!(
140            "d13767da4a8bd9520dbd9e039e68b3eb4b16fdcbb7e7755b5064840eaeb553ce"
141        )),
142        agg_sig_puzzle_amount_additional_data: Bytes32::new(hex!(
143            "73eea3473bd0daa28793d4bcd218ade462b634b53af97f9a01a91f3059ac75df"
144        )),
145        agg_sig_parent_amount_additional_data: Bytes32::new(hex!(
146            "eb7302224e77c0f269d0c8b105d4cc786775ae012ed2db49751c33c244c3f647"
147        )),
148        agg_sig_parent_puzzle_additional_data: Bytes32::new(hex!(
149            "ccac5983685257d50ee7b439bbb502128ddb262813dde4e4a11ac6cdfc66fa8e"
150        )),
151
152        // DIG L2 cost limits
153        max_block_cost_clvm: 11_000_000_000, // per-spend limit, same as Chia L1
154        cost_per_byte: 12_000,
155        max_coin_amount: u64::MAX,
156
157        // Block generator limits
158        max_generator_size: 1_000_000,
159        max_generator_ref_list_size: 512,
160
161        // Hard fork heights — set to 0 to always use latest consensus rules.
162        // DIG L2 starts with all features enabled from block 0.
163        hard_fork_height: 0,
164        hard_fork2_height: 0,
165
166        // Pre-farm puzzle hashes — not used by DIG L2, set to zero.
167        genesis_pre_farm_pool_puzzle_hash: Bytes32::new([0u8; 32]),
168        genesis_pre_farm_farmer_puzzle_hash: Bytes32::new([0u8; 32]),
169
170        // -- Proof-of-space / VDF fields (not used by DIG L2) --
171        // These must be valid values since ConsensusConstants is passed to
172        // chia-consensus functions, but DIG does not use PoS consensus.
173        slot_blocks_target: 32,
174        min_blocks_per_challenge_block: 16,
175        max_sub_slot_blocks: 128,
176        num_sps_sub_slot: 64,
177        sub_slot_iters_starting: 1 << 27,
178        difficulty_constant_factor: 1 << 67,
179        difficulty_starting: 7,
180        difficulty_change_max_factor: 3,
181        sub_epoch_blocks: 384,
182        epoch_blocks: 4608,
183        significant_bits: 8,
184        discriminant_size_bits: 1024,
185        number_zero_bits_plot_filter_v1: 9,
186        number_zero_bits_plot_filter_v2: 9,
187        min_plot_size_v1: 32,
188        max_plot_size_v1: 50,
189        min_plot_size_v2: 28,
190        max_plot_size_v2: 32,
191        sub_slot_time_target: 600,
192        num_sp_intervals_extra: 3,
193        max_future_time2: 120,
194        number_of_timestamps: 11,
195        max_vdf_witness_size: 64,
196        mempool_block_buffer: 10,
197        weight_proof_threshold: 2,
198        blocks_cache_size: 4608 + (128 * 4),
199        weight_proof_recent_blocks: 1000,
200        max_block_count_per_requests: 32,
201        pool_sub_slot_iters: 37_600_000_000,
202        plot_filter_128_height: 0xffff_ffff,
203        plot_filter_64_height: 0xffff_ffff,
204        plot_filter_32_height: 0xffff_ffff,
205        plot_difficulty_initial: 2,
206        plot_difficulty_4_height: 0xffff_ffff,
207        plot_difficulty_5_height: 0xffff_ffff,
208        plot_difficulty_6_height: 0xffff_ffff,
209        plot_difficulty_7_height: 0xffff_ffff,
210        plot_difficulty_8_height: 0xffff_ffff,
211    },
212};
213
214// =============================================================================
215// NAT-traversal relay endpoint
216//
217// A DIG Node behind NAT cannot accept inbound dials, so it holds a constant
218// reservation with a publicly-reachable relay to stay discoverable. The
219// canonical public relay is `relay.dig.net`, serving the `RelayMessage`
220// WebSocket wire (RLY-001..RLY-007) on port 9450.
221//
222// This constant is the single source of truth for that endpoint so consumers
223// (`dig-node`, `dig-gossip`) don't each hardcode it. It MUST stay byte-identical
224// to `dig-node`'s `relay::DEFAULT_RELAY_URL` (the string a node actually dials
225// when `DIG_RELAY_URL` is unset) and to the `dig-relay` server's documented
226// client endpoint.
227//
228// Port 443: the live `relay.dig.net` NLB exposes its public TLS listener on the
229// standard HTTPS port 443 (the earlier :9450 listener is closed). Using 443 also
230// maximizes reachability from restrictive networks that only allow outbound 443.
231// =============================================================================
232
233/// Canonical DIG NAT-traversal relay endpoint.
234///
235/// This is the WebSocket URL a DIG Node dials by default to obtain a relay
236/// reservation (so NAT'd peers stay reachable). It is the value used unless an
237/// operator overrides it via the `DIG_RELAY_URL` environment variable (or
238/// disables the reservation with `DIG_RELAY_URL=off`).
239///
240/// Format: `wss://<host>:<port>` — the relay protocol (`RelayMessage`,
241/// RLY-001..RLY-007) is JSON over a secure WebSocket. Mainnet uses the canonical
242/// public deployment `relay.dig.net` on port 443 (the live NLB public TLS
243/// listener; the earlier :9450 listener is closed).
244///
245/// Kept byte-identical to `dig-node`'s `relay::DEFAULT_RELAY_URL` and the
246/// `dig-relay` server's documented client endpoint.
247pub const DIG_RELAY_URL: &str = "wss://relay.dig.net:443";
248
249// =============================================================================
250// DIG Node localhost endpoint
251//
252// A client connecting to a local DIG node (§5.3 client→node connection order)
253// resolves `dig.local` or `localhost` to reach the node via localhost TCP on
254// port 9778. This constant is the single source of truth for that port so
255// consumers (dig-node, dig-dns, dig-installer, SDK, CLI) don't each hardcode it.
256// =============================================================================
257
258/// The default localhost port a client uses to reach the local DIG node.
259///
260/// This is used to implement §5.3 client→node connection order: when a client
261/// needs to connect to a DIG node, it tries `dig.local` and `localhost` on this
262/// port before falling back to the public `rpc.dig.net` gateway. This constant
263/// ensures all consumers (dig-node, dig-dns, dig-installer, dig-sdk, digstore CLI)
264/// use an identical port, preventing port-mismatch bugs. It MUST stay byte-identical
265/// to `dig-node`'s documented localhost serve port and the installer's registered
266/// `dig.local` address.
267pub const DIG_NODE_PORT: u16 = 9778;
268
269// =============================================================================
270// DIG CAT asset id ($DIG token)
271//
272// $DIG is a Chia CAT (CHIP-0004); its asset id is the TAIL program's hash,
273// fixed for the token's lifetime. This is the single canonical home for that
274// value — `chip35_dl_coin`, `dig-cat-decoder`, and any DIG-aware wallet/
275// balance/spend code import it from HERE rather than each hardcoding a copy.
276// =============================================================================
277
278/// Canonical $DIG CAT asset id (TAIL hash) on Chia mainnet.
279///
280/// The single token every capsule (commit) payment is denominated in
281/// (`chip35_dl_coin::build_dig_store_payment`) and the value a wallet/decoder
282/// checks a CAT coin's `asset_id` against to recognize $DIG.
283///
284/// CONTRACT: byte-identical to `chip35_dl_coin::DIG_ASSET_ID`, digstore-chain's
285/// `DIG_ASSET_ID`, and DataLayer-Driver's. Do not change without changing every
286/// consumer in lockstep (SYSTEM.md → Shared contracts → DIG CAT payment).
287pub const DIG_ASSET_ID: Bytes32 = Bytes32::new(hex!(
288    "a406d3a9de984d03c9591c10d917593b434d5263cabe2b42f6b367df16832f81"
289));
290
291// ---------------------------------------------------------------------------
292// DIG Testnet
293// ---------------------------------------------------------------------------
294
295/// Canonical DIG testnet genesis challenge.
296///
297/// Deterministically derived as `sha256(b"DIG_TESTNET:genesis:v1")` — distinct
298/// from mainnet so the two networks never share a `network_id`. Non-zero so the
299/// gossip network_id gate accepts it. Pre-launch canonical value (§3.7),
300/// revisable at true launch; all derived agg_sig data below follows it.
301///   = 088c18d6b7859d885dc2f03166e862c958f74b63b6353c3df71d103b9b806c3b
302const DIG_TESTNET_GENESIS_CHALLENGE: [u8; 32] =
303    hex!("088c18d6b7859d885dc2f03166e862c958f74b63b6353c3df71d103b9b806c3b");
304
305/// DIG testnet constants.
306///
307/// Same structure as mainnet but with a different genesis challenge.
308/// Useful for testing without risking mainnet state.
309pub const DIG_TESTNET: NetworkConstants = NetworkConstants {
310    inner: ConsensusConstants {
311        genesis_challenge: Bytes32::new(DIG_TESTNET_GENESIS_CHALLENGE),
312        // AGG_SIG_ME = genesis_challenge. Others = sha256(genesis || opcode_byte).
313        agg_sig_me_additional_data: Bytes32::new(DIG_TESTNET_GENESIS_CHALLENGE),
314        agg_sig_parent_additional_data: Bytes32::new(hex!(
315            "85b3963bdeb9848af970a9bbd1d36809ae41491ffd67aee7f27e8883936d495c"
316        )),
317        agg_sig_puzzle_additional_data: Bytes32::new(hex!(
318            "66aba1939e128e1465d58fde414325630e891747c1428d76ebce193cbe966301"
319        )),
320        agg_sig_amount_additional_data: Bytes32::new(hex!(
321            "eccab86920a6d982a68898b2dcb7c150383529fcd532fe84c693fb4592c38ae3"
322        )),
323        agg_sig_puzzle_amount_additional_data: Bytes32::new(hex!(
324            "eb088fad0d4caba66e29130fb07407e60a7545d035d19a188fef0855c874084e"
325        )),
326        agg_sig_parent_amount_additional_data: Bytes32::new(hex!(
327            "232aec0a351ba4936b04920e074aebcc621a458f6b1461c4b28c658552f2f35d"
328        )),
329        agg_sig_parent_puzzle_additional_data: Bytes32::new(hex!(
330            "96263ac395703ab9b3b0f0587e79185f4a9898574a28b4491015ddcf9d321873"
331        )),
332        // All other fields same as mainnet
333        max_block_cost_clvm: 11_000_000_000,
334        cost_per_byte: 12_000,
335        max_coin_amount: u64::MAX,
336        max_generator_size: 1_000_000,
337        max_generator_ref_list_size: 512,
338        hard_fork_height: 0,
339        hard_fork2_height: 0,
340        genesis_pre_farm_pool_puzzle_hash: Bytes32::new([0u8; 32]),
341        genesis_pre_farm_farmer_puzzle_hash: Bytes32::new([0u8; 32]),
342        slot_blocks_target: 32,
343        min_blocks_per_challenge_block: 16,
344        max_sub_slot_blocks: 128,
345        num_sps_sub_slot: 64,
346        sub_slot_iters_starting: 1 << 27,
347        difficulty_constant_factor: 1 << 67,
348        difficulty_starting: 7,
349        difficulty_change_max_factor: 3,
350        sub_epoch_blocks: 384,
351        epoch_blocks: 4608,
352        significant_bits: 8,
353        discriminant_size_bits: 1024,
354        number_zero_bits_plot_filter_v1: 9,
355        number_zero_bits_plot_filter_v2: 9,
356        min_plot_size_v1: 32,
357        max_plot_size_v1: 50,
358        min_plot_size_v2: 28,
359        max_plot_size_v2: 32,
360        sub_slot_time_target: 600,
361        num_sp_intervals_extra: 3,
362        max_future_time2: 120,
363        number_of_timestamps: 11,
364        max_vdf_witness_size: 64,
365        mempool_block_buffer: 10,
366        weight_proof_threshold: 2,
367        blocks_cache_size: 4608 + (128 * 4),
368        weight_proof_recent_blocks: 1000,
369        max_block_count_per_requests: 32,
370        pool_sub_slot_iters: 37_600_000_000,
371        plot_filter_128_height: 0xffff_ffff,
372        plot_filter_64_height: 0xffff_ffff,
373        plot_filter_32_height: 0xffff_ffff,
374        plot_difficulty_initial: 2,
375        plot_difficulty_4_height: 0xffff_ffff,
376        plot_difficulty_5_height: 0xffff_ffff,
377        plot_difficulty_6_height: 0xffff_ffff,
378        plot_difficulty_7_height: 0xffff_ffff,
379        plot_difficulty_8_height: 0xffff_ffff,
380    },
381};
382
383#[cfg(test)]
384mod tests {
385    use super::*;
386
387    /// The canonical relay endpoint must equal exactly what a DIG Node dials by
388    /// default. This pins the value byte-for-byte against `dig-node`'s
389    /// `relay::DEFAULT_RELAY_URL` (`wss://relay.dig.net:9450`) and the
390    /// `dig-relay` server's documented client endpoint. If either side ever
391    /// changes the scheme, host, or port, this guard fails so the shared
392    /// contract can't silently drift.
393    #[test]
394    fn dig_relay_url_is_canonical_endpoint() {
395        assert_eq!(DIG_RELAY_URL, "wss://relay.dig.net:443");
396    }
397
398    /// The relay endpoint is a secure-WebSocket URL pointing at the canonical
399    /// public host on the relay protocol port.
400    #[test]
401    fn dig_relay_url_is_well_formed() {
402        assert!(
403            DIG_RELAY_URL.starts_with("wss://"),
404            "relay must use secure WebSocket"
405        );
406        assert!(
407            DIG_RELAY_URL.contains("relay.dig.net"),
408            "relay must point at the canonical host"
409        );
410        assert!(
411            DIG_RELAY_URL.ends_with(":443"),
412            "relay must use the live NLB public TLS port 443"
413        );
414    }
415
416    /// The DIG node localhost port must equal the expected default.
417    ///
418    /// This guards against accidental mutations and ensures all consumers
419    /// (dig-node, dig-dns, dig-installer, dig-sdk, digstore) use a consistent
420    /// port when connecting to the local node on `dig.local` or `localhost`.
421    #[test]
422    fn dig_node_port_is_canonical() {
423        assert_eq!(DIG_NODE_PORT, 9778);
424    }
425
426    // -- Genesis challenge canonical-value guards --------------------------
427    //
428    // These pin the pre-launch canonical genesis challenges byte-for-byte AND
429    // prove they are reproducible from their documented preimages, so the
430    // values can never silently drift (a drift changes every derived signature
431    // domain + the gossip network_id — a cross-repo breaking event).
432
433    use sha2::{Digest, Sha256};
434
435    /// AGG_SIG opcode bytes, per §4.2 of `SPEC.md` (Chia L1 `condition_tools`).
436    const AGG_SIG_OPCODES: [u8; 6] = [43, 44, 45, 46, 47, 48];
437
438    fn sha256(bytes: &[u8]) -> [u8; 32] {
439        let mut hasher = Sha256::new();
440        hasher.update(bytes);
441        hasher.finalize().into()
442    }
443
444    /// The genesis MUST be non-zero: `dig-gossip` rejects an all-zero
445    /// `network_id`, so a zero genesis would stop the node's gossip pool / DHT /
446    /// PEX from ever starting. This is the connect-enabler invariant.
447    #[test]
448    fn genesis_challenges_are_non_zero() {
449        assert_ne!(DIG_MAINNET.genesis_challenge(), Bytes32::new([0u8; 32]));
450        assert_ne!(DIG_TESTNET.genesis_challenge(), Bytes32::new([0u8; 32]));
451    }
452
453    /// The mainnet genesis is pinned to the Chia mainnet header hash @ height
454    /// 9,021,277 (a real anchored value), and the testnet genesis is the
455    /// reproducible `sha256` of its documented preimage. These pin both values
456    /// byte-for-byte so neither can silently drift.
457    #[test]
458    fn genesis_challenges_are_the_pinned_values() {
459        assert_eq!(
460            DIG_MAINNET_GENESIS_CHALLENGE,
461            hex_literal::hex!("0af981862a4df51f51ec59c312315d959931d917c375730b89b9e2b0854d1abf"),
462        );
463        assert_eq!(
464            DIG_TESTNET_GENESIS_CHALLENGE,
465            sha256(b"DIG_TESTNET:genesis:v1"),
466        );
467    }
468
469    /// Mainnet and testnet MUST NOT share a genesis (no cross-network replay).
470    #[test]
471    fn mainnet_and_testnet_genesis_differ() {
472        assert_ne!(
473            DIG_MAINNET.genesis_challenge(),
474            DIG_TESTNET.genesis_challenge(),
475        );
476    }
477
478    /// Pins the $DIG CAT asset id byte-for-byte against the value shipped in
479    /// `chip35_dl_coin::DIG_ASSET_ID` — a drift here silently breaks $DIG
480    /// recognition across every consumer (wallets, decoders, payment builders).
481    #[test]
482    fn dig_asset_id_is_canonical() {
483        assert_eq!(
484            DIG_ASSET_ID,
485            Bytes32::new(hex_literal::hex!(
486                "a406d3a9de984d03c9591c10d917593b434d5263cabe2b42f6b367df16832f81"
487            )),
488        );
489    }
490
491    /// Every baked-in AGG_SIG additional-data value MUST equal the §4.1 rule
492    /// applied to the network's genesis: AGG_SIG_ME == genesis, and each other
493    /// variant == `sha256(genesis || opcode_byte)`. This regenerates the values
494    /// independently and asserts the constants match — so a genesis change that
495    /// forgets to recompute a derived value is caught.
496    #[test]
497    fn agg_sig_additional_data_matches_derivation_rule() {
498        for net in [&DIG_MAINNET, &DIG_TESTNET] {
499            let genesis = net.genesis_challenge();
500            assert_eq!(net.agg_sig_me_additional_data(), genesis);
501
502            let c = net.consensus();
503            let derived: Vec<Bytes32> = AGG_SIG_OPCODES
504                .iter()
505                .map(|&op| {
506                    let mut preimage = genesis.as_ref().to_vec();
507                    preimage.push(op);
508                    Bytes32::new(sha256(&preimage))
509                })
510                .collect();
511            assert_eq!(c.agg_sig_parent_additional_data, derived[0]);
512            assert_eq!(c.agg_sig_puzzle_additional_data, derived[1]);
513            assert_eq!(c.agg_sig_amount_additional_data, derived[2]);
514            assert_eq!(c.agg_sig_puzzle_amount_additional_data, derived[3]);
515            assert_eq!(c.agg_sig_parent_amount_additional_data, derived[4]);
516            assert_eq!(c.agg_sig_parent_puzzle_additional_data, derived[5]);
517        }
518    }
519}