-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Add a pong message that is sent in reply to a ping. #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nonce field that is now added to the ping message.
|
I suppose this also requires an increase of the network protocol number. Looks good to me, otherwise. |
|
Yes, I was assuming that would happen automatically once 0.7 starts development. |
|
Since BIP14 was introduced, client versions and network versions are independent. In fact, the network version hasn't changed since. |
|
Ive always kinda wondered why we have a ping command that doesnt do anything...does this need to be BIPified? It probably needs a version number bump, so I guess? |
|
Yeah the patch is incomplete. I'll add another commit soon. We need to send
|
|
How does it look now? |
|
Given a post to the mailing list with no significant dissent, ack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to increment a full major version...not that it matters, but it seems excessive...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any documentation on PROTOCOL_VERSION I can refer to please? How is this decided and how does it cope with branches?
|
ACK for 0.7 |
|
Not sure if this is the right place to ask, but what exactly is being pinged and by what? |
|
Your node by a remote node. |
|
How are nodes uniquely identified in order to know how to route the ping? |
|
I'm sure it's not like an ICMP ping, but a ping via the normal "message flow" between nodes, so if nodes can talk to eachother this ping would work. I think of it as a heartbeat check-alive signal. |
|
Ok, so if it's not a ping, what is it? Is it a check-still-responding then? What would be the impact/harm of this change not happening? I think the answer to this last question should always be included by default in the description of any pull request, IMHO. |
|
It checks whether the connection is alive. |
|
It's a feature, not a bug-fix, so it extends the nodes possibilities to interact with eachother. |
|
I'm fine with clients having extra functionality added which isn't part of the core bitcoin protocol, but this change confuses me as there's an increase in the protocol number associated with it. I'd understood bitcoin wasn't supposed to be changed in ways that weren't part of the core functionality, i.e. transferring and storing of money/bitcoins, otherwise what is to stop the protocol from becoming taken over by other non-core functionality such as things like torchat, etc (which I'd not be against, but I do think it should be transmitted over a separate protocol so that non-compatible clients don't have to deal with the noise). If it goes away from the core basis of bitcoin, I think it should be bitcoin protocol independant. Based on the "it's a feature, not a bug-fix", is my assumption that it's not core bitcoin functionality correct? |
|
Bitcoin chose to implement its own network layer: the p2p protocol that's part of its functionality. I believe this was worth it, but it also means this layer must work well and be maintained, even if it's not its goal but only a medium to achieve it. As Mike noted, it would be useful to have a ping reply functionality at this layer, and I see no reason to object to it. |
|
Well, I agree that if there's a ping, there ought to be a pong, otherwise, what does the ping alone achieve? I do agree that a connection needs a way to determine if it's still active/operatonal or taking up limited (file descriptors, memory, bandwidth, etc) space with no benefit. If this does that, then I support this change. |
|
ACK, but IMO this needs a BIP |
|
@jgarzik: agree |
|
That seems a little heavy, but alright: https://en.bitcoin.it/wiki/BIP_0031 |
|
I just created a fork that includes a few minor changes, in pull req #1081:
and under the principle of making code self-documenting...
|
2/3 - sounds good to me. |
|
merged as #1081. |
e515b1e [Node] Do all block index writes in a batch (Pieter Wuille) Pull request description: Backport from bitcoin bitcoin#5367 ACKs for commit e515b1: Mrs-X: ACK PIVX-Project@e515b1e furszy: ACK [e515b1e](PIVX-Project@e515b1e) Tree-SHA512: 8eff741bcbe357b7f6af0d1aea627f77498543efd117173ab2b4c325c3bc3ef3e761b6f4ad7cf70379b55daf68724bed2e10fe22a273b0fc1c3009fac8008a60
The line that fixes the issue comes from bitcoin 24104. I gated it with the boost library version as I'm not aware if it would be backward compatible or not. fixes bitcoin#932
It echoes back a nonce field that is now added to the ping message.