Introduce and use new nServices P2P flag, NODE_VALIDATION #1860

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:validation changing 3 files +5 −4
  1. jgarzik commented at 4:35 AM on September 24, 2012: contributor

    Not sure whether we want CAddress() to continue defaulting to non-zero, so the behavior of the current code was retained.

    Warrants a BIP, presumably.

  2. Introduce and use new nServices P2P flag, NODE_VALIDATION cf3b20c049
  3. BitcoinPullTester commented at 9:13 AM on September 24, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/cf3b20c0496d99c80973b86c8f8bec11de7c2b3c for binaries and test log.

  4. mikehearn commented at 12:04 PM on September 24, 2012: contributor

    Hmm, why set it by default? Presumably this new flag would indicate a disk-pruned node? I think it only makes sense to set this if the behaviour is non-default in some way, and this commit doesn't change behaviour.

  5. jgarzik commented at 1:36 PM on September 24, 2012: contributor

    The roll out happens like

    1. Set this by default
    2. If you need validation but not block download, seek out NODE_VALIDATION nodes, otherwise seek out NODE_NETWORK
    3. Later, non-archive nodes drop NODE_NETWORK
  6. TheBlueMatt commented at 2:32 PM on September 24, 2012: member

    ACKACKACK.

  7. gmaxwell commented at 2:36 PM on September 24, 2012: contributor

    So if we do this now, we lose the ability to make NODE_VALIDATION signify an ability to serve UTXO SPV tree fragments but not blocks. (Because we currently can't serve them). Otherwise, sounds good to me.

  8. sipa commented at 2:20 PM on September 28, 2012: member

    @gmaxwell I think a merkle-UTXO tree is further ahead than the need for separation between archive nodes and full nodes. I think the use case for those is separate from this issue, so I'd leave that for another network service bit. @mikehearn: service bits have to indicate (positive) support for a feature, as they are ORed together when storing in the address book. That can change too of course, but it's certainly easier if that weren't necessary.

    Originally, I thought about adding two separate bits, NODE_VALIDATION (validation/relay of blocks and transactions, maintaining a mempool, keeping UTXO set, serving (very) recent blocks) and NODE_ARCHIVE (providing old blocks), and have NODE_NETWORK imply both. This proposal accomplishes the same, but forces every archive node to be a validation node as well. Not a problem as such, but I'm not sure that's necessary.

  9. jgarzik commented at 9:23 PM on October 3, 2012: contributor

    @sipa:

    If archive nodes will always be validating (which seems logical), one additional NODE_VALIDATION bit is sufficient.

    If archive nodes will sometimes not validate, then yes, we need two bits.

  10. sipa commented at 12:19 AM on October 5, 2012: member

    @jgarzik Yes, that's my point. I don't think it makes sense to have that distinction now, but I'm not sure we should make it impossible to make that distinction in the future.

  11. TheBlueMatt commented at 2:52 AM on October 5, 2012: member

    @gmaxwell meh, I find that more protocol update than node service update...but I suppose leaving that up to the version king works best... @sipa Can always add a NODE_ARCHIVE later if we really need it to mean non-verified old block provider?

  12. jgarzik commented at 5:37 AM on October 5, 2012: contributor

    Closing, no consensus

  13. jgarzik closed this on Oct 5, 2012

  14. sipa commented at 8:53 AM on October 5, 2012: member

    @TheBlueMatt Right, but at that point, an old client that needs to IBD and doesn't know yet about the new service bit will not be able to find the archive-only nodes.

  15. TheBlueMatt commented at 3:45 PM on October 5, 2012: member

    @jgarzik No consensus? I think every comment has been generally positive, and this is something we really need in the near future (I'd argue before ultraprune is merged).

  16. jgarzik deleted the branch on Aug 24, 2014
  17. KolbyML referenced this in commit 5aed03f6fe on Dec 5, 2020
  18. DrahtBot locked this on Sep 8, 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-20 00:16 UTC

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