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.
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.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/cf3b20c0496d99c80973b86c8f8bec11de7c2b3c for binaries and test log.
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.
The roll out happens like
ACKACKACK.
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.
@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.
Closing, no consensus
@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.
@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).