1

Below is a blocktemplate_blob obtained from calling the getblocktemplate RPC, with reserve size 17.

0606e0d8bad7053a15e11686fefb667985fec2a2c89567e2c9dae9e862c76628a174eb3a00662c000000000282d55f01ffc6d45f01e8e4d19ec2870102e8f49622fd8bfd3b0bd8b20ab9f7fc8e33c7f327b0a6a6bda95096d4ab2150813401dd34b8939c64a4237cbd8ea2fad8bf87a5febbd144655e9e697fdd187a2be949021100000000000000000000000000000000000000

I'm trying to figure out how coinbase transactions are serialized. Based on CNS003 and CNS004, after stripping the block header, transaction version (0x02), unlock time (0x82d55f), num inputs (0x01), transaction type (0xff), block height (0xc6d45f), num outputs (0x01), reward (0xe8e4d19ec28701), and output type (0x02), we are left with

e8f49622fd8bfd3b0bd8b20ab9f7fc8e33c7f327b0a6a6bda95096d4ab2150813401dd34b8939c64a4237cbd8ea2fad8bf87a5febbd144655e9e697fdd187a2be949021100000000000000000000000000000000000000

which I believe consists of the output public key, extra size, and the extra. Removing the extra size and extra leaves us with

e8f49622fd8bfd3b0bd8b20ab9f7fc8e33c7f327b0a6a6bda95096d4ab2150813401dd34b8939c64a4237cbd8ea2fad8bf87a5febbd144655e9e697fdd187a2be94902

How is this coinbase transaction key generated?

nnsun
  • 43
  • 5

1 Answers1

1

Why would you remove extra ? It's in there. See cn_deserialize.cpp, to which you can give the hex dump of that tx:

cn_deserialize --input aaaaaaaaaaaaaaaaaaaa

This will show you the tx key.

user36303
  • 34,928
  • 2
  • 58
  • 123