Use CTransaction/CBlock version numbers for smoother upgrades #1525

pull gavinandresen wants to merge 20 commits into bitcoin:master from gavinandresen:smoothupgrade changing 21 files +949 −401
  1. gavinandresen commented at 6:16 PM on June 27, 2012: 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.
  2. Show the timestamp for the block.
    wrap lines
    e69a797990
  3. Upgrade to Boost 1.49 on Win32 39471861d5
  4. Fix #956 the Boost 1.49 way. 1d42878adb
  5. Revert "Disable bitcoin: URI handling on Windows for the 0.6 release"
    This reverts commit 7b90edb5a6cada7176012d09d748847b5f966585.
    ad5f29b743
  6. jgarzik commented at 7:53 PM on June 27, 2012: contributor

    ACK changes

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

  7. Work around a distcc bug where -MMD output isn't copied. 4d9c55da72
  8. Remove duplicate GetHash() in ConnectBlock 96929a5515
  9. CTxMemPool: eliminate redundant lock, GetHash() call
    ::addUnchecked()'s only caller already takes the necessary lock,
    and has already calculated the TX's hash.
    f77654a0e9
  10. Merge branch 'buildupdates' of https://github.com/TheBlueMatt/bitcoin 8a05341cf5
  11. Merge pull request #1555 from TheBlueMatt/warnings
    Fix remaining compile warnings.
    fe70b09c42
  12. Rework gettransaction / getblock RPC calls
    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).
    9a6ab7f142
  13. Refactor: SignSignature/VerifyScript
    Minor refactor to support signrawtx signing/verifying transactions
    when it might only have the previous transaction's txid and
    txOut.
    34420d655d
  14. RPCTypeCheck method to make type-checking JSON Arrays easier. 899d373b3c
  15. Implement raw transaction RPC calls
    Implement listunspent / getrawtransaction / createrawtransaction /
    signrawtransaction, to support creation and
    signing-on-multiple-device multisignature transactions.
    a2709fad7f
  16. Merge pull request #1554 from jgarzik/dup-gethash
    Remove duplicate GetHash() in ConnectBlock
    b47d2bc164
  17. Use unsigned ints to fix signed/unsigned warnings dab9fa7f91
  18. Merge branch 'uri' of https://github.com/TheBlueMatt/bitcoin 50fc02d063
  19. bitcoinrpc.cpp: Removed outdated comment
    Fixes #1373
    698b9f3095
  20. Merge pull request #1304 from rebroad/ShowBlockTimestamp
    Show block timestamp
    6e3a1a3742
  21. in src/main.cpp:None in df7ffad8b4 outdated
    1629 | +                ++nUpgraded;
    1630 | +            pindex = pindex->pprev;
    1631 | +        }
    1632 | +        if (nUpgraded > 0)
    1633 | +            printf("SetBestChain: %d of last 100 blocks above version %d\n", nUpgraded, CBlock::CURRENT_VERSION);
    1634 | +        if (nUpgraded > 100/2)
    


    rebroad commented at 7:03 PM on July 2, 2012:

    Why not "50"?

  22. gavinandresen closed this on Jul 6, 2012

  23. Treat non-version-1 transactions as non-standard
    Adds CBlock::CURRENT_VERSION and CTransaction::CURRENT_VERSION
    constants, and makes non-CURRENT_VERSION transactions nonstandard.
    This will help make future upgrades smoother.
    dae3e10a5a
  24. Warn if blockchain majority doesn't match CBlock::CURRENT_VERSION
    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.
    2a919e396d
  25. gavinandresen reopened this on Jul 6, 2012

  26. gavinandresen merged this on Jul 6, 2012
  27. gavinandresen closed this on Jul 6, 2012

  28. suprnurd referenced this in commit 9ce2b966cd on Dec 5, 2017
  29. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me