Skip to content

Instantly share code, notes, and snippets.

@ccdle12
Created September 7, 2022 15:38
Show Gist options
  • Save ccdle12/fb745ecd3c26e02fa82aab1dd812187b to your computer and use it in GitHub Desktop.
Save ccdle12/fb745ecd3c26e02fa82aab1dd812187b to your computer and use it in GitHub Desktop.
sv2-new-template-bug
uint8_t expected[]{
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // template id
0x00, // future template
0x00, 0x00, 0x00, 0x30, // version
0x02, 0x00, 0x00, 0x00, // coinbase tx version
0x05, 0x04, // coinbase_prefix len // TODO: Check with the Rust Stratum impl for a off-by-one bug
0x03, 0x01, 0x21, 0x00, // coinbase_prefix
0xff, 0xff, 0xff, 0xff, // coinbase_tx_input_sequence
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // coinbase_tx_value remaining
0x00, 0x00, 0x00, 0x00, // cointbase_tx_outputs count
0x00, 0x00, // coinbase_tx_ouputs
0x00, 0x00, 0x00, 0x00, // coinbase_tx_locktime
0x01, 0x01, // merkle_path length // TODO: Check with the Rust Stratum impl for a off-by-one bug
0x1a, 0x62, 0x40, 0x82, 0x3d, 0xe4, 0xc8, 0xd6, 0xaa, 0xf8, 0x26, 0x85, // merkle path
0x1b, 0xdf, 0x2b, 0x0e, 0x8d, 0x5a, 0xcf, 0x7c, 0x31, 0xe8, 0x57, 0x8c,
0xff, 0x4c, 0x39, 0x4b, 0x5a, 0x32, 0xbd, 0x4e,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment