doc: Improve documentation of rpcallowip #27480

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:rpcallowip-doc-improv changing 1 files +1 −1
  1. willcl-ark commented at 6:00 AM on April 18, 2023: member

    Closes #21070

    v21.0 introduced a behaviour changed noted in #21070 where using a config value rpcallowip=::0 no longer also permitted ipv4 ip addresses.

    The rpc_bind.py functional test covers this new behaviour already by checking that the list of bind addresses exactly matches what is expected so this commit only updates the documentation.

  2. DrahtBot commented at 6:00 AM on April 18, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK pinheadmz, jonatack, achow101
    Concept ACK brunoerg

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  3. DrahtBot added the label Docs on Apr 18, 2023
  4. in src/init.cpp:599 in 9fe62caded outdated
     595 | @@ -596,7 +596,7 @@ void SetupServerArgs(ArgsManager& argsman)
     596 |      argsman.AddArg("-blockversion=<n>", "Override block version to test forking scenarios", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::BLOCK_CREATION);
     597 |  
     598 |      argsman.AddArg("-rest", strprintf("Accept public REST requests (default: %u)", DEFAULT_REST_ENABLE), ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
     599 | -    argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
     600 | +    argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24), all ipv4 (0.0.0.0/0) or all ipv6 (::/0). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    


    pinheadmz commented at 3:29 PM on April 18, 2023:

    nit

        argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all ipv4 (0.0.0.0/0), or all ipv6 (::/0). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    

    willcl-ark commented at 9:14 AM on April 19, 2023:

    Thanks, I did write it like this intentially as I felt that the final 3 are all variants of network/CIDR, but writing them as a sub-list didn't read well to me...

    Thinking more about it I think they should be included as a sublist more clearly, so perhaps we go with:

        argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24, 0.0.0.0/0 (all ipv4) or ::/0 (all ipv6)). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    

    What do you think?


    pinheadmz commented at 2:01 PM on April 19, 2023:

    Sure ;-)


    ekzyis commented at 5:22 PM on April 25, 2023:

    nit:

    I would use "or" after "a network/netmask (e.g. 1.2.3.4/255.255.255.0)" now:

    - argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24, 0.0.0.0/0 (all ipv4) or ::/0 (all ipv6)). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    + argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24, 0.0.0.0/0 (all ipv4) or ::/0 (all ipv6)). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    

    willcl-ark commented at 1:59 PM on August 9, 2023:

    Took your suggestion here @pinheadmz

  5. pinheadmz approved
  6. pinheadmz commented at 3:30 PM on April 18, 2023: member

    utACK

  7. brunoerg commented at 3:48 PM on April 21, 2023: contributor

    Concept ACK

  8. ekzyis approved
  9. DrahtBot commented at 9:17 AM on August 8, 2023: contributor

    <!--8ac04cdde196e94527acabf64b896448-->

    There hasn't been much activity lately. What is the status here?

    Finding reviewers may take time. However, if the patch is no longer relevant, please close this pull request. If the author lost interest or time to work on this, please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

  10. willcl-ark force-pushed on Aug 9, 2023
  11. willcl-ark commented at 2:00 PM on August 9, 2023: member

    There hasn't been much activity lately. What is the status here?

    Happy to close this, if we also close the corresponding issue #21070. But I think it's preferable to keep this open, and merge it to close the issue (and improve the docs).

  12. in src/init.cpp:613 in 580cdec79c outdated
     609 | @@ -610,7 +610,7 @@ void SetupServerArgs(ArgsManager& argsman)
     610 |      argsman.AddArg("-blockversion=<n>", "Override block version to test forking scenarios", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::BLOCK_CREATION);
     611 |  
     612 |      argsman.AddArg("-rest", strprintf("Accept public REST requests (default: %u)", DEFAULT_REST_ENABLE), ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
     613 | -    argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
     614 | +    argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all ipv4 (0.0.0.0/0 ), or all ipv6 (::/0). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    


    pinheadmz commented at 7:27 PM on August 9, 2023:

    nit, extra space ?

        argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all ipv4 (0.0.0.0/0), or all ipv6 (::/0). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    

    jonatack commented at 10:33 PM on August 9, 2023:

    (Concept ACK.) While retouching, mind s/Valid for/Valid values for/ or s/source. Valid for <ip> are/source, which can be


    willcl-ark commented at 7:10 AM on August 10, 2023:

    @jonatack took the first. @pinheadmz removed the space. Thanks.

  13. DrahtBot added the label CI failed on Aug 9, 2023
  14. doc: Improve documentation of rpcallowip rpchelp
    Closes #21070
    
    v21.0 introduced a behaviour changed noted in #21070 where using a config value
    `rpcallowip=::0` no longer also permitted ipv4 ip addresses.
    
    The rpc_bind.py functional test covers this new behaviour already by checking
    that the list of bind addresses exactly matches what is expected so this
    commit only updates the documentation.
    c8e066461b
  15. willcl-ark force-pushed on Aug 10, 2023
  16. DrahtBot removed the label CI failed on Aug 10, 2023
  17. pinheadmz approved
  18. pinheadmz commented at 11:00 AM on August 10, 2023: member

    ACK c8e066461b54d745b85411035fcc00a1a4044d76

    reviewed code changes, built locally. tested the option with various (in)valid parameters to confirm the docs match the behavior

    <details><summary>Show Signature</summary>

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA256
    
    ACK c8e066461b54d745b85411035fcc00a1a4044d76
    -----BEGIN PGP SIGNATURE-----
    
    iQIzBAEBCAAdFiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmTUwzsACgkQ5+KYS2KJ
    yTpDbhAAzRSmfx29YKWZDQ4gY4bCIKF4/PDAwX4DTo3hh7mOpKai7eKx3TPl2RAd
    oy42t0dkImgez3gpKKbXzHtapsmJk2GcHCOm0ylC20YrZsX3moaFEErkWT7zBya3
    r8+l6p566+g23QzO7UtCAZ+NlNqNpYXz8Si6DkfPhyLtvIgt8LOR7Eu+9YETGyou
    lhnocFnWMc5Dg69mFpNVVlHHrTZvnTG3wDXHNRjzz6Elx5gx1/aUAGSJGQXgInSK
    F3r8B9mP38jEUnh57c3+acpNZNqSOV+Np32o4jDcwGE0Tpf2pHXsCF5UCzGQEJB/
    Bz5qZr6i8Hhr2NLsiDMGQ2UDRGDspKWQumuJWAL5TmD2Wz5IMzaWWL8aL9c4DoSM
    nzjXdzF+1gTvXucZHXYm6MFELROODqcNKbnVbd+BW7fC3BZsteqy9+EcobMjzVbt
    v3RpGF0msIxc1nb4/kjecrNBLug3vyw9NjE9th+0cRc+sWJByMqgwq3Mo5TMoRvL
    mYdsEsDxIIQiRQ3OE73LiQpWZviftQriGDjI9ls9csqBEkYSr572TY+h9H0qFv67
    zyKxzresThm1uew1jXDIzIdzA3Rg/RpZllu8GzwhY0Wg4VKgpi7qykkrY8HDywxN
    DQ2lleXyWXy2FCsSUzjbbZmUYftbnSRx8e6mTKtt5zrEV7dvmmI=
    =d+m3
    -----END PGP SIGNATURE-----
    

    pinheadmz's public key is on keybase

    </details>

  19. in src/init.cpp:613 in c8e066461b
     609 | @@ -610,7 +610,7 @@ void SetupServerArgs(ArgsManager& argsman)
     610 |      argsman.AddArg("-blockversion=<n>", "Override block version to test forking scenarios", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::BLOCK_CREATION);
     611 |  
     612 |      argsman.AddArg("-rest", strprintf("Accept public REST requests (default: %u)", DEFAULT_REST_ENABLE), ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
     613 | -    argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
     614 | +    argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid values for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all ipv4 (0.0.0.0/0), or all ipv6 (::/0). This option can be specified multiple times", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    


    jonatack commented at 4:12 PM on August 10, 2023:

    only if you retouch

        argsman.AddArg("-rpcallowip=<ip>", "Allow JSON-RPC connections from specified source. Valid values for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0), a network/CIDR (e.g. 1.2.3.4/24), all ipv4 (0.0.0.0/0), or all ipv6 (::/0). This option can be specified multiple times.", ArgsManager::ALLOW_ANY, OptionsCategory::RPC);
    
  20. jonatack commented at 4:22 PM on August 10, 2023: member

    ACK c8e066461b54d745b85411035fcc00a1a4044d76

    Non-blockers, consider changing the commit message to something like doc: update -rpcallowip config option help documentation (it's not an RPC help), and (i.e., for the future) using PR 21070 rather than #21070 so GitHub doesn't add mentions in that issue on every push.

  21. achow101 commented at 8:25 PM on August 24, 2023: member

    ACK c8e066461b54d745b85411035fcc00a1a4044d76

  22. achow101 merged this on Aug 24, 2023
  23. achow101 closed this on Aug 24, 2023

  24. Frank-GER referenced this in commit 5b3fa1790b on Sep 8, 2023
  25. bitcoin locked this on Aug 23, 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: 2026-04-13 15:13 UTC

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