public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Pieter Wuille <pieter.wuille@gmail•com>
To: Mike Hearn <mike@plan99•net>
Cc: Bitcoin Dev <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] Service bits for pruned nodes
Date: Fri, 3 May 2013 14:30:19 +0200	[thread overview]
Message-ID: <CAPg+sBgz2pLOkc3WL1sG3pJpdVqUZRwEfO9YaC-62vQyWLLW2Q@mail.gmail.com> (raw)
In-Reply-To: <CANEZrP2X9A0kBvN8=+G+dn_uqbSYfNhw7dm4od_yfJqDUoxHWg@mail.gmail.com>

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

(generic comment on the discussion that spawned off: ideas about how to
allow additional protocols for block exchange are certainly interesting,
and in the long term we should certainly consider that. For now I'd like to
keep this about the more immediate way forward with making the P2P protocol
not break in the presence of pruning nodes)

On Sun, Apr 28, 2013 at 6:57 PM, Mike Hearn <mike@plan99•net> wrote:

> That's true. It can be perhaps be represented as "I keep the last N
> blocks" and then most likely for any given node the policy doesn't change
> all that fast, so if you know the best chain height you can calculate which
> nodes have what.
>

Yes, I like that better than broadcasting the exact height starting at
which you serve (though I would put that information immediately in the
version announcement). I don't think we can rely on the addr broadcasting
mechanism for fast information exchange anyway. One more problem with this:
DNS seeds cannot convey this information (neither do they currently convey
service bits, but at least those can be indexed separately, and served
explicitly through asking for a specific subdomain or so).

So to summarize:
* Add a field to addr messages (after protocol number increase) that
maintains number of top blocks served)?
* Add a field to version message to announce the actual first block served?
* Add service bits to separately enable "relaying/verifying node" and
"serves (part of) the historic chain"? My original reason for suggesting
this was different, I think better compatibility with DNS seeds may be a
good reason for this. You could ask the seed first for a subset that at
least serves some part of the historic chain, until you hit a node that has
enough, and once caught up, ask for nodes that relay.

Disconnecting in case something is requested that isn't served seems like
>> an acceptable behaviour, yes. A specific message indicating data is pruned
>> may be more flexible, but more complex to handle too.
>>
>
> Well, old nodes would ignore it and new nodes wouldn't need it?
>

I'm sure there will be cases where a new node connects based on outdated
information. I'm just stating that I agree with the generic policy of "if a
node requests something it should have known the peer doesn't serve, it is
fair to be disconnected."


>  The reason for splitting them is that I think over time these may be
>> handled by different implementations. You could have stupid
>> storage/bandwidth nodes that just keep the blockchain around, and others
>> that validate it. Even if that doesn't happen implementation-wise, I think
>> these are sufficiently independent functions to start thinking about them
>> as such.
>>
>
> Maybe so, with a "last N blocks" in addr messages though such nodes could
> just set their advertised history to zero and not have to deal with serving
> blocks to nodes.
>
> If you have a node that serves the chain but doesn't validate it, how does
> it know what the best chain is? Just whatever the hardest is?
>

Maybe it validates, maybe it doesn't. What matters is that it doesn't
guarantee relaying fresh blocks and transactions. Maybe it does validate,
maybe it just stores any blocks, and uses a validating node to know what to
announce as best chain, or it uses an SPV mechanism to determine that. Or
it only validates and relays blocks, but not transactions. My point is that
"serving historic data" and "relaying fresh data" are separate
responsibilities, and there's no need to require them to be combined.

-- 
Pieter

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

  reply	other threads:[~2013-05-03 12:30 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 15:51 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPg+sBgz2pLOkc3WL1sG3pJpdVqUZRwEfO9YaC-62vQyWLLW2Q@mail.gmail.com \
    --to=pieter.wuille@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=mike@plan99$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox