rpc: Remove getblockheader #29646

pull fjahr wants to merge 1 commits into bitcoin:master from fjahr:2024-03-bye-getblockheader changing 32 files +39 −154
  1. fjahr commented at 12:47 pm on March 13, 2024: contributor

    The getblockheader RPC with its true/false verbosity options returns the same content as getblock with verbosity 0/1. So this is an opportunity to remove some code very cleanly, as demonstrated here.

    I looked for other issues or PRs that suggested this but wasn’t successful, obviously let me know if I missed something.

    Just looking for conceptual feedback for now. When that is positive I will first run getblockheader through a depecation cycle. If it is negative I will suggest some deduplication between the two RPCs instead.

  2. rpc: Remove getblockheader
    The getblockheader RPC with it's true/false verbosity options return the same result as getblock with verbosity 0/1, so it can be cleanly removed.
    c8aeab5c6f
  3. DrahtBot commented at 12:47 pm on March 13, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label RPC/REST/ZMQ on Mar 13, 2024
  5. theStack commented at 12:57 pm on March 13, 2024: contributor

    The getblockheader RPC with its true/false verbosity options returns the same content as getblock with verbosity 0/1.

    I don’t think that’s the case. The following two commands on mainnet return different results:

    0$ ./src/bitcoin-cli getblockheader $(./src/bitcoin-cli getblockhash 830000) false
    1$ ./src/bitcoin-cli getblock $(./src/bitcoin-cli getblockhash 830000) 0
    

    (What is a little confusing though is that the submitheader RPC doesn’t care if there is more than 80 bytes passed, so feeding in a full block works as well. Context for other reviewers: #29478 (review))

  6. fjahr commented at 1:10 pm on March 13, 2024: contributor
    Hm, weird, the docs are the same word for word as well. (Never mind, misread) I will need to dig a bit deeper and suggest some less drastic change/clarifications.
  7. fjahr closed this on Mar 13, 2024


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: 2024-12-22 12:12 UTC

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