Bitcoin Forum
January 18, 2020, 06:56:00 PM *
News: Latest Bitcoin Core release: 0.19.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: NODE_NETWORK_LIMITED - what is it?  (Read 96 times)
piotr_n
Legendary
*
Offline Offline

Activity: 2016
Merit: 1054


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 ETFbitcoin (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
1579373760
Hero Member
*
Offline Offline

Posts: 1579373760

View Profile Personal Message (Offline)

Ignore
1579373760
Reply with quote  #2

1579373760
Report to moderator
1579373760
Hero Member
*
Offline Offline

Posts: 1579373760

View Profile Personal Message (Offline)

Ignore
1579373760
Reply with quote  #2

1579373760
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1579373760
Hero Member
*
Offline Offline

Posts: 1579373760

View Profile Personal Message (Offline)

Ignore
1579373760
Reply with quote  #2

1579373760
Report to moderator
1579373760
Hero Member
*
Offline Offline

Posts: 1579373760

View Profile Personal Message (Offline)

Ignore
1579373760
Reply with quote  #2

1579373760
Report to moderator
1579373760
Hero Member
*
Offline Offline

Posts: 1579373760

View Profile Personal Message (Offline)

Ignore
1579373760
Reply with quote  #2

1579373760
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 2016
Merit: 3007


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


View Profile WWW
September 28, 2018, 06:27:26 PM
Merited by ETFbitcoin (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
*
qt
Offline Offline

Activity: 2940
Merit: 3047



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

Activity: 2016
Merit: 1054


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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!