Skip to content

Conversation

@mikehearn
Copy link
Contributor

It echoes back a nonce field that is now added to the ping message.

…nonce field that is now added to the ping message.
@sipa
Copy link
Member

sipa commented Mar 11, 2012

I suppose this also requires an increase of the network protocol number.

Looks good to me, otherwise.

@mikehearn
Copy link
Contributor Author

Yes, I was assuming that would happen automatically once 0.7 starts development.

@sipa
Copy link
Member

sipa commented Mar 12, 2012

Since BIP14 was introduced, client versions and network versions are independent. In fact, the network version hasn't changed since.

@TheBlueMatt
Copy link
Contributor

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?

@mikehearn
Copy link
Contributor Author

Yeah the patch is incomplete. I'll add another commit soon. We need to send
a nonce with outbound pings too.
On Mar 12, 2012 11:25 PM, "Matt Corallo" <
[email protected]>
wrote:

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?


Reply to this email directly or view it on GitHub:
#932 (comment)

@mikehearn
Copy link
Contributor Author

How does it look now?

@TheBlueMatt
Copy link
Contributor

Given a post to the mailing list with no significant dissent, ack.

Copy link
Contributor

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...

Copy link
Contributor

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?

@gavinandresen
Copy link
Contributor

ACK for 0.7

@rebroad
Copy link
Contributor

rebroad commented Mar 20, 2012

Not sure if this is the right place to ask, but what exactly is being pinged and by what?

@Diapolo
Copy link

Diapolo commented Mar 20, 2012

Your node by a remote node.

@rebroad
Copy link
Contributor

rebroad commented Mar 20, 2012

How are nodes uniquely identified in order to know how to route the ping?

@Diapolo
Copy link

Diapolo commented Mar 20, 2012

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.

@rebroad
Copy link
Contributor

rebroad commented Mar 20, 2012

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.

@sipa
Copy link
Member

sipa commented Mar 20, 2012

It checks whether the connection is alive.

@Diapolo
Copy link

Diapolo commented Mar 20, 2012

It's a feature, not a bug-fix, so it extends the nodes possibilities to interact with eachother.

@rebroad
Copy link
Contributor

rebroad commented Mar 20, 2012

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?

@sipa
Copy link
Member

sipa commented Mar 20, 2012

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.

@rebroad
Copy link
Contributor

rebroad commented Mar 20, 2012

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.

@jgarzik
Copy link
Contributor

jgarzik commented Apr 10, 2012

ACK, but IMO this needs a BIP

@sipa
Copy link
Member

sipa commented Apr 10, 2012

@jgarzik: agree

@mikehearn
Copy link
Contributor Author

@jgarzik jgarzik mentioned this pull request Apr 11, 2012
@jgarzik
Copy link
Contributor

jgarzik commented Apr 11, 2012

I just created a fork that includes a few minor changes, in pull req #1081:

  1. removes the actual protocol version increment. IMO this should be external to the 'pong message' commit.

and under the principle of making code self-documenting...

  1. use a named constant rather than a magic number for version behavior switching. bitcoin code is too full of magic numbers, and we should resist adding more.
  2. place that constant in sipa's newly minted version.h, as a central location for future version-related constants like this.

@mikehearn
Copy link
Contributor Author

  1. Why should the version increment be in a different change to the actual new functionality? Doesn't that just increase the risk of confusion with people running betas/dev builds? It's a number, incrementing it is cheap :-)

2/3 - sounds good to me.

@gmaxwell gmaxwell closed this May 8, 2012
@sipa
Copy link
Member

sipa commented May 8, 2012

merged as #1081.

dexX7 added a commit to dexX7/bitcoin that referenced this pull request May 14, 2019
906e1d4 Add release notes for Omni Core 0.5.0 (dexX7)
46d0a85 Move 0.4.0 release notes to historical folder (dexX7)
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Oct 30, 2019
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
EricGrill pushed a commit to EricGrill/litecoin that referenced this pull request Jan 14, 2026
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants