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!



 "error": null,
 "result": {
   "coinbasetxn": {
     "data": "0100000001000000000000000000000000000000000000000000000000000000
   "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


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 you have read our privacy policy.

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