public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] Service bits for pruned nodes
@ 2013-04-28 15:51 Pieter Wuille
  2013-04-28 16:29 ` Mike Hearn
  2013-05-01 13:46 ` Jeff Garzik
  0 siblings, 2 replies; 34+ messages in thread
From: Pieter Wuille @ 2013-04-28 15:51 UTC (permalink / raw)
  To: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

Hello all,

I think it is time to move forward with pruning nodes, i.e. nodes that
fully validate and relay blocks and transactions, but which do not keep
(all) historic blocks around, and thus cannot be queried for these.

The biggest roadblock is making sure new and old nodes that start up are
able to find nodes to synchronize from. To help them find peers, I would
like to propose adding two extra service bits to the P2P protocol:
* NODE_VALIDATE: relay and validate blocks and transactions, but is only
guaranteed to answer getdata requests for (recently) relayed blocks and
transactions, and mempool transactions.
* NODE_BLOCKS_2016: can be queried for the last 2016 blocks, but without
guarantee for relaying/validating new blocks and transactions.
* NODE_NETWORK (which existed before) will imply NODE_VALIDATE and
guarantee availability of all historic blocks.

The idea is to separate the different responsibilities of network nodes
into separate bits, so they can - at some point - be
implemented independently. Perhaps we want more than just one degree (2016
blocks), maybe also 144 or 210000, but those can be added later if
necessary. I monitored the frequency of block depths requested from my
public node, and got this frequency distribution:
http://bitcoin.sipa.be/depth-small.png so it seems 2016 nicely matches the
set of frequently-requested blocks (indicating that few nodes are offline
for more than 2 weeks consecutively.

I'll write a BIP to formalize this, but wanted to get an idea of how much
support there is for a change like this.

Cheers,

-- 
Pieter

[-- Attachment #2: Type: text/html, Size: 1947 bytes --]

^ permalink raw reply	[flat|nested] 34+ messages in thread
* Re: [Bitcoin-development] Service bits for pruned nodes
@ 2013-05-16 11:26 Ricardo Filipe
  2013-05-16 15:47 ` Jeff Garzik
  0 siblings, 1 reply; 34+ messages in thread
From: Ricardo Filipe @ 2013-05-16 11:26 UTC (permalink / raw)
  To: bitcoin-development

We would only end up with few copies of the historic data if users
could choose what parts of the blockchain to store. Simply store
chunks randomly, according to users available space, and give priority
to the "N most recent" chunks to have more replicas in the network.

You don't need bittorrent specifically for a DHT, if publicity is a
problem. There are many DHT proposals and implementations, and i bet
one of them should be more suitable to the bitcoin network than
bittorrent's.

>On Sun, Apr 28, 2013 at 9:29 AM, Mike Hearn <mike@...> wrote:
>> I'd imagined that nodes would be able to pick their own ranges to keep
>> rather than have fixed chosen intervals. "Everything or two weeks" is rather
>
>X most recent is special for two reasons:  It meshes well with actual demand,
>and the data is required for reorganization.
>
>So whatever we do for historic data, N most recent should be treated specially.
>
>But I also agree that its important that <everything> be splittable into ranges
>because otherwise when having to choose between serving historic data
>and— say— 40 GB storage, a great many are going to choose not to serve
>historic data... and so nodes may be willing to contribute 4-39 GB storage
>to the network there will be no good way for them to do so and we may end
>up with too few copies of the historic data available.
>
>As can be seen in the graph, once you get past the most recent 4000
>blocks the probability is fairly uniform... so "N most recent" is not a
>good way to divide load for the older blocks. But simple ranges— perhaps
>quantized to groups of 100 or 1000 blocks or something— would work fine.
>
>This doesn't have to come in the first cut, however— and it needs new
>addr messages in any case.



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2013-05-16 16:23 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-28 15:51 [Bitcoin-development] Service bits for pruned nodes Pieter Wuille
2013-04-28 16:29 ` Mike Hearn
2013-04-28 16:44   ` Pieter Wuille
2013-04-28 16:57     ` Mike Hearn
2013-05-03 12:30       ` Pieter Wuille
2013-05-03 14:06         ` Mike Hearn
2013-05-03 14:18           ` Peter Todd
2013-05-03 15:02             ` Mike Hearn
2013-05-03 15:11               ` Peter Todd
2013-05-04 18:07                 ` John Dillon
2013-05-04 18:55                   ` Jeff Garzik
2013-05-05 13:12                     ` John Dillon
2013-05-06  8:19                       ` Mike Hearn
2013-05-06 13:13                         ` Pieter Wuille
2013-04-28 19:50   ` Gregory Maxwell
2013-04-29  2:57     ` John Dillon
2013-04-29  3:36       ` Gregory Maxwell
2013-04-29  3:42         ` Robert Backhaus
2013-04-29  3:48         ` John Dillon
2013-04-29  3:55           ` Peter Todd
2013-04-29  6:10             ` Jay F
     [not found]               ` <CAFBxzACw=G7UgG853zQrM-Z1-B4VqSQR5YUJQ5n1=wnv7EyWsw@mail.gmail.com>
2013-04-30 16:14                 ` [Bitcoin-development] Fwd: " Rebroad (sourceforge)
2013-04-30 18:04                   ` Jeff Garzik
2013-04-30 19:27                     ` Andy Parkins
2013-04-30 19:31                       ` Simon Barber
2013-04-30 20:11                       ` Jeff Garzik
2013-05-01 14:05                         ` Andy Parkins
2013-05-01 14:26                           ` Jeff Garzik
2013-05-01 14:34                             ` Andy Parkins
2013-04-30 20:06                     ` [Bitcoin-development] " Brenton Camac
2013-05-01 13:46 ` Jeff Garzik
2013-05-16 11:26 Ricardo Filipe
2013-05-16 15:47 ` Jeff Garzik
2013-05-16 16:23   ` Ricardo Filipe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox