From 689746841afd0f2076a7d93d30974c2f7d29cd83 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Mon, 29 Sep 2014 01:00:01 -0400 Subject: [PATCH 01/27] Make CScriptNum() take nMaxNumSize as an argument While the existing numeric opcodes are all limited to 4-byte bignum arguments, new opcodes will need different limits. Rebased-From: 99088d60d8a7747c6d1a7fd5d8cd388be1b3e138 --- src/script/script.h | 7 ++++--- src/test/scriptnum_tests.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/script/script.h b/src/script/script.h index 9c22cb908cfd1..e3af4a6fd9d0c 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -194,7 +194,10 @@ class CScriptNum m_value = n; } - explicit CScriptNum(const std::vector& vch, bool fRequireMinimal) + static const size_t nDefaultMaxNumSize = 4; + + explicit CScriptNum(const std::vector& vch, bool fRequireMinimal, + const size_t nMaxNumSize = nDefaultMaxNumSize) { if (vch.size() > nMaxNumSize) { throw scriptnum_error("script number overflow"); @@ -317,8 +320,6 @@ class CScriptNum return result; } - static const size_t nMaxNumSize = 4; - private: static int64_t set_vch(const std::vector& vch) { diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp index 5621e12729334..2f88b0676668d 100644 --- a/src/test/scriptnum_tests.cpp +++ b/src/test/scriptnum_tests.cpp @@ -142,7 +142,7 @@ static void RunCreate(const int64_t& num) { CheckCreateInt(num); CScriptNum scriptnum(num); - if (scriptnum.getvch().size() <= CScriptNum::nMaxNumSize) + if (scriptnum.getvch().size() <= CScriptNum::nDefaultMaxNumSize) CheckCreateVch(num); else { From 750d54f9510d784c2a502089754241986fb1338a Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Mon, 29 Sep 2014 01:02:59 -0400 Subject: [PATCH 02/27] Move LOCKTIME_THRESHOLD to src/script/script.h Will now be needed by CHECKLOCKTIMEVERIFY code. Rebased-From: 48e9c57cf06352f890eac4285ae022d8746cf3fd --- src/main.h | 2 -- src/script/script.h | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index 9a875a0750f1d..52cc4f38bf308 100644 --- a/src/main.h +++ b/src/main.h @@ -74,8 +74,6 @@ static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ static const int COINBASE_MATURITY = 100; -/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */ -static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC /** Maximum number of script-checking threads allowed */ static const int MAX_SCRIPTCHECK_THREADS = 16; /** -par default (number of script-checking threads, 0 = auto) */ diff --git a/src/script/script.h b/src/script/script.h index e3af4a6fd9d0c..6433d1a766a2f 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -17,6 +17,10 @@ static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes +// Threshold for nLockTime: below this value it is interpreted as block number, +// otherwise as UNIX timestamp. +static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC + template std::vector ToByteVector(const T& in) { From 6d0132520c6944a2f9f0d571e88d7fd57f805c38 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Mon, 29 Sep 2014 03:44:25 -0400 Subject: [PATCH 03/27] Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65) CHECKLOCKTIMEVERIFY -> Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be locked until some block height or block time in the future is reached. Only the logic and unittests are implemented; this commit does not have any actual soft-fork logic in it. Thanks to Pieter Wuille for rebase. Credit goes to Gregory Maxwell for the suggestion of comparing the argument against the transaction nLockTime rather than the current time/blockheight directly. Rebased-From: bc60b2b4b401f0adff5b8b9678903ff8feb5867b --- src/script/interpreter.cpp | 83 +++++++++++++++++++++++++++++++++- src/script/interpreter.h | 12 ++++- src/script/script.h | 1 + src/script/script_error.cpp | 4 ++ src/script/script_error.h | 4 ++ src/test/data/tx_invalid.json | 66 +++++++++++++++++++++++++++ src/test/data/tx_valid.json | 42 +++++++++++++++++ src/test/transaction_tests.cpp | 3 +- 8 files changed, 211 insertions(+), 4 deletions(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 555a16a24347d..2150d014a32f9 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -335,9 +335,51 @@ bool EvalScript(vector >& stack, const CScript& script, un // Control // case OP_NOP: - break; + break; + + case OP_CHECKLOCKTIMEVERIFY: + { + if (!(flags & SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)) { + // not enabled; treat as a NOP2 + if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) { + return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS); + } + break; + } + + if (stack.size() < 1) + return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION); + + // Note that elsewhere numeric opcodes are limited to + // operands in the range -2**31+1 to 2**31-1, however it is + // legal for opcodes to produce results exceeding that + // range. This limitation is implemented by CScriptNum's + // default 4-byte limit. + // + // If we kept to that limit we'd have a year 2038 problem, + // even though the nLockTime field in transactions + // themselves is uint32 which only becomes meaningless + // after the year 2106. + // + // Thus as a special case we tell CScriptNum to accept up + // to 5-byte bignums, which are good until 2**39-1, well + // beyond the 2**32-1 limit of the nLockTime field itself. + const CScriptNum nLockTime(stacktop(-1), fRequireMinimal, 5); + + // In the rare event that the argument may be < 0 due to + // some arithmetic being done first, you can always use + // 0 MAX CHECKLOCKTIMEVERIFY. + if (nLockTime < 0) + return set_error(serror, SCRIPT_ERR_NEGATIVE_LOCKTIME); + + // Actually compare the specified lock time with the transaction. + if (!checker.CheckLockTime(nLockTime)) + return set_error(serror, SCRIPT_ERR_UNSATISFIED_LOCKTIME); + + break; + } - case OP_NOP1: case OP_NOP2: case OP_NOP3: case OP_NOP4: case OP_NOP5: + case OP_NOP1: case OP_NOP3: case OP_NOP4: case OP_NOP5: case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10: { if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) @@ -1083,6 +1125,43 @@ bool TransactionSignatureChecker::CheckSig(const vector& vchSigIn return true; } +bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) const +{ + // There are two times of nLockTime: lock-by-blockheight + // and lock-by-blocktime, distinguished by whether + // nLockTime < LOCKTIME_THRESHOLD. + // + // We want to compare apples to apples, so fail the script + // unless the type of nLockTime being tested is the same as + // the nLockTime in the transaction. + if (!( + (txTo->nLockTime < LOCKTIME_THRESHOLD && nLockTime < LOCKTIME_THRESHOLD) || + (txTo->nLockTime >= LOCKTIME_THRESHOLD && nLockTime >= LOCKTIME_THRESHOLD) + )) + return false; + + // Now that we know we're comparing apples-to-apples, the + // comparison is a simple numeric one. + if (nLockTime > (int64_t)txTo->nLockTime) + return false; + + // Finally the nLockTime feature can be disabled and thus + // CHECKLOCKTIMEVERIFY bypassed if every txin has been + // finalized by setting nSequence to maxint. The + // transaction would be allowed into the blockchain, making + // the opcode ineffective. + // + // Testing if this vin is not final is sufficient to + // prevent this condition. Alternatively we could test all + // inputs, but testing just this input minimizes the data + // required to prove correct CHECKLOCKTIMEVERIFY execution. + if (txTo->vin[nIn].IsFinal()) + return false; + + return true; +} + + bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror) { set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR); diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 83d44a9589598..9f76d69a466d7 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -68,8 +68,12 @@ enum // discouraged NOPs fails the script. This verification flag will never be // a mandatory flag applied to scripts in a block. NOPs that are not // executed, e.g. within an unexecuted IF ENDIF block, are *not* rejected. - SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS = (1U << 7) + SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS = (1U << 7), + // Verify CHECKLOCKTIMEVERIFY + // + // See BIP65 for details. + SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), }; uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType); @@ -82,6 +86,11 @@ class BaseSignatureChecker return false; } + virtual bool CheckLockTime(const CScriptNum& nLockTime) const + { + return false; + } + virtual ~BaseSignatureChecker() {} }; @@ -97,6 +106,7 @@ class TransactionSignatureChecker : public BaseSignatureChecker public: TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {} bool CheckSig(const std::vector& scriptSig, const std::vector& vchPubKey, const CScript& scriptCode) const; + bool CheckLockTime(const CScriptNum& nLockTime) const; }; class MutableTransactionSignatureChecker : public TransactionSignatureChecker diff --git a/src/script/script.h b/src/script/script.h index 6433d1a766a2f..54d98a0786006 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -153,6 +153,7 @@ enum opcodetype // expansion OP_NOP1 = 0xb0, OP_NOP2 = 0xb1, + OP_CHECKLOCKTIMEVERIFY = OP_NOP2, OP_NOP3 = 0xb2, OP_NOP4 = 0xb3, OP_NOP5 = 0xb4, diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp index 5d24ed98ba82d..788d7ff4689b7 100644 --- a/src/script/script_error.cpp +++ b/src/script/script_error.cpp @@ -47,6 +47,10 @@ const char* ScriptErrorString(const ScriptError serror) return "OP_RETURN was encountered"; case SCRIPT_ERR_UNBALANCED_CONDITIONAL: return "Invalid OP_IF construction"; + case SCRIPT_ERR_NEGATIVE_LOCKTIME: + return "Negative locktime"; + case SCRIPT_ERR_UNSATISFIED_LOCKTIME: + return "Locktime requirement not satisfied"; case SCRIPT_ERR_SIG_HASHTYPE: return "Signature hash type missing or not understood"; case SCRIPT_ERR_SIG_DER: diff --git a/src/script/script_error.h b/src/script/script_error.h index 091524f35cb34..7b4c40edaaca5 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -35,6 +35,10 @@ typedef enum ScriptError_t SCRIPT_ERR_INVALID_ALTSTACK_OPERATION, SCRIPT_ERR_UNBALANCED_CONDITIONAL, + /* OP_CHECKLOCKTIMEVERIFY */ + SCRIPT_ERR_NEGATIVE_LOCKTIME, + SCRIPT_ERR_UNSATISFIED_LOCKTIME, + /* BIP62 */ SCRIPT_ERR_SIG_HASHTYPE, SCRIPT_ERR_SIG_DER, diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json index 638a705f9f3c9..a8882430e2923 100644 --- a/src/test/data/tx_invalid.json +++ b/src/test/data/tx_invalid.json @@ -103,5 +103,71 @@ [[["ad503f72c18df5801ee64d76090afe4c607fb2b822e9b7b63c5826c50e22fc3b", 0, "0x21 0x027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5 CHECKSIG NOT"]], "01000000013bfc220ec526583cb6b7e922b8b27f604cfe0a09764de61e80f58dc1723f50ad0000000000ffffffff0101000000000000002321027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5ac00000000", "P2SH"], + +["CHECKLOCKTIMEVERIFY tests"], + +["By-height locks, with argument just beyond tx nLockTime"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "499999999 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000fe64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], + +["By-time locks, with argument just beyond tx nLockTime (but within numerical boundries)"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000001 NOP2 1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000feffffff", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Argument missing"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Argument negative with by-blockheight nLockTime=0"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "-1 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Argument negative with by-blocktime nLockTime=500,000,000"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "-1 NOP2 1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Input locked"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Another input being unlocked isn't sufficient; the CHECKLOCKTIMEVERIFY-using input must be unlocked"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"] , + ["0000000000000000000000000000000000000000000000000000000000000200", 1, "1"]], +"010000000200010000000000000000000000000000000000000000000000000000000000000000000000ffffffff00020000000000000000000000000000000000000000000000000000000000000100000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Argument/tx height/time mismatch, both versions"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "499999999 NOP2 1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000000 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000000 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ff64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Argument 2^32 with nLockTime=2^32-1"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967296 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ffffffff", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Same, but with nLockTime=2^31-1"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ffffff7f", "P2SH,CHECKLOCKTIMEVERIFY"], + +["6 byte non-minimally-encoded arguments are invalid even in their contents are valid"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x06 0x000000000000 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Failure due to failing CHECKLOCKTIMEVERIFY in scriptSig"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000251b1000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Failure due to failing CHECKLOCKTIMEVERIFY in redeemScript"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xc5b93064159b3b2d6ab506a41b1f50463771b988 EQUAL"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000030251b1000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + ["Make diffs cleaner by leaving a comment here without comma at the end"] ] diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json index aa8e5ca6c35a7..ecbce93601b35 100644 --- a/src/test/data/tx_valid.json +++ b/src/test/data/tx_valid.json @@ -178,5 +178,47 @@ "0100000002dbb33bdf185b17f758af243c5d3c6e164cc873f6bb9f40c0677d6e0f8ee5afce000000006b4830450221009627444320dc5ef8d7f68f35010b4c050a6ed0d96b67a84db99fda9c9de58b1e02203e4b4aaa019e012e65d69b487fdf8719df72f488fa91506a80c49a33929f1fd50121022b78b756e2258af13779c1a1f37ea6800259716ca4b7f0b87610e0bf3ab52a01ffffffffdbb33bdf185b17f758af243c5d3c6e164cc873f6bb9f40c0677d6e0f8ee5afce010000009300483045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a5303483045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a5303ffffffff01a0860100000000001976a9149bc0bbdd3024da4d0c38ed1aecf5c68dd1d3fa1288ac00000000", "P2SH"], +["CHECKLOCKTIMEVERIFY tests"], + +["By-height locks, with argument == 0 and == tx nLockTime"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "499999999 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ff64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ff64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], + +["By-time locks, with argument just beyond tx nLockTime (but within numerical boundries)"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000000 NOP2 1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ffffffff", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000000 NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ffffffff", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Any non-maxint nSequence is fine"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000feffffff0100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["The argument can be calculated rather than created directly by a PUSHDATA"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "499999999 1ADD NOP2 1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Perhaps even by an ADD producing a 5-byte result that is out of bounds for other opcodes"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483647 2147483647 ADD NOP2 1"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000feffffff", "P2SH,CHECKLOCKTIMEVERIFY"], + +["5 byte non-minimally-encoded arguments are valid"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x05 0x0000000000 NOP2 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Valid CHECKLOCKTIMEVERIFY in scriptSig"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000251b1000000000100000000000000000001000000", "P2SH,CHECKLOCKTIMEVERIFY"], + +["Valid CHECKLOCKTIMEVERIFY in redeemScript"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xc5b93064159b3b2d6ab506a41b1f50463771b988 EQUAL"]], +"0100000001000100000000000000000000000000000000000000000000000000000000000000000000030251b1000000000100000000000000000001000000", "P2SH,CHECKLOCKTIMEVERIFY"], + ["Make diffs cleaner by leaving a comment here without comma at the end"] ] diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 519ce6c319408..abd33017ed6a7 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -38,7 +38,8 @@ static std::map mapFlagNames = boost::assign::map_list_of (string("SIGPUSHONLY"), (unsigned int)SCRIPT_VERIFY_SIGPUSHONLY) (string("MINIMALDATA"), (unsigned int)SCRIPT_VERIFY_MINIMALDATA) (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY) - (string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS); + (string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) + (string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY); unsigned int ParseScriptFlags(string strFlags) { From 0e01d0f89d4f24eac7c8a21a6779e7956ad13a87 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Wed, 17 Dec 2014 00:31:44 -0500 Subject: [PATCH 04/27] Enable CHECKLOCKTIMEVERIFY as a standard script verify flag Transactions that fail CLTV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CLTV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CLTV for production use. Rebased-From: ffd75adce01a78b3461b3ff05bcc2b530a9ce994 --- src/script/standard.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/standard.h b/src/script/standard.h index 7079574b8c227..d7f023f20828e 100644 --- a/src/script/standard.h +++ b/src/script/standard.h @@ -50,6 +50,7 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY SCRIPT_VERIFY_MINIMALDATA | SCRIPT_VERIFY_NULLDUMMY | SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | + SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | SCRIPT_VERIFY_LOW_S; /** For convenience, standard but not mandatory verify flags. */ From 41372485ce2ebd172ba067d401f24259b014fad5 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Sun, 28 Jun 2015 14:30:50 -0400 Subject: [PATCH 05/27] Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic Based on the earlier BIP66 soft-fork logic implemented by Pieter Wuille's 5a47811da5158df763aa2fca09ce646ee0c51e7b Rebased-From: 287f54fc90c29301faede8d4ac2ea24a91441917 --- src/main.cpp | 14 +++++++++++++- src/primitives/block.h | 2 +- src/script/bitcoinconsensus.h | 7 ++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ce87aef68f8c8..ce3730f16d4eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1698,11 +1698,18 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin unsigned int flags = fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE; - // Start enforcing the DERSIG (BIP66) rules, for block.nVersion=3 blocks, when 75% of the network has upgraded: + // Start enforcing the DERSIG (BIP66) rules, for block.nVersion=3 blocks, + // when 75% of the network has upgraded: if (block.nVersion >= 3 && CBlockIndex::IsSuperMajority(3, pindex->pprev, Params().EnforceBlockUpgradeMajority())) { flags |= SCRIPT_VERIFY_DERSIG; } + // Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4 + // blocks, when 75% of the network has upgraded: + if (block.nVersion >= 4 && CBlockIndex::IsSuperMajority(4, pindex->pprev, Params().EnforceBlockUpgradeMajority())) { + flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY; + } + CBlockUndo blockundo; CCheckQueueControl control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL); @@ -2555,6 +2562,11 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta REJECT_OBSOLETE, "bad-version"); } + // Reject block.nVersion=3 blocks when 95% (75% on testnet) of the network has upgraded: + if (block.nVersion < 4 && CBlockIndex::IsSuperMajority(4, pindexPrev, Params().RejectBlockOutdatedMajority())) + return state.Invalid(error("%s : rejected nVersion=3 block", __func__), + REJECT_OBSOLETE, "bad-version"); + return true; } diff --git a/src/primitives/block.h b/src/primitives/block.h index 9c17902e15ed5..b80d1f8f0ee45 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -24,7 +24,7 @@ class CBlockHeader { public: // header - static const int32_t CURRENT_VERSION=3; + static const int32_t CURRENT_VERSION=4; int32_t nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h index c57d8b3cc597e..70daae85aed88 100644 --- a/src/script/bitcoinconsensus.h +++ b/src/script/bitcoinconsensus.h @@ -44,9 +44,10 @@ typedef enum bitcoinconsensus_error_t /** Script verification flags */ enum { - bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, - bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts - bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance + bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE = 0, + bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts + bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG = (1U << 2), // enforce strict DER (BIP66) compliance + bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), // enable CHECKLOCKTIMEVERIFY (BIP65) }; /// Returns 1 if the input nIn of the serialized transaction pointed to by From 6a1343b47010362e48a36a05227e8b3ddb70ebdf Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Sun, 28 Jun 2015 14:42:17 -0400 Subject: [PATCH 06/27] Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork bip65-cltv.py is based on the earlier BIP66 soft-fork RPC test implemented by Pieter Wuille's 819bcf9b9902319176cdb1d476cacfee9b3727ec bip65-cltv-p2p.py is based on the earlier BIP66 P2P test by Suhas Daftuar's d76412b068d95454732aa3def95decf35251759a Rebased-From: 308257856099e82e91881ba97f741d840184727c --- qa/rpc-tests/bip65-cltv-p2p.py | 175 +++++++++++++++++++++++++++++++++ qa/rpc-tests/bip65-cltv.py | 89 +++++++++++++++++ 2 files changed, 264 insertions(+) create mode 100755 qa/rpc-tests/bip65-cltv-p2p.py create mode 100755 qa/rpc-tests/bip65-cltv.py diff --git a/qa/rpc-tests/bip65-cltv-p2p.py b/qa/rpc-tests/bip65-cltv-p2p.py new file mode 100755 index 0000000000000..944d9dd28d3a6 --- /dev/null +++ b/qa/rpc-tests/bip65-cltv-p2p.py @@ -0,0 +1,175 @@ +#!/usr/bin/env python2 +# +# Distributed under the MIT/X11 software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# + +from test_framework.test_framework import ComparisonTestFramework +from test_framework.util import * +from test_framework.mininode import CTransaction, NetworkThread +from test_framework.blocktools import create_coinbase, create_block +from test_framework.comptool import TestInstance, TestManager +from test_framework.script import CScript, OP_1NEGATE, OP_NOP2, OP_DROP +from binascii import hexlify, unhexlify +import cStringIO +import time + +def cltv_invalidate(tx): + '''Modify the signature in vin 0 of the tx to fail CLTV + + Prepends -1 CLTV DROP in the scriptSig itself. + ''' + tx.vin[0].scriptSig = CScript([OP_1NEGATE, OP_NOP2, OP_DROP] + + list(CScript(tx.vin[0].scriptSig))) + +''' +This test is meant to exercise BIP65 (CHECKLOCKTIMEVERIFY) +Connect to a single node. +Mine 2 (version 3) blocks (save the coinbases for later). +Generate 98 more version 3 blocks, verify the node accepts. +Mine 749 version 4 blocks, verify the node accepts. +Check that the new CLTV rules are not enforced on the 750th version 4 block. +Check that the new CLTV rules are enforced on the 751st version 4 block. +Mine 199 new version blocks. +Mine 1 old-version block. +Mine 1 new version block. +Mine 1 old version block, see that the node rejects. +''' + +class BIP65Test(ComparisonTestFramework): + + def __init__(self): + self.num_nodes = 1 + + def setup_network(self): + # Must set the blockversion for this test + self.nodes = start_nodes(1, self.options.tmpdir, + extra_args=[['-debug', '-whitelist=127.0.0.1', '-blockversion=3']], + binary=[self.options.testbinary]) + + def run_test(self): + test = TestManager(self, self.options.tmpdir) + test.add_all_connections(self.nodes) + NetworkThread().start() # Start up network handling in another thread + test.run() + + def create_transaction(self, node, coinbase, to_address, amount): + from_txid = node.getblock(coinbase)['tx'][0] + inputs = [{ "txid" : from_txid, "vout" : 0}] + outputs = { to_address : amount } + rawtx = node.createrawtransaction(inputs, outputs) + signresult = node.signrawtransaction(rawtx) + tx = CTransaction() + f = cStringIO.StringIO(unhexlify(signresult['hex'])) + tx.deserialize(f) + return tx + + def get_tests(self): + + self.coinbase_blocks = self.nodes[0].setgenerate(True, 2) + self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0) + self.nodeaddress = self.nodes[0].getnewaddress() + self.last_block_time = time.time() + + ''' 98 more version 3 blocks ''' + test_blocks = [] + for i in xrange(98): + block = create_block(self.tip, create_coinbase(2), self.last_block_time + 1) + block.nVersion = 3 + block.rehash() + block.solve() + test_blocks.append([block, True]) + self.last_block_time += 1 + self.tip = block.sha256 + yield TestInstance(test_blocks, sync_every_block=False) + + ''' Mine 749 version 4 blocks ''' + test_blocks = [] + for i in xrange(749): + block = create_block(self.tip, create_coinbase(2), self.last_block_time + 1) + block.nVersion = 4 + block.rehash() + block.solve() + test_blocks.append([block, True]) + self.last_block_time += 1 + self.tip = block.sha256 + yield TestInstance(test_blocks, sync_every_block=False) + + ''' + Check that the new CLTV rules are not enforced in the 750th + version 3 block. + ''' + spendtx = self.create_transaction(self.nodes[0], + self.coinbase_blocks[0], self.nodeaddress, 1.0) + cltv_invalidate(spendtx) + spendtx.rehash() + + block = create_block(self.tip, create_coinbase(2), self.last_block_time + 1) + block.nVersion = 4 + block.vtx.append(spendtx) + block.hashMerkleRoot = block.calc_merkle_root() + block.rehash() + block.solve() + + self.last_block_time += 1 + self.tip = block.sha256 + yield TestInstance([[block, True]]) + + ''' + Check that the new CLTV rules are enforced in the 751st version 4 + block. + ''' + spendtx = self.create_transaction(self.nodes[0], + self.coinbase_blocks[1], self.nodeaddress, 1.0) + cltv_invalidate(spendtx) + spendtx.rehash() + + block = create_block(self.tip, create_coinbase(1), self.last_block_time + 1) + block.nVersion = 4 + block.vtx.append(spendtx) + block.hashMerkleRoot = block.calc_merkle_root() + block.rehash() + block.solve() + self.last_block_time += 1 + yield TestInstance([[block, False]]) + + ''' Mine 199 new version blocks on last valid tip ''' + test_blocks = [] + for i in xrange(199): + block = create_block(self.tip, create_coinbase(1), self.last_block_time + 1) + block.nVersion = 4 + block.rehash() + block.solve() + test_blocks.append([block, True]) + self.last_block_time += 1 + self.tip = block.sha256 + yield TestInstance(test_blocks, sync_every_block=False) + + ''' Mine 1 old version block ''' + block = create_block(self.tip, create_coinbase(1), self.last_block_time + 1) + block.nVersion = 3 + block.rehash() + block.solve() + self.last_block_time += 1 + self.tip = block.sha256 + yield TestInstance([[block, True]]) + + ''' Mine 1 new version block ''' + block = create_block(self.tip, create_coinbase(1), self.last_block_time + 1) + block.nVersion = 4 + block.rehash() + block.solve() + self.last_block_time += 1 + self.tip = block.sha256 + yield TestInstance([[block, True]]) + + ''' Mine 1 old version block, should be invalid ''' + block = create_block(self.tip, create_coinbase(1), self.last_block_time + 1) + block.nVersion = 3 + block.rehash() + block.solve() + self.last_block_time += 1 + yield TestInstance([[block, False]]) + +if __name__ == '__main__': + BIP65Test().main() diff --git a/qa/rpc-tests/bip65-cltv.py b/qa/rpc-tests/bip65-cltv.py new file mode 100755 index 0000000000000..e009c1c986962 --- /dev/null +++ b/qa/rpc-tests/bip65-cltv.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python2 +# Copyright (c) 2015 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +# +# Test the CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic +# + +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * +import os +import shutil + +class BIP65Test(BitcoinTestFramework): + + def setup_network(self): + self.nodes = [] + self.nodes.append(start_node(0, self.options.tmpdir, [])) + self.nodes.append(start_node(1, self.options.tmpdir, ["-blockversion=3"])) + self.nodes.append(start_node(2, self.options.tmpdir, ["-blockversion=4"])) + connect_nodes(self.nodes[1], 0) + connect_nodes(self.nodes[2], 0) + self.is_network_split = False + self.sync_all() + + def run_test(self): + cnt = self.nodes[0].getblockcount() + + # Mine some old-version blocks + self.nodes[1].setgenerate(True, 100) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 100): + raise AssertionError("Failed to mine 100 version=3 blocks") + + # Mine 750 new-version blocks + for i in xrange(15): + self.nodes[2].setgenerate(True, 50) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 850): + raise AssertionError("Failed to mine 750 version=4 blocks") + + # TODO: check that new CHECKLOCKTIMEVERIFY rules are not enforced + + # Mine 1 new-version block + self.nodes[2].setgenerate(True, 1) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 851): + raise AssertionFailure("Failed to mine a version=4 blocks") + + # TODO: check that new CHECKLOCKTIMEVERIFY rules are enforced + + # Mine 198 new-version blocks + for i in xrange(2): + self.nodes[2].setgenerate(True, 99) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 1049): + raise AssertionError("Failed to mine 198 version=4 blocks") + + # Mine 1 old-version block + self.nodes[1].setgenerate(True, 1) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 1050): + raise AssertionError("Failed to mine a version=3 block after 949 version=4 blocks") + + # Mine 1 new-version blocks + self.nodes[2].setgenerate(True, 1) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 1051): + raise AssertionError("Failed to mine a version=4 block") + + # Mine 1 old-version blocks + try: + self.nodes[1].setgenerate(True, 1) + raise AssertionError("Succeeded to mine a version=3 block after 950 version=4 blocks") + except JSONRPCException: + pass + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 1051): + raise AssertionError("Accepted a version=3 block after 950 version=4 blocks") + + # Mine 1 new-version blocks + self.nodes[2].setgenerate(True, 1) + self.sync_all() + if (self.nodes[0].getblockcount() != cnt + 1052): + raise AssertionError("Failed to mine a version=4 block") + +if __name__ == '__main__': + BIP65Test().main() From 5dc72f8bb0bf5447227aaf5da5fc6e0969e96bdb Mon Sep 17 00:00:00 2001 From: Esteban Ordano Date: Thu, 2 Jul 2015 18:38:34 -0700 Subject: [PATCH 07/27] CLTV: Add more tests to improve coverage Four cases included: * The CLTV operand type mismatches the tx locktime. In the script it is 1 (interpreted as block height), but in the tx is 500000000 (interpreted as date) * The stack is empty when executing OP_CLTV * The tx is final by having only one input with MAX_INT sequence number * The operand for CLTV is negative (after OP_0 OP_1 OP_SUB) Rebased-From: cb54d17355864fa08826d6511a0d7692b21ef2c9 --- src/test/data/tx_invalid.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json index a8882430e2923..a197e301cb4ce 100644 --- a/src/test/data/tx_invalid.json +++ b/src/test/data/tx_invalid.json @@ -121,6 +121,8 @@ ["Argument missing"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "NOP2 1"]], "010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000001b1010000000100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], ["Argument negative with by-blockheight nLockTime=0"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "-1 NOP2 1"]], @@ -129,10 +131,14 @@ ["Argument negative with by-blocktime nLockTime=500,000,000"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "-1 NOP2 1"]], "01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000004005194b1010000000100000000000000000002000000", "P2SH,CHECKLOCKTIMEVERIFY"], ["Input locked"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], "010000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000251b1ffffffff0100000000000000000002000000", "P2SH,CHECKLOCKTIMEVERIFY"], ["Another input being unlocked isn't sufficient; the CHECKLOCKTIMEVERIFY-using input must be unlocked"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"] , @@ -142,6 +148,8 @@ ["Argument/tx height/time mismatch, both versions"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP2 1"]], "01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0"]], +"01000000010001000000000000000000000000000000000000000000000000000000000000000000000251b100000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "499999999 NOP2 1"]], "01000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000065cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "500000000 NOP2 1"]], From fb818b6be42f9b324e0008b6b9940b3b820a13a2 Mon Sep 17 00:00:00 2001 From: Micha Date: Wed, 14 Oct 2015 23:46:09 +0300 Subject: [PATCH 08/27] Bring historical release notes up to date [skip ci] --- doc/release-notes/release-notes-0.10.1.md | 143 +++++++++++++++++++ doc/release-notes/release-notes-0.10.2.md | 86 +++++++++++ doc/release-notes/release-notes-0.10.3.md | 165 ++++++++++++++++++++++ doc/release-notes/release-notes-0.9.5.md | 60 ++++++++ 4 files changed, 454 insertions(+) create mode 100644 doc/release-notes/release-notes-0.10.1.md create mode 100644 doc/release-notes/release-notes-0.10.2.md create mode 100644 doc/release-notes/release-notes-0.10.3.md create mode 100644 doc/release-notes/release-notes-0.9.5.md diff --git a/doc/release-notes/release-notes-0.10.1.md b/doc/release-notes/release-notes-0.10.1.md new file mode 100644 index 0000000000000..8f59f1f68c690 --- /dev/null +++ b/doc/release-notes/release-notes-0.10.1.md @@ -0,0 +1,143 @@ +Bitcoin Core version 0.10.1 is now available from: + + + +This is a new minor version release, bringing bug fixes and translation +updates. It is recommended to upgrade to this version. + +Please report bugs using the issue tracker at github: + + + +Upgrading and downgrading +========================= + +How to Upgrade +-------------- + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or +bitcoind/bitcoin-qt (on Linux). + +Downgrade warning +------------------ + +Because release 0.10.0 and later makes use of headers-first synchronization and +parallel block download (see further), the block files and databases are not +backwards-compatible with pre-0.10 versions of Bitcoin Core or other software: + +* Blocks will be stored on disk out of order (in the order they are +received, really), which makes it incompatible with some tools or +other programs. Reindexing using earlier versions will also not work +anymore as a result of this. + +* The block index database will now hold headers for which no block is +stored on disk, which earlier versions won't support. + +If you want to be able to downgrade smoothly, make a backup of your entire data +directory. Without this your node will need start syncing (or importing from +bootstrap.dat) anew afterwards. It is possible that the data from a completely +synchronised 0.10 node may be usable in older versions as-is, but this is not +supported and may break as soon as the older version attempts to reindex. + +This does not affect wallet forward or backward compatibility. + +Notable changes +=============== + +This is a minor release and hence there are no notable changes. +For the notable changes in 0.10, refer to the release notes for the +0.10.0 release at https://github.com/bitcoin/bitcoin/blob/v0.10.0/doc/release-notes.md + +0.10.1 Change log +================= + +Detailed release notes follow. This overview includes changes that affect external +behavior, not code moves, refactors or string updates. + +RPC: +- `7f502be` fix crash: createmultisig and addmultisigaddress +- `eae305f` Fix missing lock in submitblock + +Block (database) and transaction handling: +- `1d2cdd2` Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates +- `c91c660` fix InvalidateBlock to repopulate setBlockIndexCandidates +- `002c8a2` fix possible block db breakage during re-index +- `a1f425b` Add (optional) consistency check for the block chain data structures +- `1c62e84` Keep mempool consistent during block-reorgs +- `57d1f46` Fix CheckBlockIndex for reindex +- `bac6fca` Set nSequenceId when a block is fully linked + +P2P protocol and network code: +- `78f64ef` don't trickle for whitelisted nodes +- `ca301bf` Reduce fingerprinting through timestamps in 'addr' messages. +- `200f293` Ignore getaddr messages on Outbound connections. +- `d5d8998` Limit message sizes before transfer +- `aeb9279` Better fingerprinting protection for non-main-chain getdatas. +- `cf0218f` Make addrman's bucket placement deterministic (countermeasure 1 against eclipse attacks, see http://cs-people.bu.edu/heilman/eclipse/) +- `0c6f334` Always use a 50% chance to choose between tried and new entries (countermeasure 2 against eclipse attacks) +- `214154e` Do not bias outgoing connections towards fresh addresses (countermeasure 2 against eclipse attacks) +- `aa587d4` Scale up addrman (countermeasure 6 against eclipse attacks) +- `139cd81` Cap nAttempts penalty at 8 and switch to pow instead of a division loop + +Validation: +- `d148f62` Acquire CCheckQueue's lock to avoid race condition + +Build system: +- `8752b5c` 0.10 fix for crashes on OSX 10.6 + +Wallet: +- N/A + +GUI: +- `2c08406` some mac specifiy cleanup (memory handling, unnecessary code) +- `81145a6` fix OSX dock icon window reopening +- `786cf72` fix a issue where "command line options"-action overwrite "Preference"-action (on OSX) + +Tests: +- `1117378` add RPC test for InvalidateBlock + +Miscellaneous: +- `c9e022b` Initialization: set Boost path locale in main thread +- `23126a0` Sanitize command strings before logging them. +- `323de27` Initialization: setup environment before starting Qt tests +- `7494e09` Initialization: setup environment before starting tests +- `df45564` Initialization: set fallback locale as environment variable + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- Alex Morcos +- Cory Fields +- dexX7 +- fsb4000 +- Gavin Andresen +- Gregory Maxwell +- Ivan Pustogarov +- Jonas Schnelli +- Matt Corallo +- mrbandrews +- Pieter Wuille +- Ruben de Vries +- Suhas Daftuar +- Wladimir J. van der Laan + +And all those who contributed additional code review and/or security research: +- 21E14 +- Alison Kendler +- Aviv Zohar +- Ethan Heilman +- Evil-Knievel +- fanquake +- Jeff Garzik +- Jonas Nick +- Luke Dashjr +- Patrick Strateman +- Philip Kaufmann +- Sergio Demian Lerner +- Sharon Goldberg + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). diff --git a/doc/release-notes/release-notes-0.10.2.md b/doc/release-notes/release-notes-0.10.2.md new file mode 100644 index 0000000000000..192ed69d29981 --- /dev/null +++ b/doc/release-notes/release-notes-0.10.2.md @@ -0,0 +1,86 @@ +Bitcoin Core version 0.10.2 is now available from: + + + +This is a new minor version release, bringing minor bug fixes and translation +updates. It is recommended to upgrade to this version. + +Please report bugs using the issue tracker at github: + + + +Upgrading and downgrading +========================= + +How to Upgrade +-------------- + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or +bitcoind/bitcoin-qt (on Linux). + +Downgrade warning +------------------ + +Because release 0.10.0 and later makes use of headers-first synchronization and +parallel block download (see further), the block files and databases are not +backwards-compatible with pre-0.10 versions of Bitcoin Core or other software: + +* Blocks will be stored on disk out of order (in the order they are +received, really), which makes it incompatible with some tools or +other programs. Reindexing using earlier versions will also not work +anymore as a result of this. + +* The block index database will now hold headers for which no block is +stored on disk, which earlier versions won't support. + +If you want to be able to downgrade smoothly, make a backup of your entire data +directory. Without this your node will need start syncing (or importing from +bootstrap.dat) anew afterwards. It is possible that the data from a completely +synchronised 0.10 node may be usable in older versions as-is, but this is not +supported and may break as soon as the older version attempts to reindex. + +This does not affect wallet forward or backward compatibility. + +Notable changes +=============== + +This fixes a serious problem on Windows with data directories that have non-ASCII +characters (https://github.com/bitcoin/bitcoin/issues/6078). + +For other platforms there are no notable changes. + +For the notable changes in 0.10, refer to the release notes +at https://github.com/bitcoin/bitcoin/blob/v0.10.0/doc/release-notes.md + +0.10.2 Change log +================= + +Detailed release notes follow. This overview includes changes that affect external +behavior, not code moves, refactors or string updates. + +Wallet: +- `824c011` fix boost::get usage with boost 1.58 + +Miscellaneous: +- `da65606` Avoid crash on start in TestBlockValidity with gen=1. +- `424ae66` don't imbue boost::filesystem::path with locale "C" on windows (fixes #6078) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- Cory Fields +- Gregory Maxwell +- Jonas Schnelli +- Wladimir J. van der Laan + +And all those who contributed additional code review and/or security research: + +- dexX7 +- Pieter Wuille +- vayvanne + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). diff --git a/doc/release-notes/release-notes-0.10.3.md b/doc/release-notes/release-notes-0.10.3.md new file mode 100644 index 0000000000000..8a110e562c453 --- /dev/null +++ b/doc/release-notes/release-notes-0.10.3.md @@ -0,0 +1,165 @@ +Bitcoin Core version 0.10.3 is now available from: + + + +This is a new minor version release, bringing security fixes and translation +updates. It is recommended to upgrade to this version as soon as possible. + +Please report bugs using the issue tracker at github: + + + +Upgrading and downgrading +========================= + +How to Upgrade +-------------- + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or +bitcoind/bitcoin-qt (on Linux). + +Downgrade warning +------------------ + +Because release 0.10.0 and later makes use of headers-first synchronization and +parallel block download (see further), the block files and databases are not +backwards-compatible with pre-0.10 versions of Bitcoin Core or other software: + +* Blocks will be stored on disk out of order (in the order they are +received, really), which makes it incompatible with some tools or +other programs. Reindexing using earlier versions will also not work +anymore as a result of this. + +* The block index database will now hold headers for which no block is +stored on disk, which earlier versions won't support. + +If you want to be able to downgrade smoothly, make a backup of your entire data +directory. Without this your node will need start syncing (or importing from +bootstrap.dat) anew afterwards. It is possible that the data from a completely +synchronised 0.10 node may be usable in older versions as-is, but this is not +supported and may break as soon as the older version attempts to reindex. + +This does not affect wallet forward or backward compatibility. + +Notable changes +=============== + +Fix buffer overflow in bundled upnp +------------------------------------ + +Bundled miniupnpc was updated to 1.9.20151008. This fixes a buffer overflow in +the XML parser during initial network discovery. + +Details can be found here: http://talosintel.com/reports/TALOS-2015-0035/ + +This applies to the distributed executables only, not when building from source or +using distribution provided packages. + +Additionally, upnp has been disabled by default. This may result in a lower +number of reachable nodes on IPv4, however this prevents future libupnpc +vulnerabilities from being a structural risk to the network +(see https://github.com/bitcoin/bitcoin/pull/6795). + +Test for LowS signatures before relaying +----------------------------------------- + +Make the node require the canonical 'low-s' encoding for ECDSA signatures when +relaying or mining. This removes a nuisance malleability vector. + +Consensus behavior is unchanged. + +If widely deployed this change would eliminate the last remaining known vector +for nuisance malleability on SIGHASH_ALL P2PKH transactions. On the down-side +it will block most transactions made by sufficiently out of date software. + +Unlike the other avenues to change txids on transactions this +one was randomly violated by all deployed bitcoin software prior to +its discovery. So, while other malleability vectors where made +non-standard as soon as they were discovered, this one has remained +permitted. Even BIP62 did not propose applying this rule to +old version transactions, but conforming implementations have become +much more common since BIP62 was initially written. + +Bitcoin Core has produced compatible signatures since a28fb70e in +September 2013, but this didn't make it into a release until 0.9 +in March 2014; Bitcoinj has done so for a similar span of time. +Bitcoinjs and electrum have been more recently updated. + +This does not replace the need for BIP62 or similar, as miners can +still cooperate to break transactions. Nor does it replace the +need for wallet software to handle malleability sanely[1]. This +only eliminates the cheap and irritating DOS attack. + +[1] On the Malleability of Bitcoin Transactions +Marcin Andrychowicz, Stefan Dziembowski, Daniel Malinowski, Łukasz Mazurek +http://fc15.ifca.ai/preproceedings/bitcoin/paper_9.pdf + +Minimum relay fee default increase +----------------------------------- + +The default for the `-minrelaytxfee` setting has been increased from `0.00001` +to `0.00005`. + +This is necessitated by the current transaction flooding, causing +outrageous memory usage on nodes due to the mempool ballooning. This is a +temporary measure, bridging the time until a dynamic method for determining +this fee is merged (which will be in 0.12). + +(see https://github.com/bitcoin/bitcoin/pull/6793, as well as the 0.11.0 +release notes, in which this value was suggested) + +0.10.3 Change log +================= + +Detailed release notes follow. This overview includes changes that affect external +behavior, not code moves, refactors or string updates. + +- #6186 `e4a7d51` Fix two problems in CSubnet parsing +- #6153 `ebd7d8d` Parameter interaction: disable upnp if -proxy set +- #6203 `ecc96f5` Remove P2SH coinbase flag, no longer interesting +- #6226 `181771b` json: fail read_string if string contains trailing garbage +- #6244 `09334e0` configure: Detect (and reject) LibreSSL +- #6276 `0fd8464` Fix getbalance * 0 +- #6274 `be64204` Add option `-alerts` to opt out of alert system +- #6319 `3f55638` doc: update mailing list address +- #6438 `7e66e9c` openssl: avoid config file load/race +- #6439 `255eced` Updated URL location of netinstall for Debian +- #6412 `0739e6e` Test whether created sockets are select()able +- #6694 `f696ea1` [QT] fix thin space word wrap line brake issue +- #6704 `743cc9e` Backport bugfixes to 0.10 +- #6769 `1cea6b0` Test LowS in standardness, removes nuisance malleability vector. +- #6789 `093d7b5` Update miniupnpc to 1.9.20151008 +- #6795 `f2778e0` net: Disable upnp by default +- #6797 `91ef4d9` Do not store more than 200 timedata samples +- #6793 `842c48d` Bump minrelaytxfee default + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- Adam Weiss +- Alex Morcos +- Casey Rodarmor +- Cory Fields +- fanquake +- Gregory Maxwell +- Jonas Schnelli +- J Ross Nicoll +- Luke Dashjr +- Pavel Vasin +- Pieter Wuille +- randy-waterhouse +- ฿tcDrak +- Tom Harding +- Veres Lajos +- Wladimir J. van der Laan + +And all those who contributed additional code review and/or security research: + +- timothy on IRC for reporting the issue +- Vulnerability in miniupnp discovered by Aleksandar Nikolic of Cisco Talos + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). diff --git a/doc/release-notes/release-notes-0.9.5.md b/doc/release-notes/release-notes-0.9.5.md new file mode 100644 index 0000000000000..bed0af9879bf4 --- /dev/null +++ b/doc/release-notes/release-notes-0.9.5.md @@ -0,0 +1,60 @@ +Bitcoin Core version 0.9.5 is now available from: + + https://bitcoin.org/bin/0.9.5/ + +This is a new minor version release, with the goal of backporting BIP66. There +are also a few bug fixes and updated translations. Upgrading to this release is +recommended. + +Please report bugs using the issue tracker at github: + + https://github.com/bitcoin/bitcoin/issues + +How to Upgrade +=============== + +If you are running an older version, shut it down. Wait until it has completely +shut down (which might take a few minutes for older versions), then run the +installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or +bitcoind/bitcoin-qt (on Linux). + +Notable changes +================ + +Mining and relay policy enhancements +------------------------------------ + +Bitcoin Core's block templates are now for version 3 blocks only, and any mining +software relying on its `getblocktemplate` must be updated in parallel to use +libblkmaker either version 0.4.2 or any version from 0.5.1 onward. +If you are solo mining, this will affect you the moment you upgrade Bitcoin +Core, which must be done prior to BIP66 achieving its 951/1001 status. +If you are mining with the stratum mining protocol: this does not affect you. +If you are mining with the getblocktemplate protocol to a pool: this will affect +you at the pool operator's discretion, which must be no later than BIP66 +achieving its 951/1001 status. + +0.9.5 changelog +================ + +- `74f29c2` Check pindexBestForkBase for null +- `9cd1dd9` Fix priority calculation in CreateTransaction +- `6b4163b` Sanitize command strings before logging them. +- `3230b32` Raise version of created blocks, and enforce DERSIG in mempool +- `989d499` Backport of some of BIP66's tests +- `ab03660` Implement BIP 66 validation rules and switchover logic +- `8438074` build: fix dynamic boost check when --with-boost= is used + +Credits +-------- + +Thanks to who contributed to this release, at least: + +- 21E14 +- Alex Morcos +- Cory Fields +- Gregory Maxwell +- Pieter Wuille +- Wladimir J. van der Laan + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 0b3fd07fd24a96b205d4f85d00157d5f115fad9e Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 19 Oct 2015 12:03:04 +0200 Subject: [PATCH 09/27] build: make sure OpenSSL heeds noexecstack This passes `-Wa,--noexecstack` to the assembler when building platform-specific assembly files, to signal that a non-executable stack can be used. This is the same approach as used by Debian (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=430583) Rebased-From: bfcdc21a5da25ec1aa4aecc4cd8960dfa1c11781 Github-Pull: #6852 --- depends/packages/openssl.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk index eb4779410bf2a..492994b715739 100644 --- a/depends/packages/openssl.mk +++ b/depends/packages/openssl.mk @@ -10,7 +10,7 @@ $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/o $(package)_config_opts+=no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2 $(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl2 no-ssl3 $(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags) -$(package)_config_opts_linux=-fPIC +$(package)_config_opts_linux=-fPIC -Wa,--noexecstack $(package)_config_opts_x86_64_linux=linux-x86_64 $(package)_config_opts_i686_linux=linux-generic32 $(package)_config_opts_arm_linux=linux-generic32 From 5297194bbd6e0d6730515567248caf9c135e296c Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Wed, 21 Oct 2015 23:52:29 +0000 Subject: [PATCH 10/27] Set TCP_NODELAY on P2P sockets. Nagle appears to be a significant contributor to latency now that the static sleeps are gone. Most of our messages are relatively large compared to IP + TCP so I do not expect this to create enormous overhead. This may also reduce traffic burstyness somewhat. Conflicts: src/net.cpp Rebased-From: a4e28b3d1e5c95eb0c87f144851cd65048c3e0bc Github-Pull: #6867 --- src/compat.h | 1 + src/net.cpp | 12 ++++++++++++ src/netbase.cpp | 9 ++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/compat.h b/src/compat.h index e08e348ed847e..651e641daa0e8 100644 --- a/src/compat.h +++ b/src/compat.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/src/net.cpp b/src/net.cpp index 375c00308c8a5..0fe52556a8d01 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -894,6 +894,15 @@ void ThreadSocketHandler() } else { + // According to the internet TCP_NODELAY is not carried into accepted sockets + // on all platforms. Set it again here just to be sure. + int set = 1; +#ifdef WIN32 + setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&set, sizeof(int)); +#else + setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&set, sizeof(int)); +#endif + CNode* pnode = new CNode(hSocket, addr, "", true); pnode->AddRef(); pnode->fWhitelisted = whitelisted; @@ -1530,8 +1539,11 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste // Allow binding if the port is still in TIME_WAIT state after // the program was closed and restarted. setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int)); + // Disable Nagle's algorithm + setsockopt(hListenSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&nOne, sizeof(int)); #else setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&nOne, sizeof(int)); + setsockopt(hListenSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&nOne, sizeof(int)); #endif // Set to non-blocking, incoming connections will also inherit this diff --git a/src/netbase.cpp b/src/netbase.cpp index ca864104c0468..0b38e4dba5726 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -407,12 +407,19 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe if (hSocket == INVALID_SOCKET) return false; -#ifdef SO_NOSIGPIPE int set = 1; +#ifdef SO_NOSIGPIPE // Different way of disabling SIGPIPE on BSD setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int)); #endif + //Disable Nagle's algorithm +#ifdef WIN32 + setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (const char*)&set, sizeof(int)); +#else + setsockopt(hSocket, IPPROTO_TCP, TCP_NODELAY, (void*)&set, sizeof(int)); +#endif + // Set to non-blocking if (!SetSocketNonBlocking(hSocket, true)) return error("ConnectSocketDirectly: Setting socket to non-blocking failed, error %s\n", NetworkErrorString(WSAGetLastError())); From 72a0adfb3c364173d28bab03bf46349ab696c107 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sun, 1 Nov 2015 16:28:02 +0100 Subject: [PATCH 11/27] qt: Final translations update on 0.10 branch Translations for 0.12 have been opened, translations for 0.10 have been closed. --- src/qt/locale/bitcoin_de.ts | 4 + src/qt/locale/bitcoin_fr.ts | 12 ++ src/qt/locale/bitcoin_hu.ts | 180 +++++++++++++++++- src/qt/locale/bitcoin_lv_LV.ts | 18 +- src/qt/locale/bitcoin_pt_BR.ts | 16 ++ src/qt/locale/bitcoin_ru.ts | 48 +++++ src/qt/locale/bitcoin_sl_SI.ts | 10 +- src/qt/locale/bitcoin_uz@Cyrl.ts | 302 ++++++++++++++++++++++++++++++- 8 files changed, 575 insertions(+), 15 deletions(-) diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index f2cb3be9a9050..3f0c0241522e2 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -3233,6 +3233,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com Randomly fuzz 1 of every <n> network messages Zufällig eine von <n> Netzwerknachrichten verwürfeln + + Receive and display P2P network alerts (default: %u) + P2P-Netzwerk-Alarme empfangen und anzeigen (Standard: %u) + Send trace/debug info to console instead of debug.log file Rückverfolgungs- und Debuginformationen an die Konsole senden, anstatt sie in debug.log zu schreiben diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index 2d1644e59aa80..40500fb5d8ae9 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -1988,6 +1988,10 @@ Adresse : %4 Copy change Copier la monnaie + + Total Amount %1<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span> + Montant total %1<span style='font-size:10pt;font-weight:normal;'><br />(=%2)</span> + or ou @@ -3150,6 +3154,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com Error reading from database, shutting down. Erreur de lecture de la base de données, fermeture en cours. + + Error: A fatal internal error occurred, see debug.log for details + Erreur : une erreur interne fatale s'est produite. Voir debug.log pour plus de détails + Error: Unsupported argument -tor found, use -onion. Erreur : argument non pris en charge -tor trouvé, utiliser -onion. @@ -3218,6 +3226,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com Randomly fuzz 1 of every <n> network messages Tester aléatoirement 1 message du réseau sur <n> + + Receive and display P2P network alerts (default: %u) + Recevoir et afficher les alertes du réseau poste à poste (%u par défaut) + Send trace/debug info to console instead of debug.log file Envoyer les informations de débogage/trace à la console au lieu du fichier debug.log diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts index 0906b0cd95e9e..8c347b6ffddff 100644 --- a/src/qt/locale/bitcoin_hu.ts +++ b/src/qt/locale/bitcoin_hu.ts @@ -520,6 +520,10 @@ Cím: %4 CoinControlDialog + + Coin Selection + Érme Választás + Quantity: Mennyiség: @@ -568,6 +572,14 @@ Cím: %4 Amount Összeg + + Received with label + Címkével érkezett + + + Received with address + Címmel érkezett + Date Dátum @@ -935,6 +947,10 @@ Cím: %4 &Start Bitcoin on system login &Induljon el a számítógép bekapcsolásakor + + Size of &database cache + A&datbázis gyorsítótár mérete + MB MB @@ -963,6 +979,10 @@ Cím: %4 &Network &Hálózat + + W&allet + T&árca + Expert szakértő @@ -1070,6 +1090,10 @@ Cím: %4 The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet. A kijelzett információ lehet, hogy elavult. A pénztárcája automatikusan szinkronizálja magát a Bitcoin hálózattal miután a kapcsolat létrejön, de ez e folyamat még nem fejeződött be. + + Watch-only: + Csak megfigyelés + Available: Elérhető: @@ -1094,6 +1118,10 @@ Cím: %4 Mined balance that has not yet matured Bányászott egyenleg amely még nem érett be. + + Balances + Egyenlegek + Total: Összesen: @@ -1132,6 +1160,10 @@ Cím: %4 User Agent User Agent + + Address/Hostname + Cím/Hosztnév + Ping Time Ping idő @@ -1143,6 +1175,10 @@ Cím: %4 Amount Összeg + + Enter a Bitcoin address (e.g. %1) + Ad meg egy Bitcoin címet (pl: %1) + %1 d %1 n @@ -1163,11 +1199,23 @@ Cím: %4 NETWORK HÁLÓZAT + + UNKNOWN + ISMERETLEN + + + None + Semmi + N/A Nem elérhető - + + %1 ms + %1 ms + + QRImageWidget @@ -1217,6 +1265,10 @@ Cím: %4 Using OpenSSL version Használt OpenSSL verzió + + Using BerkeleyDB version + Használt BerkeleyDB verzió + Startup time Bekapcsolás ideje @@ -1253,6 +1305,10 @@ Cím: %4 &Peers &Peerek + + Select a peer to view detailed information. + Peer kijelölése a részletes információkért + Version Verzió @@ -1265,6 +1321,10 @@ Cím: %4 Services Szolgáltatások + + Connection Time + Csatlakozás ideje + Last Send Legutóbb küldött @@ -1301,6 +1361,10 @@ Cím: %4 &Network Traffic &Hálózati forgalom + + &Clear + &Törlés + Totals Összesen: @@ -1353,17 +1417,37 @@ Cím: %4 %1 GB %1 GB + + via %1 + által %1 + never soha + + Inbound + Bejövő + + + Outbound + Kimenő + Unknown Ismeretlen - + + Fetching... + Begyüjtés + + ReceiveCoinsDialog + + &Amount: + &Összeg: + &Label: Címke: @@ -1372,14 +1456,30 @@ Cím: %4 &Message: &Üzenet: + + Clear all fields of the form. + Minden mező törlése + Clear Törlés + + Requested payments history + A kért kifizetések története + + + &Request payment + &Fizetés kérése + Show Mutat + + Remove the selected entries from the list + A kijelölt elemek törlése a listáról + Remove Eltávolítás @@ -1415,6 +1515,14 @@ Cím: %4 &Save Image... &Kép mentése + + Request payment to %1 + Fizetés kérése a %1-hez + + + Payment information + Kifizetés információ + URI URI: @@ -1466,7 +1574,15 @@ Cím: %4 (no label) (nincs címke) - + + (no message) + (nincs üzenet) + + + (no amount) + (nincs összeg) + + SendCoinsDialog @@ -1477,6 +1593,14 @@ Cím: %4 Inputs... Bemenetek... + + automatically selected + automatikusan kiválasztva + + + Insufficient funds! + Fedezethiány! + Quantity: Mennyiség: @@ -1509,6 +1633,26 @@ Cím: %4 Transaction Fee: Tranzakciós díj + + Choose... + Válassz... + + + Minimize + Kicsinyítés + + + per kilobyte + kilobájtonként + + + normal + normal + + + fast + gyors + Send to multiple recipients at once Küldés több címzettnek egyszerre @@ -1517,6 +1661,10 @@ Cím: %4 Add &Recipient &Címzett hozzáadása + + Clear all fields of the form. + Minden mező törlése + Dust: Por-határ: @@ -1593,6 +1741,10 @@ Cím: %4 Duplicate address found, can only send to each address once per send operation. Többször szerepel ugyanaz a cím. Egy küldési műveletben egy címre csak egyszer lehet küldeni. + + Warning: Invalid Bitcoin address + Figyelmeztetés: Érvénytelen Bitcoin cím + (no label) (nincs címke) @@ -1601,6 +1753,10 @@ Cím: %4 Copy dust Visszajáró másolása + + Are you sure you want to send? + Biztos, hogy el akarod küldeni? + SendCoinsEntry @@ -1621,6 +1777,10 @@ Cím: %4 &Label: Címke: + + Choose previously used address + Válassz egy korábban már használt címet + Alt+A Alt+A @@ -1633,6 +1793,10 @@ Cím: %4 Alt+P Alt+P + + Remove this entry + Ez a bejegyzés eltávolítása + Message: Üzenet: @@ -1648,7 +1812,11 @@ Cím: %4 Bitcoin Core is shutting down... A Bitcoin Core leáll... - + + Do not shut down the computer until this window disappears. + Ne álljon le a számítógép amíg ez az ablak el nem tűnik. + + SignVerifyMessageDialog @@ -1663,6 +1831,10 @@ Cím: %4 You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. Aláírhat a címeivel üzeneteket, amivel bizonyíthatja, hogy a címek az önéi. Vigyázzon, hogy ne írjon alá semmi félreérthetőt, mivel a phising támadásokkal megpróbálhatják becsapni, hogy az azonosságát átírja másokra. Csak olyan részletes állításokat írjon alá, amivel egyetért. + + Choose previously used address + Válassz egy korábban már használt címet + Alt+A Alt+A diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts index 2c6b7b4a22a8b..b2a6a0a6ea8e2 100644 --- a/src/qt/locale/bitcoin_lv_LV.ts +++ b/src/qt/locale/bitcoin_lv_LV.ts @@ -61,6 +61,14 @@ Receiving addresses Saņemšanas adreses + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Šīs ir jūsu Bitcoin adreses maksājumu sūtīšanai. Vienmēr pārbaudiet summu un saņēmēja adresi pirms monētu sūtīšanas. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Šīs ir jūsu Bitcoin adreses maksājumu saņemšanai. Ir ieteicams katram darījumam izmantot jaunu saņemšanas adresi. + Copy &Label Kopēt &Nosaukumu @@ -81,7 +89,11 @@ Exporting Failed Eksportēšana Neizdevās - + + There was an error trying to save the address list to %1. Please try again. + Radās kļūda, saglabājot adrešu sarakstu %1. Lūdzu, mēģiniet vēlreiz! + + AddressTableModel @@ -155,6 +167,10 @@ Are you sure you wish to encrypt your wallet? Vai tu tiešām vēlies šifrēt savu maciņu? + + IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet. + SVARĪGI: Iepriekšējie maka faila dublējumi ir jāaizvieto ar jauno, šifrēto maka failu. Drošības apsvērumu dēļ iepriekšējie nešifrētā maka dublējumi vairs nebūs derīgi, tiklīdz sāksiet izmantot jauno, šifrēto maku. + Warning: The Caps Lock key is on! Brīdinājums: Caps Lock ir ieslēgts! diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index 3b91cfec27cff..fb212b5e18709 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -1235,6 +1235,10 @@ Endereço: %4 Payment request rejected Solicitação de pagamento rejeitada + + Payment request network doesn't match client network. + Rede de pedido de pagamento não corresponde rede do cliente. + Payment request has expired. Solicitação de pagamento expirou. @@ -1259,10 +1263,18 @@ Endereço: %4 Payment request fetch URL is invalid: %1 URL de cobrança é inválida: %1 + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI não pode ser analisado ! Isto pode ser causado por um endereço Bitcoin inválido ou parâmetros URI informados incorretamente. + Payment request file handling Manipulação de arquivo de cobrança + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Arquivo de pedido de pagamento não pode ser lido ! Isto pode ser causado por uma requisição de pagamento inválida. + Unverified payment requests to custom payment scripts are unsupported. Cobrança não verificada para scripts de pagamento personalizados não é suportado. @@ -3309,6 +3321,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br Set minimum block size in bytes (default: %u) Definir tamanho mínimo do bloco, em bytes (padrão: %u) + + Set the number of threads to service RPC calls (default: %d) + Defina o número de threads para chamadas do serviço RPC (padrão: %d) + Specify configuration file (default: %s) Especificar arquivo de configuração (padrão: %s) diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index b03ab05f0759a..53fb0c4e5eccc 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -436,6 +436,14 @@ CoinControlDialog + + Change: + Размен: + + + Copy change + Копировать размен + (no label) (нет метки) @@ -487,6 +495,10 @@ ReceiveCoinsDialog + + Clear all fields of the form. + Очистить все поля формы + ReceiveRequestDialog @@ -512,6 +524,18 @@ SendCoinsDialog + + Change: + Размен: + + + Clear all fields of the form. + Очистить все поля формы + + + Copy change + Копировать размен + (no label) (нет метки) @@ -548,9 +572,33 @@ Address Адрес + + Received with + Получено на + + + Sent to + Отправлено на + + + Mined + Добытые + TransactionView + + Received with + Получено на + + + Sent to + Отправлено на + + + Mined + Добытые + Exporting Failed Экспорт не удался diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts index 7b08cb750a36e..3a1754546ddda 100644 --- a/src/qt/locale/bitcoin_sl_SI.ts +++ b/src/qt/locale/bitcoin_sl_SI.ts @@ -63,15 +63,15 @@ Receiving addresses - Seznam naslovov prejemanja ... + Prejemni naslovi These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. - Seznam naslovov za pošiljanje plačil. Vedno preverite znesek in prejemnikov naslov pred pošiljanjem. + Tukaj so vaši Bitcoin naslovi za pošiljanje plačil. Vedno preverite znesek in prejemnikov naslov pred pošiljanjem kovancev. These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. - Seznam vaših bitcoin naslovov za prejemanje plačil. Priporočljivo je uporabiti nov naslov za vsako novo plačilo. + Tukaj so vaši Bitcoin naslovi za prejemanje plačil. Priporočljivo je uporabiti nov naslov za vsako novo plačilo. Copy &Label @@ -91,7 +91,7 @@ Exporting Failed - Neuspešen izvoz + Izvoz neuspešen @@ -149,7 +149,7 @@ Change passphrase - Zamenjaj geslo + Spremeni geslo Enter the old and new passphrase to the wallet. diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts index 1013db678c2b1..06c6b1c29f703 100644 --- a/src/qt/locale/bitcoin_uz@Cyrl.ts +++ b/src/qt/locale/bitcoin_uz@Cyrl.ts @@ -958,6 +958,10 @@ Address: %4 Third party transaction URLs Бегона тараф ўтказмалари URL манзиллари + + &Network + Тармоқ + Proxy &IP: Прокси &IP рақами: @@ -1101,12 +1105,52 @@ Address: %4 Recent transactions Сўнгги пул ўтказмалари - + + Unconfirmed transactions to watch-only addresses + Тасдиқланмаган ўтказмалар-фақат кўринадиган манзилларда + + + Current total balance in watch-only addresses + Жорий умумий баланс фақат кўринадиган манзилларда + + + out of sync + Синхронлашдан ташқари + + PaymentServer + + URI handling + URI осилиб қолмоқда + + + Invalid payment address %1 + Нотўғри тўлов манзили %1 + + + Payment request rejected + Тўлов сўрови инкор этилди + + + Payment request network doesn't match client network. + Тўлов сўрови тармоғи мижоз тармоғига мос келмайди. + + + Payment request has expired. + Тўлов сўрови тугади. + + + Payment request error + Тўлов сўрови хато + PeerTableModel + + User Agent + Фойдаланувчи вакил + Ping Time Ping вақти @@ -1118,6 +1162,10 @@ Address: %4 Amount Миқдори + + Enter a Bitcoin address (e.g. %1) + Bitcoin манзилини киритинг (масалан. %1) + %1 m %1 д @@ -1220,6 +1268,22 @@ Address: %4 Select a peer to view detailed information. Батафсил маълумотларни кўриш учун уламни танланг. + + Direction + Йўналиш + + + Version + Версия + + + User Agent + Фойдаланувчи вакил + + + Services + Хизматлар + Starting Height Узунликнинг бошланиши @@ -1340,6 +1404,14 @@ Address: %4 never ҳеч қачон + + Inbound + Ички йўналиш + + + Outbound + Ташқи йўналиш + Unknown Номаълум @@ -1426,10 +1498,30 @@ Address: %4 ReceiveRequestDialog + + QR Code + QR Коди + + + Copy &Address + Нусҳалаш & Манзил + &Save Image... Расмни &сақлаш + + Request payment to %1 + %1 дан Тўловни сўраш + + + Payment information + Тўлов маълумоти + + + URI + URI + Address Манзил @@ -1442,6 +1534,10 @@ Address: %4 Label Ёрлик + + Message + Хабар + RecentRequestsTableModel @@ -1453,6 +1549,10 @@ Address: %4 Label Ёрлик + + Message + Хабар + Amount Миқдори @@ -1461,13 +1561,33 @@ Address: %4 (no label) (Ёрлик мавжуд эмас) - + + (no message) + (Хабар йўқ) + + + (no amount) + (Миқдор мавжуд эмас) + + SendCoinsDialog Send Coins Тангаларни жунат + + Coin Control Features + Танга бошқаруви ҳусусиятлари + + + automatically selected + автоматик тарзда танланган + + + Insufficient funds! + Етарли бўлмаган миқдор + Quantity: Сони: @@ -1504,6 +1624,38 @@ Address: %4 Custom change address Бошқа ўзгартирилган манзил + + Transaction Fee: + Ўтказма тўлови + + + Choose... + Танлов + + + Minimize + Камайтириш + + + per kilobyte + Хар килобайтига + + + Recommended: + Тавсия этилган + + + Confirmation time: + Тасдиқ вақти + + + normal + Нормал + + + fast + Тезкор + Send to multiple recipients at once Бирданига бир нечта қабул қилувчиларга жўнатиш @@ -1516,6 +1668,10 @@ Address: %4 Dust: Ахлат қутиси: + + Clear &All + Барчасини &Тозалаш + Balance: Баланс @@ -1524,10 +1680,18 @@ Address: %4 Confirm the send action Жўнатиш амалини тасдиқлаш + + S&end + Жў&натиш + Confirm send coins Тангалар жўнаишни тасдиқлаш + + %1 to %2 + %1 дан %2 + Copy quantity Нусха сони @@ -1556,6 +1720,10 @@ Address: %4 Copy change Нусха қайтими + + or + ёки + The amount to pay must be larger than 0. Тўлов миқдори 0. дан катта бўлиши керак. @@ -1603,6 +1771,14 @@ Address: %4 &Label: &Ёрлиқ: + + Choose previously used address + Олдин фойдаланилган манзилни танла + + + This is a normal payment. + Бу нормал тўлов. + Alt+A Alt+A @@ -1615,12 +1791,24 @@ Address: %4 Alt+P Alt+P + + Message: + Хабар: + + + This is a verified payment request. + Бу тасдиқланган тўлов талаби. + ShutdownWindow SignVerifyMessageDialog + + Choose previously used address + Олдин фойдаланилган манзилни танла + Alt+A Alt+A @@ -1637,7 +1825,15 @@ Address: %4 Signature Имзо - + + Clear &All + Барчасини & Тозалаш + + + Message verified. + Хабар тасдиқланди. + + SplashScreen @@ -1674,14 +1870,78 @@ Address: %4 Date Сана + + Source + Манба + + + Generated + Яратилган + + + From + Дан + + + To + Га + + + own address + ўз манзили + + + label + ёрлиқ + + + Credit + Кредит + + + not accepted + қабул қилинмади + + + Transaction fee + Ўтказма тўлови + + + Net amount + Умумий миқдор + + + Message + Хабар + + + Comment + Шарҳ + Transaction ID - ID + Ўтказма ID си + + + Merchant + Савдо + + + Transaction + Ўтказма Amount Миқдори + + true + рост + + + false + ёлғон + , has not been successfully broadcast yet , ҳалигача трансляция қилингани йўқ @@ -1732,10 +1992,22 @@ Address: %4 Generated but not accepted Яратилди, аммо қабул қилинмади + + Offline + Оффлайн + + + Unconfirmed + Тасдиқланмаган + Received with Ёрдамида қабул қилиш + + Received from + Дан қабул қилиш + Sent to Жўнатиш @@ -1851,10 +2123,22 @@ Address: %4 Edit label Ёрликни тахрирлаш + + Show transaction details + Ўтказма тафсилотларини кўрсатиш + + + Export Transaction History + Ўтказмалар тарихини экспорт қилиш + Exporting Failed Экспорт қилиб бўлмади + + The transaction history was successfully saved to %1. + Ўтказмалар тарихи %1 га муваффаққиятли сақланди. + Comma separated file (*.csv) Вергул билан ажратилган файл (*.csv) @@ -1897,7 +2181,11 @@ Address: %4 WalletFrame - + + No wallet has been loaded. + Хали бирорта хамён юкланмади. + + WalletModel @@ -1938,6 +2226,10 @@ Address: %4 Use the test network Синов тармоғидан фойдаланинг + + Connection options: + Уланиш кўрсаткичлари: + Information Маълумот From 5216f3c5d48001f17422d4604c0e9a7c55cd4993 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 4 Nov 2015 23:50:36 +0100 Subject: [PATCH 12/27] Squashed 'src/leveldb/' changes from 7d41e6f..20ca81f 20ca81f Merge pull request #9 7aa105e leveldb: Win32WritableFile without memory mapping git-subtree-dir: src/leveldb git-subtree-split: 20ca81f08fb7fa108923a091668e447dcf5c6b9d --- util/env_win.cc | 236 ++++++++---------------------------------------- 1 file changed, 39 insertions(+), 197 deletions(-) diff --git a/util/env_win.cc b/util/env_win.cc index ef2ecae830662..e11a96b791871 100644 --- a/util/env_win.cc +++ b/util/env_win.cc @@ -103,39 +103,20 @@ class Win32RandomAccessFile : public RandomAccessFile DISALLOW_COPY_AND_ASSIGN(Win32RandomAccessFile); }; -class Win32MapFile : public WritableFile +class Win32WritableFile : public WritableFile { public: - Win32MapFile(const std::string& fname); + Win32WritableFile(const std::string& fname); + ~Win32WritableFile(); - ~Win32MapFile(); virtual Status Append(const Slice& data); virtual Status Close(); virtual Status Flush(); virtual Status Sync(); BOOL isEnable(); private: - std::string _filename; - HANDLE _hFile; - size_t _page_size; - size_t _map_size; // How much extra memory to map at a time - char* _base; // The mapped region - HANDLE _base_handle; - char* _limit; // Limit of the mapped region - char* _dst; // Where to write next (in range [base_,limit_]) - char* _last_sync; // Where have we synced up to - uint64_t _file_offset; // Offset of base_ in file - //LARGE_INTEGER file_offset_; - // Have we done an munmap of unsynced data? - bool _pending_sync; - - // Roundup x to a multiple of y - static size_t _Roundup(size_t x, size_t y); - size_t _TruncateToPageBoundary(size_t s); - bool _UnmapCurrentRegion(); - bool _MapNewRegion(); - DISALLOW_COPY_AND_ASSIGN(Win32MapFile); - BOOL _Init(LPCWSTR Path); + std::string filename_; + ::HANDLE _hFile; }; class Win32FileLock : public FileLock @@ -442,202 +423,63 @@ void Win32RandomAccessFile::_CleanUp() } } -size_t Win32MapFile::_Roundup( size_t x, size_t y ) +Win32WritableFile::Win32WritableFile(const std::string& fname) + : filename_(fname) { - return ((x + y - 1) / y) * y; + std::wstring path; + ToWidePath(fname, path); + DWORD Flag = PathFileExistsW(path.c_str()) ? OPEN_EXISTING : CREATE_ALWAYS; + _hFile = CreateFileW(path.c_str(), + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ|FILE_SHARE_DELETE|FILE_SHARE_WRITE, + NULL, + Flag, + FILE_ATTRIBUTE_NORMAL, + NULL); + // CreateFileW returns INVALID_HANDLE_VALUE in case of error, always check isEnable() before use } -size_t Win32MapFile::_TruncateToPageBoundary( size_t s ) +Win32WritableFile::~Win32WritableFile() { - s -= (s & (_page_size - 1)); - assert((s % _page_size) == 0); - return s; + if (_hFile != INVALID_HANDLE_VALUE) + Close(); } -bool Win32MapFile::_UnmapCurrentRegion() +Status Win32WritableFile::Append(const Slice& data) { - bool result = true; - if (_base != NULL) { - if (_last_sync < _limit) { - // Defer syncing this data until next Sync() call, if any - _pending_sync = true; - } - if (!UnmapViewOfFile(_base) || !CloseHandle(_base_handle)) - result = false; - _file_offset += _limit - _base; - _base = NULL; - _base_handle = NULL; - _limit = NULL; - _last_sync = NULL; - _dst = NULL; - // Increase the amount we map the next time, but capped at 1MB - if (_map_size < (1<<20)) { - _map_size *= 2; - } + DWORD r = 0; + if (!WriteFile(_hFile, data.data(), data.size(), &r, NULL) || r != data.size()) { + return Status::IOError("Win32WritableFile.Append::WriteFile: "+filename_, Win32::GetLastErrSz()); } - return result; -} - -bool Win32MapFile::_MapNewRegion() -{ - assert(_base == NULL); - //LONG newSizeHigh = (LONG)((file_offset_ + map_size_) >> 32); - //LONG newSizeLow = (LONG)((file_offset_ + map_size_) & 0xFFFFFFFF); - DWORD off_hi = (DWORD)(_file_offset >> 32); - DWORD off_lo = (DWORD)(_file_offset & 0xFFFFFFFF); - LARGE_INTEGER newSize; - newSize.QuadPart = _file_offset + _map_size; - SetFilePointerEx(_hFile, newSize, NULL, FILE_BEGIN); - SetEndOfFile(_hFile); - - _base_handle = CreateFileMappingA( - _hFile, - NULL, - PAGE_READWRITE, - 0, - 0, - 0); - if (_base_handle != NULL) { - _base = (char*) MapViewOfFile(_base_handle, - FILE_MAP_ALL_ACCESS, - off_hi, - off_lo, - _map_size); - if (_base != NULL) { - _limit = _base + _map_size; - _dst = _base; - _last_sync = _base; - return true; - } - } - return false; + return Status::OK(); } -Win32MapFile::Win32MapFile( const std::string& fname) : - _filename(fname), - _hFile(NULL), - _page_size(Win32::g_PageSize), - _map_size(_Roundup(65536, Win32::g_PageSize)), - _base(NULL), - _base_handle(NULL), - _limit(NULL), - _dst(NULL), - _last_sync(NULL), - _file_offset(0), - _pending_sync(false) +Status Win32WritableFile::Close() { - std::wstring path; - ToWidePath(fname, path); - _Init(path.c_str()); - assert((Win32::g_PageSize & (Win32::g_PageSize - 1)) == 0); -} - -Status Win32MapFile::Append( const Slice& data ) -{ - const char* src = data.data(); - size_t left = data.size(); - Status s; - while (left > 0) { - assert(_base <= _dst); - assert(_dst <= _limit); - size_t avail = _limit - _dst; - if (avail == 0) { - if (!_UnmapCurrentRegion() || - !_MapNewRegion()) { - return Status::IOError("WinMmapFile.Append::UnmapCurrentRegion or MapNewRegion: ", Win32::GetLastErrSz()); - } - } - size_t n = (left <= avail) ? left : avail; - memcpy(_dst, src, n); - _dst += n; - src += n; - left -= n; - } - return s; -} - -Status Win32MapFile::Close() -{ - Status s; - size_t unused = _limit - _dst; - if (!_UnmapCurrentRegion()) { - s = Status::IOError("WinMmapFile.Close::UnmapCurrentRegion: ",Win32::GetLastErrSz()); - } else if (unused > 0) { - // Trim the extra space at the end of the file - LARGE_INTEGER newSize; - newSize.QuadPart = _file_offset - unused; - if (!SetFilePointerEx(_hFile, newSize, NULL, FILE_BEGIN)) { - s = Status::IOError("WinMmapFile.Close::SetFilePointer: ",Win32::GetLastErrSz()); - } else - SetEndOfFile(_hFile); - } if (!CloseHandle(_hFile)) { - if (s.ok()) { - s = Status::IOError("WinMmapFile.Close::CloseHandle: ", Win32::GetLastErrSz()); - } + return Status::IOError("Win32WritableFile.Close::CloseHandle: "+filename_, Win32::GetLastErrSz()); } _hFile = INVALID_HANDLE_VALUE; - _base = NULL; - _base_handle = NULL; - _limit = NULL; - - return s; -} - -Status Win32MapFile::Sync() -{ - Status s; - if (_pending_sync) { - // Some unmapped data was not synced - _pending_sync = false; - if (!FlushFileBuffers(_hFile)) { - s = Status::IOError("WinMmapFile.Sync::FlushFileBuffers: ",Win32::GetLastErrSz()); - } - } - if (_dst > _last_sync) { - // Find the beginnings of the pages that contain the first and last - // bytes to be synced. - size_t p1 = _TruncateToPageBoundary(_last_sync - _base); - size_t p2 = _TruncateToPageBoundary(_dst - _base - 1); - _last_sync = _dst; - if (!FlushViewOfFile(_base + p1, p2 - p1 + _page_size)) { - s = Status::IOError("WinMmapFile.Sync::FlushViewOfFile: ",Win32::GetLastErrSz()); - } - } - return s; + return Status::OK(); } -Status Win32MapFile::Flush() +Status Win32WritableFile::Flush() { + // Nothing to do here, there are no application-side buffers return Status::OK(); } -Win32MapFile::~Win32MapFile() +Status Win32WritableFile::Sync() { - if (_hFile != INVALID_HANDLE_VALUE) { - Win32MapFile::Close(); + if (!FlushFileBuffers(_hFile)) { + return Status::IOError("Win32WritableFile.Sync::FlushFileBuffers "+filename_, Win32::GetLastErrSz()); } + return Status::OK(); } -BOOL Win32MapFile::_Init( LPCWSTR Path ) -{ - DWORD Flag = PathFileExistsW(Path) ? OPEN_EXISTING : CREATE_ALWAYS; - _hFile = CreateFileW(Path, - GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ|FILE_SHARE_DELETE|FILE_SHARE_WRITE, - NULL, - Flag, - FILE_ATTRIBUTE_NORMAL, - NULL); - if(!_hFile || _hFile == INVALID_HANDLE_VALUE) - return FALSE; - else - return TRUE; -} - -BOOL Win32MapFile::isEnable() +BOOL Win32WritableFile::isEnable() { - return _hFile ? TRUE : FALSE; + return _hFile != INVALID_HANDLE_VALUE; } Win32FileLock::Win32FileLock( const std::string& fname ) : @@ -981,7 +823,7 @@ Status Win32Env::NewLogger( const std::string& fname, Logger** result ) { Status sRet; std::string path = fname; - Win32MapFile* pMapFile = new Win32MapFile(ModifyPath(path)); + Win32WritableFile* pMapFile = new Win32WritableFile(ModifyPath(path)); if(!pMapFile->isEnable()){ delete pMapFile; *result = NULL; @@ -995,7 +837,7 @@ Status Win32Env::NewWritableFile( const std::string& fname, WritableFile** resul { Status sRet; std::string path = fname; - Win32MapFile* pFile = new Win32MapFile(ModifyPath(path)); + Win32WritableFile* pFile = new Win32WritableFile(ModifyPath(path)); if(!pFile->isEnable()){ *result = NULL; sRet = Status::IOError(fname,Win32::GetLastErrSz()); From 9c810058d8f3ae76234dc4efa53a57306694b92c Mon Sep 17 00:00:00 2001 From: Diego Viola Date: Tue, 22 Sep 2015 04:25:26 -0300 Subject: [PATCH 13/27] Fix spelling of Qt --- contrib/debian/examples/bitcoin.conf | 4 ++-- src/qt/guiutil.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf index 31cca981e0a2a..2fc46fb60f6ef 100644 --- a/contrib/debian/examples/bitcoin.conf +++ b/contrib/debian/examples/bitcoin.conf @@ -54,7 +54,7 @@ # JSON-RPC options (for controlling a running Bitcoin/bitcoind process) # -# server=1 tells Bitcoin-QT and bitcoind to accept JSON-RPC commands +# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands #server=0 # You must set rpcuser and rpcpassword to secure the JSON-RPC api @@ -72,7 +72,7 @@ # NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED, # because the rpcpassword is transmitted over the network unencrypted. -# server=1 tells Bitcoin-QT to accept JSON-RPC commands. +# server=1 tells Bitcoin-Qt to accept JSON-RPC commands. # it is also read by bitcoind to determine if RPC should be enabled #rpcallowip=10.1.1.34/255.255.255.0 #rpcallowip=1.2.3.4/24 diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index de8edef792774..71de3d2cd0556 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -390,7 +390,7 @@ void SubstituteFonts(const QString& language) { #if defined(Q_OS_MAC) // Background: -// OSX's default font changed in 10.9 and QT is unable to find it with its +// OSX's default font changed in 10.9 and Qt is unable to find it with its // usual fallback methods when building against the 10.7 sdk or lower. // The 10.8 SDK added a function to let it find the correct fallback font. // If this fallback is not properly loaded, some characters may fail to From 3ad96bdf73f788a65c769a7579bace40cab0bd81 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Thu, 17 Sep 2015 17:43:34 -0400 Subject: [PATCH 14/27] Fix locking in GetTransaction. GetTransaction needs to lock cs_main until ReadBlockFromDisk completes, the data inside CBlockIndex's can change since pruning. This lock was held by all calls to GetTransaction except rest_tx. --- src/main.cpp | 68 +++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bcb0f20d61a29..50e01fa4008e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1110,47 +1110,45 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, bool fAllowSlow) { CBlockIndex *pindexSlow = NULL; + + LOCK(cs_main); + + if (mempool.lookup(hash, txOut)) { - LOCK(cs_main); - { - if (mempool.lookup(hash, txOut)) - { - return true; - } - } + return true; + } - if (fTxIndex) { - CDiskTxPos postx; - if (pblocktree->ReadTxIndex(hash, postx)) { - CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION); - if (file.IsNull()) - return error("%s: OpenBlockFile failed", __func__); - CBlockHeader header; - try { - file >> header; - fseek(file.Get(), postx.nTxOffset, SEEK_CUR); - file >> txOut; - } catch (std::exception &e) { - return error("%s : Deserialize or I/O error - %s", __func__, e.what()); - } - hashBlock = header.GetHash(); - if (txOut.GetHash() != hash) - return error("%s : txid mismatch", __func__); - return true; + if (fTxIndex) { + CDiskTxPos postx; + if (pblocktree->ReadTxIndex(hash, postx)) { + CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION); + if (file.IsNull()) + return error("%s: OpenBlockFile failed", __func__); + CBlockHeader header; + try { + file >> header; + fseek(file.Get(), postx.nTxOffset, SEEK_CUR); + file >> txOut; + } catch (std::exception &e) { + return error("%s : Deserialize or I/O error - %s", __func__, e.what()); } + hashBlock = header.GetHash(); + if (txOut.GetHash() != hash) + return error("%s : txid mismatch", __func__); + return true; } + } - if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it - int nHeight = -1; - { - CCoinsViewCache &view = *pcoinsTip; - const CCoins* coins = view.AccessCoins(hash); - if (coins) - nHeight = coins->nHeight; - } - if (nHeight > 0) - pindexSlow = chainActive[nHeight]; + if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it + int nHeight = -1; + { + CCoinsViewCache &view = *pcoinsTip; + const CCoins* coins = view.AccessCoins(hash); + if (coins) + nHeight = coins->nHeight; } + if (nHeight > 0) + pindexSlow = chainActive[nHeight]; } if (pindexSlow) { From 612efe89e3cc59f9c5ea16ece8a386e7c74bdd53 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 7 Sep 2015 11:00:59 +0200 Subject: [PATCH 15/27] [Qt] Raise debug window when requested * Raise the debug window when hidden behind other windows * Switch to the debug window when on another virtual desktop * Show the debug window when minimized This change is a conceptual copy of 5ffaaba and 382e9e2 --- src/qt/bitcoingui.cpp | 17 ++++++++++++----- src/qt/bitcoingui.h | 2 ++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 30b7b54de7908..6b4840dcd6c20 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -207,11 +207,6 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) : statusBar()->addWidget(progressBar); statusBar()->addPermanentWidget(frameBlocks); - connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show())); - - // prevents an open debug window from becoming stuck/unusable on client shutdown - connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide())); - // Install event filter to be able to catch status tip events (QEvent::StatusTip) this->installEventFilter(this); @@ -334,6 +329,10 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle) connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); + connect(openRPCConsoleAction, SIGNAL(triggered()), this, SLOT(showDebugWindow())); + // prevents an open debug window from becoming stuck/unusable on client shutdown + connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide())); + #ifdef ENABLE_WALLET if(walletFrame) { @@ -569,6 +568,14 @@ void BitcoinGUI::aboutClicked() dlg.exec(); } +void BitcoinGUI::showDebugWindow() +{ + rpcConsole->showNormal(); + rpcConsole->show(); + rpcConsole->raise(); + rpcConsole->activateWindow(); +} + void BitcoinGUI::showHelpMessageClicked() { HelpMessageDialog *help = new HelpMessageDialog(this, false); diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 662ef9d9e8419..616c3717b9462 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -189,6 +189,8 @@ private slots: void optionsClicked(); /** Show about dialog */ void aboutClicked(); + /** Show debug window */ + void showDebugWindow(); /** Show help message dialog */ void showHelpMessageClicked(); #ifndef Q_OS_MAC From dfe0d4da7e56926937d1f309eb43030a81fa29df Mon Sep 17 00:00:00 2001 From: Zak Wilcox Date: Sat, 29 Aug 2015 18:52:44 +0100 Subject: [PATCH 16/27] Include bitcoin-tx binary on Debian/Ubuntu Currently left out of Matt's PPA. Debian's package for unstable already has it. --- contrib/debian/bitcoind.install | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/debian/bitcoind.install b/contrib/debian/bitcoind.install index 798ea851f6ef8..494e5cbdc3a60 100644 --- a/contrib/debian/bitcoind.install +++ b/contrib/debian/bitcoind.install @@ -1,2 +1,3 @@ usr/local/bin/bitcoind usr/bin usr/local/bin/bitcoin-cli usr/bin +usr/local/bin/bitcoin-tx usr/bin From 43c2789fe36fd8ee7657d2e1cea65f7c49564eb7 Mon Sep 17 00:00:00 2001 From: Zak Wilcox Date: Thu, 17 Sep 2015 07:23:04 +0100 Subject: [PATCH 17/27] Split bitcoin-tx into its own package Reverts the change putting it in the bitcoind deb. --- contrib/debian/bitcoin-tx.install | 1 + contrib/debian/bitcoind.install | 1 - contrib/debian/control | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 contrib/debian/bitcoin-tx.install diff --git a/contrib/debian/bitcoin-tx.install b/contrib/debian/bitcoin-tx.install new file mode 100644 index 0000000000000..2c21052a6876b --- /dev/null +++ b/contrib/debian/bitcoin-tx.install @@ -0,0 +1 @@ +usr/local/bin/bitcoin-tx usr/bin diff --git a/contrib/debian/bitcoind.install b/contrib/debian/bitcoind.install index 494e5cbdc3a60..798ea851f6ef8 100644 --- a/contrib/debian/bitcoind.install +++ b/contrib/debian/bitcoind.install @@ -1,3 +1,2 @@ usr/local/bin/bitcoind usr/bin usr/local/bin/bitcoin-cli usr/bin -usr/local/bin/bitcoin-tx usr/bin diff --git a/contrib/debian/control b/contrib/debian/control index a653260ad30ee..a1af841f1c6cc 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -56,3 +56,18 @@ Description: peer-to-peer network based digital currency - Qt GUI requires 20+ GB of space, slowly growing. . This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt. + +Package: bitcoin-tx +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: peer-to-peer digital currency - standalone transaction tool + Bitcoin is a free open source peer-to-peer electronic cash system that + is completely decentralized, without the need for a central server or + trusted parties. Users hold the crypto keys to their own money and + transact directly with each other, with the help of a P2P network to + check for double-spending. + . + This package provides bitcoin-tx, a command-line transaction creation + tool with minimal dependencies which can be used without a bitcoin + daemon. Some means of exchanging minimal transaction data with peers + is still required. From b3964e3b7a91547d2080206361a401d6ad615777 Mon Sep 17 00:00:00 2001 From: Zak Wilcox Date: Thu, 17 Sep 2015 10:17:24 +0100 Subject: [PATCH 18/27] Drop "with minimal dependencies" from description Five boost libs plus libcrypto are needed; I don't think that quite passes for minimal. --- contrib/debian/control | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/debian/control b/contrib/debian/control index a1af841f1c6cc..5eca0341e3528 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -68,6 +68,5 @@ Description: peer-to-peer digital currency - standalone transaction tool check for double-spending. . This package provides bitcoin-tx, a command-line transaction creation - tool with minimal dependencies which can be used without a bitcoin - daemon. Some means of exchanging minimal transaction data with peers - is still required. + tool which can be used without a bitcoin daemon. Some means of + exchanging minimal transaction data with peers is still required. From cf67d8b49b59d66bc0e079a31ca547834dd49161 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 9 Apr 2015 11:50:18 +0000 Subject: [PATCH 19/27] Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) --- src/chainparams.cpp | 3 +++ src/chainparams.h | 2 ++ src/main.cpp | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index ffcbaceb0a274..244d8ff0e77eb 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -122,6 +122,7 @@ class CMainParams : public CChainParams { nMinerThreads = 0; nTargetTimespan = 14 * 24 * 60 * 60; // two weeks nTargetSpacing = 10 * 60; + nMaxTipAge = 24 * 60 * 60; /** * Build the genesis block. Note that the output of the genesis coinbase cannot @@ -203,6 +204,7 @@ class CTestNetParams : public CMainParams { nMinerThreads = 0; nTargetTimespan = 14 * 24 * 60 * 60; //! two weeks nTargetSpacing = 10 * 60; + nMaxTipAge = 0x7fffffff; //! Modify the testnet genesis block so the timestamp is valid for a later start. genesis.nTime = 1296688602; @@ -260,6 +262,7 @@ class CRegTestParams : public CTestNetParams { nTargetTimespan = 14 * 24 * 60 * 60; //! two weeks nTargetSpacing = 10 * 60; bnProofOfWorkLimit = ~uint256(0) >> 1; + nMaxTipAge = 24 * 60 * 60; genesis.nTime = 1296688602; genesis.nBits = 0x207fffff; genesis.nNonce = 2; diff --git a/src/chainparams.h b/src/chainparams.h index ef20a88558537..4b6ddca357726 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -69,6 +69,7 @@ class CChainParams int64_t TargetTimespan() const { return nTargetTimespan; } int64_t TargetSpacing() const { return nTargetSpacing; } int64_t Interval() const { return nTargetTimespan / nTargetSpacing; } + int64_t MaxTipAge() const { return nMaxTipAge; } /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */ bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; } /** In the future use NetworkIDString() for RPC fields */ @@ -95,6 +96,7 @@ class CChainParams int64_t nTargetTimespan; int64_t nTargetSpacing; int nMinerThreads; + long nMaxTipAge; std::vector vSeeds; std::vector base58Prefixes[MAX_BASE58_TYPES]; CBaseChainParams::Network networkID; diff --git a/src/main.cpp b/src/main.cpp index 50e01fa4008e1..dd438f42c7f89 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1248,6 +1248,7 @@ CAmount GetBlockValue(int nHeight, const CAmount& nFees) bool IsInitialBlockDownload() { + const CChainParams& chainParams = Params(); LOCK(cs_main); if (fImporting || fReindex || chainActive.Height() < Checkpoints::GetTotalBlocksEstimate()) return true; @@ -1255,7 +1256,7 @@ bool IsInitialBlockDownload() if (lockIBDState) return false; bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 || - pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60); + pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge()); if (!state) lockIBDState = true; return state; From a2f2fb6acfbc8db3626b790839b54fd417c08806 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 1 Oct 2015 18:38:54 +0200 Subject: [PATCH 20/27] build: disable -Wself-assign Prevent these warnings in clang 3.6: ./serialize.h:96:9: warning: explicitly assigning value of variable of type 'uint64_t' (aka 'unsigned long') to itself [-Wself-assign] obj = (obj); ~~~ ^ ~~~ --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bc0bbc4397900..93517fb31c645 100644 --- a/configure.ac +++ b/configure.ac @@ -167,7 +167,7 @@ fi ## compatibility with the legacy buildsystem. ## if test "x$CXXFLAGS_overridden" = "xno"; then - CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter" + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-self-assign" fi CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS" From 90897ab34326b2b600b683f598bca702d5beb8d3 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 12 Oct 2015 14:25:51 -0700 Subject: [PATCH 21/27] Update bluematt-key, the old one is long-since revoked --- contrib/gitian-downloader/bluematt-key.pgp | Bin 4113 -> 10324 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/contrib/gitian-downloader/bluematt-key.pgp b/contrib/gitian-downloader/bluematt-key.pgp index fb6d9eb28423d2c8ece89179f8e67ae06fa6dc13..2389d4657fb7f5f225f5d76e08841fd6e21d4be9 100644 GIT binary patch literal 10324 zcmZ{qWl&vPv#uAukl-5J-Q9viU=iHi-7UD=!rk57Ex227*WeDp3C`Ww-#Pc3ANS55 zb5@O6)zvlX8U1#T?sUjc(8_(4pCM2IN5BkXI<6>utH4=2cz^~1mq1ODEpC4!Ey*Cf zjo?jsn0Met*9B^={l#Ey!uFzFa39tj3bDYjnG*Z{LkRtk#x<3M_$A{5O2=tnM`#og zW$i#KA9rAE%RE-hV`=Pa(Q0vlvgX;l+uB9)P$8K7`x1(Ae1M8@Gu;*Ltv_y%v~;)k zrdu^6x&U%>l>{vYFdprf5(a_=j)F@u4}!os*{=#WLyHQCY(W#AfdNBY$ZOaA)T?@r zY3Q7GzajI2aM7Z&7w-VEm2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V^6G^i5`e*kp5&*ADK;kFnrH~1>o%!q8DuvPR%vVFluZ`C7!`LKJ`lhF<9H6w|p75R?J|U z?6Px7uUZ0D2eUiKedGVD*hc|4f%L!2Iv4;U`?HFlOA`_U$sLdWexddP!B@Zns>5zW zEsP`RySbB!vZCI#2A1O^4yU83v<<(T8Tkgw?UU4P&R!6YVj$EVKKTI&ug@M{hV91h zoIvar9eN{>)E7N|4?CXwzG(V~KXTw@7 zrRz(6y(548k%bk;&ovR0ZUF_KOU1v?!J%h#;+^!{-4 z0I|9pEka7PlKR%5)qBog{Ey#KR+f%3M|*}fI)-{cFKx| zac;S9()zAmXPJBP@;>Da^HRMlrJHX(?xhxjeGYm_*Si%W+hQilFSyzBI<6XZ*Lpa#qDU8*BA!ull&2`Y&fGs_M`~} z?xOf42*aTA;~MJ#at$q+xGevae8moxR?m^$@SxP@UX@v3$QU;F&s-_t zu;=x459PZw=_G&WINL9-%h$OuFzVJ*h2%taed%V+32mhQoDA25#9VTzGHNqzR8ga3 p;$CWvfXvuo0#DcLav)Q2c^q~Cc|eO(TWVr+`!?FB7= Date: Sat, 10 Oct 2015 06:46:35 -0400 Subject: [PATCH 22/27] Clarification of unit test build instructions. --- src/test/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/README.md b/src/test/README.md index 7efce6f0522f2..eeaceb60c6ae7 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -16,6 +16,8 @@ their tests in a test suite called "_tests". For an examples of this pattern, examine uint160_tests.cpp and uint256_tests.cpp. +Add the source files to /src/Makefile.test.include to add them to the build. + For further reading, I found the following website to be helpful in explaining how the boost unit test framework works: [http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/). \ No newline at end of file From 256321ebd2c6a65283ce8cb57329275093594338 Mon Sep 17 00:00:00 2001 From: Mitchell Cash Date: Sat, 17 Oct 2015 20:10:45 +1000 Subject: [PATCH 23/27] Correct spelling mistakes in doc folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - OSX —> OS X - XCode —> Xcode - github —> GitHub - homebrew —> Homebrew - gitian —> Gitian - Other miscellaneous obvious spelling fixes and whitespace removal --- doc/README.md | 6 ++--- doc/README_osx.txt | 18 ++++++------- doc/build-osx.md | 10 +++---- doc/coding.md | 2 +- doc/gitian-building.md | 60 +++++++++++++++++++++--------------------- doc/init.md | 6 ++--- doc/release-process.md | 34 ++++++++++++------------ doc/tor.md | 11 ++++---- 8 files changed, 72 insertions(+), 75 deletions(-) diff --git a/doc/README.md b/doc/README.md index a2066c9f276db..a5ad4e82f0a40 100644 --- a/doc/README.md +++ b/doc/README.md @@ -7,7 +7,7 @@ Setup Running --------------------- -The following are some helpful notes on how to run Bitcoin on your native platform. +The following are some helpful notes on how to run Bitcoin on your native platform. ### Unix @@ -26,7 +26,7 @@ Unpack the files into a directory and run: Unpack the files into a directory, and then run bitcoin-qt.exe. -### OSX +### OS X Drag Bitcoin-Qt to your applications folder, and then run Bitcoin-Qt. @@ -41,7 +41,7 @@ Building --------------------- The following are developer notes on how to build Bitcoin on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc. -- [OSX Build Notes](build-osx.md) +- [OS X Build Notes](build-osx.md) - [Unix Build Notes](build-unix.md) Development diff --git a/doc/README_osx.txt b/doc/README_osx.txt index d56234f7d9408..40b0bdf9ced4d 100644 --- a/doc/README_osx.txt +++ b/doc/README_osx.txt @@ -1,12 +1,12 @@ -Deterministic OSX Dmg Notes. +Deterministic OS X Dmg Notes. -Working OSX DMG's are created in Linux by combining a recent clang, +Working OS X DMGs are created in Linux by combining a recent clang, the Apple's binutils (ld, ar, etc), and DMG authoring tools. Apple uses clang extensively for development and has upstreamed the necessary functionality so that a vanilla clang can take advantage. It supports the use of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary -when building for OSX. A pre-compiled version of 3.2 is used because it was not +when building for OS X. A pre-compiled version of 3.2 is used because it was not available in the Precise repositories at the time this work was started. In the future, it can be switched to use system packages instead. @@ -35,11 +35,11 @@ This file is several gigabytes in size, but only a single directory inside is needed: Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file. -To create a tarball suitable for gitian input, mount the dmg in OSX, then create it with: +To create a tarball suitable for Gitian input, mount the dmg in OS X, then create it with: $ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk -The gitian descriptors build 2 sets of files: Linux tools, then Apple binaries +The Gitian descriptors build 2 sets of files: Linux tools, then Apple binaries which are created using these tools. The build process has been designed to avoid including the SDK's files in Gitian's outputs. All interim tarballs are fully deterministic and may be freely redistributed. @@ -63,20 +63,20 @@ Ideally, the creation could be fixed and genisoimage would no longer be necessar Background images and other features can be added to DMG files by inserting a .DS_Store before creation. The easiest way to create this file is to build a -DMG without one, move it to a device running OSX, customize the layout, then +DMG without one, move it to a device running OS X, customize the layout, then grab the .DS_Store file for later use. That is the approach taken here. -As of OSX Mavericks (10.9), using an Apple-blessed key to sign binaries is a +As of OS X Mavericks (10.9), using an Apple-blessed key to sign binaries is a requirement in order to satisfy the new Gatekeeper requirements. Because this private key cannot be shared, we'll have to be a bit creative in order for the build process to remain somewhat deterministic. Here's how it works: -- Builders use gitian to create an unsigned release. This outputs an unsigned +- Builders use Gitian to create an unsigned release. This outputs an unsigned dmg which users may choose to bless and run. It also outputs an unsigned app structure in the form of a tarball, which also contains all of the tools that have been previously (deterministically) built in order to create a final dmg. - The Apple keyholder uses this unsigned app to create a detached signature, using the script that is also included there. -- Builders feed the unsigned app + detached signature back into gitian. It +- Builders feed the unsigned app + detached signature back into Gitian. It uses the pre-built tools to recombine the pieces into a deterministic dmg. diff --git a/doc/build-osx.md b/doc/build-osx.md index c41820f2b1be0..68d73db60e42d 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -1,6 +1,6 @@ Mac OS X Build Instructions and Notes ==================================== -This guide will show you how to build bitcoind(headless client) for OSX. +This guide will show you how to build bitcoind(headless client) for OS X. Notes ----- @@ -13,8 +13,8 @@ built-in one is located in `/Applications/Utilities`. Preparation ----------- -You need to install XCode with all the options checked so that the compiler -and everything is available in /usr not just /Developer. XCode should be +You need to install Xcode with all the options checked so that the compiler +and everything is available in /usr not just /Developer. Xcode should be available on your OS X installation media, but if not, you can get the current version from https://developer.apple.com/xcode/. If you install Xcode 4.3 or later, you'll need to install its command line tools. This can @@ -65,7 +65,7 @@ After exiting, you'll get a warning that the install is keg-only, which means it ### Building `bitcoind` -1. Clone the github tree to get the source code and go into the directory. +1. Clone the GitHub tree to get the source code and go into the directory. git clone https://github.com/bitcoin/bitcoin.git cd bitcoin @@ -89,7 +89,7 @@ Use Qt Creator as IDE You can use Qt Creator as IDE, for debugging and for manipulating forms, etc. Download Qt Creator from http://www.qt.io/download/. Download the "community edition" and only install Qt Creator (uncheck the rest during the installation process). -1. Make sure you installed everything through homebrew mentioned above +1. Make sure you installed everything through Homebrew mentioned above 2. Do a proper ./configure --with-gui=qt5 --enable-debug 3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project 4. Enter "bitcoin-qt" as project name, enter src/qt as location diff --git a/doc/coding.md b/doc/coding.md index 43294dbe4c116..c0631ce3fe2ed 100644 --- a/doc/coding.md +++ b/doc/coding.md @@ -57,7 +57,7 @@ As Doxygen recognizes the comments by the delimiters (`/**` and `*/` in this cas To describe a class use the same construct above the class definition: ```c++ -/** +/** * Alerts are for notifying old versions if they become too obsolete and * need to upgrade. The message is displayed in the status bar. * @see GetWarnings() diff --git a/doc/gitian-building.md b/doc/gitian-building.md index 6a2957474159f..39f8d5218051b 100644 --- a/doc/gitian-building.md +++ b/doc/gitian-building.md @@ -1,7 +1,7 @@ Gitian building ================ -*Setup instructions for a gitian build of Bitcoin using a Debian VM or physical system.* +*Setup instructions for a Gitian build of Bitcoin using a Debian VM or physical system.* Gitian is the deterministic build process that is used to build the Bitcoin Core executables. It provides a way to be reasonably sure that the @@ -13,7 +13,7 @@ Multiple developers build the source code by following a specific descriptor These results are compared and only if they match, the build is accepted and uploaded to bitcoin.org. -More independent gitian builders are needed, which is why I wrote this +More independent Gitian builders are needed, which is why I wrote this guide. It is preferred to follow these steps yourself instead of using someone else's VM image to avoid 'contaminating' the build. @@ -22,9 +22,9 @@ Table of Contents - [Create a new VirtualBox VM](#create-a-new-virtualbox-vm) - [Connecting to the VM](#connecting-to-the-vm) -- [Setting up Debian for gitian building](#setting-up-debian-for-gitian-building) -- [Installing gitian](#installing-gitian) -- [Setting up gitian images](#setting-up-gitian-images) +- [Setting up Debian for Gitian building](#setting-up-debian-for-gitian-building) +- [Installing Gitian](#installing-gitian) +- [Setting up Gitian images](#setting-up-gitian-images) - [Getting and building the inputs](#getting-and-building-the-inputs) - [Building Bitcoin](#building-bitcoin) - [Building an alternative repository](#building-an-alternative-repository) @@ -60,18 +60,18 @@ In the VirtualBox GUI click "Create" and choose the following parameters in the ![](gitian-building/create_vm_hard_drive.png) - Hard Drive: Create a virtual hard drive now - + ![](gitian-building/create_vm_hard_drive_file_type.png) -- Hard Drive file type: Use the default, VDI (VirtualBox Disk Image) +- Hard Drive file type: Use the default, VDI (VirtualBox Disk Image) ![](gitian-building/create_vm_storage_physical_hard_drive.png) - -- Storage on Physical hard drive: Dynamically Allocated - + +- Storage on Physical hard drive: Dynamically Allocated + ![](gitian-building/create_vm_file_location_size.png) -- Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side +- Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side - Push the `Create` button Get the [Debian 7.8 net installer](http://cdimage.debian.org/cdimage/archive/7.8.0/amd64/iso-cd/debian-7.8.0-amd64-netinst.iso) (a more recent minor version should also work, see also [Debian Network installation](https://www.debian.org/CD/netinst/)). @@ -81,7 +81,7 @@ Unixy OSes by entering the following in a terminal: echo "b712a141bc60269db217d3b3e456179bd6b181645f90e4aac9c42ed63de492e9 debian-7.4.0-amd64-netinst.iso" | sha256sum -c # (must return OK) -After creating the VM, we need to configure it. +After creating the VM, we need to configure it. - Click the `Settings` button, then go to the `Network` tab. Adapter 1 should be attacked to `NAT`. @@ -125,22 +125,22 @@ and proceed, just press `Enter`. To select a different button, press `Tab`. ![](gitian-building/debian_install_4_configure_keyboard.png) - The VM will detect network settings using DHCP, this should all proceed automatically -- Configure the network: +- Configure the network: - System name `debian`. - Leave domain name empty. ![](gitian-building/debian_install_5_configure_the_network.png) -- Choose a root password and enter it twice (remember it for later) +- Choose a root password and enter it twice (remember it for later) ![](gitian-building/debian_install_6a_set_up_root_password.png) -- Name the new user `debian` (the full name doesn't matter, you can leave it empty) +- Name the new user `debian` (the full name doesn't matter, you can leave it empty) ![](gitian-building/debian_install_7_set_up_user_fullname.png) ![](gitian-building/debian_install_8_set_up_username.png) -- Choose a user password and enter it twice (remember it for later) +- Choose a user password and enter it twice (remember it for later) ![](gitian-building/debian_install_9_user_password.png) @@ -150,11 +150,11 @@ and proceed, just press `Enter`. To select a different button, press `Tab`. ![](gitian-building/debian_install_10_configure_clock.png) - Disk setup - - Partitioning method: Guided - Use the entire disk - + - Partitioning method: Guided - Use the entire disk + ![](gitian-building/debian_install_11_partition_disks.png) - - Select disk to partition: SCSI1 (0,0,0) + - Select disk to partition: SCSI1 (0,0,0) ![](gitian-building/debian_install_12_choose_disk.png) @@ -168,7 +168,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`. ![](gitian-building/debian_install_15_write_changes.png) - The base system will be installed, this will take a minute or so -- Choose a mirror (any will do) +- Choose a mirror (any will do) ![](gitian-building/debian_install_16_choose_a_mirror.png) @@ -217,7 +217,7 @@ Replace `root` with `debian` to log in as user. [1] http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html [2] http://winscp.net/eng/index.php -Setting up Debian for gitian building +Setting up Debian for Gitian building -------------------------------------- In this section we will be setting up the Debian installation for Gitian building. @@ -237,7 +237,7 @@ Then set up LXC and the rest with the following, which is a complex jumble of se ```bash # the version of lxc-start in Debian 7.4 needs to run as root, so make sure -# that the build script can exectute it without providing a password +# that the build script can execute it without providing a password echo "%sudo ALL=NOPASSWD: /usr/bin/lxc-start" > /etc/sudoers.d/gitian-lxc # add cgroup for LXC echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab @@ -257,7 +257,7 @@ reboot At the end the VM is rebooted to make sure that the changes take effect. The steps in this section need only to be performed once. -Installing gitian +Installing Gitian ------------------ Re-login as the user `debian` that was created during installation. @@ -277,7 +277,7 @@ cd .. **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*. -Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you want to build. +Clone the git repositories for bitcoin and Gitian and then checkout the bitcoin version that you want to build. ```bash git clone https://github.com/devrandom/gitian-builder.git @@ -287,7 +287,7 @@ git checkout v${VERSION} cd .. ``` -Setting up gitian images +Setting up Gitian images ------------------------- Gitian needs virtual images of the operating system to build in. @@ -313,13 +313,13 @@ Getting and building the inputs Follow the instructions in [doc/release-process.md](release-process.md) in the bitcoin repository under 'Fetch and build inputs' to install sources which require manual intervention. Also follow the next step: 'Seed the Gitian sources cache', which will fetch all necessary source files allowing -for gitian to work offline. +for Gitian to work offline. Building Bitcoin ---------------- -To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perform -gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository. +To build Bitcoin (for Linux, OS X and Windows) just follow the steps under 'perform +Gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository. This may take a long time as it also builds the dependencies needed for each descriptor. These dependencies will be cached after a successful build to avoid rebuilding them when possible. @@ -358,7 +358,7 @@ Building an alternative repository ----------------------------------- If you want to do a test build of a pull on GitHub it can be useful to point -the gitian builder at an alternative repository, using the same descriptors +the Gitian builder at an alternative repository, using the same descriptors and inputs. For example: @@ -388,7 +388,7 @@ in `gitian.sigs` to your signing machine and do ``` This will create the `.sig` files that can be committed together with the `.assert` files to assert your -gitian build. +Gitian build. Uploading signatures --------------------- diff --git a/doc/init.md b/doc/init.md index 1f0559d80643c..4d7ba01f08f37 100644 --- a/doc/init.md +++ b/doc/init.md @@ -34,9 +34,8 @@ generate one from the shell yourself like this: bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo' -Once you have a password in hand, set rpcpassword= in /etc/bitcoin/bitcoin.conf -For an example configuration file that describes the configuration settings, +For an example configuration file that describes the configuration settings, see contrib/debian/examples/bitcoin.conf. 3. Paths @@ -81,7 +80,7 @@ Drop bitcoind.conf in /etc/init. Test by running "service bitcoind start" it will automatically start on reboot. NOTE: This script is incompatible with CentOS 5 and Amazon Linux 2014 as they -use old versions of Upstart and do not supply the start-stop-daemon uitility. +use old versions of Upstart and do not supply the start-stop-daemon utility. 5. Auto-respawn ----------------------------------- @@ -89,4 +88,3 @@ use old versions of Upstart and do not supply the start-stop-daemon uitility. Auto respawning is currently only configured for Upstart and systemd. Reasonable defaults have been chosen but YMMV. - diff --git a/doc/release-process.md b/doc/release-process.md index 8c90243d77edc..06cd84d62a072 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -23,15 +23,15 @@ Release Process * * * -###update gitian +###update Gitian - In order to take advantage of the new caching features in gitian, be sure to update to a recent version (e9741525c or higher is recommended) + In order to take advantage of the new caching features in Gitian, be sure to update to a recent version (e9741525c or higher is recommended) -###perform gitian builds +###perform Gitian builds From a directory containing the bitcoin source, gitian-builder and gitian.sigs - export SIGNER=(your gitian key, ie bluematt, sipa, etc) + export SIGNER=(your Gitian key, ie bluematt, sipa, etc) export VERSION=(new version, e.g. 0.8.0) pushd ./bitcoin git checkout v${VERSION} @@ -39,27 +39,27 @@ Release Process pushd ./gitian-builder ###fetch and build inputs: (first time, or when dependency versions change) - + mkdir -p inputs - Register and download the Apple SDK: (see OSX Readme for details) - + Register and download the Apple SDK: (see OS X Readme for details) + https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg - + Using a Mac, create a tarball for the 10.7 SDK and copy it to the inputs directory: - + tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk ###Optional: Seed the Gitian sources cache - By default, gitian will fetch source files as needed. For offline builds, they can be fetched ahead of time: + By default, Gitian will fetch source files as needed. For offline builds, they can be fetched ahead of time: make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common Only missing files will be fetched, so this is safe to re-run for each build. ###Build Bitcoin Core for Linux, Windows, and OS X: - + ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml ./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../ @@ -76,8 +76,8 @@ Release Process 1. source tarball (bitcoin-${VERSION}.tar.gz) 2. linux 32-bit and 64-bit binaries dist tarballs (bitcoin-${VERSION}-linux[32|64].tar.gz) 3. windows 32-bit and 64-bit installers and dist zips (bitcoin-${VERSION}-win[32|64]-setup.exe, bitcoin-${VERSION}-win[32|64].zip) - 4. OSX unsigned installer (bitcoin-${VERSION}-osx-unsigned.dmg) - 5. Gitian signatures (in gitian.sigs/${VERSION}-/(your gitian key)/ + 4. OS X unsigned installer (bitcoin-${VERSION}-osx-unsigned.dmg) + 5. Gitian signatures (in gitian.sigs/${VERSION}-/(your Gitian key)/ ###Next steps: @@ -91,11 +91,11 @@ Commit your signature to gitian.sigs: git push # Assuming you can push to the gitian.sigs tree popd - Wait for OSX detached signature: - Once the OSX build has 3 matching signatures, Gavin will sign it with the apple App-Store key. + Wait for OS X detached signature: + Once the OS X build has 3 matching signatures, Gavin will sign it with the apple App-Store key. He will then upload a detached signature to be combined with the unsigned app to create a signed binary. - Create the signed OSX binary: + Create the signed OS X binary: pushd ./gitian-builder # Fetch the signature as instructed by Gavin @@ -105,7 +105,7 @@ Commit your signature to gitian.sigs: mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg popd -Commit your signature for the signed OSX binary: +Commit your signature for the signed OS X binary: pushd gitian.sigs git add ${VERSION}-osx-signed/${SIGNER} diff --git a/doc/tor.md b/doc/tor.md index 560f71fa27c39..e3fabfb2a8a37 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -15,15 +15,15 @@ outgoing connections be anonymized, but more is possible. -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy server will be used to try to reach .onion addresses as well. - + -onion=ip:port Set the proxy server to use for tor hidden services. You do not need to set this if it's the same as -proxy. You can use -noonion to explicitly disable access to hidden service. - + -listen When using -proxy, listening is disabled by default. If you want to run a hidden service (see next section), you'll need to enable it explicitly. - + -connect=X When behind a Tor proxy, you can specify .onion addresses instead -addnode=X of IP addresses or hostnames in these parameters. It requires -seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with @@ -55,10 +55,10 @@ your bitcoind's P2P listen port (8333 by default). preference for your node to advertize itself with, for connections coming from unroutable addresses (such as 127.0.0.1, where the Tor proxy typically runs). - + -listen You'll need to enable listening for incoming connections, as this is off by default behind a proxy. - + -discover When -externalip is specified, no attempt is made to discover local IPv4 or IPv6 addresses. If you want to run a dual stack, reachable from both Tor and IPv4 (or IPv6), you'll need to either pass your @@ -82,4 +82,3 @@ If you only want to use Tor to reach onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: ./bitcoin -onion=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -discover - From 38671bff4ed606c8b4db1dd308efc54e72f7d2b5 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 9 Oct 2015 13:40:36 -0700 Subject: [PATCH 24/27] Update debian/changelog and slight tweak to debian/control --- contrib/debian/changelog | 36 ++++++++++++++++++++++++++++++++++++ contrib/debian/control | 3 ++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/contrib/debian/changelog b/contrib/debian/changelog index d1683f420b26f..2843fb904e9ad 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,3 +1,39 @@ +bitcoin (0.10.2-precise1) precise; urgency=medium + + * New upstream release. + + -- Matt Corallo (BlueMatt) Mon, 29 Jun 2015 17:33:00 -1000 + +bitcoin (0.10.1-precise3) precise; urgency=medium + + * Fix build dep (include python). + + -- Matt Corallo (BlueMatt) Tue, 5 May 2015 09:28:00 -1000 + +bitcoin (0.10.1-precise2) precise; urgency=medium + + * Fix miniupnpc dep. + + -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:33:00 -1000 + +bitcoin (0.10.1-precise1) precise; urgency=medium + + * New upstream release. + + -- Matt Corallo (BlueMatt) Tue, 5 May 2015 00:07:00 -1000 + +bitcoin (0.10.0-precise1) precise; urgency=medium + + * New upstream releases. + + -- Matt Corallo (BlueMatt) Wed, 18 Feb 2015 13:22:00 -1000 + +bitcoin (0.9.4-precise1) precise; urgency=high + + * New upstream releases. + + -- Matt Corallo (laptop - only while traveling) Mon, 12 Jan 2015 23:30:00 -1000 + bitcoin (0.9.3-precise1) precise; urgency=medium * New upstream releases. diff --git a/contrib/debian/control b/contrib/debian/control index 5eca0341e3528..7e6363607dfd1 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -20,7 +20,8 @@ Build-Depends: debhelper, qt4-qmake, libqt4-dev, libqrencode-dev, - libprotobuf-dev, protobuf-compiler + libprotobuf-dev, protobuf-compiler, + python Standards-Version: 3.9.2 Homepage: http://www.bitcoin.org/ Vcs-Git: git://github.com/bitcoin/bitcoin.git From 97546fc44c04aa7d157b16ee7edc2778b23c2403 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 9 Oct 2015 15:32:05 -0700 Subject: [PATCH 25/27] Change URLs to https in debian/control --- contrib/debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/debian/control b/contrib/debian/control index 7e6363607dfd1..fff4e472a7c0a 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -23,9 +23,9 @@ Build-Depends: debhelper, libprotobuf-dev, protobuf-compiler, python Standards-Version: 3.9.2 -Homepage: http://www.bitcoin.org/ +Homepage: https://www.bitcoin.org/ Vcs-Git: git://github.com/bitcoin/bitcoin.git -Vcs-Browser: http://github.com/bitcoin/bitcoin +Vcs-Browser: https://github.com/bitcoin/bitcoin Package: bitcoind Architecture: any From 8b3311fb8d99fce4835e4a7f0ae0e9cdd0e40db8 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sun, 18 Oct 2015 21:02:36 +1100 Subject: [PATCH 26/27] *: alias -h for --help --- src/bitcoin-cli.cpp | 2 +- src/bitcoin-tx.cpp | 2 +- src/bitcoind.cpp | 2 +- src/qt/bitcoin.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index ea349b197e5e9..9c85db8c6d351 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -66,7 +66,7 @@ static bool AppInitRPC(int argc, char* argv[]) // Parameters // ParseParameters(argc, argv); - if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) { + if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) { std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n"; if (!mapArgs.count("-version")) { strUsage += "\n" + _("Usage:") + "\n" + diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 3aa2211f978b8..3c8915593ada2 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -44,7 +44,7 @@ static bool AppInitRawTx(int argc, char* argv[]) fCreateBlank = GetBoolArg("-create", false); - if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help")) + if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help")) { // First part of help message is specific to this utility std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" + diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index be7757b0b6ced..f45415015f8c7 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -67,7 +67,7 @@ bool AppInit(int argc, char* argv[]) ParseParameters(argc, argv); // Process help and version before taking care about datadir - if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) + if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) { std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n"; diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index f30df348c5ffc..3ab8adefe49a5 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -537,7 +537,7 @@ int main(int argc, char *argv[]) // Show help message immediately after parsing command-line options (for "-lang") and setting locale, // but before showing splash screen. - if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) + if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) { HelpMessageDialog help(NULL, mapArgs.count("-version")); help.showOrPrint(); From c2e7baf2bdb2e2c163bcadaebe68ee00c9a27e7c Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 9 Nov 2015 15:08:30 +0100 Subject: [PATCH 27/27] Bump version to 0.10.4, add release notes --- configure.ac | 2 +- doc/Doxyfile | 2 +- doc/README.md | 2 +- doc/README_windows.txt | 2 +- doc/release-notes.md | 189 +++++++++++++++++++++-------------------- src/clientversion.h | 2 +- 6 files changed, 103 insertions(+), 96 deletions(-) diff --git a/configure.ac b/configure.ac index 93517fb31c645..aa03489d9da3b 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 10) -define(_CLIENT_VERSION_REVISION, 3) +define(_CLIENT_VERSION_REVISION, 4) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2015) diff --git a/doc/Doxyfile b/doc/Doxyfile index 453ba14d5cec8..0133be2a6183e 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -34,7 +34,7 @@ PROJECT_NAME = Bitcoin # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.10.3 +PROJECT_NUMBER = 0.10.4 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer diff --git a/doc/README.md b/doc/README.md index a5ad4e82f0a40..1dea631ce0192 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Bitcoin Core 0.10.3 +Bitcoin Core 0.10.4 ===================== Setup diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 9065f43621923..f5e09a4615965 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin Core 0.10.2 +Bitcoin Core 0.10.4 ===================== Intro diff --git a/doc/release-notes.md b/doc/release-notes.md index 8a110e562c453..38a2c1347d0b8 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,9 +1,10 @@ -Bitcoin Core version 0.10.3 is now available from: +Bitcoin Core version 0.10.4 is now available from: - + -This is a new minor version release, bringing security fixes and translation -updates. It is recommended to upgrade to this version as soon as possible. +This is a new minor version release, bringing bug fixes, the BIP65 +(CLTV) consensus change, and relay policy preparation for BIP113. It is +recommended to upgrade to this version as soon as possible. Please report bugs using the issue tracker at github: @@ -41,125 +42,131 @@ bootstrap.dat) anew afterwards. It is possible that the data from a completely synchronised 0.10 node may be usable in older versions as-is, but this is not supported and may break as soon as the older version attempts to reindex. -This does not affect wallet forward or backward compatibility. +This does not affect wallet forward or backward compatibility. There are no +known problems when downgrading from 0.11.x to 0.10.x. -Notable changes -=============== +Notable changes since 0.10.3 +============================ -Fix buffer overflow in bundled upnp ------------------------------------- +BIP65 soft fork to enforce OP_CHECKLOCKTIMEVERIFY opcode +-------------------------------------------------------- -Bundled miniupnpc was updated to 1.9.20151008. This fixes a buffer overflow in -the XML parser during initial network discovery. +This release includes several changes related to the [BIP65][] soft fork +which redefines the existing OP_NOP2 opcode as OP_CHECKLOCKTIMEVERIFY +(CLTV) so that a transaction output can be made unspendable until a +specified point in the future. -Details can be found here: http://talosintel.com/reports/TALOS-2015-0035/ +1. This release will only relay and mine transactions spending a CLTV + output if they comply with the BIP65 rules as provided in code. -This applies to the distributed executables only, not when building from source or -using distribution provided packages. +2. This release will produce version 4 blocks by default. Please see the + *notice to miners* below. -Additionally, upnp has been disabled by default. This may result in a lower -number of reachable nodes on IPv4, however this prevents future libupnpc -vulnerabilities from being a structural risk to the network -(see https://github.com/bitcoin/bitcoin/pull/6795). +3. Once 951 out of a sequence of 1,001 blocks on the local node's best block + chain contain version 4 (or higher) blocks, this release will no + longer accept new version 3 blocks and it will only accept version 4 + blocks if they comply with the BIP65 rules for CLTV. -Test for LowS signatures before relaying ------------------------------------------ +For more information about the soft-forking change, please see + -Make the node require the canonical 'low-s' encoding for ECDSA signatures when -relaying or mining. This removes a nuisance malleability vector. +Graphs showing the progress towards block version 4 adoption may be +found at the URLs below: -Consensus behavior is unchanged. +- Block versions over the last 50,000 blocks as progress towards BIP65 + consensus enforcement: -If widely deployed this change would eliminate the last remaining known vector -for nuisance malleability on SIGHASH_ALL P2PKH transactions. On the down-side -it will block most transactions made by sufficiently out of date software. +- Block versions over the last 2,000 blocks showing the days to the + earliest possible BIP65 consensus-enforced block: -Unlike the other avenues to change txids on transactions this -one was randomly violated by all deployed bitcoin software prior to -its discovery. So, while other malleability vectors where made -non-standard as soon as they were discovered, this one has remained -permitted. Even BIP62 did not propose applying this rule to -old version transactions, but conforming implementations have become -much more common since BIP62 was initially written. +**Notice to miners:** Bitcoin Core’s block templates are now for +version 4 blocks only, and any mining software relying on its +getblocktemplate must be updated in parallel to use libblkmaker either +version FIXME or any version from FIXME onward. -Bitcoin Core has produced compatible signatures since a28fb70e in -September 2013, but this didn't make it into a release until 0.9 -in March 2014; Bitcoinj has done so for a similar span of time. -Bitcoinjs and electrum have been more recently updated. +- If you are solo mining, this will affect you the moment you upgrade + Bitcoin Core, which must be done prior to BIP65 achieving its 951/1001 + status. -This does not replace the need for BIP62 or similar, as miners can -still cooperate to break transactions. Nor does it replace the -need for wallet software to handle malleability sanely[1]. This -only eliminates the cheap and irritating DOS attack. +- If you are mining with the stratum mining protocol: this does not + affect you. -[1] On the Malleability of Bitcoin Transactions -Marcin Andrychowicz, Stefan Dziembowski, Daniel Malinowski, Łukasz Mazurek -http://fc15.ifca.ai/preproceedings/bitcoin/paper_9.pdf +- If you are mining with the getblocktemplate protocol to a pool: this + will affect you at the pool operator’s discretion, which must be no + later than BIP65 achieving its 951/1001 status. -Minimum relay fee default increase ------------------------------------ +[BIP65]: https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki -The default for the `-minrelaytxfee` setting has been increased from `0.00001` -to `0.00005`. +Windows bug fix for corrupted UTXO database on unclean shutdowns +---------------------------------------------------------------- -This is necessitated by the current transaction flooding, causing -outrageous memory usage on nodes due to the mempool ballooning. This is a -temporary measure, bridging the time until a dynamic method for determining -this fee is merged (which will be in 0.12). +Several Windows users reported that they often need to reindex the +entire blockchain after an unclean shutdown of Bitcoin Core on Windows +(or an unclean shutdown of Windows itself). Although unclean shutdowns +remain unsafe, this release no longer relies on memory-mapped files for +the UTXO database, which significantly reduced the frequency of unclean +shutdowns leading to required reindexes during testing. -(see https://github.com/bitcoin/bitcoin/pull/6793, as well as the 0.11.0 -release notes, in which this value was suggested) +For more information, see: -0.10.3 Change log +Other fixes for database corruption on Windows are expected in the +next major release. + +0.10.4 Change log ================= -Detailed release notes follow. This overview includes changes that affect external -behavior, not code moves, refactors or string updates. - -- #6186 `e4a7d51` Fix two problems in CSubnet parsing -- #6153 `ebd7d8d` Parameter interaction: disable upnp if -proxy set -- #6203 `ecc96f5` Remove P2SH coinbase flag, no longer interesting -- #6226 `181771b` json: fail read_string if string contains trailing garbage -- #6244 `09334e0` configure: Detect (and reject) LibreSSL -- #6276 `0fd8464` Fix getbalance * 0 -- #6274 `be64204` Add option `-alerts` to opt out of alert system -- #6319 `3f55638` doc: update mailing list address -- #6438 `7e66e9c` openssl: avoid config file load/race -- #6439 `255eced` Updated URL location of netinstall for Debian -- #6412 `0739e6e` Test whether created sockets are select()able -- #6694 `f696ea1` [QT] fix thin space word wrap line brake issue -- #6704 `743cc9e` Backport bugfixes to 0.10 -- #6769 `1cea6b0` Test LowS in standardness, removes nuisance malleability vector. -- #6789 `093d7b5` Update miniupnpc to 1.9.20151008 -- #6795 `f2778e0` net: Disable upnp by default -- #6797 `91ef4d9` Do not store more than 200 timedata samples -- #6793 `842c48d` Bump minrelaytxfee default +Detailed release notes follow. This overview includes changes that affect +behavior, not code moves, refactors and string updates. For convenience in locating +the code changes and accompanying discussion, both the pull request and +git merge commit are mentioned. + +- #6953 `8b3311f` alias -h for --help +- #6953 `97546fc` Change URLs to https in debian/control +- #6953 `38671bf` Update debian/changelog and slight tweak to debian/control +- #6953 `256321e` Correct spelling mistakes in doc folder +- #6953 `eae0350` Clarification of unit test build instructions +- #6953 `90897ab` Update bluematt-key, the old one is long-since revoked +- #6953 `a2f2fb6` build: disable -Wself-assign +- #6953 `cf67d8b` Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) +- #6953 `b3964e3` Drop "with minimal dependencies" from description +- #6953 `43c2789` Split bitcoin-tx into its own package +- #6953 `dfe0d4d` Include bitcoin-tx binary on Debian/Ubuntu +- #6953 `612efe8` [Qt] Raise debug window when requested +- #6953 `3ad96bd` Fix locking in GetTransaction +- #6953 `9c81005` Fix spelling of Qt +- #6946 `94b67e5` Update LevelDB +- #6706 `5dc72f8` CLTV: Add more tests to improve coverage +- #6706 `6a1343b` Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork +- #6706 `4137248` Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic +- #6706 `0e01d0f` Enable CHECKLOCKTIMEVERIFY as a standard script verify flag +- #6706 `6d01325` Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65) +- #6706 `750d54f` Move LOCKTIME_THRESHOLD to src/script/script.h +- #6706 `6897468` Make CScriptNum() take nMaxNumSize as an argument +- #6867 `5297194` Set TCP_NODELAY on P2P sockets +- #6836 `fb818b6` Bring historical release notes up to date +- #6852 `0b3fd07` build: make sure OpenSSL heeds noexecstack Credits ======= Thanks to everyone who directly contributed to this release: -- Adam Weiss - Alex Morcos -- Casey Rodarmor -- Cory Fields -- fanquake +- Daniel Cousens +- Diego Viola +- Eric Lombrozo +- Esteban Ordano - Gregory Maxwell -- Jonas Schnelli -- J Ross Nicoll - Luke Dashjr -- Pavel Vasin +- MarcoFalke +- Matt Corallo +- Micha +- Mitchell Cash +- Peter Todd - Pieter Wuille -- randy-waterhouse -- ฿tcDrak -- Tom Harding -- Veres Lajos - Wladimir J. van der Laan +- Zak Wilcox -And all those who contributed additional code review and/or security research: - -- timothy on IRC for reporting the issue -- Vulnerability in miniupnp discovered by Aleksandar Nikolic of Cisco Talos +And those who contributed additional code review and/or security research. As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). diff --git a/src/clientversion.h b/src/clientversion.h index 6dadd472bd44c..d113962fc6456 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -16,7 +16,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 10 -#define CLIENT_VERSION_REVISION 3 +#define CLIENT_VERSION_REVISION 4 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build