1

After reading through most of the protocol, and trying to piece everything together, I'm still at a loss as to how some things work. For example, the difference between coinbaseaux.flags and coinbasetxn.data.

With coinbasetxn.data it makes sense, because it's already built, and we can use that data to modify the coinbase data if needed and then add to transactions for merkle root. The coinbaseaux.flags data on the other hand doesn't make much sense to me. I couldn't find any mention of the flags option.

Below are 2 transactions - one using coinbaseaux and the other coinbasetxn. If anyone could explain how coinbaseaux can be used to build the coinbase transaction, or if it's for something else, that'd be greatly appreciated!

{
    "result":{
        "version":2,
        "previousblockhash":"00000000000000075f2f454573766ffae69fe41d6c7ccfcabbf8588fcd80ed52",
        "transactions":[
                  {     
                        "data":"0100000001cba672d0bfdbcc441d171ef0723a191bf050932c6f8adc8a05b0cac2d1eb022f010000006c493046022100a23472410d8fd7eabf5c739bdbee5b6151ff31e10d5cb2b52abeebd5e9c06977022100c2cdde5c632eaaa1029dff2640158aaf9aab73fa021ed4a48b52b33ba416351801210212ee0e9c79a72d88db7af3fed18ae2b7ca48eaed995d9293ae0f94967a70cdf6ffffffff02905f0100000000001976a91482db4e03886ee1225fefaac3ee4f6738eb50df9188ac00f8a093000000001976a914c94f5142dd7e35f5645735788d0fe1343baf146288ac00000000",
                        "hash":"7c90a5087ac4d5b9361d47655812c89b4ad0dee6ecd5e08814d00ce7385aa317",
                        "depends":[],
                        "fee":10000,
                        "sigops":2
                  },
                  ...
            ],
        "coinbaseaux":{
            "flags":"062f503253482f"
        },
        "coinbasevalue":2501100000,
        "target":"0000000000000026222200000000000000000000000000000000000000000000",
        "mintime":1379549850,
        "mutable":[
            "time",
            "transactions",
            "prevblock"
        ],
        "noncerange":"00000000ffffffff",
        "sigoplimit":20000,
        "sizelimit":1000000,
        "curtime":1379553872,
        "bits":"19262222",
        "height":258736
    },
    "error":null,
    "id":"curltest"
}

VS.

{
 "error": null,
 "result": {
   "coinbasetxn": {
     "data": "0100000001000000000000000000000000000000000000000000000000000000
0000000000ffffffff1302955d0f00456c6967697573005047dc66085fffffffff02fff1052a01
0000001976a9144ebeb1cd26d6227635828d60d3e0ed7d0da248fb88ac01000000000000001976
a9147c866aee1fa2f3b3d5effad576df3dbf1f07475588ac00000000"
   },
   "previousblockhash": "000000004d424dec1c660a68456b8271d09628a80cc62583e5904f5894a2483c",
   "transactions": [],
   "expires": 120,
   "target": "00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
   "longpollid": "some gibberish",
   "height": 23957,
   "version": 2,
   "curtime": 1346886758,
   "mutable": ["coinbase/append"],
   "bits": "ffff001d"
 },
 "id": 0
}

1 Answer 1

1

When the mutation "coinbase" (see BIP 23) is present, the key "coinbaseaux" sets rules for what MUST be in a coinbase if/when one is built/modified.

The key "coinbasetxn" is optional, and if omitted the mutation "coinbase" is assumed and the implication is that "coinbaseaux" MAY define requirements for building the coinbase.

The key "coinbaseaux" is also optional, however its omission has no implications according to BIP 23.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.