Skip to content

Conversation

@gavinandresen
Copy link
Contributor

This replaces VERSION with PROTOCOL_VERSION (defined in serialize.h) and CLIENT_VERSION (defined in main.h).

I also define CLIENT_NAME as either "bitcoind" or "bitcoin-qt" in main.h.

The getinfo() RPC command returns CLIENT_VERSION as "version" (same as before) and PROTOCOL_VERSION as "protocolversion" (new).

CLIENT_VERSION is recorded in the wallet.dat as "version".

And PROTOCOL_VERSION is used for all the network serialization stuff.

There is a TODO here related to the CAlert feature, but doing it will require more thought/work. And I've got another change to CAlert (give testnet its own alert keypair) that'll be a good time to change it.

I decided against new command-line arguments / bitcoin.conf options to make it really easy to override the CLIENT_NAME or CLIENT_VERSION reported to peers; those would be easy-to-add-later features.

@jgarzik
Copy link
Contributor

jgarzik commented Dec 17, 2011

IMO, CLIENT_NAME should not vary if/if-not GUI. It's the same network logic. If a problem arises where other network peers must test for a problematic bug, they have twice as many CLIENT_NAMEs to check for one bug. Might be a privacy issue too? Gives attackers obvious server-or-client decision point.

@gavinandresen
Copy link
Contributor Author

CLIENT_NAME is now always "bitcoin-qt"

gavinandresen added a commit that referenced this pull request Dec 19, 2011
Implement BIP 14 : separate protocol version from client version
@gavinandresen gavinandresen merged commit 1f3bc1c into bitcoin:master Dec 19, 2011
coblee referenced this pull request in litecoin-project/litecoin Jul 17, 2012
Implement BIP 14 : separate protocol version from client version
destenson pushed a commit to destenson/bitcoin--bitcoin that referenced this pull request Jun 26, 2016
@rebroad
Copy link
Contributor

rebroad commented Aug 27, 2016

NACK :) It's a great idea when there is only one development team for bitcoin, but in the future I expect to see multiple development teams as part of bitcoin's decentralization, and then there will need to be a more non-linear to nodes communicating their capabilities. Does BIP 9 not already provide the functionality this is hoping to achieve?

@luke-jr
Copy link
Member

luke-jr commented Aug 27, 2016

@rebroad Uh, what are you talking about/doing? This is a change that was made and merged in 2011, and does the opposite of what you seem to be thinking it does...

@rebroad
Copy link
Contributor

rebroad commented Aug 27, 2016

@luke-jr Yes, I realise this is a very old one hence the smiley, but it seems that with various other bitcoin nodes out there, for example, Unlimited are using Protocol Version >80000, which means that Core will assume it provides services such as compact blocks, SegWit, etc when it does not. I am thinking that the PROTOCOL_VERSION ought not to be relied upon as developers are moving away from it for reasons that need to be better understood. I suspect those reasons are that it doesn't suit multiple development teams as it enforces a level of linearity (i.e. all developers are expected to provide functionality before they can bump their version number) but not on a "level playing field". I.e. some developers might not want to add SegWit, but might want to add XThin - what should the protocol version be in that scenario?

@luke-jr
Copy link
Member

luke-jr commented Aug 27, 2016

  1. This isn't used for CB nor XThin.
  2. SegWit is a consensus layer upgrade, and is therefore not optional for full nodes.
  3. There is already (since 2011) a Bitcoin-wide standards process (Bitcoin Improvement Proposals; BIP) for changes to common infrastructure to be coordinated between different development teams.
  4. That said, this incrementing p2p protocol version number is probably growing increasingly useless, and it might make sense to redefine it as a pair of 16-bit version number (with the current usage) and make the remaining into additional service bits. (Someone wishing to work on this should start a discussion on the implementation-independent bitcoin-dev mailing list, and write a BIP.)

destenson pushed a commit to destenson/bitcoin--bitcoin that referenced this pull request Aug 8, 2017
Add clientversion.h to guiutil.cpp
kallewoof pushed a commit to kallewoof/bitcoin that referenced this pull request Oct 4, 2019
…end amount message

9add5a8 Fix feature_pak.py in light of bitcoin#706 (Gregory Sanders)
817ebcd sendtomainchain_pak: Fix minimum send amount message (Gregory Sanders)

Pull request description:

  backport of bitcoin#706

Tree-SHA512: a1f16636210eb28c221a442c113a609da906079b3688dc1dc53e33d0409096638a48036032ba7349257a4d599342272df40dd9335bbc9ac1008c439602a94f8a
rajarshimaitra pushed a commit to rajarshimaitra/bitcoin that referenced this pull request Aug 5, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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.

4 participants