Author

Topic: NODE_NETWORK_LIMITED - what is it? (Read 237 times)

legendary
Activity: 2053
Merit: 1356
aka tonikt
September 28, 2018, 02:08:38 PM
#4
Ok, thanks
staff
Activity: 4284
Merit: 8808
September 28, 2018, 01:55:51 PM
#3
Then I read (in src/protocol.h) this means that the node only stores the last 288 blocks..

That isn't what it says.  Service bits state abilities, not limitations, as they can be combined logical or.

If a node says NODE_NETWORK and NODE_NETWORK_LIMITED that means it can serve the whole history (node_network) and it can serve at least the last 288 blocks (node_network_limited). So, in fact node network limited means the same as node network means but with a limit... and if you signal both you satisfy both abilities.

NODE_NETWORK_LIMITED is for allowing pruned nodes to serve recent blocks. Currently, it isn't really used.
Sure it is, it isn't turned off when pruning and https://github.com/bitcoin/bitcoin/pull/10387
staff
Activity: 3458
Merit: 6793
Just writing some code
September 28, 2018, 01:27:26 PM
#2
NODE_NETWORK_LIMITED is for allowing pruned nodes to serve recent blocks. Currently, it isn't really used. However, this service bit means that the node is guaranteed to have at least the last 288 blocks. It can have more to serve, but it cannot have less.

Regarding the comment in the code, NODE_NETWORK means that a node can serve all blocks and it verifies and relays all transactions. So the comments says that NODE_NETWORK_LIMITED means the same as NODE_NETWORK by with a limitation of 288 blocks. So NODE_NETWORK_LIMITED can serve at least the 288 most recent blocks and it verifies and relays all transactions.
legendary
Activity: 2053
Merit: 1356
aka tonikt
September 28, 2018, 10:21:25 AM
#1
I've noticed the recent core nodes (v0.16.0 or higher) by default introduce themselves with services bit 0x400

Then I read (in src/protocol.h) this means that the node only stores the last 288 blocks..

Code:
   // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only
    // serving the last 288 (2 day) blocks
    // See BIP159 for details on how this is implemented.
    NODE_NETWORK_LIMITED = (1 << 10),

Is it true?

Also BIP159 says "Status: Draft" and defines NODE_NETWORK_LIMITED as:
Code:
If signaled, the peer MUST be capable of serving at least the last 288 blocks (~2 days).

So I'm a bit lost here..
Jump to: