Skip to content

Conversation

NicolasDorier
Copy link
Contributor

@NicolasDorier NicolasDorier commented Aug 16, 2019

Documenting the new feature #16248 . Ping Sjors .

@fanquake fanquake added the Docs label Aug 16, 2019
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 16, 2019

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

Conflicts

No conflicts as of last run.

@fanquake fanquake changed the title [Doc] Add documentation for the new whitelist permissions doc: Add documentation for the new whitelist permissions Aug 16, 2019
@fanquake fanquake added this to the 0.19.0 milestone Aug 16, 2019
@Sjors
Copy link
Member

Sjors commented Aug 16, 2019

@NicolasDorier can you include my "inbound" clarification from #16555 so I can close that?

@NicolasDorier
Copy link
Contributor Author

@Sjors let's merge yours first.

@NicolasDorier
Copy link
Contributor Author


  -whitebind=<[(permissions,)*@]addr>
       Bind to given address and whitelist peers connecting to it. Use
       [host]:port notation for IPv6. If the permission marker '@' is
       specified, you can add a comma separated list of the following
       available permissions 'bloomfilter, noban, forcerelay, relay,
       mempool'. If the permission marker '@' is not specified, it will
       default to 'noban,mempool' with `whitelistrelay` and
       `whitelistforcerelay` optionally adding 'relay' and 'forcerelay'
       respectively. Can be specified multiple times.

  -whitelist=<[(permissions,)*@]IP address or network>
       Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or
       CIDR notated network (e.g. 1.2.3.0/24). If the permission marker
       '@' is specified, you can add a comma separated list of the
       following available permissions 'bloomfilter, noban, forcerelay,
       relay, mempool'. If the permission marker '@' is not specified,
       it will default to 'noban,mempool' with `whitelistrelay` and
       `whitelistforcerelay` optionally adding 'relay' and 'forcerelay'
       respectively. Can be specified multiple times.

  -whitelistforcerelay
       Force relay of transactions from whitelisted inbound peers even if the
       transactions were already in the mempool or violate local relay
       policy, this parameter is ignored if specific permissions are
       applied via whitebind/whitelist (default: 0)

  -whitelistrelay
       Accept relayed transactions received from whitelisted inbound peers even
       when not relaying transactions, this parameter is ignored if
       specific permissions are applied via whitebind/whitelist
       (default: 1)

@NicolasDorier
Copy link
Contributor Author

@MarcoFalke instead of using constant, I built in during runtime, it makes sure that the documentation is updated if the list of permission is updated.

@harding
Copy link
Contributor

harding commented Aug 21, 2019

@NicolasDorier I think this could be a bit more concise. If possible, it'd also be good if it could briefly describe what the various options meant (even I had to look at the code to figure out what mempool provide, although BIP35 support was one of my guesses). Here's a suggestion for white(bind|list), the other two looked ok to me:

  -whitebind=<[(permissions,)*@]addr>
       Bind to given address and whitelist peers connecting to it. Use
       [host]:port notation for IPv6.  Allowed permissions are
       bloomfilter (allow requesting BIP37 filtered blocks and
       transactions), noban (do not ban for misbehavior), forcerelay
       (relay even non-standard transactions), relay (relay even in
       -blocksonly mode), and mempool (allow requesting BIP35 mempool
       contents).  Specify multiple permissions separated by commas
       (default: noban,mempool).  Can be specified multiple times

  -whitelist=<[(permissions,)*@]IP address or network>
       Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or
       CIDR notated network (e.g. 1.2.3.0/24).  Uses same permissions as
       -whitebind.  Can be specified multiple times

maflcko pushed a commit that referenced this pull request Aug 22, 2019
faebf62 rpc: Use Join helper in rpc/util (MarcoFalke)
fa8cd6f util: Add Join helper to join a list of strings (MarcoFalke)

Pull request description:

  We have a lot of enumerations in the code and sometimes those enumerations need to be mentioned in the RPC or command line documentation. Previously, each caller would have a couple of lines inline to join the strings or the joined string is hardcoded in the documentation. A helper to join strings would make code such as #16629 (comment) less verbose and easier to read.

  Also, warnings commonly accumulate in complex RPCs, since a warning doesn't lead to an early return. A helper to join those warnings would make code such as https://github.com/bitcoin/bitcoin/pull/16394/files#r309324997 less verbose and easier to read.

ACKs for top commit:
  practicalswift:
    ACK faebf62

Tree-SHA512: 80f2db86a05c63b686f510585c1c631250271a8958fd71fafaac91559ffd2ec25d609bf7d53412ba27f87eff5893ac9dd9c2f296fc0c73581556e1d6a734a36f
@NicolasDorier
Copy link
Contributor Author

@harding I like it, @MarcoFalke it means that we won't need your new string join util. :(
Will rebase tomorrow.

@maflcko
Copy link
Member

maflcko commented Aug 22, 2019

@MarcoFalke it means that we won't need your new string join util. :(

Good to hear. I like the new text as well. Will take a closer look in a couple of days.

@NicolasDorier
Copy link
Contributor Author

I just updated to use @harding suggestion, added documentation for bloomfilter permission as well.
I needed to change the doc for -whitelistforcerelay and -whitelistrelay as well.

@NicolasDorier
Copy link
Contributor Author

the linter says whitebind is undocumented?

@harding
Copy link
Contributor

harding commented Aug 23, 2019

@NicolasDorier bloomfilter was in my description so now you have it twice. :-)

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 23, 2019
faebf62 rpc: Use Join helper in rpc/util (MarcoFalke)
fa8cd6f util: Add Join helper to join a list of strings (MarcoFalke)

Pull request description:

  We have a lot of enumerations in the code and sometimes those enumerations need to be mentioned in the RPC or command line documentation. Previously, each caller would have a couple of lines inline to join the strings or the joined string is hardcoded in the documentation. A helper to join strings would make code such as bitcoin#16629 (comment) less verbose and easier to read.

  Also, warnings commonly accumulate in complex RPCs, since a warning doesn't lead to an early return. A helper to join those warnings would make code such as https://github.com/bitcoin/bitcoin/pull/16394/files#r309324997 less verbose and easier to read.

ACKs for top commit:
  practicalswift:
    ACK faebf62

Tree-SHA512: 80f2db86a05c63b686f510585c1c631250271a8958fd71fafaac91559ffd2ec25d609bf7d53412ba27f87eff5893ac9dd9c2f296fc0c73581556e1d6a734a36f
@NicolasDorier
Copy link
Contributor Author

oops, fixed it.

@NicolasDorier
Copy link
Contributor Author

Ok somehow this break the tests oO checking what happen.

@Sjors
Copy link
Member

Sjors commented Aug 23, 2019

ACK d536a10
Schermafbeelding 2019-08-23 om 12 40 26

Schermafbeelding 2019-08-23 om 12 40 58

Nit: remove spaces in examples default: noban,mempool,relay and 1.2.3.0/24.

meshcollider added a commit that referenced this pull request Aug 24, 2019
74e3876 Release notes: add previously undocumented changes (David A. Harding)
7e1634a Release notes: edit previously-detached notes (David A. Harding)
e7415a5 Doc: move detached release notes into release-notes.md (David A. Harding)

Pull request description:

  Merges in detached release notes, edits each change down to a single paragraph bullet point (or, in a couple cases, two individual bullet points in separate sections each with a single paragraph).  Adds notes for some undocumented changes I found reviewing `git log --merges`.  Also tries something new: adds the PR number(s) after each entry to make it easier for both reviewers and end-user readers to look up the details behind each change.  (If the PR numbers are unwanted, they're easy to remove either in this PR or later in the release process.)

  I also checked the 0.18 branch but I didn't find anything in the current release notes that had been backported.

  A particular focus in my editing was trying to keep things concise, particularly by pointing to RPC documentation when available (or upcoming, as in #16629).  I do suspect that one downside of detached notes is that people write longer summaries than they would if they knew there were already 300 other lines of release notes.  :-)

  The first commit only moves notes, puts them in bullet form, adjusts indentation appropriately, and drops unneeded headers.  It can be reviewed with `git diff --color-moved=dimmed-zebra` for a little bit of a speedup, but unfortunately I wasn't smart enough to split my copy/pasting and line wrapping into separate commits, so it's not a transparently move-only change.

ACKs for top commit:
  fanquake:
    ACK 74e3876 - Thanks for doing this. It's nice to have a gauge of what's going to be in the `0.19.0` release.
  meshcollider:
    ACK 74e3876

Tree-SHA512: 676668765849d5a67520dd8ac49de85ac1bfb5ba2dc09504e75db77d79c7e2c58b5cee16c58591ec575cb3682e630231baba7fd07565d19f8d02243e06fcb9ab
@NicolasDorier NicolasDorier force-pushed the doc/permissions branch 2 times, most recently from af8a634 to cdb5ce0 Compare August 24, 2019 04:01
@NicolasDorier
Copy link
Contributor Author

Indeed, removed the spaces. Should be ready now.

@NicolasDorier
Copy link
Contributor Author

I broke the tests again. This is the hardest PR doc I did in my life.

@NicolasDorier
Copy link
Contributor Author

I rebased, now the error rpc_invalidateblock does not seem related to this PR.

@maflcko
Copy link
Member

maflcko commented Aug 24, 2019

That is a known bug. See #16444. You don't need a passing travis on a doc-commit, it can be merged in any case after review.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 25, 2019
74e3876 Release notes: add previously undocumented changes (David A. Harding)
7e1634a Release notes: edit previously-detached notes (David A. Harding)
e7415a5 Doc: move detached release notes into release-notes.md (David A. Harding)

Pull request description:

  Merges in detached release notes, edits each change down to a single paragraph bullet point (or, in a couple cases, two individual bullet points in separate sections each with a single paragraph).  Adds notes for some undocumented changes I found reviewing `git log --merges`.  Also tries something new: adds the PR number(s) after each entry to make it easier for both reviewers and end-user readers to look up the details behind each change.  (If the PR numbers are unwanted, they're easy to remove either in this PR or later in the release process.)

  I also checked the 0.18 branch but I didn't find anything in the current release notes that had been backported.

  A particular focus in my editing was trying to keep things concise, particularly by pointing to RPC documentation when available (or upcoming, as in bitcoin#16629).  I do suspect that one downside of detached notes is that people write longer summaries than they would if they knew there were already 300 other lines of release notes.  :-)

  The first commit only moves notes, puts them in bullet form, adjusts indentation appropriately, and drops unneeded headers.  It can be reviewed with `git diff --color-moved=dimmed-zebra` for a little bit of a speedup, but unfortunately I wasn't smart enough to split my copy/pasting and line wrapping into separate commits, so it's not a transparently move-only change.

ACKs for top commit:
  fanquake:
    ACK 74e3876 - Thanks for doing this. It's nice to have a gauge of what's going to be in the `0.19.0` release.
  meshcollider:
    ACK 74e3876

Tree-SHA512: 676668765849d5a67520dd8ac49de85ac1bfb5ba2dc09504e75db77d79c7e2c58b5cee16c58591ec575cb3682e630231baba7fd07565d19f8d02243e06fcb9ab
@NicolasDorier
Copy link
Contributor Author

I think this one is ready to be merged @MarcoFalke

@Sjors
Copy link
Member

Sjors commented Aug 26, 2019

Indeed, re-ACK 66ad754

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Aug 26, 2019
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
@maflcko maflcko merged commit 66ad754 into bitcoin:master Aug 26, 2019
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 27, 2019
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
ShengguangXiao pushed a commit to DeFiCh/ain that referenced this pull request Aug 28, 2020
7e8bca8 rpc: Use Join helper in rpc/util (MarcoFalke)
96e4c78 util: Add Join helper to join a list of strings (MarcoFalke)

Pull request description:

  We have a lot of enumerations in the code and sometimes those enumerations need to be mentioned in the RPC or command line documentation. Previously, each caller would have a couple of lines inline to join the strings or the joined string is hardcoded in the documentation. A helper to join strings would make code such as bitcoin/bitcoin#16629 (comment) less verbose and easier to read.

  Also, warnings commonly accumulate in complex RPCs, since a warning doesn't lead to an early return. A helper to join those warnings would make code such as https://github.com/bitcoin/bitcoin/pull/16394/files#r309324997 less verbose and easier to read.

ACKs for top commit:
  practicalswift:
    ACK 7e8bca8

Tree-SHA512: 80f2db86a05c63b686f510585c1c631250271a8958fd71fafaac91559ffd2ec25d609bf7d53412ba27f87eff5893ac9dd9c2f296fc0c73581556e1d6a734a36f
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 19, 2020
Summary:
Backport of Core [[bitcoin/bitcoin#16629 | PR16629]]

Depends on D7976

Test Plan: `ninja && src/bitcoind -help`

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7977
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Oct 29, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Oct 30, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 2, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 7, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 7, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 11, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 12, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 13, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 14, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 14, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 16, 2021
…missions

66ad754 [Doc] Add documentation for the new whitelist permissions (nicolas.dorier)

Pull request description:

  Documenting the new feature bitcoin#16248 . Ping Sjors .

ACKs for top commit:
  Sjors:
    Indeed, re-ACK 66ad754

Tree-SHA512: e6860bb6fae921287da7920a8db534e6a1a23871dd78dd6da030f00adf23e204cd23b194d67361bf34d4ef5a7815fc3fd7c81a3f2f35e4cfbe6ee2f2e6daec25
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants