Bitcoin Forum
May 11, 2024, 04:54:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: NODE_NETWORK_LIMITED - what is it?  (Read 220 times)
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
September 28, 2018, 03:21:25 PM
Last edit: September 28, 2018, 03:42:15 PM by piotr_n
Merited by ABCbits (1)
 #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..

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
1715446489
Hero Member
*
Offline Offline

Posts: 1715446489

View Profile Personal Message (Offline)

Ignore
1715446489
Reply with quote  #2

1715446489
Report to moderator
1715446489
Hero Member
*
Offline Offline

Posts: 1715446489

View Profile Personal Message (Offline)

Ignore
1715446489
Reply with quote  #2

1715446489
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715446489
Hero Member
*
Offline Offline

Posts: 1715446489

View Profile Personal Message (Offline)

Ignore
1715446489
Reply with quote  #2

1715446489
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
September 28, 2018, 06:27:26 PM
Merited by ABCbits (1)
 #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.

gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4172
Merit: 8419



View Profile WWW
September 28, 2018, 06:55:51 PM
Last edit: September 28, 2018, 09:39:38 PM by gmaxwell
Merited by Foxpup (3), ABCbits (1)
 #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
piotr_n (OP)
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
September 28, 2018, 07:08:38 PM
 #4

Ok, thanks

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!