Skip to content

Instantly share code, notes, and snippets.

@ignopeverell
Created December 20, 2018 20:09
Show Gist options
  • Save ignopeverell/b679198585e9b580e0418378ef5ac618 to your computer and use it in GitHub Desktop.
Save ignopeverell/b679198585e9b580e0418378ef5ac618 to your computer and use it in GitHub Desktop.
Test floonet genesis
Test for floonet
Final genesis cyclehash: 70ef9ebb070869fb11f9e77ce39fb46100512dc3169cade860b26b9df898750d
Final genesis full hash: bb935502d3c83eb5e99a2a0919008674653a5a6dbe23245a5e47cc0c730a8c54
diff:
diff --git a/core/src/genesis.rs b/core/src/genesis.rs
index 6eba2cd..2f0ee47 100644
--- a/core/src/genesis.rs
+++ b/core/src/genesis.rs
@@ -51,20 +51,20 @@ pub fn genesis_dev() -> core::Block {
pub fn genesis_floo() -> core::Block {
let gen = core::Block::with_header(core::BlockHeader {
height: 0,
- timestamp: Utc.ymd(2018, 12, 20).and_hms(20, 0, 0), // REPLACE
- prev_root: Hash::default(), // REPLACE
- output_root: Hash::default(), // REPLACE
- range_proof_root: Hash::default(), // REPLACE
- kernel_root: Hash::default(), // REPLACE
- total_kernel_offset: BlindingFactor::zero(), // REPLACE
+timestamp: Utc.ymd(2018, 12, 20).and_hms(20, 35, 7),
+prev_root: Hash::from_hex("84cdb1a6fd933b5a4a5f16c3e12a81f156689c48c93a9c8b5c08533474eb5133").unwrap(),
+output_root: Hash::from_hex("47d2570266451203c62cd003c706e3ec37e9cb4292316744abfa68a1b133bc1c").unwrap(),
+range_proof_root: Hash::from_hex("53ea93e80fe37e9a0cbb9c1a1ddf467213922481a4435921aacf55ffb3f388fc").unwrap(),
+kernel_root: Hash::from_hex("fb75810f9fbc532d0dec48b7459c45d21c4aa7b188d6afa6d3501f34f9dc1487").unwrap(),
+total_kernel_offset: BlindingFactor::from_hex("0000000000000000000000000000000000000000000000000000000000000000").unwrap(),
output_mmr_size: 1,
kernel_mmr_size: 1,
pow: ProofOfWork {
total_difficulty: Difficulty::from_num(10_u64.pow(6)),
secondary_scaling: 1856,
- nonce: 1, // REPLACE
+nonce: 13,
proof: Proof {
- nonces: vec![0; 42], // REPLACE
+nonces: vec![11696932, 29082694, 38732620, 48513072, 70001268, 75212771, 91892612, 96508276, 103554475, 111132659, 116114068, 124783239, 126661438, 143657307, 152738325, 159909808, 167386346, 180894182, 2311942
71, 231366096, 235508320, 252925758, 257273832, 258074055, 273420519, 275103521, 293787872, 314900577, 321468954, 342625054, 373019527, 411886452, 417131172, 430084288, 437633638, 445452782, 456579649, 471485098
, 489719536, 513227299, 521406917, 534941657],
edge_bits: 29,
},
},
@@ -74,15 +74,15 @@ pub fn genesis_floo() -> core::Block {
features: core::KernelFeatures::COINBASE,
fee: 0,
lock_height: 0,
- excess: Commitment::from_vec(vec![]), // REPLACE
- excess_sig: Signature::from_raw_data(&[0; 64]).unwrap(), //REPLACE
+excess: Commitment::from_vec(util::from_hex("0817a9e97a070ba5f9fa185c093b4b13b262ed4b4712b6f7c92881b27168f9a2cb".to_string()).unwrap()),
+excess_sig: Signature::from_raw_data(&[121, 21, 74, 152, 178, 111, 25, 223, 57, 117, 162, 93, 93, 154, 186, 4, 127, 67, 120, 249, 241, 102, 249, 102, 125, 167, 199, 66, 128, 115, 179, 141, 122, 146, 175, 209, 5
9, 226, 62, 89, 189, 47, 200, 63, 245, 183, 36, 21, 96, 211, 95, 148, 183, 42, 86, 58, 29, 134, 127, 15, 253, 81, 174, 17]).unwrap(),
};
let output = core::Output {
features: core::OutputFeatures::COINBASE,
- commit: Commitment::from_vec(vec![]), // REPLACE
+commit: Commitment::from_vec(util::from_hex("08f5523cbd8b2e1dae3eefdd9dd1069e0c8a7f055a0611da79f42530c5de0d044b".to_string()).unwrap()),
proof: RangeProof {
plen: SINGLE_BULLET_PROOF_SIZE,
- proof: [0; SINGLE_BULLET_PROOF_SIZE], // REPLACE
+proof: [47, 196, 194, 238, 233, 164, 218, 64, 54, 92, 83, 248, 225, 116, 189, 225, 202, 66, 213, 63, 195, 209, 238, 189, 153, 198, 231, 219, 3, 146, 102, 67, 26, 7, 199, 150, 160, 244, 48, 166, 113, 6, 241, 49, 133, 248, 201, 80, 34, 19, 118, 249, 44, 213, 215, 235, 228, 187, 215, 116, 212, 203, 232, 183, 12, 66, 29, 11, 28, 17, 212, 104, 126, 203, 103, 60, 176, 149, 182, 206, 70, 138, 180, 213, 76, 99, 25, 184, 40, 177, 197, 179, 71, 63, 19, 72, 253, 129, 115, 107, 90, 249, 39, 108, 134, 10, 231, 172, 172, 59, 207, 118, 175, 124, 197, 132, 73, 154, 148, 8, 73, 26, 231, 75, 24, 134, 199, 93, 15, 43, 45, 49, 69, 167, 194, 23, 114, 16, 117, 209, 127, 123, 18, 209, 12, 34, 219, 196, 37, 7, 226, 132, 70, 111, 113, 164, 203, 175, 105, 175, 196, 62, 225, 138, 162, 176, 190, 109, 96, 210, 15, 38, 245, 200, 83, 155, 185, 111, 85, 234, 6, 3, 246, 98, 175, 127, 94, 65, 29, 78, 27, 53, 32, 230, 85, 91, 195, 112, 84, 135, 56, 207, 213, 165, 40, 248, 238, 202, 225, 142, 79, 89, 81, 197, 138, 65, 14, 232, 145, 44, 73, 6, 43, 8, 43, 42, 127, 151, 68, 18, 19, 83, 14, 142, 180, 75, 25, 4, 97, 166, 237, 212, 187, 106, 154, 36, 223, 231, 177, 58, 70, 1, 195, 113, 144, 151, 45, 185, 0, 174, 116, 212, 122, 239, 96, 1, 122, 211, 41, 96, 230, 110, 242, 145, 176, 230, 55, 143, 142, 234, 151, 49, 151, 109, 252, 120, 147, 244, 178, 73, 196, 221, 150, 85, 69, 113, 50, 166, 92, 91, 98, 188, 77, 76, 48, 192, 112, 184, 108, 143, 134, 56, 46, 119, 21, 71, 247, 119, 133, 225, 72, 15, 158, 60, 64, 71, 57, 134, 243, 228, 58, 13, 58, 209, 71, 4, 72, 87, 129, 51, 46, 64, 188, 60, 157, 56, 120, 23, 2, 47, 143, 79, 176, 54, 3, 47, 227, 124, 70, 242, 8, 59, 113, 203, 51, 65, 138, 131, 121, 45, 131, 132, 171, 161, 49, 235, 129, 39, 164, 234, 69, 172, 95, 28, 180, 118, 163, 151, 148, 66, 65, 104, 222, 232, 154, 22, 30, 149, 196, 214, 163, 93, 76, 128, 142, 233, 106, 171, 213, 148, 59, 101, 56, 22, 127, 232, 4, 63, 111, 9, 188, 163, 40, 158, 24, 65, 81, 203, 231, 93, 197, 102, 170, 70, 239, 229, 13, 172, 110, 157, 226, 112, 182, 28, 150, 222, 62, 224, 94, 182, 220, 243, 236, 62, 156, 129, 220, 127, 155, 141, 0, 243, 159, 113, 28, 158, 95, 205, 35, 72, 132, 46, 235, 176, 146, 233, 93, 111, 4, 105, 236, 176, 165, 102, 168, 188, 121, 105, 175, 197, 114, 97, 40, 2, 165, 153, 85, 135, 114, 147, 95, 216, 50, 108, 52, 225, 186, 215, 110, 122, 230, 14, 246, 141, 180, 41, 22, 132, 58, 8, 31, 187, 221, 231, 14, 33, 52, 88, 219, 200, 77, 246, 134, 18, 0, 113, 144, 6, 146, 54, 24, 113, 14, 64, 182, 116, 229, 250, 201, 126, 84, 192, 80, 13, 57, 232, 55, 113, 139, 249, 166, 231, 123, 101, 236, 147, 144, 2, 9, 51, 2, 189, 188, 200, 66, 29, 16, 22, 150, 45, 220, 15, 161, 180, 214, 244, 104, 41, 77, 171, 246, 243, 56, 47, 63, 103, 216, 151, 199, 249, 169, 165, 119, 200, 243, 161, 83, 46, 225, 195, 92, 96, 150, 0, 165, 170, 14, 211, 226, 244, 70, 218, 137, 254, 197, 175, 208, 119, 199, 121, 4, 7, 190, 118, 55, 197, 208, 41, 109, 161, 34, 33, 210, 58, 99, 81, 97, 57, 156, 57, 144, 83, 97, 49, 248, 89, 201, 88, 169, 9, 211, 34, 136, 174, 195, 224, 51, 103, 12, 237, 172, 46, 216, 5, 168],
},
};
gen.with_reward(output, kernel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment