rpc: doc: RPCHelpMan missing request parameters for getblocktemplate #27998

issue stickies-v openend this issue on June 29, 2023
  1. stickies-v commented at 11:11 am on June 29, 2023: contributor

    Motivation

    The getblocktemplate help currently shows these available request parameters (as part of the template_request object):

     0$ ./bitcoin-cli help getblocktemplate
     1
     2...
     3
     4Arguments:
     51. template_request         (json object, optional, default={}) Format of the template
     6     {
     7       "mode": "str",       (string, optional) This must be set to "template", "proposal" (see BIP 23), or omitted
     8       "capabilities": [    (json array, optional) A list of strings
     9         "str",             (string) client side supported feature, 'longpoll', 'coinbasevalue', 'proposal', 'serverlist', 'workid'
    10         ...
    11       ],
    12       "rules": [           (json array, required) A list of strings
    13         "segwit",          (string, required) (literal) indicates client side segwit support
    14         "str",             (string) other client side supported softfork deployment
    15         ...
    16       ],
    17     }
    18...
    

    It seems two (optional) parameters are missing: longpollid and data.

    Possible solution

    Seems like a good first issue to me:

    1. Understand what both parameters do, their type etc.
    2. Add two entries to the template_request object, with a helpful concise description, and consider their optional status
    3. Verify output is correct by calling ./bitcoin-cli help getblocktemplate

    Useful Skills

    No response

    Guidance for new contributors

    Want to work on this issue?

    For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

  2. stickies-v added the label good first issue on Jun 29, 2023
  3. maflcko added the label Docs on Jun 29, 2023
  4. ItIsOHM commented at 3:30 pm on July 1, 2023: contributor
    Hey there, I’m a beginner contributor and would like to contribute to this, but it’d take me some time to understand what this issue is about. Is that alright?
  5. stickies-v commented at 10:12 am on July 3, 2023: contributor
    Absolutely, just open the PR whenever you feel ready, or ask away here if you have any problems you can’t figure out.
  6. ItIsOHM commented at 1:21 pm on July 3, 2023: contributor

    Absolutely, just open the PR whenever you feel ready, or ask away here if you have any problems you can’t figure out.

    Hey @stickies-v! So as a starter, I don’t have bitcoin-cli working, so to do that I’m building the core with Visual Studio by following this guide : https://github.com/bitcoin/bitcoin/blob/master/build_msvc/README.md, is that alright or do I need to follow some other step to use bitcoin-cli? I am using Windows 11 for this.

  7. ItIsOHM commented at 1:51 pm on July 3, 2023: contributor
    Update: I downloaded and installed Bitcoin Core, which then helped me to run bitcoind and bitcoin-cli. I’ll try to make the changes to a new branch :D
  8. stickies-v commented at 1:54 pm on July 3, 2023: contributor

    MSVC is one option, WSL another. See also https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md.

    Build questions are a bit out of scope for this issue though, there’s a fair amount of documentation online. Just downloading the binaries isn’t enough to work on this, you need to compile it yourself to verify the changes are correct.

  9. ItIsOHM commented at 1:59 pm on July 3, 2023: contributor

    MSVC is one option, WSL another. See also https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md.

    Build questions are a bit out of scope for this issue though, there’s a fair amount of documentation online. Just downloading the binaries isn’t enough to work on this, you need to compile it yourself to verify the changes are correct.

    Before using Bitcoin Core I actually used build_msvc which gave me a bunch folders with *.vcxproj files, however I was unsure where to head after that so I went and downloaded Bitcoin Core.

    And to compile it what am I supposed to use? My guess would be building it again using msvc-autogen.py after making the changes?

  10. ItIsOHM commented at 2:59 pm on July 3, 2023: contributor

    Hello @stickies-v, I added these two entries after rules in template_request: image

    Is this correct? I’m sorry if it’s wrong, I’m just a beginner with this.

  11. stickies-v commented at 10:33 am on July 4, 2023: contributor
    The description for “data” is wrong, copy-pasting from another (unrelated) data field is not a good approach here. I would suggest digging into the code to understand what “data” is used for, and/or reading the spec of BIP22 and BIP23
  12. ItIsOHM commented at 12:56 pm on July 4, 2023: contributor

    The description for “data” is wrong, copy-pasting from another (unrelated) data field is not a good approach here. I would suggest digging into the code to understand what “data” is used for, and/or reading the spec of BIP22 and BIP23

    Oh yes I agree, I’ll read more about it and change the descriptions. I was asking in terms of syntax and usage, if it was correct to implement it in this way or If I needed to do something else.

  13. stickies-v commented at 1:48 pm on July 4, 2023: contributor
    Yeah the approach is good. Great, have a look and then for further implementation feedback I’d suggest you open a PR with the code changes (definitely worth going through CONTRIBUTING.md first).
  14. ItIsOHM referenced this in commit 95e68778eb on Jul 9, 2023
  15. ItIsOHM commented at 7:00 am on July 9, 2023: contributor

    Hello @stickies-v, sorry for the delay. I recently made a PR (https://github.com/bitcoin/bitcoin/pull/28056) and changed the description of the parameters, taking help from BIP 22 and BIP 23 as you suggested. But I am still unsure if it’s a totally correct description or not, hence I have marked it as WIP.

    I apologize if these changes aren’t correct as I’m just a beginner here.

  16. iemafzalhassan commented at 3:29 pm on July 9, 2023: none
    hey i am a newbie can anyone guide me what to do next to become a first contributor (this is my first project)
  17. jonatack commented at 4:20 pm on July 9, 2023: contributor

    hey i am a newbie can anyone guide me what to do next to become a first contributor (this is my first project)

    Hi @iemafzalhassan (and other future contributors), I suggest the articles section of https://jonatack.github.io.

  18. iemafzalhassan commented at 5:14 pm on July 9, 2023: none

    hey i am a newbie can anyone guide me what to do next to become a first contributor (this is my first project)

    Hi @iemafzalhassan (and other future contributors), I suggest the articles section of https://jonatack.github.io.

    Thnkew so much 🤩🥳

  19. ItIsOHM commented at 5:31 pm on July 9, 2023: contributor

    hey i am a newbie can anyone guide me what to do next to become a first contributor (this is my first project)

    Hi @iemafzalhassan (and other future contributors), I suggest the articles section of https://jonatack.github.io.

    Thanks a lot for this @jonatack!

  20. ItIsOHM referenced this in commit 098d3dfe1c on Jul 10, 2023
  21. ItIsOHM referenced this in commit d8cd80c592 on Jul 10, 2023
  22. ItIsOHM referenced this in commit f6a26196cf on Jul 14, 2023
  23. fanquake referenced this in commit 3648a9b4f7 on Jul 19, 2023
  24. fanquake closed this on Jul 19, 2023

  25. sidhujag referenced this in commit 8459c274f9 on Jul 19, 2023
  26. luke-jr referenced this in commit 402dc60fd4 on Aug 16, 2023
  27. bitcoin locked this on Jul 18, 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-21 15:12 UTC

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