rest: add `generated` and `height` to spenttxouts JSON #36251

pull 0xB10C wants to merge 1 commits into bitcoin:master from 0xB10C:2026-09-rest-spenttxouts-new-fields changing 4 files +13 −5
  1. 0xB10C commented at 3:45 PM on September 14, 2026: contributor

    This adds the generated and height fields to the JSON REST endpoint /rest/spenttxouts/BLOCKHASH.json to match the prevout output of the getblock RPC with verbosity 3. The information for these fields is already available, but just was not exposed.

    The binary and hex formats aren't changed (here) to not break backwards compatibility with consumers of these endpoints. See the discussion in #32540 (comment)

  2. DrahtBot added the label RPC/REST/ZMQ on Sep 14, 2026
  3. DrahtBot commented at 3:45 PM on September 14, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36251.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK nervana21, willcl-ark, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. rest: add generated and height to spenttxouts JSON
    This adds the `generated` and `height` fields to the JSON REST
    endpoint `/rest/spenttxouts/BLOCKHASH.json` to match the prevout
    output of the getblock RPC with verbosity 3. The information for
    these fields is already available, but just was not exposed.
    
    The binary and hex formats aren't changed (here) to not break
    backwards compatibility with consumers of these endpoints. See the
    discussion in https://github.com/bitcoin/bitcoin/pull/32540#issuecomment-5665279713
    1566a4767a
  5. 0xB10C force-pushed on Sep 14, 2026
  6. DrahtBot added the label CI failed on Sep 14, 2026
  7. sedited commented at 3:48 PM on September 14, 2026: contributor

    Concept ACK

  8. nervana21 commented at 4:12 PM on September 14, 2026: contributor

    tACK 1566a4767afd3865ee466d1aa2ce8237cb5c27c1

  9. DrahtBot removed the label CI failed on Sep 14, 2026
  10. DrahtBot requested review from sedited on Sep 14, 2026
  11. willcl-ark approved
  12. willcl-ark commented at 10:45 AM on September 15, 2026: member

    ACK 1566a4767afd3865ee466d1aa2ce8237cb5c27c1

    Seems like a useful addition to me.

    I am not that familiar with REST best-practices, but adding a field to a response seems likely to be OK, as client usually read the fields they need and ignore ones they don't know about.

    I suppose a new client requesting from an un-upgraded node might panic if there are expected fields missing, but in that case they should just be using an upgraded node too.

  13. sedited approved
  14. sedited commented at 12:04 PM on September 15, 2026: contributor

    ACK 1566a4767afd3865ee466d1aa2ce8237cb5c27c1

  15. sedited merged this on Sep 15, 2026
  16. sedited closed this on Sep 15, 2026


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-09-21 02:52 UTC

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