Skip to content

Conversation

@gavinandresen
Copy link
Contributor

These are planning-ahead changes to make future upgrades smoother. See https://gist.github.com/2355445 for full reasoning.

The two changes in this pull are:

  1. Treat transactions with a version number greater than 1 as non-standard (don't mine or relay them).
  2. Warn the user (via the existing Qt/RPC GetWarnings() mechanism) if the blocks in the blockchain are a new version that this bitcoin doesn't understand.

@jgarzik
Copy link
Contributor

jgarzik commented Jun 27, 2012

ACK changes

However, I think the gist link makes the hard fork process seem easier, more seamless and less damaging than it really is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not "50"?

Matt Corallo and others added 14 commits July 3, 2012 17:50
::addUnchecked()'s only caller already takes the necessary lock,
and has already calculated the TX's hash.
This PULL reworks new (post-0.6.*) features of the
gettransaction/getblock RPC calls as follows:

It removes the 'decompositions' object argument from getblock,
replacing it just a list of transaction hashes; equivalent
(I believe) of passing the {"tx":"hash"} decomposition.

It replaces the 'decompositions' object argument of
gettransaction with a boolean flag; if true, returns
the same stuff that the {"script":"obj"} decomposition
would return (txins/txouts as hex, disassembled, and bitcoin
addresses).

It adds a "rawtx" field to the output of gettransaction,
that is the entire transaction serialized and hex-encoded.

It removes the "size" field from gettransaction, since the size
is trivial to compute from the "rawtx" field (either take the
length after hex-decoding, or just compute it as hex-length/2).
Minor refactor to support signrawtx signing/verifying transactions
when it might only have the previous transaction's txid and
txOut.
Implement listunspent / getrawtransaction / createrawtransaction /
signrawtransaction, to support creation and
signing-on-multiple-device multisignature transactions.
Remove duplicate GetHash() in ConnectBlock
Adds CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION
constants, and makes non-CURRENT_VERSION transactions nonstandard.
This will help make future upgrades smoother.
This adds a warning "this version is obsolete, upgrade required" if
more than 50 of the previous 100 blocks in the blockchain are
a new version.
@gavinandresen gavinandresen reopened this Jul 6, 2012
@gavinandresen gavinandresen merged commit 2a919e3 into bitcoin:master Jul 6, 2012
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
* Rework addnode behaviour

* Use CNode::addeName to track whether a connection to a name is already open
  * A new connection to a previously-connected by-name addednode is only opened when
    the previous one closes (even if the name starts resolving to something else)
  * At most one connection is opened per addednode (even if the name resolves to multiple)
* Unify the code between ThreadOpenAddedNodeConnections and getaddednodeinfo
  * Information about open connections is always returned, and the dns argument becomes a dummy
  * An IP address and inbound/outbound is only reported for the (at most 1) open connection

* Prevent duplicate connections where one is by name and another by ip

* Randomize name lookup result in ConnectSocketByName
@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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants