This is in substantially the same form as proposed on the mailing list and discussed on IRC. I'll update this pull after a BIP number is assigned. @theuni -- perhaps we can discuss any outstanding concerns with this approach in this PR?
New BIP for "sendheaders" p2p message #221
pull sdaftuar wants to merge 4 commits into bitcoin:master from sdaftuar:add-sendheaders changing 2 files +53 −0-
sdaftuar commented at 5:17 PM on October 16, 2015: member
-
theuni commented at 5:42 PM on October 16, 2015: member
@sdaftuar Right away, I'll mention that I don't consider my issues with the BIP as-is to be blockers. I don't wish to put the brakes on this.
The approach here is fine by me (though I would prefer to see something a bit more abstract, to help with new capabilities/preferences in the future).
I would very much prefer, though, for tightened requirements on when the message can be sent. It's true that the current protocol is quite stateful already, but I don't see that as a good reason to keep piling on.
How about requiring that it's sent before "verack"? That would allow us to add new similar commands in the future, as it would effectively make "verack" mean "i'm done setting up the connection now".
-
morcos commented at 5:51 PM on October 16, 2015: member
@theuni We moved off this conversation during the meeting before I really understood why there was all this concern around statefulness. First, I mostly view this message as advisory, you certainly don't have to send direct headers if someone sends you this message and in some cases you won't. Second, I don't know why we want to preclude more intelligent logic in the future on when this is turned on and when it isn't. It's entirely possible you'd want to turn this on only for a few of your peers who tend to be the first to announce you things and save a little bit of bandwidth from other peers who will stay in inv mode. And maybe you dynamically adjust that as you go. I'm not arguing we should or need to do that now, or that its definitely a good idea, but I just don't know why we would want to preclude it.
-
theuni commented at 6:45 PM on October 16, 2015: member
@morcos my aim is to cut down on the amount of communication necessary between layers. If a node's property can considered immutable for the life of the connection, it doesn't have to poll for changes and be prepared to cope with them. That eases work for implementations significantly.
As mentioned, I don't wish for this to hold up the BIP in any significant way. But since there seems to be a consensus at the moment about not allowing this to be disabled once set, I think it makes sense to discuss whether we should take that a step further and handle it as part of the initial handshake so that it may be considered immutable. If there's a compelling reason not to, I'll drop the request.
-
sdaftuar commented at 3:13 PM on October 20, 2015: member
Few points from our IRC conversation last week:
Agreed that it would be nice in theory for capabilities like this to be exchanged at the time a connection is initiated (eg by sending in between version and verack). However from discussing with others on IRC, such an approach would be problematic for existing software which doesn't expect anything before a verack, so this seems like a non-starter.
It would also be nice in theory to have a generic "capabilities" message which would include all flags such as this one. However, coordinating a change to an existing message in the future when we wanted to add a new flag would presumably run into similar difficulties as the suggestion to merely add this flag to the version message. And I am not presently aware of any future use case at this time anyway... So my inclination is to continue with the proposal as drafted.
After discussion with @theuni, I added some language to the BIP ("Additional constraints") to make it clear that how implementations choose to support this message can be subject to whatever choices those implementors make. That is, this is completely optional. @gmaxwell Can you assign a BIP number?
- luke-jr added the label New BIP on Oct 21, 2015
- luke-jr assigned gmaxwell on Oct 23, 2015
- luke-jr added the label Needs number assignment on Oct 23, 2015
-
gmaxwell commented at 12:54 AM on October 23, 2015: contributor
- luke-jr removed the label Needs number assignment on Oct 23, 2015
- luke-jr unassigned gmaxwell on Oct 23, 2015
-
sdaftuar commented at 6:34 PM on October 23, 2015: member
Thanks @gmaxwell, updated. Should I also update the README page to include a reference to the BIP as part of this PR?
Also I'm not sure I understand what the criteria is for getting this PR merged. Anything else I should do here (more mailing list notice etc)?
-
New BIP for "sendheaders" p2p message 24fdae2a87
-
Add section on additional constraints c8c6b251eb
-
Update with assigned BIP number (130) 6721b0b1cb
-
Add BIP-130 to README 5f056b5b24
- sdaftuar force-pushed on Oct 23, 2015
-
sdaftuar commented at 6:41 PM on October 23, 2015: member
Rebased and added a commit that updates the README.
- sdaftuar cross-referenced this on Oct 23, 2015 from issue Allow block announcements with headers by sdaftuar
-
gmaxwell commented at 9:11 PM on October 23, 2015: contributor
I'd like it in 0.12.
-
sdaftuar commented at 2:55 PM on November 5, 2015: member
Anything else that needs to be done here?
- luke-jr referenced this in commit 6b201a4d2d on Nov 7, 2015
- luke-jr merged this on Nov 7, 2015
- luke-jr closed this on Nov 7, 2015
- luke-jr cross-referenced this on Nov 7, 2015 from issue BIP 140: Normalized transaction ID by cdecker