coinbaseaux flags is empty and coinbasetx is missing #12335

issue nQuantPlatforms opened this issue on February 2, 2018
  1. nQuantPlatforms commented at 5:34 PM on February 2, 2018: none

    When I request getblocktemplate, coinbaseaux flags is empty. Also coinbasetx is not included which I understand need to be calculated. Where is complete example of how to create that one ? Wiki example just assums conbasetx in included in response which is not. I want to create coinbase with all rewards going to single wallet address.

    {
                "capabilities": ["proposal"],
                "version": 536870912,
                "rules": ["csv",
                "segwit"],
                "vbavailable": {
    
                },
                "vbrequired": 0,
                "previousblockhash": "00000000000000000011f84134ea90036cf16260ef1e2532af2ad4c4128833fa",
                "transactions": [],
                "coinbaseaux": {
                    "flags": ""
                },
                "coinbasevalue": 1390108740,
                "longpollid": "00000000000000000011f84134ea90036cf16260ef1e2532af2ad4c4128833fa6254",
                "target": "0000000000000000006c21460000000000000000000000000000000000000000",
                "mintime": 1517434058,
                "mutable": ["time",
                "transactions",
                "prevblock"],
                "noncerange": "00000000ffffffff",
                "sigoplimit": 80000,
                "sizelimit": 4000000,
                "weightlimit": 4000000,
                "curtime": 1517440540,
                "bits": "176c2146",
                "height": 507012,
                "default_witness_commitment": "6a24aa21a9ed63d9ce8e02cbe0c044825f7448ebd2819c3af1390057183bee668219e159be2a"
        }
    
  2. fanquake added the label RPC/REST/ZMQ on Feb 2, 2018
  3. gmaxwell commented at 8:51 AM on February 4, 2018: contributor
  4. MarcoFalke commented at 1:23 AM on April 26, 2020: member

    Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?

  5. MarcoFalke closed this on Apr 26, 2020

  6. fcojperez commented at 11:35 AM on March 3, 2021: none

    Hi,

    I have installed Bitcoin Core version v0.21.0 and it is still an issue. You can reproduce just executing bitcoin-cli getblocktemplate '{"rules": ["segwit"]}'

  7. luke-jr commented at 10:22 PM on March 3, 2021: member

    @fcojperez coinbaseaux/coinbasetx are not required at all; see BIPs 22 & 23 for the spec and libblkmaker for an example client.

  8. fcojperez commented at 11:24 AM on March 4, 2021: none

    Hi @luke-jr

    Thanks for the feedback, your comment helped to understand a possible bug in code that is consuming getblocktemplate JSON

    Cheers P

  9. ghost commented at 10:55 PM on January 10, 2022: none

    @luke-jr The RPC documentation says the coinbase transaction scriptSig should contain the coinbaseaux values.

    If getblocktemplate returned a value for coinbaseaux, would it be required? If not, why is coinbaseaux included in the response?

    The issue is still happening with the latest version, but the value is now an empty object.

    "coinbaseaux": { }

    Here's a video of the Bitcoin CLI response.

    https://www.tiktok.com/@ghostcompute/video/7051706476691442990?sender_device=mobile&sender_web_id=7042509351429473798&is_from_webapp=v1&is_copy_url=0

  10. luke-jr commented at 11:18 PM on January 10, 2022: member

    If getblocktemplate returned a value for coinbaseaux, would it be required?

    It is undefined what behaviour to expect if coinbaseaux is ignored, but the spec says any values provided SHOULD be included in the scriptSig.

    The issue is still happening with the latest version, but the value is now an empty object.

    It's supposed to be empty (in recent versions).

  11. ghost commented at 11:22 PM on January 10, 2022: none

    Is there recent documentation for creating coinbase transactions in recent versions, or should I just read the source code?

  12. luke-jr commented at 11:43 PM on January 10, 2022: member

    BIPs 22, 23, and the amendment for versionbits should be everything IIRC

    Nothing has changed in regard to coinbaseaux though

  13. ghost commented at 12:52 AM on January 11, 2022: none

    Ok I'll circle back to this if there's an invalid coinbase error during block submission.

  14. MarcoFalke commented at 8:35 AM on January 11, 2022: member

    I am going to lock the conversation on this issue from 2018 (4 years ago). Please open a new thread for any new issues.

  15. MarcoFalke locked this on Jan 11, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me