1#![allow(missing_docs)]
4
5use hex::FromHex;
6use lazy_static::lazy_static;
7
8use std::collections::BTreeMap;
9
10trait ReverseCollection {
11 fn rev(self) -> Self;
13}
14
15impl ReverseCollection for [u8; 32] {
16 fn rev(mut self) -> [u8; 32] {
17 self.reverse();
18 self
19 }
20}
21
22lazy_static! {
23 pub static ref BLOCKS: Vec<&'static [u8]> = MAINNET_BLOCKS
25 .iter()
26 .chain(TESTNET_BLOCKS.iter())
27 .map(|(_height, block)| *block)
28 .collect();
29
30 pub static ref CONTINUOUS_MAINNET_BLOCKS: BTreeMap<u32, &'static [u8]> = MAINNET_BLOCKS
35 .iter()
36 .enumerate()
37 .take_while(|(i, (height, _block))| *i == **height as usize)
38 .map(|(_i, (height, block))| (*height, *block))
39 .collect();
40
41 pub static ref CONTINUOUS_TESTNET_BLOCKS: BTreeMap<u32, &'static [u8]> = TESTNET_BLOCKS
46 .iter()
47 .enumerate()
48 .take_while(|(i, (height, _block))| *i == **height as usize)
49 .map(|(_i, (height, block))| (*height, *block))
50 .collect();
51
52 pub static ref MAINNET_BLOCKS: BTreeMap<u32, &'static [u8]> = [
61 (0, BLOCK_MAINNET_GENESIS_BYTES.as_ref()),
63
64 (1, BLOCK_MAINNET_1_BYTES.as_ref()),
66 (2, BLOCK_MAINNET_2_BYTES.as_ref()),
67 (3, BLOCK_MAINNET_3_BYTES.as_ref()),
68 (4, BLOCK_MAINNET_4_BYTES.as_ref()),
69 (5, BLOCK_MAINNET_5_BYTES.as_ref()),
70 (6, BLOCK_MAINNET_6_BYTES.as_ref()),
71 (7, BLOCK_MAINNET_7_BYTES.as_ref()),
72 (8, BLOCK_MAINNET_8_BYTES.as_ref()),
73 (9, BLOCK_MAINNET_9_BYTES.as_ref()),
74 (10, BLOCK_MAINNET_10_BYTES.as_ref()),
75 (202, BLOCK_MAINNET_202_BYTES.as_ref()),
76 (396, BLOCK_MAINNET_396_BYTES.as_ref()),
78 (347_499, BLOCK_MAINNET_347499_BYTES.as_ref()),
79
80 (347_500, BLOCK_MAINNET_347500_BYTES.as_ref()),
82 (347_501, BLOCK_MAINNET_347501_BYTES.as_ref()),
83 (415_000, BLOCK_MAINNET_415000_BYTES.as_ref()),
84 (419_199, BLOCK_MAINNET_419199_BYTES.as_ref()),
85
86 (419_200, BLOCK_MAINNET_419200_BYTES.as_ref()),
88 (419_201, BLOCK_MAINNET_419201_BYTES.as_ref()),
89 (419_202, BLOCK_MAINNET_419202_BYTES.as_ref()),
90
91 (434_873, BLOCK_MAINNET_434873_BYTES.as_ref()),
93 (653_599, BLOCK_MAINNET_653599_BYTES.as_ref()),
94
95 (653_600, BLOCK_MAINNET_653600_BYTES.as_ref()),
97 (653_601, BLOCK_MAINNET_653601_BYTES.as_ref()),
98 (902_999, BLOCK_MAINNET_902999_BYTES.as_ref()),
99
100 (903_000, BLOCK_MAINNET_903000_BYTES.as_ref()),
102 (903_001, BLOCK_MAINNET_903001_BYTES.as_ref()),
103
104 (949_496, BLOCK_MAINNET_949496_BYTES.as_ref()),
106 (975_066, BLOCK_MAINNET_975066_BYTES.as_ref()),
107 (982_681, BLOCK_MAINNET_982681_BYTES.as_ref()),
108
109 (1_046_399, BLOCK_MAINNET_1046399_BYTES.as_ref()),
111
112 (1_046_400, BLOCK_MAINNET_1046400_BYTES.as_ref()),
114 (1_046_401, BLOCK_MAINNET_1046401_BYTES.as_ref()),
115 (1_180_900, BLOCK_MAINNET_1180900_BYTES.as_ref()),
116
117 (1_687_106, BLOCK_MAINNET_1687106_BYTES.as_ref()),
124 (1_687_107, BLOCK_MAINNET_1687107_BYTES.as_ref()),
127 (1_687_108, BLOCK_MAINNET_1687108_BYTES.as_ref()),
130 (1_687_113, BLOCK_MAINNET_1687113_BYTES.as_ref()),
132 (1_687_118, BLOCK_MAINNET_1687118_BYTES.as_ref()),
134 (1_687_121, BLOCK_MAINNET_1687121_BYTES.as_ref()),
136 ].iter().cloned().collect();
137
138 pub static ref MAINNET_FINAL_SPROUT_ROOTS: BTreeMap<u32, &'static [u8; 32]> = [
143 (0, SPROUT_FINAL_ROOT_MAINNET_0_BYTES.as_ref().try_into().unwrap()),
145 (396, SPROUT_FINAL_ROOT_MAINNET_396_BYTES.as_ref().try_into().unwrap()),
147
148 (347_499, SPROUT_FINAL_ROOT_MAINNET_347499_BYTES.as_ref().try_into().unwrap()),
150 (347_500, SPROUT_FINAL_ROOT_MAINNET_347500_BYTES.as_ref().try_into().unwrap()),
151 (347_501, SPROUT_FINAL_ROOT_MAINNET_347501_BYTES.as_ref().try_into().unwrap()),
152 ].iter().cloned().collect();
153
154 pub static ref MAINNET_FINAL_SAPLING_ROOTS: BTreeMap<u32, &'static [u8; 32]> = [
159 (419_200, SAPLING_FINAL_ROOT_MAINNET_419200_BYTES.as_ref().try_into().unwrap()),
161 (419_201, SAPLING_FINAL_ROOT_MAINNET_419201_BYTES.as_ref().try_into().unwrap()),
162 (419_202, SAPLING_FINAL_ROOT_MAINNET_419202_BYTES.as_ref().try_into().unwrap()),
163 (434_873, SAPLING_FINAL_ROOT_MAINNET_434873_BYTES.as_ref().try_into().unwrap()),
165 (653_599, SAPLING_FINAL_ROOT_MAINNET_653599_BYTES.as_ref().try_into().unwrap()),
166 (653_600, SAPLING_FINAL_ROOT_MAINNET_653600_BYTES.as_ref().try_into().unwrap()),
168 (653_601, SAPLING_FINAL_ROOT_MAINNET_653601_BYTES.as_ref().try_into().unwrap()),
169 (902_999, SAPLING_FINAL_ROOT_MAINNET_902999_BYTES.as_ref().try_into().unwrap()),
170 (903_000, SAPLING_FINAL_ROOT_MAINNET_903000_BYTES.as_ref().try_into().unwrap()),
172 (903_001, SAPLING_FINAL_ROOT_MAINNET_903001_BYTES.as_ref().try_into().unwrap()),
173 (949_496, SAPLING_FINAL_ROOT_MAINNET_949496_BYTES.as_ref().try_into().unwrap()),
175 (975_066, SAPLING_FINAL_ROOT_MAINNET_975066_BYTES.as_ref().try_into().unwrap()),
176 (982_681, SAPLING_FINAL_ROOT_MAINNET_982681_BYTES.as_ref().try_into().unwrap()),
177 (1_046_399, SAPLING_FINAL_ROOT_MAINNET_1046399_BYTES.as_ref().try_into().unwrap()),
179 (1_046_400, SAPLING_FINAL_ROOT_MAINNET_1046400_BYTES.as_ref().try_into().unwrap()),
181 (1_046_401, SAPLING_FINAL_ROOT_MAINNET_1046401_BYTES.as_ref().try_into().unwrap()),
182 (1_180_900, SAPLING_FINAL_ROOT_MAINNET_1180900_BYTES.as_ref().try_into().unwrap()),
183 (1_687_106, SAPLING_FINAL_ROOT_MAINNET_1687106_BYTES.as_ref().try_into().unwrap()),
185 (1_687_107, SAPLING_FINAL_ROOT_MAINNET_1687107_BYTES.as_ref().try_into().unwrap()),
186 (1_687_108, SAPLING_FINAL_ROOT_MAINNET_1687108_BYTES.as_ref().try_into().unwrap()),
187 (1_687_113, SAPLING_FINAL_ROOT_MAINNET_1687113_BYTES.as_ref().try_into().unwrap()),
188 (1_687_118, SAPLING_FINAL_ROOT_MAINNET_1687118_BYTES.as_ref().try_into().unwrap()),
189 (1_687_121, SAPLING_FINAL_ROOT_MAINNET_1687121_BYTES.as_ref().try_into().unwrap()),
190 ].iter().cloned().collect();
191
192 pub static ref MAINNET_FINAL_ORCHARD_ROOTS: BTreeMap<u32, &'static [u8; 32]> = [
197 (1_687_106, ORCHARD_FINAL_ROOT_MAINNET_1687106_BYTES.as_ref().try_into().unwrap()),
199 (1_687_107, ORCHARD_FINAL_ROOT_MAINNET_1687107_BYTES.as_ref().try_into().unwrap()),
200 (1_687_108, ORCHARD_FINAL_ROOT_MAINNET_1687108_BYTES.as_ref().try_into().unwrap()),
201 (1_687_113, ORCHARD_FINAL_ROOT_MAINNET_1687113_BYTES.as_ref().try_into().unwrap()),
202 (1_687_118, ORCHARD_FINAL_ROOT_MAINNET_1687118_BYTES.as_ref().try_into().unwrap()),
203 (1_687_121, ORCHARD_FINAL_ROOT_MAINNET_1687121_BYTES.as_ref().try_into().unwrap()),
204 ].iter().cloned().collect();
205
206 pub static ref TESTNET_BLOCKS: BTreeMap<u32, &'static [u8]> = [
210 (0, BLOCK_TESTNET_GENESIS_BYTES.as_ref()),
212 (1, BLOCK_TESTNET_1_BYTES.as_ref()),
214 (2, BLOCK_TESTNET_2_BYTES.as_ref()),
215 (3, BLOCK_TESTNET_3_BYTES.as_ref()),
216 (4, BLOCK_TESTNET_4_BYTES.as_ref()),
217 (5, BLOCK_TESTNET_5_BYTES.as_ref()),
218 (6, BLOCK_TESTNET_6_BYTES.as_ref()),
219 (7, BLOCK_TESTNET_7_BYTES.as_ref()),
220 (8, BLOCK_TESTNET_8_BYTES.as_ref()),
221 (9, BLOCK_TESTNET_9_BYTES.as_ref()),
222 (10, BLOCK_TESTNET_10_BYTES.as_ref()),
223 (2_259, BLOCK_TESTNET_2259_BYTES.as_ref()),
225 (141_042, BLOCK_TESTNET_141042_BYTES.as_ref()),
227 (207_499, BLOCK_TESTNET_207499_BYTES.as_ref()),
228 (207_500, BLOCK_TESTNET_207500_BYTES.as_ref()),
230 (207_501, BLOCK_TESTNET_207501_BYTES.as_ref()),
231 (279_999, BLOCK_TESTNET_279999_BYTES.as_ref()),
232 (280_000, BLOCK_TESTNET_280000_BYTES.as_ref()),
234 (280_001, BLOCK_TESTNET_280001_BYTES.as_ref()),
235 (299_187, BLOCK_TESTNET_299187_BYTES.as_ref()),
236 (299_188, BLOCK_TESTNET_299188_BYTES.as_ref()),
239 (299_189, BLOCK_TESTNET_299189_BYTES.as_ref()),
240 (299_201, BLOCK_TESTNET_299201_BYTES.as_ref()),
241 (299_202, BLOCK_TESTNET_299202_BYTES.as_ref()),
243 (583_999, BLOCK_TESTNET_583999_BYTES.as_ref()),
244 (584_000, BLOCK_TESTNET_584000_BYTES.as_ref()),
246 (584_001, BLOCK_TESTNET_584001_BYTES.as_ref()),
247 (903_799, BLOCK_TESTNET_903799_BYTES.as_ref()),
248 (903_800, BLOCK_TESTNET_903800_BYTES.as_ref()),
250 (903_801, BLOCK_TESTNET_903801_BYTES.as_ref()),
251 (914_678, BLOCK_TESTNET_914678_BYTES.as_ref()),
253 (925_483, BLOCK_TESTNET_925483_BYTES.as_ref()),
254 (1_028_499, BLOCK_TESTNET_1028499_BYTES.as_ref()),
255 (1_028_500, BLOCK_TESTNET_1028500_BYTES.as_ref()),
257 (1_028_501, BLOCK_TESTNET_1028501_BYTES.as_ref()),
258 (1_095_000, BLOCK_TESTNET_1095000_BYTES.as_ref()),
259 (1_101_629, BLOCK_TESTNET_1101629_BYTES.as_ref()),
261 (1_115_999, BLOCK_TESTNET_1115999_BYTES.as_ref()),
263 (1_116_000, BLOCK_TESTNET_1116000_BYTES.as_ref()),
265 (1_116_001, BLOCK_TESTNET_1116001_BYTES.as_ref()),
266 (1_326_100, BLOCK_TESTNET_1326100_BYTES.as_ref()),
267
268 (1_842_421, BLOCK_TESTNET_1842421_BYTES.as_ref()),
277 (1_842_432, BLOCK_TESTNET_1842432_BYTES.as_ref()),
282 (1_842_462, BLOCK_TESTNET_1842462_BYTES.as_ref()),
287 (1_842_467, BLOCK_TESTNET_1842467_BYTES.as_ref()),
289 (1_842_468, BLOCK_TESTNET_1842468_BYTES.as_ref()),
295 ].iter().cloned().collect();
296
297 pub static ref TESTNET_FINAL_SPROUT_ROOTS: BTreeMap<u32, &'static [u8; 32]> = [
302 (0, SPROUT_FINAL_ROOT_TESTNET_0_BYTES.as_ref().try_into().unwrap()),
304 (2259, SPROUT_FINAL_ROOT_TESTNET_2259_BYTES.as_ref().try_into().unwrap()),
306 ].iter().cloned().collect();
307
308 pub static ref TESTNET_FINAL_SAPLING_ROOTS: BTreeMap<u32, &'static [u8; 32]> = [
313 (280_000, SAPLING_FINAL_ROOT_TESTNET_280000_BYTES.as_ref().try_into().unwrap()),
315 (280_001, SAPLING_FINAL_ROOT_TESTNET_280001_BYTES.as_ref().try_into().unwrap()),
316 (299_187, SAPLING_FINAL_ROOT_TESTNET_299187_BYTES.as_ref().try_into().unwrap()),
317 (299_188, SAPLING_FINAL_ROOT_TESTNET_299188_BYTES.as_ref().try_into().unwrap()),
320 (299_189, SAPLING_FINAL_ROOT_TESTNET_299189_BYTES.as_ref().try_into().unwrap()),
321 (299_201, SAPLING_FINAL_ROOT_TESTNET_299201_BYTES.as_ref().try_into().unwrap()),
322 (299_202, SAPLING_FINAL_ROOT_TESTNET_299202_BYTES.as_ref().try_into().unwrap()),
324 (583_999, SAPLING_FINAL_ROOT_TESTNET_583999_BYTES.as_ref().try_into().unwrap()),
325 (584_000, SAPLING_FINAL_ROOT_TESTNET_584000_BYTES.as_ref().try_into().unwrap()),
327 (584_001, SAPLING_FINAL_ROOT_TESTNET_584001_BYTES.as_ref().try_into().unwrap()),
328 (903_799, SAPLING_FINAL_ROOT_TESTNET_903799_BYTES.as_ref().try_into().unwrap()),
329 (903_800, SAPLING_FINAL_ROOT_TESTNET_903800_BYTES.as_ref().try_into().unwrap()),
331 (903_801, SAPLING_FINAL_ROOT_TESTNET_903801_BYTES.as_ref().try_into().unwrap()),
332 (914_678, SAPLING_FINAL_ROOT_TESTNET_914678_BYTES.as_ref().try_into().unwrap()),
334 (925_483, SAPLING_FINAL_ROOT_TESTNET_925483_BYTES.as_ref().try_into().unwrap()),
335 (1_028_499, SAPLING_FINAL_ROOT_TESTNET_1028499_BYTES.as_ref().try_into().unwrap()),
336 (1_028_500, SAPLING_FINAL_ROOT_TESTNET_1028500_BYTES.as_ref().try_into().unwrap()),
338 (1_028_501, SAPLING_FINAL_ROOT_TESTNET_1028501_BYTES.as_ref().try_into().unwrap()),
339 (1_095_000, SAPLING_FINAL_ROOT_TESTNET_1095000_BYTES.as_ref().try_into().unwrap()),
340 (1_101_629, SAPLING_FINAL_ROOT_TESTNET_1101629_BYTES.as_ref().try_into().unwrap()),
342 (1_115_999, SAPLING_FINAL_ROOT_TESTNET_1115999_BYTES.as_ref().try_into().unwrap()),
344 (1_116_000, SAPLING_FINAL_ROOT_TESTNET_1116000_BYTES.as_ref().try_into().unwrap()),
346 (1_116_001, SAPLING_FINAL_ROOT_TESTNET_1116001_BYTES.as_ref().try_into().unwrap()),
347 (1_326_100, SAPLING_FINAL_ROOT_TESTNET_1326100_BYTES.as_ref().try_into().unwrap()),
348 (1_842_421, SAPLING_FINAL_ROOT_TESTNET_1842421_BYTES.as_ref().try_into().unwrap()),
350 (1_842_432, SAPLING_FINAL_ROOT_TESTNET_1842432_BYTES.as_ref().try_into().unwrap()),
351 (1_842_462, SAPLING_FINAL_ROOT_TESTNET_1842462_BYTES.as_ref().try_into().unwrap()),
352 (1_842_467, SAPLING_FINAL_ROOT_TESTNET_1842467_BYTES.as_ref().try_into().unwrap()),
353 (1_842_468, SAPLING_FINAL_ROOT_TESTNET_1842468_BYTES.as_ref().try_into().unwrap()),
354 ].iter().cloned().collect();
355
356 pub static ref TESTNET_FINAL_ORCHARD_ROOTS: BTreeMap<u32, &'static [u8; 32]> = [
361 (1_842_421, ORCHARD_FINAL_ROOT_TESTNET_1842421_BYTES.as_ref().try_into().unwrap()),
363 (1_842_432, ORCHARD_FINAL_ROOT_TESTNET_1842432_BYTES.as_ref().try_into().unwrap()),
364 (1_842_462, ORCHARD_FINAL_ROOT_TESTNET_1842462_BYTES.as_ref().try_into().unwrap()),
365 (1_842_467, ORCHARD_FINAL_ROOT_TESTNET_1842467_BYTES.as_ref().try_into().unwrap()),
366 (1_842_468, ORCHARD_FINAL_ROOT_TESTNET_1842468_BYTES.as_ref().try_into().unwrap()),
367 ].iter().cloned().collect();
368
369 pub static ref BLOCK_MAINNET_GENESIS_BYTES: Vec<u8> =
376 <Vec<u8>>::from_hex(include_str!("block-main-0-000-000.txt").trim())
377 .expect("Block bytes are in valid hex representation");
378 pub static ref BLOCK_MAINNET_1_BYTES: Vec<u8> =
379 <Vec<u8>>::from_hex(include_str!("block-main-0-000-001.txt").trim())
380 .expect("Block bytes are in valid hex representation");
381 pub static ref BLOCK_MAINNET_2_BYTES: Vec<u8> =
382 <Vec<u8>>::from_hex(include_str!("block-main-0-000-002.txt").trim())
383 .expect("Block bytes are in valid hex representation");
384 pub static ref BLOCK_MAINNET_3_BYTES: Vec<u8> =
385 <Vec<u8>>::from_hex(include_str!("block-main-0-000-003.txt").trim())
386 .expect("Block bytes are in valid hex representation");
387 pub static ref BLOCK_MAINNET_4_BYTES: Vec<u8> =
388 <Vec<u8>>::from_hex(include_str!("block-main-0-000-004.txt").trim())
389 .expect("Block bytes are in valid hex representation");
390 pub static ref BLOCK_MAINNET_5_BYTES: Vec<u8> =
391 <Vec<u8>>::from_hex(include_str!("block-main-0-000-005.txt").trim())
392 .expect("Block bytes are in valid hex representation");
393 pub static ref BLOCK_MAINNET_6_BYTES: Vec<u8> =
394 <Vec<u8>>::from_hex(include_str!("block-main-0-000-006.txt").trim())
395 .expect("Block bytes are in valid hex representation");
396 pub static ref BLOCK_MAINNET_7_BYTES: Vec<u8> =
397 <Vec<u8>>::from_hex(include_str!("block-main-0-000-007.txt").trim())
398 .expect("Block bytes are in valid hex representation");
399 pub static ref BLOCK_MAINNET_8_BYTES: Vec<u8> =
400 <Vec<u8>>::from_hex(include_str!("block-main-0-000-008.txt").trim())
401 .expect("Block bytes are in valid hex representation");
402 pub static ref BLOCK_MAINNET_9_BYTES: Vec<u8> =
403 <Vec<u8>>::from_hex(include_str!("block-main-0-000-009.txt").trim())
404 .expect("Block bytes are in valid hex representation");
405 pub static ref BLOCK_MAINNET_10_BYTES: Vec<u8> =
407 <Vec<u8>>::from_hex(include_str!("block-main-0-000-010.txt").trim())
408 .expect("Block bytes are in valid hex representation");
409 pub static ref BLOCK_MAINNET_202_BYTES: Vec<u8> =
410 <Vec<u8>>::from_hex(include_str!("block-main-0-000-202.txt").trim())
411 .expect("Block bytes are in valid hex representation");
412 pub static ref BLOCK_MAINNET_395_BYTES: Vec<u8> =
414 <Vec<u8>>::from_hex(include_str!("block-main-0-000-395.txt").trim())
415 .expect("Block bytes are in valid hex representation");
416 pub static ref BLOCK_MAINNET_396_BYTES: Vec<u8> =
418 <Vec<u8>>::from_hex(include_str!("block-main-0-000-396.txt").trim())
419 .expect("Block bytes are in valid hex representation");
420
421 pub static ref BAD_BLOCK_MAINNET_202_BYTES: Vec<u8> =
424 <Vec<u8>>::from_hex(include_str!("block-main-0-000-202-bad.txt").trim())
425 .expect("Block bytes are in valid hex representation");
426
427
428 pub static ref SPROUT_FINAL_ROOT_MAINNET_0_BYTES: [u8; 32] =
437 <[u8; 32]>::from_hex("59d2cde5e65c1414c32ba54f0fe4bdb3d67618125286e6a191317917c812c6d7")
438 .expect("final root bytes are in valid hex representation").rev();
439 pub static ref SPROUT_FINAL_ROOT_MAINNET_396_BYTES: [u8; 32] =
441 <[u8; 32]>::from_hex("6a5710d1ca7d079baf1ce6ed1ea1b0756e219e9f3ebb9c0ec5b8ca1ff81c8f06")
442 .expect("final root bytes are in valid hex representation").rev();
443
444 pub static ref SPROUT_FINAL_ROOT_MAINNET_347499_BYTES: [u8; 32] =
453 <[u8; 32]>::from_hex("ce01f64025aba7c0e30a29f239f0eecd3cc18e5b1e575ca018c789a99482724f")
454 .expect("final root bytes are in valid hex representation").rev();
455 pub static ref SPROUT_FINAL_ROOT_MAINNET_347500_BYTES: [u8; 32] =
456 <[u8; 32]>::from_hex("ce01f64025aba7c0e30a29f239f0eecd3cc18e5b1e575ca018c789a99482724f")
457 .expect("final root bytes are in valid hex representation").rev();
458 pub static ref SPROUT_FINAL_ROOT_MAINNET_347501_BYTES: [u8; 32] =
459 <[u8; 32]>::from_hex("db036e080299a7401fd816789b5ea1b092ba3dab21e0f1d44161fffa149c65c1")
460 .expect("final root bytes are in valid hex representation").rev();
461
462 pub static ref BLOCK_MAINNET_347499_BYTES: Vec<u8> =
467 <Vec<u8>>::from_hex(include_str!("block-main-0-347-499.txt").trim())
468 .expect("Block bytes are in valid hex representation");
469 pub static ref BLOCK_MAINNET_347500_BYTES: Vec<u8> =
470 <Vec<u8>>::from_hex(include_str!("block-main-0-347-500.txt").trim())
471 .expect("Block bytes are in valid hex representation");
472 pub static ref BLOCK_MAINNET_347501_BYTES: Vec<u8> =
473 <Vec<u8>>::from_hex(include_str!("block-main-0-347-501.txt").trim())
474 .expect("Block bytes are in valid hex representation");
475 pub static ref BLOCK_MAINNET_415000_BYTES: Vec<u8> =
477 <Vec<u8>>::from_hex(include_str!("block-main-0-415-000.txt").trim())
478 .expect("Block bytes are in valid hex representation");
479
480 pub static ref BLOCK_MAINNET_419199_BYTES: Vec<u8> =
495 <Vec<u8>>::from_hex(include_str!("block-main-0-419-199.txt").trim())
496 .expect("Block bytes are in valid hex representation");
497 pub static ref BLOCK_MAINNET_419200_BYTES: Vec<u8> =
498 <Vec<u8>>::from_hex(include_str!("block-main-0-419-200.txt").trim())
499 .expect("Block bytes are in valid hex representation");
500 pub static ref BLOCK_MAINNET_419201_BYTES: Vec<u8> =
501 <Vec<u8>>::from_hex(include_str!("block-main-0-419-201.txt").trim())
502 .expect("Block bytes are in valid hex representation");
503 pub static ref BLOCK_MAINNET_419202_BYTES: Vec<u8> =
504 <Vec<u8>>::from_hex(include_str!("block-main-0-419-202.txt").trim())
505 .expect("Block bytes are in valid hex representation");
506 pub static ref SAPLING_FINAL_ROOT_MAINNET_419200_BYTES: [u8; 32] =
507 <[u8; 32]>::from_hex("3e49b5f954aa9d3545bc6c37744661eea48d7c34e3000d82b7f0010c30f4c2fb")
508 .expect("final root bytes are in valid hex representation").rev();
509 pub static ref SAPLING_FINAL_ROOT_MAINNET_419201_BYTES: [u8; 32] =
510 <[u8; 32]>::from_hex("638d7e5ba37ab7921c51a4f3ae1b32d71c605a0ed9be7477928111a637f7421b")
511 .expect("final root bytes are in valid hex representation").rev();
512 pub static ref SAPLING_FINAL_ROOT_MAINNET_419202_BYTES: [u8; 32] =
513 <[u8; 32]>::from_hex("54393f89293c8af01eb985398f5a984c446dd2974bf6ab63fdacbaf32d27a107")
514 .expect("final root bytes are in valid hex representation").rev();
515
516 pub static ref BLOCK_MAINNET_434873_BYTES: Vec<u8> =
519 <Vec<u8>>::from_hex(include_str!("block-main-0-434-873.txt").trim())
520 .expect("Block bytes are in valid hex representation");
521 pub static ref SAPLING_FINAL_ROOT_MAINNET_434873_BYTES: [u8; 32] =
522 <[u8; 32]>::from_hex("56e33199bc41d146cb24d24a65db35101248a1d12fff33affef56f90081a9517")
523 .expect("final root bytes are in valid hex representation").rev();
524
525 pub static ref BLOCK_MAINNET_653599_BYTES: Vec<u8> =
530 <Vec<u8>>::from_hex(include_str!("block-main-0-653-599.txt").trim())
531 .expect("Block bytes are in valid hex representation");
532 pub static ref BLOCK_MAINNET_653600_BYTES: Vec<u8> =
533 <Vec<u8>>::from_hex(include_str!("block-main-0-653-600.txt").trim())
534 .expect("Block bytes are in valid hex representation");
535 pub static ref BLOCK_MAINNET_653601_BYTES: Vec<u8> =
536 <Vec<u8>>::from_hex(include_str!("block-main-0-653-601.txt").trim())
537 .expect("Block bytes are in valid hex representation");
538 pub static ref SAPLING_FINAL_ROOT_MAINNET_653599_BYTES: [u8; 32] =
539 <[u8; 32]>::from_hex("3d532d101b9171769423a9f45a65b6312e28e7aa92b627cb81810f7a6fe21c6a")
540 .expect("final root bytes are in valid hex representation").rev();
541 pub static ref SAPLING_FINAL_ROOT_MAINNET_653600_BYTES: [u8; 32] =
542 <[u8; 32]>::from_hex("3d532d101b9171769423a9f45a65b6312e28e7aa92b627cb81810f7a6fe21c6a")
543 .expect("final root bytes are in valid hex representation").rev();
544 pub static ref SAPLING_FINAL_ROOT_MAINNET_653601_BYTES: [u8; 32] =
545 <[u8; 32]>::from_hex("612c62e54ef55f7bf8a60281debf1df904bf1fa6d1fa65d9656302b44ea98427")
546 .expect("final root bytes are in valid hex representation").rev();
547
548 pub static ref BLOCK_MAINNET_902999_BYTES: Vec<u8> =
552 <Vec<u8>>::from_hex(include_str!("block-main-0-902-999.txt").trim())
553 .expect("Block bytes are in valid hex representation");
554 pub static ref BLOCK_MAINNET_903000_BYTES: Vec<u8> =
558 <Vec<u8>>::from_hex(include_str!("block-main-0-903-000.txt").trim())
559 .expect("Block bytes are in valid hex representation");
560 pub static ref BLOCK_MAINNET_903001_BYTES: Vec<u8> =
561 <Vec<u8>>::from_hex(include_str!("block-main-0-903-001.txt").trim())
562 .expect("Block bytes are in valid hex representation");
563 pub static ref SAPLING_FINAL_ROOT_MAINNET_902999_BYTES: [u8; 32] =
564 <[u8; 32]>::from_hex("49df1a6e62458b0226b9d6c0c28fb7e94d9ca840582878b10d0117fd028b4e91")
565 .expect("final root bytes are in valid hex representation").rev();
566 pub static ref SAPLING_FINAL_ROOT_MAINNET_903000_BYTES: [u8; 32] =
567 <[u8; 32]>::from_hex("11e48300f0e2296d5c413340b26426eddada1155155f4e959ebe307396976c79")
568 .expect("final root bytes are in valid hex representation").rev();
569 pub static ref SAPLING_FINAL_ROOT_MAINNET_903001_BYTES: [u8; 32] =
570 <[u8; 32]>::from_hex("14e3c2b8af239bc4e17486573c20824292d5e1a6670dedf58bf865159e389cce")
571 .expect("final root bytes are in valid hex representation").rev();
572
573 pub static ref BLOCK_MAINNET_949496_BYTES: Vec<u8> =
581 <Vec<u8>>::from_hex(include_str!("block-main-0-949-496.txt").trim())
582 .expect("Block bytes are in valid hex representation");
583 pub static ref BLOCK_MAINNET_975066_BYTES: Vec<u8> =
585 <Vec<u8>>::from_hex(include_str!("block-main-0-975-066.txt").trim())
586 .expect("Block bytes are in valid hex representation");
587 pub static ref BLOCK_MAINNET_982681_BYTES: Vec<u8> =
589 <Vec<u8>>::from_hex(include_str!("block-main-0-982-681.txt").trim())
590 .expect("Block bytes are in valid hex representation");
591 pub static ref SAPLING_FINAL_ROOT_MAINNET_949496_BYTES: [u8; 32] =
592 <[u8; 32]>::from_hex("4db238913a86284f5bddb9bcfe76f96a46d097ec681aad1da846cc276bfa7263")
593 .expect("final root bytes are in valid hex representation").rev();
594 pub static ref SAPLING_FINAL_ROOT_MAINNET_975066_BYTES: [u8; 32] =
595 <[u8; 32]>::from_hex("2f62381b6decd0e0f937f6aa23faa7d19444b784701be93ad7e4df31bd4da1f9")
596 .expect("final root bytes are in valid hex representation").rev();
597 pub static ref SAPLING_FINAL_ROOT_MAINNET_982681_BYTES: [u8; 32] =
598 <[u8; 32]>::from_hex("4fd1cb6d1e5c479baa44fcb7c3a1c6fafdaa54c0456d254918cd63839805848d")
599 .expect("final root bytes are in valid hex representation").rev();
600
601 pub static ref BLOCK_MAINNET_1046399_BYTES: Vec<u8> =
607 <Vec<u8>>::from_hex(include_str!("block-main-1-046-399.txt").trim())
608 .expect("Block bytes are in valid hex representation");
609 pub static ref BLOCK_MAINNET_1046400_BYTES: Vec<u8> =
610 <Vec<u8>>::from_hex(include_str!("block-main-1-046-400.txt").trim())
611 .expect("Block bytes are in valid hex representation");
612 pub static ref BLOCK_MAINNET_1046401_BYTES: Vec<u8> =
616 include_bytes!("block-main-1-046-401.bin")
617 .to_vec();
618 pub static ref SAPLING_FINAL_ROOT_MAINNET_1046399_BYTES: [u8; 32] =
619 <[u8; 32]>::from_hex("0f12c92f737e84142792bddc82e36481de4a7679d5778a27389793933c8742e1")
620 .expect("final root bytes are in valid hex representation").rev();
621 pub static ref SAPLING_FINAL_ROOT_MAINNET_1046400_BYTES: [u8; 32] =
622 <[u8; 32]>::from_hex("0f12c92f737e84142792bddc82e36481de4a7679d5778a27389793933c8742e1")
623 .expect("final root bytes are in valid hex representation").rev();
624 pub static ref SAPLING_FINAL_ROOT_MAINNET_1046401_BYTES: [u8; 32] =
625 <[u8; 32]>::from_hex("1cb7a61a31354384957eea0b98661e1cf85a5de8e43f0e3bef522c8b375b26cb")
626 .expect("final root bytes are in valid hex representation").rev();
627
628 pub static ref BLOCK_MAINNET_1180900_BYTES: Vec<u8> =
633 <Vec<u8>>::from_hex(include_str!("block-main-1-180-900.txt").trim())
634 .expect("Block bytes are in valid hex representation");
635 pub static ref SAPLING_FINAL_ROOT_MAINNET_1180900_BYTES: [u8; 32] =
636 <[u8; 32]>::from_hex("4a51c1b879f49637873ac4b261e9c625e16d9400b22d8aa4f27cd6fd1138ddda")
637 .expect("final root bytes are in valid hex representation").rev();
638
639 pub static ref BLOCK_MAINNET_1687106_BYTES: Vec<u8> =
641 <Vec<u8>>::from_hex(include_str!("block-main-1-687-106.txt").trim())
642 .expect("Block bytes are in valid hex representation");
643 pub static ref SAPLING_FINAL_ROOT_MAINNET_1687106_BYTES: [u8; 32] =
644 <[u8; 32]>::from_hex("41f3adfe94f336b6581923c9d20e07bccab0c47cd57ecb66cb9f35bb3e62066f")
645 .expect("final root bytes are in valid hex representation").rev();
646 pub static ref ORCHARD_FINAL_ROOT_MAINNET_1687106_BYTES: [u8; 32] =
647 <[u8; 32]>::from_hex("ae2935f1dfd8a24aed7c70df7de3a668eb7a49b1319880dde2bbd9031ae5d82f")
648 .expect("final root bytes are in valid hex representation").rev();
649 pub static ref BLOCK_MAINNET_1687107_BYTES: Vec<u8> =
650 <Vec<u8>>::from_hex(include_str!("block-main-1-687-107.txt").trim())
651 .expect("Block bytes are in valid hex representation");
652 pub static ref SAPLING_FINAL_ROOT_MAINNET_1687107_BYTES: [u8; 32] =
653 <[u8; 32]>::from_hex("4b013ee86a4a7b19871aa9b7a1dff0b29e0a737812c8970356c18340752957c7")
654 .expect("final root bytes are in valid hex representation").rev();
655 pub static ref ORCHARD_FINAL_ROOT_MAINNET_1687107_BYTES: [u8; 32] =
656 <[u8; 32]>::from_hex("7b61fc613cea5c2c84c5e2c64d4fd4afb8c8c9d10dce9bcad49431c9cf32f131")
657 .expect("final root bytes are in valid hex representation").rev();
658 pub static ref BLOCK_MAINNET_1687108_BYTES: Vec<u8> =
659 <Vec<u8>>::from_hex(include_str!("block-main-1-687-108.txt").trim())
660 .expect("Block bytes are in valid hex representation");
661 pub static ref SAPLING_FINAL_ROOT_MAINNET_1687108_BYTES: [u8; 32] =
662 <[u8; 32]>::from_hex("174d81c4d858ab7932c424ee44f5e47ceafc50fcc44fb39bfaf74258570eb9b2")
663 .expect("final root bytes are in valid hex representation").rev();
664 pub static ref ORCHARD_FINAL_ROOT_MAINNET_1687108_BYTES: [u8; 32] =
665 <[u8; 32]>::from_hex("7b61fc613cea5c2c84c5e2c64d4fd4afb8c8c9d10dce9bcad49431c9cf32f131")
666 .expect("final root bytes are in valid hex representation").rev();
667 pub static ref BLOCK_MAINNET_1687113_BYTES: Vec<u8> =
668 <Vec<u8>>::from_hex(include_str!("block-main-1-687-113.txt").trim())
669 .expect("Block bytes are in valid hex representation");
670 pub static ref SAPLING_FINAL_ROOT_MAINNET_1687113_BYTES: [u8; 32] =
671 <[u8; 32]>::from_hex("53189fd8855fb8d8f49a4cf505669ce6fd95e28abfe8f3def7c2493b1ae4fc1f")
672 .expect("final root bytes are in valid hex representation").rev();
673 pub static ref ORCHARD_FINAL_ROOT_MAINNET_1687113_BYTES: [u8; 32] =
674 <[u8; 32]>::from_hex("ed17182c783c649f53c0ecfe900a58cd818e89d2784f750df6c906999337dc10")
675 .expect("final root bytes are in valid hex representation").rev();
676 pub static ref BLOCK_MAINNET_1687118_BYTES: Vec<u8> =
677 <Vec<u8>>::from_hex(include_str!("block-main-1-687-118.txt").trim())
678 .expect("Block bytes are in valid hex representation");
679 pub static ref SAPLING_FINAL_ROOT_MAINNET_1687118_BYTES: [u8; 32] =
680 <[u8; 32]>::from_hex("50f2481034cb80ec7e3e56177981ab47739e5a0c650638b2ac29909468c5f225")
681 .expect("final root bytes are in valid hex representation").rev();
682 pub static ref ORCHARD_FINAL_ROOT_MAINNET_1687118_BYTES: [u8; 32] =
683 <[u8; 32]>::from_hex("d5226e91ca7f9275d7f62711fa52875cdbae6cfc689815c9872aebfe64b60f34")
684 .expect("final root bytes are in valid hex representation").rev();
685 pub static ref BLOCK_MAINNET_1687121_BYTES: Vec<u8> =
686 <Vec<u8>>::from_hex(include_str!("block-main-1-687-121.txt").trim())
687 .expect("Block bytes are in valid hex representation");
688 pub static ref SAPLING_FINAL_ROOT_MAINNET_1687121_BYTES: [u8; 32] =
689 <[u8; 32]>::from_hex("39e29473df7f0692ab6072d65389f6626611fea9f00aea14c0d80add9e9ef6e5")
690 .expect("final root bytes are in valid hex representation").rev();
691 pub static ref ORCHARD_FINAL_ROOT_MAINNET_1687121_BYTES: [u8; 32] =
692 <[u8; 32]>::from_hex("09b17d8907236adea12b83ed69054f4996686d7c4ca76db25c4c48b90e272b0f")
693 .expect("final root bytes are in valid hex representation").rev();
694
695 pub static ref SAPLING_TREESTATE_MAINNET_419201_STRING: String =
697 String::from(include_str!("sapling-treestate-main-0-419-201.txt"));
698
699 pub static ref BLOCK_TESTNET_GENESIS_BYTES: Vec<u8> =
706 <Vec<u8>>::from_hex(include_str!("block-test-0-000-000.txt").trim())
707 .expect("Block bytes are in valid hex representation");
708 pub static ref BLOCK_TESTNET_1_BYTES: Vec<u8> =
709 <Vec<u8>>::from_hex(include_str!("block-test-0-000-001.txt").trim())
710 .expect("Block bytes are in valid hex representation");
711 pub static ref BLOCK_TESTNET_2_BYTES: Vec<u8> =
712 <Vec<u8>>::from_hex(include_str!("block-test-0-000-002.txt").trim())
713 .expect("Block bytes are in valid hex representation");
714 pub static ref BLOCK_TESTNET_3_BYTES: Vec<u8> =
715 <Vec<u8>>::from_hex(include_str!("block-test-0-000-003.txt").trim())
716 .expect("Block bytes are in valid hex representation");
717 pub static ref BLOCK_TESTNET_4_BYTES: Vec<u8> =
718 <Vec<u8>>::from_hex(include_str!("block-test-0-000-004.txt").trim())
719 .expect("Block bytes are in valid hex representation");
720 pub static ref BLOCK_TESTNET_5_BYTES: Vec<u8> =
721 <Vec<u8>>::from_hex(include_str!("block-test-0-000-005.txt").trim())
722 .expect("Block bytes are in valid hex representation");
723 pub static ref BLOCK_TESTNET_6_BYTES: Vec<u8> =
724 <Vec<u8>>::from_hex(include_str!("block-test-0-000-006.txt").trim())
725 .expect("Block bytes are in valid hex representation");
726 pub static ref BLOCK_TESTNET_7_BYTES: Vec<u8> =
727 <Vec<u8>>::from_hex(include_str!("block-test-0-000-007.txt").trim())
728 .expect("Block bytes are in valid hex representation");
729 pub static ref BLOCK_TESTNET_8_BYTES: Vec<u8> =
730 <Vec<u8>>::from_hex(include_str!("block-test-0-000-008.txt").trim())
731 .expect("Block bytes are in valid hex representation");
732 pub static ref BLOCK_TESTNET_9_BYTES: Vec<u8> =
733 <Vec<u8>>::from_hex(include_str!("block-test-0-000-009.txt").trim())
734 .expect("Block bytes are in valid hex representation");
735 pub static ref BLOCK_TESTNET_10_BYTES: Vec<u8> =
737 <Vec<u8>>::from_hex(include_str!("block-test-0-000-010.txt").trim())
738 .expect("Block bytes are in valid hex representation");
739 pub static ref BLOCK_TESTNET_2259_BYTES: Vec<u8> =
741 <Vec<u8>>::from_hex(include_str!("block-test-0-002-259.txt").trim())
742 .expect("Block bytes are in valid hex representation");
743 pub static ref BLOCK_TESTNET_141042_BYTES: Vec<u8> = include_bytes!("block-test-0-141-042.bin").to_vec();
755
756 pub static ref SPROUT_FINAL_ROOT_TESTNET_0_BYTES: [u8; 32] =
765 <[u8; 32]>::from_hex("59d2cde5e65c1414c32ba54f0fe4bdb3d67618125286e6a191317917c812c6d7")
766 .expect("final root bytes are in valid hex representation").rev();
767 pub static ref SPROUT_FINAL_ROOT_TESTNET_2259_BYTES: [u8; 32] =
769 <[u8; 32]>::from_hex("2985231c8b3fb5624299fd7289c33667b0270a3fcde420c9047a6bad41f07733")
770 .expect("final root bytes are in valid hex representation").rev();
771
772 pub static ref BLOCK_TESTNET_207499_BYTES: Vec<u8> =
777 <Vec<u8>>::from_hex(include_str!("block-test-0-207-499.txt").trim())
778 .expect("Block bytes are in valid hex representation");
779 pub static ref BLOCK_TESTNET_207500_BYTES: Vec<u8> =
780 <Vec<u8>>::from_hex(include_str!("block-test-0-207-500.txt").trim())
781 .expect("Block bytes are in valid hex representation");
782 pub static ref BLOCK_TESTNET_207501_BYTES: Vec<u8> =
783 <Vec<u8>>::from_hex(include_str!("block-test-0-207-501.txt").trim())
784 .expect("Block bytes are in valid hex representation");
785
786 pub static ref BLOCK_TESTNET_279999_BYTES: Vec<u8> =
800 <Vec<u8>>::from_hex(include_str!("block-test-0-279-999.txt").trim())
801 .expect("Block bytes are in valid hex representation");
802 pub static ref BLOCK_TESTNET_280000_BYTES: Vec<u8> =
803 <Vec<u8>>::from_hex(include_str!("block-test-0-280-000.txt").trim())
804 .expect("Block bytes are in valid hex representation");
805 pub static ref BLOCK_TESTNET_280001_BYTES: Vec<u8> =
806 <Vec<u8>>::from_hex(include_str!("block-test-0-280-001.txt").trim())
807 .expect("Block bytes are in valid hex representation");
808 pub static ref SAPLING_FINAL_ROOT_TESTNET_280000_BYTES: [u8; 32] =
809 <[u8; 32]>::from_hex("3e49b5f954aa9d3545bc6c37744661eea48d7c34e3000d82b7f0010c30f4c2fb")
810 .expect("final root bytes are in valid hex representation").rev();
811 pub static ref SAPLING_FINAL_ROOT_TESTNET_280001_BYTES: [u8; 32] =
812 <[u8; 32]>::from_hex("3e49b5f954aa9d3545bc6c37744661eea48d7c34e3000d82b7f0010c30f4c2fb")
813 .expect("final root bytes are in valid hex representation").rev();
814
815 pub static ref BLOCK_TESTNET_299187_BYTES: Vec<u8> =
822 <Vec<u8>>::from_hex(include_str!("block-test-0-299-187.txt").trim())
823 .expect("Block bytes are in valid hex representation");
824 pub static ref BLOCK_TESTNET_299188_BYTES: Vec<u8> =
825 <Vec<u8>>::from_hex(include_str!("block-test-0-299-188.txt").trim())
826 .expect("Block bytes are in valid hex representation");
827 pub static ref BLOCK_TESTNET_299189_BYTES: Vec<u8> =
828 <Vec<u8>>::from_hex(include_str!("block-test-0-299-189.txt").trim())
829 .expect("Block bytes are in valid hex representation");
830 pub static ref BLOCK_TESTNET_299201_BYTES: Vec<u8> =
831 <Vec<u8>>::from_hex(include_str!("block-test-0-299-201.txt").trim())
832 .expect("Block bytes are in valid hex representation");
833 pub static ref BLOCK_TESTNET_299202_BYTES: Vec<u8> =
834 <Vec<u8>>::from_hex(include_str!("block-test-0-299-202.txt").trim())
835 .expect("Block bytes are in valid hex representation");
836 pub static ref SAPLING_FINAL_ROOT_TESTNET_299187_BYTES: [u8; 32] =
837 <[u8; 32]>::from_hex("6815df99f9f7ec9486a0b3a4e992ff9348dba7101c2ac91be41ceab392aa5521")
838 .expect("final root bytes are in valid hex representation").rev();
839 pub static ref SAPLING_FINAL_ROOT_TESTNET_299188_BYTES: [u8; 32] =
840 <[u8; 32]>::from_hex("6815df99f9f7ec9486a0b3a4e992ff9348dba7101c2ac91be41ceab392aa5521")
841 .expect("final root bytes are in valid hex representation").rev();
842 pub static ref SAPLING_FINAL_ROOT_TESTNET_299189_BYTES: [u8; 32] =
843 <[u8; 32]>::from_hex("6815df99f9f7ec9486a0b3a4e992ff9348dba7101c2ac91be41ceab392aa5521")
844 .expect("final root bytes are in valid hex representation").rev();
845 pub static ref SAPLING_FINAL_ROOT_TESTNET_299201_BYTES: [u8; 32] =
846 <[u8; 32]>::from_hex("6815df99f9f7ec9486a0b3a4e992ff9348dba7101c2ac91be41ceab392aa5521")
847 .expect("final root bytes are in valid hex representation").rev();
848 pub static ref SAPLING_FINAL_ROOT_TESTNET_299202_BYTES: [u8; 32] =
849 <[u8; 32]>::from_hex("6815df99f9f7ec9486a0b3a4e992ff9348dba7101c2ac91be41ceab392aa5521")
850 .expect("final root bytes are in valid hex representation").rev();
851
852 pub static ref BLOCK_TESTNET_583999_BYTES: Vec<u8> =
859 <Vec<u8>>::from_hex(include_str!("block-test-0-583-999.txt").trim())
860 .expect("Block bytes are in valid hex representation");
861 pub static ref BLOCK_TESTNET_584000_BYTES: Vec<u8> =
863 <Vec<u8>>::from_hex(include_str!("block-test-0-584-000.txt").trim())
864 .expect("Block bytes are in valid hex representation");
865 pub static ref BLOCK_TESTNET_584001_BYTES: Vec<u8> =
866 <Vec<u8>>::from_hex(include_str!("block-test-0-584-001.txt").trim())
867 .expect("Block bytes are in valid hex representation");
868 pub static ref SAPLING_FINAL_ROOT_TESTNET_583999_BYTES: [u8; 32] =
869 <[u8; 32]>::from_hex("13746c0c426cdddd05f85d86231f8bc647f5b024277c606c309ef707d85fd652")
870 .expect("final root bytes are in valid hex representation").rev();
871 pub static ref SAPLING_FINAL_ROOT_TESTNET_584000_BYTES: [u8; 32] =
872 <[u8; 32]>::from_hex("13746c0c426cdddd05f85d86231f8bc647f5b024277c606c309ef707d85fd652")
873 .expect("final root bytes are in valid hex representation").rev();
874 pub static ref SAPLING_FINAL_ROOT_TESTNET_584001_BYTES: [u8; 32] =
875 <[u8; 32]>::from_hex("13746c0c426cdddd05f85d86231f8bc647f5b024277c606c309ef707d85fd652")
876 .expect("final root bytes are in valid hex representation").rev();
877
878 pub static ref BLOCK_TESTNET_903799_BYTES: Vec<u8> =
883 <Vec<u8>>::from_hex(include_str!("block-test-0-903-799.txt").trim())
884 .expect("Block bytes are in valid hex representation");
885 pub static ref BLOCK_TESTNET_903800_BYTES: Vec<u8> =
886 <Vec<u8>>::from_hex(include_str!("block-test-0-903-800.txt").trim())
887 .expect("Block bytes are in valid hex representation");
888 pub static ref BLOCK_TESTNET_903801_BYTES: Vec<u8> =
889 <Vec<u8>>::from_hex(include_str!("block-test-0-903-801.txt").trim())
890 .expect("Block bytes are in valid hex representation");
891 pub static ref SAPLING_FINAL_ROOT_TESTNET_903799_BYTES: [u8; 32] =
892 <[u8; 32]>::from_hex("626444395cd5963d3dba2652ee5bd73ef57555cca4d9f0d52e887a3bf44488e2")
893 .expect("final root bytes are in valid hex representation").rev();
894 pub static ref SAPLING_FINAL_ROOT_TESTNET_903800_BYTES: [u8; 32] =
895 <[u8; 32]>::from_hex("626444395cd5963d3dba2652ee5bd73ef57555cca4d9f0d52e887a3bf44488e2")
896 .expect("final root bytes are in valid hex representation").rev();
897 pub static ref SAPLING_FINAL_ROOT_TESTNET_903801_BYTES: [u8; 32] =
898 <[u8; 32]>::from_hex("626444395cd5963d3dba2652ee5bd73ef57555cca4d9f0d52e887a3bf44488e2")
899 .expect("final root bytes are in valid hex representation").rev();
900
901 pub static ref BLOCK_TESTNET_914678_BYTES: Vec<u8> =
907 <Vec<u8>>::from_hex(include_str!("block-test-0-914-678.txt").trim())
908 .expect("Block bytes are in valid hex representation");
909 pub static ref BLOCK_TESTNET_925483_BYTES: Vec<u8> =
911 <Vec<u8>>::from_hex(include_str!("block-test-0-925-483.txt").trim())
912 .expect("Block bytes are in valid hex representation");
913 pub static ref SAPLING_FINAL_ROOT_TESTNET_914678_BYTES: [u8; 32] =
914 <[u8; 32]>::from_hex("0ba286a3fb00d8a63b6ea52064bcc58ffb859aaa881745157d9a67d20afd7a8d")
915 .expect("final root bytes are in valid hex representation").rev();
916 pub static ref SAPLING_FINAL_ROOT_TESTNET_925483_BYTES: [u8; 32] =
917 <[u8; 32]>::from_hex("271370ff86c2a9cc452334098d3337cddffc478e66a356dc0c00aebb58a4b6ac")
918 .expect("final root bytes are in valid hex representation").rev();
919
920 pub static ref BLOCK_TESTNET_1028499_BYTES: Vec<u8> =
925 <Vec<u8>>::from_hex(include_str!("block-test-1-028-499.txt").trim())
926 .expect("Block bytes are in valid hex representation");
927 pub static ref BLOCK_TESTNET_1028500_BYTES: Vec<u8> =
928 <Vec<u8>>::from_hex(include_str!("block-test-1-028-500.txt").trim())
929 .expect("Block bytes are in valid hex representation");
930 pub static ref BLOCK_TESTNET_1028501_BYTES: Vec<u8> =
931 <Vec<u8>>::from_hex(include_str!("block-test-1-028-501.txt").trim())
932 .expect("Block bytes are in valid hex representation");
933 pub static ref SAPLING_FINAL_ROOT_TESTNET_1028499_BYTES: [u8; 32] =
934 <[u8; 32]>::from_hex("580adc0253cd0545250039267b7b49445ca0550df735920b7466bba1a64f7cf7")
935 .expect("final root bytes are in valid hex representation").rev();
936 pub static ref SAPLING_FINAL_ROOT_TESTNET_1028500_BYTES: [u8; 32] =
937 <[u8; 32]>::from_hex("580adc0253cd0545250039267b7b49445ca0550df735920b7466bba1a64f7cf7")
938 .expect("final root bytes are in valid hex representation").rev();
939 pub static ref SAPLING_FINAL_ROOT_TESTNET_1028501_BYTES: [u8; 32] =
940 <[u8; 32]>::from_hex("580adc0253cd0545250039267b7b49445ca0550df735920b7466bba1a64f7cf7")
941 .expect("final root bytes are in valid hex representation").rev();
942
943 pub static ref BLOCK_TESTNET_1095000_BYTES: Vec<u8> =
948 <Vec<u8>>::from_hex(include_str!("block-test-1-095-000.txt").trim())
949 .expect("Block bytes are in valid hex representation");
950 pub static ref SAPLING_FINAL_ROOT_TESTNET_1095000_BYTES: [u8; 32] =
951 <[u8; 32]>::from_hex("1781d73666ceb7675323130defd5fae426f1ee7d5fbb83adc9393aa8ff7e8a8d")
952 .expect("final root bytes are in valid hex representation").rev();
953
954 pub static ref BLOCK_TESTNET_1101629_BYTES: Vec<u8> =
959 <Vec<u8>>::from_hex(include_str!("block-test-1-101-629.txt").trim())
960 .expect("Block bytes are in valid hex representation");
961 pub static ref SAPLING_FINAL_ROOT_TESTNET_1101629_BYTES: [u8; 32] =
962 <[u8; 32]>::from_hex("14c7c827cd05c73c052c2a9faa6d7fc7b45ec2e386d8894eb65c420175c43745")
963 .expect("final root bytes are in valid hex representation").rev();
964
965 pub static ref BLOCK_TESTNET_1115999_BYTES: Vec<u8> =
972 <Vec<u8>>::from_hex(include_str!("block-test-1-115-999.txt").trim())
973 .expect("Block bytes are in valid hex representation");
974 pub static ref BLOCK_TESTNET_1116000_BYTES: Vec<u8> =
975 <Vec<u8>>::from_hex(include_str!("block-test-1-116-000.txt").trim())
976 .expect("Block bytes are in valid hex representation");
977 pub static ref BLOCK_TESTNET_1116001_BYTES: Vec<u8> =
978 <Vec<u8>>::from_hex(include_str!("block-test-1-116-001.txt").trim())
979 .expect("Block bytes are in valid hex representation");
980 pub static ref SAPLING_FINAL_ROOT_TESTNET_1115999_BYTES: [u8; 32] =
981 <[u8; 32]>::from_hex("14b41a6dd7cd3c113d98f72543c4f57ff4e444bd5995366e0da420169c861f37")
982 .expect("final root bytes are in valid hex representation").rev();
983 pub static ref SAPLING_FINAL_ROOT_TESTNET_1116000_BYTES: [u8; 32] =
984 <[u8; 32]>::from_hex("14b41a6dd7cd3c113d98f72543c4f57ff4e444bd5995366e0da420169c861f37")
985 .expect("final root bytes are in valid hex representation").rev();
986 pub static ref SAPLING_FINAL_ROOT_TESTNET_1116001_BYTES: [u8; 32] =
987 <[u8; 32]>::from_hex("14b41a6dd7cd3c113d98f72543c4f57ff4e444bd5995366e0da420169c861f37")
988 .expect("final root bytes are in valid hex representation").rev();
989
990 pub static ref BLOCK_TESTNET_1326100_BYTES: Vec<u8> =
995 <Vec<u8>>::from_hex(include_str!("block-test-1-326-100.txt").trim())
996 .expect("Block bytes are in valid hex representation");
997 pub static ref SAPLING_FINAL_ROOT_TESTNET_1326100_BYTES: [u8; 32] =
998 <[u8; 32]>::from_hex("2b30b19f4254709fe365bd0b381b2e3d9d0c933eb4dba4dd1d07f0f6e196a183")
999 .expect("final root bytes are in valid hex representation").rev();
1000
1001 pub static ref BLOCK_TESTNET_1842421_BYTES: Vec<u8> =
1003 <Vec<u8>>::from_hex(include_str!("block-test-1-842-421.txt").trim())
1004 .expect("Block bytes are in valid hex representation");
1005 pub static ref SAPLING_FINAL_ROOT_TESTNET_1842421_BYTES: [u8; 32] =
1006 <[u8; 32]>::from_hex("5cad695f17ae06cc165e01938fe95cac3ea0fbd236dc9c806f3411e0929309a6")
1007 .expect("final root bytes are in valid hex representation").rev();
1008 pub static ref ORCHARD_FINAL_ROOT_TESTNET_1842421_BYTES: [u8; 32] =
1009 <[u8; 32]>::from_hex("28dfaa94b74670863beb1088ee3d97b38960c6c297c9dcf3d57d5a9259616523")
1010 .expect("final root bytes are in valid hex representation").rev();
1011 pub static ref BLOCK_TESTNET_1842432_BYTES: Vec<u8> =
1012 <Vec<u8>>::from_hex(include_str!("block-test-1-842-432.txt").trim())
1013 .expect("Block bytes are in valid hex representation");
1014 pub static ref SAPLING_FINAL_ROOT_TESTNET_1842432_BYTES: [u8; 32] =
1015 <[u8; 32]>::from_hex("68626c76ad774e3982450c20900415fd85b33d820627565d588c0c22437d8c62")
1016 .expect("final root bytes are in valid hex representation").rev();
1017 pub static ref ORCHARD_FINAL_ROOT_TESTNET_1842432_BYTES: [u8; 32] =
1018 <[u8; 32]>::from_hex("28dfaa94b74670863beb1088ee3d97b38960c6c297c9dcf3d57d5a9259616523")
1019 .expect("final root bytes are in valid hex representation").rev();
1020 pub static ref BLOCK_TESTNET_1842462_BYTES: Vec<u8> =
1021 <Vec<u8>>::from_hex(include_str!("block-test-1-842-462.txt").trim())
1022 .expect("Block bytes are in valid hex representation");
1023 pub static ref SAPLING_FINAL_ROOT_TESTNET_1842462_BYTES: [u8; 32] =
1024 <[u8; 32]>::from_hex("4c06beb18bb0cb22879f04c2c80aa33450d8e02ddd3d2cbc441f40f8cd8ea0a8")
1025 .expect("final root bytes are in valid hex representation").rev();
1026 pub static ref ORCHARD_FINAL_ROOT_TESTNET_1842462_BYTES: [u8; 32] =
1027 <[u8; 32]>::from_hex("7750114ca6b95e44197e30ec98cadfb0dec1f1fb1a416eb4ef87f1dffb0f5937")
1028 .expect("final root bytes are in valid hex representation").rev();
1029 pub static ref BLOCK_TESTNET_1842467_BYTES: Vec<u8> =
1030 <Vec<u8>>::from_hex(include_str!("block-test-1-842-467.txt").trim())
1031 .expect("Block bytes are in valid hex representation");
1032 pub static ref SAPLING_FINAL_ROOT_TESTNET_1842467_BYTES: [u8; 32] =
1033 <[u8; 32]>::from_hex("13a33099eb9b8dafc031271938f35b627eb0811f124847abbfb43b587c6e11ae")
1034 .expect("final root bytes are in valid hex representation").rev();
1035 pub static ref ORCHARD_FINAL_ROOT_TESTNET_1842467_BYTES: [u8; 32] =
1036 <[u8; 32]>::from_hex("580aceb586f30a5801a23414464aa8482add97b6d55c06483b4ffb725e0e793b")
1037 .expect("final root bytes are in valid hex representation").rev();
1038 pub static ref BLOCK_TESTNET_1842468_BYTES: Vec<u8> =
1039 <Vec<u8>>::from_hex(include_str!("block-test-1-842-468.txt").trim())
1040 .expect("Block bytes are in valid hex representation");
1041 pub static ref SAPLING_FINAL_ROOT_TESTNET_1842468_BYTES: [u8; 32] =
1042 <[u8; 32]>::from_hex("555af4b0b2fa18162d6280c942fae6cdc846b9c4a3126df682821db250dc2bb3")
1043 .expect("final root bytes are in valid hex representation").rev();
1044 pub static ref ORCHARD_FINAL_ROOT_TESTNET_1842468_BYTES: [u8; 32] =
1045 <[u8; 32]>::from_hex("66c47f2160474363948150cbb5d53f3c17efa7456bd843dd9b851ddbcb6fb002")
1046 .expect("final root bytes are in valid hex representation").rev();
1047}
1048
1049#[cfg(test)]
1050mod test {
1051 use super::*;
1052
1053 use std::collections::HashSet;
1054
1055 use crate::init;
1056
1057 #[test]
1058 fn block_test_vectors_unique() {
1059 let _init_guard = init();
1060
1061 let block_count = BLOCKS.len();
1062 let block_set: HashSet<_> = BLOCKS.iter().collect();
1063
1064 assert_eq!(
1066 block_count,
1067 block_set.len(),
1068 "block test vectors must be unique"
1069 );
1070
1071 }
1073
1074 #[test]
1078 fn block_test_vectors_count() {
1079 let _init_guard = init();
1080
1081 assert!(
1082 MAINNET_BLOCKS.len() > 30,
1083 "there should be a reasonable number of mainnet block test vectors"
1084 );
1085
1086 assert!(
1087 TESTNET_BLOCKS.len() > 30,
1088 "there should be a reasonable number of testnet block test vectors"
1089 );
1090
1091 assert!(
1092 MAINNET_FINAL_SAPLING_ROOTS.len() > 10,
1093 "there should be a reasonable number of mainnet final sapling root test vectors"
1094 );
1095
1096 assert!(
1097 TESTNET_FINAL_SAPLING_ROOTS.len() > 10,
1098 "there should be a reasonable number of testnet final sapling root test vectors"
1099 );
1100 }
1101}