rpc: Add window final block height to getchaintxstats #16695

pull leto wants to merge 1 commits into bitcoin:master from leto:getchaintxstats_height changing 3 files +9 −0
  1. leto commented at 3:01 PM on August 23, 2019: contributor

    This patch is motivated by the desire to make the output of getchaintxstats more useful and optimized for applications to consume and render the data.

    Firstly, this data is already available to the RPC, no additional work is done. Currently additional RPC calls will be needed to look up the height of the final block in the window or the block height that began the window.

    By adding the block height of the final block in the window, the JSON is "self-contained" and applications can calculate the exact block height range of the window with no additional RPC requests. For example, a web application which wants to render historical information for getchaintxstats RPC on various window sizes might call the RPC with various window lengths, once per day, and store the JSON results somewhere. Because the final block height of each dataset is included, it's no extra work to determine the exact block window range of each JSON response.

  2. DrahtBot added the label RPC/REST/ZMQ on Aug 23, 2019
  3. DrahtBot added the label Tests on Aug 23, 2019
  4. leto commented at 6:32 PM on August 23, 2019: contributor

    FYI all travis CI tests passed, but one job which uses TSAN timed out with: No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

  5. MarcoFalke renamed this:
    Add window final block height to getchaintxstats
    rpc: Add window final block height to getchaintxstats
    on Aug 23, 2019
  6. MarcoFalke removed the label Tests on Aug 23, 2019
  7. luke-jr commented at 7:58 PM on August 23, 2019: member

    Code review utACK. No opinion on concept.

  8. leto commented at 1:26 PM on August 24, 2019: contributor

    This code does not seem to actually conflict with 16539, that looks like a false positive from the bot

  9. promag commented at 12:46 AM on August 25, 2019: member

    ACK 9a018e7c475cafd9afa5a6352b5004e43bbdc498, could have minor release note though.

  10. leto commented at 1:48 AM on August 25, 2019: contributor

    @promag I added a new temporary release note file as I saw documented in the dev notes, please let me know if I did it correctly. This is the addition which I put in the Updated RPCs section:

    +- The `getchaintxstats` RPC now returns the additional key of
    +  `window_final_block_height`
    
  11. fanquake deleted a comment on Aug 25, 2019
  12. promag commented at 1:55 AM on August 25, 2019: member

    This is enough:

    Updated RPCs
    ------------
    
    - The `getchaintxstats` RPC now returns the additional key of
      `window_final_block_height`.
    

    which will be manually merged in the final release notes.

  13. DrahtBot commented at 2:49 AM on August 25, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  14. fanquake commented at 12:04 PM on August 29, 2019: member

    @leto Could you follow up here with the smaller release notes?

  15. fanquake added the label Waiting for author on Aug 29, 2019
  16. leto commented at 12:52 PM on August 29, 2019: contributor

    @fanquake Sorry, I didn't understand that as a request. I thought I followed the dev notes exactly, and then @promag summarized them above.

    What exactly is being asked?

  17. fanquake commented at 12:58 PM on August 29, 2019: member

    What exactly is being asked? @leto no problem. Basically we'd just like you to modify the release-notes-16695.md file to only include the text which is relevant to this pull request. i.e only this:

    Updated RPCs
    ------------
    
    - The `getchaintxstats` RPC now returns the additional key of
      `window_final_block_height`.
    

    You can checkout the release notes changes in this PR, #16647, as an example of what I mean.

  18. promag commented at 12:59 PM on August 29, 2019: member

    Just have that in the release note file.

  19. leto commented at 1:03 PM on August 29, 2019: contributor

    @promag @fanquake ok, just fixed that with a new commit. I can also squash these 3 commits into 1 if that is preferred

  20. fanquake commented at 1:11 PM on August 29, 2019: member

    just fixed that with a new commit. I can also squash these 3 commits into 1 if that is preferred

    Thanks for the quick follow up. Yes please squash your commits.

  21. Add window final block height to getchaintxstats
    The getchaintxstats RPC now returns the additional key of window_final_block_height
    d48c1e837a
  22. leto commented at 1:27 PM on August 29, 2019: contributor

    @fanquake latest push has everything in a single commit. Hopefully Travis likes it

  23. fanquake removed the label Waiting for author on Aug 29, 2019
  24. promag commented at 1:30 PM on August 29, 2019: member

    ACK d48c1e837ae1bd08e0f18ad1b57ff72675c3d6ad.

  25. laanwj referenced this in commit d8fc997913 on Aug 29, 2019
  26. laanwj commented at 2:42 PM on August 29, 2019: member

    ACK d48c1e837ae1bd08e0f18ad1b57ff72675c3d6ad

  27. laanwj merged this on Aug 29, 2019
  28. laanwj closed this on Aug 29, 2019

  29. luke-jr referenced this in commit 69fb71cec6 on Sep 3, 2019
  30. deadalnix referenced this in commit 808603ccd7 on Oct 15, 2020
  31. PastaPastaPasta referenced this in commit a937dcab5f on Jun 27, 2021
  32. PastaPastaPasta referenced this in commit 539abeb864 on Jun 28, 2021
  33. PastaPastaPasta referenced this in commit a318d8d4ca on Jun 29, 2021
  34. PastaPastaPasta referenced this in commit b27ee563e6 on Jul 1, 2021
  35. PastaPastaPasta referenced this in commit dc83ebece8 on Jul 1, 2021
  36. PastaPastaPasta referenced this in commit afb52227ee on Jul 12, 2021
  37. PastaPastaPasta referenced this in commit 12b5403aa6 on Jul 13, 2021
  38. DrahtBot locked this on Dec 16, 2021

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:14 UTC

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