From 084d1ddf8fbfaf153e0ef4f47b4049d60de60c12 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 18 Jul 2016 12:17:57 +0200 Subject: [PATCH 001/302] build: bump version to 0.13.0 --- configure.ac | 6 +++--- doc/Doxyfile | 2 +- doc/README.md | 2 +- doc/README_windows.txt | 2 +- src/clientversion.h | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 011af6bd1bd..19861d24c0b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 12) -define(_CLIENT_VERSION_REVISION, 99) +define(_CLIENT_VERSION_MINOR, 13) +define(_CLIENT_VERSION_REVISION, 0) define(_CLIENT_VERSION_BUILD, 0) -define(_CLIENT_VERSION_IS_RELEASE, false) +define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2016) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]]) diff --git a/doc/Doxyfile b/doc/Doxyfile index 428fba98e1b..93da55fbbe8 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.12.99 +PROJECT_NUMBER = 0.13.0 # 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 c30f29452b7..7aa82e1d527 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Bitcoin Core 0.12.99 +Bitcoin Core 0.13.0 ===================== Setup diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 2d1c4503c91..3f41db14b04 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin Core 0.12.99 +Bitcoin Core 0.13.0 ===================== Intro diff --git a/src/clientversion.h b/src/clientversion.h index 47263d5344f..30f557526a3 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -15,12 +15,12 @@ //! 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 12 -#define CLIENT_VERSION_REVISION 99 +#define CLIENT_VERSION_MINOR 13 +#define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build -#define CLIENT_VERSION_IS_RELEASE false +#define CLIENT_VERSION_IS_RELEASE true /** * Copyright year (2009-this) From 37269105c8817a2922410ec17d976263cd589987 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 18 Jul 2016 14:08:43 +0200 Subject: [PATCH 002/302] build: Release notes update Fill in the header, and move items to the appropriate part of the release notes structure. --- doc/release-notes.md | 144 +++++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 68 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 3d2baaaaeaa..1b69daf3736 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,9 +1,6 @@ -(note: this is a temporary file, to be added-to by anybody, and moved to -release-notes at release time) +Bitcoin Core version 0.13.0 is now available from: -Bitcoin Core version *version* is now available from: - - + This is a new major version release, including new features, various bugfixes and performance improvements, as well as updated translations. @@ -70,18 +67,6 @@ It is recommended to use this for sensitive information such as wallet passphrases, as command-line arguments can usually be read from the process table by any user on the system. -RPC low-level changes ----------------------- - -- `gettxoutsetinfo` UTXO hash (`hash_serialized`) has changed. There was a divergence between - 32-bit and 64-bit platforms, and the txids were missing in the hashed data. This has been - fixed, but this means that the output will be different than from previous versions. - -- Full UTF-8 support in the RPC API. Non-ASCII characters in, for example, - wallet labels have always been malformed because they weren't taken into account - properly in JSON RPC processing. This is no longer the case. This also affects - the GUI debug console. - C++11 and Python 3 ------------------- @@ -115,33 +100,6 @@ possible to resolve them. Note that Android is not considered ARM Linux in this context. The executables are not expected to work out of the box on Android. -0.13.0 Change log -================= - -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. - -### RPC and REST - -Asm script outputs replacements for OP_NOP2 and OP_NOP3 -------------------------------------------------------- - -OP_NOP2 has been renamed to OP_CHECKLOCKTIMEVERIFY by [BIP -65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) - -OP_NOP3 has been renamed to OP_CHECKSEQUENCEVERIFY by [BIP -112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) - -The following outputs are affected by this change: -- RPC `getrawtransaction` (in verbose mode) -- RPC `decoderawtransaction` -- RPC `decodescript` -- REST `/rest/tx/` (JSON format) -- REST `/rest/block/` (JSON format when including extended tx details) -- `bitcoin-tx -json` - New mempool information RPC calls --------------------------------- @@ -149,24 +107,6 @@ RPC calls have been added to output detailed statistics for individual mempool entries, as well as to calculate the in-mempool ancestors or descendants of a transaction: see `getmempoolentry`, `getmempoolancestors`, `getmempooldescendants`. -### ZMQ - -Each ZMQ notification now contains an up-counting sequence number that allows -listeners to detect lost notifications. -The sequence number is always the last element in a multi-part ZMQ notification and -therefore backward compatible. -Each message type has its own counter. -(https://github.com/bitcoin/bitcoin/pull/7762) - -### Configuration and command-line options - -### Block and transaction handling - -### P2P protocol and network code - -The p2p alert system has been removed in #7692 and the 'alert' message is no longer supported. - - Fee filtering of invs (BIP 133) ------------------------------------ @@ -175,12 +115,6 @@ version is bumped to 70013. Upon receiving a feefilter message from a peer, a node will not send invs for any transactions which do not meet the filter feerate. [BIP 133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki) -### Validation - -### Build system - -### Wallet - Hierarchical Deterministic Key Generation ----------------------------------------- Newly created wallets will use hierarchical deterministic key generation @@ -199,9 +133,83 @@ There is no distinction between internal (change) and external keys. [Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) +Low-level P2P changes +---------------------- + +- The P2P alert system has been removed in PR #7692 and the `alert` P2P message + is no longer supported. + +Low-level RPC changes +---------------------- + +- `gettxoutsetinfo` UTXO hash (`hash_serialized`) has changed. There was a divergence between + 32-bit and 64-bit platforms, and the txids were missing in the hashed data. This has been + fixed, but this means that the output will be different than from previous versions. + +- Full UTF-8 support in the RPC API. Non-ASCII characters in, for example, + wallet labels have always been malformed because they weren't taken into account + properly in JSON RPC processing. This is no longer the case. This also affects + the GUI debug console. + +- Asm script outputs replacements for OP_NOP2 and OP_NOP3 + + - OP_NOP2 has been renamed to OP_CHECKLOCKTIMEVERIFY by [BIP +65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) + + - OP_NOP3 has been renamed to OP_CHECKSEQUENCEVERIFY by [BIP +112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) + + - The following outputs are affected by this change: + + - RPC `getrawtransaction` (in verbose mode) + - RPC `decoderawtransaction` + - RPC `decodescript` + - REST `/rest/tx/` (JSON format) + - REST `/rest/block/` (JSON format when including extended tx details) + - `bitcoin-tx -json` + +Low-level ZMQ changes +---------------------- + +- Each ZMQ notification now contains an up-counting sequence number that allows + listeners to detect lost notifications. + The sequence number is always the last element in a multi-part ZMQ notification and + therefore backward compatible. Each message type has its own counter. + PR [#7762](https://github.com/bitcoin/bitcoin/pull/7762). + +0.13.0 Change log +================= + +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. + +### RPC and REST + +### ZMQ + +### Configuration and command-line options + +### Block and transaction handling + +### P2P protocol and network code + +### Validation + +### Build system + +### Wallet + ### GUI ### Tests ### Miscellaneous +Credits +======= + +Thanks to everyone who directly contributed to this release: + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From df854637b14e17adfb70f57aa2c4ea5d066ddeb0 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 18 Jul 2016 16:02:37 +0200 Subject: [PATCH 003/302] Some 0.13 release notes about p2p changes --- doc/release-notes.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 1b69daf3736..93c501e5803 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -115,6 +115,17 @@ version is bumped to 70013. Upon receiving a feefilter message from a peer, a node will not send invs for any transactions which do not meet the filter feerate. [BIP 133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki) +Compact Block support (BIP 152) +------------------------------- + +Support for block relay using the Compact Blocks protocol has been implemented +in PR 8068. + +The primary goal is reducing the bandwidth spikes at relay time, though in many +cases it also reduces propagation relay. It is automatically enabled between +compatible peers. +[BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) + Hierarchical Deterministic Key Generation ----------------------------------------- Newly created wallets will use hierarchical deterministic key generation @@ -139,6 +150,28 @@ Low-level P2P changes - The P2P alert system has been removed in PR #7692 and the `alert` P2P message is no longer supported. +- The transaction relay mechanism used to relay one quarter of all transactions + instantly, while queueing up the rest and sending them out in batch. As + this resulted in chains of dependent transactions being reordered, it + systematically hurt transaction relay. The relay code was redesigned in PRs + #7840 and #8082, and now always batches transactions announcements while also + sorting them according to dependency order. This significantly reduces orphan + transactions. To compensate for the removal of instant relay, the frequency of + batch sending was doubled for outgoing peers. + +- Since PR 7840 the BIP35 mempool command is also subject to batch processing. + +- The maximum size of orphan transactions that are kept in memory until their + ancestors arrive has been raised in PR 8179 from 5000 to 99999 bytes. They + are now also removed from memory when they are included in a block, conflict + with a block, and time out after 20 minutes. + +- We respond at most once to a getaddr request during the lifetime of a + connection since PR 7856. + +- Connections to peers who have recently been the first one to give us a valid + new block or transaction are protected from disconnections since PR 8084. + Low-level RPC changes ---------------------- From 3b38a6a96a955d7b0192ece6ddcc7d750e155d81 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Fri, 15 Jul 2016 11:42:47 +0200 Subject: [PATCH 004/302] [Wallet] Ensure <0.13 clients can't open HD wallets --- doc/release-notes.md | 2 ++ src/wallet/wallet.cpp | 3 +++ src/wallet/wallet.h | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 1b69daf3736..b0efd9b630f 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -131,6 +131,8 @@ You can't disable HD key generation once you have created a HD wallet. There is no distinction between internal (change) and external keys. +HD wallets are incompatible with older versions of Bitcoin Core. + [Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) Low-level P2P changes diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 46ed5421581..ae0a546ea1b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3299,6 +3299,9 @@ bool CWallet::InitLoadWallet() key.MakeNewKey(true); if (!walletInstance->SetHDMasterKey(key)) throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed"); + + // ensure this wallet.dat can only be opened by clients supporting HD + walletInstance->SetMinVersion(FEATURE_HD); } CPubKey newDefaultKey; if (walletInstance->GetKeyFromPool(newDefaultKey)) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index e9d669a7d1e..3a3cb6d8514 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -78,7 +78,8 @@ enum WalletFeature FEATURE_WALLETCRYPT = 40000, // wallet encryption FEATURE_COMPRPUBKEY = 60000, // compressed public keys - FEATURE_LATEST = 60000 + FEATURE_HD = 130000, // Hierarchical key derivation after BIP32 (HD Wallet) + FEATURE_LATEST = FEATURE_COMPRPUBKEY // HD is optional, use FEATURE_COMPRPUBKEY as latest version }; From ded0599281fccc3523e676e9fa43ad631f8ca25f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 18 Jul 2016 15:21:38 +0200 Subject: [PATCH 005/302] doc: Add a few items to release notes Do a few TODOs from #7678: - Removal of internal miner - `mempool`/`NODE_BLOOM` interaction - Sorting of `getrawmempool` output --- doc/release-notes.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 93c501e5803..09b3d47cba1 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -144,6 +144,20 @@ There is no distinction between internal (change) and external keys. [Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) +Removal of internal miner +-------------------------- + +As CPU mining has been useless for a long time, the internal miner has been +removed in this release, and replaced with a simpler implementation for the +test framework. + +The overall result of this is that `setgenerate` RPC call has been removed, as +well as the `-gen` and `-genproclimit` command-line options. + +For testing, the `generate` call can still be used to mine a block, and a new +RPC call `generatetoaddress` has been added to mine to a specific address. This +works with wallet disabled. + Low-level P2P changes ---------------------- @@ -159,18 +173,20 @@ Low-level P2P changes transactions. To compensate for the removal of instant relay, the frequency of batch sending was doubled for outgoing peers. -- Since PR 7840 the BIP35 mempool command is also subject to batch processing. +- Since PR #7840 the BIP35 `mempool` command is also subject to batch processing. + Also the `mempool` message is no longer handled for non-whitelisted peers when + `NODE_BLOOM` is disabled through `-peerbloomfilters=0`. - The maximum size of orphan transactions that are kept in memory until their - ancestors arrive has been raised in PR 8179 from 5000 to 99999 bytes. They + ancestors arrive has been raised in PR #8179 from 5000 to 99999 bytes. They are now also removed from memory when they are included in a block, conflict with a block, and time out after 20 minutes. - We respond at most once to a getaddr request during the lifetime of a - connection since PR 7856. + connection since PR #7856. - Connections to peers who have recently been the first one to give us a valid - new block or transaction are protected from disconnections since PR 8084. + new block or transaction are protected from disconnections since PR #8084. Low-level RPC changes ---------------------- @@ -201,6 +217,8 @@ Low-level RPC changes - REST `/rest/block/` (JSON format when including extended tx details) - `bitcoin-tx -json` +- The sorting of the output of the `getrawmempool` output has changed. + Low-level ZMQ changes ---------------------- From fca1a415cec6b7655448ce8b30778784ab4c181e Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 18 Jul 2016 13:28:26 -0400 Subject: [PATCH 006/302] Rename "block cost" to "block weight" Github-Pull: #8363 Rebased-From: 2c06bae39edfaa9c0855d83377ad8fda09e4fa08 --- qa/rpc-tests/p2p-segwit.py | 6 +++--- src/consensus/consensus.h | 4 ++-- src/init.cpp | 2 +- src/main.cpp | 12 ++++++------ src/main.h | 2 +- src/miner.cpp | 42 +++++++++++++++++++++--------------------- src/miner.h | 4 ++-- src/policy/policy.cpp | 10 +++++----- src/policy/policy.h | 12 ++++++------ src/primitives/block.cpp | 6 +++--- src/primitives/block.h | 4 ++-- src/primitives/transaction.cpp | 4 ++-- src/primitives/transaction.h | 4 ++-- src/rpc/blockchain.cpp | 4 ++-- src/rpc/mining.cpp | 12 ++++++------ src/txmempool.cpp | 4 ++-- src/txmempool.h | 4 ++-- src/wallet/wallet.cpp | 2 +- 18 files changed, 69 insertions(+), 69 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index b30d41af929..fa2c5d1f05e 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -1065,12 +1065,12 @@ def test_block_relay(self, segwit_activated): assert_equal(wit_block.serialize(False), non_wit_block.serialize()) assert_equal(wit_block.serialize(True), block.serialize(True)) - # Test size, vsize, cost + # Test size, vsize, weight rpc_details = self.nodes[0].getblock(block.hash, True) assert_equal(rpc_details["size"], len(block.serialize(True))) assert_equal(rpc_details["strippedsize"], len(block.serialize(False))) - cost = 3*len(block.serialize(False)) + len(block.serialize(True)) - assert_equal(rpc_details["cost"], cost) + weight = 3*len(block.serialize(False)) + len(block.serialize(True)) + assert_equal(rpc_details["weight"], weight) # Upgraded node should not ask for blocks from unupgraded block4 = self.build_next_block(nVersion=4) diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h index 81f40593b21..69085658660 100644 --- a/src/consensus/consensus.h +++ b/src/consensus/consensus.h @@ -10,8 +10,8 @@ /** The maximum allowed size for a serialized block, in bytes (only for buffer size limits) */ static const unsigned int MAX_BLOCK_SERIALIZED_SIZE = 4000000; -/** The maximum allowed cost for a block, see BIP 141 (network rule) */ -static const unsigned int MAX_BLOCK_COST = 4000000; +/** The maximum allowed weight for a block, see BIP 141 (network rule) */ +static const unsigned int MAX_BLOCK_WEIGHT = 4000000; /** The maximum allowed size for a block excluding witness data, in bytes (network rule) */ static const unsigned int MAX_BLOCK_BASE_SIZE = 1000000; /** The maximum allowed number of signature check operations in a block (network rule) */ diff --git a/src/init.cpp b/src/init.cpp index 509bc45f516..312dfe1699c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -452,7 +452,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-mempoolreplacement", strprintf(_("Enable transaction replacement in the memory pool (default: %u)"), DEFAULT_ENABLE_REPLACEMENT)); strUsage += HelpMessageGroup(_("Block creation options:")); - strUsage += HelpMessageOpt("-blockmaxcost=", strprintf(_("Set maximum BIP141 block cost (default: %d)"), DEFAULT_BLOCK_MAX_COST)); + strUsage += HelpMessageOpt("-blockmaxweight=", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT)); strUsage += HelpMessageOpt("-blockmaxsize=", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE)); strUsage += HelpMessageOpt("-blockprioritysize=", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE)); if (showDebug) diff --git a/src/main.cpp b/src/main.cpp index 73fbe53afb6..fe19895f5fb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -694,8 +694,8 @@ bool AddOrphanTx(const CTransaction& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(c // have been mined or received. // 100 orphans, each of which is at most 99,999 bytes big is // at most 10 megabytes of orphans and somewhat more byprev index (in the worst case): - unsigned int sz = GetTransactionCost(tx); - if (sz >= MAX_STANDARD_TX_COST) + unsigned int sz = GetTransactionWeight(tx); + if (sz >= MAX_STANDARD_TX_WEIGHT) { LogPrint("mempool", "ignoring large orphan tx (size: %u, hash: %s)\n", sz, hash.ToString()); return false; @@ -3596,13 +3596,13 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn } // After the coinbase witness nonce and commitment are verified, - // we can check if the block cost passes (before we've checked the - // coinbase witness, it would be possible for the cost to be too + // we can check if the block weight passes (before we've checked the + // coinbase witness, it would be possible for the weight to be too // large by filling up the coinbase witness, which doesn't change // the block hash, so we couldn't mark the block as permanently // failed). - if (GetBlockCost(block) > MAX_BLOCK_COST) { - return state.DoS(100, error("ContextualCheckBlock(): cost limit failed"), REJECT_INVALID, "bad-blk-cost"); + if (GetBlockWeight(block) > MAX_BLOCK_WEIGHT) { + return state.DoS(100, error("ContextualCheckBlock(): weight limit failed"), REJECT_INVALID, "bad-blk-weight"); } return true; diff --git a/src/main.h b/src/main.h index 65ae2488f90..27121890f6d 100644 --- a/src/main.h +++ b/src/main.h @@ -155,7 +155,7 @@ typedef boost::unordered_map BlockMap; extern BlockMap mapBlockIndex; extern uint64_t nLastBlockTx; extern uint64_t nLastBlockSize; -extern uint64_t nLastBlockCost; +extern uint64_t nLastBlockWeight; extern const std::string strMessageMagic; extern CWaitableCriticalSection csBestBlock; extern CConditionVariable cvBlockChange; diff --git a/src/miner.cpp b/src/miner.cpp index 8153fb9f9ec..25a5becf93e 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -45,7 +45,7 @@ using namespace std; uint64_t nLastBlockTx = 0; uint64_t nLastBlockSize = 0; -uint64_t nLastBlockCost = 0; +uint64_t nLastBlockWeight = 0; class ScoreCompare { @@ -77,30 +77,30 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams) : chainparams(_chainparams) { // Block resource limits - // If neither -blockmaxsize or -blockmaxcost is given, limit to DEFAULT_BLOCK_MAX_* + // If neither -blockmaxsize or -blockmaxweight is given, limit to DEFAULT_BLOCK_MAX_* // If only one is given, only restrict the specified resource. // If both are given, restrict both. - nBlockMaxCost = DEFAULT_BLOCK_MAX_COST; + nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT; nBlockMaxSize = DEFAULT_BLOCK_MAX_SIZE; - bool fCostSet = false; - if (mapArgs.count("-blockmaxcost")) { - nBlockMaxCost = GetArg("-blockmaxcost", DEFAULT_BLOCK_MAX_COST); + bool fWeightSet = false; + if (mapArgs.count("-blockmaxweight")) { + nBlockMaxWeight = GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT); nBlockMaxSize = MAX_BLOCK_SERIALIZED_SIZE; - fCostSet = true; + fWeightSet = true; } if (mapArgs.count("-blockmaxsize")) { nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE); - if (!fCostSet) { - nBlockMaxCost = nBlockMaxSize * WITNESS_SCALE_FACTOR; + if (!fWeightSet) { + nBlockMaxWeight = nBlockMaxSize * WITNESS_SCALE_FACTOR; } } - // Limit cost to between 4K and MAX_BLOCK_COST-4K for sanity: - nBlockMaxCost = std::max((unsigned int)4000, std::min((unsigned int)(MAX_BLOCK_COST-4000), nBlockMaxCost)); + // Limit weight to between 4K and MAX_BLOCK_WEIGHT-4K for sanity: + nBlockMaxWeight = std::max((unsigned int)4000, std::min((unsigned int)(MAX_BLOCK_WEIGHT-4000), nBlockMaxWeight)); // Limit size to between 1K and MAX_BLOCK_SERIALIZED_SIZE-1K for sanity: nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SERIALIZED_SIZE-1000), nBlockMaxSize)); - // Whether we need to account for byte usage (in addition to cost usage) + // Whether we need to account for byte usage (in addition to weight usage) fNeedSizeAccounting = (nBlockMaxSize < MAX_BLOCK_SERIALIZED_SIZE-1000); } @@ -110,7 +110,7 @@ void BlockAssembler::resetBlock() // Reserve space for coinbase tx nBlockSize = 1000; - nBlockCost = 4000; + nBlockWeight = 4000; nBlockSigOpsCost = 400; fIncludeWitness = false; @@ -167,7 +167,7 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) nLastBlockTx = nBlockTx; nLastBlockSize = nBlockSize; - nLastBlockCost = nBlockCost; + nLastBlockWeight = nBlockWeight; LogPrintf("CreateNewBlock(): total size %u txs: %u fees: %ld sigops %d\n", nBlockSize, nBlockTx, nFees, nBlockSigOpsCost); // Create coinbase transaction. @@ -223,8 +223,8 @@ void BlockAssembler::onlyUnconfirmed(CTxMemPool::setEntries& testSet) bool BlockAssembler::TestPackage(uint64_t packageSize, int64_t packageSigOpsCost) { - // TODO: switch to cost-based accounting for packages instead of vsize-based accounting. - if (nBlockCost + WITNESS_SCALE_FACTOR * packageSize >= nBlockMaxCost) + // TODO: switch to weight-based accounting for packages instead of vsize-based accounting. + if (nBlockWeight + WITNESS_SCALE_FACTOR * packageSize >= nBlockMaxWeight) return false; if (nBlockSigOpsCost + packageSigOpsCost >= MAX_BLOCK_SIGOPS_COST) return false; @@ -257,17 +257,17 @@ bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& packa bool BlockAssembler::TestForBlock(CTxMemPool::txiter iter) { - if (nBlockCost + iter->GetTxCost() >= nBlockMaxCost) { + if (nBlockWeight + iter->GetTxWeight() >= nBlockMaxWeight) { // If the block is so close to full that no more txs will fit // or if we've tried more than 50 times to fill remaining space // then flag that the block is finished - if (nBlockCost > nBlockMaxCost - 400 || lastFewTxs > 50) { + if (nBlockWeight > nBlockMaxWeight - 400 || lastFewTxs > 50) { blockFinished = true; return false; } - // Once we're within 4000 cost of a full block, only look at 50 more txs + // Once we're within 4000 weight of a full block, only look at 50 more txs // to try to fill the remaining space. - if (nBlockCost > nBlockMaxCost - 4000) { + if (nBlockWeight > nBlockMaxWeight - 4000) { lastFewTxs++; } return false; @@ -315,7 +315,7 @@ void BlockAssembler::AddToBlock(CTxMemPool::txiter iter) if (fNeedSizeAccounting) { nBlockSize += ::GetSerializeSize(iter->GetTx(), SER_NETWORK, PROTOCOL_VERSION); } - nBlockCost += iter->GetTxCost(); + nBlockWeight += iter->GetTxWeight(); ++nBlockTx; nBlockSigOpsCost += iter->GetSigOpCost(); nFees += iter->GetFee(); diff --git a/src/miner.h b/src/miner.h index d16e37bb599..11753f5e437 100644 --- a/src/miner.h +++ b/src/miner.h @@ -141,11 +141,11 @@ class BlockAssembler // Configuration parameters for the block size bool fIncludeWitness; - unsigned int nBlockMaxCost, nBlockMaxSize; + unsigned int nBlockMaxWeight, nBlockMaxSize; bool fNeedSizeAccounting; // Information on the current status of the block - uint64_t nBlockCost; + uint64_t nBlockWeight; uint64_t nBlockSize; uint64_t nBlockTx; uint64_t nBlockSigOpsCost; diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index f2148bfe105..8617db00c86 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -64,8 +64,8 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason) // almost as much to process as they cost the sender in fees, because // computing signature hashes is O(ninputs*txsize). Limiting transactions // to MAX_STANDARD_TX_SIZE mitigates CPU exhaustion attacks. - unsigned int sz = GetTransactionCost(tx); - if (sz >= MAX_STANDARD_TX_COST) { + unsigned int sz = GetTransactionWeight(tx); + if (sz >= MAX_STANDARD_TX_WEIGHT) { reason = "tx-size"; return false; } @@ -151,12 +151,12 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) return true; } -int64_t GetVirtualTransactionSize(int64_t nCost) +int64_t GetVirtualTransactionSize(int64_t nWeight) { - return (nCost + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; + return (nWeight + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; } int64_t GetVirtualTransactionSize(const CTransaction& tx) { - return GetVirtualTransactionSize(GetTransactionCost(tx)); + return GetVirtualTransactionSize(GetTransactionWeight(tx)); } diff --git a/src/policy/policy.h b/src/policy/policy.h index 29a8cc57c20..f5f8652fb5a 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -18,10 +18,10 @@ class CCoinsViewCache; static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000; /** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/ static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 0; -/** Default for -blockmaxcost, which control the range of block costs the mining code will create **/ -static const unsigned int DEFAULT_BLOCK_MAX_COST = 3000000; -/** The maximum size for transactions we're willing to relay/mine */ -static const unsigned int MAX_STANDARD_TX_COST = 400000; +/** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/ +static const unsigned int DEFAULT_BLOCK_MAX_WEIGHT = 3000000; +/** The maximum weight for transactions we're willing to relay/mine */ +static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000; /** Maximum number of signature check operations in an IsStandard() P2SH script */ static const unsigned int MAX_P2SH_SIGOPS = 15; /** The maximum number of sigops we're willing to relay/mine in a single tx */ @@ -66,8 +66,8 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason); */ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs); -/** Compute the virtual transaction size (cost reinterpreted as bytes). */ -int64_t GetVirtualTransactionSize(int64_t nCost); +/** Compute the virtual transaction size (weight reinterpreted as bytes). */ +int64_t GetVirtualTransactionSize(int64_t nWeight); int64_t GetVirtualTransactionSize(const CTransaction& tx); #endif // BITCOIN_POLICY_POLICY_H diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index df900388f26..0e6ab4dd718 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -32,11 +32,11 @@ std::string CBlock::ToString() const return s.str(); } -int64_t GetBlockCost(const CBlock& block) +int64_t GetBlockWeight(const CBlock& block) { - // This implements the cost = (stripped_size * 4) + witness_size formula, + // This implements the weight = (stripped_size * 4) + witness_size formula, // using only serialization with and without witness data. As witness_size // is equal to total_size - stripped_size, this formula is identical to: - // cost = (stripped_size * 3) + total_size. + // weight = (stripped_size * 3) + total_size. return ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION); } diff --git a/src/primitives/block.h b/src/primitives/block.h index e2a309e63d8..72dfed985ae 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -154,7 +154,7 @@ struct CBlockLocator } }; -/** Compute the consensus-critical block cost (see BIP 141). */ -int64_t GetBlockCost(const CBlock& tx); +/** Compute the consensus-critical block weight (see BIP 141). */ +int64_t GetBlockWeight(const CBlock& tx); #endif // BITCOIN_PRIMITIVES_BLOCK_H diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 7f10409c053..8d638056436 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -121,7 +121,7 @@ unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const // Providing any more cleanup incentive than making additional inputs free would // risk encouraging people to create junk outputs to redeem later. if (nTxSize == 0) - nTxSize = (GetTransactionCost(*this) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; + nTxSize = (GetTransactionWeight(*this) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; for (std::vector::const_iterator it(vin.begin()); it != vin.end(); ++it) { unsigned int offset = 41U + std::min(110U, (unsigned int)it->scriptSig.size()); @@ -149,7 +149,7 @@ std::string CTransaction::ToString() const return str; } -int64_t GetTransactionCost(const CTransaction& tx) +int64_t GetTransactionWeight(const CTransaction& tx) { return ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR -1) + ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); } diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 8a2d5dd22c8..d37890667f9 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -459,7 +459,7 @@ struct CMutableTransaction uint256 GetHash() const; }; -/** Compute the cost of a transaction, as defined by BIP 141 */ -int64_t GetTransactionCost(const CTransaction &tx); +/** Compute the weight of a transaction, as defined by BIP 141 */ +int64_t GetTransactionWeight(const CTransaction &tx); #endif // BITCOIN_PRIMITIVES_TRANSACTION_H diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 20eefa1c574..9dc896b7af2 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -101,7 +101,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx result.push_back(Pair("confirmations", confirmations)); result.push_back(Pair("strippedsize", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS))); result.push_back(Pair("size", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION))); - result.push_back(Pair("cost", (int)::GetBlockCost(block))); + result.push_back(Pair("weight", (int)::GetBlockWeight(block))); result.push_back(Pair("height", blockindex->nHeight)); result.push_back(Pair("version", block.nVersion)); result.push_back(Pair("versionHex", strprintf("%08x", block.nVersion))); @@ -559,7 +559,7 @@ UniValue getblock(const UniValue& params, bool fHelp) " \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n" " \"size\" : n, (numeric) The block size\n" " \"strippedsize\" : n, (numeric) The block size excluding witness data\n" - " \"cost\" : n (numeric) The block cost\n" + " \"weight\" : n (numeric) The block weight (BIP 141)\n" " \"height\" : n, (numeric) The block height or index\n" " \"version\" : n, (numeric) The block version\n" " \"versionHex\" : \"00000000\", (string) The block version formatted in hexadecimal\n" diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 4c4e5997818..92ca4bab6bc 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -224,7 +224,7 @@ UniValue getmininginfo(const UniValue& params, bool fHelp) "{\n" " \"blocks\": nnn, (numeric) The current block\n" " \"currentblocksize\": nnn, (numeric) The last block size\n" - " \"currentblockcost\": nnn, (numeric) The last block cost\n" + " \"currentblockweight\": nnn, (numeric) The last block weight\n" " \"currentblocktx\": nnn, (numeric) The last block transaction\n" " \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n" " \"errors\": \"...\" (string) Current errors\n" @@ -243,7 +243,7 @@ UniValue getmininginfo(const UniValue& params, bool fHelp) UniValue obj(UniValue::VOBJ); obj.push_back(Pair("blocks", (int)chainActive.Height())); obj.push_back(Pair("currentblocksize", (uint64_t)nLastBlockSize)); - obj.push_back(Pair("currentblockcost", (uint64_t)nLastBlockCost)); + obj.push_back(Pair("currentblockweight", (uint64_t)nLastBlockWeight)); obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx)); obj.push_back(Pair("difficulty", (double)GetDifficulty())); obj.push_back(Pair("errors", GetWarnings("statusbar"))); @@ -358,7 +358,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) " ],\n" " \"fee\": n, (numeric) difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one\n" " \"sigops\" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero\n" - " \"cost\" : n, (numeric) total transaction size cost, as counted for purposes of block limits\n" + " \"weight\" : n, (numeric) total transaction weight, as counted for purposes of block limits\n" " \"required\" : true|false (boolean) if provided and true, this transaction must be in the final block\n" " }\n" " ,...\n" @@ -377,7 +377,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) " \"noncerange\" : \"00000000ffffffff\", (string) A range of valid nonces\n" " \"sigoplimit\" : n, (numeric) cost limit of sigops in blocks\n" " \"sizelimit\" : n, (numeric) limit of block size\n" - " \"costlimit\" : n, (numeric) limit of block cost\n" + " \"weightlimit\" : n, (numeric) limit of block weight\n" " \"curtime\" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n" " \"bits\" : \"xxx\", (string) compressed target of next block\n" " \"height\" : n (numeric) The height of the next block\n" @@ -575,7 +575,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) int index_in_template = i - 1; entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template])); entry.push_back(Pair("sigops", pblocktemplate->vTxSigOpsCost[index_in_template])); - entry.push_back(Pair("cost", GetTransactionCost(tx))); + entry.push_back(Pair("weight", GetTransactionWeight(tx))); transactions.push_back(entry); } @@ -659,7 +659,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) result.push_back(Pair("noncerange", "00000000ffffffff")); result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS_COST)); result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE)); - result.push_back(Pair("costlimit", (int64_t)MAX_BLOCK_COST)); + result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT)); result.push_back(Pair("curtime", pblock->GetBlockTime())); result.push_back(Pair("bits", strprintf("%08x", pblock->nBits))); result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1))); diff --git a/src/txmempool.cpp b/src/txmempool.cpp index a48a6d94659..691baa67440 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -28,7 +28,7 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee, hadNoDependencies(poolHasNoInputsOf), inChainInputValue(_inChainInputValue), spendsCoinbase(_spendsCoinbase), sigOpCost(_sigOpsCost), lockPoints(lp) { - nTxCost = GetTransactionCost(_tx); + nTxWeight = GetTransactionWeight(_tx); nModSize = _tx.CalculateModifiedSize(GetTxSize()); nUsageSize = RecursiveDynamicUsage(*tx) + memusage::DynamicUsage(tx); @@ -75,7 +75,7 @@ void CTxMemPoolEntry::UpdateLockPoints(const LockPoints& lp) size_t CTxMemPoolEntry::GetTxSize() const { - return GetVirtualTransactionSize(nTxCost); + return GetVirtualTransactionSize(nTxWeight); } // Update the given tx for any in-mempool descendants. diff --git a/src/txmempool.h b/src/txmempool.h index e5a500e19d4..2c2127f326d 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -78,7 +78,7 @@ class CTxMemPoolEntry private: std::shared_ptr tx; CAmount nFee; //!< Cached to avoid expensive parent-transaction lookups - size_t nTxCost; //!< ... and avoid recomputing tx cost (also used for GetTxSize()) + size_t nTxWeight; //!< ... and avoid recomputing tx weight (also used for GetTxSize()) size_t nModSize; //!< ... and modified size for priority size_t nUsageSize; //!< ... and total memory usage int64_t nTime; //!< Local time when entering the mempool @@ -122,7 +122,7 @@ class CTxMemPoolEntry double GetPriority(unsigned int currentHeight) const; const CAmount& GetFee() const { return nFee; } size_t GetTxSize() const; - size_t GetTxCost() const { return nTxCost; } + size_t GetTxWeight() const { return nTxWeight; } int64_t GetTime() const { return nTime; } unsigned int GetHeight() const { return entryHeight; } bool WasClearAtEntry() const { return hadNoDependencies; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 46ed5421581..4b6d98025d5 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2356,7 +2356,7 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt *static_cast(&wtxNew) = CTransaction(txNew); // Limit size - if (GetTransactionCost(txNew) >= MAX_STANDARD_TX_COST) + if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT) { strFailReason = _("Transaction too large"); return false; From ec8f5fc8b5f68ddf7fed0d74a5ec82e6b03f7f92 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 19 Jul 2016 12:23:55 +0200 Subject: [PATCH 007/302] doc: Add list of pulls and authors to release notes --- doc/release-notes.md | 479 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 470 insertions(+), 9 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 1d358cbfd5c..c631c66c0cb 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -220,31 +220,492 @@ behavior, not code moves, refactors and string updates. For convenience in locat the code changes and accompanying discussion, both the pull request and git merge commit are mentioned. -### RPC and REST - -### ZMQ - -### Configuration and command-line options +### RPC and other APIs + +- #7156 `9ee02cf` Remove cs_main lock from `createrawtransaction` (laanwj) +- #7326 `2cd004b` Fix typo, wrong information in gettxout help text (paveljanik) +- #7222 `82429d0` Indicate which transactions are signaling opt-in RBF (sdaftuar) +- #7480 `b49a623` Changed getnetworkhps value to double to avoid overflow (instagibbs) +- #7550 `8b958ab` Input-from-stdin mode for bitcoin-cli (laanwj) +- #7670 `c9a1265` Use cached block hash in blockToJSON() (rat4) +- #7726 `9af69fa` Correct importaddress help reference to importpubkey (CypherGrue) +- #7766 `16555b6` Register calls where they are defined (laanwj) +- #7797 `e662a76` Fix generatetoaddress failing to parse address (mruddy) +- #7774 `916b15a` Add versionHex in getblock and getblockheader JSON results (mruddy) +- #7863 `72c54e3` Getblockchaininfo: make bip9_softforks an object, not an array (rustyrussell) +- #7842 `d97101e` Do not print minping time in getpeerinfo when no ping received yet (paveljanik) +- #7518 `be14ca5` Add multiple options to fundrawtransaction (promag) +- #7756 `9e47fce` Add cursor to iterate over utxo set, use this in `gettxoutsetinfo` (laanwj) +- #7848 `88616d2` Divergence between 32- and 64-bit when hashing >4GB affects `gettxoutsetinfo` (laanwj) +- #7827 `4205ad7` Speed up `getchaintips` (mrbandrews) +- #7762 `a1eb344` Append a message sequence number to every ZMQ notification (jonasschnelli) +- #7688 `46880ed` List solvability in listunspent output and improve help (sipa) +- #7926 `5725807` Push back `getaddednodeinfo` dead value (instagibbs) +- #7953 `0630353` Create `signmessagewithprivkey` rpc (achow101) +- #8049 `c028c7b` Expose information on whether transaction relay is enabled in `getnetworkinfo` (laanwj) +- #7967 `8c1e49b` Add feerate option to `fundrawtransaction` (jonasschnelli) +- #8118 `9b6a48c` Reduce unnecessary hashing in `signrawtransaction` (jonasnick) +- #7957 `79004d4` Add support for transaction sequence number (jonasschnelli) +- #8153 `75ec320` `fundrawtransaction` feeRate: Use BTC/kB (MarcoFalke) +- #7292 `7ce9ac5` Expose ancestor/descendant information over RPC (sdaftuar) +- #8171 `62fcf27` Fix createrawtx sequence number unsigned int parsing (jonasschnelli) +- #7892 `9c3d0fa` Add full UTF-8 support to RPC (laanwj) +- #8317 `304eff3` Don't use floating point in rpcwallet (MarcoFalke) +- #8258 `5a06ebb` Hide softfork in `getblockchaininfo` if timeout is 0 (jl2012) +- #8244 `1922e5a` Remove unnecessary LOCK(cs_main) in getrawmempool (dcousens) ### Block and transaction handling +- #7056 `6a07208` Save last db read (morcos) +- #6842 `0192806` Limitfreerelay edge case bugfix (ptschip) +- #7084 `11d74f6` Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee in mempool (MarcoFalke) +- #7539 `9f33dba` Add tags to mempool's mapTx indices (sdaftuar) +- #7592 `26a2a72` Re-remove ERROR logging for mempool rejects (laanwj) +- #7187 `14d6324` Keep reorgs fast for SequenceLocks checks (morcos) +- #7594 `01f4267` Mempool: Add tracking of ancestor packages (sdaftuar) +- #7904 `fc9e334` Txdb: Fix assert crash in new UTXO set cursor (laanwj) +- #7927 `f9c2ac7` Minor changes to dbwrapper to simplify support for other databases (laanwj) +- #7933 `e26b620` Fix OOM when deserializing UTXO entries with invalid length (sipa) +- #8020 `5e374f7` Use SipHash-2-4 for various non-cryptographic hashes (sipa) +- #8076 `d720980` VerifyDB: don't check blocks that have been pruned (sdaftuar) +- #8080 `862fd24` Do not use mempool for GETDATA for tx accepted after the last mempool req (gmaxwell) +- #7997 `a82f033` Replace mapNextTx with slimmer setSpends (kazcw) +- #8220 `1f86d64` Stop trimming when mapTx is empty (sipa) +- #8273 `396f9d6` Bump `-dbcache` default to 300MiB (laanwj) +- #7225 `eb33179` Eliminate unnecessary call to CheckBlock (sdaftuar) +- #7907 `006cdf6` Optimize and Cleanup CScript::FindAndDelete (pstratem) +- #7917 `239d419` Optimize reindex (sipa) +- #7763 `3081fb9` Put hex-encoded version in UpdateTip (sipa) +- #8149 `d612837` Testnet-only segregated witness (sipa) +- #8305 `3730393` Improve handling of unconnecting headers (sdaftuar) +- #8363 `fca1a41` Rename "block cost" to "block weight" (sdaftuar) + ### P2P protocol and network code -### Validation +- #6589 `dc0305d` Log bytes recv/sent per command (jonasschnelli) +- #7164 `3b43cad` Do not download transactions during initial blockchain sync (ptschip) +- #7458 `898fedf` peers.dat, banlist.dat recreated when missing (kirkalx) +- #7637 `3da5d1b` Fix memleak in TorController (laanwj, jonasschnelli) +- #7553 `9f14e5a` Remove vfReachable and modify IsReachable to only use vfLimited (pstratem) +- #7708 `9426632` De-neuter NODE_BLOOM (pstratem) +- #7692 `29b2be6` Remove P2P alert system (btcdrak) +- #7542 `c946a15` Implement "feefilter" P2P message (morcos) +- #7573 `352fd57` Add `-maxtimeadjustment` command line option (mruddy) +- #7570 `232592a` Add IPv6 Link-Local Address Support (mruddy) +- #7874 `e6a4d48` Improve AlreadyHave (morcos) +- #7856 `64e71b3` Only send one GetAddr response per connection (gmaxwell) +- #7868 `7daa3ad` Split DNS resolving functionality out of net structures (theuni) +- #7919 `7617682` Fix headers announcements edge case (sdaftuar) +- #7514 `d9594bf` Fix IsInitialBlockDownload for testnet (jmacwhyte) +- #7959 `03cf6e8` fix race that could fail to persist a ban (kazcw) +- #7840 `3b9a0bf` Several performance and privacy improvements to inv/mempool handling (sipa) +- #8011 `65aecda` Don't run ThreadMessageHandler at lowered priority (kazcw) +- #7696 `5c3f8dd` Fix de-serialization bug where AddrMan is left corrupted (EthanHeilman) +- #7932 `ed749bd` CAddrMan::Deserialize handle corrupt serializations better (pstratem) +- #7906 `83121cc` Prerequisites for p2p encapsulation changes (theuni) +- #8033 `18436d8` Fix Socks5() connect failures to be less noisy and less unnecessarily scary (wtogami) +- #8082 `01d8359` Defer inserting into maprelay until just before relaying (gmaxwell) +- #7960 `6a22373` Only use AddInventoryKnown for transactions (sdaftuar) +- #8078 `2156fa2` Disable the mempool P2P command when bloom filters disabled (petertodd) +- #8065 `67c91f8` Addrman offline attempts (gmaxwell) +- #7703 `761cddb` Tor: Change auth order to only use password auth if -torpassword (laanwj) +- #8083 `cd0c513` Add support for dnsseeds with option to filter by servicebits (jonasschnelli) +- #8173 `4286f43` Use SipHash for node eviction (sipa) +- #8154 `1445835` Drop vAddrToSend after sending big addr message (kazcw) +- #7749 `be9711e` Enforce expected outbound services (sipa) +- #8208 `0a64777` Do not set extra flags for unfiltered DNS seed results (sipa) +- #8084 `e4bb4a8` Add recently accepted blocks and txn to AttemptToEvictConnection (gmaxwell) +- #8113 `3f89a53` Rework addnode behaviour (sipa) +- #8179 `94ab58b` Evict orphans which are included or precluded by accepted blocks (gmaxwell) +- #8068 `e9d76a1` Compact Blocks (TheBlueMatt) +- #8204 `0833894` Update petertodd's testnet seed (petertodd) +- #8247 `5cd35d3` Mark my dnsseed as supporting filtering (sipa) +- #8275 `042c323` Remove bad chain alert partition check (btcdrak) +- #8271 `1bc9c80` Do not send witnesses in cmpctblock (sipa) +- #8312 `ca40ef6` Fix mempool DoS vulnerability from malleated transactions (sdaftuar) +- #7180 `16ccb74` Account for `sendheaders` `verack` messages (laanwj) +- #8102 `425278d` Bugfix: use global ::fRelayTxes instead of CNode in version send (sipa) ### Build system -### Wallet +- #7302 `41f1a3e` C++11 build/runtime fixes (theuni) +- #7322 `fd9356b` c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locally (theuni) +- #7441 `a6771fc` Use Debian 8.3 in gitian build guide (fanquake) +- #7349 `152a821` Build against system UniValue when available (luke-jr) +- #7520 `621940e` LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead (paveljanik) +- #7528 `9b9bfce` autogen.sh: warn about needing autoconf if autoreconf is not found (knocte) +- #7504 `19324cf` Crystal clean make clean (paveljanik) +- #7619 `18b3f1b` Add missing sudo entry in gitian VM setup (btcdrak) +- #7616 `639ec58` [depends] Delete unused patches (MarcoFalke) +- #7658 `c15eb28` Add curl to Gitian setup instructions (btcdrak) +- #7710 `909b72b` [Depends] Bump miniupnpc and config.guess+sub (fanquake) +- #7723 `5131005` build: python 3 compatibility (laanwj) +- #7477 `28ad4d9` Fix quoting of copyright holders in configure.ac (domob1812) +- #7711 `a67bc5e` [build-aux] Update Boost & check macros to latest serials (fanquake) +- #7788 `4dc1b3a` Use relative paths instead of absolute paths in protoc calls (paveljanik) +- #7809 `bbd210d` depends: some base fixes/changes (theuni) +- #7603 `73fc922` Build System: Use PACKAGE_TARNAME in NSIS script (JeremyRand) +- #7905 `187186b` test: move accounting_tests and rpc_wallet_tests to wallet/test (laanwj) +- #7911 `351abf9` leveldb: integrate leveldb into our buildsystem (theuni) +- #7944 `a407807` Re-instate TARGET_OS=linux in configure.ac. Removed by 351abf9e035 (randy-waterhouse) +- #7920 `c3e3cfb` Switch Travis to Trusty (theuni) +- #7954 `08b37c5` build: quiet annoying warnings without adding new ones (theuni) +- #7165 `06162f1` build: Enable C++11 in build, require C++11 compiler (laanwj) +- #7982 `559fbae` build: No need to check for leveldb atomics (theuni) +- #8002 `f9b4582` [depends] Add -stdlib=libc++ to darwin CXX flags (fanquake) +- #7993 `6a034ed` [depends] Bump Freetype, ccache, ZeroMQ, miniupnpc, expat (fanquake) +- #8167 `19ea173` Ship debug tarballs/zips with debug symbols (theuni) +- #8175 `f0299d8` Add --disable-bench to config flags for windows (laanwj) +- #7283 `fd9881a` [gitian] Default reference_datetime to commit author date (MarcoFalke) +- #8181 `9201ce8` Get rid of `CLIENT_DATE` (laanwj) +- #8133 `fde0ac4` Finish up out-of-tree changes (theuni) +- #8188 `65a9d7d` Add armhf/aarch64 gitian builds (theuni) +- #8194 `cca1c8c` [gitian] set correct PATH for wrappers (MarcoFalke) +- #8198 `5201614` Sync ax_pthread with upstream draft4 (fanquake) +- #8210 `12a541e` [Qt] Bump to Qt5.6.1 (jonasschnelli) +- #8285 `da50997` windows: Add testnet link to installer (laanwj) +- #8304 `0cca2fe` [travis] Update SDK_URL (MarcoFalke) +- #8310 `6ae20df` Require boost for bench (theuni) +- #8315 `2e51590` Don't require sudo for Linux (theuni) +- #8314 `67caef6` Fix pkg-config issues for 0.13 (theuni) ### GUI -### Tests +- #7154 `00b4b8d` Add InMempool() info to transaction details (jonasschnelli) +- #7068 `5f3c670` [RPC-Tests] add simple way to run rpc test over QT clients (jonasschnelli) +- #7218 `a1c185b` Fix misleading translation (MarcoFalke) +- #7214 `be9a9a3` qt5: Use the fixed font the system recommends (MarcoFalke) +- #7256 `08ab906` Add note to coin control dialog QT5 workaround (fanquake) +- #7255 `e289807` Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake) +- #7317 `3b57e9c` Fix RPCTimerInterface ordering issue (jonasschnelli) +- #7327 `c079d79` Transaction View: LastMonth calculation fixed (crowning-) +- #7334 `e1060c5` coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke) +- #7383 `ae2db67` Rename "amount" to "requested amount" in receive coins table (jonasschnelli) +- #7396 `cdcbc59` Add option to increase/decrease font size in the console window (jonasschnelli) +- #7437 `9645218` Disable tab navigation for peers tables (Kefkius) +- #7604 `354b03d` build: Remove spurious dollar sign. Fixes #7189 (dooglus) +- #7605 `7f001bd` Remove openssl info from init/log and from Qt debug window (jonasschnelli) +- #7628 `87d6562` Add 'copy full transaction details' option (ericshawlinux) +- #7613 `3798e5d` Add autocomplete to bitcoin-qt's console window (GamerSg) +- #7668 `b24266c` Fix history deletion bug after font size change (achow101) +- #7680 `41d2dfa` Remove reflection from `about` icon (laanwj) +- #7686 `f034bce` Remove 0-fee from send dialog (MarcoFalke) +- #7506 `b88e0b0` Use CCoinControl selection in CWallet::FundTransaction (promag) +- #7732 `0b98dd7` Debug window: replace "Build date" with "Datadir" (jonasschnelli) +- #7761 `60db51d` remove trailing output-index from transaction-id (jonasschnelli) +- #7772 `6383268` Clear the input line after activating autocomplete (paveljanik) +- #7925 `f604bf6` Fix out-of-tree GUI builds (laanwj) +- #7939 `574ddc6` Make it possible to show details for multiple transactions (laanwj) +- #8012 `b33824b` Delay user confirmation of send (Tyler-Hardin) +- #8006 `7c8558d` Add option to disable the system tray icon (Tyler-Hardin) +- #8046 `169d379` Fix Cmd-Q / Menu Quit shutdown on OSX (jonasschnelli) +- #8042 `6929711` Don't allow to open the debug window during splashscreen & verification state (jonasschnelli) +- #8014 `77b49ac` Sort transactions by date (Tyler-Hardin) +- #8073 `eb2f6f7` askpassphrasedialog: Clear pass fields on accept (rat4) +- #8129 `ee1533e` Fix RPC console auto completer (UdjinM6) +- #7636 `fb0ac48` Add bitcoin address label to request payment QR code (makevoid) +- #8231 `760a6c7` Fix a bug where the SplashScreen will not be hidden during startup (jonasschnelli) +- #8256 `af2421c` BUG: bitcoin-qt crash (fsb4000) +- #8257 `ff03c50` Do not ask a UI question from bitcoind (sipa) +- #8288 `91abb77` Network-specific example address (laanwj) +- #7707 `a914968` UI support for abandoned transactions (jonasschnelli) +- #8207 `f7a403b` Add a link to the Bitcoin-Core repository and website to the About Dialog (MarcoFalke) +- #8281 `6a87eb0` Remove client name from debug window (laanwj) -### Miscellaneous +### Wallet + +- #7262 `fc08994` Reduce inefficiency of GetAccountAddress() (dooglus) +- #7537 `78e81b0` Warn on unexpected EOF while salvaging wallet (laanwj) +- #7521 `3368895` Don't resend wallet txs that aren't in our own mempool (morcos) +- #7576 `86a1ec5` Move wallet help string creation to CWallet (jonasschnelli) +- #7577 `5b3b5a7` Move "load wallet phase" to CWallet (jonasschnelli) +- #7608 `0735c0c` Move hardcoded file name out of log messages (MarcoFalke) +- #7649 `4900641` Prevent multiple calls to CWallet::AvailableCoins (promag) +- #7646 `e5c3511` Fix lockunspent help message (promag) +- #7558 `b35a591` Add import/removeprunedfunds rpc call (instagibbs) +- #7691 `30c2dd8` Refactor wallet/init interaction (jonasschnelli) +- #6215 `48c5adf` add bip32 pub key serialization (jonasschnelli) +- #7913 `bafd075` Fix for incorrect locking in GetPubKey() (keystore.cpp) (yurizhykin) +- #7816 `0c95ebc` Slighly refactor GetOldestKeyPoolTime() (jonasschnelli) +- #8036 `41138f9` init: Move berkeleydb version reporting to wallet (laanwj) +- #8028 `373b50d` Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk (pstratem) +- #8061 `f6b7df3` Improve Wallet encapsulation (pstratem) +- #7891 `950be19` Always require OS randomness when generating secret keys (sipa) +- #7689 `b89ef13` Replace OpenSSL AES with ctaes-based version (sipa) +- #7825 `f972b04` Prevent multiple calls to ExtractDestination (pedrobranco) +- #8137 `243ac0c` Improve CWallet API with new AccountMove function (pstratem) +- #8142 `52c3f34` Improve CWallet API with new GetAccountPubkey function (pstratem) +- #8035 `b67a472` Add simplest BIP32/deterministic key generation implementation (jonasschnelli) +- #7687 `a6ddb19` Stop treating importaddress'ed scripts as change (sipa) +- #8298 `aef3811` wallet: Revert input selection post-pruning (laanwj) +- #8324 `bc94b87` Keep HD seed during salvagewallet (jonasschnelli) +- #8323 `238300b` Add HD keypath to CKeyMetadata, report metadata in validateaddress (jonasschnelli) +- #8367 `3b38a6a` Ensure <0.13 clients can't open HD wallets (jonasschnelli) + +### Tests and QA + +- #7320 `d3dfc6d` Test walletpassphrase timeout (MarcoFalke) +- #7208 `47c5ed1` Make max tip age an option instead of chainparam (laanwj) +- #7372 `21376af` Trivial: [qa] wallet: Print maintenance (MarcoFalke) +- #7280 `668906f` [travis] Fail when documentation is outdated (MarcoFalke) +- #7177 `93b0576` [qa] Change default block priority size to 0 (MarcoFalke) +- #7236 `02676c5` Use createrawtx locktime parm in txn_clone (dgenr8) +- #7212 `326ffed` Adds unittests for CAddrMan and CAddrinfo, removes source of non-determinism (EthanHeilman) +- #7490 `d007511` tests: Remove May15 test (laanwj) +- #7531 `18cb2d5` Add bip68-sequence.py to extended rpc tests (btcdrak) +- #7536 `ce5fc02` test: test leading spaces for ParseHex (laanwj) +- #7620 `1b68de3` [travis] Only run check-doc.py once (MarcoFalke) +- #7455 `7f96671` [travis] Exit early when check-doc.py fails (MarcoFalke) +- #7667 `56d2c4e` Move GetTempPath() to testutil (musalbas) +- #7517 `f1ca891` test: script_error checking in script_invalid tests (laanwj) +- #7684 `3d0dfdb` Extend tests (MarcoFalke) +- #7697 `622fe6c` Tests: make prioritise_transaction.py more robust (sdaftuar) +- #7709 `efde86b` Tests: fix missing import in mempool_packages (sdaftuar) +- #7702 `29e1131` Add tests verifychain, lockunspent, getbalance, listsinceblock (MarcoFalke) +- #7720 `3b4324b` rpc-test: Normalize assert() (MarcoFalke) +- #7757 `26794d4` wallet: Wait for reindex to catch up (MarcoFalke) +- #7764 `a65b36c` Don't run pruning.py twice (MarcoFalke) +- #7773 `7c80e72` Fix comments in tests (btcdrak) +- #7489 `e9723cb` tests: Make proxy_test work on travis servers without IPv6 (laanwj) +- #7778 `ff5874b` Bug fixes and refactor (MarcoFalke) +- #7801 `70ac71b` Remove misleading "errorString syntax" (MarcoFalke) +- #7803 `401c65c` maxblocksinflight: Actually enable test (MarcoFalke) +- #7802 `3bc71e1` httpbasics: Actually test second connection (MarcoFalke) +- #7818 `3911a0a` Refactor script tests (sipa) +- #7849 `ab8586e` tests: add varints_bitpatterns test (laanwj) +- #7846 `491171f` Clean up lockorder data of destroyed mutexes (sipa) +- #7853 `6ef5e00` py2: Unfiddle strings into bytes explicitly (MarcoFalke) +- #7878 `53adc83` [test] bctest.py: Revert faa41ee (MarcoFalke) +- #7798 `cabba24` [travis] Print the commit which was evaluated (MarcoFalke) +- #7833 `b1bf511` tests: Check Content-Type header returned from RPC server (laanwj) +- #7851 `fa9d86f` pull-tester: Don't mute zmq ImportError (MarcoFalke) +- #7822 `0e6fd5e` Add listunspent() test for spendable/unspendable UTXO (jpdffonseca) +- #7912 `59ad568` Tests: Fix deserialization of reject messages (sdaftuar) +- #7941 `0ea3941` Fixing comment in script_test.json test case (Christewart) +- #7807 `0ad1041` Fixed miner test values, gave constants for less error-prone values (instagibbs) +- #7980 `88b77c7` Smartfees: Properly use ordered dict (MarcoFalke) +- #7814 `77b637f` Switch to py3 (MarcoFalke) +- #8030 `409a8a1` Revert fatal-ness of missing python-zmq (laanwj) +- #8018 `3e90fe6` Autofind rpc tests --srcdir (jonasschnelli) +- #7971 `4e14afe` Refactor test_framework and pull tester (MarcoFalke) +- #8016 `5767e80` Fix multithread CScheduler and reenable test (paveljanik) +- #7972 `423ca30` pull-tester: Run rpc test in parallel (MarcoFalke) +- #8039 `69b3a6d` Bench: Add crypto hash benchmarks (laanwj) +- #8041 `5b736dd` Fix bip9-softforks blockstore issue (MarcoFalke) +- #7994 `1f01443` Add op csv tests to script_tests.json (Christewart) +- #8038 `e2bf830` Various minor fixes (MarcoFalke) +- #8072 `1b87e5b` Travis: 'make check' in parallel and verbose (MarcoFalke) +- #8056 `8844ef1` Remove hardcoded "4 nodes" from test_framework (MarcoFalke) +- #8047 `37f9a1f` Test_framework: Set wait-timeout for bitcoind procs (MarcoFalke) +- #8095 `6700cc9` Test framework: only cleanup on successful test runs (sdaftuar) +- #8098 `06bd4f6` Test_framework: Append portseed to tmpdir (MarcoFalke) +- #8104 `6ff2c8d` Add timeout to sync_blocks() and sync_mempools() (sdaftuar) +- #8111 `61b8684` Benchmark SipHash (sipa) +- #8107 `52b803e` Bench: Added base58 encoding/decoding benchmarks (yurizhykin) +- #8115 `0026e0e` Avoid integer division in the benchmark inner-most loop (gmaxwell) +- #8090 `a2df115` Adding P2SH(p2pkh) script test case (Christewart) +- #7992 `ec45cc5` Extend #7956 with one more test (TheBlueMatt) +- #8139 `ae5575b` Fix interrupted HTTP RPC connection workaround for Python 3.5+ (sipa) +- #8164 `0f24eaf` [Bitcoin-Tx] fix missing test fixtures, fix 32bit atoi issue (jonasschnelli) +- #8166 `0b5279f` Src/test: Do not shadow local variables (paveljanik) +- #8141 `44c1b1c` Continuing port of java comparison tool (mrbandrews) +- #8201 `36b7400` fundrawtransaction: Fix race, assert amounts (MarcoFalke) +- #8214 `ed2cd59` Mininode: fail on send_message instead of silent return (MarcoFalke) +- #8215 `a072d1a` Don't use floating point in wallet tests (MarcoFalke) +- #8066 `65c2058` Test_framework: Use different rpc_auth_pair for each node (MarcoFalke) +- #8216 `0d41d70` Assert 'changePosition out of bounds' (MarcoFalke) +- #8222 `961893f` Enable mempool consistency checks in unit tests (sipa) +- #7751 `84370d5` test_framework: python3.4 authproxy compat (laanwj) +- #7744 `d8e862a` test_framework: detect failure of bitcoind startup (laanwj) +- #8280 `115735d` Increase sync_blocks() timeouts in pruning.py (MarcoFalke) +- #8340 `af9b7a9` Solve trivial merge conflict in p2p-segwit.py (MarcoFalke) +- #8067 `3e4cf8f` Travis: use slim generic image, and some fixups (theuni) +- #7951 `5c7df70` Test_framework: Properly print exception (MarcoFalke) +- #8070 `7771aa5` Remove non-determinism which is breaking net_tests #8069 (EthanHeilman) +- #8309 `bb2646a` Add wallet-hd test (MarcoFalke) + +### Mining + +- #7507 `11c7699` Remove internal miner (Leviathn) +- #7663 `c87f51e` Make the generate RPC call function for non-regtest (sipa) +- #7671 `e2ebd25` Add generatetoaddress RPC to mine to an address (achow101) +- #7935 `66ed450` Versionbits: GBT support (luke-jr) +- #7598 `e1486eb` Refactor CreateNewBlock to be a method of the BlockAssembler class (morcos) +- #7600 `66db2d6` Select transactions using feerate-with-ancestors (sdaftuar) +- #8295 `f5660d3` Mining-related fixups for 0.13.0 (sdaftuar) +- #7796 `536b75e` Add support for negative fee rates, fixes `prioritizetransaction` (MarcoFalke) + +### Documentation and miscellaneous + +- #7423 `69e2a40` Add example for building with constrained resources (jarret) +- #8254 `c2c69ed` Add OSX ZMQ requirement to QA readme (fanquake) +- #8203 `377d131` Clarify documentation for running a tor node (nathaniel-mahieu) +- #7428 `4b12266` Add example for listing ./configure flags (nathaniel-mahieu) +- #7847 `3eae681` Add arch linux build example (mruddy) +- #7968 `ff69aaf` Fedora build requirements (wtogami) +- #8013 `fbedc09` Fedora build requirements, add gcc-c++ and fix typo (wtogami) +- #8009 `fbd8478` Fixed invalid example paths in gitian-building.md (JeremyRand) +- #8240 `63fbdbc` Mention Windows XP end of support in release notes (laanwj) +- #8303 `5077d2c` Update bips.md for CSV softfork (fanquake) +- #7789 `e0b3e19` Add note about using the Qt official binary installer (paveljanik) +- #7791 `e30a5b0` Change Precise to Trusty in gitian-building.md (JeremyRand) +- #7838 `8bb5d3d` Update gitian build guide to debian 8.4.0 (fanquake) +- #7855 `b778e59` Replace precise with trusty (MarcoFalke) +- #7975 `fc23fee` Update bitcoin-core GitHub links (MarcoFalke) +- #8034 `e3a8207` Add basic git squash workflow (fanquake) +- #7813 `214ec0b` Update port in tor.md (MarcoFalke) +- #8193 `37c9830` Use Debian 8.5 in the gitian-build guide (fanquake) +- #8261 `3685e0c` Clarify help for `getblockchaininfo` (paveljanik) +- #7185 `ea0f5a2` Note that reviewers should mention the id of the commits they reviewed (pstratem) +- #7290 `c851d8d` [init] Add missing help for args (MarcoFalke) +- #7281 `f9fd4c2` Improve CheckInputs() comment about sig verification (petertodd) +- #7417 `1e06bab` Minor improvements to the release process (PRabahy) +- #7444 `4cdbd42` Improve block validity/ConnectBlock() comments (petertodd) +- #7527 `db2e1c0` Fix and cleanup listreceivedbyX documentation (instagibbs) +- #7541 `b6e00af` Clarify description of blockindex (pinheadmz) +- #7590 `f06af57` Improving wording related to Boost library requirements [updated] (jonathancross) +- #7635 `0fa88ef` Add dependency info to test docs (elliotolds) +- #7609 `3ba07bd` RPM spec file project (AliceWonderMiscreations) +- #7850 `229a17c` Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp` (alexreg) +- #7888 `ec870e1` Prevector: fix 2 bugs in currently unreached code paths (kazcw) +- #7922 `90653bc` CBase58Data::SetString: cleanse the full vector (kazcw) +- #7881 `c4e8390` Update release process (laanwj) +- #7952 `a9c8b74` Log invalid block hash to make debugging easier (paveljanik) +- #7974 `8206835` More comments on the design of AttemptToEvictConnection (gmaxwell) +- #7795 `47a7cfb` UpdateTip: log only one line at most per block (laanwj) +- #8110 `e7e25ea` Add benchmarking notes (fanquake) +- #8121 `58f0c92` Update implemented BIPs list (fanquake) +- #8029 `58725ba` Simplify OS X build notes (fanquake) +- #8143 `d46b8b5` comment nit: miners don't vote (instagibbs) +- #8136 `22e0b35` Log/report in 10% steps during VerifyDB (jonasschnelli) +- #8168 `d366185` util: Add ParseUInt32 and ParseUInt64 (laanwj) +- #8178 `f7b1bfc` Add git and github tips and tricks to developer notes (sipa) +- #8177 `67db011` developer notes: updates for C++11 (kazcw) +- #8229 `8ccdac1` [Doc] Update OS X build notes for 10.11 SDK (fanquake) +- #8233 `9f1807a` Mention Linux ARM executables in release process and notes (laanwj) +- #7540 `ff46dd4` Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY (btcdrak) +- #8289 `26316ff` bash-completion: Adapt for 0.12 and 0.13 (roques) +- #7453 `3dc3149` Missing patches from 0.12 (MarcoFalke) +- #7113 `54a550b` Switch to a more efficient rolling Bloom filter (sipa) +- #7257 `de9e5ea` Combine common error strings for different options so translations can be shared and reused (luke-jr) +- #7304 `b8f485c` [contrib] Add clang-format-diff.py (MarcoFalke) +- #7378 `e6f97ef` devtools: replace github-merge with python version (laanwj) +- #7395 `0893705` devtools: show pull and commit information in github-merge (laanwj) +- #7402 `6a5932b` devtools: github-merge get toplevel dir without extra whitespace (achow101) +- #7425 `20a408c` devtools: Fix utf-8 support in messages for github-merge (laanwj) +- #7632 `409f843` Delete outdated test-patches reference (Lewuathe) +- #7662 `386f438` remove unused NOBLKS_VERSION_{START,END} constants (rat4) +- #7737 `aa0d2b2` devtools: make github-merge.py use py3 (laanwj) +- #7781 `55db5f0` devtools: Auto-set branch to merge to in github-merge (laanwj) +- #7934 `f17032f` Improve rolling bloom filter performance and benchmark (sipa) +- #8004 `2efe38b` signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (catilac) +- #7713 `f6598df` Fixes for verify-commits script (petertodd) Credits ======= Thanks to everyone who directly contributed to this release: +- 21E14 +- accraze +- Adam Brown +- Alexander Regueiro +- Alex Morcos +- Alfie John +- Alice Wonder +- AlSzacrel +- Andrew Chow +- Andrés G. Aragoneses +- Bob McElrath +- BtcDrak +- calebogden +- Cédric Félizard +- Chirag Davé +- Chris Moore +- Chris Stewart +- Christian von Roques +- Chris Wheeler +- Cory Fields +- crowning- +- Daniel Cousens +- Daniel Kraft +- Denis Lukianov +- Elias Rohrer +- Elliot Olds +- Eric Shaw +- error10 +- Ethan Heilman +- face +- fanquake +- Francesco 'makevoid' Canessa +- fsb4000 +- Gavin Andresen +- gladoscc +- Gregory Maxwell +- Gregory Sanders +- instagibbs +- James O'Beirne +- Jarret Dyrbye +- Jeremy Rand +- jl2012 +- jloughry +- jmacwhyte +- Joao Fonseca +- Johnson Lau +- Jonas Nick +- Jonas Schnelli +- Jonathan Cross +- João Barbosa +- Jorge Timón +- Kaz Wesley +- Kefkius +- kirkalx +- Krzysztof Jurewicz +- Leviathn +- lewuathe +- Luke Dashjr +- Luv Khemani +- Marcel Krüger +- Marco Falke +- Mark Friedenbach +- Matt +- Matt Bogosian +- Matt Corallo +- Matthew English +- Matthew Zipkin +- mb300sd +- Mitchell Cash +- mrbandrews +- mruddy +- Murch +- Mustafa +- Nathaniel Mahieu +- Nicolas Dorier +- Patrick Strateman +- Paul Rabahy +- paveljanik +- Pavel Janík +- Pavel Vasin +- Pedro Branco +- Peter Todd +- Philip Kaufmann +- Pieter Wuille +- Prayag Verma +- ptschip +- Puru +- randy-waterhouse +- R E Broadley +- Rusty Russell +- Suhas Daftuar +- Suriyaa Kudo +- TheLazieR Yip +- Thomas Kerin +- Tom Harding +- Tyler Hardin +- UdjinM6 +- Warren Togami +- Will Binns +- Wladimir J. van der Laan +- Yuri Zhykin + As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 1fe7f404078121ad370ec955aa23befa322549bb Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 19 Jul 2016 15:41:36 -0400 Subject: [PATCH 008/302] build: fix non-deterministic biplist The non-deterministic ordering produced by biplist ends up in the .DS_Store file that is included in the OSX dmg. Github-Pull: #8373 Rebased-From: 3b3ce25df6cc84cd1e75a7ec20fc7da8d2ef76e0 --- depends/packages/native_biplist.mk | 5 ++++ depends/patches/native_biplist/sorted_list.patch | 29 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 depends/patches/native_biplist/sorted_list.patch diff --git a/depends/packages/native_biplist.mk b/depends/packages/native_biplist.mk index eb8672d556a..3c6e8900f66 100644 --- a/depends/packages/native_biplist.mk +++ b/depends/packages/native_biplist.mk @@ -4,6 +4,11 @@ $(package)_download_path=https://pypi.python.org/packages/source/b/biplist $(package)_file_name=biplist-$($(package)_version).tar.gz $(package)_sha256_hash=b57cadfd26e4754efdf89e9e37de87885f9b5c847b2615688ca04adfaf6ca604 $(package)_install_libdir=$(build_prefix)/lib/python/dist-packages +$(package)_patches=sorted_list.patch + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/sorted_list.patch +endef define $(package)_build_cmds python setup.py build diff --git a/depends/patches/native_biplist/sorted_list.patch b/depends/patches/native_biplist/sorted_list.patch new file mode 100644 index 00000000000..89abdb1b71f --- /dev/null +++ b/depends/patches/native_biplist/sorted_list.patch @@ -0,0 +1,29 @@ +--- a/biplist/__init__.py 2014-10-26 19:03:11.000000000 +0000 ++++ b/biplist/__init__.py 2016-07-19 19:30:17.663521999 +0000 +@@ -541,7 +541,7 @@ + return HashableWrapper(n) + elif isinstance(root, dict): + n = {} +- for key, value in iteritems(root): ++ for key, value in sorted(iteritems(root)): + n[self.wrapRoot(key)] = self.wrapRoot(value) + return HashableWrapper(n) + elif isinstance(root, list): +@@ -616,7 +616,7 @@ + elif isinstance(obj, dict): + size = proc_size(len(obj)) + self.incrementByteCount('dictBytes', incr=1+size) +- for key, value in iteritems(obj): ++ for key, value in sorted(iteritems(obj)): + check_key(key) + self.computeOffsets(key, asReference=True) + self.computeOffsets(value, asReference=True) +@@ -714,7 +714,7 @@ + keys = [] + values = [] + objectsToWrite = [] +- for key, value in iteritems(obj): ++ for key, value in sorted(iteritems(obj)): + keys.append(key) + values.append(value) + for key in keys: From 48b92080a74c94c619615fa32055b4bc3b5b89f2 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Wed, 20 Jul 2016 17:48:09 +0800 Subject: [PATCH 009/302] Remove duplicated name in release notes --- doc/release-notes.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 240e132a830..6bd2aa9f056 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -665,7 +665,6 @@ Thanks to everyone who directly contributed to this release: - James O'Beirne - Jarret Dyrbye - Jeremy Rand -- jl2012 - jloughry - jmacwhyte - Joao Fonseca From ebea65121e6c62f6b6acd79408a681b987126a0d Mon Sep 17 00:00:00 2001 From: Patrick Strateman Date: Tue, 19 Jul 2016 22:30:17 -0700 Subject: [PATCH 010/302] Move SetMinVersion for FEATURE_HD to SetHDMasterKey Github-Pull: #8378 Rebased-From: 6523fcaab2f0808d4e47b9cb9ebbef7ed69a309e --- src/wallet/wallet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a76085de309..5908dfeacea 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1170,6 +1170,9 @@ bool CWallet::SetHDMasterKey(const CKey& key) { LOCK(cs_wallet); + // ensure this wallet.dat can only be opened by clients supporting HD + SetMinVersion(FEATURE_HD); + // store the key as normal "key"/"ckey" object // in the database // key metadata is not required @@ -3299,9 +3302,6 @@ bool CWallet::InitLoadWallet() key.MakeNewKey(true); if (!walletInstance->SetHDMasterKey(key)) throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed"); - - // ensure this wallet.dat can only be opened by clients supporting HD - walletInstance->SetMinVersion(FEATURE_HD); } CPubKey newDefaultKey; if (walletInstance->GetKeyFromPool(newDefaultKey)) { From f891e34cf962b74ba6f29aaea6b368c412b8376d Mon Sep 17 00:00:00 2001 From: Jannes Faber Date: Wed, 20 Jul 2016 12:30:46 +0200 Subject: [PATCH 011/302] fix typo: propagation relay -> delay --- doc/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 6bd2aa9f056..0d332345893 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -122,7 +122,7 @@ Support for block relay using the Compact Blocks protocol has been implemented in PR 8068. The primary goal is reducing the bandwidth spikes at relay time, though in many -cases it also reduces propagation relay. It is automatically enabled between +cases it also reduces propagation delay. It is automatically enabled between compatible peers. [BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) From ea9196189983358ab9d9a01ed5e989d5bd4d41de Mon Sep 17 00:00:00 2001 From: Chris Moore Date: Wed, 20 Jul 2016 09:36:18 -0700 Subject: [PATCH 012/302] Fix formatting error Don't start a line with a # unless you want that line to be a header. --- doc/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 6bd2aa9f056..f488fcad6be 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -170,7 +170,7 @@ Low-level P2P changes instantly, while queueing up the rest and sending them out in batch. As this resulted in chains of dependent transactions being reordered, it systematically hurt transaction relay. The relay code was redesigned in PRs - #7840 and #8082, and now always batches transactions announcements while also + \#7840 and #8082, and now always batches transactions announcements while also sorting them according to dependency order. This significantly reduces orphan transactions. To compensate for the removal of instant relay, the frequency of batch sending was doubled for outgoing peers. From 52a4158f1f159a453c2db09ee8acf7045690e68e Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 19 Jul 2016 15:50:57 -0400 Subject: [PATCH 013/302] Add release notes for mining changes --- doc/release-notes.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 240e132a830..b251e8355a0 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -146,6 +146,68 @@ HD wallets are incompatible with older versions of Bitcoin Core. [Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) +Segregated Witness +------------------ + +The code preparations for Segregated Witness ("segwit"), as described in [BIP +141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki), [BIP +143](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki), [BIP +144](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki), and [BIP +145](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki) are +finished and included in this release. However, BIP 141 does not yet specify +activation parameters on mainnet, and so this release does not support segwit +use on mainnet. Testnet use is supported, and after BIP 141 is updated with +proposed parameters, a future release of Bitcoin Core is expected that +implements those parameters for mainnet. + +Furthermore, because segwit activation is not yet specified for mainnet, +version 0.13.0 will behave similarly as other pre-segwit releases even after a +future activation of BIP 141 on the network. Upgrading from 0.13.0 will be +required in order to utilize segwit-related features on mainnet (such as signal +BIP 141 activation, mine segwit blocks, fully validate segwit blocks, relay +segwit blocks to other segwit nodes, and use segwit transactions in the +wallet, etc). + +Mining transaction selection ("Child Pays For Parent") +------------------------------------------------------ + +The mining transaction selection algorithm has been replaced with an algorithm +that selects transactions based on their feerate inclusive of unconfirmed +ancestor transactions. This means that a low-fee transaction can become more +likely to be selected if a high-fee transaction that spends its outputs is +relayed. + +With this change, the `-blockminsize` command line option has been removed. + +The command line option `-blockmaxsize` remains an option to specify the +maximum number of serialized bytes in a generated block. In addition, the new +command line option `-blockmaxweight` has been added, which specifies the +maximum "block weight" of a generated block, as defined by [BIP 141 (Segregated +Witness)] (https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki). + +In preparation for Segregated Witness, the mining algorithm has been modified +to optimize transaction selection for a given block weight, rather than a given +number of serialized bytes in a block. In this release, transaction selection +is unaffected by this distinction (as BIP 141 activation is not supported on +mainnet in this release, see above), but in future releases and after BIP 141 +activation, these calculations would be expected to differ. + +For optimal runtime performance, miners using this release should specify +`-blockmaxweight` on the command line, and not specify `-blockmaxsize`. +Additionally (or only) specifying `-blockmaxsize`, or relying on default +settings for both, may result in performance degradation, as the logic to +support `-blockmaxsize` performs additional computation to ensure that +constraint is met. (Note that for mainnet, in this release, the equivalent +parameter for `-blockmaxweight` would be four times the desired +`-blockmaxsize`. See [BIP 141] +(https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki) for additional +details.) + +In the future, the `-blockmaxsize` option may be removed, as block creation is +no longer optimized for this metric. Feedback is requested on whether to +deprecate or keep this command line option in future releases. + + Removal of internal miner -------------------------- From 73adfe3bb935cead8e4d91f8d1c8a9feb55e4a7d Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 21 Jul 2016 21:52:30 +0200 Subject: [PATCH 014/302] [Wallet] Correct hdmasterkeyid/masterkeyid name confusion Github-Pull: #8390 Rebased-From: b50e1ac298363a7733069f82709674d3a8cb3058 --- qa/rpc-tests/wallet-hd.py | 2 +- src/wallet/rpcwallet.cpp | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/qa/rpc-tests/wallet-hd.py b/qa/rpc-tests/wallet-hd.py index c738ee2207e..c11da1e9a99 100755 --- a/qa/rpc-tests/wallet-hd.py +++ b/qa/rpc-tests/wallet-hd.py @@ -31,7 +31,7 @@ def run_test (self): tmpdir = self.options.tmpdir # Make sure we use hd, keep masterkeyid - masterkeyid = self.nodes[1].getwalletinfo()['masterkeyid'] + masterkeyid = self.nodes[1].getwalletinfo()['hdmasterkeyid'] assert_equal(len(masterkeyid), 40) # Import a non-HD private key in the HD wallet diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index b4831ad7950..4087b8e77b7 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2260,16 +2260,16 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) "Returns an object containing various wallet state info.\n" "\nResult:\n" "{\n" - " \"walletversion\": xxxxx, (numeric) the wallet version\n" - " \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n" - " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n" - " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n" - " \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n" - " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" - " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" - " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n" - " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n" - " \"masterkeyid\": \"\", (string) the Hash160 of the HD master pubkey\n" + " \"walletversion\": xxxxx, (numeric) the wallet version\n" + " \"balance\": xxxxxxx, (numeric) the total confirmed balance of the wallet in " + CURRENCY_UNIT + "\n" + " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n" + " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n" + " \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n" + " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" + " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" + " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n" + " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n" + " \"hdmasterkeyid\": \"\", (string) the Hash160 of the HD master pubkey\n" "}\n" "\nExamples:\n" + HelpExampleCli("getwalletinfo", "") @@ -2291,7 +2291,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) obj.push_back(Pair("paytxfee", ValueFromAmount(payTxFee.GetFeePerK()))); CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID; if (!masterKeyID.IsNull()) - obj.push_back(Pair("masterkeyid", masterKeyID.GetHex())); + obj.push_back(Pair("hdmasterkeyid", masterKeyID.GetHex())); return obj; } From 86edc20a178cc17cdc6915e9e93a7241c27c368c Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 18 Jul 2016 12:40:28 -0400 Subject: [PATCH 015/302] Scale legacy sigop count in CreateNewBlock Github-Pull: #8362 Rebased-From: 682aa0f289c550c029733966a2ce3449e4a471df --- src/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 25a5becf93e..9575858840d 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -187,7 +187,7 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev); pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, chainparams.GetConsensus()); pblock->nNonce = 0; - pblocktemplate->vTxSigOpsCost[0] = GetLegacySigOpCount(pblock->vtx[0]); + pblocktemplate->vTxSigOpsCost[0] = WITNESS_SCALE_FACTOR * GetLegacySigOpCount(pblock->vtx[0]); CValidationState state; if (!TestBlockValidity(state, chainparams, *pblock, pindexPrev, false, false)) { From f84ee3dab66831383e58c7de3fabc306754633db Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Wed, 20 Jul 2016 18:31:45 +0800 Subject: [PATCH 016/302] Make witness v0 outputs non-standard before segwit activation Github-Pull: #8381 Rebased-From: 1ffaff2f747af683513d6d74a7241d41e3f6e051 --- src/main.cpp | 5 +++-- src/policy/policy.cpp | 9 ++++++--- src/policy/policy.h | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index fe19895f5fb..70f0a424755 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1144,13 +1144,14 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C } // Reject transactions with witness before segregated witness activates (override with -prematurewitness) - if (!GetBoolArg("-prematurewitness",false) && !tx.wit.IsNull() && !IsWitnessEnabled(chainActive.Tip(), Params().GetConsensus())) { + bool witnessEnabled = IsWitnessEnabled(chainActive.Tip(), Params().GetConsensus()); + if (!GetBoolArg("-prematurewitness",false) && !tx.wit.IsNull() && !witnessEnabled) { return state.DoS(0, false, REJECT_NONSTANDARD, "no-witness-yet", true); } // Rather not work on nonstandard transactions (unless -testnet/-regtest) string reason; - if (fRequireStandard && !IsStandardTx(tx, reason)) + if (fRequireStandard && !IsStandardTx(tx, reason, witnessEnabled)) return state.DoS(0, false, REJECT_NONSTANDARD, reason); // Only accept nLockTime-using transactions that can be mined in the next diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 8617db00c86..de3996bb4a4 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -31,7 +31,7 @@ * DUP CHECKSIG DROP ... repeated 100 times... OP_1 */ -bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType) +bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool witnessEnabled) { std::vector > vSolutions; if (!Solver(scriptPubKey, whichType, vSolutions)) @@ -49,11 +49,14 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType) } else if (whichType == TX_NULL_DATA && (!fAcceptDatacarrier || scriptPubKey.size() > nMaxDatacarrierBytes)) return false; + + else if (!witnessEnabled && (whichType == TX_WITNESS_V0_KEYHASH || whichType == TX_WITNESS_V0_SCRIPTHASH)) + return false; return whichType != TX_NONSTANDARD; } -bool IsStandardTx(const CTransaction& tx, std::string& reason) +bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnessEnabled) { if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1) { reason = "version"; @@ -92,7 +95,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason) unsigned int nDataOut = 0; txnouttype whichType; BOOST_FOREACH(const CTxOut& txout, tx.vout) { - if (!::IsStandard(txout.scriptPubKey, whichType)) { + if (!::IsStandard(txout.scriptPubKey, whichType, witnessEnabled)) { reason = "scriptpubkey"; return false; } diff --git a/src/policy/policy.h b/src/policy/policy.h index f5f8652fb5a..ad209d0306e 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -53,12 +53,12 @@ static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_ static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_VERIFY_SEQUENCE | LOCKTIME_MEDIAN_TIME_PAST; -bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType); +bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool witnessEnabled = false); /** * Check for standard transaction types * @return True if all outputs (scriptPubKeys) use only standard transaction forms */ -bool IsStandardTx(const CTransaction& tx, std::string& reason); +bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnessEnabled = false); /** * Check for standard transaction types * @param[in] mapInputs Map of previous transactions that have outputs we're spending From 4f7f531af6e1c40ee24817b375f0c444da516cd0 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 22 Jul 2016 11:09:45 -0400 Subject: [PATCH 017/302] qa: Add test for standardness of segwit v0 outputs Github-Pull: #8381 Rebased-From: c59c434b7d1211c13f7904b9bc675e16910a1c0a --- qa/rpc-tests/p2p-segwit.py | 78 ++++++++++++++++++++++++++++++++++++++++++++++ src/policy/policy.cpp | 2 +- 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index fa2c5d1f05e..cd02692b1e8 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -1086,6 +1086,82 @@ def test_block_relay(self, segwit_activated): self.old_node.announce_tx_and_wait_for_getdata(block4.vtx[0]) assert(block4.sha256 not in self.old_node.getdataset) + # V0 segwit outputs should be standard after activation, but not before. + def test_standardness_v0(self, segwit_activated): + print("\tTesting standardness of v0 outputs (%s activation)" % ("after" if segwit_activated else "before")) + assert(len(self.utxo)) + + witness_program = CScript([OP_TRUE]) + witness_hash = sha256(witness_program) + scriptPubKey = CScript([OP_0, witness_hash]) + + p2sh_pubkey = hash160(witness_program) + p2sh_scriptPubKey = CScript([OP_HASH160, p2sh_pubkey, OP_EQUAL]) + + # First prepare a p2sh output (so that spending it will pass standardness) + p2sh_tx = CTransaction() + p2sh_tx.vin = [CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")] + p2sh_tx.vout = [CTxOut(self.utxo[0].nValue-1000, p2sh_scriptPubKey)] + p2sh_tx.rehash() + + # Mine it on test_node to create the confirmed output. + self.test_node.test_transaction_acceptance(p2sh_tx, with_witness=True, accepted=True) + self.nodes[0].generate(1) + sync_blocks(self.nodes) + + # Now test standardness of v0 P2WSH outputs. + # Start by creating a transaction with two outputs. + tx = CTransaction() + tx.vin = [CTxIn(COutPoint(p2sh_tx.sha256, 0), CScript([witness_program]))] + tx.vout = [CTxOut(p2sh_tx.vout[0].nValue-10000, scriptPubKey)] + tx.vout.append(CTxOut(8000, scriptPubKey)) # Might burn this later + tx.rehash() + + self.std_node.test_transaction_acceptance(tx, with_witness=True, accepted=segwit_activated) + + # Now create something that looks like a P2PKH output. This won't be spendable. + scriptPubKey = CScript([OP_0, hash160(witness_hash)]) + tx2 = CTransaction() + if segwit_activated: + # if tx was accepted, then we spend the second output. + tx2.vin = [CTxIn(COutPoint(tx.sha256, 1), b"")] + tx2.vout = [CTxOut(7000, scriptPubKey)] + tx2.wit.vtxinwit.append(CTxInWitness()) + tx2.wit.vtxinwit[0].scriptWitness.stack = [witness_program] + else: + # if tx wasn't accepted, we just re-spend the p2sh output we started with. + tx2.vin = [CTxIn(COutPoint(p2sh_tx.sha256, 0), CScript([witness_program]))] + tx2.vout = [CTxOut(p2sh_tx.vout[0].nValue-1000, scriptPubKey)] + tx2.rehash() + + self.std_node.test_transaction_acceptance(tx2, with_witness=True, accepted=segwit_activated) + + # Now update self.utxo for later tests. + tx3 = CTransaction() + if segwit_activated: + # tx and tx2 were both accepted. Don't bother trying to reclaim the + # P2PKH output; just send tx's first output back to an anyone-can-spend. + sync_mempools(self.nodes) + tx3.vin = [CTxIn(COutPoint(tx.sha256, 0), b"")] + tx3.vout = [CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))] + tx3.wit.vtxinwit.append(CTxInWitness()) + tx3.wit.vtxinwit[0].scriptWitness.stack = [witness_program] + tx3.rehash() + self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=True) + else: + # tx and tx2 didn't go anywhere; just clean up the p2sh_tx output. + tx3.vin = [CTxIn(COutPoint(p2sh_tx.sha256, 0), CScript([witness_program]))] + tx3.vout = [CTxOut(p2sh_tx.vout[0].nValue-1000, witness_program)] + tx3.rehash() + self.test_node.test_transaction_acceptance(tx3, with_witness=True, accepted=True) + + self.nodes[0].generate(1) + sync_blocks(self.nodes) + self.utxo.pop(0) + self.utxo.append(UTXO(tx3.sha256, 0, tx3.vout[0].nValue)) + assert_equal(len(self.nodes[1].getrawmempool()), 0) + + # Verify that future segwit upgraded transactions are non-standard, # but valid in blocks. Can run this before and after segwit activation. def test_segwit_versions(self): @@ -1658,6 +1734,7 @@ def run_test(self): self.test_witness_tx_relay_before_segwit_activation() self.test_block_relay(segwit_activated=False) self.test_p2sh_witness(segwit_activated=False) + self.test_standardness_v0(segwit_activated=False) sync_blocks(self.nodes) @@ -1679,6 +1756,7 @@ def run_test(self): self.test_witness_input_length() self.test_block_relay(segwit_activated=True) self.test_tx_relay_after_segwit_activation() + self.test_standardness_v0(segwit_activated=True) self.test_segwit_versions() self.test_premature_coinbase_witness_spend() self.test_signature_version_1() diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index de3996bb4a4..57df1f0b195 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -49,7 +49,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool w } else if (whichType == TX_NULL_DATA && (!fAcceptDatacarrier || scriptPubKey.size() > nMaxDatacarrierBytes)) return false; - + else if (!witnessEnabled && (whichType == TX_WITNESS_V0_KEYHASH || whichType == TX_WITNESS_V0_SCRIPTHASH)) return false; From cfd1280f23bf687a38d3d00355ac94a3646cb59f Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 18 Jul 2016 10:55:46 +0200 Subject: [PATCH 018/302] [doc] gbuild: Set memory explicitly (default is too low) Github-Pull: #8358 Rebased-From: faa59318db48a0acc4b0ccff56b63cc05455c61f --- doc/release-process.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 35ee1edae11..41c1ac8556b 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -112,16 +112,16 @@ The gbuild invocations below DO NOT DO THIS by default. ### Build and sign Bitcoin Core for Linux, Windows, and OS X: pushd ./gitian-builder - ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml + ./bin/gbuild --memory 3000 --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 ../ - ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml + ./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml ./bin/gsign --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../ - ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml + ./bin/gbuild --memory 3000 --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml ./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../ From 18b8ee1cd1b2c95faac53e49b9023200679f2bb1 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 15 Jun 2016 10:49:29 +0200 Subject: [PATCH 019/302] [Wallet] add HD xpriv to dumpwallet Github-Pull: #8206 Rebased-From: 77c912d21c8cd153f4503c65225a5a46990cc85a --- src/wallet/rpcdump.cpp | 29 ++++++++++++++++++++++++++--- src/wallet/wallet.h | 2 +- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index d55cc68dc03..6647d3297fa 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -602,19 +602,42 @@ UniValue dumpwallet(const UniValue& params, bool fHelp) file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString()); file << strprintf("# mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime())); file << "\n"; + + // add the base58check encoded extended master if the wallet uses HD + CKeyID masterKeyID = pwalletMain->GetHDChain().masterKeyID; + if (!masterKeyID.IsNull()) + { + CKey key; + if (pwalletMain->GetKey(masterKeyID, key)) + { + CExtKey masterKey; + masterKey.SetMaster(key.begin(), key.size()); + + CBitcoinExtKey b58extkey; + b58extkey.SetKey(masterKey); + + file << "# extended private masterkey: " << b58extkey.ToString() << "\n\n"; + } + } for (std::vector >::const_iterator it = vKeyBirth.begin(); it != vKeyBirth.end(); it++) { const CKeyID &keyid = it->second; std::string strTime = EncodeDumpTime(it->first); std::string strAddr = CBitcoinAddress(keyid).ToString(); CKey key; if (pwalletMain->GetKey(keyid, key)) { + file << strprintf("%s %s ", CBitcoinSecret(key).ToString(), strTime); if (pwalletMain->mapAddressBook.count(keyid)) { - file << strprintf("%s %s label=%s # addr=%s\n", CBitcoinSecret(key).ToString(), strTime, EncodeDumpString(pwalletMain->mapAddressBook[keyid].name), strAddr); + file << strprintf("label=%s", EncodeDumpString(pwalletMain->mapAddressBook[keyid].name)); + } else if (keyid == masterKeyID) { + file << "hdmaster=1"; } else if (setKeyPool.count(keyid)) { - file << strprintf("%s %s reserve=1 # addr=%s\n", CBitcoinSecret(key).ToString(), strTime, strAddr); + file << "reserve=1"; + } else if (pwalletMain->mapKeyMetadata[keyid].hdKeypath == "m") { + file << "inactivehdmaster=1"; } else { - file << strprintf("%s %s change=1 # addr=%s\n", CBitcoinSecret(key).ToString(), strTime, strAddr); + file << "change=1"; } + file << strprintf(" # addr=%s%s\n", strAddr, (pwalletMain->mapKeyMetadata[keyid].hdKeypath.size() > 0 ? " hdkeypath="+pwalletMain->mapKeyMetadata[keyid].hdKeypath : "")); } } file << "\n"; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 3a3cb6d8514..efed2ba11df 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -899,10 +899,10 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface /* Set the HD chain model (chain child index counters) */ bool SetHDChain(const CHDChain& chain, bool memonly); + const CHDChain& GetHDChain() { return hdChain; } /* Set the current HD master key (will reset the chain child index counters) */ bool SetHDMasterKey(const CKey& key); - const CHDChain& GetHDChain() { return hdChain; } }; /** A key allocated from the key pool. */ From f142c11ac634df487cc4bc65a5f1c9a3e3563dd9 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 21 Jul 2016 21:19:02 +0200 Subject: [PATCH 020/302] [0.13] Create a new HD seed after encrypting the wallet --- doc/release-notes.md | 2 ++ qa/rpc-tests/keypool.py | 10 ++++++++++ src/wallet/rpcwallet.cpp | 2 +- src/wallet/wallet.cpp | 9 +++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index bb9118762b2..ad11fafd326 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -135,6 +135,8 @@ Existing wallets will still use traditional key generation. Backups of HD wallets, regardless of when they have been created, can therefore be used to re-generate all possible private keys, even the ones which haven't already been generated during the time of the backup. +**Attention:** Encrypting the wallet will create a new seed which requires +a new backup! HD key generation for new wallets can be disabled by `-usehd=0`. Keep in mind that this flag only has affect on newly created wallets. diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py index c75303ecbfc..735b91ee9f0 100755 --- a/qa/rpc-tests/keypool.py +++ b/qa/rpc-tests/keypool.py @@ -12,6 +12,11 @@ class KeyPoolTest(BitcoinTestFramework): def run_test(self): nodes = self.nodes + addr_before_encrypting = nodes[0].getnewaddress() + addr_before_encrypting_data = nodes[0].validateaddress(addr_before_encrypting) + wallet_info_old = nodes[0].getwalletinfo() + assert(addr_before_encrypting_data['hdmasterkeyid'] == wallet_info_old['masterkeyid']) + # Encrypt wallet and wait to terminate nodes[0].encryptwallet('test') bitcoind_processes[0].wait() @@ -19,6 +24,11 @@ def run_test(self): nodes[0] = start_node(0, self.options.tmpdir) # Keep creating keys addr = nodes[0].getnewaddress() + addr_data = nodes[0].validateaddress(addr) + wallet_info = nodes[0].getwalletinfo() + assert(addr_before_encrypting_data['hdmasterkeyid'] != wallet_info['masterkeyid']) + assert(addr_data['hdmasterkeyid'] == wallet_info['masterkeyid']) + try: addr = nodes[0].getnewaddress() raise AssertionError('Keypool should be exhausted after one address') diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 4087b8e77b7..a90807e5141 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2081,7 +2081,7 @@ UniValue encryptwallet(const UniValue& params, bool fHelp) // slack space in .dat files; that is bad if the old data is // unencrypted private keys. So: StartShutdown(); - return "wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed, you need to make a new backup."; + return "wallet encrypted; Bitcoin server stopping, restart to run with encrypted wallet. The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup."; } UniValue lockunspent(const UniValue& params, bool fHelp) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 5908dfeacea..a1d9c4a598a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -626,6 +626,15 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) Lock(); Unlock(strWalletPassphrase); + + // if we are using HD, replace the HD master key with a new one + if (!hdChain.masterKeyID.IsNull()) { + CKey key; + key.MakeNewKey(true); + if (!SetHDMasterKey(key)) + return false; + } + NewKeyPool(); Lock(); From de45c065f0648c4c41b57cb492420ceeed29dd11 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Fri, 22 Jul 2016 11:03:30 +0200 Subject: [PATCH 021/302] [Wallet] Add CKeyMetadata record for HDMasterKey(s), factor out HD key generation --- qa/rpc-tests/keypool.py | 6 +++--- src/wallet/wallet.cpp | 49 ++++++++++++++++++++++++++++++++++++------------- src/wallet/wallet.h | 5 ++++- 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py index 735b91ee9f0..fa394765680 100755 --- a/qa/rpc-tests/keypool.py +++ b/qa/rpc-tests/keypool.py @@ -15,7 +15,7 @@ def run_test(self): addr_before_encrypting = nodes[0].getnewaddress() addr_before_encrypting_data = nodes[0].validateaddress(addr_before_encrypting) wallet_info_old = nodes[0].getwalletinfo() - assert(addr_before_encrypting_data['hdmasterkeyid'] == wallet_info_old['masterkeyid']) + assert(addr_before_encrypting_data['hdmasterkeyid'] == wallet_info_old['hdmasterkeyid']) # Encrypt wallet and wait to terminate nodes[0].encryptwallet('test') @@ -26,8 +26,8 @@ def run_test(self): addr = nodes[0].getnewaddress() addr_data = nodes[0].validateaddress(addr) wallet_info = nodes[0].getwalletinfo() - assert(addr_before_encrypting_data['hdmasterkeyid'] != wallet_info['masterkeyid']) - assert(addr_data['hdmasterkeyid'] == wallet_info['masterkeyid']) + assert(addr_before_encrypting_data['hdmasterkeyid'] != wallet_info['hdmasterkeyid']) + assert(addr_data['hdmasterkeyid'] == wallet_info['hdmasterkeyid']) try: addr = nodes[0].getnewaddress() diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a1d9c4a598a..e5ee5063a5d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -627,11 +627,11 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase) Lock(); Unlock(strWalletPassphrase); - // if we are using HD, replace the HD master key with a new one + // if we are using HD, replace the HD master key (seed) with a new one if (!hdChain.masterKeyID.IsNull()) { CKey key; - key.MakeNewKey(true); - if (!SetHDMasterKey(key)) + CPubKey masterPubKey = GenerateNewHDMasterKey(); + if (!SetHDMasterKey(masterPubKey)) return false; } @@ -1175,20 +1175,43 @@ CAmount CWallet::GetChange(const CTransaction& tx) const return nChange; } -bool CWallet::SetHDMasterKey(const CKey& key) +CPubKey CWallet::GenerateNewHDMasterKey() +{ + CKey key; + key.MakeNewKey(true); + + int64_t nCreationTime = GetTime(); + CKeyMetadata metadata(nCreationTime); + + // calculate the pubkey + CPubKey pubkey = key.GetPubKey(); + assert(key.VerifyPubKey(pubkey)); + + // set the hd keypath to "m" -> Master, refers the masterkeyid to itself + metadata.hdKeypath = "m"; + metadata.hdMasterKeyID = pubkey.GetID(); + + { + LOCK(cs_wallet); + + // mem store the metadata + mapKeyMetadata[pubkey.GetID()] = metadata; + + // write the key&metadata to the database + if (!AddKeyPubKey(key, pubkey)) + throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed"); + } + + return pubkey; +} + +bool CWallet::SetHDMasterKey(const CPubKey& pubkey) { LOCK(cs_wallet); // ensure this wallet.dat can only be opened by clients supporting HD SetMinVersion(FEATURE_HD); - // store the key as normal "key"/"ckey" object - // in the database - // key metadata is not required - CPubKey pubkey = key.GetPubKey(); - if (!AddKeyPubKey(key, pubkey)) - throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed"); - // store the keyid (hash160) together with // the child index counter in the database // as a hdchain object @@ -3308,8 +3331,8 @@ bool CWallet::InitLoadWallet() if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) { // generate a new master key CKey key; - key.MakeNewKey(true); - if (!walletInstance->SetHDMasterKey(key)) + CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey(); + if (!walletInstance->SetHDMasterKey(masterPubKey)) throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed"); } CPubKey newDefaultKey; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index efed2ba11df..0c95fdf4b04 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -901,8 +901,11 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface bool SetHDChain(const CHDChain& chain, bool memonly); const CHDChain& GetHDChain() { return hdChain; } + /* Generates a new HD master key (will not be activated) */ + CPubKey GenerateNewHDMasterKey(); + /* Set the current HD master key (will reset the chain child index counters) */ - bool SetHDMasterKey(const CKey& key); + bool SetHDMasterKey(const CPubKey& key); }; /** A key allocated from the key pool. */ From 0179a39f9da1fa417a592e7bf3ebbb1390a292b9 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 27 Jul 2016 16:33:00 +0000 Subject: [PATCH 022/302] qt: periodic translations update --- src/qt/bitcoinstrings.cpp | 2 +- src/qt/locale/bitcoin_ca.ts | 4 - src/qt/locale/bitcoin_ca@valencia.ts | 4 - src/qt/locale/bitcoin_ca_ES.ts | 4 - src/qt/locale/bitcoin_cs.ts | 4 - src/qt/locale/bitcoin_da.ts | 12 +-- src/qt/locale/bitcoin_de.ts | 4 - src/qt/locale/bitcoin_en.ts | 14 +-- src/qt/locale/bitcoin_en_GB.ts | 12 +-- src/qt/locale/bitcoin_es.ts | 12 +-- src/qt/locale/bitcoin_et.ts | 4 + src/qt/locale/bitcoin_fa_IR.ts | 4 - src/qt/locale/bitcoin_fi.ts | 24 ++++- src/qt/locale/bitcoin_fr.ts | 12 +-- src/qt/locale/bitcoin_hu.ts | 50 ++++++++++- src/qt/locale/bitcoin_it.ts | 4 - src/qt/locale/bitcoin_ja.ts | 12 +-- src/qt/locale/bitcoin_nb.ts | 4 - src/qt/locale/bitcoin_nl.ts | 4 - src/qt/locale/bitcoin_pl.ts | 32 ++++++- src/qt/locale/bitcoin_pt_BR.ts | 4 - src/qt/locale/bitcoin_pt_PT.ts | 4 - src/qt/locale/bitcoin_ro_RO.ts | 4 - src/qt/locale/bitcoin_ru.ts | 8 -- src/qt/locale/bitcoin_sk.ts | 164 +++++++++++++++++++++++++++++++++-- src/qt/locale/bitcoin_sr.ts | 12 +++ src/qt/locale/bitcoin_sv.ts | 12 +-- src/qt/locale/bitcoin_tr.ts | 12 +-- src/qt/locale/bitcoin_uk.ts | 4 - src/qt/locale/bitcoin_zh_CN.ts | 4 - src/qt/locale/bitcoin_zh_TW.ts | 12 +-- 31 files changed, 309 insertions(+), 153 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index bca5b72827f..22d3e082414 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -311,7 +311,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of d QT_TRANSLATE_NOOP("bitcoin-core", "Send transactions as zero-fee transactions if possible (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to (default: %u)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum BIP141 block cost (default: %d)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum BIP141 block weight (default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum block size in bytes (default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "Show all debugging options (usage: --help -help-debug)"), diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts index ed259c4d08d..f066760ffdc 100644 --- a/src/qt/locale/bitcoin_ca.ts +++ b/src/qt/locale/bitcoin_ca.ts @@ -2135,10 +2135,6 @@ Defineix la mida clau disponible a <n> (per defecte: %u) - Set minimum block size in bytes (default: %u) - Defineix la mida de bloc mínima en bytes (per defecte: %u) - - Set the number of threads to service RPC calls (default: %d) Defineix el nombre de fils a crides de servei RPC (per defecte: %d) diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts index df0f750a613..bf779aad6ce 100644 --- a/src/qt/locale/bitcoin_ca@valencia.ts +++ b/src/qt/locale/bitcoin_ca@valencia.ts @@ -1967,10 +1967,6 @@ Defineix la mida clau disponible a <n> (per defecte: %u) - Set minimum block size in bytes (default: %u) - Defineix la mida de bloc mínima en bytes (per defecte: %u) - - Set the number of threads to service RPC calls (default: %d) Defineix el nombre de fils a crides de servei RPC (per defecte: %d) diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts index f985a6928d9..9835c8547f9 100644 --- a/src/qt/locale/bitcoin_ca_ES.ts +++ b/src/qt/locale/bitcoin_ca_ES.ts @@ -2131,10 +2131,6 @@ Defineix la mida clau disponible a <n> (per defecte: %u) - Set minimum block size in bytes (default: %u) - Defineix la mida de bloc mínima en bytes (per defecte: %u) - - Set the number of threads to service RPC calls (default: %d) Defineix el nombre de fils a crides de servei RPC (per defecte: %d) diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index 2dfa295ce07..4f198c9ae9d 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -2235,10 +2235,6 @@ Nastavit zásobník klíčů na velikost <n> (výchozí: %u) - Set minimum block size in bytes (default: %u) - Nastavit minimální velikost bloku v bajtech (výchozí: %u) - - Set the number of threads to service RPC calls (default: %d) Nastavení počtu vláken pro servisní RPC volání (výchozí: %d) diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index d298c81bd45..04dd13fc78b 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -2099,10 +2099,6 @@ Sæt cache-størrelse for database i megabytes (%d til %d; standard: %d) - Set maximum block cost (default: %d) - Sæt maksimal blokudgift (standard: %d) - - Set maximum block size in bytes (default: %d) Sæt maksimum blokstørrelse i byte (standard: %d) @@ -2307,6 +2303,10 @@ Send transaktioner som nul-gebyr-transaktioner hvis muligt (standard: %u) + Set maximum BIP141 block cost (default: %d) + Sæt maksimal BIP141-blokudgift (standard: %d) + + Show all debugging options (usage: --help -help-debug) Vis alle tilvalg for fejlsøgning (brug: --help -help-debug) @@ -2532,10 +2532,6 @@ - Set minimum block size in bytes (default: %u) - Angiv minimumsblokstørrelse i byte (standard: %u) - - Set the number of threads to service RPC calls (default: %d) Angiv antallet af tråde til at håndtere RPC-kald (standard: %d) diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 2708324d172..86355944e80 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -2435,10 +2435,6 @@ Größe des Schlüsselpools festlegen auf <n> (Standard: %u) - Set minimum block size in bytes (default: %u) - Minimale Blockgröße in Byte festlegen (Standard: %u) - - Set the number of threads to service RPC calls (default: %d) Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: %d) diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 79c3e87b2b1..2785ed9290a 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -2686,7 +2686,12 @@ - + + Set maximum BIP141 block weight (default: %d) + + + + Set maximum block size in bytes (default: %d) @@ -2941,12 +2946,7 @@ - - Set maximum BIP141 block cost (default: %d) - - - - + Show all debugging options (usage: --help -help-debug) diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts index 1893aaca09b..ac7108e6685 100644 --- a/src/qt/locale/bitcoin_en_GB.ts +++ b/src/qt/locale/bitcoin_en_GB.ts @@ -2099,10 +2099,6 @@ Set database cache size in megabytes (%d to %d, default: %d) - Set maximum block cost (default: %d) - Set maximum block cost (default: %d) - - Set maximum block size in bytes (default: %d) Set maximum block size in bytes (default: %d) @@ -2307,6 +2303,10 @@ Send transactions as zero-fee transactions if possible (default: %u) + Set maximum BIP141 block cost (default: %d) + Set maximum BIP141 block cost (default: %d) + + Show all debugging options (usage: --help -help-debug) Show all debugging options (usage: --help -help-debug) @@ -2531,10 +2531,6 @@ Set key pool size to <n> (default: %u) - Set minimum block size in bytes (default: %u) - Set minimum block size in bytes (default: %u) - - Set the number of threads to service RPC calls (default: %d) Set the number of threads to service RPC calls (default: %d) diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index c67016637b5..8952a0adc30 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -2098,10 +2098,6 @@ Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d) - Set maximum block cost (default: %d) - Establecer tamaño máximo de bloque (por defecto: %d) - - Set maximum block size in bytes (default: %d) Establecer tamaño máximo de bloque en bytes (predeterminado: %d) @@ -2306,6 +2302,10 @@ Mandar transacciones como comisión-cero si es posible (por defecto: %u) + Set maximum BIP141 block cost (default: %d) + Fijar coste máximo del bloque BIP141 (por defecto: %d) + + Show all debugging options (usage: --help -help-debug) Muestra todas las opciones de depuración (uso: --help -help-debug) @@ -2520,10 +2520,6 @@ Ajustar el número de claves en reserva <n> (predeterminado: %u) - Set minimum block size in bytes (default: %u) - Establecer tamaño mínimo de bloque en bytes (por defecto: %u) - - Set the number of threads to service RPC calls (default: %d) Establecer el número de procesos para llamadas del servicio RPC (por defecto: %d) diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts index 0d659fd7195..d17904d97e1 100644 --- a/src/qt/locale/bitcoin_et.ts +++ b/src/qt/locale/bitcoin_et.ts @@ -2,6 +2,10 @@ AddressBookPage + Right-click to edit address or label + Paremkliki aadressi või sildi muutmiseks + + Create a new address Loo uus aadress diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts index 8faa3ce6592..afeab08c73f 100644 --- a/src/qt/locale/bitcoin_fa_IR.ts +++ b/src/qt/locale/bitcoin_fa_IR.ts @@ -513,10 +513,6 @@ لود شدن آدرسها.. - Set minimum block size in bytes (default: %u) - تنظیم کمینه اندازه بلاک بر حسب بایت (پیش فرض: %u) - - Set the number of threads to service RPC calls (default: %d) تنظیم تعداد ریسمان ها برای سرویس دهی فراخوانی های RPC (پیش فرض: %d) diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts index b7b3115e251..4a2cc17f3cc 100644 --- a/src/qt/locale/bitcoin_fi.ts +++ b/src/qt/locale/bitcoin_fi.ts @@ -1038,6 +1038,14 @@ Käyttöliittymä + Decrease font size + Pienennä fontin kokoa + + + Increase font size + Suurenna fontin kokoa + + Services Palvelut @@ -1509,6 +1517,10 @@ ShutdownWindow + %1 is shutting down... + %1 sulkeutuu... + + Do not shut down the computer until this window disappears. Älä sammuta tietokonetta ennenkuin tämä ikkuna katoaa. @@ -1691,6 +1703,10 @@ Bitcoin-ydin + The %s developers + %s kehittäjät + + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. -fallbackfee on asetettu erittäin suureksi! Tämä on rahansiirtokulu jonka voit maksaa kun arvioitu rahansirtokulu ei ole saatavilla. @@ -1703,6 +1719,10 @@ Suorita käsky kun lompakossa rahansiirto muuttuu (%s cmd on vaihdettu TxID kanssa) + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. + Tarkistathan että tietokoneesi päivämäärä ja kellonaika ovat oikeassa! Jos kellosi on väärässä, %s ei toimi oikein. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Aseta script varmistuksen threadien lukumäärä (%u - %d, 0= auto, <0 = jätä näin monta ydintä vapaaksi, oletus: %d) @@ -2067,10 +2087,6 @@ Aseta avainaltaan kooksi <n> (oletus: %u) - Set minimum block size in bytes (default: %u) - Aseta pienin mahdollinen lohkokoko tavuina (oletus: %u) - - Set the number of threads to service RPC calls (default: %d) Aseta RPC-kutsujen palvelemiseen tarkoitettujen säikeiden lukumäärä (oletus: %d) diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index 0b538d76642..086bc1deba5 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -2071,10 +2071,6 @@ Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d) - Set maximum block cost (default: %d) - Définir le coût maximal de bloc (par défaut : %d) - - Set maximum block size in bytes (default: %d) Définir la taille minimale de bloc en octets (par défaut : %d) @@ -2271,6 +2267,10 @@ Envoyer si possible les transactions comme étant sans frais (par défaut : %u) + Set maximum BIP141 block cost (default: %d) + Définir le coût maximal de bloc BIP141 (par défaut : %d) + + Show all debugging options (usage: --help -help-debug) Montrer toutes les options de débogage (utilisation : --help --help-debug) @@ -2495,10 +2495,6 @@ Définir la taille de la réserve de clefs à <n> (par défaut : %u) - Set minimum block size in bytes (default: %u) - Définir la taille de bloc minimale en octets (par défaut : %u) - - Set the number of threads to service RPC calls (default: %d) Définir le nombre d'exétrons pour desservir les appels RPC (par défaut : %d) diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts index 9eb0cf76c43..895e919c998 100644 --- a/src/qt/locale/bitcoin_hu.ts +++ b/src/qt/locale/bitcoin_hu.ts @@ -63,7 +63,15 @@ BanTableModel - + + IP/Netmask + IP-cím/maszk + + + Banned Until + Kitiltás vége + + BitcoinGUI @@ -870,6 +878,10 @@ &Peerek + Banned peers + Kitiltott felek + + Select a peer to view detailed information. Peer kijelölése a részletes információkért @@ -942,6 +954,10 @@ Konzol törlése + Ban Node for + Kitiltás oka + + 1 &hour 1 &óra @@ -958,6 +974,10 @@ 1 &év + &Unban Node + Kitiltás &feloldása + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. Navigálhat a fel és le nyilakkal, és <b>Ctrl-L</b> -vel törölheti a képernyőt. @@ -1363,6 +1383,10 @@ Parancs, amit akkor hajt végre, amikor egy tárca-tranzakció megváltozik (%s a parancsban lecserélődik a blokk TxID-re) + Use UPnP to map the listening port (default: 1 when listening and no -proxy) + UPnP használata porttovábbításra (alapértelmezett: 1, amikor kiszolgál és nem használt a -proxy) + + Connect only to the specified node(s) Csatlakozás csak a megadott csomóponthoz @@ -1407,6 +1431,10 @@ Helytelen vagy nemlétező genézis blokk. Helytelen hálózati adatkönyvtár? + Loading banlist... + Tiltólista betöltése... + + Not enough file descriptors available. Nincs elég fájlleíró. @@ -1423,6 +1451,18 @@ Tárca beállítások: + Discover own IP addresses (default: 1 when listening and no -externalip or -proxy) + Saját IP-cím felfedezése (alapértelmezett: 1, amikor kiszolgál és nem használt a -externalip) + + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway + A fehérlistán szereplő felek nem lesznek automatikusan kitiltva és a tranzakcióik is mindig továbbítva lesznek, akkor is ha már a megerősítésre váró listán (mempool) vannak. Hasznos például összekötő csomópontokon (gateway). + + + (default: %u) + (alapértelmezett: %u) + + Error reading from database, shutting down. Hiba az adatbázis olvasásakor, leállítás @@ -1481,6 +1521,14 @@ Címek betöltése... + (default: %s) + (alapértelmezett: %s) + + + Include IP addresses in debug output (default: %u) + IP-címek megjelenítése a naplóban (alapértelmezett: %u) + + Invalid -proxy address: '%s' Érvénytelen -proxy cím: '%s' diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 55bc9c3c824..752c4f4fee5 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -2260,10 +2260,6 @@ Per specificare più URL separarli con una barra verticale "|". Imposta la dimensione del pool di chiavi a <n> (predefinito: %u) - Set minimum block size in bytes (default: %u) - Imposta la dimensione minima del blocco in byte (predefinito: %u) - - Set the number of threads to service RPC calls (default: %d) Imposta il numero di thread destinati a rispondere alle chiamate RPC (predefinito %d) diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts index 4948cc30675..767a143825c 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/bitcoin_ja.ts @@ -2100,10 +2100,6 @@ データベースのキャッシュサイズをメガバイトで設定 (%dから%d。初期値: %d) - Set maximum block cost (default: %d) - 最大ブロックコストを設定 (初期値: %d) - - Set maximum block size in bytes (default: %d) 最大ブロックサイズをバイトで設定 (初期値: %d) @@ -2308,6 +2304,10 @@ 可能な場合には手数料ゼロのトランザクションとしてトランザクションを送信する (初期値: %u) + Set maximum BIP141 block cost (default: %d) + BIP141ブロックコストの最大値を設定 (初期値: %d) + + Show all debugging options (usage: --help -help-debug) すべてのデバッグオプションを表示する (使い方: --help -help-debug) @@ -2532,10 +2532,6 @@ key pool のサイズを <n> (初期値: %u) にセット - Set minimum block size in bytes (default: %u) - 最小ブロックサイズをバイトで設定 (初期値: %u) - - Set the number of threads to service RPC calls (default: %d) RPC サービスのスレッド数を設定 (初期値: %d) diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts index 4538fd6e1e8..a22feb0a62d 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/bitcoin_nb.ts @@ -2259,10 +2259,6 @@ Angi størrelse på nøkkel-lager til <n> (standardverdi: %u) - Set minimum block size in bytes (default: %u) - Sett minimum blokkstørrelse i bytes (standardverdi: %u) - - Set the number of threads to service RPC calls (default: %d) Sett antall tråder til betjening av RPC-kall (standardverdi: %d) diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts index 781c5a8fd66..6fe1acfbbef 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/bitcoin_nl.ts @@ -2491,10 +2491,6 @@ Stel sleutelpoelgrootte in op <n> (standaard: %u) - Set minimum block size in bytes (default: %u) - Stel minimum blokgrootte in in bytes (standaard: %u) - - Set the number of threads to service RPC calls (default: %d) Stel het aantal threads in om RPC-aanvragen mee te bedienen (standaard: %d) diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts index 09f748b83cb..929f38a5b5b 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/bitcoin_pl.ts @@ -1142,6 +1142,10 @@ Czas odpowiedzi + The duration of a currently outstanding ping. + Czas trwania nadmiarowego pingu + + Ping Wait Czas odpowiedzi @@ -1756,6 +1760,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Przycinanie skonfigurowano poniżej minimalnych %d MiB. Proszę użyć wyższej liczby. + Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node) + Prune: ostatnia synchronizacja portfela jest za danymi. Muszisz -reindexować (pobrać cały ciąg bloków ponownie w przypadku przyciętego węzła) + + Error: A fatal internal error occurred, see debug.log for details Błąd: Wystąpił fatalny błąd wewnętrzny, sprawdź szczegóły w debug.log @@ -1872,6 +1880,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Opcje tworzenia bloku: + Cannot resolve -%s address: '%s' + Nie można rozpoznać -%s adresu: '%s' + + Connect only to the specified node(s) Łącz się tylko do wskazanego węzła/węzłów @@ -1968,6 +1980,14 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Utrzymuj obszar pamięci dla transakcji poniżej <n> MB (default: %u) + Loading banlist... + Ładowanie listy zablokowanych... + + + Location of the auth cookie (default: data dir) + Lokalizacja autoryzacyjnego pliku cookie (domyślnie: ścieżka danych) + + Not enough file descriptors available. Brak wystarczającej liczby deskryptorów plików. @@ -2012,6 +2032,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Określ plik portfela (w obrębie folderu danych) + The source code is available from %s. + Kod źródłowy dostępny jest z %s. + + Unable to bind to %s on this computer. %s is probably already running. Nie można przywiązać do %s na tym komputerze. %s prawdopodobnie jest już uruchomiony. @@ -2212,6 +2236,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Hasło zabezpieczające portu kontrolnego Tora (domyślnie: puste) + Tor control port to use if onion listening enabled (default: %s) + Port kontrolny sieci Tor jeśli onion listening jest włączone (domyślnie: %s) + + Transaction amount too small Zbyt niska kwota transakcji @@ -2392,10 +2420,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Ustaw rozmiar puli kluczy na <n> (domyślnie: %u) - Set minimum block size in bytes (default: %u) - Ustaw minimalny rozmiar bloku w bajtach (domyślnie: %u) - - Set the number of threads to service RPC calls (default: %d) Ustaw liczbę wątków do obsługi RPC (domyślnie: %d) diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index ee48c673413..8b7d08bc7c6 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -2427,10 +2427,6 @@ Defina o tamanho da chave para piscina<n> (padrão: %u) - 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) diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts index eed262e010e..097c6de492b 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/bitcoin_pt_PT.ts @@ -2388,10 +2388,6 @@ Definir tamanho do banco de memória da chave para <n> (predefinição: %u) - Set minimum block size in bytes (default: %u) - Definir tamanho minímo de um bloco em bytes (por defeito: %u) - - Set the number of threads to service RPC calls (default: %d) Defina o número de processos para servir as chamadas RPC (por defeito: %d) diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts index 489ed076391..afd3cc5f103 100644 --- a/src/qt/locale/bitcoin_ro_RO.ts +++ b/src/qt/locale/bitcoin_ro_RO.ts @@ -1863,10 +1863,6 @@ Adresa -proxy nevalidă: '%s' - Set minimum block size in bytes (default: %u) - Setare mărime minimă bloc în octeţi (implicit: %u) - - Specify configuration file (default: %s) Specificaţi fişierul configuraţie (implicit: %s) diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index 60f5d5dfa2a..db9d37c8c14 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -2027,10 +2027,6 @@ Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d) - Set maximum block cost (default: %d) - Задать максимальную стоимость блока (по умолчанию: %d) - - Set maximum block size in bytes (default: %d) Задать максимальный размер блока в байтах (по умолчанию: %d) @@ -2451,10 +2447,6 @@ Установить размер пула ключей в <n> (по умолчанию: %u) - Set minimum block size in bytes (default: %u) - Задать минимальный размер блока в байтах (по умолчанию: %u) - - Set the number of threads to service RPC calls (default: %d) Задать число потоков выполнения запросов RPC (по умолчанию: %d) diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts index a4f0ebcb4e1..527f95d14cd 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/bitcoin_sk.ts @@ -3,7 +3,7 @@ AddressBookPage Right-click to edit address or label - Kliknutím pravým tlačidlom upravte adresu alebo popis + Kliknutím pravým tlačidlom upraviť adresu alebo popis Create a new address @@ -11,11 +11,11 @@ &New - &Nové + &Nový Copy the currently selected address to the system clipboard - Kopírovať práve zvolenú adresu do systémového klipbordu + Zkopírovať práve zvolenú adresu &Copy @@ -115,6 +115,10 @@ &O %1 + Show information about %1 + Ukázať informácie o %1 + + About &Qt O &Qt @@ -127,6 +131,10 @@ &Možnosti... + Modify configuration options for %1 + Upraviť nastavenia pre %1 + + &Encrypt Wallet... &Zašifrovať Peňaženku... @@ -255,6 +263,14 @@ %n aktívne pripojenie do siete Bitcoin%n aktívne pripojenia do siete Bitcoin%n aktívnych pripojení do siete Bitcoin + Indexing blocks on disk... + Indexujem bloky na disku... + + + Processing blocks on disk... + Spracovávam bloky na disku... + + No block source available... Nedostupný zdroj blokov... @@ -311,6 +327,14 @@ Aktualizovaný + Show the %1 help message to get a list with possible Bitcoin command-line options + Ukáž %1 zoznam možných nastavení Bitcoinu pomocou príkazového riadku + + + %1 client + %1 klient + + Catching up... Sťahujem... @@ -497,6 +521,10 @@ (%1-bit) + About %1 + O %1 + + Command-line options Voľby príkazového riadku @@ -532,7 +560,11 @@ Show splash screen on startup (default: %u) Zobraziť uvítaciu obrazovku pri štarte (predvolené: %u) - + + Reset all settings changed in the GUI + Zrušiť všetky zmeny v GUI + + Intro @@ -540,6 +572,14 @@ Vitajte + Welcome to %1. + Vitajte v %1 + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Keďže toto je prvé spustenie programu, môžete si vybrať, kam %1 bude ukladať vaše údaje. + + Use the default data directory Použiť predvolený dátový adresár @@ -594,6 +634,14 @@ &Hlavné + Automatically start %1 after logging in to the system. + Automaticky spustiť %1 pri spustení systému. + + + &Start %1 on system login + &Spustiť %1 pri prihlásení + + Size of &database cache Veľkosť vyrovnávacej pamäti &databázy @@ -730,6 +778,14 @@ &Okno + &Hide the icon from the system tray. + &Skryť ikonu zo systémovej lišty. + + + Hide tray icon + Skryť ikonu v oblasti oznámení + + Show only a tray icon after minimizing the window. Zobraziť len ikonu na lište po minimalizovaní okna. @@ -750,6 +806,10 @@ Jazyk užívateľského rozhrania: + The user interface language can be set here. This setting will take effect after restarting %1. + Jazyk uživateľského rozhrania sa dá nastaviť tu. Toto nastavenie sa uplatní až po reštarte %1. + + &Unit to show amounts in: &Zobrazovať hodnoty v jednotkách: @@ -1039,6 +1099,18 @@ Aplikácia + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. + Otvoriť %1 ladiaci výpis z aktuálnej zložky. Pre veľké súbory to môže chvíľu trvať. + + + Decrease font size + Zmenšiť písmo + + + Increase font size + Zväčšiť písmo + + Services Služby @@ -1518,6 +1590,10 @@ ShutdownWindow + %1 is shutting down... + %1 sa vypína... + + Do not shut down the computer until this window disappears. Nevypínajte počítač kým toto okno nezmizne. @@ -1652,6 +1728,14 @@ Prijímať príkazy z príkazového riadku a JSON-RPC + If <category> is not supplied or if <category> = 1, output all debugging information. + Pokiaľ <category> nie je nastavená, alebo <category> = 1, vypíš všetky informácie pre ladenie. + + + Prune configured below the minimum of %d MiB. Please use a higher number. + Redukcia nastavená pod minimálnu hodnotu %d MiB. Prosím použite vyššiu hodnotu. + + Error: A fatal internal error occurred, see debug.log for details Chyba: Vyskytla sa interná chyba, pre viac informácií zobrazte debug.log @@ -1684,6 +1768,10 @@ Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6 + Cannot obtain a lock on data directory %s. %s is probably already running. + Nemožné uzamknúť zložku %s. %s pravdepodobne už beží. + + Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup Vymazať všetky transakcie z peňaženky a pri spustení znova získať z reťazca blokov iba tie získané pomocou -rescan @@ -1696,10 +1784,22 @@ Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID) + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. + Prosím skontrolujte systémový čas a dátum. Keď je váš čas nesprávny, %s nebude fungovať správne. + + + Please contribute if you find %s useful. Visit %s for further information about the software. + Keď si myslíte, že %s je užitočný, podporte nás. Pre viac informácií o software navštívte %s. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Nastaviť počeť vlákien overujúcich skripty (%u až %d, 0 = auto, <0 = nechať toľkoto jadier voľných, prednastavené: %d) + The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct + Databáza blokov obsahuje blok, ktorý vyzerá byť z budúcnosti. Toto môže byť spôsobené nesprávnym systémovým časom vášho počítača. Obnovujte databázu blokov len keď ste si istý, že systémový čas je nastavený správne. + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications Toto je pred-testovacia verzia - použitie je na vlastné riziko - nepoužívajte na tvorbu bitcoin ani obchodovanie. @@ -1730,6 +1830,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Voľby vytvorenia bloku: + Change index out of range + Menný index mimo rozsah + + Connect only to the specified node(s) Pripojiť sa len k určenej nóde @@ -1738,6 +1842,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Možnosti pripojenia: + Copyright (C) %i-%i + Copyright (C) %i-%i + + Corrupted block database detected Zistená poškodená databáza blokov @@ -1766,6 +1874,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Povoliť zverejnenie raw bloku pre <address> + Enable publish raw transaction in <address> + Povoliť publikovať hrubý prevod v <address> + + Error initializing block database Chyba inicializácie databázy blokov @@ -1810,6 +1922,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Nesprávny alebo žiadny genesis blok nájdený. Nesprávny dátový priečinok alebo sieť? + Initialization sanity check failed. %s is shutting down. + Kontrola čistoty pri inicializácií zlyhala. %s sa vypína. + + Invalid -onion address: '%s' Neplatná -onion adresa: '%s' @@ -1834,6 +1950,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin Pripojiť iba k uzlom v sieti <net> (ipv4, ipv6, alebo onion) + Print this help message and exit + Vytlačiť túto pomocnú správu a ukončiť + + + Print version and exit + Vytlačiť verziu a ukončiť + + Prune cannot be configured with a negative value. Redukovanie nemôže byť nastavené na zápornú hodnotu. @@ -1842,6 +1966,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin Redukovanie je nekompatibilné s -txindex. + Rebuild chain state and block index from the blk*.dat files on disk + Obnoviť stav reťazca a index blokov zo súborov blk*.dat na disku. + + + Rebuild chain state from the currently indexed blocks + Obnoviť stav reťazca z aktuálne indexovaných blokov. + + Set database cache size in megabytes (%d to %d, default: %d) Nastaviť veľkosť pomocnej pamäti databázy v megabajtoch (%d do %d, prednastavené: %d) @@ -1854,6 +1986,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin Označ súbor peňaženky (v priečinku s dátami) + The source code is available from %s. + Zdrojový kód je dostupný z %s + + + Unable to bind to %s on this computer. %s is probably already running. + Nemožné pripojiť k %s na tomto počíťači. %s už pravdepodobne beží. + + Unsupported argument -benchmark ignored, use -debug=bench. Nepodporovaný parameter -benchmark bol ignorovaný, použite -debug=bench. @@ -1882,6 +2022,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin Peňaženka %s sa nachádza mimo dátového priečinka %s + Wallet debugging/testing options: + Ladiace / testovacie možnosti peňaženky. + + + Wallet needed to be rewritten: restart %s to complete + Peňaženka musí byť prepísaná: pre dokončenie reštartujte %s + + Wallet options: Voľby peňaženky: @@ -1998,6 +2146,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Možnosti servra RPC: + Rescan the block chain for missing wallet transactions on startup + Pri spustení skontrolovať reťaz blokov pre chýbajúce transakcie peňaženky + + Send trace/debug info to console instead of debug.log file Odoslať trace/debug informácie na konzolu namiesto debug.info žurnálu @@ -2162,10 +2314,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin Nastaviť veľkosť kľúča fronty na <n> (predvolené: %u) - Set minimum block size in bytes (default: %u) - Nastaviť minimálnu veľkosť bloku v bajtoch (predvolené: %u) - - Set the number of threads to service RPC calls (default: %d) Nastaviť počet vlákien na obsluhu RPC volaní (predvolené: %d) diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts index 6b6f1af6f64..729bd08b39d 100644 --- a/src/qt/locale/bitcoin_sr.ts +++ b/src/qt/locale/bitcoin_sr.ts @@ -2,6 +2,10 @@ AddressBookPage + Right-click to edit address or label + Kliknite desnim klikom radi izmene adrese ili oznake + + Create a new address Napravite novu adresu @@ -18,10 +22,18 @@ Kopirajte + C&lose + Zatvorite + + Delete the currently selected address from the list Izbrisite trenutno izabranu adresu sa liste + Export the data in the current tab to a file + Eksportuj podatke iz izabrane kartice u fajl + + &Delete &Избриши diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index ee46974d8b4..0455ba18909 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -2095,10 +2095,6 @@ Sätt databasens cachestorlek i megabyte (%d till %d, förvalt: %d) - Set maximum block cost (default: %d) - Sätt maximal blockkostnad (förvalt: %d) - - Set maximum block size in bytes (default: %d) Sätt maximal blockstorlek i byte (förvalt: %d) @@ -2303,6 +2299,10 @@ Sänd transaktioner som nollavgiftstransaktioner om möjligt (förvalt: %u) + Set maximum BIP141 block cost (default: %d) + Sätt maximal BIP141 blockkostnad (förvalt: %d) + + Show all debugging options (usage: --help -help-debug) Visa alla avlusningsalternativ (använd: --help -help-debug) @@ -2527,10 +2527,6 @@ Sätt storleken på nyckelpoolen till <n> (förvalt: %u) - Set minimum block size in bytes (default: %u) - Sätt minsta blockstorlek i byte (standard: %u) - - Set the number of threads to service RPC calls (default: %d) Ange antalet trådar för att hantera RPC anrop (förvalt: %d) diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index e3a811b504e..3dfc85eaf3d 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -2099,10 +2099,6 @@ Veritabanı önbellek boyutunu megabayt olarak belirt (%d ilâ %d, varsayılan: %d) - Set maximum block cost (default: %d) - Azami blok maliyetini ayarla (varsayılan: %d) - - Set maximum block size in bytes (default: %d) Azami blok boyutunu bayt olarak ayarla (varsayılan: %d) @@ -2307,6 +2303,10 @@ Muameleleri mümkünse ücretsiz olarak gönder (varsayılan: %u) + Set maximum BIP141 block cost (default: %d) + Azami BIP141 blok maliyetini ayarla (varsayılan: %d) + + Show all debugging options (usage: --help -help-debug) Tüm hata ayıklama seçeneklerini göster (kullanımı: --help -help-debug) @@ -2531,10 +2531,6 @@ Anahtar alan boyutunu <n> değerine ayarla (varsayılan: %u) - Set minimum block size in bytes (default: %u) - Bayt olarak asgari blok boyutunu tanımla (varsayılan: %u) - - Set the number of threads to service RPC calls (default: %d) Hizmet RCP aramaları iş parçacığı sayısını belirle (varsayılan: %d) diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts index a06cc9e0921..bdfe3f57e35 100644 --- a/src/qt/locale/bitcoin_uk.ts +++ b/src/qt/locale/bitcoin_uk.ts @@ -2263,10 +2263,6 @@ Встановити розмір пулу ключів <n> (типово: %u) - Set minimum block size in bytes (default: %u) - Встановити мінімальний розмір блоку в байтах (типово: %u) - - Set the number of threads to service RPC calls (default: %d) Встановити число потоків для обслуговування викликів RPC (типово: %d) diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index 92a7006d30f..e7a706ee524 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -2261,10 +2261,6 @@ 设置私钥池大小为 <n> (默认:%u) - Set minimum block size in bytes (default: %u) - 设置数据块 最小字节数 (默认: %u) - - Set the number of threads to service RPC calls (default: %d) 设置RPC服务线程数 (默认: %d) diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index ab56f96795a..e2934d0b9d6 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -2100,10 +2100,6 @@ 設定資料庫快取大小是多少百萬位元組(MB,範圍: %d 到 %d,預設值: %d) - Set maximum block cost (default: %d) - 設定區塊成本的最大值(預設值: %d) - - Set maximum block size in bytes (default: %d) 設定區塊大小上限成多少位元組(預設值: %d) @@ -2308,6 +2304,10 @@ 盡可能送出不用付手續費的交易(預設值: %u) + Set maximum BIP141 block cost (default: %d) + 設定區塊成本(BIP141)的最大值(預設值: %d) + + Show all debugging options (usage: --help -help-debug) 顯示所有的除錯選項 (用法: --help --help-debug) @@ -2532,10 +2532,6 @@ 設定密鑰池大小為 <n> (預設值: %u) - Set minimum block size in bytes (default: %u) - 設定區塊大小下限為多少位元組(預設值: %u) - - Set the number of threads to service RPC calls (default: %d) 設定處理 RPC 服務請求的執行緒數目(預設值: %d) From 45eba4b1e0658639bb92730723b987f05e171529 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 26 Jul 2016 14:01:36 +0200 Subject: [PATCH 023/302] [Qt] Add dbcache migration path Github-Pull: #8407 Rebased-From: 893f379ba0befef5301208b6bee8206ac4e76329 --- src/qt/optionsmodel.cpp | 21 +++++++++++++++++++++ src/qt/optionsmodel.h | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index cc2cbc0e664..684db71a8ce 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -43,6 +43,8 @@ void OptionsModel::Init(bool resetSettings) if (resetSettings) Reset(); + checkAndMigrate(); + QSettings settings; // Ensure restart flag is unset on client startup @@ -429,3 +431,22 @@ bool OptionsModel::isRestartRequired() QSettings settings; return settings.value("fRestartRequired", false).toBool(); } + +void OptionsModel::checkAndMigrate() +{ + // Migration of default values + // Check if the QSettings container was already loaded with this client version + QSettings settings; + static const char strSettingsVersionKey[] = "nSettingsVersion"; + int settingsVersion = settings.contains(strSettingsVersionKey) ? settings.value(strSettingsVersionKey).toInt() : 0; + if (settingsVersion < CLIENT_VERSION) + { + // -dbcache was bumped from 100 to 300 in 0.13 + // see https://github.com/bitcoin/bitcoin/pull/8273 + // force people to upgrade to the new value if they are using 100MB + if (settingsVersion < 130000 && settings.contains("nDatabaseCache") && settings.value("nDatabaseCache").toLongLong() == 100) + settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache); + + settings.setValue(strSettingsVersionKey, CLIENT_VERSION); + } +} \ No newline at end of file diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h index 3b491ceac2c..b23b5f2607a 100644 --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -84,9 +84,11 @@ class OptionsModel : public QAbstractListModel /* settings that were overriden by command-line */ QString strOverriddenByCommandLine; - /// Add option to list of GUI options overridden through command line/config file + // Add option to list of GUI options overridden through command line/config file void addOverriddenOption(const std::string &option); + // Check settings version and upgrade default values if required + void checkAndMigrate(); Q_SIGNALS: void displayUnitChanged(int unit); void coinControlFeaturesChanged(bool); From 8360d5b37dd4d8248da0552de40e5ea1d17f51eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Wed, 27 Jul 2016 22:42:13 +0200 Subject: [PATCH 024/302] libconsensus: Expose a flag for BIP112 We added the segwit one, but we forgot CHECKSEQUENCEVERIFY Github-Pull: #8412 Rebased-From: d12b732ac287a1ed7543481b79801c9afc333b7f --- src/script/bitcoinconsensus.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h index 6f868d0d6d6..f73a8e30bc6 100644 --- a/src/script/bitcoinconsensus.h +++ b/src/script/bitcoinconsensus.h @@ -51,6 +51,7 @@ enum 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) + bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), // enable CHECKSEQUENCEVERIFY (BIP112) bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), // enable WITNESS (BIP141) }; From b7e201181bcc0f6328e0a499803f1dbb2c2dbd28 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 26 Jul 2016 16:50:48 -0400 Subject: [PATCH 025/302] Prevent fingerprinting, disk-DoS with compact blocks - Ignore GETBLOCKTXN requests for unknown blocks Don't disconnect peers, or else we leak information that could be used for fingerprinting. - Ignore CMPCTBLOCK messages for pruned blocks Also ignores CMPCTBLOCK announcements that have too little work. This is to prevent disk-exhaustion DoS. Github-Pull: #8408 Rebased-From: 1de2a46632946990a7863020b61172232f8c5796 1d06e49834814eed45e07393dcffd7b6683311b2 --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 70f0a424755..a80eb621267 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5344,7 +5344,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, BlockMap::iterator it = mapBlockIndex.find(req.blockhash); if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) { - Misbehaving(pfrom->GetId(), 100); LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id); return true; } @@ -5628,8 +5627,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, std::vector vInv(1); vInv[0] = CInv(MSG_BLOCK, cmpctblock.header.GetHash()); pfrom->PushMessage(NetMsgType::GETDATA, vInv); - return true; } + return true; } // If we're not close to tip yet, give up and let parallel block fetch work its magic From b06808c58eb7a997c42b55cba63688aec448a0ea Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 29 Jul 2016 09:50:00 +0200 Subject: [PATCH 026/302] doc: Release notes update for rc2 --- doc/release-notes.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index ad11fafd326..78f29158dc7 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -361,6 +361,7 @@ git merge commit are mentioned. - #8149 `d612837` Testnet-only segregated witness (sipa) - #8305 `3730393` Improve handling of unconnecting headers (sdaftuar) - #8363 `fca1a41` Rename "block cost" to "block weight" (sdaftuar) +- #8381 `f84ee3d` Make witness v0 outputs non-standard (jl2012) ### P2P protocol and network code @@ -407,6 +408,7 @@ git merge commit are mentioned. - #8312 `ca40ef6` Fix mempool DoS vulnerability from malleated transactions (sdaftuar) - #7180 `16ccb74` Account for `sendheaders` `verack` messages (laanwj) - #8102 `425278d` Bugfix: use global ::fRelayTxes instead of CNode in version send (sipa) +- #8408 `b7e2011` Prevent fingerprinting, disk-DoS with compact blocks (sdaftuar) ### Build system @@ -450,6 +452,8 @@ git merge commit are mentioned. - #8310 `6ae20df` Require boost for bench (theuni) - #8315 `2e51590` Don't require sudo for Linux (theuni) - #8314 `67caef6` Fix pkg-config issues for 0.13 (theuni) +- #8373 `1fe7f40` Fix OSX non-deterministic dmg (theuni) +- #8358 `cfd1280` Gbuild: Set memory explicitly (default is too low) (MarcoFalke) ### GUI @@ -493,6 +497,7 @@ git merge commit are mentioned. - #7707 `a914968` UI support for abandoned transactions (jonasschnelli) - #8207 `f7a403b` Add a link to the Bitcoin-Core repository and website to the About Dialog (MarcoFalke) - #8281 `6a87eb0` Remove client name from debug window (laanwj) +- #8407 `45eba4b` Add dbcache migration path (jonasschnelli) ### Wallet @@ -523,6 +528,10 @@ git merge commit are mentioned. - #8324 `bc94b87` Keep HD seed during salvagewallet (jonasschnelli) - #8323 `238300b` Add HD keypath to CKeyMetadata, report metadata in validateaddress (jonasschnelli) - #8367 `3b38a6a` Ensure <0.13 clients can't open HD wallets (jonasschnelli) +- #8378 `ebea651` Move SetMinVersion for FEATURE_HD to SetHDMasterKey (pstratem) +- #8390 `73adfe3` Correct hdmasterkeyid/masterkeyid name confusion (jonasschnelli) +- #8206 `18b8ee1` Add HD xpriv to dumpwallet (jonasschnelli) +- #8389 `c3c82c4` Create a new HD seed after encrypting the wallet (jonasschnelli) ### Tests and QA @@ -616,6 +625,7 @@ git merge commit are mentioned. - #7600 `66db2d6` Select transactions using feerate-with-ancestors (sdaftuar) - #8295 `f5660d3` Mining-related fixups for 0.13.0 (sdaftuar) - #7796 `536b75e` Add support for negative fee rates, fixes `prioritizetransaction` (MarcoFalke) +- #8362 `86edc20` Scale legacy sigop count in CreateNewBlock (sdaftuar) ### Documentation and miscellaneous @@ -682,6 +692,7 @@ git merge commit are mentioned. - #7934 `f17032f` Improve rolling bloom filter performance and benchmark (sipa) - #8004 `2efe38b` signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (catilac) - #7713 `f6598df` Fixes for verify-commits script (petertodd) +- #8412 `8360d5b` libconsensus: Expose a flag for BIP112 (jtimon) Credits ======= @@ -727,6 +738,7 @@ Thanks to everyone who directly contributed to this release: - Gregory Sanders - instagibbs - James O'Beirne +- Jannes Faber - Jarret Dyrbye - Jeremy Rand - jloughry From ced6c940da35fcf33160d1c7f2f54a99dc7eedb1 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 29 Jul 2016 07:55:53 +0000 Subject: [PATCH 027/302] qt: Translations update pre-rc2 --- src/qt/locale/bitcoin_da.ts | 4 - src/qt/locale/bitcoin_de.ts | 8 ++ src/qt/locale/bitcoin_en_GB.ts | 4 - src/qt/locale/bitcoin_es.ts | 4 - src/qt/locale/bitcoin_fr.ts | 8 +- src/qt/locale/bitcoin_ja.ts | 4 - src/qt/locale/bitcoin_nb.ts | 12 +++ src/qt/locale/bitcoin_pt_BR.ts | 44 ++++++++ src/qt/locale/bitcoin_sv.ts | 4 - src/qt/locale/bitcoin_tr.ts | 4 - src/qt/locale/bitcoin_vi_VN.ts | 230 ++++++++++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_zh_TW.ts | 4 - 12 files changed, 296 insertions(+), 34 deletions(-) diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index 04dd13fc78b..db52367ef55 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -2303,10 +2303,6 @@ Send transaktioner som nul-gebyr-transaktioner hvis muligt (standard: %u) - Set maximum BIP141 block cost (default: %d) - Sæt maksimal BIP141-blokudgift (standard: %d) - - Show all debugging options (usage: --help -help-debug) Vis alle tilvalg for fejlsøgning (brug: --help -help-debug) diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 86355944e80..502d02b7f72 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -810,6 +810,10 @@ &Sprache der Benutzeroberfläche: + The user interface language can be set here. This setting will take effect after restarting %1. + Die Benutzeroberflächensprache kann hier festgelegt werden. Diese Einstellung wird nach einem Neustart von %1 wirksam werden. + + &Unit to show amounts in: &Einheit der Beträge: @@ -1887,6 +1891,10 @@ Kann Adresse in -%s nicht auflösen: '%s' + Change index out of range + Änderungsindex außerhalb des Bereichs + + Connect only to the specified node(s) Mit nur dem oder den angegebenen Knoten verbinden diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts index ac7108e6685..596fd1db2ed 100644 --- a/src/qt/locale/bitcoin_en_GB.ts +++ b/src/qt/locale/bitcoin_en_GB.ts @@ -2303,10 +2303,6 @@ Send transactions as zero-fee transactions if possible (default: %u) - Set maximum BIP141 block cost (default: %d) - Set maximum BIP141 block cost (default: %d) - - Show all debugging options (usage: --help -help-debug) Show all debugging options (usage: --help -help-debug) diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index 8952a0adc30..1a367c27626 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -2302,10 +2302,6 @@ Mandar transacciones como comisión-cero si es posible (por defecto: %u) - Set maximum BIP141 block cost (default: %d) - Fijar coste máximo del bloque BIP141 (por defecto: %d) - - Show all debugging options (usage: --help -help-debug) Muestra todas las opciones de depuración (uso: --help -help-debug) diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index 086bc1deba5..ebfc773fbca 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -2071,6 +2071,10 @@ Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d) + Set maximum BIP141 block weight (default: %d) + Définir le poids maximal de bloc BIP141 (par défaut : %d) + + Set maximum block size in bytes (default: %d) Définir la taille minimale de bloc en octets (par défaut : %d) @@ -2267,10 +2271,6 @@ Envoyer si possible les transactions comme étant sans frais (par défaut : %u) - Set maximum BIP141 block cost (default: %d) - Définir le coût maximal de bloc BIP141 (par défaut : %d) - - Show all debugging options (usage: --help -help-debug) Montrer toutes les options de débogage (utilisation : --help --help-debug) diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts index 767a143825c..4d866ce94ab 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/bitcoin_ja.ts @@ -2304,10 +2304,6 @@ 可能な場合には手数料ゼロのトランザクションとしてトランザクションを送信する (初期値: %u) - Set maximum BIP141 block cost (default: %d) - BIP141ブロックコストの最大値を設定 (初期値: %d) - - Show all debugging options (usage: --help -help-debug) すべてのデバッグオプションを表示する (使い方: --help -help-debug) diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts index a22feb0a62d..4d270a6ef10 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/bitcoin_nb.ts @@ -311,6 +311,10 @@ Oppdatert + %1 client + %1 klient + + Catching up... Laster ned... @@ -497,6 +501,10 @@ (%1-bit) + About %1 + Om %1 + + Command-line options Kommandolinjevalg @@ -540,6 +548,10 @@ Velkommen + Welcome to %1. + Velkommen til %1. + + Use the default data directory Bruk standard datamappe diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index 8b7d08bc7c6..5e7f47cdac7 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -1883,6 +1883,10 @@ Lista Branca pares de ligação da máscara de rede dado ou o endereço IP . Pode ser especificado várias vezes. + %s corrupt, salvage failed + %s corrompido, recuperação falhou + + -maxmempool must be at least %d MB -maxmempool deve ser pelo menos %d MB @@ -1911,6 +1915,10 @@ Opções de conexão: + Copyright (C) %i-%i + Copyright (C) %i-%i + + Corrupted block database detected Detectado Banco de dados de blocos corrompido @@ -1955,6 +1963,22 @@ Erro ao inicializar ambiente de banco de dados de carteira %s! + Error loading %s + Erro ao carregar %s + + + Error loading %s: Wallet corrupted + Erro ao carregar %s Carteira corrompida + + + Error loading %s: Wallet requires newer version of %s + Erro ao carregar %s A carteira requer a versão mais nova do %s + + + Error loading %s: You can't disable HD on a already existing HD wallet + Erro ao carregar %s: Você não pode desabilitar HD numa já existente carteira HD. + + Error loading block database Erro ao carregar banco de dados de blocos @@ -1983,6 +2007,10 @@ Endereço -onion inválido: '%s' + Invalid amount for -%s=<amount>: '%s' + Valor inválido para -%s=<amount>: '%s' + + Invalid amount for -fallbackfee=<amount>: '%s' Valor inválido para -fallbackfee=<amount>: '%s' @@ -1991,6 +2019,10 @@ Mantenha a mempool de transações abaixo de <n> megabytes (padrão: %u) + Loading banlist... + Carregando banlist... + + Location of the auth cookie (default: data dir) Localização do cookie de autenticação (padrão: diretório de dados) @@ -2031,6 +2063,10 @@ Especifique o arquivo da carteira (dentro do diretório de dados) + The source code is available from %s. + O código fonte está disponível pelo %s + + Unsupported argument -benchmark ignored, use -debug=bench. Argumento não suportado -benchmark ignorado, use -debug=bench. @@ -2063,6 +2099,14 @@ Carteira %s reside fora do diretório de dados %s + Wallet debugging/testing options: + Opções de depuração/teste da Carteira + + + Wallet needed to be rewritten: restart %s to complete + A Carteira precisou ser reescrita: reinicie o %s para completar + + Wallet options: Opções da carteira: diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index 0455ba18909..84ae9145e9b 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -2299,10 +2299,6 @@ Sänd transaktioner som nollavgiftstransaktioner om möjligt (förvalt: %u) - Set maximum BIP141 block cost (default: %d) - Sätt maximal BIP141 blockkostnad (förvalt: %d) - - Show all debugging options (usage: --help -help-debug) Visa alla avlusningsalternativ (använd: --help -help-debug) diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index 3dfc85eaf3d..ccf570b5396 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -2303,10 +2303,6 @@ Muameleleri mümkünse ücretsiz olarak gönder (varsayılan: %u) - Set maximum BIP141 block cost (default: %d) - Azami BIP141 blok maliyetini ayarla (varsayılan: %d) - - Show all debugging options (usage: --help -help-debug) Tüm hata ayıklama seçeneklerini göster (kullanımı: --help -help-debug) diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts index a4e1588c932..8b92a3a2e94 100644 --- a/src/qt/locale/bitcoin_vi_VN.ts +++ b/src/qt/locale/bitcoin_vi_VN.ts @@ -63,10 +63,22 @@ BanTableModel - + + IP/Netmask + IP/Netmask + + + Banned Until + Bị cấm đến + + BitcoinGUI + Synchronizing with network... + Đồng bộ hóa với mạng + + &Overview &Tổng quan @@ -75,6 +87,14 @@ Node + &Transactions + &Giao dịch + + + Browse transaction history + Duyệt tìm lịch sử giao dịch + + E&xit T&hoát @@ -83,6 +103,14 @@ Thoát chương trình + &About %1 + &Thông tin về %1 + + + Show information about %1 + Hiện thông tin về %1 + + About &Qt Về &Qt @@ -91,6 +119,30 @@ Xem thông tin về Qt + &Options... + &Tùy chọn... + + + Modify configuration options for %1 + Chỉnh sửa thiết đặt tùy chọn cho %1 + + + &Encrypt Wallet... + &Mã hóa ví tiền + + + &Backup Wallet... + &Sao lưu ví tiền... + + + &Change Passphrase... + &Thay đổi mật khẩu... + + + &Sending addresses... + &Địa chỉ gửi + + &Receiving addresses... Địa chỉ nhận @@ -99,6 +151,18 @@ Mở &URI... + Send coins to a Bitcoin address + Gửi coins đến tài khoản Bitcoin + + + Backup wallet to another location + Sao lưu ví tiền ở vị trí khác + + + &Verify message... + &Tin nhắn xác thực + + Bitcoin Bitcoin @@ -134,6 +198,18 @@ &Help Trợ &giúp + + Request payments (generates QR codes and bitcoin: URIs) + Yêu cầu thanh toán(tạo mã QR và địa chỉ Bitcoin: URLs) + + + Open a bitcoin: URI or payment request + Mở bitcoin:URL hoặc yêu cầu thanh toán + + + &Command-line options + 7Tùy chọn dòng lệnh + %n hour(s) %n giờ @@ -155,6 +231,10 @@ %n năm + %1 behind + %1 chậm trễ + + Error Lỗi @@ -171,6 +251,36 @@ Đã cập nhật + Date: %1 + + Ngày: %1 + + + + Amount: %1 + + Số lượng: %1 + + + + Type: %1 + + Loại: %1 + + + + Label: %1 + + Nhãn hiệu: %1 + + + + Address: %1 + + Địa chỉ: %1 + + + Sent transaction Giao dịch đã gửi @@ -178,7 +288,15 @@ Incoming transaction Giao dịch đang tới - + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Ví tiền <b> đã được mã hóa</b>và hiện <b>đang mở</b> + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Ví tiền <b> đã được mã hóa</b>và hiện <b>đang khóa</b> + + CoinControlDialog @@ -202,10 +320,26 @@ Phí: + After Fee: + Sau thuế, phí: + + Change: Thay đổi: + (un)select all + (bỏ)chọn tất cả + + + Tree mode + Chế độ cây + + + List mode + Chế độ danh sách + + Amount Lượng @@ -229,6 +363,10 @@ EditAddressDialog + Edit Address + Thay đổi địa chỉ + + &Label Nhãn @@ -250,6 +388,30 @@ version version + + (%1-bit) + (%1-bit) + + + Command-line options + &Tùy chọn dòng lệnh + + + Usage: + Mức sử dụng + + + command-line options + tùy chọn dòng lệnh + + + Set language, for example "de_DE" (default: system locale) + Chọn ngôn ngữ, ví dụ "de_DE" (mặc định: Vị trí hệ thống) + + + Set SSL root certificates for payment request (default: -system-) + Đặt chứng nhận SSL gốc cho yêu cầu giao dịch (mặc định: -hệ thống-) + Intro @@ -258,6 +420,10 @@ Chào mừng + Use the default data directory + Sử dụng vị trí dữ liệu mặc định + + Error Lỗi @@ -288,14 +454,58 @@ MB + Accept connections from outside + Chấp nhận các kết nối từ bên ngoài + + + Allow incoming connections + Cho phép nhận kết nối + + + IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) + Địa chỉ IP của proxy (ví dụ IPv4: 127.0.0.1 / IPv6: ::1) + + + Third party transaction URLs + Phần mềm giao dịch bên thứ ba URLs + + W&allet + Connect to the Bitcoin network through a SOCKS5 proxy. + Kết nối đến máy chủ Bitcoin thông qua SOCKS5 proxy. + + + Proxy &IP: + Proxy &IP: + + + &Port: + &Cổng: + + + Port of the proxy (e.g. 9050) + Cổng proxy (e.g. 9050) + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + &Display &Hiển thị + User Interface &language: + Giao diện người dùng & ngôn ngữ + + &OK &OK @@ -307,6 +517,10 @@ default mặc định + + none + Trống + OverviewPage @@ -315,6 +529,14 @@ Form + Available: + Khả dụng + + + Pending: + Đang chờ + + Total: Tổng: @@ -401,6 +623,10 @@ Phí: + After Fee: + Sau thuế, phí: + + Change: Thay đổi: diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index e2934d0b9d6..1fd8d6df893 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -2304,10 +2304,6 @@ 盡可能送出不用付手續費的交易(預設值: %u) - Set maximum BIP141 block cost (default: %d) - 設定區塊成本(BIP141)的最大值(預設值: %d) - - Show all debugging options (usage: --help -help-debug) 顯示所有的除錯選項 (用法: --help --help-debug) From 3f65ba2b3bd6c4e269f8f89b16d386b443431693 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 18 Jul 2016 20:57:20 +0200 Subject: [PATCH 028/302] Treat high-sigop transactions as larger rather than rejecting them --- src/init.cpp | 2 +- src/main.cpp | 3 +-- src/main.h | 2 -- src/policy/policy.cpp | 10 ++++++---- src/policy/policy.h | 8 ++++++-- src/txmempool.cpp | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 312dfe1699c..8d4a2cafbfb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -446,7 +446,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageGroup(_("Node relay options:")); if (showDebug) strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !Params(CBaseChainParams::TESTNET).RequireStandard())); - strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Minimum bytes per sigop in transactions we relay and mine (default: %u)"), DEFAULT_BYTES_PER_SIGOP)); + strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP)); strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER)); strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY)); strUsage += HelpMessageOpt("-mempoolreplacement", strprintf(_("Enable transaction replacement in the memory pool (default: %u)"), DEFAULT_ENABLE_REPLACEMENT)); diff --git a/src/main.cpp b/src/main.cpp index a80eb621267..7ddf52fc550 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -74,7 +74,6 @@ bool fHavePruned = false; bool fPruneMode = false; bool fIsBareMultisigStd = DEFAULT_PERMIT_BAREMULTISIG; bool fRequireStandard = true; -unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP; bool fCheckBlockIndex = false; bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED; size_t nCoinCacheUsage = 5000 * 300; @@ -1297,7 +1296,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // itself can contain sigops MAX_STANDARD_TX_SIGOPS is less than // MAX_BLOCK_SIGOPS; we still consider this an invalid rather than // merely non-standard transaction. - if ((nSigOpsCost > MAX_STANDARD_TX_SIGOPS_COST) || (nBytesPerSigOp && nSigOpsCost > nSize * WITNESS_SCALE_FACTOR / nBytesPerSigOp)) + if (nSigOpsCost > MAX_STANDARD_TX_SIGOPS_COST) return state.DoS(0, false, REJECT_NONSTANDARD, "bad-txns-too-many-sigops", false, strprintf("%d", nSigOpsCost)); diff --git a/src/main.h b/src/main.h index 27121890f6d..631dc00d05d 100644 --- a/src/main.h +++ b/src/main.h @@ -124,7 +124,6 @@ static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60; /** Default for -permitbaremultisig */ static const bool DEFAULT_PERMIT_BAREMULTISIG = true; -static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20; static const bool DEFAULT_CHECKPOINTS_ENABLED = true; static const bool DEFAULT_TXINDEX = false; static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100; @@ -165,7 +164,6 @@ extern int nScriptCheckThreads; extern bool fTxIndex; extern bool fIsBareMultisigStd; extern bool fRequireStandard; -extern unsigned int nBytesPerSigOp; extern bool fCheckBlockIndex; extern bool fCheckpointsEnabled; extern size_t nCoinCacheUsage; diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 57df1f0b195..48080abc778 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -154,12 +154,14 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) return true; } -int64_t GetVirtualTransactionSize(int64_t nWeight) +unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP; + +int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost) { - return (nWeight + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; + return (std::max(nWeight, nSigOpCost * nBytesPerSigOp) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR; } -int64_t GetVirtualTransactionSize(const CTransaction& tx) +int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t nSigOpCost) { - return GetVirtualTransactionSize(GetTransactionWeight(tx)); + return GetVirtualTransactionSize(GetTransactionWeight(tx), nSigOpCost); } diff --git a/src/policy/policy.h b/src/policy/policy.h index ad209d0306e..6bf5ca0ee55 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -28,6 +28,8 @@ static const unsigned int MAX_P2SH_SIGOPS = 15; static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5; /** Default for -maxmempool, maximum megabytes of mempool memory usage */ static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300; +/** Default for -bytespersigop */ +static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20; /** * Standard script verification flags that standard transactions will comply * with. However scripts violating these flags may still be present in valid @@ -66,8 +68,10 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes */ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs); +extern unsigned int nBytesPerSigOp; + /** Compute the virtual transaction size (weight reinterpreted as bytes). */ -int64_t GetVirtualTransactionSize(int64_t nWeight); -int64_t GetVirtualTransactionSize(const CTransaction& tx); +int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost); +int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t nSigOpCost = 0); #endif // BITCOIN_POLICY_POLICY_H diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 691baa67440..82827b8e4f1 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -75,7 +75,7 @@ void CTxMemPoolEntry::UpdateLockPoints(const LockPoints& lp) size_t CTxMemPoolEntry::GetTxSize() const { - return GetVirtualTransactionSize(nTxWeight); + return GetVirtualTransactionSize(nTxWeight, sigOpCost); } // Update the given tx for any in-mempool descendants. From 719208c66f2df124cdf542ae80c2f99563fa7851 Mon Sep 17 00:00:00 2001 From: paveljanik Date: Mon, 1 Aug 2016 10:28:44 +0200 Subject: [PATCH 029/302] Rewrite shell example to not leave secrets in the history file --- doc/release-notes.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 78f29158dc7..aa9b48d72fe 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -61,7 +61,11 @@ The RPC command line client gained a new argument, `-stdin` to read extra arguments from standard input, one per line until EOF/Ctrl-D. For example: - $ echo -e "mysecretcode\n120" | src/bitcoin-cli -stdin walletpassphrase + $ src/bitcoin-cli -stdin walletpassphrase + mysecretcode + 120 + ..... press Ctrl-D here to end input + $ It is recommended to use this for sensitive information such as wallet passphrases, as command-line arguments can usually be read from the process From b8b97c98e86f81cd11a3c582dcea1c201139f187 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 1 Aug 2016 09:30:32 +0800 Subject: [PATCH 030/302] [doc] Increase recommended memory in gitian build guide Github-Pull: #8439 Rebased-From: 7fdbce9de43c600776e00a2f2042d302cfa4e411 --- doc/gitian-building.md | 2 +- doc/gitian-building/create_vm_memsize.png | Bin 89475 -> 22158 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/gitian-building.md b/doc/gitian-building.md index 7796a5fc9c1..938f92ff128 100644 --- a/doc/gitian-building.md +++ b/doc/gitian-building.md @@ -55,7 +55,7 @@ In the VirtualBox GUI click "New" and choose the following parameters in the wiz ![](gitian-building/create_vm_memsize.png) -- Memory Size: at least 1024MB, anything less will really slow down the build. +- Memory Size: at least 3000MB, anything less and the build might not complete. ![](gitian-building/create_vm_hard_disk.png) diff --git a/doc/gitian-building/create_vm_memsize.png b/doc/gitian-building/create_vm_memsize.png index 5abfee5337058f9bd638a79416040bd6c6496194..6f42cda73f3cabb02e39ae0309ac67f419a168c7 100644 GIT binary patch literal 22158 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%0A-nL7Zl65qAwp5y$_efz^}#|Q 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 FV1lysU>^Vg literal 89475 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

(1ib00c7Uh`P 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%0D`!``7%Iy`oE2(Ay6%F`o0ngQ6nw&sA0b06X z#*NT^_<661=B>ryy_TG&ojwav{C937;%VT-*;bVL@H)6uv=;cdL1@U`ib>mgq>tlq zRLm`S;U#M7-f@lK%ih$?6zvQSQh>5Z#%eDB+ji1R?K_sQuY0#ILSdM%c~ERN@zc23DNg%Hi@;j(4xdQcdT8 z8ATxNc}f9tmr*fnvw<7Gyvp;*p^R%JR`GBepg|`pLN-b#<{-bjOfZ$PMAj`^C}cW7 z0hB9`39BuN+2rgUEqZhk!9!eFW}s)UM9`pKz+)AFng94a-uS47N4q;a-%d9MPuD)s zF;YK2AJpGclUmyEA1rN|+6`Yh9t=f&vcqUqHyQQ1vFZ21B3ozY;73!;HbH8lLU!U| znY=D;O$`Hb^EQTv%-Si?CZgOiwGFxQD<=RF!?2tY<#C3eY|$2-6q|(=vsy&b?QRnl zvl(#Lj9jw_hLh$KGLl057$*Wm6K-Tqmn*o5fbQPhp3*MTkg` z8l_awv!@b##NkRh3u!i4Ags@kGy`=C-4&+Yn5f1!xT>w~*%;DwM$4C1*g}B*+~AQ7 z1r7G$Vrf&Z2z1C!K--6zo8z#@48M6$yPD?t=cl(2HbMa6lA9-bg4P1K$9pY0h_WV z*CdApo>O0IG^~1xMT$=+REliexO4p-^k)d0aZwM^6}a-XbxFd~ft94F=6EU;&BC6{ zVK}l9JwQuYzs_N8vm}H&p%kW*^IB>4mqh4uPhS7D8;_hPgk&v6Sk~c#H12Jh!%5eD zJFkFBMGe^p`~@z{Pyh?Pu*cPySDVa)o^e4LTLkBe2NcZ-;aEiz;Xuv>A8ZETgoZx7 z61rNZ*@C|h4iMb6fFfi8X4w+xH{Vn_>eZ~fm(PNp8ayY17rf4V>y*V((1WJ&j|ci+ zjK2y93(Xv6;ST;J&8C4pd*U2C%v~jL-Ef%!lqtE09UC0ZYf*5VR^DExnXc1L-D>_s zQ6E+SqvbY2JEP%?Br>tAgF-qP&4tOL*!d5e1rs9_MjQWU zyx^jd(V~uxO{dMxM<29^n}clZcnGN_(w5DM6+RaYyr^^b3Mbl3Mq%+q!Le*WJ9iXM zR60^-IM67E>d2^!wD1lp*(N9&mpjS5S4%4LKhdo@@FVF5FZ7F3lAa%exTA1WD*b1ry{fjU=!M(3QjJFo5l0Cn6@>{ zu>rWZ>f0BW{IrQZ*G4SLRth7jmPrMs{{PR$3b1O%jd>M zcFP{)H;0qt9c^l4Z_MVD3H6XZKyWe+HdaK%#Dq5_n8%)~L_^WZ3)8gH#BHbE5dhr_ zQDQ#TdxW7bnMPr!C32A&CybM25+H$x%_+Co&XUc}VvHPA)J;>RKONmDv4~26hY0ya zW~k5jjAoO?myc}G3b(v!$t(*JZqZoJFvMK#RmV&YdnAp&c$mO`H ztfpQD=a1u)s>RdPJm^J!1ieAy8O})vvy6z5_XRUVOz^bk?oSnrB8R;}QLofUhl|=I zq!47JRB(XdynP9&4J#GrE(tu(ZL;4qK8F?WQNY^W3o|)6oN3`xo-w9rv`_d@-S_hI zoX^8d+Lm8hS|l&n(p0w>2vAb!cnA>??1iSbN%RQ$5hWtZhB)25z3c>2cz)TPv^ex- zKw|tPNE;L0@VvozIywG570c^Hw~D2*_E4mu{*9$;Qj@U0-(3spJmL%V|3ApncUg3N zNhCSQACBeKHnn9>Un(iSj!WRRRZ?L5G1WwG&OIonbrGTVVcndgCp)wG$4ilFl+wEg z5_-dT)aB(iDn&TR1F034CcUDJf7>el1uqKn^ddY6baQNhf=I;i8WFXSdMd_*)9XpS zwzKmsQYw5QIhCspBO+#+^1s`~7NCiN8~Jmb+=;awk)krbbZtBxc|6+_{~w3<-~2_C z-~Qm>8|FEx$geaa6G&)ren1>5||m>&pKN`KYk&$l$bjvv=6VYbbw~ Nih`zmjjYA{{{SC4x1s<5 From cd0910b7874f9e6fbb6b15115d054a25e3abbe68 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 1 Aug 2016 12:40:38 -0400 Subject: [PATCH 031/302] Fix p2p-feefilter.py for changed tx relay behavior Github-Pull: #8444 Rebased-From: 2c517b3928a68c6e36b18262081a401a741cd4cd --- qa/rpc-tests/p2p-feefilter.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/p2p-feefilter.py b/qa/rpc-tests/p2p-feefilter.py index cd0501a3140..96d99d38a73 100755 --- a/qa/rpc-tests/p2p-feefilter.py +++ b/qa/rpc-tests/p2p-feefilter.py @@ -62,6 +62,7 @@ def setup_network(self): def run_test(self): node1 = self.nodes[1] + node0 = self.nodes[0] # Get out of IBD node1.generate(1) sync_blocks(self.nodes) @@ -91,8 +92,17 @@ def run_test(self): node1.settxfee(Decimal("0.00010000")) [node1.sendtoaddress(node1.getnewaddress(), 1) for x in range(3)] sync_mempools(self.nodes) # must be sure node 0 has received all txs - time.sleep(10) # wait 10 secs to be sure its doesn't relay any - assert(allInvsMatch([], test_node)) + + # Send one transaction from node0 that should be received, so that we + # we can sync the test on receipt (if node1's txs were relayed, they'd + # be received by the time this node0 tx is received). This is + # unfortunately reliant on the current relay behavior where we batch up + # to 35 entries in an inv, which means that when this next transaction + # is eligible for relay, the prior transactions from node1 are eligible + # as well. + node0.settxfee(Decimal("0.00020000")) + txids = [node0.sendtoaddress(node0.getnewaddress(), 1)] + assert(allInvsMatch(txids, test_node)) test_node.clear_invs() # Remove fee filter and check that txs are received again From d485a6c5a8d238cac5ad732ce9e744f4b121143c Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 4 Aug 2016 14:37:49 +0200 Subject: [PATCH 032/302] doc: Add list of new and removed RPC commands to release notes Finish up the RPC part of #7678. --- doc/release-notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index aa9b48d72fe..de2e73d2472 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -289,6 +289,14 @@ Low-level RPC changes - The sorting of the output of the `getrawmempool` output has changed. +- New RPC commands: `generatetoaddress`, `importprunedfunds`, `removeprunedfunds`, `signmessagewithprivkey`, + `getmempoolancestors`, `getmempooldescendants`, `getmempoolentry`, + `createwitnessaddress`, `addwitnessaddress`. + +- Removed RPC commands: `setgenerate`, `getgenerate`. + +- New options were added to `fundrawtransaction`: `includeWatching`, `changeAddress`, `changePosition` and `feeRate`. + Low-level ZMQ changes ---------------------- From b49d963cf7c5feeb90666749171b752731f70061 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 5 Aug 2016 21:01:33 +0200 Subject: [PATCH 033/302] Document reindexing changes --- doc/release-notes.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index de2e73d2472..2c9ff299cb7 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -214,6 +214,24 @@ no longer optimized for this metric. Feedback is requested on whether to deprecate or keep this command line option in future releases. +Reindexing changes +------------------ + +In earlier versions, reindexing did validation while reading through the block +files on disk. These two have now been split up, so that all blocks are known +before validation starts. This was necessary to make certain optimizations that +are available during normal synchronizations also available during reindexing. + +The two phases are distinct in the Bitcoin-Qt GUI. During the first one, +"Reindexing blocks on disk" is shown. During the second (slower) one, +"Processing blocks on disk" is shown. + +It is possible to only redo validation now, without rebuilding the block index, +using the command line option `-reindex-chainstate` (in addition to +`-reindex` which does both). This new option is useful when the blocks on disk +are assumed to be fine, but the chainstate is still corrupted. It is also +useful for benchmarks. + Removal of internal miner -------------------------- From 8b0eee66e9c9057b6e53bb1f4a0a3821083e5df0 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 8 Aug 2016 21:16:40 +0000 Subject: [PATCH 034/302] Bugfix: Use pre-BIP141 sigops until segwit activates qa/rpc-tests/segwit: Test GBT sigops before and after activation Github-Pull: #8489 Rebased-From: 160f895a80660e4e3904a2624e4110960d051902 239cbd2e5c2a36843b45b356e9aea6e8d35f0968 --- qa/rpc-tests/segwit.py | 52 +++++++++++++++++++++++++++++++++++++++++++------- src/rpc/mining.cpp | 17 +++++++++++++++-- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py index d4c9a8afed3..097e119f323 100755 --- a/qa/rpc-tests/segwit.py +++ b/qa/rpc-tests/segwit.py @@ -69,6 +69,11 @@ def getutxo(txid): utxo["txid"] = txid return utxo +def find_unspent(node, min_value): + for utxo in node.listunspent(): + if utxo['amount'] >= min_value: + return utxo + class SegWitTest(BitcoinTestFramework): def setup_chain(self): @@ -117,8 +122,21 @@ def fail_mine(self, node, txid, sign, redeem_script=""): sync_blocks(self.nodes) def run_test(self): - self.nodes[0].generate(160) #block 160 - + self.nodes[0].generate(161) #block 161 + + print("Verify sigops are counted in GBT with pre-BIP141 rules before the fork") + txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1) + tmpl = self.nodes[0].getblocktemplate({}) + assert(tmpl['sigoplimit'] == 20000) + assert(tmpl['transactions'][0]['hash'] == txid) + assert(tmpl['transactions'][0]['sigops'] == 2) + tmpl = self.nodes[0].getblocktemplate({'rules':['segwit']}) + assert(tmpl['sigoplimit'] == 20000) + assert(tmpl['transactions'][0]['hash'] == txid) + assert(tmpl['transactions'][0]['sigops'] == 2) + self.nodes[0].generate(1) #block 162 + + balance_presetup = self.nodes[0].getbalance() self.pubkey = [] p2sh_ids = [] # p2sh_ids[NODE][VER] is an array of txids that spend to a witness version VER pkscript to an address for NODE embedded in p2sh wit_ids = [] # wit_ids[NODE][VER] is an array of txids that spend to a witness version VER pkscript to an address for NODE via bare witness @@ -137,18 +155,18 @@ def run_test(self): for i in range(5): for n in range(3): for v in range(2): - wit_ids[n][v].append(send_to_witness(v, self.nodes[0], self.nodes[0].listunspent()[0], self.pubkey[n], False, Decimal("49.999"))) - p2sh_ids[n][v].append(send_to_witness(v, self.nodes[0], self.nodes[0].listunspent()[0], self.pubkey[n], True, Decimal("49.999"))) + wit_ids[n][v].append(send_to_witness(v, self.nodes[0], find_unspent(self.nodes[0], 50), self.pubkey[n], False, Decimal("49.999"))) + p2sh_ids[n][v].append(send_to_witness(v, self.nodes[0], find_unspent(self.nodes[0], 50), self.pubkey[n], True, Decimal("49.999"))) - self.nodes[0].generate(1) #block 161 + self.nodes[0].generate(1) #block 163 sync_blocks(self.nodes) # Make sure all nodes recognize the transactions as theirs - assert_equal(self.nodes[0].getbalance(), 60*50 - 60*50 + 20*Decimal("49.999") + 50) + assert_equal(self.nodes[0].getbalance(), balance_presetup - 60*50 + 20*Decimal("49.999") + 50) assert_equal(self.nodes[1].getbalance(), 20*Decimal("49.999")) assert_equal(self.nodes[2].getbalance(), 20*Decimal("49.999")) - self.nodes[0].generate(262) #block 423 + self.nodes[0].generate(260) #block 423 sync_blocks(self.nodes) print("Verify default node can't accept any witness format txs before fork") @@ -205,5 +223,25 @@ def run_test(self): self.success_mine(self.nodes[0], p2sh_ids[NODE_0][WIT_V0][0], True) #block 434 self.success_mine(self.nodes[0], p2sh_ids[NODE_0][WIT_V1][0], True) #block 435 + print("Verify sigops are counted in GBT with BIP141 rules after the fork") + txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1) + tmpl = self.nodes[0].getblocktemplate({'rules':['segwit']}) + assert(tmpl['sigoplimit'] == 80000) + assert(tmpl['transactions'][0]['txid'] == txid) + assert(tmpl['transactions'][0]['sigops'] == 8) + + print("Verify non-segwit miners get a valid GBT response after the fork") + send_to_witness(1, self.nodes[0], find_unspent(self.nodes[0], 50), self.pubkey[0], False, Decimal("49.998")) + try: + tmpl = self.nodes[0].getblocktemplate({}) + assert(len(tmpl['transactions']) == 1) # Doesn't include witness tx + assert(tmpl['sigoplimit'] == 20000) + assert(tmpl['transactions'][0]['hash'] == txid) + assert(tmpl['transactions'][0]['sigops'] == 2) + assert(('!segwit' in tmpl['rules']) or ('segwit' not in tmpl['rules'])) + except JSONRPCException: + # This is an acceptable outcome + pass + if __name__ == '__main__': SegWitTest().main() diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 92ca4bab6bc..2479e5d5953 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -546,6 +546,9 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) UpdateTime(pblock, consensusParams, pindexPrev); pblock->nNonce = 0; + // NOTE: If at some point we support pre-segwit miners post-segwit-activation, this needs to take segwit support into consideration + const bool fPreSegWit = (THRESHOLD_ACTIVE != VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_SEGWIT, versionbitscache)); + UniValue aCaps(UniValue::VARR); aCaps.push_back("proposal"); UniValue transactions(UniValue::VARR); @@ -574,7 +577,12 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) int index_in_template = i - 1; entry.push_back(Pair("fee", pblocktemplate->vTxFees[index_in_template])); - entry.push_back(Pair("sigops", pblocktemplate->vTxSigOpsCost[index_in_template])); + int64_t nTxSigOps = pblocktemplate->vTxSigOpsCost[index_in_template]; + if (fPreSegWit) { + assert(nTxSigOps % WITNESS_SCALE_FACTOR == 0); + nTxSigOps /= WITNESS_SCALE_FACTOR; + } + entry.push_back(Pair("sigops", nTxSigOps)); entry.push_back(Pair("weight", GetTransactionWeight(tx))); transactions.push_back(entry); @@ -657,7 +665,12 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1)); result.push_back(Pair("mutable", aMutable)); result.push_back(Pair("noncerange", "00000000ffffffff")); - result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS_COST)); + int64_t nSigOpLimit = MAX_BLOCK_SIGOPS_COST; + if (fPreSegWit) { + assert(nSigOpLimit % WITNESS_SCALE_FACTOR == 0); + nSigOpLimit /= WITNESS_SCALE_FACTOR; + } + result.push_back(Pair("sigoplimit", nSigOpLimit)); result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE)); result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT)); result.push_back(Pair("curtime", pblock->GetBlockTime())); From 9058617afb24594f09848d2a53403760bd64470a Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 11 Aug 2016 21:10:28 +0000 Subject: [PATCH 035/302] qt: translations update pre-rc3 --- src/qt/bitcoinstrings.cpp | 3 ++- src/qt/locale/bitcoin_da.ts | 4 +++ src/qt/locale/bitcoin_de.ts | 2 +- src/qt/locale/bitcoin_en.ts | 46 +++++++++++++++++----------------- src/qt/locale/bitcoin_es.ts | 4 +++ src/qt/locale/bitcoin_es_CO.ts | 4 +++ src/qt/locale/bitcoin_it.ts | 42 ++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_ja.ts | 4 +++ src/qt/locale/bitcoin_pt_BR.ts | 10 +++++++- src/qt/locale/bitcoin_ro.ts | 14 ++++++++++- src/qt/locale/bitcoin_ru.ts | 54 +++++++++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_tr.ts | 4 +++ src/qt/locale/bitcoin_vi_VN.ts | 56 ++++++++++++++++++++++++++++++++++++++++++ src/qt/locale/bitcoin_zh_TW.ts | 4 +++ 14 files changed, 222 insertions(+), 29 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 22d3e082414..fefaaf8cd3a 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -60,6 +60,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" QT_TRANSLATE_NOOP("bitcoin-core", "" "Do not keep transactions in the mempool longer than hours (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "" +"Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), +QT_TRANSLATE_NOOP("bitcoin-core", "" "Error loading %s: You can't enable HD on a already existing non-HD wallet"), QT_TRANSLATE_NOOP("bitcoin-core", "" "Error reading %s! All keys read correctly, but transaction data or address " @@ -284,7 +286,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most connections to peers (de QT_TRANSLATE_NOOP("bitcoin-core", "Make the wallet broadcast transactions"), QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, *1000 bytes (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, *1000 bytes (default: %u)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Minimum bytes per sigop in transactions we relay and mine (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"), QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."), diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index db52367ef55..5fc6733b507 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -2099,6 +2099,10 @@ Sæt cache-størrelse for database i megabytes (%d til %d; standard: %d) + Set maximum BIP141 block weight (default: %d) + Sæt maksimal BIP141-blokvægt (standard: %d) + + Set maximum block size in bytes (default: %d) Sæt maksimum blokstørrelse i byte (standard: %d) diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 502d02b7f72..dc632a2466b 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -1892,7 +1892,7 @@ Change index out of range - Änderungsindex außerhalb des Bereichs + Position des Wechselgelds außerhalb des Bereichs Connect only to the specified node(s) diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 2785ed9290a..14126f2d61f 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -2226,7 +2226,7 @@ bitcoin-core - + Options: Options: @@ -2236,17 +2236,17 @@ Specify data directory - + Connect to a node to retrieve peer addresses, and disconnect Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address Specify your own public address - + Accept command line and JSON-RPC commands Accept command line and JSON-RPC commands @@ -2286,7 +2286,7 @@ - + Pruning blockstore... @@ -2301,12 +2301,12 @@ - + Accept connections from outside (default: 1 if no -proxy or -connect) Accept connections from outside (default: 1 if no -proxy or -connect) - + Bitcoin Core Bitcoin Core @@ -2352,6 +2352,11 @@ + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + + + + Error loading %s: You can't enable HD on a already existing non-HD wallet @@ -2631,12 +2636,7 @@ - - Minimum bytes per sigop in transactions we relay and mine (default: %u) - - - - + Not enough file descriptors available. Not enough file descriptors available. @@ -2766,7 +2766,7 @@ - + Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times @@ -2791,7 +2791,7 @@ - + Error: Listening for incoming connections failed (listen returned error %s) @@ -2911,7 +2911,7 @@ - + Need to specify a port with -whitebind: '%s' @@ -3046,7 +3046,7 @@ Password for JSON-RPC connections - + Execute command when the best block changes (%s in cmd is replaced by block hash) Execute command when the best block changes (%s in cmd is replaced by block hash) @@ -3061,7 +3061,7 @@ Loading addresses... - + (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) @@ -3081,7 +3081,7 @@ - + Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s) @@ -3206,7 +3206,7 @@ - + Prepend debug output with timestamp (default: %u) @@ -3261,7 +3261,7 @@ Unknown network specified in -onlynet: '%s' - + Insufficient funds Insufficient funds @@ -3291,12 +3291,12 @@ Cannot write default address - + Rescanning... Rescanning... - + Done loading Done loading diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index 1a367c27626..5e118730102 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -2098,6 +2098,10 @@ Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d) + Set maximum BIP141 block weight (default: %d) + Establecer peso máximo bloque BIP141 (predeterminado: %d) + + Set maximum block size in bytes (default: %d) Establecer tamaño máximo de bloque en bytes (predeterminado: %d) diff --git a/src/qt/locale/bitcoin_es_CO.ts b/src/qt/locale/bitcoin_es_CO.ts index df189190f60..7d10e0320d8 100644 --- a/src/qt/locale/bitcoin_es_CO.ts +++ b/src/qt/locale/bitcoin_es_CO.ts @@ -198,6 +198,10 @@ Intro + Welcome + bienvenido + + Error Error diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 752c4f4fee5..0ed0fc442da 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -115,6 +115,10 @@ &Informazioni su %1 + Show information about %1 + Mostra informazioni su %1 + + About &Qt Informazioni su &Qt @@ -127,6 +131,10 @@ &Opzioni... + Modify configuration options for %1 + Modifica le opzioni di configurazione per %1 + + &Encrypt Wallet... &Cifra il portamonete... @@ -255,6 +263,14 @@ %n connessione attiva alla rete Bitcoin%n connessioni alla rete Bitcoin attive + Indexing blocks on disk... + Indicizzando i blocchi su disco... + + + Processing blocks on disk... + Processando i blocchi su disco... + + No block source available... Nessuna fonte di blocchi disponibile... @@ -311,6 +327,14 @@ Aggiornato + Show the %1 help message to get a list with possible Bitcoin command-line options + Mostra il messaggio di aiuto di %1 per ottenere una lista di opzioni di comando per Bitcoin + + + %1 client + %1 client + + Catching up... In aggiornamento... @@ -532,7 +556,11 @@ Show splash screen on startup (default: %u) Mostra schermata iniziale all'avvio (default: %u) - + + Reset all settings changed in the GUI + Reimposta tutti i campi dell'interfaccia grafica + + Intro @@ -540,6 +568,14 @@ Benvenuto + Welcome to %1. + Benvenuto su %1. + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Dato che questa è la prima volta che il programma viene lanciato, puoi scegliere dove %1 salverà i suoi dati. + + Use the default data directory Usa la cartella dati predefinita @@ -594,6 +630,10 @@ &Principale + Automatically start %1 after logging in to the system. + Avvia automaticamente %1 una volta effettuato l'accesso al sistema. + + Size of &database cache Dimensione della cache del &database. diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts index 4d866ce94ab..52f18c118a2 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/bitcoin_ja.ts @@ -2100,6 +2100,10 @@ データベースのキャッシュサイズをメガバイトで設定 (%dから%d。初期値: %d) + Set maximum BIP141 block weight (default: %d) + BIP141ブロック重みの最大値を設定 (初期値: %d) + + Set maximum block size in bytes (default: %d) 最大ブロックサイズをバイトで設定 (初期値: %d) diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index 5e7f47cdac7..bc7ee034d56 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -1567,7 +1567,7 @@ The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. - A taxa será deduzida da quantia sendo enviada. O destinatário receberá menos bitcoins do que você colocou no campo de quantidade. Se varios destinatários estão selecionados, a taxa é dividida igualmente. + A taxa será deduzida da quantia que está sendo enviada. O destinatário receberá menos bitcoins do que você colocou no campo de quantidade. Se vários destinatários estão selecionados, a taxa é dividida igualmente. S&ubtract fee from amount @@ -1867,6 +1867,10 @@ Este pode ser um build de teste pré-lançamento - use por sua conta e risco - não use para mineração ou aplicações de comércio. + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + Não foi possível reanalisar o banco de dados para o estado pre-fork. Você precisa rebaixar o blockchain + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) Use UPnP para mapear a porta escutada (padrão: 1 quando escutando e sem -proxy) @@ -2051,6 +2055,10 @@ O modo Prune é incompatível com -txindex. + Rewinding blocks... + Reanalizando blocos... + + Set database cache size in megabytes (%d to %d, default: %d) Define o tamanho do cache do banco de dados em megabytes (%d para %d, padrão: %d) diff --git a/src/qt/locale/bitcoin_ro.ts b/src/qt/locale/bitcoin_ro.ts index 270a4ba0629..cf85cf44c2a 100644 --- a/src/qt/locale/bitcoin_ro.ts +++ b/src/qt/locale/bitcoin_ro.ts @@ -63,9 +63,21 @@ BanTableModel - + + Banned Until + Blocat până + + BitcoinGUI + + Synchronizing with network... + Se sincronizează cu rețeaua + + + &Options... + &Opțiuni... + CoinControlDialog diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index db9d37c8c14..271b1112252 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -655,7 +655,7 @@ Accept connections from outside - Разрешать соединения извне + Принимать входящие соединения Allow incoming connections @@ -1803,6 +1803,10 @@ Установлено очень большое значение -fallbackfee! Это комиссия за транзацию, которую вы можете заплатить, если оценка размера комиссии не доступна. + Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d) + Принимать транзакции пересылаемые от узлов из белого списка даже если они не удовлетворяют требованиям ретрансляции (по умолчанию: %d) + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 Привязаться к указанному адресу и всегда прослушивать только его. Используйте [хост]:порт для IPv6 @@ -1819,6 +1823,10 @@ Распространяется под лицензией MIT, см. приложенный файл COPYING или <http://www.opensource.org/licenses/mit-license.php>. + Error loading %s: You can't enable HD on a already existing non-HD wallet + Ошибка загрузки %s: Вы не можете включить HD в уже существующем не-HD кошельке + + Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Ошибка чтения %s! Все ключи прочитаны верно, но данные транзакций или записи адресной книги могут отсутствовать или быть неправильными. @@ -1847,6 +1855,10 @@ Это пре-релизная тестовая сборка - используйте на свой страх и риск - не используйте для добычи или торговых приложений + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + Невозможно отмотать базу данных до пред-форкового состояния. Вам будет необходимо перекачать цепочку блоков. + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) Использовать UPnP для проброса порта (по умолчанию: 1, если используется прослушивание и нет -proxy) @@ -1863,6 +1875,10 @@ Вносить в белый список участников, подключающихся с указанной маски сети или IP. Можно использовать многократно. + You need to rebuild the database using -reindex-chainstate to change -txindex + Вам необходимо пересобрать базы данных с помощью -reindex-chainstate, чтобы изменить -txindex + + %s corrupt, salvage failed %s поврежден, восстановить не удалось @@ -1887,6 +1903,14 @@ Параметры создания блоков: + Cannot resolve -%s address: '%s' + Не удаётся разрешить адрес в параметре -%s: '%s' + + + Change index out of range + Изменение индекса вне диапазона + + Connect only to the specified node(s) Подключаться только к указанному узлу(ам) @@ -1951,6 +1975,10 @@ Ошибка загрузки %s: Для бумажника требуется более новая версия %s + Error loading %s: You can't disable HD on a already existing HD wallet + Ошибка загрузки %s: Вы не можете включить HD в уже существующем не-HD кошельке + + Error loading block database Ошибка чтения базы данных блоков @@ -1975,6 +2003,10 @@ Неверный или отсутствующий начальный блок. Неправильный каталог данных для сети? + Initialization sanity check failed. %s is shutting down. + Начальная проверка исправности не удалась. %s завершает работу. + + Invalid -onion address: '%s' Неверный -onion адрес: '%s' @@ -1995,6 +2027,10 @@ Расположение куки входы(по умолчанию: data dir) + Minimum bytes per sigop in transactions we relay and mine (default: %u) + Минимально байт на sigop в транзакциях, которые мы ретранслируем и добываем (по умолчанию: %u) + + Not enough file descriptors available. Недостаточно файловых дескрипторов. @@ -2023,10 +2059,18 @@ Перестроить индекс цепи из текущих индексированных блоков + Rewinding blocks... + Перемотка блоков... + + Set database cache size in megabytes (%d to %d, default: %d) Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d) + Set maximum BIP141 block weight (default: %d) + Задать максимальное BIP141 значение блока (по умолчанию: %d) + + Set maximum block size in bytes (default: %d) Задать максимальный размер блока в байтах (по умолчанию: %d) @@ -2151,6 +2195,10 @@ Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit <https://www.openssl.org/> и криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard. + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + Использовать иерархическую детерминированную генерацию ключей (HD) после BIP32. Применяется в процессе создания бумажника / первого запуска + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway Участники из белого списка не могуть быть забанены за DoS, и их транзакции всегда транслируются, даже если они уже содержатся в памяти. Полезно, например, для шлюза. @@ -2371,6 +2419,10 @@ Обнаружен не поддерживаемый аргумент -socks. Выбор версии SOCKS более невозможен, поддерживаются только прокси SOCKS5. + Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. + Не поддерживаемый аргумент -whitelistalwaysrelay игнорируется, используйте -whitelistrelay и/или -whitelistforcerelay. + + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) Использовать отдельный прокси SOCKS5 для соединения с участниками через скрытые сервисы Tor (по умолчанию: %s) diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index ccf570b5396..21a91a86fcc 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -2099,6 +2099,10 @@ Veritabanı önbellek boyutunu megabayt olarak belirt (%d ilâ %d, varsayılan: %d) + Set maximum BIP141 block weight (default: %d) + Azami BIP141 blok ağırlığını ayarla (varsayılan: %d) + + Set maximum block size in bytes (default: %d) Azami blok boyutunu bayt olarak ayarla (varsayılan: %d) diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts index 8b92a3a2e94..e5f955eb422 100644 --- a/src/qt/locale/bitcoin_vi_VN.ts +++ b/src/qt/locale/bitcoin_vi_VN.ts @@ -75,6 +75,10 @@ BitcoinGUI + Sign &message... + Chứ ký & Tin nhắn... + + Synchronizing with network... Đồng bộ hóa với mạng @@ -87,6 +91,10 @@ Node + Show general overview of wallet + Hiện thỉ thông tin sơ lược chung về Ví + + &Transactions &Giao dịch @@ -151,6 +159,10 @@ Mở &URI... + Reindexing blocks on disk... + Đánh chỉ số (indexing) lại các khối (blocks) trên ổ đĩa ... + + Send coins to a Bitcoin address Gửi coins đến tài khoản Bitcoin @@ -159,6 +171,14 @@ Sao lưu ví tiền ở vị trí khác + Change the passphrase used for wallet encryption + Thay đổi cụm mật mã dùng cho mã hoá Ví + + + &Debug window + &Cửa sổ xử lý lỗi (debug) + + &Verify message... &Tin nhắn xác thực @@ -187,6 +207,18 @@ Hiện hoặc ẩn cửa sổ chính + Encrypt the private keys that belong to your wallet + Mã hoá các khoá bí mật trong Ví của bạn. + + + Sign messages with your Bitcoin addresses to prove you own them + Dùng địa chỉ Bitcoin của bạn ký các tin nhắn để xác minh những nội dung tin nhắn đó là của bạn. + + + Verify messages to ensure they were signed with specified Bitcoin addresses + Kiểm tra các tin nhắn để chắc chắn rằng chúng được ký bằng các địa chỉ Bitcoin xác định. + + &File &File @@ -199,10 +231,22 @@ Trợ &giúp + Tabs toolbar + Thanh công cụ (toolbar) + + Request payments (generates QR codes and bitcoin: URIs) Yêu cầu thanh toán(tạo mã QR và địa chỉ Bitcoin: URLs) + Show the list of used sending addresses and labels + Hiện thỉ danh sách các địa chỉ và nhãn đã dùng để gửi. + + + Show the list of used receiving addresses and labels + Hiện thỉ danh sách các địa chỉ và nhãn đã dùng để nhận. + + Open a bitcoin: URI or payment request Mở bitcoin:URL hoặc yêu cầu thanh toán @@ -235,6 +279,14 @@ %1 chậm trễ + Last received block was generated %1 ago. + Khối (block) cuối cùng nhận được cách đây %1 + + + Transactions after this will not yet be visible. + Những giao dịch sau đó sẽ không hiện thị. + + Error Lỗi @@ -251,6 +303,10 @@ Đã cập nhật + Catching up... + Bắt kịp... + + Date: %1 Ngày: %1 diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index 1fd8d6df893..21ca417ac6c 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -2100,6 +2100,10 @@ 設定資料庫快取大小是多少百萬位元組(MB,範圍: %d 到 %d,預設值: %d) + Set maximum BIP141 block weight (default: %d) + 設定 BIP141 區塊重量的最大值(預設值: %d) + + Set maximum block size in bytes (default: %d) 設定區塊大小上限成多少位元組(預設值: %d) From b52c67c4b188c274de60fbd5e26441e9a644dba6 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 11 Aug 2016 23:27:24 +0200 Subject: [PATCH 036/302] doc: Update changelog for rc3 --- doc/release-notes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 2c9ff299cb7..ea6e5692723 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -392,6 +392,7 @@ git merge commit are mentioned. - #8305 `3730393` Improve handling of unconnecting headers (sdaftuar) - #8363 `fca1a41` Rename "block cost" to "block weight" (sdaftuar) - #8381 `f84ee3d` Make witness v0 outputs non-standard (jl2012) +- #8364 `3f65ba2` Treat high-sigop transactions as larger rather than rejecting them (sipa) ### P2P protocol and network code @@ -644,6 +645,7 @@ git merge commit are mentioned. - #7951 `5c7df70` Test_framework: Properly print exception (MarcoFalke) - #8070 `7771aa5` Remove non-determinism which is breaking net_tests #8069 (EthanHeilman) - #8309 `bb2646a` Add wallet-hd test (MarcoFalke) +- #8444 `cd0910b` Fix p2p-feefilter.py for changed tx relay behavior (sdaftuar) ### Mining @@ -656,6 +658,7 @@ git merge commit are mentioned. - #8295 `f5660d3` Mining-related fixups for 0.13.0 (sdaftuar) - #7796 `536b75e` Add support for negative fee rates, fixes `prioritizetransaction` (MarcoFalke) - #8362 `86edc20` Scale legacy sigop count in CreateNewBlock (sdaftuar) +- #8489 `8b0eee6` Bugfix: Use pre-BIP141 sigops until segwit activates (GBT) (luke-jr) ### Documentation and miscellaneous From 7f84015352808776175f686f256d037eb40b08ba Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 16 Aug 2016 11:15:13 +0200 Subject: [PATCH 037/302] Inline mempool RPCs and feefilter into misc sections --- doc/release-notes.md | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index ea6e5692723..3d6abcde072 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -54,6 +54,7 @@ For nodes on low-memory systems, the database cache can be changed back to Note that the database cache setting has the most performance impact during initial sync of a node, and when catching up after downtime. + bitcoin-cli: arguments privacy -------------------------------- @@ -71,6 +72,7 @@ It is recommended to use this for sensitive information such as wallet passphrases, as command-line arguments can usually be read from the process table by any user on the system. + C++11 and Python 3 ------------------- @@ -84,6 +86,7 @@ When cross-compiling for a target that doesn't have C++11 libraries, configure w For running the functional tests in `qa/rpc-tests`, Python3.4 or higher is now required. + Linux ARM builds ------------------ @@ -104,20 +107,6 @@ possible to resolve them. Note that Android is not considered ARM Linux in this context. The executables are not expected to work out of the box on Android. -New mempool information RPC calls ---------------------------------- - -RPC calls have been added to output detailed statistics for individual mempool -entries, as well as to calculate the in-mempool ancestors or descendants of a -transaction: see `getmempoolentry`, `getmempoolancestors`, `getmempooldescendants`. - -Fee filtering of invs (BIP 133) ------------------------------------- - -The optional new p2p message "feefilter" is implemented and the protocol -version is bumped to 70013. Upon receiving a feefilter message from a peer, -a node will not send invs for any transactions which do not meet the filter -feerate. [BIP 133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki) Compact Block support (BIP 152) ------------------------------- @@ -130,6 +119,7 @@ cases it also reduces propagation delay. It is automatically enabled between compatible peers. [BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) + Hierarchical Deterministic Key Generation ----------------------------------------- Newly created wallets will use hierarchical deterministic key generation @@ -152,6 +142,7 @@ HD wallets are incompatible with older versions of Bitcoin Core. [Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) + Segregated Witness ------------------ @@ -174,6 +165,7 @@ BIP 141 activation, mine segwit blocks, fully validate segwit blocks, relay segwit blocks to other segwit nodes, and use segwit transactions in the wallet, etc). + Mining transaction selection ("Child Pays For Parent") ------------------------------------------------------ @@ -232,6 +224,7 @@ using the command line option `-reindex-chainstate` (in addition to are assumed to be fine, but the chainstate is still corrupted. It is also useful for benchmarks. + Removal of internal miner -------------------------- @@ -246,9 +239,15 @@ For testing, the `generate` call can still be used to mine a block, and a new RPC call `generatetoaddress` has been added to mine to a specific address. This works with wallet disabled. + Low-level P2P changes ---------------------- +- The optional new p2p message "feefilter" is implemented and the protocol + version is bumped to 70013. Upon receiving a feefilter message from a peer, + a node will not send invs for any transactions which do not meet the filter + feerate. [BIP 133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki) + - The P2P alert system has been removed in PR #7692 and the `alert` P2P message is no longer supported. @@ -276,9 +275,14 @@ Low-level P2P changes - Connections to peers who have recently been the first one to give us a valid new block or transaction are protected from disconnections since PR #8084. + Low-level RPC changes ---------------------- +- RPC calls have been added to output detailed statistics for individual mempool + entries, as well as to calculate the in-mempool ancestors or descendants of a + transaction: see `getmempoolentry`, `getmempoolancestors`, `getmempooldescendants`. + - `gettxoutsetinfo` UTXO hash (`hash_serialized`) has changed. There was a divergence between 32-bit and 64-bit platforms, and the txids were missing in the hashed data. This has been fixed, but this means that the output will be different than from previous versions. @@ -315,6 +319,7 @@ Low-level RPC changes - New options were added to `fundrawtransaction`: `includeWatching`, `changeAddress`, `changePosition` and `feeRate`. + Low-level ZMQ changes ---------------------- @@ -324,6 +329,7 @@ Low-level ZMQ changes therefore backward compatible. Each message type has its own counter. PR [#7762](https://github.com/bitcoin/bitcoin/pull/7762). + 0.13.0 Change log ================= From fe20b83ca94c5ad2af10c45465bad9521b5c447c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 16 Aug 2016 11:15:56 +0200 Subject: [PATCH 038/302] Remove refactors from list of changes --- doc/release-notes.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 3d6abcde072..e3331adece3 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -547,10 +547,8 @@ git merge commit are mentioned. - #7649 `4900641` Prevent multiple calls to CWallet::AvailableCoins (promag) - #7646 `e5c3511` Fix lockunspent help message (promag) - #7558 `b35a591` Add import/removeprunedfunds rpc call (instagibbs) -- #7691 `30c2dd8` Refactor wallet/init interaction (jonasschnelli) - #6215 `48c5adf` add bip32 pub key serialization (jonasschnelli) - #7913 `bafd075` Fix for incorrect locking in GetPubKey() (keystore.cpp) (yurizhykin) -- #7816 `0c95ebc` Slighly refactor GetOldestKeyPoolTime() (jonasschnelli) - #8036 `41138f9` init: Move berkeleydb version reporting to wallet (laanwj) - #8028 `373b50d` Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk (pstratem) - #8061 `f6b7df3` Improve Wallet encapsulation (pstratem) @@ -595,11 +593,9 @@ git merge commit are mentioned. - #7764 `a65b36c` Don't run pruning.py twice (MarcoFalke) - #7773 `7c80e72` Fix comments in tests (btcdrak) - #7489 `e9723cb` tests: Make proxy_test work on travis servers without IPv6 (laanwj) -- #7778 `ff5874b` Bug fixes and refactor (MarcoFalke) - #7801 `70ac71b` Remove misleading "errorString syntax" (MarcoFalke) - #7803 `401c65c` maxblocksinflight: Actually enable test (MarcoFalke) - #7802 `3bc71e1` httpbasics: Actually test second connection (MarcoFalke) -- #7818 `3911a0a` Refactor script tests (sipa) - #7849 `ab8586e` tests: add varints_bitpatterns test (laanwj) - #7846 `491171f` Clean up lockorder data of destroyed mutexes (sipa) - #7853 `6ef5e00` py2: Unfiddle strings into bytes explicitly (MarcoFalke) @@ -615,7 +611,6 @@ git merge commit are mentioned. - #7814 `77b637f` Switch to py3 (MarcoFalke) - #8030 `409a8a1` Revert fatal-ness of missing python-zmq (laanwj) - #8018 `3e90fe6` Autofind rpc tests --srcdir (jonasschnelli) -- #7971 `4e14afe` Refactor test_framework and pull tester (MarcoFalke) - #8016 `5767e80` Fix multithread CScheduler and reenable test (paveljanik) - #7972 `423ca30` pull-tester: Run rpc test in parallel (MarcoFalke) - #8039 `69b3a6d` Bench: Add crypto hash benchmarks (laanwj) @@ -659,7 +654,6 @@ git merge commit are mentioned. - #7663 `c87f51e` Make the generate RPC call function for non-regtest (sipa) - #7671 `e2ebd25` Add generatetoaddress RPC to mine to an address (achow101) - #7935 `66ed450` Versionbits: GBT support (luke-jr) -- #7598 `e1486eb` Refactor CreateNewBlock to be a method of the BlockAssembler class (morcos) - #7600 `66db2d6` Select transactions using feerate-with-ancestors (sdaftuar) - #8295 `f5660d3` Mining-related fixups for 0.13.0 (sdaftuar) - #7796 `536b75e` Add support for negative fee rates, fixes `prioritizetransaction` (MarcoFalke) From 2f5858952e968ff0d93eeb704a480a095f7c9adf Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 16 Aug 2016 11:17:47 +0200 Subject: [PATCH 039/302] Mention dump/import support for HD wallets --- doc/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index e3331adece3..ba8ad71beb8 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -132,6 +132,10 @@ ones which haven't already been generated during the time of the backup. **Attention:** Encrypting the wallet will create a new seed which requires a new backup! +Wallet dumps (created using the `dumpwallet` RPC) will contain the deterministic +seed. This is expected to allow future versions to import the seed and all +associated funds, but this is not yet implemented. + HD key generation for new wallets can be disabled by `-usehd=0`. Keep in mind that this flag only has affect on newly created wallets. You can't disable HD key generation once you have created a HD wallet. From 4f5529351f94026a8e206b3df0476f7c6a492bbf Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 8 Aug 2016 21:07:38 +0000 Subject: [PATCH 040/302] doc/release-notes: Misc --- doc/release-notes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index ba8ad71beb8..6c7385c9825 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -56,7 +56,7 @@ during initial sync of a node, and when catching up after downtime. bitcoin-cli: arguments privacy --------------------------------- +------------------------------ The RPC command line client gained a new argument, `-stdin` to read extra arguments from standard input, one per line until EOF/Ctrl-D. @@ -74,7 +74,7 @@ table by any user on the system. C++11 and Python 3 -------------------- +------------------ Various code modernizations have been done. The Bitcoin Core code base has started using C++11. This means that a C++11-capable compiler is now needed for @@ -88,7 +88,7 @@ required. Linux ARM builds ------------------- +---------------- Due to popular request, Linux ARM builds have been added to the uploaded executables. From 40d705cb70efddee3568576ed1c88b0f89403e9e Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 8 Aug 2016 22:13:21 +0000 Subject: [PATCH 041/302] doc/release-notes: Mention the relevance of Compact Blocks on non-mining nodes' influence on network policy --- doc/release-notes.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 6c7385c9825..23687eccc43 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -119,6 +119,15 @@ cases it also reduces propagation delay. It is automatically enabled between compatible peers. [BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) +As a side-effect, ordinary non-mining nodes will download and upload blocks +faster if those blocks were produced by miners using similar transaction +filtering policies. This means that a miner who produces a block with many +transactions discouraged by your node will be relayed slower than one with +only transactions already in your memory pool. The overall effect of such +relay differences on the network may result in blocks which include widely- +discouraged transactions losing a stale block race, and therefore miners may +wish to configure their node to take common relay policies into consideration. + Hierarchical Deterministic Key Generation ----------------------------------------- From 5e499e7a56b2e343e0a9b169cd95f181bdd3e334 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 9 Aug 2016 03:07:03 +0000 Subject: [PATCH 042/302] doc/release-notes: Document changed bytespersigop behaviour --- doc/release-notes.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 23687eccc43..5dd3f5a651e 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -253,6 +253,19 @@ RPC call `generatetoaddress` has been added to mine to a specific address. This works with wallet disabled. +New bytespersigop implementation +-------------------------------- + +The former implementation of the bytespersigop filter accidentally broke bare +multisig (which is meant to be controlled by the `permitbaremultisig` option), +since the consensus protocol always counts these older transaction forms as 20 +sigops for backwards compatibility. Simply fixing this bug by counting more +accurately would have reintroduced a vulnerability. It has therefore been +replaced with a new implementation that rather than filter such transactions, +instead treats them (for fee purposes only) as if they were in fact the size +of a transaction actually using all 20 sigops. + + Low-level P2P changes ---------------------- From f2306fbe01426ce11c4df6a5c1b837106bc2c702 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 25 Aug 2016 09:56:12 +0200 Subject: [PATCH 043/302] doc: Clean out release notes after 0.13.0 release --- doc/release-notes.md | 814 +-------------------------------------------------- 1 file changed, 6 insertions(+), 808 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 5dd3f5a651e..77d35315ff7 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,6 +1,6 @@ -Bitcoin Core version 0.13.0 is now available from: +Bitcoin Core version 0.13.x is now available from: - + This is a new major version release, including new features, various bugfixes and performance improvements, as well as updated translations. @@ -38,323 +38,8 @@ report issues about Windows XP to the issue tracker. Notable changes =============== -Database cache memory increased --------------------------------- - -As a result of growth of the UTXO set, performance with the prior default -database cache of 100 MiB has suffered. -For this reason the default was changed to 300 MiB in this release. - -For nodes on low-memory systems, the database cache can be changed back to -100 MiB (or to another value) by either: - -- Adding `dbcache=100` in bitcoin.conf -- Changing it in the GUI under `Options → Size of database cache` - -Note that the database cache setting has the most performance impact -during initial sync of a node, and when catching up after downtime. - - -bitcoin-cli: arguments privacy ------------------------------- - -The RPC command line client gained a new argument, `-stdin` -to read extra arguments from standard input, one per line until EOF/Ctrl-D. -For example: - - $ src/bitcoin-cli -stdin walletpassphrase - mysecretcode - 120 - ..... press Ctrl-D here to end input - $ - -It is recommended to use this for sensitive information such as wallet -passphrases, as command-line arguments can usually be read from the process -table by any user on the system. - - -C++11 and Python 3 ------------------- - -Various code modernizations have been done. The Bitcoin Core code base has -started using C++11. This means that a C++11-capable compiler is now needed for -building. Effectively this means GCC 4.7 or higher, or Clang 3.3 or higher. - -When cross-compiling for a target that doesn't have C++11 libraries, configure with -`./configure --enable-glibc-back-compat ... LDFLAGS=-static-libstdc++`. - -For running the functional tests in `qa/rpc-tests`, Python3.4 or higher is now -required. - - -Linux ARM builds ----------------- - -Due to popular request, Linux ARM builds have been added to the uploaded -executables. - -The following extra files can be found in the download directory or torrent: - -- `bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz`: Linux binaries for the most - common 32-bit ARM architecture. -- `bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz`: Linux binaries for the most - common 64-bit ARM architecture. - -ARM builds are still experimental. If you have problems on a certain device or -Linux distribution combination please report them on the bug tracker, it may be -possible to resolve them. - -Note that Android is not considered ARM Linux in this context. The executables -are not expected to work out of the box on Android. - - -Compact Block support (BIP 152) -------------------------------- - -Support for block relay using the Compact Blocks protocol has been implemented -in PR 8068. - -The primary goal is reducing the bandwidth spikes at relay time, though in many -cases it also reduces propagation delay. It is automatically enabled between -compatible peers. -[BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) - -As a side-effect, ordinary non-mining nodes will download and upload blocks -faster if those blocks were produced by miners using similar transaction -filtering policies. This means that a miner who produces a block with many -transactions discouraged by your node will be relayed slower than one with -only transactions already in your memory pool. The overall effect of such -relay differences on the network may result in blocks which include widely- -discouraged transactions losing a stale block race, and therefore miners may -wish to configure their node to take common relay policies into consideration. - - -Hierarchical Deterministic Key Generation ------------------------------------------ -Newly created wallets will use hierarchical deterministic key generation -according to BIP32 (keypath m/0'/0'/k'). -Existing wallets will still use traditional key generation. - -Backups of HD wallets, regardless of when they have been created, can -therefore be used to re-generate all possible private keys, even the -ones which haven't already been generated during the time of the backup. -**Attention:** Encrypting the wallet will create a new seed which requires -a new backup! - -Wallet dumps (created using the `dumpwallet` RPC) will contain the deterministic -seed. This is expected to allow future versions to import the seed and all -associated funds, but this is not yet implemented. - -HD key generation for new wallets can be disabled by `-usehd=0`. Keep in -mind that this flag only has affect on newly created wallets. -You can't disable HD key generation once you have created a HD wallet. - -There is no distinction between internal (change) and external keys. - -HD wallets are incompatible with older versions of Bitcoin Core. - -[Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) - - -Segregated Witness ------------------- - -The code preparations for Segregated Witness ("segwit"), as described in [BIP -141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki), [BIP -143](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki), [BIP -144](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki), and [BIP -145](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki) are -finished and included in this release. However, BIP 141 does not yet specify -activation parameters on mainnet, and so this release does not support segwit -use on mainnet. Testnet use is supported, and after BIP 141 is updated with -proposed parameters, a future release of Bitcoin Core is expected that -implements those parameters for mainnet. - -Furthermore, because segwit activation is not yet specified for mainnet, -version 0.13.0 will behave similarly as other pre-segwit releases even after a -future activation of BIP 141 on the network. Upgrading from 0.13.0 will be -required in order to utilize segwit-related features on mainnet (such as signal -BIP 141 activation, mine segwit blocks, fully validate segwit blocks, relay -segwit blocks to other segwit nodes, and use segwit transactions in the -wallet, etc). - - -Mining transaction selection ("Child Pays For Parent") ------------------------------------------------------- - -The mining transaction selection algorithm has been replaced with an algorithm -that selects transactions based on their feerate inclusive of unconfirmed -ancestor transactions. This means that a low-fee transaction can become more -likely to be selected if a high-fee transaction that spends its outputs is -relayed. - -With this change, the `-blockminsize` command line option has been removed. - -The command line option `-blockmaxsize` remains an option to specify the -maximum number of serialized bytes in a generated block. In addition, the new -command line option `-blockmaxweight` has been added, which specifies the -maximum "block weight" of a generated block, as defined by [BIP 141 (Segregated -Witness)] (https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki). - -In preparation for Segregated Witness, the mining algorithm has been modified -to optimize transaction selection for a given block weight, rather than a given -number of serialized bytes in a block. In this release, transaction selection -is unaffected by this distinction (as BIP 141 activation is not supported on -mainnet in this release, see above), but in future releases and after BIP 141 -activation, these calculations would be expected to differ. - -For optimal runtime performance, miners using this release should specify -`-blockmaxweight` on the command line, and not specify `-blockmaxsize`. -Additionally (or only) specifying `-blockmaxsize`, or relying on default -settings for both, may result in performance degradation, as the logic to -support `-blockmaxsize` performs additional computation to ensure that -constraint is met. (Note that for mainnet, in this release, the equivalent -parameter for `-blockmaxweight` would be four times the desired -`-blockmaxsize`. See [BIP 141] -(https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki) for additional -details.) - -In the future, the `-blockmaxsize` option may be removed, as block creation is -no longer optimized for this metric. Feedback is requested on whether to -deprecate or keep this command line option in future releases. - - -Reindexing changes ------------------- - -In earlier versions, reindexing did validation while reading through the block -files on disk. These two have now been split up, so that all blocks are known -before validation starts. This was necessary to make certain optimizations that -are available during normal synchronizations also available during reindexing. - -The two phases are distinct in the Bitcoin-Qt GUI. During the first one, -"Reindexing blocks on disk" is shown. During the second (slower) one, -"Processing blocks on disk" is shown. - -It is possible to only redo validation now, without rebuilding the block index, -using the command line option `-reindex-chainstate` (in addition to -`-reindex` which does both). This new option is useful when the blocks on disk -are assumed to be fine, but the chainstate is still corrupted. It is also -useful for benchmarks. - - -Removal of internal miner --------------------------- - -As CPU mining has been useless for a long time, the internal miner has been -removed in this release, and replaced with a simpler implementation for the -test framework. - -The overall result of this is that `setgenerate` RPC call has been removed, as -well as the `-gen` and `-genproclimit` command-line options. - -For testing, the `generate` call can still be used to mine a block, and a new -RPC call `generatetoaddress` has been added to mine to a specific address. This -works with wallet disabled. - - -New bytespersigop implementation --------------------------------- - -The former implementation of the bytespersigop filter accidentally broke bare -multisig (which is meant to be controlled by the `permitbaremultisig` option), -since the consensus protocol always counts these older transaction forms as 20 -sigops for backwards compatibility. Simply fixing this bug by counting more -accurately would have reintroduced a vulnerability. It has therefore been -replaced with a new implementation that rather than filter such transactions, -instead treats them (for fee purposes only) as if they were in fact the size -of a transaction actually using all 20 sigops. - - -Low-level P2P changes ----------------------- - -- The optional new p2p message "feefilter" is implemented and the protocol - version is bumped to 70013. Upon receiving a feefilter message from a peer, - a node will not send invs for any transactions which do not meet the filter - feerate. [BIP 133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki) - -- The P2P alert system has been removed in PR #7692 and the `alert` P2P message - is no longer supported. - -- The transaction relay mechanism used to relay one quarter of all transactions - instantly, while queueing up the rest and sending them out in batch. As - this resulted in chains of dependent transactions being reordered, it - systematically hurt transaction relay. The relay code was redesigned in PRs - \#7840 and #8082, and now always batches transactions announcements while also - sorting them according to dependency order. This significantly reduces orphan - transactions. To compensate for the removal of instant relay, the frequency of - batch sending was doubled for outgoing peers. - -- Since PR #7840 the BIP35 `mempool` command is also subject to batch processing. - Also the `mempool` message is no longer handled for non-whitelisted peers when - `NODE_BLOOM` is disabled through `-peerbloomfilters=0`. - -- The maximum size of orphan transactions that are kept in memory until their - ancestors arrive has been raised in PR #8179 from 5000 to 99999 bytes. They - are now also removed from memory when they are included in a block, conflict - with a block, and time out after 20 minutes. - -- We respond at most once to a getaddr request during the lifetime of a - connection since PR #7856. - -- Connections to peers who have recently been the first one to give us a valid - new block or transaction are protected from disconnections since PR #8084. - - -Low-level RPC changes ----------------------- - -- RPC calls have been added to output detailed statistics for individual mempool - entries, as well as to calculate the in-mempool ancestors or descendants of a - transaction: see `getmempoolentry`, `getmempoolancestors`, `getmempooldescendants`. - -- `gettxoutsetinfo` UTXO hash (`hash_serialized`) has changed. There was a divergence between - 32-bit and 64-bit platforms, and the txids were missing in the hashed data. This has been - fixed, but this means that the output will be different than from previous versions. - -- Full UTF-8 support in the RPC API. Non-ASCII characters in, for example, - wallet labels have always been malformed because they weren't taken into account - properly in JSON RPC processing. This is no longer the case. This also affects - the GUI debug console. - -- Asm script outputs replacements for OP_NOP2 and OP_NOP3 - - - OP_NOP2 has been renamed to OP_CHECKLOCKTIMEVERIFY by [BIP -65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) - - - OP_NOP3 has been renamed to OP_CHECKSEQUENCEVERIFY by [BIP -112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) - - - The following outputs are affected by this change: - - - RPC `getrawtransaction` (in verbose mode) - - RPC `decoderawtransaction` - - RPC `decodescript` - - REST `/rest/tx/` (JSON format) - - REST `/rest/block/` (JSON format when including extended tx details) - - `bitcoin-tx -json` - -- The sorting of the output of the `getrawmempool` output has changed. - -- New RPC commands: `generatetoaddress`, `importprunedfunds`, `removeprunedfunds`, `signmessagewithprivkey`, - `getmempoolancestors`, `getmempooldescendants`, `getmempoolentry`, - `createwitnessaddress`, `addwitnessaddress`. - -- Removed RPC commands: `setgenerate`, `getgenerate`. - -- New options were added to `fundrawtransaction`: `includeWatching`, `changeAddress`, `changePosition` and `feeRate`. - - -Low-level ZMQ changes ----------------------- - -- Each ZMQ notification now contains an up-counting sequence number that allows - listeners to detect lost notifications. - The sequence number is always the last element in a multi-part ZMQ notification and - therefore backward compatible. Each message type has its own counter. - PR [#7762](https://github.com/bitcoin/bitcoin/pull/7762). - +Example item +-------------- 0.13.0 Change log ================= @@ -364,500 +49,13 @@ behavior, not code moves, refactors and string updates. For convenience in locat the code changes and accompanying discussion, both the pull request and git merge commit are mentioned. -### RPC and other APIs - -- #7156 `9ee02cf` Remove cs_main lock from `createrawtransaction` (laanwj) -- #7326 `2cd004b` Fix typo, wrong information in gettxout help text (paveljanik) -- #7222 `82429d0` Indicate which transactions are signaling opt-in RBF (sdaftuar) -- #7480 `b49a623` Changed getnetworkhps value to double to avoid overflow (instagibbs) -- #7550 `8b958ab` Input-from-stdin mode for bitcoin-cli (laanwj) -- #7670 `c9a1265` Use cached block hash in blockToJSON() (rat4) -- #7726 `9af69fa` Correct importaddress help reference to importpubkey (CypherGrue) -- #7766 `16555b6` Register calls where they are defined (laanwj) -- #7797 `e662a76` Fix generatetoaddress failing to parse address (mruddy) -- #7774 `916b15a` Add versionHex in getblock and getblockheader JSON results (mruddy) -- #7863 `72c54e3` Getblockchaininfo: make bip9_softforks an object, not an array (rustyrussell) -- #7842 `d97101e` Do not print minping time in getpeerinfo when no ping received yet (paveljanik) -- #7518 `be14ca5` Add multiple options to fundrawtransaction (promag) -- #7756 `9e47fce` Add cursor to iterate over utxo set, use this in `gettxoutsetinfo` (laanwj) -- #7848 `88616d2` Divergence between 32- and 64-bit when hashing >4GB affects `gettxoutsetinfo` (laanwj) -- #7827 `4205ad7` Speed up `getchaintips` (mrbandrews) -- #7762 `a1eb344` Append a message sequence number to every ZMQ notification (jonasschnelli) -- #7688 `46880ed` List solvability in listunspent output and improve help (sipa) -- #7926 `5725807` Push back `getaddednodeinfo` dead value (instagibbs) -- #7953 `0630353` Create `signmessagewithprivkey` rpc (achow101) -- #8049 `c028c7b` Expose information on whether transaction relay is enabled in `getnetworkinfo` (laanwj) -- #7967 `8c1e49b` Add feerate option to `fundrawtransaction` (jonasschnelli) -- #8118 `9b6a48c` Reduce unnecessary hashing in `signrawtransaction` (jonasnick) -- #7957 `79004d4` Add support for transaction sequence number (jonasschnelli) -- #8153 `75ec320` `fundrawtransaction` feeRate: Use BTC/kB (MarcoFalke) -- #7292 `7ce9ac5` Expose ancestor/descendant information over RPC (sdaftuar) -- #8171 `62fcf27` Fix createrawtx sequence number unsigned int parsing (jonasschnelli) -- #7892 `9c3d0fa` Add full UTF-8 support to RPC (laanwj) -- #8317 `304eff3` Don't use floating point in rpcwallet (MarcoFalke) -- #8258 `5a06ebb` Hide softfork in `getblockchaininfo` if timeout is 0 (jl2012) -- #8244 `1922e5a` Remove unnecessary LOCK(cs_main) in getrawmempool (dcousens) - -### Block and transaction handling - -- #7056 `6a07208` Save last db read (morcos) -- #6842 `0192806` Limitfreerelay edge case bugfix (ptschip) -- #7084 `11d74f6` Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee in mempool (MarcoFalke) -- #7539 `9f33dba` Add tags to mempool's mapTx indices (sdaftuar) -- #7592 `26a2a72` Re-remove ERROR logging for mempool rejects (laanwj) -- #7187 `14d6324` Keep reorgs fast for SequenceLocks checks (morcos) -- #7594 `01f4267` Mempool: Add tracking of ancestor packages (sdaftuar) -- #7904 `fc9e334` Txdb: Fix assert crash in new UTXO set cursor (laanwj) -- #7927 `f9c2ac7` Minor changes to dbwrapper to simplify support for other databases (laanwj) -- #7933 `e26b620` Fix OOM when deserializing UTXO entries with invalid length (sipa) -- #8020 `5e374f7` Use SipHash-2-4 for various non-cryptographic hashes (sipa) -- #8076 `d720980` VerifyDB: don't check blocks that have been pruned (sdaftuar) -- #8080 `862fd24` Do not use mempool for GETDATA for tx accepted after the last mempool req (gmaxwell) -- #7997 `a82f033` Replace mapNextTx with slimmer setSpends (kazcw) -- #8220 `1f86d64` Stop trimming when mapTx is empty (sipa) -- #8273 `396f9d6` Bump `-dbcache` default to 300MiB (laanwj) -- #7225 `eb33179` Eliminate unnecessary call to CheckBlock (sdaftuar) -- #7907 `006cdf6` Optimize and Cleanup CScript::FindAndDelete (pstratem) -- #7917 `239d419` Optimize reindex (sipa) -- #7763 `3081fb9` Put hex-encoded version in UpdateTip (sipa) -- #8149 `d612837` Testnet-only segregated witness (sipa) -- #8305 `3730393` Improve handling of unconnecting headers (sdaftuar) -- #8363 `fca1a41` Rename "block cost" to "block weight" (sdaftuar) -- #8381 `f84ee3d` Make witness v0 outputs non-standard (jl2012) -- #8364 `3f65ba2` Treat high-sigop transactions as larger rather than rejecting them (sipa) - -### P2P protocol and network code - -- #6589 `dc0305d` Log bytes recv/sent per command (jonasschnelli) -- #7164 `3b43cad` Do not download transactions during initial blockchain sync (ptschip) -- #7458 `898fedf` peers.dat, banlist.dat recreated when missing (kirkalx) -- #7637 `3da5d1b` Fix memleak in TorController (laanwj, jonasschnelli) -- #7553 `9f14e5a` Remove vfReachable and modify IsReachable to only use vfLimited (pstratem) -- #7708 `9426632` De-neuter NODE_BLOOM (pstratem) -- #7692 `29b2be6` Remove P2P alert system (btcdrak) -- #7542 `c946a15` Implement "feefilter" P2P message (morcos) -- #7573 `352fd57` Add `-maxtimeadjustment` command line option (mruddy) -- #7570 `232592a` Add IPv6 Link-Local Address Support (mruddy) -- #7874 `e6a4d48` Improve AlreadyHave (morcos) -- #7856 `64e71b3` Only send one GetAddr response per connection (gmaxwell) -- #7868 `7daa3ad` Split DNS resolving functionality out of net structures (theuni) -- #7919 `7617682` Fix headers announcements edge case (sdaftuar) -- #7514 `d9594bf` Fix IsInitialBlockDownload for testnet (jmacwhyte) -- #7959 `03cf6e8` fix race that could fail to persist a ban (kazcw) -- #7840 `3b9a0bf` Several performance and privacy improvements to inv/mempool handling (sipa) -- #8011 `65aecda` Don't run ThreadMessageHandler at lowered priority (kazcw) -- #7696 `5c3f8dd` Fix de-serialization bug where AddrMan is left corrupted (EthanHeilman) -- #7932 `ed749bd` CAddrMan::Deserialize handle corrupt serializations better (pstratem) -- #7906 `83121cc` Prerequisites for p2p encapsulation changes (theuni) -- #8033 `18436d8` Fix Socks5() connect failures to be less noisy and less unnecessarily scary (wtogami) -- #8082 `01d8359` Defer inserting into maprelay until just before relaying (gmaxwell) -- #7960 `6a22373` Only use AddInventoryKnown for transactions (sdaftuar) -- #8078 `2156fa2` Disable the mempool P2P command when bloom filters disabled (petertodd) -- #8065 `67c91f8` Addrman offline attempts (gmaxwell) -- #7703 `761cddb` Tor: Change auth order to only use password auth if -torpassword (laanwj) -- #8083 `cd0c513` Add support for dnsseeds with option to filter by servicebits (jonasschnelli) -- #8173 `4286f43` Use SipHash for node eviction (sipa) -- #8154 `1445835` Drop vAddrToSend after sending big addr message (kazcw) -- #7749 `be9711e` Enforce expected outbound services (sipa) -- #8208 `0a64777` Do not set extra flags for unfiltered DNS seed results (sipa) -- #8084 `e4bb4a8` Add recently accepted blocks and txn to AttemptToEvictConnection (gmaxwell) -- #8113 `3f89a53` Rework addnode behaviour (sipa) -- #8179 `94ab58b` Evict orphans which are included or precluded by accepted blocks (gmaxwell) -- #8068 `e9d76a1` Compact Blocks (TheBlueMatt) -- #8204 `0833894` Update petertodd's testnet seed (petertodd) -- #8247 `5cd35d3` Mark my dnsseed as supporting filtering (sipa) -- #8275 `042c323` Remove bad chain alert partition check (btcdrak) -- #8271 `1bc9c80` Do not send witnesses in cmpctblock (sipa) -- #8312 `ca40ef6` Fix mempool DoS vulnerability from malleated transactions (sdaftuar) -- #7180 `16ccb74` Account for `sendheaders` `verack` messages (laanwj) -- #8102 `425278d` Bugfix: use global ::fRelayTxes instead of CNode in version send (sipa) -- #8408 `b7e2011` Prevent fingerprinting, disk-DoS with compact blocks (sdaftuar) - -### Build system - -- #7302 `41f1a3e` C++11 build/runtime fixes (theuni) -- #7322 `fd9356b` c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locally (theuni) -- #7441 `a6771fc` Use Debian 8.3 in gitian build guide (fanquake) -- #7349 `152a821` Build against system UniValue when available (luke-jr) -- #7520 `621940e` LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead (paveljanik) -- #7528 `9b9bfce` autogen.sh: warn about needing autoconf if autoreconf is not found (knocte) -- #7504 `19324cf` Crystal clean make clean (paveljanik) -- #7619 `18b3f1b` Add missing sudo entry in gitian VM setup (btcdrak) -- #7616 `639ec58` [depends] Delete unused patches (MarcoFalke) -- #7658 `c15eb28` Add curl to Gitian setup instructions (btcdrak) -- #7710 `909b72b` [Depends] Bump miniupnpc and config.guess+sub (fanquake) -- #7723 `5131005` build: python 3 compatibility (laanwj) -- #7477 `28ad4d9` Fix quoting of copyright holders in configure.ac (domob1812) -- #7711 `a67bc5e` [build-aux] Update Boost & check macros to latest serials (fanquake) -- #7788 `4dc1b3a` Use relative paths instead of absolute paths in protoc calls (paveljanik) -- #7809 `bbd210d` depends: some base fixes/changes (theuni) -- #7603 `73fc922` Build System: Use PACKAGE_TARNAME in NSIS script (JeremyRand) -- #7905 `187186b` test: move accounting_tests and rpc_wallet_tests to wallet/test (laanwj) -- #7911 `351abf9` leveldb: integrate leveldb into our buildsystem (theuni) -- #7944 `a407807` Re-instate TARGET_OS=linux in configure.ac. Removed by 351abf9e035 (randy-waterhouse) -- #7920 `c3e3cfb` Switch Travis to Trusty (theuni) -- #7954 `08b37c5` build: quiet annoying warnings without adding new ones (theuni) -- #7165 `06162f1` build: Enable C++11 in build, require C++11 compiler (laanwj) -- #7982 `559fbae` build: No need to check for leveldb atomics (theuni) -- #8002 `f9b4582` [depends] Add -stdlib=libc++ to darwin CXX flags (fanquake) -- #7993 `6a034ed` [depends] Bump Freetype, ccache, ZeroMQ, miniupnpc, expat (fanquake) -- #8167 `19ea173` Ship debug tarballs/zips with debug symbols (theuni) -- #8175 `f0299d8` Add --disable-bench to config flags for windows (laanwj) -- #7283 `fd9881a` [gitian] Default reference_datetime to commit author date (MarcoFalke) -- #8181 `9201ce8` Get rid of `CLIENT_DATE` (laanwj) -- #8133 `fde0ac4` Finish up out-of-tree changes (theuni) -- #8188 `65a9d7d` Add armhf/aarch64 gitian builds (theuni) -- #8194 `cca1c8c` [gitian] set correct PATH for wrappers (MarcoFalke) -- #8198 `5201614` Sync ax_pthread with upstream draft4 (fanquake) -- #8210 `12a541e` [Qt] Bump to Qt5.6.1 (jonasschnelli) -- #8285 `da50997` windows: Add testnet link to installer (laanwj) -- #8304 `0cca2fe` [travis] Update SDK_URL (MarcoFalke) -- #8310 `6ae20df` Require boost for bench (theuni) -- #8315 `2e51590` Don't require sudo for Linux (theuni) -- #8314 `67caef6` Fix pkg-config issues for 0.13 (theuni) -- #8373 `1fe7f40` Fix OSX non-deterministic dmg (theuni) -- #8358 `cfd1280` Gbuild: Set memory explicitly (default is too low) (MarcoFalke) - -### GUI - -- #7154 `00b4b8d` Add InMempool() info to transaction details (jonasschnelli) -- #7068 `5f3c670` [RPC-Tests] add simple way to run rpc test over QT clients (jonasschnelli) -- #7218 `a1c185b` Fix misleading translation (MarcoFalke) -- #7214 `be9a9a3` qt5: Use the fixed font the system recommends (MarcoFalke) -- #7256 `08ab906` Add note to coin control dialog QT5 workaround (fanquake) -- #7255 `e289807` Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake) -- #7317 `3b57e9c` Fix RPCTimerInterface ordering issue (jonasschnelli) -- #7327 `c079d79` Transaction View: LastMonth calculation fixed (crowning-) -- #7334 `e1060c5` coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke) -- #7383 `ae2db67` Rename "amount" to "requested amount" in receive coins table (jonasschnelli) -- #7396 `cdcbc59` Add option to increase/decrease font size in the console window (jonasschnelli) -- #7437 `9645218` Disable tab navigation for peers tables (Kefkius) -- #7604 `354b03d` build: Remove spurious dollar sign. Fixes #7189 (dooglus) -- #7605 `7f001bd` Remove openssl info from init/log and from Qt debug window (jonasschnelli) -- #7628 `87d6562` Add 'copy full transaction details' option (ericshawlinux) -- #7613 `3798e5d` Add autocomplete to bitcoin-qt's console window (GamerSg) -- #7668 `b24266c` Fix history deletion bug after font size change (achow101) -- #7680 `41d2dfa` Remove reflection from `about` icon (laanwj) -- #7686 `f034bce` Remove 0-fee from send dialog (MarcoFalke) -- #7506 `b88e0b0` Use CCoinControl selection in CWallet::FundTransaction (promag) -- #7732 `0b98dd7` Debug window: replace "Build date" with "Datadir" (jonasschnelli) -- #7761 `60db51d` remove trailing output-index from transaction-id (jonasschnelli) -- #7772 `6383268` Clear the input line after activating autocomplete (paveljanik) -- #7925 `f604bf6` Fix out-of-tree GUI builds (laanwj) -- #7939 `574ddc6` Make it possible to show details for multiple transactions (laanwj) -- #8012 `b33824b` Delay user confirmation of send (Tyler-Hardin) -- #8006 `7c8558d` Add option to disable the system tray icon (Tyler-Hardin) -- #8046 `169d379` Fix Cmd-Q / Menu Quit shutdown on OSX (jonasschnelli) -- #8042 `6929711` Don't allow to open the debug window during splashscreen & verification state (jonasschnelli) -- #8014 `77b49ac` Sort transactions by date (Tyler-Hardin) -- #8073 `eb2f6f7` askpassphrasedialog: Clear pass fields on accept (rat4) -- #8129 `ee1533e` Fix RPC console auto completer (UdjinM6) -- #7636 `fb0ac48` Add bitcoin address label to request payment QR code (makevoid) -- #8231 `760a6c7` Fix a bug where the SplashScreen will not be hidden during startup (jonasschnelli) -- #8256 `af2421c` BUG: bitcoin-qt crash (fsb4000) -- #8257 `ff03c50` Do not ask a UI question from bitcoind (sipa) -- #8288 `91abb77` Network-specific example address (laanwj) -- #7707 `a914968` UI support for abandoned transactions (jonasschnelli) -- #8207 `f7a403b` Add a link to the Bitcoin-Core repository and website to the About Dialog (MarcoFalke) -- #8281 `6a87eb0` Remove client name from debug window (laanwj) -- #8407 `45eba4b` Add dbcache migration path (jonasschnelli) - -### Wallet - -- #7262 `fc08994` Reduce inefficiency of GetAccountAddress() (dooglus) -- #7537 `78e81b0` Warn on unexpected EOF while salvaging wallet (laanwj) -- #7521 `3368895` Don't resend wallet txs that aren't in our own mempool (morcos) -- #7576 `86a1ec5` Move wallet help string creation to CWallet (jonasschnelli) -- #7577 `5b3b5a7` Move "load wallet phase" to CWallet (jonasschnelli) -- #7608 `0735c0c` Move hardcoded file name out of log messages (MarcoFalke) -- #7649 `4900641` Prevent multiple calls to CWallet::AvailableCoins (promag) -- #7646 `e5c3511` Fix lockunspent help message (promag) -- #7558 `b35a591` Add import/removeprunedfunds rpc call (instagibbs) -- #6215 `48c5adf` add bip32 pub key serialization (jonasschnelli) -- #7913 `bafd075` Fix for incorrect locking in GetPubKey() (keystore.cpp) (yurizhykin) -- #8036 `41138f9` init: Move berkeleydb version reporting to wallet (laanwj) -- #8028 `373b50d` Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk (pstratem) -- #8061 `f6b7df3` Improve Wallet encapsulation (pstratem) -- #7891 `950be19` Always require OS randomness when generating secret keys (sipa) -- #7689 `b89ef13` Replace OpenSSL AES with ctaes-based version (sipa) -- #7825 `f972b04` Prevent multiple calls to ExtractDestination (pedrobranco) -- #8137 `243ac0c` Improve CWallet API with new AccountMove function (pstratem) -- #8142 `52c3f34` Improve CWallet API with new GetAccountPubkey function (pstratem) -- #8035 `b67a472` Add simplest BIP32/deterministic key generation implementation (jonasschnelli) -- #7687 `a6ddb19` Stop treating importaddress'ed scripts as change (sipa) -- #8298 `aef3811` wallet: Revert input selection post-pruning (laanwj) -- #8324 `bc94b87` Keep HD seed during salvagewallet (jonasschnelli) -- #8323 `238300b` Add HD keypath to CKeyMetadata, report metadata in validateaddress (jonasschnelli) -- #8367 `3b38a6a` Ensure <0.13 clients can't open HD wallets (jonasschnelli) -- #8378 `ebea651` Move SetMinVersion for FEATURE_HD to SetHDMasterKey (pstratem) -- #8390 `73adfe3` Correct hdmasterkeyid/masterkeyid name confusion (jonasschnelli) -- #8206 `18b8ee1` Add HD xpriv to dumpwallet (jonasschnelli) -- #8389 `c3c82c4` Create a new HD seed after encrypting the wallet (jonasschnelli) - -### Tests and QA - -- #7320 `d3dfc6d` Test walletpassphrase timeout (MarcoFalke) -- #7208 `47c5ed1` Make max tip age an option instead of chainparam (laanwj) -- #7372 `21376af` Trivial: [qa] wallet: Print maintenance (MarcoFalke) -- #7280 `668906f` [travis] Fail when documentation is outdated (MarcoFalke) -- #7177 `93b0576` [qa] Change default block priority size to 0 (MarcoFalke) -- #7236 `02676c5` Use createrawtx locktime parm in txn_clone (dgenr8) -- #7212 `326ffed` Adds unittests for CAddrMan and CAddrinfo, removes source of non-determinism (EthanHeilman) -- #7490 `d007511` tests: Remove May15 test (laanwj) -- #7531 `18cb2d5` Add bip68-sequence.py to extended rpc tests (btcdrak) -- #7536 `ce5fc02` test: test leading spaces for ParseHex (laanwj) -- #7620 `1b68de3` [travis] Only run check-doc.py once (MarcoFalke) -- #7455 `7f96671` [travis] Exit early when check-doc.py fails (MarcoFalke) -- #7667 `56d2c4e` Move GetTempPath() to testutil (musalbas) -- #7517 `f1ca891` test: script_error checking in script_invalid tests (laanwj) -- #7684 `3d0dfdb` Extend tests (MarcoFalke) -- #7697 `622fe6c` Tests: make prioritise_transaction.py more robust (sdaftuar) -- #7709 `efde86b` Tests: fix missing import in mempool_packages (sdaftuar) -- #7702 `29e1131` Add tests verifychain, lockunspent, getbalance, listsinceblock (MarcoFalke) -- #7720 `3b4324b` rpc-test: Normalize assert() (MarcoFalke) -- #7757 `26794d4` wallet: Wait for reindex to catch up (MarcoFalke) -- #7764 `a65b36c` Don't run pruning.py twice (MarcoFalke) -- #7773 `7c80e72` Fix comments in tests (btcdrak) -- #7489 `e9723cb` tests: Make proxy_test work on travis servers without IPv6 (laanwj) -- #7801 `70ac71b` Remove misleading "errorString syntax" (MarcoFalke) -- #7803 `401c65c` maxblocksinflight: Actually enable test (MarcoFalke) -- #7802 `3bc71e1` httpbasics: Actually test second connection (MarcoFalke) -- #7849 `ab8586e` tests: add varints_bitpatterns test (laanwj) -- #7846 `491171f` Clean up lockorder data of destroyed mutexes (sipa) -- #7853 `6ef5e00` py2: Unfiddle strings into bytes explicitly (MarcoFalke) -- #7878 `53adc83` [test] bctest.py: Revert faa41ee (MarcoFalke) -- #7798 `cabba24` [travis] Print the commit which was evaluated (MarcoFalke) -- #7833 `b1bf511` tests: Check Content-Type header returned from RPC server (laanwj) -- #7851 `fa9d86f` pull-tester: Don't mute zmq ImportError (MarcoFalke) -- #7822 `0e6fd5e` Add listunspent() test for spendable/unspendable UTXO (jpdffonseca) -- #7912 `59ad568` Tests: Fix deserialization of reject messages (sdaftuar) -- #7941 `0ea3941` Fixing comment in script_test.json test case (Christewart) -- #7807 `0ad1041` Fixed miner test values, gave constants for less error-prone values (instagibbs) -- #7980 `88b77c7` Smartfees: Properly use ordered dict (MarcoFalke) -- #7814 `77b637f` Switch to py3 (MarcoFalke) -- #8030 `409a8a1` Revert fatal-ness of missing python-zmq (laanwj) -- #8018 `3e90fe6` Autofind rpc tests --srcdir (jonasschnelli) -- #8016 `5767e80` Fix multithread CScheduler and reenable test (paveljanik) -- #7972 `423ca30` pull-tester: Run rpc test in parallel (MarcoFalke) -- #8039 `69b3a6d` Bench: Add crypto hash benchmarks (laanwj) -- #8041 `5b736dd` Fix bip9-softforks blockstore issue (MarcoFalke) -- #7994 `1f01443` Add op csv tests to script_tests.json (Christewart) -- #8038 `e2bf830` Various minor fixes (MarcoFalke) -- #8072 `1b87e5b` Travis: 'make check' in parallel and verbose (MarcoFalke) -- #8056 `8844ef1` Remove hardcoded "4 nodes" from test_framework (MarcoFalke) -- #8047 `37f9a1f` Test_framework: Set wait-timeout for bitcoind procs (MarcoFalke) -- #8095 `6700cc9` Test framework: only cleanup on successful test runs (sdaftuar) -- #8098 `06bd4f6` Test_framework: Append portseed to tmpdir (MarcoFalke) -- #8104 `6ff2c8d` Add timeout to sync_blocks() and sync_mempools() (sdaftuar) -- #8111 `61b8684` Benchmark SipHash (sipa) -- #8107 `52b803e` Bench: Added base58 encoding/decoding benchmarks (yurizhykin) -- #8115 `0026e0e` Avoid integer division in the benchmark inner-most loop (gmaxwell) -- #8090 `a2df115` Adding P2SH(p2pkh) script test case (Christewart) -- #7992 `ec45cc5` Extend #7956 with one more test (TheBlueMatt) -- #8139 `ae5575b` Fix interrupted HTTP RPC connection workaround for Python 3.5+ (sipa) -- #8164 `0f24eaf` [Bitcoin-Tx] fix missing test fixtures, fix 32bit atoi issue (jonasschnelli) -- #8166 `0b5279f` Src/test: Do not shadow local variables (paveljanik) -- #8141 `44c1b1c` Continuing port of java comparison tool (mrbandrews) -- #8201 `36b7400` fundrawtransaction: Fix race, assert amounts (MarcoFalke) -- #8214 `ed2cd59` Mininode: fail on send_message instead of silent return (MarcoFalke) -- #8215 `a072d1a` Don't use floating point in wallet tests (MarcoFalke) -- #8066 `65c2058` Test_framework: Use different rpc_auth_pair for each node (MarcoFalke) -- #8216 `0d41d70` Assert 'changePosition out of bounds' (MarcoFalke) -- #8222 `961893f` Enable mempool consistency checks in unit tests (sipa) -- #7751 `84370d5` test_framework: python3.4 authproxy compat (laanwj) -- #7744 `d8e862a` test_framework: detect failure of bitcoind startup (laanwj) -- #8280 `115735d` Increase sync_blocks() timeouts in pruning.py (MarcoFalke) -- #8340 `af9b7a9` Solve trivial merge conflict in p2p-segwit.py (MarcoFalke) -- #8067 `3e4cf8f` Travis: use slim generic image, and some fixups (theuni) -- #7951 `5c7df70` Test_framework: Properly print exception (MarcoFalke) -- #8070 `7771aa5` Remove non-determinism which is breaking net_tests #8069 (EthanHeilman) -- #8309 `bb2646a` Add wallet-hd test (MarcoFalke) -- #8444 `cd0910b` Fix p2p-feefilter.py for changed tx relay behavior (sdaftuar) - -### Mining - -- #7507 `11c7699` Remove internal miner (Leviathn) -- #7663 `c87f51e` Make the generate RPC call function for non-regtest (sipa) -- #7671 `e2ebd25` Add generatetoaddress RPC to mine to an address (achow101) -- #7935 `66ed450` Versionbits: GBT support (luke-jr) -- #7600 `66db2d6` Select transactions using feerate-with-ancestors (sdaftuar) -- #8295 `f5660d3` Mining-related fixups for 0.13.0 (sdaftuar) -- #7796 `536b75e` Add support for negative fee rates, fixes `prioritizetransaction` (MarcoFalke) -- #8362 `86edc20` Scale legacy sigop count in CreateNewBlock (sdaftuar) -- #8489 `8b0eee6` Bugfix: Use pre-BIP141 sigops until segwit activates (GBT) (luke-jr) - -### Documentation and miscellaneous - -- #7423 `69e2a40` Add example for building with constrained resources (jarret) -- #8254 `c2c69ed` Add OSX ZMQ requirement to QA readme (fanquake) -- #8203 `377d131` Clarify documentation for running a tor node (nathaniel-mahieu) -- #7428 `4b12266` Add example for listing ./configure flags (nathaniel-mahieu) -- #7847 `3eae681` Add arch linux build example (mruddy) -- #7968 `ff69aaf` Fedora build requirements (wtogami) -- #8013 `fbedc09` Fedora build requirements, add gcc-c++ and fix typo (wtogami) -- #8009 `fbd8478` Fixed invalid example paths in gitian-building.md (JeremyRand) -- #8240 `63fbdbc` Mention Windows XP end of support in release notes (laanwj) -- #8303 `5077d2c` Update bips.md for CSV softfork (fanquake) -- #7789 `e0b3e19` Add note about using the Qt official binary installer (paveljanik) -- #7791 `e30a5b0` Change Precise to Trusty in gitian-building.md (JeremyRand) -- #7838 `8bb5d3d` Update gitian build guide to debian 8.4.0 (fanquake) -- #7855 `b778e59` Replace precise with trusty (MarcoFalke) -- #7975 `fc23fee` Update bitcoin-core GitHub links (MarcoFalke) -- #8034 `e3a8207` Add basic git squash workflow (fanquake) -- #7813 `214ec0b` Update port in tor.md (MarcoFalke) -- #8193 `37c9830` Use Debian 8.5 in the gitian-build guide (fanquake) -- #8261 `3685e0c` Clarify help for `getblockchaininfo` (paveljanik) -- #7185 `ea0f5a2` Note that reviewers should mention the id of the commits they reviewed (pstratem) -- #7290 `c851d8d` [init] Add missing help for args (MarcoFalke) -- #7281 `f9fd4c2` Improve CheckInputs() comment about sig verification (petertodd) -- #7417 `1e06bab` Minor improvements to the release process (PRabahy) -- #7444 `4cdbd42` Improve block validity/ConnectBlock() comments (petertodd) -- #7527 `db2e1c0` Fix and cleanup listreceivedbyX documentation (instagibbs) -- #7541 `b6e00af` Clarify description of blockindex (pinheadmz) -- #7590 `f06af57` Improving wording related to Boost library requirements [updated] (jonathancross) -- #7635 `0fa88ef` Add dependency info to test docs (elliotolds) -- #7609 `3ba07bd` RPM spec file project (AliceWonderMiscreations) -- #7850 `229a17c` Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp` (alexreg) -- #7888 `ec870e1` Prevector: fix 2 bugs in currently unreached code paths (kazcw) -- #7922 `90653bc` CBase58Data::SetString: cleanse the full vector (kazcw) -- #7881 `c4e8390` Update release process (laanwj) -- #7952 `a9c8b74` Log invalid block hash to make debugging easier (paveljanik) -- #7974 `8206835` More comments on the design of AttemptToEvictConnection (gmaxwell) -- #7795 `47a7cfb` UpdateTip: log only one line at most per block (laanwj) -- #8110 `e7e25ea` Add benchmarking notes (fanquake) -- #8121 `58f0c92` Update implemented BIPs list (fanquake) -- #8029 `58725ba` Simplify OS X build notes (fanquake) -- #8143 `d46b8b5` comment nit: miners don't vote (instagibbs) -- #8136 `22e0b35` Log/report in 10% steps during VerifyDB (jonasschnelli) -- #8168 `d366185` util: Add ParseUInt32 and ParseUInt64 (laanwj) -- #8178 `f7b1bfc` Add git and github tips and tricks to developer notes (sipa) -- #8177 `67db011` developer notes: updates for C++11 (kazcw) -- #8229 `8ccdac1` [Doc] Update OS X build notes for 10.11 SDK (fanquake) -- #8233 `9f1807a` Mention Linux ARM executables in release process and notes (laanwj) -- #7540 `ff46dd4` Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY (btcdrak) -- #8289 `26316ff` bash-completion: Adapt for 0.12 and 0.13 (roques) -- #7453 `3dc3149` Missing patches from 0.12 (MarcoFalke) -- #7113 `54a550b` Switch to a more efficient rolling Bloom filter (sipa) -- #7257 `de9e5ea` Combine common error strings for different options so translations can be shared and reused (luke-jr) -- #7304 `b8f485c` [contrib] Add clang-format-diff.py (MarcoFalke) -- #7378 `e6f97ef` devtools: replace github-merge with python version (laanwj) -- #7395 `0893705` devtools: show pull and commit information in github-merge (laanwj) -- #7402 `6a5932b` devtools: github-merge get toplevel dir without extra whitespace (achow101) -- #7425 `20a408c` devtools: Fix utf-8 support in messages for github-merge (laanwj) -- #7632 `409f843` Delete outdated test-patches reference (Lewuathe) -- #7662 `386f438` remove unused NOBLKS_VERSION_{START,END} constants (rat4) -- #7737 `aa0d2b2` devtools: make github-merge.py use py3 (laanwj) -- #7781 `55db5f0` devtools: Auto-set branch to merge to in github-merge (laanwj) -- #7934 `f17032f` Improve rolling bloom filter performance and benchmark (sipa) -- #8004 `2efe38b` signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (catilac) -- #7713 `f6598df` Fixes for verify-commits script (petertodd) -- #8412 `8360d5b` libconsensus: Expose a flag for BIP112 (jtimon) + ... fill in here Credits ======= Thanks to everyone who directly contributed to this release: -- 21E14 -- accraze -- Adam Brown -- Alexander Regueiro -- Alex Morcos -- Alfie John -- Alice Wonder -- AlSzacrel -- Andrew Chow -- Andrés G. Aragoneses -- Bob McElrath -- BtcDrak -- calebogden -- Cédric Félizard -- Chirag Davé -- Chris Moore -- Chris Stewart -- Christian von Roques -- Chris Wheeler -- Cory Fields -- crowning- -- Daniel Cousens -- Daniel Kraft -- Denis Lukianov -- Elias Rohrer -- Elliot Olds -- Eric Shaw -- error10 -- Ethan Heilman -- face -- fanquake -- Francesco 'makevoid' Canessa -- fsb4000 -- Gavin Andresen -- gladoscc -- Gregory Maxwell -- Gregory Sanders -- instagibbs -- James O'Beirne -- Jannes Faber -- Jarret Dyrbye -- Jeremy Rand -- jloughry -- jmacwhyte -- Joao Fonseca -- Johnson Lau -- Jonas Nick -- Jonas Schnelli -- Jonathan Cross -- João Barbosa -- Jorge Timón -- Kaz Wesley -- Kefkius -- kirkalx -- Krzysztof Jurewicz -- Leviathn -- lewuathe -- Luke Dashjr -- Luv Khemani -- Marcel Krüger -- Marco Falke -- Mark Friedenbach -- Matt -- Matt Bogosian -- Matt Corallo -- Matthew English -- Matthew Zipkin -- mb300sd -- Mitchell Cash -- mrbandrews -- mruddy -- Murch -- Mustafa -- Nathaniel Mahieu -- Nicolas Dorier -- Patrick Strateman -- Paul Rabahy -- paveljanik -- Pavel Janík -- Pavel Vasin -- Pedro Branco -- Peter Todd -- Philip Kaufmann -- Pieter Wuille -- Prayag Verma -- ptschip -- Puru -- randy-waterhouse -- R E Broadley -- Rusty Russell -- Suhas Daftuar -- Suriyaa Kudo -- TheLazieR Yip -- Thomas Kerin -- Tom Harding -- Tyler Hardin -- UdjinM6 -- Warren Togami -- Will Binns -- Wladimir J. van der Laan -- Yuri Zhykin + ... fill in here As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 526d2b0472356a185bda316ab424e914ba56d9be Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 24 Aug 2016 19:21:27 +0200 Subject: [PATCH 044/302] [wallet] rpc: Drop misleading option Github-Pull: #8581 Rebased-From: fab5ecb7719063aa72751df1258dfa4cf4a9a4a9 --- doc/release-notes.md | 10 +++++++++- qa/rpc-tests/importprunedfunds.py | 35 +++++++++++++---------------------- src/wallet/rpcdump.cpp | 6 +----- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 77d35315ff7..019031aed77 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -41,7 +41,15 @@ Notable changes Example item -------------- -0.13.0 Change log +Low-level RPC changes +--------------------- + +- `importprunedfunds` only accepts two required arguments. Some versions accept + an optional third arg, which was always ignored. Make sure to never pass more + than two arguments. + + +0.13.1 Change log ================= Detailed release notes follow. This overview includes changes that affect diff --git a/qa/rpc-tests/importprunedfunds.py b/qa/rpc-tests/importprunedfunds.py index d86f51b7f3a..3287470c55c 100755 --- a/qa/rpc-tests/importprunedfunds.py +++ b/qa/rpc-tests/importprunedfunds.py @@ -20,14 +20,10 @@ def setup_network(self, split=False): self.is_network_split=False self.sync_all() - def run_test (self): - import time - begintime = int(time.time()) - + def run_test(self): print("Mining blocks...") self.nodes[0].generate(101) - # sync self.sync_all() # address @@ -72,7 +68,6 @@ def run_test (self): rawtxn2 = self.nodes[0].gettransaction(txnid2)['hex'] proof2 = self.nodes[0].gettxoutproof([txnid2]) - txnid3 = self.nodes[0].sendtoaddress(address3, 0.025) self.nodes[0].generate(1) rawtxn3 = self.nodes[0].gettransaction(txnid3)['hex'] @@ -82,28 +77,27 @@ def run_test (self): #Import with no affiliated address try: - result1 = self.nodes[1].importprunedfunds(rawtxn1, proof1, "") + self.nodes[1].importprunedfunds(rawtxn1, proof1) except JSONRPCException as e: assert('No addresses' in e.error['message']) else: assert(False) - balance1 = self.nodes[1].getbalance("", 0, True) assert_equal(balance1, Decimal(0)) #Import with affiliated address with no rescan - self.nodes[1].importaddress(address2, "", False) - result2 = self.nodes[1].importprunedfunds(rawtxn2, proof2, "") - balance2 = Decimal(self.nodes[1].getbalance("", 0, True)) + self.nodes[1].importaddress(address2, "add2", False) + result2 = self.nodes[1].importprunedfunds(rawtxn2, proof2) + balance2 = self.nodes[1].getbalance("add2", 0, True) assert_equal(balance2, Decimal('0.05')) #Import with private key with no rescan - self.nodes[1].importprivkey(address3_privkey, "", False) - result3 = self.nodes[1].importprunedfunds(rawtxn3, proof3, "") - balance3 = Decimal(self.nodes[1].getbalance("", 0, False)) + self.nodes[1].importprivkey(address3_privkey, "add3", False) + result3 = self.nodes[1].importprunedfunds(rawtxn3, proof3) + balance3 = self.nodes[1].getbalance("add3", 0, False) assert_equal(balance3, Decimal('0.025')) - balance3 = Decimal(self.nodes[1].getbalance("", 0, True)) + balance3 = self.nodes[1].getbalance("*", 0, True) assert_equal(balance3, Decimal('0.075')) #Addresses Test - after import @@ -118,7 +112,6 @@ def run_test (self): assert_equal(address_info['ismine'], True) #Remove transactions - try: self.nodes[1].removeprunedfunds(txnid1) except JSONRPCException as e: @@ -126,18 +119,16 @@ def run_test (self): else: assert(False) - - balance1 = Decimal(self.nodes[1].getbalance("", 0, True)) + balance1 = self.nodes[1].getbalance("*", 0, True) assert_equal(balance1, Decimal('0.075')) - self.nodes[1].removeprunedfunds(txnid2) - balance2 = Decimal(self.nodes[1].getbalance("", 0, True)) + balance2 = self.nodes[1].getbalance("*", 0, True) assert_equal(balance2, Decimal('0.025')) self.nodes[1].removeprunedfunds(txnid3) - balance3 = Decimal(self.nodes[1].getbalance("", 0, True)) + balance3 = self.nodes[1].getbalance("*", 0, True) assert_equal(balance3, Decimal('0.0')) if __name__ == '__main__': - ImportPrunedFundsTest ().main () + ImportPrunedFundsTest().main() diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 6647d3297fa..443441a36a0 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -257,6 +257,7 @@ UniValue importprunedfunds(const UniValue& params, bool fHelp) if (!EnsureWalletIsAvailable(fHelp)) return NullUniValue; + // 0.13.x: Silently accept up to 3 params, but ignore the third: if (fHelp || params.size() < 2 || params.size() > 3) throw runtime_error( "importprunedfunds\n" @@ -264,7 +265,6 @@ UniValue importprunedfunds(const UniValue& params, bool fHelp) "\nArguments:\n" "1. \"rawtransaction\" (string, required) A raw transaction in hex funding an already-existing address in wallet\n" "2. \"txoutproof\" (string, required) The hex output from gettxoutproof that contains the transaction\n" - "3. \"label\" (string, optional) An optional label\n" ); CTransaction tx; @@ -277,10 +277,6 @@ UniValue importprunedfunds(const UniValue& params, bool fHelp) CMerkleBlock merkleBlock; ssMB >> merkleBlock; - string strLabel = ""; - if (params.size() == 3) - strLabel = params[2].get_str(); - //Search partial merkle tree in proof for our transaction and index in valid block vector vMatch; vector vIndex; From 75f20652932361a176e72e2ba3477f4604810bb6 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 16 Aug 2016 11:16:21 +0200 Subject: [PATCH 045/302] build: Remove check for `openssl/ec.h` We don't use any elliptic curves from OpenSSL anymore, nor include this header anywhere but optionally in the tests of secp256k1 (which has its own autoconf setup). Reported by sinetek on IRC. --- configure.ac | 8 -------- 1 file changed, 8 deletions(-) diff --git a/configure.ac b/configure.ac index 19861d24c0b..01d20baeff2 100644 --- a/configure.ac +++ b/configure.ac @@ -861,14 +861,6 @@ AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$system_univalue = xno]) AC_SUBST(UNIVALUE_CFLAGS) AC_SUBST(UNIVALUE_LIBS) -CXXFLAGS_TEMP="$CXXFLAGS" -LIBS_TEMP="$LIBS" -CXXFLAGS="$CXXFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS" -LIBS="$LIBS $SSL_LIBS $CRYPTO_LIBS" -AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),) -CXXFLAGS="$CXXFLAGS_TEMP" -LIBS="$LIBS_TEMP" - BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path) AC_MSG_CHECKING([whether to build bitcoind]) From 1db3352cc663f6a25a39813c763a2f6263f55e6d Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 18 Aug 2016 16:58:04 +0200 Subject: [PATCH 046/302] qt: Fix random segfault when closing "Choose data directory" dialog The `pickDataDirectory()` function was calling `exit(0)` to quit the application when the user closes the dialog without choosing a data directory. This is a bad idea because a background thread is created (to check free space on the drive of the currently selected datadir). The thread is not stopped and unwound properly, resulting in a potential race condition somewhere deep in Qt. So replace the `exit()` by a boolean return value, and let the stack unwind normally. --- src/qt/bitcoin.cpp | 3 ++- src/qt/intro.cpp | 7 ++++--- src/qt/intro.h | 5 ++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 64b5c83d72a..430e6dd0e8d 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -578,7 +578,8 @@ int main(int argc, char *argv[]) /// 5. Now that settings and translations are available, ask user for data directory // User language is set up: pick a data directory - Intro::pickDataDirectory(); + if (!Intro::pickDataDirectory()) + return 0; /// 6. Determine availability of data directory and parse bitcoin.conf /// - Do not call GetDataDir(true) before this step finishes diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 6d6af54290f..6a5740e21d3 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -165,14 +165,14 @@ QString Intro::getDefaultDataDirectory() return GUIUtil::boostPathToQString(GetDefaultDataDir()); } -void Intro::pickDataDirectory() +bool Intro::pickDataDirectory() { namespace fs = boost::filesystem; QSettings settings; /* If data directory provided on command line, no need to look at settings or show a picking dialog */ if(!GetArg("-datadir", "").empty()) - return; + return true; /* 1) Default data directory for operating system */ QString dataDir = getDefaultDataDirectory(); /* 2) Allow QSettings to override default dir */ @@ -190,7 +190,7 @@ void Intro::pickDataDirectory() if(!intro.exec()) { /* Cancel clicked */ - exit(0); + return false; } dataDir = intro.getDataDirectory(); try { @@ -211,6 +211,7 @@ void Intro::pickDataDirectory() */ if(dataDir != getDefaultDataDirectory()) SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting + return true; } void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable) diff --git a/src/qt/intro.h b/src/qt/intro.h index 9e2e96dc9ec..ee768a7ad8d 100644 --- a/src/qt/intro.h +++ b/src/qt/intro.h @@ -35,10 +35,13 @@ class Intro : public QDialog /** * Determine data directory. Let the user choose if the current one doesn't exist. * + * @returns true if a data directory was selected, false if the user cancelled the selection + * dialog. + * * @note do NOT call global GetDataDir() before calling this function, this * will cause the wrong path to be cached. */ - static void pickDataDirectory(); + static bool pickDataDirectory(); /** * Determine default data directory for operating system. From 2611ad79a5d53e2ce1535b342a9b72c2888a6c3f Mon Sep 17 00:00:00 2001 From: Ethan Heilman Date: Fri, 17 Jun 2016 00:10:07 -0400 Subject: [PATCH 047/302] Added feeler connections increasing good addrs in the tried table. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests if addresses are online or offline by briefly connecting to them. These short lived connections are referred to as feeler connections. Feeler connections are designed to increase the number of fresh online addresses in tried by selecting and connecting to addresses in new. One feeler connection is attempted on average once every two minutes. This change was suggested as Countermeasure 4 in Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman, Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report 2015/263. March 2015. --- src/main.cpp | 6 +++++ src/net.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++------- src/net.h | 5 ++++- src/test/net_tests.cpp | 22 +++++++++++++++++++ 4 files changed, 83 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7ddf52fc550..e3be69ad24c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4917,6 +4917,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (strCommand == NetMsgType::VERSION) { + // Feeler connections exist only to verify if address is online. + if (pfrom->fFeeler) { + assert(pfrom->fInbound == false); + pfrom->fDisconnect = true; + } + // Each connection can only send one version message if (pfrom->nVersion != 0) { diff --git a/src/net.cpp b/src/net.cpp index 4cbc43e4d84..eb2c38dd102 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -42,6 +42,9 @@ // Dump addresses to peers.dat and banlist.dat every 15 minutes (900s) #define DUMP_ADDRESSES_INTERVAL 900 +// We add a random period time (0 to 1 seconds) to feeler connections to prevent synchronization. +#define FEELER_SLEEP_WINDOW 1 + #if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL) #define MSG_NOSIGNAL 0 #endif @@ -60,6 +63,7 @@ namespace { const int MAX_OUTBOUND_CONNECTIONS = 8; + const int MAX_FEELER_CONNECTIONS = 1; struct ListenSocket { SOCKET socket; @@ -1016,7 +1020,8 @@ static void AcceptConnection(const ListenSocket& hListenSocket) { SOCKET hSocket = accept(hListenSocket.socket, (struct sockaddr*)&sockaddr, &len); CAddress addr; int nInbound = 0; - int nMaxInbound = nMaxConnections - MAX_OUTBOUND_CONNECTIONS; + int nMaxInbound = nMaxConnections - (MAX_OUTBOUND_CONNECTIONS + MAX_FEELER_CONNECTIONS); + assert(nMaxInbound > 0); if (hSocket != INVALID_SOCKET) if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr)) @@ -1609,6 +1614,9 @@ void ThreadOpenConnections() // Initiate network connections int64_t nStart = GetTime(); + + // Minimum time before next feeler connection (in microseconds). + int64_t nNextFeeler = PoissonNextSend(nStart*1000*1000, FEELER_INTERVAL); while (true) { ProcessOneShot(); @@ -1646,13 +1654,36 @@ void ThreadOpenConnections() } } } + assert(nOutbound <= (MAX_OUTBOUND_CONNECTIONS + MAX_FEELER_CONNECTIONS)); - int64_t nANow = GetAdjustedTime(); + // Feeler Connections + // + // Design goals: + // * Increase the number of connectable addresses in the tried table. + // + // Method: + // * Choose a random address from new and attempt to connect to it if we can connect + // successfully it is added to tried. + // * Start attempting feeler connections only after node finishes making outbound + // connections. + // * Only make a feeler connection once every few minutes. + // + bool fFeeler = false; + if (nOutbound >= MAX_OUTBOUND_CONNECTIONS) { + int64_t nTime = GetTimeMicros(); // The current time right now (in microseconds). + if (nTime > nNextFeeler) { + nNextFeeler = PoissonNextSend(nTime, FEELER_INTERVAL); + fFeeler = true; + } else { + continue; + } + } + int64_t nANow = GetAdjustedTime(); int nTries = 0; while (true) { - CAddrInfo addr = addrman.Select(); + CAddrInfo addr = addrman.Select(fFeeler); // if we selected an invalid address, restart if (!addr.IsValid() || setConnected.count(addr.GetGroup()) || IsLocal(addr)) @@ -1688,8 +1719,17 @@ void ThreadOpenConnections() break; } - if (addrConnect.IsValid()) - OpenNetworkConnection(addrConnect, (int)setConnected.size() >= std::min(nMaxConnections - 1, 2), &grant); + if (addrConnect.IsValid()) { + + if (fFeeler) { + // Add small amount of random noise before connection to avoid synchronization. + int randsleep = GetRandInt(FEELER_SLEEP_WINDOW * 1000); + MilliSleep(randsleep); + LogPrint("net", "Making feeler connection to %s\n", addrConnect.ToString()); + } + + OpenNetworkConnection(addrConnect, (int)setConnected.size() >= std::min(nMaxConnections - 1, 2), &grant, NULL, false, fFeeler); + } } } @@ -1771,7 +1811,7 @@ void ThreadOpenAddedConnections() } // if successful, this moves the passed grant to the constructed node -bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot) +bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot, bool fFeeler) { // // Initiate outbound network connection @@ -1795,6 +1835,8 @@ bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSem pnode->fNetworkNode = true; if (fOneShot) pnode->fOneShot = true; + if (fFeeler) + pnode->fFeeler = true; return true; } @@ -2054,7 +2096,7 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler) if (semOutbound == NULL) { // initialize semaphore - int nMaxOutbound = std::min(MAX_OUTBOUND_CONNECTIONS, nMaxConnections); + int nMaxOutbound = std::min((MAX_OUTBOUND_CONNECTIONS + MAX_FEELER_CONNECTIONS), nMaxConnections); semOutbound = new CSemaphore(nMaxOutbound); } @@ -2096,7 +2138,7 @@ bool StopNode() LogPrintf("StopNode()\n"); MapPort(false); if (semOutbound) - for (int i=0; ipost(); if (fAddressesInitialized) @@ -2437,6 +2479,7 @@ CNode::CNode(SOCKET hSocketIn, const CAddress& addrIn, const std::string& addrNa fWhitelisted = false; fOneShot = false; fClient = false; // set by version message + fFeeler = false; fInbound = fInboundIn; fNetworkNode = false; fSuccessfullyConnected = false; diff --git a/src/net.h b/src/net.h index 41315fc9b9f..63bb2c2ecfb 100644 --- a/src/net.h +++ b/src/net.h @@ -41,6 +41,8 @@ namespace boost { static const int PING_INTERVAL = 2 * 60; /** Time after which to disconnect, after waiting for a ping response (or inactivity). */ static const int TIMEOUT_INTERVAL = 20 * 60; +/** Run the feeler connection loop once every 2 minutes or 120 seconds. **/ +static const int FEELER_INTERVAL = 120; /** The maximum number of entries in an 'inv' protocol message */ static const unsigned int MAX_INV_SZ = 50000; /** The maximum number of new addresses to accumulate before announcing. */ @@ -89,7 +91,7 @@ CNode* FindNode(const CSubNet& subNet); CNode* FindNode(const std::string& addrName); CNode* FindNode(const CService& ip); CNode* FindNode(const NodeId id); //TODO: Remove this -bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false); +bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false); void MapPort(bool fUseUPnP); unsigned short GetListenPort(); bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false); @@ -350,6 +352,7 @@ class CNode // the network or wire types and the cleaned string used when displayed or logged. std::string strSubVer, cleanSubVer; bool fWhitelisted; // This peer can bypass DoS banning. + bool fFeeler; // If true this node is being used as a short lived feeler. bool fOneShot; bool fClient; bool fInbound; diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index d005d6a1633..72bca9bbb8f 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -142,4 +142,26 @@ BOOST_AUTO_TEST_CASE(caddrdb_read_corrupted) BOOST_CHECK(addrman2.size() == 0); } +BOOST_AUTO_TEST_CASE(cnode_simple_test) +{ + SOCKET hSocket = INVALID_SOCKET; + + in_addr ipv4Addr; + ipv4Addr.s_addr = 0xa0b0c001; + + CAddress addr = CAddress(CService(ipv4Addr, 7777), NODE_NETWORK); + std::string pszDest = ""; + bool fInboundIn = false; + + // Test that fFeeler is false by default. + CNode* pnode1 = new CNode(hSocket, addr, pszDest, fInboundIn); + BOOST_CHECK(pnode1->fInbound == false); + BOOST_CHECK(pnode1->fFeeler == false); + + fInboundIn = true; + CNode* pnode2 = new CNode(hSocket, addr, pszDest, fInboundIn); + BOOST_CHECK(pnode2->fInbound == true); + BOOST_CHECK(pnode2->fFeeler == false); +} + BOOST_AUTO_TEST_SUITE_END() From f1c0d78b2d9cbd671413af98e7b081a3b71113ad Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Mon, 22 Feb 2016 16:21:27 +0100 Subject: [PATCH 048/302] [Qt] show network/chain errors in the GUI --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e3be69ad24c..6e784c508d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4647,6 +4647,7 @@ std::string GetWarnings(const std::string& strFor) string strStatusBar; string strRPC; string strGUI; + const string uiAlertSeperator = "


"; if (!CLIENT_VERSION_IS_RELEASE) { strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"; @@ -4659,18 +4660,19 @@ std::string GetWarnings(const std::string& strFor) // Misc warnings like out of disk space and clock is wrong if (strMiscWarning != "") { - strStatusBar = strGUI = strMiscWarning; + strStatusBar = strMiscWarning; + strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + strMiscWarning; } if (fLargeWorkForkFound) { strStatusBar = strRPC = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."; - strGUI = _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."); + strGUI += strGUI.empty() ? "" : uiAlertSeperator + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."); } else if (fLargeWorkInvalidChainFound) { strStatusBar = strRPC = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."; - strGUI = _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); + strGUI += strGUI.empty() ? "" : uiAlertSeperator + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); } if (strFor == "gui") From 0e6d7535845f98a080078525c4e3f4f9dce0ec22 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 29 Aug 2016 10:33:36 +0200 Subject: [PATCH 049/302] [doc] build: Mention curl --- doc/build-unix.md | 5 +++-- doc/build-windows.md | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index bd89978cc2a..62e3e793e97 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -293,9 +293,10 @@ These steps can be performed on, for example, an Ubuntu VM. The depends system will also work on other Linux distributions, however the commands for installing the toolchain will be different. -First install the toolchain: +Make sure you install the build requirements mentioned above. +Then, install the toolchain and curl: - sudo apt-get install g++-arm-linux-gnueabihf + sudo apt-get install g++-arm-linux-gnueabihf curl To build executables for ARM: diff --git a/doc/build-windows.md b/doc/build-windows.md index 2b9233d1e14..129774491b2 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -16,9 +16,11 @@ These steps can be performed on, for example, an Ubuntu VM. The depends system will also work on other Linux distributions, however the commands for installing the toolchain will be different. -First install the toolchains: +Make sure you install the build requirements mentioned in +[build-unix.md](/doc/build-unix.md). +Then, install the toolchains and curl: - sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev + sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev curl To build executables for Windows 32-bit: From b09e13cb6f3ca3b478afc6dea161463247ac5146 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 26 Aug 2016 16:26:02 +0200 Subject: [PATCH 050/302] build: Updates for OpenBSD - LevelDB platform was not guessed correctly (it ended up defining `-DOS_OPENBSD59` instead of `-DOS_OPENBSD`) - On OpenBSD there is no convenience link from `python3.5` to `python3`: add detection for other python interpreter names. - If it has to guess the LevelDB OS, print a autoconf warning so that the user can check. --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 01d20baeff2..7b66b61eb17 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,8 @@ AC_PATH_TOOL(STRIP, strip) AC_PATH_TOOL(GCOV, gcov) AC_PATH_PROG(LCOV, lcov) AC_PATH_PROG(JAVA, java) -AC_PATH_PROGS([PYTHON], [python3 python2.7 python2 python]) +dnl Python 3.x is supported from 3.4 on (see https://github.com/bitcoin/bitcoin/issues/7893) +AC_PATH_PROGS([PYTHON], [python3.6 python3.5 python3.4 python3 python2.7 python2 python]) AC_PATH_PROG(GENHTML, genhtml) AC_PATH_PROG([GIT], [git]) AC_PATH_PROG(CCACHE,ccache) @@ -366,8 +367,15 @@ case $host in TARGET_OS=linux LEVELDB_TARGET_FLAGS="-DOS_LINUX" ;; + *freebsd*) + LEVELDB_TARGET_FLAGS="-DOS_FREEBSD" + ;; + *openbsd*) + LEVELDB_TARGET_FLAGS="-DOS_OPENBSD" + ;; *) OTHER_OS=`echo ${host_os} | awk '{print toupper($0)}'` + AC_MSG_WARN([Guessing LevelDB OS as OS_${OTHER_OS}, please check whether this is correct, if not add an entry to configure.ac.]) LEVELDB_TARGET_FLAGS="-DOS_${OTHER_OS}" ;; esac From 32d75a7ffc718eff291978bc8c9406037e327c7e Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 26 Aug 2016 16:26:09 +0200 Subject: [PATCH 051/302] doc: Update build-openbsd for 0.13.0+ and OpenBSD 5.9 - Python 3 now supported. - Bump boost version to 1.61 - one boost patch no longer needed. - All checked with OpenBSD 5.9, except for the clang part, I left this as-is for someone adventurous. - Mention overriding resource limits, OpenBSD's default ulimit does not suffice for building Bitcoin Core with gcc 4.9.3. --- doc/build-openbsd.md | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md index d923301467a..55283d6dcea 100644 --- a/doc/build-openbsd.md +++ b/doc/build-openbsd.md @@ -1,6 +1,6 @@ OpenBSD build guide ====================== -(updated for OpenBSD 5.7) +(updated for OpenBSD 5.9) This guide describes how to build bitcoind and command-line utilities on OpenBSD. @@ -15,11 +15,10 @@ Run the following as root to install the base dependencies for building: pkg_add gmake libtool libevent pkg_add autoconf # (select highest version, e.g. 2.69) pkg_add automake # (select highest version, e.g. 1.15) -pkg_add python # (select version 2.7.x, not 3.x) -ln -sf /usr/local/bin/python2.7 /usr/local/bin/python2 +pkg_add python # (select highest version, e.g. 3.5) ``` -The default C++ compiler that comes with OpenBSD 5.7 is g++ 4.2. This version is old (from 2007), and is not able to compile the current version of Bitcoin Core. It is possible to patch it up to compile, but with the planned transition to C++11 this is a losing battle. So here we will be installing a newer compiler. +The default C++ compiler that comes with OpenBSD 5.9 is g++ 4.2. This version is old (from 2007), and is not able to compile the current version of Bitcoin Core, primarily as it has no C++11 support, but even before there were issues. So here we will be installing a newer compiler. GCC ------- @@ -27,7 +26,7 @@ GCC You can install a newer version of gcc with: ```bash -pkg_add g++ # (select newest 4.x version, e.g. 4.9.2) +pkg_add g++ # (select newest 4.x version, e.g. 4.9.3) ``` This compiler will not overwrite the system compiler, it will be installed as `egcc` and `eg++` in `/usr/local/bin`. @@ -49,18 +48,15 @@ BOOST_PREFIX="${BITCOIN_ROOT}/boost" mkdir -p $BOOST_PREFIX # Fetch the source and verify that it is not tampered with -wget http://heanet.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2 -echo '727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca boost_1_59_0.tar.bz2' | sha256 -c -# MUST output: (SHA256) boost_1_59_0.tar.bz2: OK -tar -xjf boost_1_59_0.tar.bz2 +curl -o boost_1_61_0.tar.bz2 http://heanet.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.bz2 +echo 'a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640 boost_1_61_0.tar.bz2' | sha256 -c +# MUST output: (SHA256) boost_1_61_0.tar.bz2: OK +tar -xjf boost_1_61_0.tar.bz2 -# Boost 1.59 needs two small patches for OpenBSD -cd boost_1_59_0 +# Boost 1.61 needs one small patch for OpenBSD +cd boost_1_61_0 # Also here: https://gist.githubusercontent.com/laanwj/bf359281dc319b8ff2e1/raw/92250de8404b97bb99d72ab898f4a8cb35ae1ea3/patch-boost_test_impl_execution_monitor_ipp.patch patch -p0 < /usr/ports/devel/boost/patches/patch-boost_test_impl_execution_monitor_ipp -# https://github.com/boostorg/filesystem/commit/90517e459681790a091566dce27ca3acabf9a70c -sed 's/__OPEN_BSD__/__OpenBSD__/g' < libs/filesystem/src/path.cpp > libs/filesystem/src/path.cpp.tmp -mv libs/filesystem/src/path.cpp.tmp libs/filesystem/src/path.cpp # Build w/ minimum configuration necessary for bitcoin echo 'using gcc : : eg++ : "-fvisibility=hidden -fPIC" "" "ar" "strip" "ranlib" "" : ;' > user-config.jam @@ -84,7 +80,7 @@ BDB_PREFIX="${BITCOIN_ROOT}/db4" mkdir -p $BDB_PREFIX # Fetch the source and verify that it is not tampered with -wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' +curl -o db-4.8.30.NC.tar.gz 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256 -c # MUST output: (SHA256) db-4.8.30.NC.tar.gz: OK tar -xzf db-4.8.30.NC.tar.gz @@ -93,9 +89,25 @@ tar -xzf db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix/ # Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX CC=egcc CXX=eg++ CPP=ecpp -make install +make install # do NOT use -jX, this is broken ``` +### Resource limits + +The standard ulimit restrictions in OpenBSD are very strict: + + data(kbytes) 1572864 + +This is, unfortunately, no longer enough to compile some `.cpp` files in the project, +at least with gcc 4.9.3 (see issue https://github.com/bitcoin/bitcoin/issues/6658). +If your user is in the `staff` group the limit can be raised with: + + ulimit -d 3000000 + +The change will only affect the current shell and processes spawned by it. To +make the change system-wide, change `datasize-cur` and `datasize-max` in +`/etc/login.conf`, and reboot. + ### Building Bitcoin Core **Important**: use `gmake`, not `make`. The non-GNU `make` will exit with a horrible error. @@ -123,7 +135,7 @@ To configure without wallet: Build and run the tests: ```bash -gmake +gmake # can use -jX here for parallelism gmake check ``` From a9874310c0f67c80a1f04854c5c9ed154e1bbf97 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 29 Jun 2016 23:38:33 +0200 Subject: [PATCH 052/302] [util] CopyrightHolders: Check for untranslated substitution Also, remove check which is always true --- src/util.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 9a9209c6214..ee12f2b4434 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -801,11 +801,10 @@ int GetNumCores() std::string CopyrightHolders(const std::string& strPrefix) { - std::string strCopyrightHolders = strPrefix + _(COPYRIGHT_HOLDERS); - if (strCopyrightHolders.find("%s") != strCopyrightHolders.npos) { - strCopyrightHolders = strprintf(strCopyrightHolders, _(COPYRIGHT_HOLDERS_SUBSTITUTION)); - } - if (strCopyrightHolders.find("Bitcoin Core developers") == strCopyrightHolders.npos) { + std::string strCopyrightHolders = strPrefix + strprintf(_(COPYRIGHT_HOLDERS), _(COPYRIGHT_HOLDERS_SUBSTITUTION)); + + // Check for untranslated substitution to make sure Bitcoin Core copyright is not removed by accident + if (strprintf(COPYRIGHT_HOLDERS, COPYRIGHT_HOLDERS_SUBSTITUTION).find("Bitcoin Core") == std::string::npos) { strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers"; } return strCopyrightHolders; From b8c79a057c48c871a5e48bdcdf600fbfe68f656b Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 16 Aug 2016 15:35:45 +0200 Subject: [PATCH 053/302] Precompute sighashes Original version by Nicolas Dorier. Precomputing version by Pieter Wuille. --- src/main.cpp | 22 ++++++----- src/main.h | 9 +++-- src/script/bitcoinconsensus.cpp | 4 +- src/script/interpreter.cpp | 54 +++++++++++++++++-------- src/script/interpreter.h | 13 +++++- src/script/sigcache.h | 2 +- src/test/script_P2SH_tests.cpp | 6 ++- src/test/transaction_tests.cpp | 87 ++++++++++++++++++++++++++++++++++++++++- src/txmempool.cpp | 6 ++- 9 files changed, 163 insertions(+), 40 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6e784c508d7..5a9691474f9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1497,12 +1497,13 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // Check against previous transactions // This is done last to help prevent CPU exhaustion denial-of-service attacks. - if (!CheckInputs(tx, state, view, true, scriptVerifyFlags, true)) { + PrecomputedTransactionData txdata(tx); + if (!CheckInputs(tx, state, view, true, scriptVerifyFlags, true, txdata)) { // SCRIPT_VERIFY_CLEANSTACK requires SCRIPT_VERIFY_WITNESS, so we // need to turn both off, and compare against just turning off CLEANSTACK // to see if the failure is specifically due to witness validation. - if (CheckInputs(tx, state, view, true, scriptVerifyFlags & ~(SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_CLEANSTACK), true) && - !CheckInputs(tx, state, view, true, scriptVerifyFlags & ~SCRIPT_VERIFY_CLEANSTACK, true)) { + if (CheckInputs(tx, state, view, true, scriptVerifyFlags & ~(SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_CLEANSTACK), true, txdata) && + !CheckInputs(tx, state, view, true, scriptVerifyFlags & ~SCRIPT_VERIFY_CLEANSTACK, true, txdata)) { // Only the witness is wrong, so the transaction itself may be fine. state.SetCorruptionPossible(); } @@ -1518,7 +1519,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // There is a similar check in CreateNewBlock() to prevent creating // invalid blocks, however allowing such transactions into the mempool // can be exploited as a DoS attack. - if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true)) + if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true, txdata)) { return error("%s: BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s, %s", __func__, hash.ToString(), FormatStateMessage(state)); @@ -1915,7 +1916,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight) bool CScriptCheck::operator()() { const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; const CScriptWitness *witness = (nIn < ptxTo->wit.vtxinwit.size()) ? &ptxTo->wit.vtxinwit[nIn].scriptWitness : NULL; - if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore), &error)) { + if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error)) { return false; } return true; @@ -1974,7 +1975,7 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins } }// namespace Consensus -bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, std::vector *pvChecks) +bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, PrecomputedTransactionData& txdata, std::vector *pvChecks) { if (!tx.IsCoinBase()) { @@ -2001,7 +2002,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi assert(coins); // Verify signature - CScriptCheck check(*coins, tx, i, flags, cacheStore); + CScriptCheck check(*coins, tx, i, flags, cacheStore, &txdata); if (pvChecks) { pvChecks->push_back(CScriptCheck()); check.swap(pvChecks->back()); @@ -2014,7 +2015,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi // avoid splitting the network between upgraded and // non-upgraded nodes. CScriptCheck check2(*coins, tx, i, - flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore); + flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore, &txdata); if (check2()) return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError()))); } @@ -2412,6 +2413,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin std::vector > vPos; vPos.reserve(block.vtx.size()); blockundo.vtxundo.reserve(block.vtx.size() - 1); + std::vector txdata; + txdata.reserve(block.vtx.size()); // Required so that pointers to individual PrecomputedTransactionData don't get invalidated for (unsigned int i = 0; i < block.vtx.size(); i++) { const CTransaction &tx = block.vtx[i]; @@ -2458,13 +2461,14 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin return state.DoS(100, error("ConnectBlock(): too many sigops"), REJECT_INVALID, "bad-blk-sigops"); + txdata.emplace_back(tx); if (!tx.IsCoinBase()) { nFees += view.GetValueIn(tx)-tx.GetValueOut(); std::vector vChecks; bool fCacheResults = fJustCheck; /* Don't cache results if we're actually connecting blocks (still consult the cache, though) */ - if (!CheckInputs(tx, state, view, fScriptChecks, flags, fCacheResults, nScriptCheckThreads ? &vChecks : NULL)) + if (!CheckInputs(tx, state, view, fScriptChecks, flags, fCacheResults, txdata[i], nScriptCheckThreads ? &vChecks : NULL)) return error("ConnectBlock(): CheckInputs on %s failed with %s", tx.GetHash().ToString(), FormatStateMessage(state)); control.Add(vChecks); diff --git a/src/main.h b/src/main.h index 631dc00d05d..cbce34290a2 100644 --- a/src/main.h +++ b/src/main.h @@ -39,6 +39,7 @@ class CTxMemPool; class CValidationInterface; class CValidationState; +struct PrecomputedTransactionData; struct CNodeStateStats; struct LockPoints; @@ -347,7 +348,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i * instead of being performed inline. */ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, bool fScriptChecks, - unsigned int flags, bool cacheStore, std::vector *pvChecks = NULL); + unsigned int flags, bool cacheStore, PrecomputedTransactionData& txdata, std::vector *pvChecks = NULL); /** Apply the effects of this transaction on the UTXO set represented by view */ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight); @@ -408,12 +409,13 @@ class CScriptCheck unsigned int nFlags; bool cacheStore; ScriptError error; + PrecomputedTransactionData *txdata; public: CScriptCheck(): amount(0), ptxTo(0), nIn(0), nFlags(0), cacheStore(false), error(SCRIPT_ERR_UNKNOWN_ERROR) {} - CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn) : + CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn, PrecomputedTransactionData* txdataIn) : scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey), amount(txFromIn.vout[txToIn.vin[nInIn].prevout.n].nValue), - ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR) { } + ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR), txdata(txdataIn) { } bool operator()(); @@ -425,6 +427,7 @@ class CScriptCheck std::swap(nFlags, check.nFlags); std::swap(cacheStore, check.cacheStore); std::swap(error, check.error); + std::swap(txdata, check.txdata); } ScriptError GetScriptError() const { return error; } diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp index 62fd9031f85..b629f4278ba 100644 --- a/src/script/bitcoinconsensus.cpp +++ b/src/script/bitcoinconsensus.cpp @@ -84,8 +84,8 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP // Regardless of the verification result, the tx did not error. set_error(err, bitcoinconsensus_ERR_OK); - - return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), nIn < tx.wit.vtxinwit.size() ? &tx.wit.vtxinwit[nIn].scriptWitness : NULL, flags, TransactionSignatureChecker(&tx, nIn, amount), NULL); + PrecomputedTransactionData txdata(tx); + return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), nIn < tx.wit.vtxinwit.size() ? &tx.wit.vtxinwit[nIn].scriptWitness : NULL, flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), NULL); } catch (const std::exception&) { return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing } diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index bc027e9f0c1..47ea261e310 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1108,9 +1108,40 @@ class CTransactionSignatureSerializer { } }; +uint256 GetPrevoutHash(const CTransaction& txTo) { + CHashWriter ss(SER_GETHASH, 0); + for (unsigned int n = 0; n < txTo.vin.size(); n++) { + ss << txTo.vin[n].prevout; + } + return ss.GetHash(); +} + +uint256 GetSequenceHash(const CTransaction& txTo) { + CHashWriter ss(SER_GETHASH, 0); + for (unsigned int n = 0; n < txTo.vin.size(); n++) { + ss << txTo.vin[n].nSequence; + } + return ss.GetHash(); +} + +uint256 GetOutputsHash(const CTransaction& txTo) { + CHashWriter ss(SER_GETHASH, 0); + for (unsigned int n = 0; n < txTo.vout.size(); n++) { + ss << txTo.vout[n]; + } + return ss.GetHash(); +} + } // anon namespace -uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion) +PrecomputedTransactionData::PrecomputedTransactionData(const CTransaction& txTo) +{ + hashPrevouts = GetPrevoutHash(txTo); + hashSequence = GetSequenceHash(txTo); + hashOutputs = GetOutputsHash(txTo); +} + +uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache) { if (sigversion == SIGVERSION_WITNESS_V0) { uint256 hashPrevouts; @@ -1118,27 +1149,16 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig uint256 hashOutputs; if (!(nHashType & SIGHASH_ANYONECANPAY)) { - CHashWriter ss(SER_GETHASH, 0); - for (unsigned int n = 0; n < txTo.vin.size(); n++) { - ss << txTo.vin[n].prevout; - } - hashPrevouts = ss.GetHash(); // TODO: cache this value for all signatures in a transaction + hashPrevouts = cache ? cache->hashPrevouts : GetPrevoutHash(txTo); } if (!(nHashType & SIGHASH_ANYONECANPAY) && (nHashType & 0x1f) != SIGHASH_SINGLE && (nHashType & 0x1f) != SIGHASH_NONE) { - CHashWriter ss(SER_GETHASH, 0); - for (unsigned int n = 0; n < txTo.vin.size(); n++) { - ss << txTo.vin[n].nSequence; - } - hashSequence = ss.GetHash(); // TODO: cache this value for all signatures in a transaction + hashSequence = cache ? cache->hashSequence : GetSequenceHash(txTo); } + if ((nHashType & 0x1f) != SIGHASH_SINGLE && (nHashType & 0x1f) != SIGHASH_NONE) { - CHashWriter ss(SER_GETHASH, 0); - for (unsigned int n = 0; n < txTo.vout.size(); n++) { - ss << txTo.vout[n]; - } - hashOutputs = ss.GetHash(); // TODO: cache this value for all signatures in a transaction + hashOutputs = cache ? cache->hashOutputs : GetOutputsHash(txTo); } else if ((nHashType & 0x1f) == SIGHASH_SINGLE && nIn < txTo.vout.size()) { CHashWriter ss(SER_GETHASH, 0); ss << txTo.vout[nIn]; @@ -1209,7 +1229,7 @@ bool TransactionSignatureChecker::CheckSig(const vector& vchSigIn int nHashType = vchSig.back(); vchSig.pop_back(); - uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion); + uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion, this->txdata); if (!VerifySignature(vchSig, pubkey, sighash)) return false; diff --git a/src/script/interpreter.h b/src/script/interpreter.h index bd2f2116636..e5d7865cd3d 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -98,13 +98,20 @@ enum bool CheckSignatureEncoding(const std::vector &vchSig, unsigned int flags, ScriptError* serror); +struct PrecomputedTransactionData +{ + uint256 hashPrevouts, hashSequence, hashOutputs; + + PrecomputedTransactionData(const CTransaction& tx); +}; + enum SigVersion { SIGVERSION_BASE = 0, SIGVERSION_WITNESS_V0 = 1, }; -uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion); +uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache = NULL); class BaseSignatureChecker { @@ -133,12 +140,14 @@ class TransactionSignatureChecker : public BaseSignatureChecker const CTransaction* txTo; unsigned int nIn; const CAmount amount; + const PrecomputedTransactionData* txdata; protected: virtual bool VerifySignature(const std::vector& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const; public: - TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn) : txTo(txToIn), nIn(nInIn), amount(amountIn) {} + TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(NULL) {} + TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, const PrecomputedTransactionData& txdataIn) : txTo(txToIn), nIn(nInIn), amount(amountIn), txdata(&txdataIn) {} bool CheckSig(const std::vector& scriptSig, const std::vector& vchPubKey, const CScript& scriptCode, SigVersion sigversion) const; bool CheckLockTime(const CScriptNum& nLockTime) const; bool CheckSequence(const CScriptNum& nSequence) const; diff --git a/src/script/sigcache.h b/src/script/sigcache.h index 050bf8cc422..44551ec2bc4 100644 --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -22,7 +22,7 @@ class CachingTransactionSignatureChecker : public TransactionSignatureChecker bool store; public: - CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amount, bool storeIn) : TransactionSignatureChecker(txToIn, nInIn, amount), store(storeIn) {} + CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amount, bool storeIn, PrecomputedTransactionData& txdataIn) : TransactionSignatureChecker(txToIn, nInIn, amount, txdataIn), store(storeIn) {} bool VerifySignature(const std::vector& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const; }; diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index 5224b57ca44..1a01593a8e1 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -107,18 +107,20 @@ BOOST_AUTO_TEST_CASE(sign) } // All of the above should be OK, and the txTos have valid signatures // Check to make sure signature verification fails if we use the wrong ScriptSig: - for (int i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { + PrecomputedTransactionData txdata(txTo[i]); for (int j = 0; j < 8; j++) { CScript sigSave = txTo[i].vin[0].scriptSig; txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig; - bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, false)(); + bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, false, &txdata)(); if (i == j) BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j)); else BOOST_CHECK_MESSAGE(!sigOK, strprintf("VerifySignature %d %d", i, j)); txTo[i].vin[0].scriptSig = sigSave; } + } } BOOST_AUTO_TEST_CASE(norecurse) diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index fd4f174b40c..b5af400bc54 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -7,6 +7,7 @@ #include "test/test_bitcoin.h" #include "clientversion.h" +#include "checkqueue.h" #include "consensus/validation.h" #include "core_io.h" #include "key.h" @@ -153,6 +154,7 @@ BOOST_AUTO_TEST_CASE(tx_valid) BOOST_CHECK_MESSAGE(CheckTransaction(tx, state), strTest); BOOST_CHECK(state.IsValid()); + PrecomputedTransactionData txdata(tx); for (unsigned int i = 0; i < tx.vin.size(); i++) { if (!mapprevOutScriptPubKeys.count(tx.vin[i].prevout)) @@ -168,7 +170,7 @@ BOOST_AUTO_TEST_CASE(tx_valid) unsigned int verify_flags = ParseScriptFlags(test[2].get_str()); const CScriptWitness *witness = (i < tx.wit.vtxinwit.size()) ? &tx.wit.vtxinwit[i].scriptWitness : NULL; BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], - witness, verify_flags, TransactionSignatureChecker(&tx, i, amount), &err), + witness, verify_flags, TransactionSignatureChecker(&tx, i, amount, txdata), &err), strTest); BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err)); } @@ -237,6 +239,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid) CValidationState state; fValid = CheckTransaction(tx, state) && state.IsValid(); + PrecomputedTransactionData txdata(tx); for (unsigned int i = 0; i < tx.vin.size() && fValid; i++) { if (!mapprevOutScriptPubKeys.count(tx.vin[i].prevout)) @@ -252,7 +255,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid) } const CScriptWitness *witness = (i < tx.wit.vtxinwit.size()) ? &tx.wit.vtxinwit[i].scriptWitness : NULL; fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], - witness, verify_flags, TransactionSignatureChecker(&tx, i, amount), &err); + witness, verify_flags, TransactionSignatureChecker(&tx, i, amount, txdata), &err); } BOOST_CHECK_MESSAGE(!fValid, strTest); BOOST_CHECK_MESSAGE(err != SCRIPT_ERR_OK, ScriptErrorString(err)); @@ -419,6 +422,86 @@ void ReplaceRedeemScript(CScript& script, const CScript& redeemScript) script = PushAll(stack); } +BOOST_AUTO_TEST_CASE(test_big_witness_transaction) { + CMutableTransaction mtx; + mtx.nVersion = 1; + + CKey key; + key.MakeNewKey(false); + CBasicKeyStore keystore; + keystore.AddKeyPubKey(key, key.GetPubKey()); + CKeyID hash = key.GetPubKey().GetID(); + CScript scriptPubKey = CScript() << OP_0 << std::vector(hash.begin(), hash.end()); + + vector sigHashes; + sigHashes.push_back(SIGHASH_NONE | SIGHASH_ANYONECANPAY); + sigHashes.push_back(SIGHASH_SINGLE | SIGHASH_ANYONECANPAY); + sigHashes.push_back(SIGHASH_ALL | SIGHASH_ANYONECANPAY); + sigHashes.push_back(SIGHASH_NONE); + sigHashes.push_back(SIGHASH_SINGLE); + sigHashes.push_back(SIGHASH_ALL); + + // create a big transaction of 4500 inputs signed by the same key + for(uint32_t ij = 0; ij < 4500; ij++) { + uint32_t i = mtx.vin.size(); + uint256 prevId; + prevId.SetHex("0000000000000000000000000000000000000000000000000000000000000100"); + COutPoint outpoint(prevId, i); + + mtx.vin.resize(mtx.vin.size() + 1); + mtx.vin[i].prevout = outpoint; + mtx.vin[i].scriptSig = CScript(); + + mtx.vout.resize(mtx.vout.size() + 1); + mtx.vout[i].nValue = 1000; + mtx.vout[i].scriptPubKey = CScript() << OP_1; + } + + // sign all inputs + for(uint32_t i = 0; i < mtx.vin.size(); i++) { + bool hashSigned = SignSignature(keystore, scriptPubKey, mtx, i, 1000, sigHashes.at(i % sigHashes.size())); + assert(hashSigned); + } + + CTransaction tx; + CDataStream ssout(SER_NETWORK, PROTOCOL_VERSION); + WithOrVersion(&ssout, 0) << mtx; + WithOrVersion(&ssout, 0) >> tx; + + // check all inputs concurrently, with the cache + PrecomputedTransactionData txdata(tx); + boost::thread_group threadGroup; + CCheckQueue scriptcheckqueue(128); + CCheckQueueControl control(&scriptcheckqueue); + + for (int i=0; i<20; i++) + threadGroup.create_thread(boost::bind(&CCheckQueue::Thread, boost::ref(scriptcheckqueue))); + + CCoins coins; + coins.nVersion = 1; + coins.fCoinBase = false; + for(uint32_t i = 0; i < mtx.vin.size(); i++) { + CTxOut txout; + txout.nValue = 1000; + txout.scriptPubKey = scriptPubKey; + coins.vout.push_back(txout); + } + + for(uint32_t i = 0; i < mtx.vin.size(); i++) { + std::vector vChecks; + CScriptCheck check(coins, tx, i, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, false, &txdata); + vChecks.push_back(CScriptCheck()); + check.swap(vChecks.back()); + control.Add(vChecks); + } + + bool controlCheck = control.Wait(); + assert(controlCheck); + + threadGroup.interrupt_all(); + threadGroup.join_all(); +} + BOOST_AUTO_TEST_CASE(test_witness) { CBasicKeyStore keystore, keystore2; diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 82827b8e4f1..8b974d73124 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -737,7 +737,8 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const waitingOnDependants.push_back(&(*it)); else { CValidationState state; - assert(CheckInputs(tx, state, mempoolDuplicate, false, 0, false, NULL)); + PrecomputedTransactionData txdata(tx); + assert(CheckInputs(tx, state, mempoolDuplicate, false, 0, false, txdata, NULL)); UpdateCoins(tx, mempoolDuplicate, 1000000); } } @@ -751,7 +752,8 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const stepsSinceLastRemove++; assert(stepsSinceLastRemove < waitingOnDependants.size()); } else { - assert(CheckInputs(entry->GetTx(), state, mempoolDuplicate, false, 0, false, NULL)); + PrecomputedTransactionData txdata(entry->GetTx()); + assert(CheckInputs(entry->GetTx(), state, mempoolDuplicate, false, 0, false, txdata, NULL)); UpdateCoins(entry->GetTx(), mempoolDuplicate, 1000000); stepsSinceLastRemove = 0; } From 2215c22a00116d210dcfd95d3369035a8d2fd6c2 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 26 Aug 2016 21:44:44 +0200 Subject: [PATCH 054/302] Check for compatibility with download in FindNextBlocksToDownload --- src/main.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5a9691474f9..6a82f3d190a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -537,7 +537,7 @@ CBlockIndex* LastCommonAncestor(CBlockIndex* pa, CBlockIndex* pb) { /** Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has * at most count entries. */ -void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector& vBlocks, NodeId& nodeStaller) { +void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector& vBlocks, NodeId& nodeStaller, const Consensus::Params& consensusParams) { if (count == 0) return; @@ -594,6 +594,10 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vectorfHaveWitness && IsWitnessEnabled(pindex->pprev, consensusParams)) { + // We wouldn't download this block or its descendants from this peer. + return; + } if (pindex->nStatus & BLOCK_HAVE_DATA || chainActive.Contains(pindex)) { if (pindex->nChainTx) state->pindexLastCommonBlock = pindex; @@ -6726,15 +6730,13 @@ bool SendMessages(CNode* pto) if (!pto->fDisconnect && !pto->fClient && (fFetch || !IsInitialBlockDownload()) && state.nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) { vector vToDownload; NodeId staller = -1; - FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller); + FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller, consensusParams); BOOST_FOREACH(CBlockIndex *pindex, vToDownload) { - if (State(pto->GetId())->fHaveWitness || !IsWitnessEnabled(pindex->pprev, consensusParams)) { - uint32_t nFetchFlags = GetFetchFlags(pto, pindex->pprev, consensusParams); - vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash())); - MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex); - LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(), - pindex->nHeight, pto->id); - } + uint32_t nFetchFlags = GetFetchFlags(pto, pindex->pprev, consensusParams); + vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash())); + MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex); + LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(), + pindex->nHeight, pto->id); } if (state.nBlocksInFlight == 0 && staller != -1) { if (State(staller)->nStallingSince == 0) { From bbf379b0552c357088e349dd6608730489696b80 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 26 Aug 2016 21:07:05 +0200 Subject: [PATCH 055/302] Fix some locks This makes sure that cs_filter is never held while taking cs_main or CNode::cs_vSend. --- src/main.cpp | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6a82f3d190a..0b8588efa7f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4803,10 +4803,16 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam pfrom->PushMessage(NetMsgType::BLOCK, block); else if (inv.type == MSG_FILTERED_BLOCK) { - LOCK(pfrom->cs_filter); - if (pfrom->pfilter) + bool send = false; + CMerkleBlock merkleBlock; { - CMerkleBlock merkleBlock(block, *pfrom->pfilter); + LOCK(pfrom->cs_filter); + if (pfrom->pfilter) { + send = true; + merkleBlock = CMerkleBlock(block, *pfrom->pfilter); + } + } + if (send) { pfrom->PushMessage(NetMsgType::MERKLEBLOCK, merkleBlock); // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see // This avoids hurting performance by pointlessly requiring a round-trip @@ -6074,8 +6080,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, CBloomFilter filter; vRecv >> filter; - LOCK(pfrom->cs_filter); - if (!filter.IsWithinSizeConstraints()) { // There is no excuse for sending a too-large filter @@ -6084,11 +6088,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } else { + LOCK(pfrom->cs_filter); delete pfrom->pfilter; pfrom->pfilter = new CBloomFilter(filter); pfrom->pfilter->UpdateEmptyFull(); + pfrom->fRelayTxes = true; } - pfrom->fRelayTxes = true; } @@ -6099,20 +6104,21 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // Nodes must NEVER send a data item > 520 bytes (the max size for a script data object, // and thus, the maximum size any matched object can have) in a filteradd message - if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) - { - LOCK(cs_main); - Misbehaving(pfrom->GetId(), 100); + bool bad = false; + if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) { + bad = true; } else { LOCK(pfrom->cs_filter); - if (pfrom->pfilter) + if (pfrom->pfilter) { pfrom->pfilter->insert(vData); - else - { - LOCK(cs_main); - Misbehaving(pfrom->GetId(), 100); + } else { + bad = true; } } + if (bad) { + LOCK(cs_main); + Misbehaving(pfrom->GetId(), 100); + } } From ab295bb4be26939e4853b9d95a9938c5ed8afa57 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Thu, 25 Aug 2016 23:42:40 +0000 Subject: [PATCH 056/302] Do not add random inbound peers to addrman. We should learn about new peers via address messages. An inbound peer connecting to us tells us nothing about its ability to accept incoming connections from us, so we shouldn't assume that we can connect to it based on this. The vast majority of nodes on the network do not accept incoming connections, adding them will only slow down the process of making a successful connection in the future. Nodes which have configured themselves to not announce would prefer we not violate their privacy by announcing them in GETADDR responses. --- src/main.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0b8588efa7f..40f2fffe730 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5057,12 +5057,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pfrom->fGetAddr = true; } addrman.Good(pfrom->addr); - } else { - if (((CNetAddr)pfrom->addr) == (CNetAddr)addrFrom) - { - addrman.Add(addrFrom, addrFrom); - addrman.Good(addrFrom); - } } pfrom->fSuccessfullyConnected = true; From a9429ca26dd8f4555def2dc8bd8ea7fc4e32fce6 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 27 Aug 2016 15:28:20 +0200 Subject: [PATCH 057/302] Reduce default number of blocks to check at startup Github-Pull: #8611 Rebased-From: 203f2121be0a84e85f7dff9cca9a30387005954f --- src/main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.h b/src/main.h index cbce34290a2..8cae9c953f2 100644 --- a/src/main.h +++ b/src/main.h @@ -192,7 +192,7 @@ extern uint64_t nPruneTarget; /** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */ static const unsigned int MIN_BLOCKS_TO_KEEP = 288; -static const signed int DEFAULT_CHECKBLOCKS = MIN_BLOCKS_TO_KEEP; +static const signed int DEFAULT_CHECKBLOCKS = 6; static const unsigned int DEFAULT_CHECKLEVEL = 3; // Require that user allocate at least 550MB for block & undo files (blk???.dat and rev???.dat) From 41fd852d3fcb84b87fefb2a4f7290c53519c78f3 Mon Sep 17 00:00:00 2001 From: rodasmith Date: Sat, 10 Sep 2016 11:41:01 -0700 Subject: [PATCH 058/302] fix op order to append first alert Github-Pull: #8697 Rebased-From: 1d635ae61b26d1dd613c1cc1cac796627af2a31e --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 40f2fffe730..8f519dee11e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4675,12 +4675,12 @@ std::string GetWarnings(const std::string& strFor) if (fLargeWorkForkFound) { strStatusBar = strRPC = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."; - strGUI += strGUI.empty() ? "" : uiAlertSeperator + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."); + strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."); } else if (fLargeWorkInvalidChainFound) { strStatusBar = strRPC = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."; - strGUI += strGUI.empty() ? "" : uiAlertSeperator + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); + strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); } if (strFor == "gui") From d9f0d4e0737a1f29173ee5407ba701496ba9f46b Mon Sep 17 00:00:00 2001 From: adlawren Date: Sat, 6 Aug 2016 23:58:30 -0700 Subject: [PATCH 059/302] Fix minimize and close bugs refs #8225 To ensure the GUI closes when the "Minimize on close" window option is disabled, and the "Minimize to the tray instead of the taskbar" window option is enbaled, remove a check made against the "Minimize to the tray instead of the taskbar" value, made during GUI closure. To ensure the GUI minimizes to the taskbar when the "Minimize on close" window option is enabled, and the "Minimize to the tray instead of the taskbar" window option is disabled, minimize the GUI and ignore the closure event. Github-Pull: #8481 Rebased-From: 05242e937d3fc0144029ccf3b14f98662400dd60 --- src/qt/bitcoingui.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 9042e3b56a3..2afefb733ed 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -902,17 +902,22 @@ void BitcoinGUI::closeEvent(QCloseEvent *event) #ifndef Q_OS_MAC // Ignored on Mac if(clientModel && clientModel->getOptionsModel()) { - if(!clientModel->getOptionsModel()->getMinimizeToTray() && - !clientModel->getOptionsModel()->getMinimizeOnClose()) + if(!clientModel->getOptionsModel()->getMinimizeOnClose()) { // close rpcConsole in case it was open to make some space for the shutdown window rpcConsole->close(); QApplication::quit(); } + else + { + QMainWindow::showMinimized(); + event->ignore(); + } } -#endif +#else QMainWindow::closeEvent(event); +#endif } void BitcoinGUI::showEvent(QShowEvent *event) From a37cec537b70254a5587dd2aee6cfaad46349bcf Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 8 Aug 2016 14:17:23 -0400 Subject: [PATCH 060/302] Persist the datadir after option reset Github-Pull: #8487 Rebased-From: 15df3c196b2359505980a2b0217133e0bb550565 57acb82e7014f3214229349485fa3f57842b10ae --- src/qt/intro.cpp | 3 ++- src/qt/optionsmodel.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 6a5740e21d3..1a241ae0f0e 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -178,7 +178,7 @@ bool Intro::pickDataDirectory() /* 2) Allow QSettings to override default dir */ dataDir = settings.value("strDataDir", dataDir).toString(); - if(!fs::exists(GUIUtil::qstringToBoostPath(dataDir)) || GetBoolArg("-choosedatadir", DEFAULT_CHOOSE_DATADIR)) + if(!fs::exists(GUIUtil::qstringToBoostPath(dataDir)) || GetBoolArg("-choosedatadir", DEFAULT_CHOOSE_DATADIR) || settings.value("fReset", false).toBool() || GetBoolArg("-resetguisettings", false)) { /* If current default data directory does not exist, let the user choose one */ Intro intro; @@ -204,6 +204,7 @@ bool Intro::pickDataDirectory() } settings.setValue("strDataDir", dataDir); + settings.setValue("fReset", false); } /* Only override -datadir if different from the default, to make it possible to * override -datadir in the bitcoin.conf file in the default data directory diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 684db71a8ce..5538a28413d 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -16,6 +16,7 @@ #include "main.h" // For DEFAULT_SCRIPTCHECK_THREADS #include "net.h" #include "txdb.h" // for -dbcache defaults +#include "intro.h" #ifdef ENABLE_WALLET #include "wallet/wallet.h" @@ -98,6 +99,9 @@ void OptionsModel::Init(bool resetSettings) if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString())) addOverriddenOption("-par"); + if (!settings.contains("strDataDir")) + settings.setValue("strDataDir", Intro::getDefaultDataDirectory()); + // Wallet #ifdef ENABLE_WALLET if (!settings.contains("bSpendZeroConfChange")) @@ -150,9 +154,19 @@ void OptionsModel::Reset() { QSettings settings; + // Save the strDataDir setting + QString dataDir = Intro::getDefaultDataDirectory(); + dataDir = settings.value("strDataDir", dataDir).toString(); + // Remove all entries from our QSettings object settings.clear(); + // Set strDataDir + settings.setValue("strDataDir", dataDir); + + // Set that this was reset + settings.setValue("fReset", true); + // default setting for OptionsModel::StartAtStartup - disabled if (GUIUtil::GetStartOnSystemStartup()) GUIUtil::SetStartOnSystemStartup(false); From 63462c2b4bcd250402b040bc19f2ae39771a62f7 Mon Sep 17 00:00:00 2001 From: whythat Date: Fri, 2 Sep 2016 12:38:04 +0300 Subject: [PATCH 061/302] [qa] remove root test directory for RPC tests Github-Pull: #8652 Rebased-From: 438e94dc330a37600ec1d86f2ba8502385b5262d c62cc4ec759a8487373f158b3cbb888efcdd753a --- qa/rpc-tests/test_framework/test_framework.py | 5 ++++- qa/rpc-tests/wallet-hd.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index 0dfece6b277..306f31102b0 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -123,7 +123,8 @@ def main(self): self.add_options(parser) (self.options, self.args) = parser.parse_args() - self.options.tmpdir += '/' + str(self.options.port_seed) + # backup dir variable for removal at cleanup + self.options.root, self.options.tmpdir = self.options.tmpdir, self.options.tmpdir + '/' + str(self.options.port_seed) if self.options.trace_rpc: logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) @@ -174,6 +175,8 @@ def main(self): if not self.options.nocleanup and not self.options.noshutdown and success: print("Cleaning up") shutil.rmtree(self.options.tmpdir) + if not os.listdir(self.options.root): + os.rmdir(self.options.root) else: print("Not cleaning up dir %s" % self.options.tmpdir) diff --git a/qa/rpc-tests/wallet-hd.py b/qa/rpc-tests/wallet-hd.py index c11da1e9a99..a49d91f6f4f 100755 --- a/qa/rpc-tests/wallet-hd.py +++ b/qa/rpc-tests/wallet-hd.py @@ -39,8 +39,8 @@ def run_test (self): self.nodes[1].importprivkey(self.nodes[0].dumpprivkey(non_hd_add)) # This should be enough to keep the master key and the non-HD key - self.nodes[1].backupwallet(tmpdir + "hd.bak") - #self.nodes[1].dumpwallet(tmpdir + "hd.dump") + self.nodes[1].backupwallet(tmpdir + "/hd.bak") + #self.nodes[1].dumpwallet(tmpdir + "/hd.dump") # Derive some HD addresses and remember the last # Also send funds to each add @@ -63,7 +63,7 @@ def run_test (self): print("Restore backup ...") self.stop_node(1) os.remove(self.options.tmpdir + "/node1/regtest/wallet.dat") - shutil.copyfile(tmpdir + "hd.bak", tmpdir + "/node1/regtest/wallet.dat") + shutil.copyfile(tmpdir + "/hd.bak", tmpdir + "/node1/regtest/wallet.dat") self.nodes[1] = start_node(1, self.options.tmpdir, self.node_args[1]) #connect_nodes_bi(self.nodes, 0, 1) From ae8c7df7a5725e812586f2c2d653578b8fd55a37 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 13 Sep 2016 19:35:35 +0200 Subject: [PATCH 062/302] [qa] create_cache: Delete temp dir when done Github-Pull: #8713 Rebased-From: fa27d990ee38a9dce1da71098be010e4a81b18c3 --- qa/rpc-tests/create_cache.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/create_cache.py b/qa/rpc-tests/create_cache.py index b6161e0917d..1ace6310d0d 100755 --- a/qa/rpc-tests/create_cache.py +++ b/qa/rpc-tests/create_cache.py @@ -12,9 +12,15 @@ class CreateCache(BitcoinTestFramework): + def __init__(self): + super().__init__() + + # Test network and test nodes are not required: + self.num_nodes = 0 + self.nodes = [] + def setup_network(self): - # Don't setup any test nodes - self.options.noshutdown = True + pass def run_test(self): pass From d6ebe1369fca30a914e72cbe9da7367de80d8f8a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 17 Sep 2016 11:47:51 +0200 Subject: [PATCH 063/302] [qa] Refactor RPCTestHandler to prevent TimeoutExpired Github-Pull: #8750 Rebased-From: dddd04f979392a8c69cc11f5c54d817702eeed3e --- qa/pull-tester/rpc-tests.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 11b83bac146..a99149e52a5 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -248,21 +248,27 @@ def get_next(self): self.num_running += 1 t = self.test_list.pop(0) port_seed = ["--portseed=%s" % len(self.test_list)] + log_stdout = tempfile.SpooledTemporaryFile(max_size=2**16) + log_stderr = tempfile.SpooledTemporaryFile(max_size=2**16) self.jobs.append((t, time.time(), subprocess.Popen((RPC_TESTS_DIR + t).split() + self.flags + port_seed, universal_newlines=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE))) + stdout=log_stdout, + stderr=log_stderr), + log_stdout, + log_stderr)) if not self.jobs: raise IndexError('pop from empty list') while True: # Return first proc that finishes time.sleep(.5) for j in self.jobs: - (name, time0, proc) = j + (name, time0, proc, log_out, log_err) = j if proc.poll() is not None: - (stdout, stderr) = proc.communicate(timeout=3) + log_out.seek(0), log_err.seek(0) + [stdout, stderr] = [l.read().decode('utf-8') for l in (log_out, log_err)] + log_out.close(), log_err.close() passed = stderr == "" and proc.returncode == 0 self.num_running -= 1 self.jobs.remove(j) From c6a629100b4b2afa1ad0cf71ba7ef21908ceda02 Mon Sep 17 00:00:00 2001 From: instagibbs Date: Fri, 9 Sep 2016 12:13:18 -0400 Subject: [PATCH 064/302] add witness address to address book Github-Pull: #8693 Rebased-From: 62ffbbdec30699941069baeae61716ff12155ba6 --- src/wallet/rpcwallet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index a90807e5141..901e6a5d1ed 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1088,6 +1088,8 @@ UniValue addwitnessaddress(const UniValue& params, bool fHelp) throw JSONRPCError(RPC_WALLET_ERROR, "Public key or redeemscript not known to wallet"); } + pwalletMain->SetAddressBook(w.result, "", "receive"); + return CBitcoinAddress(w.result).ToString(); } From 733760a700ac97e59a3e3ae5565ba45616aa079e Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Fri, 2 Sep 2016 23:05:29 +0100 Subject: [PATCH 065/302] Update btcdrak signing key Github-Pull: #8662 Rebased-From: 46606af200db563ca742b56f291cee2311a27491 --- contrib/gitian-keys/btcdrak-key.pgp | Bin 8954 -> 4916 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/contrib/gitian-keys/btcdrak-key.pgp b/contrib/gitian-keys/btcdrak-key.pgp index 60d76c0ec7ab86635637ee9f49948e004fadfee4..f00dc729d57a2e7b7848324177c605dac9dc8e45 100644 GIT binary patch literal 4916 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 z%0A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 Date: Tue, 16 Aug 2016 14:11:10 -0400 Subject: [PATCH 066/302] Update p2p-segwit.py to reflect correct AskFor behavior Github-Pull: #8528 Rebased-From: bc1d1f266046ec79e87c7bf90aaf279f43266cf5 --- qa/rpc-tests/p2p-segwit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index cd02692b1e8..3813743e5b9 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -946,8 +946,7 @@ def test_tx_relay_after_segwit_activation(self): self.test_node.test_transaction_acceptance(tx, with_witness=True, accepted=False) # Verify that removing the witness succeeds. - # Re-announcing won't result in a getdata for ~2.5 minutes, so just - # deliver the modified transaction. + self.test_node.announce_tx_and_wait_for_getdata(tx) self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) # Now try to add extra witness data to a valid witness tx. From a114a0208b2c01d85f413e48569edc4f5ec0951a Mon Sep 17 00:00:00 2001 From: instagibbs Date: Tue, 16 Aug 2016 15:45:42 -0400 Subject: [PATCH 067/302] p2psegwit.py transaction is rejected due to premature witness not size Github-Pull: #8528 Rebased-From: 5547aeb0159027912069b4773184963f54c672af --- qa/rpc-tests/p2p-segwit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 3813743e5b9..68d8b9a006f 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -302,13 +302,18 @@ def test_unnecessary_witness_before_segwit_activation(self): sync_blocks(self.nodes) # We'll add an unnecessary witness to this transaction that would cause - # it to be too large according to IsStandard. + # it to be non-standard, to test that violating policy with a witness before + # segwit activation doesn't blind a node to a transaction. Transactions + # rejected for having a witness before segwit activation shouldn't be added + # to the rejection cache. tx3 = CTransaction() tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), CScript([p2sh_program]))) tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, scriptPubKey)) tx3.wit.vtxinwit.append(CTxInWitness()) tx3.wit.vtxinwit[0].scriptWitness.stack = [b'a'*400000] tx3.rehash() + # Note that this should be rejected for the premature witness reason, + # rather than a policy check, since segwit hasn't activated yet. self.std_node.test_transaction_acceptance(tx3, True, False, b'no-witness-yet') # If we send without witness, it should be accepted. From 6b07362b375feab71f0d0d3ed00a5b16944f4d12 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Tue, 6 Sep 2016 00:50:23 +0800 Subject: [PATCH 068/302] Fix SIGHASH_SINGLE bug in test_framework SignatureHash The value for "other" inputs should be -1 (0xffffffffffffffff) instead of 0 Github-Pull: #8667 Rebased-From: 2f2548d5e0ccea6879eb7b0b851d61ad2f544423 --- qa/rpc-tests/test_framework/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/script.py b/qa/rpc-tests/test_framework/script.py index b46c643ccb1..83bbf204796 100644 --- a/qa/rpc-tests/test_framework/script.py +++ b/qa/rpc-tests/test_framework/script.py @@ -882,7 +882,7 @@ def SignatureHash(script, txTo, inIdx, hashtype): tmp = txtmp.vout[outIdx] txtmp.vout = [] for i in range(outIdx): - txtmp.vout.append(CTxOut()) + txtmp.vout.append(CTxOut(-1)) txtmp.vout.append(tmp) for i in range(len(txtmp.vin)): From 8e0338227979eb619da2dcacc505f4f229b67da0 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 7 Sep 2016 16:03:08 +0200 Subject: [PATCH 069/302] [Qt][CoinControl] fix UI bug that could result in paying unexpected fee Github-Pull: #8678 Rebased-From: 04802930d4e1f565b3c36e1a806fbe9cd4809937 --- src/qt/sendcoinsdialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 6d50be56ecb..546003622c0 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -592,6 +592,9 @@ void SendCoinsDialog::updateGlobalFeeVariables() { nTxConfirmTarget = defaultConfirmTarget - ui->sliderSmartFee->value(); payTxFee = CFeeRate(0); + + // set nMinimumTotalFee to 0 to not accidentally pay a custom fee + CoinControlDialog::coinControl->nMinimumTotalFee = 0; } else { @@ -790,7 +793,7 @@ void SendCoinsDialog::coinControlUpdateLabels() ui->radioCustomAtLeast->setVisible(true); // only enable the feature if inputs are selected - ui->radioCustomAtLeast->setEnabled(CoinControlDialog::coinControl->HasSelected()); + ui->radioCustomAtLeast->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked() &&CoinControlDialog::coinControl->HasSelected()); } else { From 091cdebfb823734559f9694c4c45eba1598b05ff Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Sun, 4 Sep 2016 20:02:40 -0400 Subject: [PATCH 070/302] Clear witness with vin/vout in CWallet::CreateTransaction() Github-Pull: #8664 Rebased-From: c40b034327bf8a30d3af1eeeef84bc4ccd57e685 --- src/wallet/wallet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e5ee5063a5d..32a01d2db0b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2202,6 +2202,7 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt nChangePosInOut = nChangePosRequest; txNew.vin.clear(); txNew.vout.clear(); + txNew.wit.SetNull(); wtxNew.fFromMe = true; bool fFirst = true; From 147003c73edb5a949ca403ecf8883c1b8bfaa6c1 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Tue, 23 Aug 2016 16:55:15 +1000 Subject: [PATCH 071/302] Add configure check for -latomic Github-Pull: #8563 Rebased-From: 878faacd7b3daac437cc689b13422f6432fb5cd0 --- build-aux/m4/l_atomic.m4 | 40 ++++++++++++++++++++++++++++++++++++++++ configure.ac | 3 +++ 2 files changed, 43 insertions(+) create mode 100644 build-aux/m4/l_atomic.m4 diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 new file mode 100644 index 00000000000..906724b6405 --- /dev/null +++ b/build-aux/m4/l_atomic.m4 @@ -0,0 +1,40 @@ +# Some versions of gcc/libstdc++ require linking with -latomic if +# using the C++ atomic library. +# +# Sourced from http://bugs.debian.org/797228 + +m4_define([_CHECK_ATOMIC_testbody], [[ + #include + #include + + int main() { + std::atomic a{}; + + int64_t v = 5; + int64_t r = a.fetch_add(v); + return static_cast(r); + } +]]) + +AC_DEFUN([CHECK_ATOMIC], [ + + AC_LANG_PUSH(C++) + + AC_MSG_CHECKING([whether std::atomic can be used without link library]) + + AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + LIBS="$LIBS -latomic" + AC_MSG_CHECKING([whether std::atomic needs -latomic]) + AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_FAILURE([cannot figure our how to use std::atomic]) + ]) + ]) + + AC_LANG_POP +]) diff --git a/configure.ac b/configure.ac index 7b66b61eb17..55578c88645 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,9 @@ case $host in esac dnl Require C++11 compiler (no GNU extensions) AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) +dnl Check if -latomic is required for +CHECK_ATOMIC + dnl Libtool init checks. LT_INIT([pic-only]) From 8a7d7ffe650d719b0a0ab17d60607e4400dc5408 Mon Sep 17 00:00:00 2001 From: Gaurav Rana Date: Thu, 8 Sep 2016 17:43:55 +0545 Subject: [PATCH 072/302] update name of file bitcoin.qrc Github-Pull: #8683 Rebased-From: df2d2e70cac8d15ecc30bc5c46930fd27c8afac0 --- doc/translation_process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/translation_process.md b/doc/translation_process.md index 310d560b364..361579a73be 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -94,7 +94,7 @@ When new plurals are added to the source file, it's important to do the followin 7. Save the source file ### Translating a new language -To create a new language template, you will need to edit the languages manifest file `src/qt/bitcoin.qrc` and add a new entry. Below is an example of the english language entry. +To create a new language template, you will need to edit the languages manifest file `src/qt/bitcoin_locale.qrc` and add a new entry. Below is an example of the english language entry. ```xml From 03b01966fa4b864c82a7543de0ed52a2c69ed38a Mon Sep 17 00:00:00 2001 From: Jeremy Rubin Date: Tue, 6 Sep 2016 16:22:13 -0400 Subject: [PATCH 073/302] Fix obvious assignment/equality error in test Github-Pull: #8673 Rebased-From: 426e7bce0e365e0947f932ca46bcc48ca3a2f10e --- src/test/arith_uint256_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/arith_uint256_tests.cpp b/src/test/arith_uint256_tests.cpp index 53ab7e95ee0..b19d2faea01 100644 --- a/src/test/arith_uint256_tests.cpp +++ b/src/test/arith_uint256_tests.cpp @@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE( basics ) // constructors, equality, inequality BOOST_CHECK( (R1L & arith_uint256("0xffffffffffffffff")) == arith_uint256(R1LLow64)); BOOST_CHECK(ZeroL == arith_uint256(0)); BOOST_CHECK(OneL == arith_uint256(1)); - BOOST_CHECK(arith_uint256("0xffffffffffffffff") = arith_uint256(0xffffffffffffffffULL)); + BOOST_CHECK(arith_uint256("0xffffffffffffffff") == arith_uint256(0xffffffffffffffffULL)); // Assignment (from base_uint) arith_uint256 tmpL = ~ZeroL; BOOST_CHECK(tmpL == ~ZeroL); From 1f21d161a590d5f0aaf77ea01cd9d80c33be0a54 Mon Sep 17 00:00:00 2001 From: Kaz Wesley Date: Wed, 27 Jul 2016 16:27:07 -0700 Subject: [PATCH 074/302] prepend license statement to indirectmap Add statement about MIT licensing to indirectmap.h. I forgot the license preamble when I originally wrote the file. Github-Pull: #8414 Rebased-From: d3af342276f29d2bd162628eb4b669599633e39e --- src/indirectmap.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/indirectmap.h b/src/indirectmap.h index 28e1e8deddb..76da4a6bd55 100644 --- a/src/indirectmap.h +++ b/src/indirectmap.h @@ -1,3 +1,7 @@ +// Copyright (c) 2016 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef BITCOIN_INDIRECTMAP_H #define BITCOIN_INDIRECTMAP_H From f70be14f8fe4fd72f77d57d05c6c4d4f1e28b7f9 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 28 Jul 2016 14:59:13 +0200 Subject: [PATCH 075/302] [QA] Add walletdump RPC test (including HD- & encryption-tests) Github-Pull: #8417 Rebased-From: 54af51d98d0b38f08c58dd589bff81883aee2854 --- qa/pull-tester/rpc-tests.py | 1 + qa/rpc-tests/wallet-dump.py | 120 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100755 qa/rpc-tests/wallet-dump.py diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index a99149e52a5..05fee517909 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -107,6 +107,7 @@ 'bip68-112-113-p2p.py', 'wallet.py', 'wallet-hd.py', + 'wallet-dump.py', 'listtransactions.py', 'receivedby.py', 'mempool_resurrect_test.py', diff --git a/qa/rpc-tests/wallet-dump.py b/qa/rpc-tests/wallet-dump.py new file mode 100755 index 00000000000..dd675f57fc4 --- /dev/null +++ b/qa/rpc-tests/wallet-dump.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * +import os +import shutil + + +class WalletDumpTest(BitcoinTestFramework): + + def __init__(self): + super().__init__() + self.setup_clean_chain = False + self.num_nodes = 1 + + def setup_network(self, split=False): + extra_args = [["-keypool=100"]] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) + + def run_test (self): + tmpdir = self.options.tmpdir + + #generate 20 addresses to compare against the dump + test_addr_count = 20 + addrs = [] + for i in range(0,test_addr_count): + addr = self.nodes[0].getnewaddress() + vaddr= self.nodes[0].validateaddress(addr) #required to get hd keypath + addrs.append(vaddr) + + # dump unencrypted wallet + self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.unencrypted.dump") + + #open file + inputfile = open(tmpdir + "/node0/wallet.unencrypted.dump") + found_addr = 0 + found_addr_chg = 0 + found_addr_rsv = 0 + hdmasteraddr = "" + for line in inputfile: + #only read non comment lines + if line[0] != "#" and len(line) > 10: + #split out some data + keyLabel, comment = line.split("#") + key = keyLabel.split(" ")[0] + keytype = keyLabel.split(" ")[2] + if len(comment) > 1: + addrKeypath = comment.split(" addr=")[1] + addr = addrKeypath.split(" ")[0] + keypath = "" + if keytype != "hdmaster=1": + keypath = addrKeypath.rstrip().split("hdkeypath=")[1] + else: + #keep hd master for later comp. + hdmasteraddr = addr + + #count key types + for addrObj in addrs: + if (addrObj['address'] == addr and addrObj['hdkeypath'] == keypath and keytype == "label="): + found_addr+=1 + break + elif (keytype == "change=1"): + found_addr_chg+=1 + break + elif (keytype == "reserve=1"): + found_addr_rsv+=1 + break + assert(found_addr == test_addr_count) #all keys must be in the dump + assert(found_addr_chg == 50) #50 blocks where mined + assert(found_addr_rsv == 100) #100 reserve keys (keypool) + + #encrypt wallet, restart, unlock and dump + self.nodes[0].encryptwallet('test') + bitcoind_processes[0].wait() + self.nodes[0] = start_node(0, self.options.tmpdir) + self.nodes[0].walletpassphrase('test', 10) + self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.encrypted.dump") + + #open dump done with an encrypted wallet + inputfile = open(tmpdir + "/node0/wallet.encrypted.dump") + found_addr = 0 + found_addr_chg = 0 + found_addr_rsv = 0 + for line in inputfile: + if line[0] != "#" and len(line) > 10: + keyLabel, comment = line.split("#") + key = keyLabel.split(" ")[0] + keytype = keyLabel.split(" ")[2] + if len(comment) > 1: + addrKeypath = comment.split(" addr=")[1] + addr = addrKeypath.split(" ")[0] + keypath = "" + if keytype != "hdmaster=1": + keypath = addrKeypath.rstrip().split("hdkeypath=")[1] + else: + #ensure we have generated a new hd master key + assert(hdmasteraddr != addr) + if keytype == "inactivehdmaster=1": + #ensure the old master is still available + assert(hdmasteraddr == addr) + for addrObj in addrs: + if (addrObj['address'] == addr and addrObj['hdkeypath'] == keypath and keytype == "label="): + found_addr+=1 + break + elif (keytype == "change=1"): + found_addr_chg+=1 + break + elif (keytype == "reserve=1"): + found_addr_rsv+=1 + break + + assert(found_addr == test_addr_count) + assert(found_addr_chg == 150) #old reserve keys are marked as change now + assert(found_addr_rsv == 100) #keypool size + +if __name__ == '__main__': + WalletDumpTest().main () From 69d1cd202d432bd6b8a6cda2187c148bcf1f6c2e Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 29 Jul 2016 17:42:12 +0200 Subject: [PATCH 076/302] net: Ignore `notfound` P2P messages Github-Pull: #8427 Rebased-From: 5c9e49d12c931f9c7ddaac0144739dcd7263e554 --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 8f519dee11e..01cd410da17 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6161,6 +6161,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } } + else if (strCommand == NetMsgType::NOTFOUND) { + // We do not care about the NOTFOUND message, but logging an Unknown Command + // message would be undesirable as we transmit it ourselves. + } + else { // Ignore unknown commands for extensibility LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id); From e111904a76774c9912189f29ad82ad3424905507 Mon Sep 17 00:00:00 2001 From: whythat Date: Mon, 25 Jul 2016 01:30:28 +0300 Subject: [PATCH 077/302] [qa]: add parsing for ':' argument form to rpc_url() Github-Pull: #8400 Rebased-From: 0ff4375c93bd159233282de5a33ad2e6c1e79841 --- qa/rpc-tests/test_framework/util.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 32fe79efc38..8aa34265c54 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -171,7 +171,15 @@ def rpc_auth_pair(n): def rpc_url(i, rpchost=None): rpc_u, rpc_p = rpc_auth_pair(i) - return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, rpchost or '127.0.0.1', rpc_port(i)) + host = '127.0.0.1' + port = rpc_port(i) + if rpchost: + parts = rpchost.split(':') + if len(parts) == 2: + host, port = parts + else: + host = rpchost + return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, host, int(port)) def wait_for_bitcoind_start(process, url, i): ''' From bea02dc3b664d77745f6701ba7c425b1f9f737cd Mon Sep 17 00:00:00 2001 From: whythat Date: Mon, 25 Jul 2016 01:31:05 +0300 Subject: [PATCH 078/302] [qa]: enable rpcbind_test Github-Pull: #8400 Rebased-From: 9bbb414b800cf71f93f15d2cb5d4cf32c72294e6 --- qa/pull-tester/rpc-tests.py | 2 +- qa/rpc-tests/rpcbind_test.py | 219 ++++++++++++++++++------------------------- 2 files changed, 93 insertions(+), 128 deletions(-) diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 05fee517909..d3b4ebb8ecc 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -159,7 +159,7 @@ 'txn_clone.py --mineblock', 'forknotify.py', 'invalidateblock.py', -# 'rpcbind_test.py', #temporary, bug in libevent, see #6655 + 'rpcbind_test.py', 'smartfees.py', 'maxblocksinflight.py', 'p2p-acceptblock.py', diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py index 572273566b6..bf1cc871261 100755 --- a/qa/rpc-tests/rpcbind_test.py +++ b/qa/rpc-tests/rpcbind_test.py @@ -5,143 +5,108 @@ # Test for -rpcbind, as well as -rpcallowip and -rpcconnect -# TODO extend this test from the test framework (like all other tests) - import tempfile import traceback +from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.netutil import * -def run_bind_test(tmpdir, allow_ips, connect_to, addresses, expected): - ''' - Start a node with requested rpcallowip and rpcbind parameters, - then try to connect, and check if the set of bound addresses - matches the expected set. - ''' - expected = [(addr_to_hex(addr), port) for (addr, port) in expected] - base_args = ['-disablewallet', '-nolisten'] - if allow_ips: - base_args += ['-rpcallowip=' + x for x in allow_ips] - binds = ['-rpcbind='+addr for addr in addresses] - nodes = start_nodes(self.num_nodes, tmpdir, [base_args + binds], connect_to) - try: - pid = bitcoind_processes[0].pid - assert_equal(set(get_bind_addrs(pid)), set(expected)) - finally: - stop_nodes(nodes) - wait_bitcoinds() - -def run_allowip_test(tmpdir, allow_ips, rpchost, rpcport): - ''' - Start a node with rpcwallow IP, and request getinfo - at a non-localhost IP. - ''' - base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips] - nodes = start_nodes(self.num_nodes, tmpdir, [base_args]) - try: - # connect to node through non-loopback interface - url = "http://rt:rt@%s:%d" % (rpchost, rpcport,) - node = get_rpc_proxy(url, 1) - node.getinfo() - finally: - node = None # make sure connection will be garbage collected and closed - stop_nodes(nodes) - wait_bitcoinds() - - -def run_test(tmpdir): - assert(sys.platform.startswith('linux')) # due to OS-specific network stats queries, this test works only on Linux - # find the first non-loopback interface for testing - non_loopback_ip = None - for name,ip in all_interfaces(): - if ip != '127.0.0.1': - non_loopback_ip = ip - break - if non_loopback_ip is None: - assert(not 'This test requires at least one non-loopback IPv4 interface') - print("Using interface %s for testing" % non_loopback_ip) +class RPCBindTest(BitcoinTestFramework): - defaultport = rpc_port(0) + def __init__(self): + super().__init__() + self.setup_clean_chain = True + self.num_nodes = 1 - # check default without rpcallowip (IPv4 and IPv6 localhost) - run_bind_test(tmpdir, None, '127.0.0.1', [], - [('127.0.0.1', defaultport), ('::1', defaultport)]) - # check default with rpcallowip (IPv6 any) - run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', [], - [('::0', defaultport)]) - # check only IPv4 localhost (explicit) - run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', ['127.0.0.1'], - [('127.0.0.1', defaultport)]) - # check only IPv4 localhost (explicit) with alternative port - run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171'], - [('127.0.0.1', 32171)]) - # check only IPv4 localhost (explicit) with multiple alternative ports on same host - run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171', '127.0.0.1:32172'], - [('127.0.0.1', 32171), ('127.0.0.1', 32172)]) - # check only IPv6 localhost (explicit) - run_bind_test(tmpdir, ['[::1]'], '[::1]', ['[::1]'], - [('::1', defaultport)]) - # check both IPv4 and IPv6 localhost (explicit) - run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', ['127.0.0.1', '[::1]'], - [('127.0.0.1', defaultport), ('::1', defaultport)]) - # check only non-loopback interface - run_bind_test(tmpdir, [non_loopback_ip], non_loopback_ip, [non_loopback_ip], - [(non_loopback_ip, defaultport)]) - - # Check that with invalid rpcallowip, we are denied - run_allowip_test(tmpdir, [non_loopback_ip], non_loopback_ip, defaultport) - try: - run_allowip_test(tmpdir, ['1.1.1.1'], non_loopback_ip, defaultport) - assert(not 'Connection not denied by rpcallowip as expected') - except ValueError: + def setup_network(self): pass -def main(): - import optparse - - parser = optparse.OptionParser(usage="%prog [options]") - parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true", - help="Leave bitcoinds and test.* datadir on exit or error") - parser.add_option("--srcdir", dest="srcdir", default="../../src", - help="Source directory containing bitcoind/bitcoin-cli (default: %default%)") - parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"), - help="Root directory for datadirs") - (options, args) = parser.parse_args() - - os.environ['PATH'] = options.srcdir+":"+os.environ['PATH'] - - check_json_precision() - - success = False - nodes = [] - try: - print("Initializing test directory "+options.tmpdir) - if not os.path.isdir(options.tmpdir): - os.makedirs(options.tmpdir) - initialize_chain(options.tmpdir) - - run_test(options.tmpdir) - - success = True - - except AssertionError as e: - print("Assertion failed: "+e.message) - except Exception as e: - print("Unexpected exception caught during testing: "+str(e)) - traceback.print_tb(sys.exc_info()[2]) - - if not options.nocleanup: - print("Cleaning up") - wait_bitcoinds() - shutil.rmtree(options.tmpdir) + def setup_nodes(self): + pass - if success: - print("Tests successful") - sys.exit(0) - else: - print("Failed") - sys.exit(1) + def run_bind_test(self, allow_ips, connect_to, addresses, expected): + ''' + Start a node with requested rpcallowip and rpcbind parameters, + then try to connect, and check if the set of bound addresses + matches the expected set. + ''' + expected = [(addr_to_hex(addr), port) for (addr, port) in expected] + base_args = ['-disablewallet', '-nolisten'] + if allow_ips: + base_args += ['-rpcallowip=' + x for x in allow_ips] + binds = ['-rpcbind='+addr for addr in addresses] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [base_args + binds], connect_to) + try: + pid = bitcoind_processes[0].pid + assert_equal(set(get_bind_addrs(pid)), set(expected)) + finally: + stop_nodes(self.nodes) + wait_bitcoinds() + + def run_allowip_test(self, allow_ips, rpchost, rpcport): + ''' + Start a node with rpcwallow IP, and request getinfo + at a non-localhost IP. + ''' + base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [base_args]) + try: + # connect to node through non-loopback interface + node = get_rpc_proxy(rpc_url(0, "%s:%d" % (rpchost, rpcport)), 0) + node.getinfo() + finally: + node = None # make sure connection will be garbage collected and closed + stop_nodes(self.nodes) + wait_bitcoinds() + + def run_test(self): + # due to OS-specific network stats queries, this test works only on Linux + assert(sys.platform.startswith('linux')) + # find the first non-loopback interface for testing + non_loopback_ip = None + for name,ip in all_interfaces(): + if ip != '127.0.0.1': + non_loopback_ip = ip + break + if non_loopback_ip is None: + assert(not 'This test requires at least one non-loopback IPv4 interface') + print("Using interface %s for testing" % non_loopback_ip) + + defaultport = rpc_port(0) + + # check default without rpcallowip (IPv4 and IPv6 localhost) + self.run_bind_test(None, '127.0.0.1', [], + [('127.0.0.1', defaultport), ('::1', defaultport)]) + # check default with rpcallowip (IPv6 any) + self.run_bind_test(['127.0.0.1'], '127.0.0.1', [], + [('::0', defaultport)]) + # check only IPv4 localhost (explicit) + self.run_bind_test(['127.0.0.1'], '127.0.0.1', ['127.0.0.1'], + [('127.0.0.1', defaultport)]) + # check only IPv4 localhost (explicit) with alternative port + self.run_bind_test(['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171'], + [('127.0.0.1', 32171)]) + # check only IPv4 localhost (explicit) with multiple alternative ports on same host + self.run_bind_test(['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171', '127.0.0.1:32172'], + [('127.0.0.1', 32171), ('127.0.0.1', 32172)]) + # check only IPv6 localhost (explicit) + self.run_bind_test(['[::1]'], '[::1]', ['[::1]'], + [('::1', defaultport)]) + # check both IPv4 and IPv6 localhost (explicit) + self.run_bind_test(['127.0.0.1'], '127.0.0.1', ['127.0.0.1', '[::1]'], + [('127.0.0.1', defaultport), ('::1', defaultport)]) + # check only non-loopback interface + self.run_bind_test([non_loopback_ip], non_loopback_ip, [non_loopback_ip], + [(non_loopback_ip, defaultport)]) + + # Check that with invalid rpcallowip, we are denied + self.run_allowip_test([non_loopback_ip], non_loopback_ip, defaultport) + try: + self.run_allowip_test(['1.1.1.1'], non_loopback_ip, defaultport) + assert(not 'Connection not denied by rpcallowip as expected') + except JSONRPCException: + pass if __name__ == '__main__': - main() + RPCBindTest ().main () From a7aa3ccc4f6a80bc23a8f7a419d72d0f1a33dfe1 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 28 Jul 2016 14:27:19 -0400 Subject: [PATCH 079/302] Enable size accounting in mining unit tests Github-Pull: #8419 Rebased-From: 8bfd70817bf8b8b07b81660e47c88dd122b7423f --- src/test/miner_tests.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index fd581db52ea..15fceb963a5 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -181,9 +181,7 @@ void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey, // NOTE: These tests rely on CreateNewBlock doing its own self-validation! BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) { - // Disable size accounting (CPFP does not support it) - mapArgs["-blockmaxsize"] = strprintf("%u", MAX_BLOCK_SERIALIZED_SIZE); - + // Note that by default, these tests run with size accounting enabled. const CChainParams& chainparams = Params(CBaseChainParams::MAIN); CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG; CBlockTemplate *pblocktemplate; From 8bb1efd9859726e992e4bf21de19f954d2bb2ab0 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 31 Jul 2016 15:35:46 +0200 Subject: [PATCH 080/302] [qa] Rework hd wallet dump test Github-Pull: #8442 Rebased-From: fa4439d3554435bdf0ef47861835f10d41bcdc1a --- qa/rpc-tests/wallet-dump.py | 144 ++++++++++++++++++++------------------------ 1 file changed, 64 insertions(+), 80 deletions(-) diff --git a/qa/rpc-tests/wallet-dump.py b/qa/rpc-tests/wallet-dump.py index dd675f57fc4..6028d2c20b1 100755 --- a/qa/rpc-tests/wallet-dump.py +++ b/qa/rpc-tests/wallet-dump.py @@ -4,9 +4,52 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import * -import os -import shutil +from test_framework.util import (start_nodes, start_node, assert_equal, bitcoind_processes) + + +def read_dump(file_name, addrs, hd_master_addr_old): + """ + Read the given dump, count the addrs that match, count change and reserve. + Also check that the old hd_master is inactive + """ + with open(file_name) as inputfile: + found_addr = 0 + found_addr_chg = 0 + found_addr_rsv = 0 + hd_master_addr_ret = None + for line in inputfile: + # only read non comment lines + if line[0] != "#" and len(line) > 10: + # split out some data + key_label, comment = line.split("#") + # key = key_label.split(" ")[0] + keytype = key_label.split(" ")[2] + if len(comment) > 1: + addr_keypath = comment.split(" addr=")[1] + addr = addr_keypath.split(" ")[0] + keypath = None + if keytype == "inactivehdmaster=1": + # ensure the old master is still available + assert(hd_master_addr_old == addr) + elif keytype == "hdmaster=1": + # ensure we have generated a new hd master key + assert(hd_master_addr_old != addr) + hd_master_addr_ret = addr + else: + keypath = addr_keypath.rstrip().split("hdkeypath=")[1] + + # count key types + for addrObj in addrs: + if addrObj['address'] == addr and addrObj['hdkeypath'] == keypath and keytype == "label=": + found_addr += 1 + break + elif keytype == "change=1": + found_addr_chg += 1 + break + elif keytype == "reserve=1": + found_addr_rsv += 1 + break + return found_addr, found_addr_chg, found_addr_rsv, hd_master_addr_ret class WalletDumpTest(BitcoinTestFramework): @@ -15,106 +58,47 @@ def __init__(self): super().__init__() self.setup_clean_chain = False self.num_nodes = 1 + self.extra_args = [["-keypool=90"]] def setup_network(self, split=False): - extra_args = [["-keypool=100"]] - self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) def run_test (self): tmpdir = self.options.tmpdir - #generate 20 addresses to compare against the dump + # generate 20 addresses to compare against the dump test_addr_count = 20 addrs = [] for i in range(0,test_addr_count): addr = self.nodes[0].getnewaddress() vaddr= self.nodes[0].validateaddress(addr) #required to get hd keypath addrs.append(vaddr) + # Should be a no-op: + self.nodes[0].keypoolrefill() # dump unencrypted wallet self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.unencrypted.dump") - #open file - inputfile = open(tmpdir + "/node0/wallet.unencrypted.dump") - found_addr = 0 - found_addr_chg = 0 - found_addr_rsv = 0 - hdmasteraddr = "" - for line in inputfile: - #only read non comment lines - if line[0] != "#" and len(line) > 10: - #split out some data - keyLabel, comment = line.split("#") - key = keyLabel.split(" ")[0] - keytype = keyLabel.split(" ")[2] - if len(comment) > 1: - addrKeypath = comment.split(" addr=")[1] - addr = addrKeypath.split(" ")[0] - keypath = "" - if keytype != "hdmaster=1": - keypath = addrKeypath.rstrip().split("hdkeypath=")[1] - else: - #keep hd master for later comp. - hdmasteraddr = addr - - #count key types - for addrObj in addrs: - if (addrObj['address'] == addr and addrObj['hdkeypath'] == keypath and keytype == "label="): - found_addr+=1 - break - elif (keytype == "change=1"): - found_addr_chg+=1 - break - elif (keytype == "reserve=1"): - found_addr_rsv+=1 - break - assert(found_addr == test_addr_count) #all keys must be in the dump - assert(found_addr_chg == 50) #50 blocks where mined - assert(found_addr_rsv == 100) #100 reserve keys (keypool) + found_addr, found_addr_chg, found_addr_rsv, hd_master_addr_unenc = \ + read_dump(tmpdir + "/node0/wallet.unencrypted.dump", addrs, None) + assert_equal(found_addr, test_addr_count) # all keys must be in the dump + assert_equal(found_addr_chg, 50) # 50 blocks where mined + assert_equal(found_addr_rsv, 90 + 1) # keypool size (TODO: fix off-by-one) #encrypt wallet, restart, unlock and dump self.nodes[0].encryptwallet('test') bitcoind_processes[0].wait() - self.nodes[0] = start_node(0, self.options.tmpdir) + self.nodes[0] = start_node(0, self.options.tmpdir, self.extra_args[0]) self.nodes[0].walletpassphrase('test', 10) + # Should be a no-op: + self.nodes[0].keypoolrefill() self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.encrypted.dump") - #open dump done with an encrypted wallet - inputfile = open(tmpdir + "/node0/wallet.encrypted.dump") - found_addr = 0 - found_addr_chg = 0 - found_addr_rsv = 0 - for line in inputfile: - if line[0] != "#" and len(line) > 10: - keyLabel, comment = line.split("#") - key = keyLabel.split(" ")[0] - keytype = keyLabel.split(" ")[2] - if len(comment) > 1: - addrKeypath = comment.split(" addr=")[1] - addr = addrKeypath.split(" ")[0] - keypath = "" - if keytype != "hdmaster=1": - keypath = addrKeypath.rstrip().split("hdkeypath=")[1] - else: - #ensure we have generated a new hd master key - assert(hdmasteraddr != addr) - if keytype == "inactivehdmaster=1": - #ensure the old master is still available - assert(hdmasteraddr == addr) - for addrObj in addrs: - if (addrObj['address'] == addr and addrObj['hdkeypath'] == keypath and keytype == "label="): - found_addr+=1 - break - elif (keytype == "change=1"): - found_addr_chg+=1 - break - elif (keytype == "reserve=1"): - found_addr_rsv+=1 - break - - assert(found_addr == test_addr_count) - assert(found_addr_chg == 150) #old reserve keys are marked as change now - assert(found_addr_rsv == 100) #keypool size + found_addr, found_addr_chg, found_addr_rsv, hd_master_addr_enc = \ + read_dump(tmpdir + "/node0/wallet.encrypted.dump", addrs, hd_master_addr_unenc) + assert_equal(found_addr, test_addr_count) + assert_equal(found_addr_chg, 90 + 1 + 50) # old reserve keys are marked as change now + assert_equal(found_addr_rsv, 90 + 1) # keypool size (TODO: fix off-by-one) if __name__ == '__main__': WalletDumpTest().main () From 9b0097976f4e593103cdf4594eb68de9bf9d60b3 Mon Sep 17 00:00:00 2001 From: Chris Stewart Date: Fri, 29 Jul 2016 11:52:48 -0500 Subject: [PATCH 081/302] Update README.md Updating documentation for adding new unit test files Removing unneeded sentence from README Removing uint160_tests.cpp as it DNE Formatting command line instructions to use `` fixing 80 char formatting issue in README fixing more nits Github-Pull: #8428 Rebased-From: b8db185952c815444b7052092472ef9af3a42e89 --- src/test/README.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/test/README.md b/src/test/README.md index b2d6be14f14..61462642bfb 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -5,18 +5,15 @@ sense to simply use this framework rather than require developers to configure some other framework (we want as few impediments to creating unit tests as possible). -The build system is setup to compile an executable called "test_bitcoin" +The build system is setup to compile an executable called `test_bitcoin` that runs all of the unit tests. The main source file is called -test_bitcoin.cpp, which simply includes other files that contain the -actual unit tests (outside of a couple required preprocessor -directives). The pattern is to create one test file for each class or -source file for which you want to create unit tests. The file naming -convention is "_tests.cpp" and such files should wrap -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. +test_bitcoin.cpp. To add a new unit test file to our test suite you need +to add the file to `src/Makefile.test.include`. The pattern is to create +one test file for each class or source file for which you want to create +unit tests. The file naming convention is `_tests.cpp` +and such files should wrap their tests in a test suite +called `_tests`. For an example of this pattern, +examine `uint256_tests.cpp`. For further reading, I found the following website to be helpful in explaining how the boost unit test framework works: @@ -31,5 +28,5 @@ example, to run just the getarg_tests verbosely: test_bitcoin --run_test=getarg_tests/doubledash -Run test_bitcoin --help for the full list. +Run `test_bitcoin --help` for the full list. From 30eac2d79a05b4d7bcb708f59ff6b92c742c02f4 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 22 Jul 2016 15:57:25 +0200 Subject: [PATCH 082/302] Use a signal to continue init after genesis activation Github-Pull: #8392 Rebased-From: 0fd2a33648ccde4b989f1d69529daea4d88b14a2 --- src/init.cpp | 40 ++++++++++++++++++++++++++++++---------- src/main.cpp | 2 -- src/test/test_bitcoin.cpp | 5 +++++ 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 8d4a2cafbfb..4458c8331b6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -510,6 +510,21 @@ static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex boost::thread t(runCommand, strCmd); // thread runs free } +static bool fHaveGenesis = false; +static boost::mutex cs_GenesisWait; +static CConditionVariable condvar_GenesisWait; + +static void BlockNotifyGenesisWait(bool, const CBlockIndex *pBlockIndex) +{ + if (pBlockIndex != NULL) { + { + boost::unique_lock lock_GenesisWait(cs_GenesisWait); + fHaveGenesis = true; + } + condvar_GenesisWait.notify_all(); + } +} + struct CImportingNow { CImportingNow() { @@ -1286,7 +1301,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) break; } - if (!fReindex) { + if (!fReindex && chainActive.Tip() != NULL) { uiInterface.InitMessage(_("Rewinding blocks...")); if (!RewindBlockIndex(chainparams)) { strLoadError = _("Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain"); @@ -1403,6 +1418,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // ********************************************************* Step 10: import blocks + // Either install a handler to notify us when genesis activates, or set fHaveGenesis directly. + // No locking, as this happens before any background thread is started. + if (chainActive.Tip() == NULL) { + uiInterface.NotifyBlockTip.connect(BlockNotifyGenesisWait); + } else { + fHaveGenesis = true; + } + if (mapArgs.count("-blocknotify")) uiInterface.NotifyBlockTip.connect(BlockNotifyCallback); @@ -1412,19 +1435,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) BOOST_FOREACH(const std::string& strFile, mapMultiArgs["-loadblock"]) vImportFiles.push_back(strFile); } + threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles)); // Wait for genesis block to be processed - bool fHaveGenesis = false; - while (!fHaveGenesis && !fRequestShutdown) { - { - LOCK(cs_main); - fHaveGenesis = (chainActive.Tip() != NULL); - } - - if (!fHaveGenesis) { - MilliSleep(10); + { + boost::unique_lock lock(cs_GenesisWait); + while (!fHaveGenesis) { + condvar_GenesisWait.wait(lock); } + uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait); } // ********************************************************* Step 11: start node diff --git a/src/main.cpp b/src/main.cpp index 01cd410da17..3392a207520 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4339,8 +4339,6 @@ bool InitBlockIndex(const CChainParams& chainparams) CBlockIndex *pindex = AddToBlockIndex(block); if (!ReceivedBlockTransactions(block, state, pindex, blockPos)) return error("LoadBlockIndex(): genesis block not accepted"); - if (!ActivateBestChain(state, chainparams, &block)) - return error("LoadBlockIndex(): genesis block cannot be activated"); // Force a chainstate write so that when we VerifyDB in a moment, it doesn't check stale data return FlushStateToDisk(state, FLUSH_STATE_ALWAYS); } catch (const std::runtime_error& e) { diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 856f9b84230..056f2982cf1 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -60,6 +60,11 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha pcoinsdbview = new CCoinsViewDB(1 << 23, true); pcoinsTip = new CCoinsViewCache(pcoinsdbview); InitBlockIndex(chainparams); + { + CValidationState state; + bool ok = ActivateBestChain(state, chainparams); + BOOST_CHECK(ok); + } nScriptCheckThreads = 3; for (int i=0; i < nScriptCheckThreads-1; i++) threadGroup.create_thread(&ThreadScriptCheck); From 3b354d213f99b89a1baf9a2c5895f172e4b351c3 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 22 Jul 2016 16:01:12 +0200 Subject: [PATCH 083/302] Add extra message to avoid a long 'Loading banlist' Github-Pull: #8392 Rebased-From: aa59f2ed3f378c02159e41ff3ae2df76ef850577 --- src/net.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net.cpp b/src/net.cpp index eb2c38dd102..a15b0403b12 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2092,6 +2092,8 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler) DumpBanlist(); } + uiInterface.InitMessage(_("Starting network threads...")); + fAddressesInitialized = true; if (semOutbound == NULL) { From fc349288cbcfe3df20d91cc16149b973eb14e272 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 22 Jul 2016 16:01:51 +0200 Subject: [PATCH 084/302] Do diskspace check before import thread is started Github-Pull: #8392 Rebased-From: 9d4eb9ad99f7c3abf7abaeaf7ea51f98f9445e75 --- src/init.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 4458c8331b6..44d8c16d955 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1418,6 +1418,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // ********************************************************* Step 10: import blocks + if (!CheckDiskSpace()) + return false; + // Either install a handler to notify us when genesis activates, or set fHaveGenesis directly. // No locking, as this happens before any background thread is started. if (chainActive.Tip() == NULL) { @@ -1449,9 +1452,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // ********************************************************* Step 11: start node - if (!CheckDiskSpace()) - return false; - if (!strErrors.str().empty()) return InitError(strErrors.str()); From 749c8a565532ee4480d8f3edd83ca08f437767a4 Mon Sep 17 00:00:00 2001 From: Justin Camarena Date: Fri, 12 Aug 2016 15:30:11 -0700 Subject: [PATCH 085/302] [doc] typos, READMEs, comments Just a quick run through some docs and fixing some text errors. Github-Pull: #8503 Rebased-From: e11f9a2f0244f1d6e34b50293b2ecca61a356bed --- doc/README_osx.md | 2 +- doc/release-notes.md | 2 +- doc/translation_process.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/README_osx.md b/doc/README_osx.md index aed3cd97e1e..6a5c672277c 100644 --- a/doc/README_osx.md +++ b/doc/README_osx.md @@ -22,7 +22,7 @@ These tools inject timestamps by default, which produce non-deterministic binaries. The ZERO_AR_DATE environment variable is used to disable that. This version of cctools has been patched to use the current version of clang's -headers and and its libLTO.so rather than those from llvmgcc, as it was +headers and its libLTO.so rather than those from llvmgcc, as it was originally done in toolchain4. To complicate things further, all builds must target an Apple SDK. These SDKs diff --git a/doc/release-notes.md b/doc/release-notes.md index 019031aed77..4478f872a9e 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -28,7 +28,7 @@ libraries such as Qt are no longer being tested on XP. We do not have time nor resources to provide support for an OS that is end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are -suggested to upgrade to a newer verion of Windows, or install an alternative OS +suggested to upgrade to a newer version of Windows, or install an alternative OS that is supported. No attempt is made to prevent installing or running the software on Windows XP, diff --git a/doc/translation_process.md b/doc/translation_process.md index 361579a73be..a443a16fe24 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -94,7 +94,7 @@ When new plurals are added to the source file, it's important to do the followin 7. Save the source file ### Translating a new language -To create a new language template, you will need to edit the languages manifest file `src/qt/bitcoin_locale.qrc` and add a new entry. Below is an example of the english language entry. +To create a new language template, you will need to edit the languages manifest file `src/qt/bitcoin_locale.qrc` and add a new entry. Below is an example of the English language entry. ```xml From 8b0bdd392317851b47bb62e90e1f6d28b47427ec Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 9 Aug 2016 05:07:28 +0000 Subject: [PATCH 086/302] configure: Allow building bench_bitcoin by itself Github-Pull: #8492 Rebased-From: 216d796ce006df36427c03f0c209c48472d65bef --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 55578c88645..4c7ef8b3ac7 100644 --- a/configure.ac +++ b/configure.ac @@ -1006,8 +1006,8 @@ else AC_MSG_RESULT([no]) fi -if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then - AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests]) +if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests = xnononononono; then + AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests]) fi AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) From fa5b2498cac2c3c036ea89d07284aa5095ed1ced Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 30 Jun 2016 01:51:09 +0000 Subject: [PATCH 087/302] Bugfix: Allow building libbitcoinconsensus without any univalue Github-Pull: #8293 Rebased-From: 8a270b25fc90495ce4b98b6d6e954fce92135dc1 --- configure.ac | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 4c7ef8b3ac7..a545bc57b7c 100644 --- a/configure.ac +++ b/configure.ac @@ -836,6 +836,12 @@ fi dnl univalue check +need_bundled_univalue=yes + +if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then + need_bundled_univalue=no +else + if test x$system_univalue != xno ; then found_univalue=no if test x$use_pkgconfig = xyes; then @@ -857,6 +863,7 @@ if test x$system_univalue != xno ; then if test x$found_univalue = xyes ; then system_univalue=yes + need_bundled_univalue=no elif test x$system_univalue = xyes ; then AC_MSG_ERROR([univalue not found]) else @@ -864,11 +871,14 @@ if test x$system_univalue != xno ; then fi fi -if test x$system_univalue = xno ; then +if test x$need_bundled_univalue = xyes ; then UNIVALUE_CFLAGS='-I$(srcdir)/univalue/include' UNIVALUE_LIBS='univalue/libunivalue.la' fi -AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$system_univalue = xno]) + +fi + +AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes]) AC_SUBST(UNIVALUE_CFLAGS) AC_SUBST(UNIVALUE_LIBS) @@ -1099,7 +1109,7 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR" unset PKG_CONFIG_LIBDIR PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP" -if test x$system_univalue = xno; then +if test x$need_bundled_univalue = xyes; then AC_CONFIG_SUBDIRS([src/univalue]) fi From 156e305dc17b952dd869f76863d3ee70364c9234 Mon Sep 17 00:00:00 2001 From: Sev Date: Sun, 14 Aug 2016 15:35:27 +0300 Subject: [PATCH 088/302] Corrected JSON typo on setban of net.cpp Github-Pull: #8512 Rebased-From: 6ffd996b8ee5f36ed4490410385f9b072da5889b --- src/rpc/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index b85c7b2e1aa..89035aaa848 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -484,7 +484,7 @@ UniValue setban(const UniValue& params, bool fHelp) "\nExamples:\n" + HelpExampleCli("setban", "\"192.168.0.6\" \"add\" 86400") + HelpExampleCli("setban", "\"192.168.0.0/24\" \"add\"") - + HelpExampleRpc("setban", "\"192.168.0.6\", \"add\" 86400") + + HelpExampleRpc("setban", "\"192.168.0.6\", \"add\", 86400") ); CSubNet subNet; From 4e5fc31ae69076224c58dbe41bbd62497510de7d Mon Sep 17 00:00:00 2001 From: Jeremy Rubin Date: Sun, 14 Aug 2016 20:45:46 -0400 Subject: [PATCH 089/302] Fix a type error that would not compile on Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Github-Pull: #8513 Rebased-From: 8194a6e525514d5cda85ac08273a6ffb6d5b6cac --- src/httpserver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/httpserver.h b/src/httpserver.h index 20a119cc5c9..42a142dde85 100644 --- a/src/httpserver.h +++ b/src/httpserver.h @@ -35,7 +35,7 @@ void InterruptHTTPServer(); void StopHTTPServer(); /** Handler for requests to a certain HTTP path */ -typedef boost::function HTTPRequestHandler; +typedef boost::function HTTPRequestHandler; /** Register handler for prefix. * If multiple handlers match a prefix, the first-registered one will * be invoked. From befe654f0f6a4384f25bd8af317ef95919a0ece9 Mon Sep 17 00:00:00 2001 From: leijurv Date: Sat, 13 Aug 2016 11:21:13 -0600 Subject: [PATCH 090/302] various typos Github-Pull: #8505 Rebased-From: 1aacfc2da521a8e0d718e9ac561d9b2d7916eb0b --- src/blockencodings.cpp | 2 +- src/init.cpp | 2 +- src/main.cpp | 6 +++--- src/main.h | 2 +- src/net.cpp | 2 +- src/rpc/mining.cpp | 2 +- src/wallet/wallet.cpp | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index 5c4c3bd2748..df237f8f26f 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -75,7 +75,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c } prefilled_count = cmpctblock.prefilledtxn.size(); - // Calculate map of txids -> positions and check mempool to see what we have (or dont) + // Calculate map of txids -> positions and check mempool to see what we have (or don't) // Because well-formed cmpctblock messages will have a (relatively) uniform distribution // of short IDs, any highly-uneven distribution of elements can be safely treated as a // READ_STATUS_FAILED. diff --git a/src/init.cpp b/src/init.cpp index 44d8c16d955..7f856e40780 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1231,7 +1231,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) // cache size calculations int64_t nTotalCache = (GetArg("-dbcache", nDefaultDbCache) << 20); nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache - nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greated than nMaxDbcache + nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greater than nMaxDbcache int64_t nBlockTreeDBCache = nTotalCache / 8; nBlockTreeDBCache = std::min(nBlockTreeDBCache, (GetBoolArg("-txindex", DEFAULT_TXINDEX) ? nMaxBlockDBAndTxIndexCache : nMaxBlockDBCache) << 20); nTotalCache -= nBlockTreeDBCache; diff --git a/src/main.cpp b/src/main.cpp index 3392a207520..45af5138c3c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1183,7 +1183,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // nSequence >= maxint-1 on all inputs. // // maxint-1 is picked to still allow use of nLockTime by - // non-replacable transactions. All inputs rather than just one + // non-replaceable transactions. All inputs rather than just one // is for the sake of multi-party protocols, where we don't // want a single party to be able to disable replacement. // @@ -1998,7 +1998,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi // is safe because block merkle hashes are still computed and checked, // and any change will be caught at the next checkpoint. Of course, if // the checkpoint is for a chain that's invalid due to false scriptSigs - // this optimisation would allow an invalid chain to be accepted. + // this optimization would allow an invalid chain to be accepted. if (fScriptChecks) { for (unsigned int i = 0; i < tx.vin.size(); i++) { const COutPoint &prevout = tx.vin[i].prevout; @@ -4829,7 +4829,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam { // If a peer is asking for old blocks, we're almost guaranteed // they wont have a useful mempool to match against a compact block, - // and we dont feel like constructing the object for them, so + // and we don't feel like constructing the object for them, so // instead we respond with the full, non-compact block. if (mi->second->nHeight >= chainActive.Height() - 10) { CBlockHeaderAndShortTxIDs cmpctblock(block); diff --git a/src/main.h b/src/main.h index 8cae9c953f2..0ca13d82d63 100644 --- a/src/main.h +++ b/src/main.h @@ -215,7 +215,7 @@ void UnregisterNodeSignals(CNodeSignals& nodeSignals); * block is made active. Note that it does not, however, guarantee that the * specific block passed to it has been checked for validity! * - * @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface (see validationinterface.h) - this will have its BlockChecked method called whenever *any* block completes validation. + * @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganization; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface (see validationinterface.h) - this will have its BlockChecked method called whenever *any* block completes validation. * @param[in] pfrom The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid. * @param[in] pblock The block we want to process. * @param[in] fForceProcessing Process this block even if unrequested; used for non-network block sources and whitelisted peers. diff --git a/src/net.cpp b/src/net.cpp index a15b0403b12..fb85bedffae 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1707,7 +1707,7 @@ void ThreadOpenConnections() if (nANow - addr.nLastTry < 600 && nTries < 30) continue; - // only consider nodes missing relevant services after 40 failed attemps + // only consider nodes missing relevant services after 40 failed attempts if ((addr.nServices & nRelevantServices) != nRelevantServices && nTries < 40) continue; diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 2479e5d5953..6d88d4bec81 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -650,7 +650,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) if (nMaxVersionPreVB >= 2) { // If VB is supported by the client, nMaxVersionPreVB is -1, so we won't get here - // Because BIP 34 changed how the generation transaction is serialised, we can only use version/force back to v2 blocks + // Because BIP 34 changed how the generation transaction is serialized, we can only use version/force back to v2 blocks // This is safe to do [otherwise-]unconditionally only because we are throwing an exception above if a non-force deployment gets activated // Note that this can probably also be removed entirely after the first BIP9 non-force deployment (ie, probably segwit) gets activated aMutable.push_back("version/force"); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 32a01d2db0b..2fea5ed3917 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3140,7 +3140,7 @@ void CWallet::GetKeyBirthTimes(std::map &mapKeyBirth) const { mapKeyBirth[it->first] = it->second.nCreateTime; // map in which we'll infer heights of other keys - CBlockIndex *pindexMax = chainActive[std::max(0, chainActive.Height() - 144)]; // the tip can be reorganised; use a 144-block safety margin + CBlockIndex *pindexMax = chainActive[std::max(0, chainActive.Height() - 144)]; // the tip can be reorganized; use a 144-block safety margin std::map mapKeyFirstBlock; std::set setKeys; GetKeys(setKeys); From a27cdd8edf9083dd38cdb39b4067286ea20e15ea Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 17 Aug 2016 13:28:09 +0200 Subject: [PATCH 091/302] [qa] abandonconflict: Use assert_equal Github-Pull: #8531 Rebased-From: fa64306520156af1d1fe90e92f6cc22ffa097c02 --- qa/rpc-tests/abandonconflict.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/qa/rpc-tests/abandonconflict.py b/qa/rpc-tests/abandonconflict.py index c50c3cc562e..874df487777 100755 --- a/qa/rpc-tests/abandonconflict.py +++ b/qa/rpc-tests/abandonconflict.py @@ -68,7 +68,7 @@ def run_test(self): # In mempool txs from self should increase balance from change newbalance = self.nodes[0].getbalance() - assert(newbalance == balance - Decimal("30") + Decimal("24.9996")) + assert_equal(newbalance, balance - Decimal("30") + Decimal("24.9996")) balance = newbalance # Restart the node with a higher min relay fee so the parent tx is no longer in mempool @@ -78,16 +78,16 @@ def run_test(self): self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.0001"]) # Verify txs no longer in mempool - assert(len(self.nodes[0].getrawmempool()) == 0) + assert_equal(len(self.nodes[0].getrawmempool()), 0) # Not in mempool txs from self should only reduce balance # inputs are still spent, but change not received newbalance = self.nodes[0].getbalance() - assert(newbalance == balance - Decimal("24.9996")) + assert_equal(newbalance, balance - Decimal("24.9996")) # Unconfirmed received funds that are not in mempool, also shouldn't show # up in unconfirmed balance unconfbalance = self.nodes[0].getunconfirmedbalance() + self.nodes[0].getbalance() - assert(unconfbalance == newbalance) + assert_equal(unconfbalance, newbalance) # Also shouldn't show up in listunspent assert(not txABC2 in [utxo["txid"] for utxo in self.nodes[0].listunspent(0)]) balance = newbalance @@ -96,35 +96,35 @@ def run_test(self): # including that the child tx was also abandoned self.nodes[0].abandontransaction(txAB1) newbalance = self.nodes[0].getbalance() - assert(newbalance == balance + Decimal("30")) + assert_equal(newbalance, balance + Decimal("30")) balance = newbalance # Verify that even with a low min relay fee, the tx is not reaccepted from wallet on startup once abandoned stop_node(self.nodes[0],0) self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.00001"]) - assert(len(self.nodes[0].getrawmempool()) == 0) - assert(self.nodes[0].getbalance() == balance) + assert_equal(len(self.nodes[0].getrawmempool()), 0) + assert_equal(self.nodes[0].getbalance(), balance) # But if its received again then it is unabandoned # And since now in mempool, the change is available # But its child tx remains abandoned self.nodes[0].sendrawtransaction(signed["hex"]) newbalance = self.nodes[0].getbalance() - assert(newbalance == balance - Decimal("20") + Decimal("14.99998")) + assert_equal(newbalance, balance - Decimal("20") + Decimal("14.99998")) balance = newbalance # Send child tx again so its unabandoned self.nodes[0].sendrawtransaction(signed2["hex"]) newbalance = self.nodes[0].getbalance() - assert(newbalance == balance - Decimal("10") - Decimal("14.99998") + Decimal("24.9996")) + assert_equal(newbalance, balance - Decimal("10") - Decimal("14.99998") + Decimal("24.9996")) balance = newbalance # Remove using high relay fee again stop_node(self.nodes[0],0) self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-logtimemicros","-minrelaytxfee=0.0001"]) - assert(len(self.nodes[0].getrawmempool()) == 0) + assert_equal(len(self.nodes[0].getrawmempool()), 0) newbalance = self.nodes[0].getbalance() - assert(newbalance == balance - Decimal("24.9996")) + assert_equal(newbalance, balance - Decimal("24.9996")) balance = newbalance # Create a double spend of AB1 by spending again from only A's 10 output @@ -143,7 +143,7 @@ def run_test(self): # Verify that B and C's 10 BTC outputs are available for spending again because AB1 is now conflicted newbalance = self.nodes[0].getbalance() - assert(newbalance == balance + Decimal("20")) + assert_equal(newbalance, balance + Decimal("20")) balance = newbalance # There is currently a minor bug around this and so this test doesn't work. See Issue #7315 @@ -151,7 +151,7 @@ def run_test(self): # Don't think C's should either self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) newbalance = self.nodes[0].getbalance() - #assert(newbalance == balance - Decimal("10")) + #assert_equal(newbalance, balance - Decimal("10")) print("If balance has not declined after invalidateblock then out of mempool wallet tx which is no longer") print("conflicted has not resumed causing its inputs to be seen as spent. See Issue #7315") print(str(balance) + " -> " + str(newbalance) + " ?") From b17a3f9e5af0a97a4d744bcbdac11fcb19de546c Mon Sep 17 00:00:00 2001 From: Jameson Lopp Date: Thu, 4 Aug 2016 17:33:59 -0400 Subject: [PATCH 092/302] document return value of networkhashps for getmininginfo RPC endpoint Github-Pull: #8461 Rebased-From: 65f4532f13a89cacc4909072601d71ee7ebae5c5 --- src/rpc/mining.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 6d88d4bec81..a26340f3e42 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -227,10 +227,11 @@ UniValue getmininginfo(const UniValue& params, bool fHelp) " \"currentblockweight\": nnn, (numeric) The last block weight\n" " \"currentblocktx\": nnn, (numeric) The last block transaction\n" " \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n" - " \"errors\": \"...\" (string) Current errors\n" + " \"errors\": \"...\" (string) Current errors\n" + " \"networkhashps\": nnn, (numeric) The network hashes per second\n" " \"pooledtx\": n (numeric) The size of the mem pool\n" " \"testnet\": true|false (boolean) If using testnet or not\n" - " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" + " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" "}\n" "\nExamples:\n" + HelpExampleCli("getmininginfo", "") From 464dedd6ab496bb520cc8a5b1b69ca7ebdcdf815 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Mon, 1 Aug 2016 15:18:15 +0200 Subject: [PATCH 093/302] [Wallet] Trivial cleanup of HD wallet changes Github-Pull: #8443 Rebased-From: 7e5d94df1fb09ed7ee7ed50032f876972ef39489 --- src/wallet/wallet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2fea5ed3917..12b83e54c7a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1199,7 +1199,7 @@ CPubKey CWallet::GenerateNewHDMasterKey() // write the key&metadata to the database if (!AddKeyPubKey(key, pubkey)) - throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed"); + throw std::runtime_error(std::string(__func__)+": AddKeyPubKey failed"); } return pubkey; @@ -3331,7 +3331,6 @@ bool CWallet::InitLoadWallet() // Create new keyUser and set as default key if (GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) && walletInstance->hdChain.masterKeyID.IsNull()) { // generate a new master key - CKey key; CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey(); if (!walletInstance->SetHDMasterKey(masterPubKey)) throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed"); From 305d8ac90b5c1301ec243024a5c68880f7a27ccc Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 19 Aug 2016 18:31:35 +0200 Subject: [PATCH 094/302] Use __func__ to get function name for output printing Github-Pull: #8548 Rebased-From: fa785d121152c652d0704ac32ce8611262e609d2 --- src/main.cpp | 2 +- src/primitives/transaction.cpp | 2 +- src/wallet/wallet.cpp | 34 +++++++++++++++++----------------- src/wallet/walletdb.cpp | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 45af5138c3c..8d8fb1502de 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3962,7 +3962,7 @@ CBlockIndex * InsertBlockIndex(uint256 hash) // Create new CBlockIndex* pindexNew = new CBlockIndex(); if (!pindexNew) - throw runtime_error("LoadBlockIndex(): new CBlockIndex failed"); + throw runtime_error(std::string(__func__) + ": new CBlockIndex failed"); mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; pindexNew->phashBlock = &((*mi).first); diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index 8d638056436..2fdc59ea077 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -100,7 +100,7 @@ CAmount CTransaction::GetValueOut() const { nValueOut += it->nValue; if (!MoneyRange(it->nValue) || !MoneyRange(nValueOut)) - throw std::runtime_error("CTransaction::GetValueOut(): value out of range"); + throw std::runtime_error(std::string(__func__) + ": value out of range"); } return nValueOut; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 12b83e54c7a..6ce8d19bfbb 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -108,7 +108,7 @@ CPubKey CWallet::GenerateNewKey() // try to get the master key if (!GetKey(hdChain.masterKeyID, key)) - throw std::runtime_error("CWallet::GenerateNewKey(): Master key not found"); + throw std::runtime_error(std::string(__func__) + ": Master key not found"); masterKey.SetMaster(key.begin(), key.size()); @@ -135,7 +135,7 @@ CPubKey CWallet::GenerateNewKey() // update the chain model in the database if (!CWalletDB(strWalletFile).WriteHDChain(hdChain)) - throw std::runtime_error("CWallet::GenerateNewKey(): Writing HD chain model failed"); + throw std::runtime_error(std::string(__func__) + ": Writing HD chain model failed"); } else { secret.MakeNewKey(fCompressed); } @@ -152,7 +152,7 @@ CPubKey CWallet::GenerateNewKey() nTimeFirstKey = nCreationTime; if (!AddKeyPubKey(secret, pubkey)) - throw std::runtime_error("CWallet::GenerateNewKey(): AddKey failed"); + throw std::runtime_error(std::string(__func__) + ": AddKey failed"); return pubkey; } @@ -1093,7 +1093,7 @@ isminetype CWallet::IsMine(const CTxOut& txout) const CAmount CWallet::GetCredit(const CTxOut& txout, const isminefilter& filter) const { if (!MoneyRange(txout.nValue)) - throw std::runtime_error("CWallet::GetCredit(): value out of range"); + throw std::runtime_error(std::string(__func__) + ": value out of range"); return ((IsMine(txout) & filter) ? txout.nValue : 0); } @@ -1122,7 +1122,7 @@ bool CWallet::IsChange(const CTxOut& txout) const CAmount CWallet::GetChange(const CTxOut& txout) const { if (!MoneyRange(txout.nValue)) - throw std::runtime_error("CWallet::GetChange(): value out of range"); + throw std::runtime_error(std::string(__func__) + ": value out of range"); return (IsChange(txout) ? txout.nValue : 0); } @@ -1146,7 +1146,7 @@ CAmount CWallet::GetDebit(const CTransaction& tx, const isminefilter& filter) co { nDebit += GetDebit(txin, filter); if (!MoneyRange(nDebit)) - throw std::runtime_error("CWallet::GetDebit(): value out of range"); + throw std::runtime_error(std::string(__func__) + ": value out of range"); } return nDebit; } @@ -1158,7 +1158,7 @@ CAmount CWallet::GetCredit(const CTransaction& tx, const isminefilter& filter) c { nCredit += GetCredit(txout, filter); if (!MoneyRange(nCredit)) - throw std::runtime_error("CWallet::GetCredit(): value out of range"); + throw std::runtime_error(std::string(__func__) + ": value out of range"); } return nCredit; } @@ -1170,7 +1170,7 @@ CAmount CWallet::GetChange(const CTransaction& tx) const { nChange += GetChange(txout); if (!MoneyRange(nChange)) - throw std::runtime_error("CWallet::GetChange(): value out of range"); + throw std::runtime_error(std::string(__func__) + ": value out of range"); } return nChange; } @@ -1199,7 +1199,7 @@ CPubKey CWallet::GenerateNewHDMasterKey() // write the key&metadata to the database if (!AddKeyPubKey(key, pubkey)) - throw std::runtime_error(std::string(__func__)+": AddKeyPubKey failed"); + throw std::runtime_error(std::string(__func__) + ": AddKeyPubKey failed"); } return pubkey; @@ -1226,7 +1226,7 @@ bool CWallet::SetHDChain(const CHDChain& chain, bool memonly) { LOCK(cs_wallet); if (!memonly && !CWalletDB(strWalletFile).WriteHDChain(chain)) - throw runtime_error("AddHDChain(): writing chain failed"); + throw runtime_error(std::string(__func__) + ": writing chain failed"); hdChain = chain; return true; @@ -2714,7 +2714,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize) if (!setKeyPool.empty()) nEnd = *(--setKeyPool.end()) + 1; if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey()))) - throw runtime_error("TopUpKeyPool(): writing generated key failed"); + throw runtime_error(std::string(__func__) + ": writing generated key failed"); setKeyPool.insert(nEnd); LogPrintf("keypool added key %d, size=%u\n", nEnd, setKeyPool.size()); } @@ -2741,9 +2741,9 @@ void CWallet::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool) nIndex = *(setKeyPool.begin()); setKeyPool.erase(setKeyPool.begin()); if (!walletdb.ReadPool(nIndex, keypool)) - throw runtime_error("ReserveKeyFromKeyPool(): read failed"); + throw runtime_error(std::string(__func__) + ": read failed"); if (!HaveKey(keypool.vchPubKey.GetID())) - throw runtime_error("ReserveKeyFromKeyPool(): unknown key in key pool"); + throw runtime_error(std::string(__func__) + ": unknown key in key pool"); assert(keypool.vchPubKey.IsValid()); LogPrintf("keypool reserve %d\n", nIndex); } @@ -2802,7 +2802,7 @@ int64_t CWallet::GetOldestKeyPoolTime() CWalletDB walletdb(strWalletFile); int64_t nIndex = *(setKeyPool.begin()); if (!walletdb.ReadPool(nIndex, keypool)) - throw runtime_error("GetOldestKeyPoolTime(): read oldest key in keypool failed"); + throw runtime_error(std::string(__func__) + ": read oldest key in keypool failed"); assert(keypool.vchPubKey.IsValid()); return keypool.nTime; } @@ -3029,11 +3029,11 @@ void CWallet::GetAllReserveKeys(set& setAddress) const { CKeyPool keypool; if (!walletdb.ReadPool(id, keypool)) - throw runtime_error("GetAllReserveKeyHashes(): read failed"); + throw runtime_error(std::string(__func__) + ": read failed"); assert(keypool.vchPubKey.IsValid()); CKeyID keyID = keypool.vchPubKey.GetID(); if (!HaveKey(keyID)) - throw runtime_error("GetAllReserveKeyHashes(): unknown key in key pool"); + throw runtime_error(std::string(__func__) + ": unknown key in key pool"); setAddress.insert(keyID); } } @@ -3333,7 +3333,7 @@ bool CWallet::InitLoadWallet() // generate a new master key CPubKey masterPubKey = walletInstance->GenerateNewHDMasterKey(); if (!walletInstance->SetHDMasterKey(masterPubKey)) - throw std::runtime_error("CWallet::GenerateNewKey(): Storing master key failed"); + throw std::runtime_error(std::string(__func__) + ": Storing master key failed"); } CPubKey newDefaultKey; if (walletInstance->GetKeyFromPool(newDefaultKey)) { diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 72af8ab7b25..31aec0f9e53 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -215,7 +215,7 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, listclose(); - throw runtime_error("CWalletDB::ListAccountCreditDebit(): error scanning DB"); + throw runtime_error(std::string(__func__) + ": error scanning DB"); } // Unserialize From 75d548475dcf74fc0e69c4e5a4a6a0c213950cde Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 22 Aug 2016 09:24:50 +0200 Subject: [PATCH 095/302] Add copyright header to wallet_text_fixture.cpp I created the file but forgot to add this header. Github-Pull: #8558 Rebased-From: 653bb3d64057f11c5c9a8f539ba57be549097cee --- src/wallet/test/wallet_test_fixture.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wallet/test/wallet_test_fixture.cpp b/src/wallet/test/wallet_test_fixture.cpp index 9036ee26d83..a76db376179 100644 --- a/src/wallet/test/wallet_test_fixture.cpp +++ b/src/wallet/test/wallet_test_fixture.cpp @@ -1,3 +1,7 @@ +// Copyright (c) 2016 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #include "wallet/test/wallet_test_fixture.h" #include "rpc/server.h" From cb07f19e90951fc47604a12b500514ff08742c31 Mon Sep 17 00:00:00 2001 From: crowning- Date: Thu, 18 Aug 2016 16:52:38 +0200 Subject: [PATCH 096/302] CDB: fix debug output It doesn't really help to clear a variable before printing it to the debug log. Github-Pull: #8539 Rebased-From: fab2e26d2033ca3c7a24f6a0ad6529fceda52ebc --- src/wallet/db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index c906785e9e2..cfd007ca1c8 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -284,7 +284,7 @@ CDB::CDB(const std::string& strFilename, const char* pszMode, bool fFlushOnClose pdb = NULL; --bitdb.mapFileUseCount[strFile]; strFile = ""; - throw runtime_error(strprintf("CDB: Error %d, can't open database %s", ret, strFile)); + throw runtime_error(strprintf("CDB: Error %d, can't open database %s", ret, strFilename)); } if (fCreate && !Exists(string("version"))) { From c493f436218b473e11eac3786222b53430ef592b Mon Sep 17 00:00:00 2001 From: Christian Barcenas Date: Mon, 22 Aug 2016 20:49:36 -0400 Subject: [PATCH 097/302] Trivial: Fix two VarInt examples in serialize.h Github-Pull: #8560 Rebased-From: 7bd5ff46237b06b3cf223176c1c71ef66383fa92 --- src/serialize.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serialize.h b/src/serialize.h index 378ed39074e..04ab9aa2e77 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -322,8 +322,8 @@ uint64_t ReadCompactSize(Stream& is) * 0: [0x00] 256: [0x81 0x00] * 1: [0x01] 16383: [0xFE 0x7F] * 127: [0x7F] 16384: [0xFF 0x00] - * 128: [0x80 0x00] 16511: [0x80 0xFF 0x7F] - * 255: [0x80 0x7F] 65535: [0x82 0xFD 0x7F] + * 128: [0x80 0x00] 16511: [0xFF 0x7F] + * 255: [0x80 0x7F] 65535: [0x82 0xFE 0x7F] * 2^32: [0x8E 0xFE 0xFE 0xFF 0x00] */ From 863ae74a1fdc11aec2e94167b30c1d7f7b6fd1e7 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 13 Jun 2016 12:10:46 +0200 Subject: [PATCH 098/302] [doc] Update git-subtree-check.sh README Github-Pull: #8545 Rebased-From: fa3d9740099c8513f9942983f135f58890e62cb5 --- contrib/devtools/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index bb8b9246b87..af5c000b030 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -51,8 +51,9 @@ maintained: * for `src/secp256k1`: https://github.com/bitcoin-core/secp256k1.git (branch master) * for `src/leveldb`: https://github.com/bitcoin-core/leveldb.git (branch bitcoin-fork) * for `src/univalue`: https://github.com/bitcoin-core/univalue.git (branch master) +* for `src/crypto/ctaes`: https://github.com/bitcoin-core/ctaes.git (branch master) -Usage: `git-subtree-check.sh DIR COMMIT` +Usage: `git-subtree-check.sh DIR (COMMIT)` `COMMIT` may be omitted, in which case `HEAD` is used. From 4f84082a74fcddda425344cb3444418856ea75e4 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 24 Aug 2016 09:06:56 +0200 Subject: [PATCH 099/302] Set jonasschnellis dns-seeder filter flag Github-Pull: #8573 Rebased-From: 40a95cfd8f21bedbf35016b920f26c19bfb25c69 --- src/chainparams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 86bef1e1050..0cb0fccd17c 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -119,7 +119,7 @@ class CMainParams : public CChainParams { vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik - vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch")); // Jonas Schnelli + vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,0); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,5); From 9556745dc2f3bda3a91be799fd4d92ba50ed3c95 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 3 May 2016 18:02:46 +0200 Subject: [PATCH 100/302] init: Fix typo in help message for -whitelistforcerelay Reported by pryds on Transifex in the Danish translation. Github-Pull: #8607 Rebased-From: 67a55025a1ea5d0461139cd6764686a77524feed --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 7f856e40780..9b6eca2e1d1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -379,7 +379,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-whitelist=", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") + " " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway")); strUsage += HelpMessageOpt("-whitelistrelay", strprintf(_("Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)"), DEFAULT_WHITELISTRELAY)); - strUsage += HelpMessageOpt("-whitelistforcerelay", strprintf(_("Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)"), DEFAULT_WHITELISTFORCERELAY)); + strUsage += HelpMessageOpt("-whitelistforcerelay", strprintf(_("Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)"), DEFAULT_WHITELISTFORCERELAY)); strUsage += HelpMessageOpt("-maxuploadtarget=", strprintf(_("Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)"), DEFAULT_MAX_UPLOAD_TARGET)); #ifdef ENABLE_WALLET From c18a9ca7886ada5dfc43787631c578a32f7dc5bf Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 29 Jun 2016 11:53:07 +0200 Subject: [PATCH 101/302] [qa] pull-tester: Don't mute zmq ImportError Github-Pull: #8607 Rebased-From: fabfd5dae28cbe26e71d50dbfb6feab03673f27a --- qa/pull-tester/rpc-tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index d3b4ebb8ecc..634d6758902 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -94,12 +94,12 @@ if ENABLE_ZMQ: try: import zmq - except ImportError as e: - print("WARNING: \"import zmq\" failed. Set ENABLE_ZMQ=0 or " \ - "to run zmq tests, see dependency info in /qa/README.md.") - ENABLE_ZMQ=0 + except ImportError: + print("ERROR: \"import zmq\" failed. Set ENABLE_ZMQ=0 or " + "to run zmq tests, see dependency info in /qa/README.md.") + # ENABLE_ZMQ=0 + raise -#Tests testScripts = [ # longest test should go first, to favor running tests in parallel 'p2p-fullblocktest.py', From 486650ae6a8ab44c0ac4f8a935b51629c04c1282 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 29 Jun 2016 11:48:51 +0200 Subject: [PATCH 102/302] [doc] Fix typos in comments, doxygen: Fix comment syntax Github-Pull: #8607 Rebased-From: fa27c0a2c4545a579bf339e816c3fa785252b7dc --- src/chain.h | 10 ++++---- src/consensus/validation.h | 6 ++--- src/rpc/protocol.h | 54 ++++++++++++++++++++++---------------------- src/script/sign.h | 2 +- src/zmq/zmqpublishnotifier.h | 2 +- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/chain.h b/src/chain.h index 76a774c1238..6588e8f57d2 100644 --- a/src/chain.h +++ b/src/chain.h @@ -137,15 +137,15 @@ enum BlockStatus: uint32_t { BLOCK_VALID_MASK = BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS | BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS, - BLOCK_HAVE_DATA = 8, //! full block available in blk*.dat - BLOCK_HAVE_UNDO = 16, //! undo data available in rev*.dat + BLOCK_HAVE_DATA = 8, //!< full block available in blk*.dat + BLOCK_HAVE_UNDO = 16, //!< undo data available in rev*.dat BLOCK_HAVE_MASK = BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO, - BLOCK_FAILED_VALID = 32, //! stage after last reached validness failed - BLOCK_FAILED_CHILD = 64, //! descends from failed block + BLOCK_FAILED_VALID = 32, //!< stage after last reached validness failed + BLOCK_FAILED_CHILD = 64, //!< descends from failed block BLOCK_FAILED_MASK = BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD, - BLOCK_OPT_WITNESS = 128, //! block data in blk*.data was received with a witness-enforcing client + BLOCK_OPT_WITNESS = 128, //!< block data in blk*.data was received with a witness-enforcing client }; /** The block chain is a tree shaped structure starting with the diff --git a/src/consensus/validation.h b/src/consensus/validation.h index 000b1972702..3e24294a642 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -22,9 +22,9 @@ static const unsigned char REJECT_CHECKPOINT = 0x43; class CValidationState { private: enum mode_state { - MODE_VALID, //! everything ok - MODE_INVALID, //! network rule violation (DoS value may be set) - MODE_ERROR, //! run-time error + MODE_VALID, //!< everything ok + MODE_INVALID, //!< network rule violation (DoS value may be set) + MODE_ERROR, //!< run-time error } mode; int nDoS; std::string strRejectReason; diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h index 55d0aac68b7..988e0fc5fac 100644 --- a/src/rpc/protocol.h +++ b/src/rpc/protocol.h @@ -38,18 +38,18 @@ enum RPCErrorCode RPC_PARSE_ERROR = -32700, //! General application defined errors - RPC_MISC_ERROR = -1, //! std::exception thrown in command handling - RPC_FORBIDDEN_BY_SAFE_MODE = -2, //! Server is in safe mode, and command is not allowed in safe mode - RPC_TYPE_ERROR = -3, //! Unexpected type was passed as parameter - RPC_INVALID_ADDRESS_OR_KEY = -5, //! Invalid address or key - RPC_OUT_OF_MEMORY = -7, //! Ran out of memory during operation - RPC_INVALID_PARAMETER = -8, //! Invalid, missing or duplicate parameter - RPC_DATABASE_ERROR = -20, //! Database error - RPC_DESERIALIZATION_ERROR = -22, //! Error parsing or validating structure in raw format - RPC_VERIFY_ERROR = -25, //! General error during transaction or block submission - RPC_VERIFY_REJECTED = -26, //! Transaction or block was rejected by network rules - RPC_VERIFY_ALREADY_IN_CHAIN = -27, //! Transaction already in chain - RPC_IN_WARMUP = -28, //! Client still warming up + RPC_MISC_ERROR = -1, //!< std::exception thrown in command handling + RPC_FORBIDDEN_BY_SAFE_MODE = -2, //!< Server is in safe mode, and command is not allowed in safe mode + RPC_TYPE_ERROR = -3, //!< Unexpected type was passed as parameter + RPC_INVALID_ADDRESS_OR_KEY = -5, //!< Invalid address or key + RPC_OUT_OF_MEMORY = -7, //!< Ran out of memory during operation + RPC_INVALID_PARAMETER = -8, //!< Invalid, missing or duplicate parameter + RPC_DATABASE_ERROR = -20, //!< Database error + RPC_DESERIALIZATION_ERROR = -22, //!< Error parsing or validating structure in raw format + RPC_VERIFY_ERROR = -25, //!< General error during transaction or block submission + RPC_VERIFY_REJECTED = -26, //!< Transaction or block was rejected by network rules + RPC_VERIFY_ALREADY_IN_CHAIN = -27, //!< Transaction already in chain + RPC_IN_WARMUP = -28, //!< Client still warming up //! Aliases for backward compatibility RPC_TRANSACTION_ERROR = RPC_VERIFY_ERROR, @@ -57,23 +57,23 @@ enum RPCErrorCode RPC_TRANSACTION_ALREADY_IN_CHAIN= RPC_VERIFY_ALREADY_IN_CHAIN, //! P2P client errors - RPC_CLIENT_NOT_CONNECTED = -9, //! Bitcoin is not connected - RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, //! Still downloading initial blocks - RPC_CLIENT_NODE_ALREADY_ADDED = -23, //! Node is already added - RPC_CLIENT_NODE_NOT_ADDED = -24, //! Node has not been added before - RPC_CLIENT_NODE_NOT_CONNECTED = -29, //! Node to disconnect not found in connected nodes - RPC_CLIENT_INVALID_IP_OR_SUBNET = -30, //! Invalid IP/Subnet + RPC_CLIENT_NOT_CONNECTED = -9, //!< Bitcoin is not connected + RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, //!< Still downloading initial blocks + RPC_CLIENT_NODE_ALREADY_ADDED = -23, //!< Node is already added + RPC_CLIENT_NODE_NOT_ADDED = -24, //!< Node has not been added before + RPC_CLIENT_NODE_NOT_CONNECTED = -29, //!< Node to disconnect not found in connected nodes + RPC_CLIENT_INVALID_IP_OR_SUBNET = -30, //!< Invalid IP/Subnet //! Wallet errors - RPC_WALLET_ERROR = -4, //! Unspecified problem with wallet (key not found etc.) - RPC_WALLET_INSUFFICIENT_FUNDS = -6, //! Not enough funds in wallet or account - RPC_WALLET_INVALID_ACCOUNT_NAME = -11, //! Invalid account name - RPC_WALLET_KEYPOOL_RAN_OUT = -12, //! Keypool ran out, call keypoolrefill first - RPC_WALLET_UNLOCK_NEEDED = -13, //! Enter the wallet passphrase with walletpassphrase first - RPC_WALLET_PASSPHRASE_INCORRECT = -14, //! The wallet passphrase entered was incorrect - RPC_WALLET_WRONG_ENC_STATE = -15, //! Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.) - RPC_WALLET_ENCRYPTION_FAILED = -16, //! Failed to encrypt the wallet - RPC_WALLET_ALREADY_UNLOCKED = -17, //! Wallet is already unlocked + RPC_WALLET_ERROR = -4, //!< Unspecified problem with wallet (key not found etc.) + RPC_WALLET_INSUFFICIENT_FUNDS = -6, //!< Not enough funds in wallet or account + RPC_WALLET_INVALID_ACCOUNT_NAME = -11, //!< Invalid account name + RPC_WALLET_KEYPOOL_RAN_OUT = -12, //!< Keypool ran out, call keypoolrefill first + RPC_WALLET_UNLOCK_NEEDED = -13, //!< Enter the wallet passphrase with walletpassphrase first + RPC_WALLET_PASSPHRASE_INCORRECT = -14, //!< The wallet passphrase entered was incorrect + RPC_WALLET_WRONG_ENC_STATE = -15, //!< Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.) + RPC_WALLET_ENCRYPTION_FAILED = -16, //!< Failed to encrypt the wallet + RPC_WALLET_ALREADY_UNLOCKED = -17, //!< Wallet is already unlocked }; std::string JSONRPCRequest(const std::string& strMethod, const UniValue& params, const UniValue& id); diff --git a/src/script/sign.h b/src/script/sign.h index 6404b4523ec..f9aa6fca271 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -51,7 +51,7 @@ class MutableTransactionSignatureCreator : public TransactionSignatureCreator { MutableTransactionSignatureCreator(const CKeyStore* keystoreIn, const CMutableTransaction* txToIn, unsigned int nInIn, const CAmount& amount, int nHashTypeIn) : TransactionSignatureCreator(keystoreIn, &tx, nInIn, amount, nHashTypeIn), tx(*txToIn) {} }; -/** A signature creator that just produces 72-byte empty signatyres. */ +/** A signature creator that just produces 72-byte empty signatures. */ class DummySignatureCreator : public BaseSignatureCreator { public: DummySignatureCreator(const CKeyStore* keystoreIn) : BaseSignatureCreator(keystoreIn) {} diff --git a/src/zmq/zmqpublishnotifier.h b/src/zmq/zmqpublishnotifier.h index 22f02a3d0db..751ded39572 100644 --- a/src/zmq/zmqpublishnotifier.h +++ b/src/zmq/zmqpublishnotifier.h @@ -12,7 +12,7 @@ class CBlockIndex; class CZMQAbstractPublishNotifier : public CZMQAbstractNotifier { private: - uint32_t nSequence; //! upcounting per message sequence number + uint32_t nSequence; //!< upcounting per message sequence number public: From 752fbae697db0a255999695e83d163f21d2ebc15 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 1 Jul 2016 12:39:04 +0200 Subject: [PATCH 103/302] contrib: Make fix-copyright-headers.py more portable Github-Pull: #8607 Rebased-From: fafe7b3432d5117e3f207eafe2fca1f9637b24f6 --- contrib/devtools/fix-copyright-headers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/devtools/fix-copyright-headers.py b/contrib/devtools/fix-copyright-headers.py index b6414a551f8..31a81ae4fad 100755 --- a/contrib/devtools/fix-copyright-headers.py +++ b/contrib/devtools/fix-copyright-headers.py @@ -16,7 +16,7 @@ import re year = time.gmtime()[0] -CMD_GIT_DATE = 'git log --format=@%%at -1 %s | date +"%%Y" -u -f -' +CMD_GIT_DATE = 'git log --format=%%ad --date=short -1 %s | cut -d"-" -f 1' CMD_REGEX= "perl -pi -e 's/(20\d\d)(?:-20\d\d)? The Bitcoin/$1-%s The Bitcoin/' %s" REGEX_CURRENT= re.compile("%s The Bitcoin" % year) CMD_LIST_FILES= "find %s | grep %s" From 0a35573534ee81d98d7389a1fc8c6f1c5856f07e Mon Sep 17 00:00:00 2001 From: isle2983 Date: Mon, 29 Aug 2016 21:01:38 -0600 Subject: [PATCH 104/302] [doc] - clarify statement about parallel jobs in rpc-tests.py Github-Pull: #8625 Rebased-From: 14675610245e951f2b922a0eaad6eb7d011ae87e --- qa/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/README.md b/qa/README.md index 723660c6c85..225207cc1ce 100644 --- a/qa/README.md +++ b/qa/README.md @@ -41,8 +41,8 @@ Run all possible tests with qa/pull-tester/rpc-tests.py -extended -By default, tests will be run in parallel if you want to specify how many -tests should be run in parallel, append `-parallel=n` (default n=4). +By default, tests will be run in parallel. To specify how many jobs to run, +append `-parallel=n` (default n=4). If you want to create a basic coverage report for the rpc test suite, append `--coverage`. From ea51b0f5ddd705dd955eb5220253c6e325279609 Mon Sep 17 00:00:00 2001 From: Alexey Vesnin Date: Tue, 30 Aug 2016 09:00:55 +0300 Subject: [PATCH 105/302] Berkeley DB v6 compatibility fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes building error looking like this: CXX wallet/libbitcoin_wallet_a-db.o wallet/db.cpp: In member function ‘void CDBEnv::EnvShutdown()’: wallet/db.cpp:46:16: error: call of overloaded ‘DbEnv(int)’ is ambiguous DbEnv(0).remove(strPath.c_str(), 0); ^ wallet/db.cpp:46:16: note: candidates are: In file included from wallet/db.h:21:0, from wallet/db.cpp:6: /usr/include/db_cxx.h:916:2: note: DbEnv::DbEnv(const DbEnv&) DbEnv(const DbEnv &); ^ /usr/include/db_cxx.h:518:2: note: DbEnv::DbEnv(DB_ENV) DbEnv(DB_ENV *dbenv); ^ /usr/include/db_cxx.h:516:2: note: DbEnv::DbEnv(u_int32_t) DbEnv(u_int32_t flags); ^ Makefile:5780: recipe for target 'wallet/libbitcoin_wallet_a-db.o' failed make[2]: ** [wallet/libbitcoin_wallet_a-db.o] Error 1 Github-Pull: #8626 Rebased-From: 323a5fe06af43d3922a435e696d6c52acc6fade1 --- src/wallet/db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index cfd007ca1c8..236c1d3246f 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -43,7 +43,7 @@ void CDBEnv::EnvShutdown() if (ret != 0) LogPrintf("CDBEnv::EnvShutdown: Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret)); if (!fMockDb) - DbEnv(0).remove(strPath.c_str(), 0); + DbEnv((u_int32_t)0).remove(strPath.c_str(), 0); } void CDBEnv::Reset() From 42ea51a65fdacc9a0bf687474bc3839b854c726f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 15 Sep 2016 23:32:45 +0200 Subject: [PATCH 106/302] net: No longer send local address in addrMe After #8594 the addrFrom sent by a node is not used anymore at all, so don't bother sending it. Also mitigates the privacy issue in (#8616). It doesn't completely solve the issue as GetLocalAddress is also called in AdvertiseLocal, but at least when advertising addresses it stands out less as *our* address. Github-Pull: #8740 Rebased-From: d9c99c3058c90f4f7075cf5c495b8dcd2e7519a7 --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index fb85bedffae..a0ab544f5fd 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -499,7 +499,7 @@ void CNode::PushVersion() int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime()); CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0", 0), addr.nServices)); - CAddress addrMe = GetLocalAddress(&addr); + CAddress addrMe = CAddress(CService(), nLocalServices); GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce)); if (fLogIPs) LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), id); From da94272e3c3f344660c274b41cbff2f402b5ae0c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 14 Sep 2016 16:28:50 +0200 Subject: [PATCH 107/302] [qa] walletbackup: Sync blocks inside the loop Github-Pull: #8724 Rebased-From: fad41f308f5e0e0650e3eed96c8c8575b3f7c33e --- qa/rpc-tests/walletbackup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/walletbackup.py b/qa/rpc-tests/walletbackup.py index b991d5c7618..e12cb10a50a 100755 --- a/qa/rpc-tests/walletbackup.py +++ b/qa/rpc-tests/walletbackup.py @@ -45,12 +45,12 @@ def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 4 + # nodes 1, 2,3 are spenders, let's give them a keypool=100 + self.extra_args = [["-keypool=100"], ["-keypool=100"], ["-keypool=100"], []] # This mirrors how the network was setup in the bash test def setup_network(self, split=False): - # nodes 1, 2,3 are spenders, let's give them a keypool=100 - extra_args = [["-keypool=100"], ["-keypool=100"], ["-keypool=100"], []] - self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) connect_nodes(self.nodes[0], 3) connect_nodes(self.nodes[1], 3) connect_nodes(self.nodes[2], 3) @@ -79,6 +79,7 @@ def do_one_round(self): # Must sync mempools before mining. sync_mempools(self.nodes) self.nodes[3].generate(1) + sync_blocks(self.nodes) # As above, this mirrors the original bash test. def start_three(self): From 0e2c6bdf78d5ddb374061f5b6b5c62a15ee53940 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Sun, 18 Sep 2016 19:53:02 +0800 Subject: [PATCH 108/302] [Doc] Target protobuf 2.6 in OS X build notes. Homebrew now installs Protobuf version 3 by default, which doesn't currently compile. Install Protobuf 2.6.x from the versions tap instead. Github-Pull: #8754 Rebased-From: b16a7f609fdb2efa9a8a1b82f09748b95b5ae4f6 --- doc/build-osx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/build-osx.md b/doc/build-osx.md index c9eb4225abb..bc90a305622 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -16,7 +16,7 @@ Then install [Homebrew](http://brew.sh). Dependencies ---------------------- - brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent + brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config homebrew/versions/protobuf260 --c++11 qt5 libevent NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended. From 5e15fce30c7b406c1ace6f5f6df5c24b8050a8b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20=C3=98yvind=20Urke-S=C3=A6tre?= Date: Wed, 14 Sep 2016 13:05:18 +0200 Subject: [PATCH 109/302] Minor change in section name Changed 'build' to 'create', as the section name have changed in newer versions of release-process.md Github-Pull: #8720 Rebased-From: dad932c241a3fe9ef8e4dc36596381666ab4f879 --- doc/gitian-building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/gitian-building.md b/doc/gitian-building.md index 938f92ff128..84dce3f082f 100644 --- a/doc/gitian-building.md +++ b/doc/gitian-building.md @@ -337,7 +337,7 @@ Getting and building the inputs -------------------------------- Follow the instructions in [doc/release-process.md](release-process.md#fetch-and-build-inputs-first-time-or-when-dependency-versions-change) -in the bitcoin repository under 'Fetch and build inputs' to install sources which require +in the bitcoin repository under 'Fetch and create inputs' to install sources which require manual intervention. Also optionally follow the next step: 'Seed the Gitian sources cache and offline git repositories' which will fetch the remaining files required for building offline. From d31ac725cfab15d086362124c3c18f5bcccebca7 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 16 Sep 2016 11:45:08 +0800 Subject: [PATCH 110/302] Specify Protobuf version 2 in paymentrequest.proto Github-Pull: #8742 Rebased-From: c4084c208509c42f796ebaa3eaded5f1cd40c506 --- src/qt/paymentrequest.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qt/paymentrequest.proto b/src/qt/paymentrequest.proto index b2281c4c7b3..d2721a34bde 100644 --- a/src/qt/paymentrequest.proto +++ b/src/qt/paymentrequest.proto @@ -6,6 +6,8 @@ // https://en.bitcoin.it/wiki/Payment_Request // +syntax = "proto2"; + package payments; option java_package = "org.bitcoin.protocols.payments"; option java_outer_classname = "Protos"; From e34374e252b2545eb510d26b752c5d00bba1f2f6 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 13 Sep 2016 22:00:55 +0200 Subject: [PATCH 111/302] [qa] wallet: Check legacy wallet as well Github-Pull: #8716 Rebased-From: fa644d0053ca40740b9e7b8982ff6c5d5640e4af --- qa/rpc-tests/wallet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index 5d96e7a6e5b..3420be1a2ed 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -18,9 +18,10 @@ def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 4 + self.extra_args = [['-usehd={:d}'.format(i%2==0)] for i in range(4)] def setup_network(self, split=False): - self.nodes = start_nodes(3, self.options.tmpdir) + self.nodes = start_nodes(3, self.options.tmpdir, self.extra_args[:3]) connect_nodes_bi(self.nodes,0,1) connect_nodes_bi(self.nodes,1,2) connect_nodes_bi(self.nodes,0,2) @@ -154,7 +155,7 @@ def run_test (self): txid2 = self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1) sync_mempools(self.nodes) - self.nodes.append(start_node(3, self.options.tmpdir)) + self.nodes.append(start_node(3, self.options.tmpdir, self.extra_args[3])) connect_nodes_bi(self.nodes, 0, 3) sync_blocks(self.nodes) From 084cae9ca57a263d7b768b2854614bc9a2c26a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= Date: Thu, 15 Sep 2016 12:40:09 +0200 Subject: [PATCH 112/302] UndoReadFromDisk works on undo files (rev), not on block files. Github-Pull: #8737 Rebased-From: b4fb51271905f9ef39e5c2bc7e8c15e7489394a1 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 8d8fb1502de..82f9e147ee7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2073,7 +2073,7 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CDiskBlockPos& pos, const uin // Open history file to read CAutoFile filein(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION); if (filein.IsNull()) - return error("%s: OpenBlockFile failed", __func__); + return error("%s: OpenUndoFile failed", __func__); // Read block uint256 hashChecksum; From 9a903f9f003d743242d4ac41b4a4045559f1ff4c Mon Sep 17 00:00:00 2001 From: isle2983 Date: Sun, 11 Sep 2016 15:26:53 -0600 Subject: [PATCH 113/302] [copyright] add MIT License copyright header to zmq_sub.py Github-Pull: #8701 Rebased-From: 37a7fe9e440b83e2364d5498931253937abe9294 --- contrib/zmq/zmq_sub.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py index 6268123dd8e..3dea5e3c144 100755 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -1,4 +1,7 @@ #!/usr/bin/env python2 +# Copyright (c) 2014-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. import array import binascii From ea2a6bef858049a5fc47a1f67bbfc8ab78d7348d Mon Sep 17 00:00:00 2001 From: isle2983 Date: Sun, 11 Sep 2016 15:32:22 -0600 Subject: [PATCH 114/302] [copyright] add MIT License copyright header to remaining Python files Github-Pull: #8702 Rebased-From: 4677b197f7aa8d35bfc20a5961c3e1c41bb7de39 --- contrib/devtools/security-check.py | 3 +++ contrib/devtools/test-security-check.py | 3 +++ share/qt/extract_strings_qt.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py index 301fea85c1f..d774b7fea26 100755 --- a/contrib/devtools/security-check.py +++ b/contrib/devtools/security-check.py @@ -1,4 +1,7 @@ #!/usr/bin/python2 +# Copyright (c) 2015-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Perform basic ELF security checks on a series of executables. Exit status will be 0 if successful, and the program will be silent. diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py index fed7626aaba..58817089c1c 100755 --- a/contrib/devtools/test-security-check.py +++ b/contrib/devtools/test-security-check.py @@ -1,4 +1,7 @@ #!/usr/bin/python2 +# Copyright (c) 2015-2016 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 script for security-check.py ''' diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py index 2ba8bb9b3ac..f0f6a4f4781 100755 --- a/share/qt/extract_strings_qt.py +++ b/share/qt/extract_strings_qt.py @@ -1,4 +1,7 @@ #!/usr/bin/python +# Copyright (c) 2012-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Extract _("...") strings for translation and convert to Qt stringdefs so that they can be picked up by Qt linguist. From a60d7cc97d5f91b4157bdc8af0451f44149436fd Mon Sep 17 00:00:00 2001 From: isle2983 Date: Sun, 11 Sep 2016 15:25:51 -0600 Subject: [PATCH 115/302] [copyright] Add missing copyright headers Github-Pull: #8676 Rebased-From: 783e930e68a312bc7654d833053cceead18dd688 --- contrib/devtools/optimize-pngs.py | 3 +++ contrib/qt_translations.py | 3 +++ contrib/seeds/makeseeds.py | 3 +++ contrib/spendfrom/setup.py | 3 +++ contrib/spendfrom/spendfrom.py | 3 +++ contrib/testgen/base58.py | 3 +++ contrib/testgen/gen_base58_test_vectors.py | 3 +++ qa/rpc-tests/test_framework/blockstore.py | 3 +++ 8 files changed, 24 insertions(+) diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py index 799e0cc7d0f..b7b8dc00820 100755 --- a/contrib/devtools/optimize-pngs.py +++ b/contrib/devtools/optimize-pngs.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) 2014-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. ''' Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). #pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text diff --git a/contrib/qt_translations.py b/contrib/qt_translations.py index fd8a8b71298..cfdeed41aba 100755 --- a/contrib/qt_translations.py +++ b/contrib/qt_translations.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) 2011 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. # Helpful little script that spits out a comma-separated list of # language codes for Qt icons that should be included diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index 4072405ef50..041f224f40e 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) 2013-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. # # Generate seeds.txt from Pieter's DNS seeder # diff --git a/contrib/spendfrom/setup.py b/contrib/spendfrom/setup.py index 01b9768a5b0..f80736752ae 100644 --- a/contrib/spendfrom/setup.py +++ b/contrib/spendfrom/setup.py @@ -1,3 +1,6 @@ +# Copyright (c) 2013 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. from distutils.core import setup setup(name='btcspendfrom', version='1.0', diff --git a/contrib/spendfrom/spendfrom.py b/contrib/spendfrom/spendfrom.py index 72ee0425eb2..086b91b267e 100755 --- a/contrib/spendfrom/spendfrom.py +++ b/contrib/spendfrom/spendfrom.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) 2013 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. diff --git a/contrib/testgen/base58.py b/contrib/testgen/base58.py index b716495145f..72b288b2dc9 100644 --- a/contrib/testgen/base58.py +++ b/contrib/testgen/base58.py @@ -1,3 +1,6 @@ +# Copyright (c) 2012 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Bitcoin base58 encoding and decoding. diff --git a/contrib/testgen/gen_base58_test_vectors.py b/contrib/testgen/gen_base58_test_vectors.py index 18134369536..8518774db3d 100755 --- a/contrib/testgen/gen_base58_test_vectors.py +++ b/contrib/testgen/gen_base58_test_vectors.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (c) 2012 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Generate valid and invalid base58 address and private key test vectors. diff --git a/qa/rpc-tests/test_framework/blockstore.py b/qa/rpc-tests/test_framework/blockstore.py index 6120dd574b5..1e2bbb277ac 100644 --- a/qa/rpc-tests/test_framework/blockstore.py +++ b/qa/rpc-tests/test_framework/blockstore.py @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +# Copyright (c) 2015-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. # BlockStore: a helper class that keeps a map of blocks and implements # helper functions for responding to getheaders and getdata, # and for constructing a getheaders message From 702fd2ee21c17bfbc56d2fe6d3fad982fb8412a0 Mon Sep 17 00:00:00 2001 From: isle2983 Date: Sun, 11 Sep 2016 13:36:22 -0600 Subject: [PATCH 116/302] [copyright] add MIT license headers to .sh scripts where missing Years are set according to 'git log' history Github-Pull: #8700 Rebased-From: 0766d1cac38d7ea27a6323d7ca206154b2686f9b --- contrib/devtools/git-subtree-check.sh | 3 +++ contrib/macdeploy/detached-sig-apply.sh | 4 ++++ contrib/macdeploy/detached-sig-create.sh | 4 ++++ contrib/qos/tc.sh | 4 ++++ contrib/tidy_datadir.sh | 3 +++ contrib/verify-commits/gpg.sh | 4 ++++ contrib/verify-commits/pre-push-hook.sh | 4 ++++ contrib/verify-commits/verify-commits.sh | 4 ++++ contrib/verifybinaries/verify.sh | 3 +++ src/qt/res/movies/makespinner.sh | 4 ++++ 10 files changed, 37 insertions(+) diff --git a/contrib/devtools/git-subtree-check.sh b/contrib/devtools/git-subtree-check.sh index 1cb82fe6826..2384d66cad2 100755 --- a/contrib/devtools/git-subtree-check.sh +++ b/contrib/devtools/git-subtree-check.sh @@ -1,4 +1,7 @@ #!/bin/sh +# 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. DIR="$1" COMMIT="$2" diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh index 781fe315eda..91674a92e6f 100755 --- a/contrib/macdeploy/detached-sig-apply.sh +++ b/contrib/macdeploy/detached-sig-apply.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright (c) 2014-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. + set -e UNSIGNED="$1" diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh index 89a2da32f7a..5022ea88bc2 100755 --- a/contrib/macdeploy/detached-sig-create.sh +++ b/contrib/macdeploy/detached-sig-create.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright (c) 2014-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. + set -e ROOTDIR=dist diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh index f6206042120..aaf5e1fa11e 100644 --- a/contrib/qos/tc.sh +++ b/contrib/qos/tc.sh @@ -1,3 +1,7 @@ +# Copyright (c) 2013 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + #network interface on which to limit traffic IF="eth0" #limit of the network interface in question diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh index 5d6d8264442..8960f8811d8 100755 --- a/contrib/tidy_datadir.sh +++ b/contrib/tidy_datadir.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) 2013 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. if [ -d "$1" ]; then cd "$1" diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh index 375d7117257..09ff2375447 100755 --- a/contrib/verify-commits/gpg.sh +++ b/contrib/verify-commits/gpg.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright (c) 2014-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + INPUT=$(cat /dev/stdin) VALID=false REVSIG=false diff --git a/contrib/verify-commits/pre-push-hook.sh b/contrib/verify-commits/pre-push-hook.sh index c57222818ab..c21febb9e92 100755 --- a/contrib/verify-commits/pre-push-hook.sh +++ b/contrib/verify-commits/pre-push-hook.sh @@ -1,4 +1,8 @@ #!/bin/bash +# Copyright (c) 2014-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. + if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)bitcoin/bitcoin(.git)?$ ]]; then exit 0 fi diff --git a/contrib/verify-commits/verify-commits.sh b/contrib/verify-commits/verify-commits.sh index 5219331e2e5..cfe4f11a0b7 100755 --- a/contrib/verify-commits/verify-commits.sh +++ b/contrib/verify-commits/verify-commits.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright (c) 2014-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + # Not technically POSIX-compliant due to use of "local", but almost every # shell anyone uses today supports it, so its probably fine diff --git a/contrib/verifybinaries/verify.sh b/contrib/verifybinaries/verify.sh index 657c3bd33c2..6b6b28184d4 100755 --- a/contrib/verifybinaries/verify.sh +++ b/contrib/verifybinaries/verify.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. ### This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org ### It first checks if the signature passes, and then downloads the files specified in diff --git a/src/qt/res/movies/makespinner.sh b/src/qt/res/movies/makespinner.sh index a4c2fddbbfe..d0deb1238c2 100755 --- a/src/qt/res/movies/makespinner.sh +++ b/src/qt/res/movies/makespinner.sh @@ -1,3 +1,7 @@ +# Copyright (c) 2014-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. + FRAMEDIR=$(dirname $0) for i in {0..35} do From b70b4a24e645e4602df310263390964ceda64a8f Mon Sep 17 00:00:00 2001 From: Marty Jones Date: Mon, 19 Sep 2016 21:17:27 -0500 Subject: [PATCH 117/302] Trivial: Fix typo Github-Pull: #8762 Rebased-From: 12a721b45e16124f48ea85f96079feec18e948ca --- doc/translation_process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/translation_process.md b/doc/translation_process.md index a443a16fe24..9e9ced24572 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -6,7 +6,7 @@ The Bitcoin-Core project has been designed to support multiple localisations. Th ### Helping to translate (using Transifex) Transifex is setup to monitor the Github repo for updates, and when code containing new translations is found, Transifex will process any changes. It may take several hours after a pull-request has been merged, to appear in the Transifex web interface. -Multiple language support is critical in assisting Bitcoin’s global adoption, and growth. One of Bitcoin’s greatest strengths is cross-boarder money transfers, any help making that easier is greatly appreciated. +Multiple language support is critical in assisting Bitcoin’s global adoption, and growth. One of Bitcoin’s greatest strengths is cross-border money transfers, any help making that easier is greatly appreciated. See the [Transifex Bitcoin project](https://www.transifex.com/projects/p/bitcoin/) to assist in translations. You should also join the translation mailing list for announcements - see details below. From 1672225670cd34e21e397968433d47e6997f9a5f Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 16 Aug 2016 17:38:57 +0200 Subject: [PATCH 118/302] Do not store witness txn in rejection cache Github-Pull: #8525 Rebased-From: 34521e4d7d176109dedf52ec8ef2b5052b9a30f3 --- src/main.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 82f9e147ee7..a664bf2de70 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1506,9 +1506,9 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // SCRIPT_VERIFY_CLEANSTACK requires SCRIPT_VERIFY_WITNESS, so we // need to turn both off, and compare against just turning off CLEANSTACK // to see if the failure is specifically due to witness validation. - if (CheckInputs(tx, state, view, true, scriptVerifyFlags & ~(SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_CLEANSTACK), true, txdata) && + if (tx.wit.IsNull() && CheckInputs(tx, state, view, true, scriptVerifyFlags & ~(SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_CLEANSTACK), true, txdata) && !CheckInputs(tx, state, view, true, scriptVerifyFlags & ~SCRIPT_VERIFY_CLEANSTACK, true, txdata)) { - // Only the witness is wrong, so the transaction itself may be fine. + // Only the witness is missing, so the transaction itself may be fine. state.SetCorruptionPossible(); } return false; @@ -5505,7 +5505,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, else if (!fMissingInputs2) { int nDos = 0; - if (stateDummy.IsInvalid(nDos) && nDos > 0 && (!state.CorruptionPossible() || State(fromPeer)->fHaveWitness)) + if (stateDummy.IsInvalid(nDos) && nDos > 0) { // Punish peer that gave us an invalid orphan tx Misbehaving(fromPeer, nDos); @@ -5516,7 +5516,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // Probably non-standard or insufficient fee/priority LogPrint("mempool", " removed orphan tx %s\n", orphanHash.ToString()); vEraseQueue.push_back(orphanHash); - if (!stateDummy.CorruptionPossible()) { + if (orphanTx.wit.IsNull() && !stateDummy.CorruptionPossible()) { + // Do not use rejection cache for witness transactions or + // witness-stripped transactions, as they can have been malleated. + // See https://github.com/bitcoin/bitcoin/issues/8279 for details. assert(recentRejects); recentRejects->insert(orphanHash); } @@ -5554,7 +5557,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, LogPrint("mempool", "not keeping orphan with rejected parents %s\n",tx.GetHash().ToString()); } } else { - if (!state.CorruptionPossible()) { + if (tx.wit.IsNull() && !state.CorruptionPossible()) { + // Do not use rejection cache for witness transactions or + // witness-stripped transactions, as they can have been malleated. + // See https://github.com/bitcoin/bitcoin/issues/8279 for details. assert(recentRejects); recentRejects->insert(tx.GetHash()); } @@ -5586,9 +5592,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (state.GetRejectCode() < REJECT_INTERNAL) // Never send AcceptToMemoryPool's internal codes over P2P pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); - if (nDoS > 0 && (!state.CorruptionPossible() || State(pfrom->id)->fHaveWitness)) { - // When a non-witness-supporting peer gives us a transaction that would - // be accepted if witness validation was off, we can't blame them for it. + if (nDoS > 0) { Misbehaving(pfrom->GetId(), nDoS); } } From b394a96396ce166bf2b519190fdc2a124f57eb5e Mon Sep 17 00:00:00 2001 From: instagibbs Date: Thu, 18 Aug 2016 12:04:33 -0400 Subject: [PATCH 119/302] Add basic test for IsStandard witness transaction blinding Github-Pull: #8525 Rebased-From: ca10a03addf70421893791c2c499e82fc494d60b --- qa/rpc-tests/p2p-segwit.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 68d8b9a006f..8af46f03165 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -965,8 +965,24 @@ def test_tx_relay_after_segwit_activation(self): tx3 = CTransaction() tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), b"")) - tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, CScript([OP_TRUE]))) tx3.wit.vtxinwit.append(CTxInWitness()) + + # Add too-large for IsStandard witness and check that it does not enter reject filter + p2sh_program = CScript([OP_TRUE]) + p2sh_pubkey = hash160(p2sh_program) + witness_program2 = CScript([b'a'*400000]) + tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, CScript([OP_HASH160, p2sh_pubkey, OP_EQUAL]))) + tx3.wit.vtxinwit[0].scriptWitness.stack = [witness_program2] + tx3.rehash() + + # Node will not be blinded to the transaction + self.std_node.announce_tx_and_wait_for_getdata(tx3) + self.std_node.test_transaction_acceptance(tx3, True, False, b'tx-size') + self.std_node.announce_tx_and_wait_for_getdata(tx3) + self.std_node.test_transaction_acceptance(tx3, True, False, b'tx-size') + + # Remove witness stuffing, instead add extra witness push on stack + tx3.vout[0] = CTxOut(tx2.vout[0].nValue-1000, CScript([OP_TRUE])) tx3.wit.vtxinwit[0].scriptWitness.stack = [CScript([CScriptNum(1)]), witness_program ] tx3.rehash() From a5ec2483235d5585e985715a5f66d41dbe1c424e Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Mon, 12 Sep 2016 02:03:55 +0800 Subject: [PATCH 120/302] Remove createwitnessaddress This RPC command is unsafe as it will return an address even if the script is invalid. Github-Pull: #8699 Rebased-From: 86c3f8db0bf64693313a81d5fe92ef603499030a --- src/rpc/misc.cpp | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index a8c5bcd177f..06489566ba3 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -320,43 +320,6 @@ UniValue createmultisig(const UniValue& params, bool fHelp) return result; } -UniValue createwitnessaddress(const UniValue& params, bool fHelp) -{ - if (fHelp || params.size() < 1 || params.size() > 1) - { - string msg = "createwitnessaddress \"script\"\n" - "\nCreates a witness address for a particular script.\n" - "It returns a json object with the address and witness script.\n" - - "\nArguments:\n" - "1. \"script\" (string, required) A hex encoded script\n" - - "\nResult:\n" - "{\n" - " \"address\":\"multisigaddress\", (string) The value of the new address (P2SH of witness script).\n" - " \"witnessScript\":\"script\" (string) The string value of the hex-encoded witness script.\n" - "}\n" - ; - throw runtime_error(msg); - } - - if (!IsHex(params[0].get_str())) { - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Script must be hex-encoded"); - } - - std::vector code = ParseHex(params[0].get_str()); - CScript script(code.begin(), code.end()); - CScript witscript = GetScriptForWitness(script); - CScriptID witscriptid(witscript); - CBitcoinAddress address(witscriptid); - - UniValue result(UniValue::VOBJ); - result.push_back(Pair("address", address.ToString())); - result.push_back(Pair("witnessScript", HexStr(witscript.begin(), witscript.end()))); - - return result; -} - UniValue verifymessage(const UniValue& params, bool fHelp) { if (fHelp || params.size() != 3) @@ -490,7 +453,6 @@ static const CRPCCommand commands[] = { "control", "getinfo", &getinfo, true }, /* uses wallet if enabled */ { "util", "validateaddress", &validateaddress, true }, /* uses wallet if enabled */ { "util", "createmultisig", &createmultisig, true }, - { "util", "createwitnessaddress", &createwitnessaddress, true }, { "util", "verifymessage", &verifymessage, true }, { "util", "signmessagewithprivkey", &signmessagewithprivkey, true }, From 23feab1f38cd63f55631a1b5125ef1bd5ce049df Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 13 Sep 2016 18:08:17 +0200 Subject: [PATCH 121/302] Remove maxuploadtargets recommended minimum Github-Pull: #8712 Rebased-From: 1b6bcdd3aa379a50c960e23d7c55db8294e76f7f --- doc/reduce-traffic.md | 3 +-- src/net.cpp | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/doc/reduce-traffic.md b/doc/reduce-traffic.md index 2d86588eb2a..697099beabe 100644 --- a/doc/reduce-traffic.md +++ b/doc/reduce-traffic.md @@ -19,8 +19,7 @@ This is *not* a hard limit; only a threshold to minimize the outbound traffic. When the limit is about to be reached, the uploaded data is cut by no longer serving historic blocks (blocks older than one week). Keep in mind that new nodes require other nodes that are willing to serve -historic blocks. **The recommended minimum is 144 blocks per day (max. 144MB -per day)** +historic blocks. Whitelisted peers will never be disconnected, although their traffic counts for calculating the target. diff --git a/src/net.cpp b/src/net.cpp index a0ab544f5fd..5e38ec07790 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2226,11 +2226,7 @@ void CNode::RecordBytesSent(uint64_t bytes) void CNode::SetMaxOutboundTarget(uint64_t limit) { LOCK(cs_totalBytesSent); - uint64_t recommendedMinimum = (nMaxOutboundTimeframe / 600) * MAX_BLOCK_SERIALIZED_SIZE; nMaxOutboundLimit = limit; - - if (limit > 0 && limit < recommendedMinimum) - LogPrintf("Max outbound target is very small (%s bytes) and will be overshot. Recommended minimum is %s bytes.\n", nMaxOutboundLimit, recommendedMinimum); } uint64_t CNode::GetMaxOutboundTarget() From 198494ce5323cafbf90a7b543d1b07355eb3db6c Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 25 Jul 2016 17:22:37 -0400 Subject: [PATCH 122/302] Allow changing BIP9 parameters on regtest Github-Pull: #8418 Rebased-From: 56c87e92110f05d7452f1e85bf755246ffc77206 --- src/chainparams.cpp | 11 +++++++++++ src/chainparams.h | 5 +++++ src/init.cpp | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 0cb0fccd17c..7b493ed8a7e 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -303,6 +303,12 @@ class CRegTestParams : public CChainParams { base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container >(); base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container >(); } + + void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout) + { + consensus.vDeployments[d].nStartTime = nStartTime; + consensus.vDeployments[d].nTimeout = nTimeout; + } }; static CRegTestParams regTestParams; @@ -330,4 +336,9 @@ void SelectParams(const std::string& network) SelectBaseParams(network); pCurrentParams = &Params(network); } + +void UpdateRegtestBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout) +{ + regTestParams.UpdateBIP9Parameters(d, nStartTime, nTimeout); +} diff --git a/src/chainparams.h b/src/chainparams.h index 638893e9ad9..0c3820b7c6e 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -112,4 +112,9 @@ CChainParams& Params(const std::string& chain); */ void SelectParams(const std::string& chain); +/** + * Allows modifying the BIP9 regtest parameters. + */ +void UpdateRegtestBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout); + #endif // BITCOIN_CHAINPARAMS_H diff --git a/src/init.cpp b/src/init.cpp index 9b6eca2e1d1..f2b13b627ae 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -410,6 +410,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-limitancestorsize=", strprintf("Do not accept transactions whose size with all in-mempool ancestors exceeds kilobytes (default: %u)", DEFAULT_ANCESTOR_SIZE_LIMIT)); strUsage += HelpMessageOpt("-limitdescendantcount=", strprintf("Do not accept transactions if any ancestor would have or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT)); strUsage += HelpMessageOpt("-limitdescendantsize=", strprintf("Do not accept transactions if any ancestor would have more than kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT)); + strUsage += HelpMessageOpt("-bip9params=deployment:start:end", "Use given start/end times for specified bip9 deployment (regtest-only)"); } string debugCategories = "addrman, alert, bench, coindb, db, http, libevent, lock, mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins, tor, zmq"; // Don't translate these and qt below if (mode == HMM_BITCOIN_QT) @@ -990,6 +991,41 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end()); } + if (!mapMultiArgs["-bip9params"].empty()) { + // Allow overriding bip9 parameters for testing + if (!Params().MineBlocksOnDemand()) { + return InitError("BIP9 parameters may only be overridden on regtest."); + } + const vector& deployments = mapMultiArgs["-bip9params"]; + for (auto i : deployments) { + std::vector vDeploymentParams; + boost::split(vDeploymentParams, i, boost::is_any_of(":")); + if (vDeploymentParams.size() != 3) { + return InitError("BIP9 parameters malformed, expecting deployment:start:end"); + } + int64_t nStartTime, nTimeout; + if (!ParseInt64(vDeploymentParams[1], &nStartTime)) { + return InitError(strprintf("Invalid nStartTime (%s)", vDeploymentParams[1])); + } + if (!ParseInt64(vDeploymentParams[2], &nTimeout)) { + return InitError(strprintf("Invalid nTimeout (%s)", vDeploymentParams[2])); + } + bool found = false; + for (int i=0; i<(int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++i) + { + if (vDeploymentParams[0].compare(VersionBitsDeploymentInfo[i].name) == 0) { + UpdateRegtestBIP9Parameters(Consensus::DeploymentPos(i), nStartTime, nTimeout); + found = true; + LogPrintf("Setting BIP9 activation parameters for %s to start=%ld, timeout=%ld\n", vDeploymentParams[0], nStartTime, nTimeout); + break; + } + } + if (!found) { + return InitError(strprintf("Invalid deployment (%s)", vDeploymentParams[0])); + } + } + } + // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log // Initialize elliptic curve code From ff893aa5574f5c422b72dd10b00eac805fc737e5 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 27 Jun 2016 16:06:17 +0200 Subject: [PATCH 123/302] Implement SipHash in Python Github-Pull: #8418 Rebased-From: 9c8593d2b4e25ef628172ceadbedf0ef078d01ef --- qa/rpc-tests/test_framework/siphash.py | 64 ++++++++++++++++++++++++++++++++++ src/test/hash_tests.cpp | 4 +++ 2 files changed, 68 insertions(+) create mode 100644 qa/rpc-tests/test_framework/siphash.py diff --git a/qa/rpc-tests/test_framework/siphash.py b/qa/rpc-tests/test_framework/siphash.py new file mode 100644 index 00000000000..9c0574bd931 --- /dev/null +++ b/qa/rpc-tests/test_framework/siphash.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +# +# siphash.py - Specialized SipHash-2-4 implementations +# +# This implements SipHash-2-4 for 256-bit integers. + +def rotl64(n, b): + return n >> (64 - b) | (n & ((1 << (64 - b)) - 1)) << b + +def siphash_round(v0, v1, v2, v3): + v0 = (v0 + v1) & ((1 << 64) - 1) + v1 = rotl64(v1, 13) + v1 ^= v0 + v0 = rotl64(v0, 32) + v2 = (v2 + v3) & ((1 << 64) - 1) + v3 = rotl64(v3, 16) + v3 ^= v2 + v0 = (v0 + v3) & ((1 << 64) - 1) + v3 = rotl64(v3, 21) + v3 ^= v0 + v2 = (v2 + v1) & ((1 << 64) - 1) + v1 = rotl64(v1, 17) + v1 ^= v2 + v2 = rotl64(v2, 32) + return (v0, v1, v2, v3) + +def siphash256(k0, k1, h): + n0 = h & ((1 << 64) - 1) + n1 = (h >> 64) & ((1 << 64) - 1) + n2 = (h >> 128) & ((1 << 64) - 1) + n3 = (h >> 192) & ((1 << 64) - 1) + v0 = 0x736f6d6570736575 ^ k0 + v1 = 0x646f72616e646f6d ^ k1 + v2 = 0x6c7967656e657261 ^ k0 + v3 = 0x7465646279746573 ^ k1 ^ n0 + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0 ^= n0 + v3 ^= n1 + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0 ^= n1 + v3 ^= n2 + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0 ^= n2 + v3 ^= n3 + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0 ^= n3 + v3 ^= 0x2000000000000000 + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0 ^= 0x2000000000000000 + v2 ^= 0xFF + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3) + return v0 ^ v1 ^ v2 ^ v3 diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp index 82d61209b5e..fa9624f13da 100644 --- a/src/test/hash_tests.cpp +++ b/src/test/hash_tests.cpp @@ -122,6 +122,10 @@ BOOST_AUTO_TEST_CASE(siphash) hasher3.Write(uint64_t(x)|(uint64_t(x+1)<<8)|(uint64_t(x+2)<<16)|(uint64_t(x+3)<<24)| (uint64_t(x+4)<<32)|(uint64_t(x+5)<<40)|(uint64_t(x+6)<<48)|(uint64_t(x+7)<<56)); } + + CHashWriter ss(SER_DISK, CLIENT_VERSION); + ss << CTransaction(); + BOOST_CHECK_EQUAL(SipHashUint256(1, 2, ss.GetHash()), 0x79751e980c2a0a35ULL); } BOOST_AUTO_TEST_SUITE_END() From 4295a7aea55be34c95a0624e95ea0b9587e644b6 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 17 Jun 2016 21:17:25 -0400 Subject: [PATCH 124/302] Tests: refactor compact size serialization in mininode Github-Pull: #8418 Rebased-From: a8689fdf8e10300b73750161a73a23467ecd1efe --- qa/rpc-tests/test_framework/mininode.py | 97 +++++++++------------------------ 1 file changed, 25 insertions(+), 72 deletions(-) diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index cdd5292cd67..67aaab698e9 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -74,8 +74,19 @@ def ripemd160(s): def hash256(s): return sha256(sha256(s)) +def ser_compact_size(l): + r = b"" + if l < 253: + r = struct.pack("B", l) + elif l < 0x10000: + r = struct.pack(" Date: Tue, 12 Jul 2016 16:04:38 -0400 Subject: [PATCH 125/302] Add support for compactblocks to mininode Github-Pull: #8418 Rebased-From: 9a22a6c0891256f02f4906c1c13fb22a9722ec7c --- qa/rpc-tests/test_framework/mininode.py | 276 +++++++++++++++++++++++++++++++- 1 file changed, 272 insertions(+), 4 deletions(-) diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 67aaab698e9..caffab35351 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -36,9 +36,10 @@ from threading import Thread import logging import copy +from test_framework.siphash import siphash256 BIP0031_VERSION = 60000 -MY_VERSION = 60001 # past bip-31 for ping/pong +MY_VERSION = 70014 # past bip-31 for ping/pong MY_SUBVERSION = b"/python-mininode-tester:0.0.3/" MAX_INV_SZ = 50000 @@ -52,7 +53,7 @@ NODE_WITNESS = (1 << 3) # Keep our own socket map for asyncore, so that we can track disconnects -# ourselves (to workaround an issue with closing an asyncore socket when +# ourselves (to workaround an issue with closing an asyncore socket when # using select) mininode_socket_map = dict() @@ -247,7 +248,8 @@ class CInv(object): 1: "TX", 2: "Block", 1|MSG_WITNESS_FLAG: "WitnessTx", - 2|MSG_WITNESS_FLAG : "WitnessBlock" + 2|MSG_WITNESS_FLAG : "WitnessBlock", + 4: "CompactBlock" } def __init__(self, t=0, h=0): @@ -734,6 +736,187 @@ def __repr__(self): % (len(self.vchMsg), len(self.vchSig)) +class PrefilledTransaction(object): + def __init__(self, index=0, tx = None): + self.index = index + self.tx = tx + + def deserialize(self, f): + self.index = deser_compact_size(f) + self.tx = CTransaction() + self.tx.deserialize(f) + + def serialize(self, with_witness=False): + r = b"" + r += ser_compact_size(self.index) + if with_witness: + r += self.tx.serialize_with_witness() + else: + r += self.tx.serialize_without_witness() + return r + + def __repr__(self): + return "PrefilledTransaction(index=%d, tx=%s)" % (self.index, repr(self.tx)) + +# This is what we send on the wire, in a cmpctblock message. +class P2PHeaderAndShortIDs(object): + def __init__(self): + self.header = CBlockHeader() + self.nonce = 0 + self.shortids_length = 0 + self.shortids = [] + self.prefilled_txn_length = 0 + self.prefilled_txn = [] + + def deserialize(self, f): + self.header.deserialize(f) + self.nonce = struct.unpack(" Date: Tue, 12 Jul 2016 16:05:02 -0400 Subject: [PATCH 126/302] Add p2p test for BIP 152 (compact blocks) Github-Pull: #8418 Rebased-From: 45c7ddd109465e03551f5b39c2e650c243b4a078 --- qa/pull-tester/rpc-tests.py | 1 + qa/rpc-tests/p2p-compactblocks.py | 608 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 609 insertions(+) create mode 100755 qa/rpc-tests/p2p-compactblocks.py diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 634d6758902..1e57a3fc20a 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -142,6 +142,7 @@ 'segwit.py', 'importprunedfunds.py', 'signmessages.py', + 'p2p-compactblocks.py', ] if ENABLE_ZMQ: testScripts.append('zmq_test.py') diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py new file mode 100755 index 00000000000..7fe7ecc16c6 --- /dev/null +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -0,0 +1,608 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +from test_framework.mininode import * +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * +from test_framework.blocktools import create_block, create_coinbase +from test_framework.siphash import siphash256 +from test_framework.script import CScript, OP_TRUE + +''' +CompactBlocksTest -- test compact blocks (BIP 152) +''' + + +# TestNode: A peer we use to send messages to bitcoind, and store responses. +class TestNode(SingleNodeConnCB): + def __init__(self): + SingleNodeConnCB.__init__(self) + self.last_sendcmpct = None + self.last_headers = None + self.last_inv = None + self.last_cmpctblock = None + self.block_announced = False + self.last_getdata = None + self.last_getblocktxn = None + self.last_block = None + self.last_blocktxn = None + + def on_sendcmpct(self, conn, message): + self.last_sendcmpct = message + + def on_block(self, conn, message): + self.last_block = message + + def on_cmpctblock(self, conn, message): + self.last_cmpctblock = message + self.block_announced = True + + def on_headers(self, conn, message): + self.last_headers = message + self.block_announced = True + + def on_inv(self, conn, message): + self.last_inv = message + self.block_announced = True + + def on_getdata(self, conn, message): + self.last_getdata = message + + def on_getblocktxn(self, conn, message): + self.last_getblocktxn = message + + def on_blocktxn(self, conn, message): + self.last_blocktxn = message + + # Requires caller to hold mininode_lock + def received_block_announcement(self): + return self.block_announced + + def clear_block_announcement(self): + with mininode_lock: + self.block_announced = False + self.last_inv = None + self.last_headers = None + self.last_cmpctblock = None + + def get_headers(self, locator, hashstop): + msg = msg_getheaders() + msg.locator.vHave = locator + msg.hashstop = hashstop + self.connection.send_message(msg) + + def send_header_for_blocks(self, new_blocks): + headers_message = msg_headers() + headers_message.headers = [CBlockHeader(b) for b in new_blocks] + self.send_message(headers_message) + + +class CompactBlocksTest(BitcoinTestFramework): + def __init__(self): + super().__init__() + self.setup_clean_chain = True + self.num_nodes = 1 + self.utxos = [] + + def setup_network(self): + self.nodes = [] + + # Turn off segwit in this test, as compact blocks don't currently work + # with segwit. (After BIP 152 is updated to support segwit, we can + # test behavior with and without segwit enabled by adding a second node + # to the test.) + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [["-debug", "-logtimemicros=1", "-bip9params=segwit:0:0"]]) + + def build_block_on_tip(self): + height = self.nodes[0].getblockcount() + tip = self.nodes[0].getbestblockhash() + mtp = self.nodes[0].getblockheader(tip)['mediantime'] + block = create_block(int(tip, 16), create_coinbase(height + 1), mtp + 1) + block.solve() + return block + + # Create 10 more anyone-can-spend utxo's for testing. + def make_utxos(self): + block = self.build_block_on_tip() + self.test_node.send_and_ping(msg_block(block)) + assert(int(self.nodes[0].getbestblockhash(), 16) == block.sha256) + self.nodes[0].generate(100) + + total_value = block.vtx[0].vout[0].nValue + out_value = total_value // 10 + tx = CTransaction() + tx.vin.append(CTxIn(COutPoint(block.vtx[0].sha256, 0), b'')) + for i in range(10): + tx.vout.append(CTxOut(out_value, CScript([OP_TRUE]))) + tx.rehash() + + block2 = self.build_block_on_tip() + block2.vtx.append(tx) + block2.hashMerkleRoot = block2.calc_merkle_root() + block2.solve() + self.test_node.send_and_ping(msg_block(block2)) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block2.sha256) + self.utxos.extend([[tx.sha256, i, out_value] for i in range(10)]) + return + + # Test "sendcmpct": + # - No compact block announcements or getdata(MSG_CMPCT_BLOCK) unless + # sendcmpct is sent. + # - If sendcmpct is sent with version > 0, the message is ignored. + # - If sendcmpct is sent with boolean 0, then block announcements are not + # made with compact blocks. + # - If sendcmpct is then sent with boolean 1, then new block announcements + # are made with compact blocks. + def test_sendcmpct(self): + print("Testing SENDCMPCT p2p message... ") + + # Make sure we get a version 0 SENDCMPCT message from our peer + def received_sendcmpct(): + return (self.test_node.last_sendcmpct is not None) + got_message = wait_until(received_sendcmpct, timeout=30) + assert(got_message) + assert_equal(self.test_node.last_sendcmpct.version, 1) + + tip = int(self.nodes[0].getbestblockhash(), 16) + + def check_announcement_of_new_block(node, peer, predicate): + self.test_node.clear_block_announcement() + node.generate(1) + got_message = wait_until(peer.received_block_announcement, timeout=30) + assert(got_message) + with mininode_lock: + assert(predicate) + + # We shouldn't get any block announcements via cmpctblock yet. + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None) + + # Try one more time, this time after requesting headers. + self.test_node.clear_block_announcement() + self.test_node.get_headers(locator=[tip], hashstop=0) + wait_until(self.test_node.received_block_announcement, timeout=30) + self.test_node.clear_block_announcement() + + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None and self.test_node.last_inv is not None) + + # Now try a SENDCMPCT message with too-high version + sendcmpct = msg_sendcmpct() + sendcmpct.version = 2 + self.test_node.send_message(sendcmpct) + + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None) + + # Now try a SENDCMPCT message with valid version, but announce=False + self.test_node.send_message(msg_sendcmpct()) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None) + + # Finally, try a SENDCMPCT message with announce=True + sendcmpct.version = 1 + sendcmpct.announce = True + self.test_node.send_message(sendcmpct) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is not None) + + # Try one more time + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is not None) + + # Try one more time, after turning on sendheaders + self.test_node.send_message(msg_sendheaders()) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is not None) + + # Now turn off announcements + sendcmpct.announce = False + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None and self.test_node.last_headers is not None) + + # This test actually causes bitcoind to (reasonably!) disconnect us, so do this last. + def test_invalid_cmpctblock_message(self): + print("Testing invalid index in cmpctblock message...") + self.nodes[0].generate(101) + block = self.build_block_on_tip() + + cmpct_block = P2PHeaderAndShortIDs() + cmpct_block.header = CBlockHeader(block) + cmpct_block.prefilled_txn_length = 1 + # This index will be too high + prefilled_txn = PrefilledTransaction(1, block.vtx[0]) + cmpct_block.prefilled_txn = [prefilled_txn] + self.test_node.send_and_ping(msg_cmpctblock(cmpct_block)) + assert(int(self.nodes[0].getbestblockhash(), 16) == block.hashPrevBlock) + + # Compare the generated shortids to what we expect based on BIP 152, given + # bitcoind's choice of nonce. + def test_compactblock_construction(self): + print("Testing compactblock headers and shortIDs are correct...") + + # Generate a bunch of transactions. + self.nodes[0].generate(101) + num_transactions = 25 + address = self.nodes[0].getnewaddress() + for i in range(num_transactions): + self.nodes[0].sendtoaddress(address, 0.1) + + # Now mine a block, and look at the resulting compact block. + self.test_node.clear_block_announcement() + block_hash = int(self.nodes[0].generate(1)[0], 16) + + # Store the raw block in our internal format. + block = FromHex(CBlock(), self.nodes[0].getblock("%02x" % block_hash, False)) + [tx.calc_sha256() for tx in block.vtx] + block.rehash() + + # Don't care which type of announcement came back for this test; just + # request the compact block if we didn't get one yet. + wait_until(self.test_node.received_block_announcement, timeout=30) + + with mininode_lock: + if self.test_node.last_cmpctblock is None: + self.test_node.clear_block_announcement() + inv = CInv(4, block_hash) # 4 == "CompactBlock" + self.test_node.send_message(msg_getdata([inv])) + + wait_until(self.test_node.received_block_announcement, timeout=30) + + # Now we should have the compactblock + header_and_shortids = None + with mininode_lock: + assert(self.test_node.last_cmpctblock is not None) + # Convert the on-the-wire representation to absolute indexes + header_and_shortids = HeaderAndShortIDs(self.test_node.last_cmpctblock.header_and_shortids) + + # Check that we got the right block! + header_and_shortids.header.calc_sha256() + assert_equal(header_and_shortids.header.sha256, block_hash) + + # Make sure the prefilled_txn appears to have included the coinbase + assert(len(header_and_shortids.prefilled_txn) >= 1) + assert_equal(header_and_shortids.prefilled_txn[0].index, 0) + + # Check that all prefilled_txn entries match what's in the block. + for entry in header_and_shortids.prefilled_txn: + entry.tx.calc_sha256() + assert_equal(entry.tx.sha256, block.vtx[entry.index].sha256) + + # Check that the cmpctblock message announced all the transactions. + assert_equal(len(header_and_shortids.prefilled_txn) + len(header_and_shortids.shortids), len(block.vtx)) + + # And now check that all the shortids are as expected as well. + # Determine the siphash keys to use. + [k0, k1] = header_and_shortids.get_siphash_keys() + + index = 0 + while index < len(block.vtx): + if (len(header_and_shortids.prefilled_txn) > 0 and + header_and_shortids.prefilled_txn[0].index == index): + # Already checked prefilled transactions above + header_and_shortids.prefilled_txn.pop(0) + else: + shortid = calculate_shortid(k0, k1, block.vtx[index].sha256) + assert_equal(shortid, header_and_shortids.shortids[0]) + header_and_shortids.shortids.pop(0) + index += 1 + + # Test that bitcoind requests compact blocks when we announce new blocks + # via header or inv, and that responding to getblocktxn causes the block + # to be successfully reconstructed. + def test_compactblock_requests(self): + print("Testing compactblock requests... ") + + # Try announcing a block with an inv or header, expect a compactblock + # request + for announce in ["inv", "header"]: + block = self.build_block_on_tip() + with mininode_lock: + self.test_node.last_getdata = None + + if announce == "inv": + self.test_node.send_message(msg_inv([CInv(2, block.sha256)])) + else: + self.test_node.send_header_for_blocks([block]) + success = wait_until(lambda: self.test_node.last_getdata is not None, timeout=30) + assert(success) + assert_equal(len(self.test_node.last_getdata.inv), 1) + assert_equal(self.test_node.last_getdata.inv[0].type, 4) + assert_equal(self.test_node.last_getdata.inv[0].hash, block.sha256) + + # Send back a compactblock message that omits the coinbase + comp_block = HeaderAndShortIDs() + comp_block.header = CBlockHeader(block) + comp_block.nonce = 0 + comp_block.shortids = [1] # this is useless, and wrong + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.hashPrevBlock) + # Expect a getblocktxn message. + with mininode_lock: + assert(self.test_node.last_getblocktxn is not None) + absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert_equal(absolute_indexes, [0]) # should be a coinbase request + + # Send the coinbase, and verify that the tip advances. + msg = msg_blocktxn() + msg.block_transactions.blockhash = block.sha256 + msg.block_transactions.transactions = [block.vtx[0]] + self.test_node.send_and_ping(msg) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + + # Create a chain of transactions from given utxo, and add to a new block. + def build_block_with_transactions(self, utxo, num_transactions): + block = self.build_block_on_tip() + + for i in range(num_transactions): + tx = CTransaction() + tx.vin.append(CTxIn(COutPoint(utxo[0], utxo[1]), b'')) + tx.vout.append(CTxOut(utxo[2] - 1000, CScript([OP_TRUE]))) + tx.rehash() + utxo = [tx.sha256, 0, tx.vout[0].nValue] + block.vtx.append(tx) + + block.hashMerkleRoot = block.calc_merkle_root() + block.solve() + return block + + # Test that we only receive getblocktxn requests for transactions that the + # node needs, and that responding to them causes the block to be + # reconstructed. + def test_getblocktxn_requests(self): + print("Testing getblocktxn requests...") + + # First try announcing compactblocks that won't reconstruct, and verify + # that we receive getblocktxn messages back. + utxo = self.utxos.pop(0) + + block = self.build_block_with_transactions(utxo, 5) + self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) + + comp_block = HeaderAndShortIDs() + comp_block.initialize_from_block(block) + + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + with mininode_lock: + assert(self.test_node.last_getblocktxn is not None) + absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert_equal(absolute_indexes, [1, 2, 3, 4, 5]) + msg = msg_blocktxn() + msg.block_transactions = BlockTransactions(block.sha256, block.vtx[1:]) + self.test_node.send_and_ping(msg) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + + utxo = self.utxos.pop(0) + block = self.build_block_with_transactions(utxo, 5) + self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) + + # Now try interspersing the prefilled transactions + comp_block.initialize_from_block(block, prefill_list=[0, 1, 5]) + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + with mininode_lock: + assert(self.test_node.last_getblocktxn is not None) + absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert_equal(absolute_indexes, [2, 3, 4]) + msg.block_transactions = BlockTransactions(block.sha256, block.vtx[2:5]) + self.test_node.send_and_ping(msg) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + + # Now try giving one transaction ahead of time. + utxo = self.utxos.pop(0) + block = self.build_block_with_transactions(utxo, 5) + self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) + self.test_node.send_and_ping(msg_tx(block.vtx[1])) + assert(block.vtx[1].hash in self.nodes[0].getrawmempool()) + + # Prefill 4 out of the 6 transactions, and verify that only the one + # that was not in the mempool is requested. + comp_block.initialize_from_block(block, prefill_list=[0, 2, 3, 4]) + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + with mininode_lock: + assert(self.test_node.last_getblocktxn is not None) + absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert_equal(absolute_indexes, [5]) + + msg.block_transactions = BlockTransactions(block.sha256, [block.vtx[5]]) + self.test_node.send_and_ping(msg) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + + # Now provide all transactions to the node before the block is + # announced and verify reconstruction happens immediately. + utxo = self.utxos.pop(0) + block = self.build_block_with_transactions(utxo, 10) + self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) + for tx in block.vtx[1:]: + self.test_node.send_message(msg_tx(tx)) + self.test_node.sync_with_ping() + # Make sure all transactions were accepted. + mempool = self.nodes[0].getrawmempool() + for tx in block.vtx[1:]: + assert(tx.hash in mempool) + + # Clear out last request. + with mininode_lock: + self.test_node.last_getblocktxn = None + + # Send compact block + comp_block.initialize_from_block(block, prefill_list=[0]) + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + with mininode_lock: + # Shouldn't have gotten a request for any transaction + assert(self.test_node.last_getblocktxn is None) + # Tip should have updated + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + + # Incorrectly responding to a getblocktxn shouldn't cause the block to be + # permanently failed. + def test_incorrect_blocktxn_response(self): + print("Testing handling of incorrect blocktxn responses...") + + if (len(self.utxos) == 0): + self.make_utxos() + utxo = self.utxos.pop(0) + + block = self.build_block_with_transactions(utxo, 10) + self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) + # Relay the first 5 transactions from the block in advance + for tx in block.vtx[1:6]: + self.test_node.send_message(msg_tx(tx)) + self.test_node.sync_with_ping() + # Make sure all transactions were accepted. + mempool = self.nodes[0].getrawmempool() + for tx in block.vtx[1:6]: + assert(tx.hash in mempool) + + # Send compact block + comp_block = HeaderAndShortIDs() + comp_block.initialize_from_block(block, prefill_list=[0]) + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + absolute_indexes = [] + with mininode_lock: + assert(self.test_node.last_getblocktxn is not None) + absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert_equal(absolute_indexes, [6, 7, 8, 9, 10]) + + # Now give an incorrect response. + # Note that it's possible for bitcoind to be smart enough to know we're + # lying, since it could check to see if the shortid matches what we're + # sending, and eg disconnect us for misbehavior. If that behavior + # change were made, we could just modify this test by having a + # different peer provide the block further down, so that we're still + # verifying that the block isn't marked bad permanently. This is good + # enough for now. + msg = msg_blocktxn() + msg.block_transactions = BlockTransactions(block.sha256, [block.vtx[5]] + block.vtx[7:]) + self.test_node.send_and_ping(msg) + + # Tip should not have updated + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.hashPrevBlock) + + # We should receive a getdata request + success = wait_until(lambda: self.test_node.last_getdata is not None, timeout=10) + assert(success) + assert_equal(len(self.test_node.last_getdata.inv), 1) + assert_equal(self.test_node.last_getdata.inv[0].type, 2) + assert_equal(self.test_node.last_getdata.inv[0].hash, block.sha256) + + # Deliver the block + self.test_node.send_and_ping(msg_block(block)) + assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + + def test_getblocktxn_handler(self): + print("Testing getblocktxn handler...") + + # bitcoind won't respond for blocks whose height is more than 15 blocks + # deep. + MAX_GETBLOCKTXN_DEPTH = 15 + chain_height = self.nodes[0].getblockcount() + current_height = chain_height + while (current_height >= chain_height - MAX_GETBLOCKTXN_DEPTH): + block_hash = self.nodes[0].getblockhash(current_height) + block = FromHex(CBlock(), self.nodes[0].getblock(block_hash, False)) + + msg = msg_getblocktxn() + msg.block_txn_request = BlockTransactionsRequest(int(block_hash, 16), []) + num_to_request = random.randint(1, len(block.vtx)) + msg.block_txn_request.from_absolute(sorted(random.sample(range(len(block.vtx)), num_to_request))) + self.test_node.send_message(msg) + success = wait_until(lambda: self.test_node.last_blocktxn is not None, timeout=10) + assert(success) + + [tx.calc_sha256() for tx in block.vtx] + with mininode_lock: + assert_equal(self.test_node.last_blocktxn.block_transactions.blockhash, int(block_hash, 16)) + all_indices = msg.block_txn_request.to_absolute() + for index in all_indices: + tx = self.test_node.last_blocktxn.block_transactions.transactions.pop(0) + tx.calc_sha256() + assert_equal(tx.sha256, block.vtx[index].sha256) + self.test_node.last_blocktxn = None + current_height -= 1 + + # Next request should be ignored, as we're past the allowed depth. + block_hash = self.nodes[0].getblockhash(current_height) + msg.block_txn_request = BlockTransactionsRequest(int(block_hash, 16), [0]) + self.test_node.send_and_ping(msg) + with mininode_lock: + assert_equal(self.test_node.last_blocktxn, None) + + def test_compactblocks_not_at_tip(self): + print("Testing compactblock requests/announcements not at chain tip...") + + # Test that requesting old compactblocks doesn't work. + MAX_CMPCTBLOCK_DEPTH = 11 + new_blocks = [] + for i in range(MAX_CMPCTBLOCK_DEPTH): + self.test_node.clear_block_announcement() + new_blocks.append(self.nodes[0].generate(1)[0]) + wait_until(self.test_node.received_block_announcement, timeout=30) + + self.test_node.clear_block_announcement() + self.test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) + success = wait_until(lambda: self.test_node.last_cmpctblock is not None, timeout=30) + assert(success) + + self.test_node.clear_block_announcement() + self.nodes[0].generate(1) + wait_until(self.test_node.received_block_announcement, timeout=30) + self.test_node.clear_block_announcement() + self.test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) + success = wait_until(lambda: self.test_node.last_block is not None, timeout=30) + assert(success) + with mininode_lock: + self.test_node.last_block.block.calc_sha256() + assert_equal(self.test_node.last_block.block.sha256, int(new_blocks[0], 16)) + + # Generate an old compactblock, and verify that it's not accepted. + cur_height = self.nodes[0].getblockcount() + hashPrevBlock = int(self.nodes[0].getblockhash(cur_height-5), 16) + block = self.build_block_on_tip() + block.hashPrevBlock = hashPrevBlock + block.solve() + + comp_block = HeaderAndShortIDs() + comp_block.initialize_from_block(block) + self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + + tips = self.nodes[0].getchaintips() + found = False + for x in tips: + if x["hash"] == block.hash: + assert_equal(x["status"], "headers-only") + found = True + break + assert(found) + + # Requesting this block via getblocktxn should silently fail + # (to avoid fingerprinting attacks). + msg = msg_getblocktxn() + msg.block_txn_request = BlockTransactionsRequest(block.sha256, [0]) + with mininode_lock: + self.test_node.last_blocktxn = None + self.test_node.send_and_ping(msg) + with mininode_lock: + assert(self.test_node.last_blocktxn is None) + + def run_test(self): + # Setup the p2p connections and start up the network thread. + self.test_node = TestNode() + + connections = [] + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.test_node)) + self.test_node.add_connection(connections[0]) + + NetworkThread().start() # Start up network handling in another thread + + # Test logic begins here + self.test_node.wait_for_verack() + + # We will need UTXOs to construct transactions in later tests. + self.make_utxos() + + self.test_sendcmpct() + self.test_compactblock_construction() + self.test_compactblock_requests() + self.test_getblocktxn_requests() + self.test_getblocktxn_handler() + self.test_compactblocks_not_at_tip() + self.test_incorrect_blocktxn_response() + self.test_invalid_cmpctblock_message() + + +if __name__ == '__main__': + CompactBlocksTest().main() From cef633ce63937eea37048fe07da2488fefb4ec7c Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 14 Sep 2016 21:00:53 -0400 Subject: [PATCH 127/302] Fix broken sendcmpct test in p2p-compactblocks.py Python lambda use was incorrect. sendcmpct messages need to be synchronized with RPC calls to generate(). Headers need to be synced (eg with getheaders) for cmpctblock announcements to start. Last test omitted sending a sendcmpct message. Github-Pull: #8739 Rebased-From: 157254a4bfdfc4ca3ad5bf2d84e82f290bd0c7f2) --- qa/rpc-tests/p2p-compactblocks.py | 58 +++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 7fe7ecc16c6..bf4fb43add3 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -78,6 +78,13 @@ def send_header_for_blocks(self, new_blocks): headers_message.headers = [CBlockHeader(b) for b in new_blocks] self.send_message(headers_message) + def request_headers_and_sync(self, locator, hashstop=0): + self.clear_block_announcement() + self.get_headers(locator, hashstop) + assert(wait_until(self.received_block_announcement, timeout=30)) + assert(self.received_block_announcement()) + self.clear_block_announcement() + class CompactBlocksTest(BitcoinTestFramework): def __init__(self): @@ -130,7 +137,7 @@ def make_utxos(self): # Test "sendcmpct": # - No compact block announcements or getdata(MSG_CMPCT_BLOCK) unless # sendcmpct is sent. - # - If sendcmpct is sent with version > 0, the message is ignored. + # - If sendcmpct is sent with version > 1, the message is ignored. # - If sendcmpct is sent with boolean 0, then block announcements are not # made with compact blocks. # - If sendcmpct is then sent with boolean 1, then new block announcements @@ -142,57 +149,66 @@ def test_sendcmpct(self): def received_sendcmpct(): return (self.test_node.last_sendcmpct is not None) got_message = wait_until(received_sendcmpct, timeout=30) + assert(received_sendcmpct()) assert(got_message) assert_equal(self.test_node.last_sendcmpct.version, 1) tip = int(self.nodes[0].getbestblockhash(), 16) def check_announcement_of_new_block(node, peer, predicate): - self.test_node.clear_block_announcement() + peer.clear_block_announcement() node.generate(1) - got_message = wait_until(peer.received_block_announcement, timeout=30) + got_message = wait_until(lambda: peer.block_announced, timeout=30) + assert(peer.block_announced) assert(got_message) with mininode_lock: - assert(predicate) + assert(predicate(peer)) # We shouldn't get any block announcements via cmpctblock yet. - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None) # Try one more time, this time after requesting headers. - self.test_node.clear_block_announcement() - self.test_node.get_headers(locator=[tip], hashstop=0) - wait_until(self.test_node.received_block_announcement, timeout=30) - self.test_node.clear_block_announcement() + self.test_node.request_headers_and_sync(locator=[tip]) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None and self.test_node.last_inv is not None) + # Test a few ways of using sendcmpct that should NOT + # result in compact block announcements. + # Before each test, sync the headers chain. + self.test_node.request_headers_and_sync(locator=[tip]) # Now try a SENDCMPCT message with too-high version sendcmpct = msg_sendcmpct() sendcmpct.version = 2 - self.test_node.send_message(sendcmpct) + self.test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None) + # Headers sync before next test. + self.test_node.request_headers_and_sync(locator=[tip]) # Now try a SENDCMPCT message with valid version, but announce=False - self.test_node.send_message(msg_sendcmpct()) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None) + self.test_node.send_and_ping(msg_sendcmpct()) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None) + + # Headers sync before next test. + self.test_node.request_headers_and_sync(locator=[tip]) # Finally, try a SENDCMPCT message with announce=True sendcmpct.version = 1 sendcmpct.announce = True - self.test_node.send_message(sendcmpct) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is not None) + self.test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is not None) - # Try one more time - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is not None) + # Try one more time (no headers sync should be needed!) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is not None) # Try one more time, after turning on sendheaders - self.test_node.send_message(msg_sendheaders()) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is not None) + self.test_node.send_and_ping(msg_sendheaders()) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is not None) # Now turn off announcements sendcmpct.announce = False - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda: self.test_node.last_cmpctblock is None and self.test_node.last_headers is not None) + self.test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None and p.last_headers is not None) # This test actually causes bitcoind to (reasonably!) disconnect us, so do this last. def test_invalid_cmpctblock_message(self): From 9dfa0c8d90177a12c3a3b1ac59c32727077d6803 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Wed, 31 Aug 2016 19:38:23 +0800 Subject: [PATCH 128/302] Implement NULLDUMMY softfork Github-Pull: #8636 Rebased-From: 482f852da65457eb2fbea6b259e7568133fb81c4 --- qa/pull-tester/rpc-tests.py | 1 + qa/rpc-tests/nulldummy.py | 148 ++++++++++++++++++++++++++++++++++++++++++++ src/main.cpp | 1 + 3 files changed, 150 insertions(+) create mode 100755 qa/rpc-tests/nulldummy.py diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 1e57a3fc20a..dbd6de5599d 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -143,6 +143,7 @@ 'importprunedfunds.py', 'signmessages.py', 'p2p-compactblocks.py', + 'nulldummy.py', ] if ENABLE_ZMQ: testScripts.append('zmq_test.py') diff --git a/qa/rpc-tests/nulldummy.py b/qa/rpc-tests/nulldummy.py new file mode 100755 index 00000000000..eaed7a8c789 --- /dev/null +++ b/qa/rpc-tests/nulldummy.py @@ -0,0 +1,148 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT 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, add_witness_commitment +from test_framework.comptool import TestManager +from test_framework.script import CScript +from io import BytesIO +import time + +NULLDUMMY_ERROR = "64: non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero)" + +def trueDummy(tx): + scriptSig = CScript(tx.vin[0].scriptSig) + newscript = [] + for i in scriptSig: + if (len(newscript) == 0): + assert(len(i) == 0) + newscript.append(b'\x51') + else: + newscript.append(i) + tx.vin[0].scriptSig = CScript(newscript) + tx.rehash() + +''' +This test is meant to exercise NULLDUMMY softfork. +Connect to a single node. +Generate 2 blocks (save the coinbases for later). +Generate 427 more blocks. +[Policy/Consensus] Check that NULLDUMMY compliant transactions are accepted in the 430th block. +[Policy] Check that non-NULLDUMMY transactions are rejected before activation. +[Consensus] Check that the new NULLDUMMY rules are not enforced on the 431st block. +[Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block. +''' + +class NULLDUMMYTest(ComparisonTestFramework): + + def __init__(self): + super().__init__() + self.num_nodes = 1 + + def setup_network(self): + # Must set the blockversion for this test + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, + extra_args=[['-debug', '-whitelist=127.0.0.1', '-walletprematurewitness']]) + + def run_test(self): + self.address = self.nodes[0].getnewaddress() + self.ms_address = self.nodes[0].addmultisigaddress(1,[self.address]) + self.wit_address = self.nodes[0].addwitnessaddress(self.address) + self.wit_ms_address = self.nodes[0].addwitnessaddress(self.ms_address) + + test = TestManager(self, self.options.tmpdir) + test.add_all_connections(self.nodes) + NetworkThread().start() # Start up network handling in another thread + self.coinbase_blocks = self.nodes[0].generate(2) # Block 2 + coinbase_txid = [] + for i in self.coinbase_blocks: + coinbase_txid.append(self.nodes[0].getblock(i)['tx'][0]) + self.nodes[0].generate(427) # Block 429 + self.lastblockhash = self.nodes[0].getbestblockhash() + self.tip = int("0x" + self.lastblockhash, 0) + self.lastblockheight = 429 + self.lastblocktime = int(time.time()) + 429 + + print ("Test 1: NULLDUMMY compliant base transactions should be accepted to mempool and mined before activation [430]") + test1txs = [self.create_transaction(self.nodes[0], coinbase_txid[0], self.ms_address, 49)] + txid1 = self.tx_submit(self.nodes[0], test1txs[0]) + test1txs.append(self.create_transaction(self.nodes[0], txid1, self.ms_address, 48)) + txid2 = self.tx_submit(self.nodes[0], test1txs[1]) + test1txs.append(self.create_transaction(self.nodes[0], coinbase_txid[1], self.wit_ms_address, 49)) + txid3 = self.tx_submit(self.nodes[0], test1txs[2]) + self.block_submit(self.nodes[0], test1txs, False, True) + + print ("Test 2: Non-NULLDUMMY base multisig transaction should not be accepted to mempool before activation") + test2tx = self.create_transaction(self.nodes[0], txid2, self.ms_address, 48) + trueDummy(test2tx) + txid4 = self.tx_submit(self.nodes[0], test2tx, NULLDUMMY_ERROR) + + print ("Test 3: Non-NULLDUMMY base transactions should be accepted in a block before activation [431]") + self.block_submit(self.nodes[0], [test2tx], False, True) + + print ("Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation") + test4tx = self.create_transaction(self.nodes[0], txid4, self.address, 47) + test6txs=[CTransaction(test4tx)] + trueDummy(test4tx) + self.tx_submit(self.nodes[0], test4tx, NULLDUMMY_ERROR) + self.block_submit(self.nodes[0], [test4tx]) + + print ("Test 5: Non-NULLDUMMY P2WSH multisig transaction invalid after activation") + test5tx = self.create_transaction(self.nodes[0], txid3, self.wit_address, 48) + test6txs.append(CTransaction(test5tx)) + test5tx.wit.vtxinwit[0].scriptWitness.stack[0] = b'\x01' + self.tx_submit(self.nodes[0], test5tx, NULLDUMMY_ERROR) + self.block_submit(self.nodes[0], [test5tx], True) + + print ("Test 6: NULLDUMMY compliant base/witness transactions should be accepted to mempool and in block after activation [432]") + for i in test6txs: + self.tx_submit(self.nodes[0], i) + self.block_submit(self.nodes[0], test6txs, True, True) + + + def create_transaction(self, node, txid, to_address, amount): + inputs = [{ "txid" : txid, "vout" : 0}] + outputs = { to_address : amount } + rawtx = node.createrawtransaction(inputs, outputs) + signresult = node.signrawtransaction(rawtx) + tx = CTransaction() + f = BytesIO(hex_str_to_bytes(signresult['hex'])) + tx.deserialize(f) + return tx + + + def tx_submit(self, node, tx, msg = ""): + tx.rehash() + try: + node.sendrawtransaction(bytes_to_hex_str(tx.serialize_with_witness()), True) + except JSONRPCException as exp: + assert_equal(exp.error["message"], msg) + return tx.hash + + + def block_submit(self, node, txs, witness = False, accept = False): + block = create_block(self.tip, create_coinbase(self.lastblockheight + 1), self.lastblocktime + 1) + block.nVersion = 4 + for tx in txs: + tx.rehash() + block.vtx.append(tx) + block.hashMerkleRoot = block.calc_merkle_root() + witness and add_witness_commitment(block) + block.rehash() + block.solve() + node.submitblock(bytes_to_hex_str(block.serialize(True))) + if (accept): + assert_equal(node.getbestblockhash(), block.hash) + self.tip = block.sha256 + self.lastblockhash = block.hash + self.lastblocktime += 1 + self.lastblockheight += 1 + else: + assert_equal(node.getbestblockhash(), self.lastblockhash) + +if __name__ == '__main__': + NULLDUMMYTest().main() \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index a664bf2de70..c9869d04f99 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2399,6 +2399,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin // Start enforcing WITNESS rules using versionbits logic. if (IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus())) { flags |= SCRIPT_VERIFY_WITNESS; + flags |= SCRIPT_VERIFY_NULLDUMMY; } int64_t nTime2 = GetTimeMicros(); nTimeForks += nTime2 - nTime1; From 375437c26bba95e9c25b758a186a3370f1d5e15d Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Sat, 24 Sep 2016 16:26:26 +0800 Subject: [PATCH 129/302] Ping regularly in p2p-segwit.py to keep connection alive This pings regularly while building a big block in p2p-segwit.py, to prevent timeout Github-Pull: #8803 Rebased-From: 0637b02fce04c800acc6747687c91c9b22f642e5 --- qa/rpc-tests/p2p-segwit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 8af46f03165..ada5fba7f33 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -1389,6 +1389,9 @@ def sign_P2PK_witness_input(script, txTo, inIdx, hashtype, value, key): block = self.build_next_block() used_sighash_single_out_of_bounds = False for i in range(NUM_TESTS): + # Ping regularly to keep the connection alive + if (not i % 100): + self.test_node.sync_with_ping() # Choose random number of inputs to use. num_inputs = random.randint(1, 10) # Create a slight bias for producing more utxos From 9bbe66e5929b47f3990a916787f1b145556fd665 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 28 Sep 2016 11:08:08 -0400 Subject: [PATCH 130/302] [qa] Split up slow RPC calls to avoid pruning test timeouts Github-Pull: #8827 Rebased-From: a0f8482f3e9b07e37c3f1b6fa09683b448810955 --- qa/rpc-tests/pruning.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py index 7cbe69c29b2..287dbc776e1 100755 --- a/qa/rpc-tests/pruning.py +++ b/qa/rpc-tests/pruning.py @@ -157,7 +157,10 @@ def reorg_test(self): print("Usage possibly still high bc of stale blocks in block files:", calc_usage(self.prunedir)) print("Mine 220 more blocks so we have requisite history (some blocks will be big and cause pruning of previous chain)") - self.nodes[0].generate(220) #node 0 has many large tx's in its mempool from the disconnects + for i in range(22): + # This can be slow, so do this in multiple RPC calls to avoid + # RPC timeouts. + self.nodes[0].generate(10) #node 0 has many large tx's in its mempool from the disconnects sync_blocks(self.nodes[0:3], timeout=300) usage = calc_usage(self.prunedir) From 2a8bca465dfd24cb7722d63d41bd67b0ba3dcb5c Mon Sep 17 00:00:00 2001 From: jnewbery Date: Wed, 28 Sep 2016 13:36:36 -0400 Subject: [PATCH 131/302] Add bitcoin-tx JSON tests Github-Pull: #8829 Rebased-From: 54e5d7c1b81e1b76f5789abfa2cb1f5963cd9d72 --- src/test/data/bitcoin-util-test.json | 85 +++++++++++- src/test/data/blanktx.json | 10 ++ src/test/data/tt-delin1-out.json | 216 +++++++++++++++++++++++++++++ src/test/data/tt-delout1-out.json | 212 +++++++++++++++++++++++++++++ src/test/data/tt-locktime317000-out.json | 225 +++++++++++++++++++++++++++++++ src/test/data/txcreate1.json | 63 +++++++++ src/test/data/txcreate2.json | 0 src/test/data/txcreatedata1.json | 41 ++++++ src/test/data/txcreatedata2.json | 41 ++++++ src/test/data/txcreatedata_seq0.json | 32 +++++ src/test/data/txcreatedata_seq1.json | 41 ++++++ src/test/data/txcreatesign.json | 32 +++++ 12 files changed, 997 insertions(+), 1 deletion(-) create mode 100644 src/test/data/blanktx.json create mode 100644 src/test/data/tt-delin1-out.json create mode 100644 src/test/data/tt-delout1-out.json create mode 100644 src/test/data/tt-locktime317000-out.json create mode 100644 src/test/data/txcreate1.json create mode 100644 src/test/data/txcreate2.json create mode 100644 src/test/data/txcreatedata1.json create mode 100644 src/test/data/txcreatedata2.json create mode 100644 src/test/data/txcreatedata_seq0.json create mode 100644 src/test/data/txcreatedata_seq1.json create mode 100644 src/test/data/txcreatesign.json diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json index 5cb383de85a..9df61a7e793 100644 --- a/src/test/data/bitcoin-util-test.json +++ b/src/test/data/bitcoin-util-test.json @@ -1,19 +1,33 @@ [ - { "exec": "././bitcoin-tx", + { "exec": "./bitcoin-tx", "args": ["-create"], "output_cmp": "blanktx.hex" }, { "exec": "./bitcoin-tx", + "args": ["-json","-create"], + "output_cmp": "blanktx.json" + }, + { "exec": "./bitcoin-tx", "args": ["-"], "input": "blanktx.hex", "output_cmp": "blanktx.hex" }, { "exec": "./bitcoin-tx", + "args": ["-json","-"], + "input": "blanktx.hex", + "output_cmp": "blanktx.json" + }, + { "exec": "./bitcoin-tx", "args": ["-", "delin=1"], "input": "tx394b54bb.hex", "output_cmp": "tt-delin1-out.hex" }, { "exec": "./bitcoin-tx", + "args": ["-json", "-", "delin=1"], + "input": "tx394b54bb.hex", + "output_cmp": "tt-delin1-out.json" + }, + { "exec": "./bitcoin-tx", "args": ["-", "delin=31"], "input": "tx394b54bb.hex", "return_code": 1 @@ -24,6 +38,11 @@ "output_cmp": "tt-delout1-out.hex" }, { "exec": "./bitcoin-tx", + "args": ["-json", "-", "delout=1"], + "input": "tx394b54bb.hex", + "output_cmp": "tt-delout1-out.json" + }, + { "exec": "./bitcoin-tx", "args": ["-", "delout=2"], "input": "tx394b54bb.hex", "return_code": 1 @@ -34,6 +53,11 @@ "output_cmp": "tt-locktime317000-out.hex" }, { "exec": "./bitcoin-tx", + "args": ["-json", "-", "locktime=317000"], + "input": "tx394b54bb.hex", + "output_cmp": "tt-locktime317000-out.json" + }, + { "exec": "./bitcoin-tx", "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", @@ -44,10 +68,25 @@ "output_cmp": "txcreate1.hex" }, { "exec": "./bitcoin-tx", + "args": + ["-json", + "-create", + "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", + "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18", + "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1", + "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o", + "outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"], + "output_cmp": "txcreate1.json" + }, + { "exec": "./bitcoin-tx", "args": ["-create", "outscript=0:"], "output_cmp": "txcreate2.hex" }, { "exec": "./bitcoin-tx", + "args": ["-json", "-create", "outscript=0:"], + "output_cmp": "txcreate2.json" + }, + { "exec": "./bitcoin-tx", "args": ["-create", "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0", @@ -59,6 +98,17 @@ }, { "exec": "./bitcoin-tx", "args": + ["-json", + "-create", + "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0", + "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]", + "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]", + "sign=ALL", + "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"], + "output_cmp": "txcreatesign.json" + }, + { "exec": "./bitcoin-tx", + "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outdata=4:badhexdata"], @@ -81,6 +131,15 @@ }, { "exec": "./bitcoin-tx", "args": + ["-json", + "-create", + "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", + "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o", + "outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"], + "output_cmp": "txcreatedata1.json" + }, + { "exec": "./bitcoin-tx", + "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o", @@ -89,6 +148,15 @@ }, { "exec": "./bitcoin-tx", "args": + ["-json", + "-create", + "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", + "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o", + "outdata=54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"], + "output_cmp": "txcreatedata2.json" + }, + { "exec": "./bitcoin-tx", + "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293", "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"], @@ -96,8 +164,23 @@ }, { "exec": "./bitcoin-tx", "args": + ["-json", + "-create", + "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967293", + "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o"], + "output_cmp": "txcreatedata_seq0.json" + }, + { "exec": "./bitcoin-tx", + "args": ["01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"], "output_cmp": "txcreatedata_seq1.hex" + }, + { "exec": "./bitcoin-tx", + "args": + ["-json", + "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000", + "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"], + "output_cmp": "txcreatedata_seq1.json" } ] diff --git a/src/test/data/blanktx.json b/src/test/data/blanktx.json new file mode 100644 index 00000000000..f6d6ab58842 --- /dev/null +++ b/src/test/data/blanktx.json @@ -0,0 +1,10 @@ +{ + "txid": "d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43", + "version": 1, + "locktime": 0, + "vin": [ + ], + "vout": [ + ], + "hex": "01000000000000000000" +} diff --git a/src/test/data/tt-delin1-out.json b/src/test/data/tt-delin1-out.json new file mode 100644 index 00000000000..2c7a68636a2 --- /dev/null +++ b/src/test/data/tt-delin1-out.json @@ -0,0 +1,216 @@ +{ + "txid": "81b2035be1da1abe745c6141174a73d151009ec17b3d5ebffa2e177408c50dfd", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "27871a1a27d833e99cd392a502a647beaaeda6da535417501c76312d52235cfd", + "vout": 332, + "scriptSig": { + "asm": "3046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "752f7f69b915637dc1c2f7aed1466ad676f6f3e24cf922809705f664e97ab3c1", + "vout": 1, + "scriptSig": { + "asm": "3044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba[ALL] 027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34", + "hex": "473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34" + }, + "sequence": 4294967295 + }, + { + "txid": "b0ac9cca2e69cd02410e31b1f4402a25758e71abd1ab06c265ef9077dc05d0ed", + "vout": 209, + "scriptSig": { + "asm": "304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "a135eafb595eaf4c1ea59ccb111cdc0eae1b2c979b226a1e5aa8b76fe2d628df", + "vout": 0, + "scriptSig": { + "asm": "3045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374[ALL] 03a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52", + "hex": "483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52" + }, + "sequence": 4294967295 + }, + { + "txid": "a5d6bf53ba21140b8a4d554feb00fe8bb9a62430ff9e4624aa2f58a120232aae", + "vout": 1, + "scriptSig": { + "asm": "3046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "1b299cf14f1a22e81ea56d71b7affbd7cf386807bf2b4d4b79a18a54125accb3", + "vout": 0, + "scriptSig": { + "asm": "3045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967[ALL] 03a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52", + "hex": "483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52" + }, + "sequence": 4294967295 + }, + { + "txid": "071df1cdcb3f0070f9d6af7b0274f02d0be2324a274727cfd288383167531485", + "vout": 21, + "scriptSig": { + "asm": "3045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "b012e500eb7adf7a13ed332dd6ece849f94f7a62bb3eac5babab356d1fc19282", + "vout": 9, + "scriptSig": { + "asm": "304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "58840fee9c833f2f2d40575842f30f4b8d2553094d06ad88b03d06869acf3d88", + "vout": 30, + "scriptSig": { + "asm": "30440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "e69f9cd16946e570a665245354428a3f507ea69f4568b581e4af98edb3db9766", + "vout": 114, + "scriptSig": { + "asm": "304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "595d1257f654ed2cbe5a65421e8aefd2b4d70b5b6c89a03f1d7e518221fc3f02", + "vout": 103, + "scriptSig": { + "asm": "3046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "06fc818f9555a261248ecd7aad0993eafb5a82ceb2b5c87c3ddfb06671c7f816", + "vout": 1, + "scriptSig": { + "asm": "3045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec7669018[ALL] 0234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd", + "hex": "483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd" + }, + "sequence": 4294967295 + }, + { + "txid": "fb416c8155d6bb1d43f9395466ca90a638a7c2dd3ff617aadf3a7ac8f3967b19", + "vout": 0, + "scriptSig": { + "asm": "304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a[ALL] 027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34", + "hex": "49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34" + }, + "sequence": 4294967295 + }, + { + "txid": "3940b9683bd6104ad24c978e640ba4095993cafdb27d2ed91baa27ee61a2d920", + "vout": 221, + "scriptSig": { + "asm": "3045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "711b5714d3b5136147c02194cd95bde94a4648c4263ca6f972d86cd1d579f150", + "vout": 1, + "scriptSig": { + "asm": "3045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba9074[ALL] 0234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd", + "hex": "483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd" + }, + "sequence": 4294967295 + }, + { + "txid": "6364b5c5efe018430789e7fb4e338209546cae5d9c5f5e300aac68155d861b55", + "vout": 27, + "scriptSig": { + "asm": "304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "0bb57f6e38012c86d4c5a28c904f2675082859147921a707d48961015a3e5057", + "vout": 1095, + "scriptSig": { + "asm": "304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "9b34274814a2540bb062107117f8f3e75ef85d953e9372d8261a3e9dfbc1163f", + "vout": 37, + "scriptSig": { + "asm": "3045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "b86b5cc0d8a7374d94e277850b0a249cb26a7b42ddf014f28a49b8859da64241", + "vout": 20, + "scriptSig": { + "asm": "304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "3d0a2353eeec44d3c10aed259038db321912122cd4150048f7bfa4c0ecfee236", + "vout": 242, + "scriptSig": { + "asm": "3046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 1.3782, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 8fd139bb39ced713f231c58a4d07bf6954d1c201 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "1E7SGgAZFCHDnVZLuRViX3gUmxpMfdvd2o" + ] + } + }, + { + "value": 0.01000001, + "n": 1, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 6c772e9cf96371bba3da8cb733da70a2fcf20078 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "1AtWkdmfmYkErU16d3KYykJUbEp9MAj9Sb" + ] + } + } + ], + "hex": "0100000014fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0260f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac41420f00000000001976a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac00000000" +} diff --git a/src/test/data/tt-delout1-out.json b/src/test/data/tt-delout1-out.json new file mode 100644 index 00000000000..9cf8cbb16c0 --- /dev/null +++ b/src/test/data/tt-delout1-out.json @@ -0,0 +1,212 @@ +{ + "txid": "c46ccd75b5050e942b2e86a3648f843f525fe6fc000bf0534ba5973063354493", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "27871a1a27d833e99cd392a502a647beaaeda6da535417501c76312d52235cfd", + "vout": 332, + "scriptSig": { + "asm": "3046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "a72ec96bd0d022d1b0c2f9078cdd46b3725b8eecdd001e17b21e3ababad14ecb", + "vout": 0, + "scriptSig": { + "asm": "3046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba[ALL] 03e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505", + "hex": "493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505" + }, + "sequence": 4294967295 + }, + { + "txid": "752f7f69b915637dc1c2f7aed1466ad676f6f3e24cf922809705f664e97ab3c1", + "vout": 1, + "scriptSig": { + "asm": "3044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba[ALL] 027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34", + "hex": "473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34" + }, + "sequence": 4294967295 + }, + { + "txid": "b0ac9cca2e69cd02410e31b1f4402a25758e71abd1ab06c265ef9077dc05d0ed", + "vout": 209, + "scriptSig": { + "asm": "304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "a135eafb595eaf4c1ea59ccb111cdc0eae1b2c979b226a1e5aa8b76fe2d628df", + "vout": 0, + "scriptSig": { + "asm": "3045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374[ALL] 03a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52", + "hex": "483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52" + }, + "sequence": 4294967295 + }, + { + "txid": "a5d6bf53ba21140b8a4d554feb00fe8bb9a62430ff9e4624aa2f58a120232aae", + "vout": 1, + "scriptSig": { + "asm": "3046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "1b299cf14f1a22e81ea56d71b7affbd7cf386807bf2b4d4b79a18a54125accb3", + "vout": 0, + "scriptSig": { + "asm": "3045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967[ALL] 03a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52", + "hex": "483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52" + }, + "sequence": 4294967295 + }, + { + "txid": "071df1cdcb3f0070f9d6af7b0274f02d0be2324a274727cfd288383167531485", + "vout": 21, + "scriptSig": { + "asm": "3045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "b012e500eb7adf7a13ed332dd6ece849f94f7a62bb3eac5babab356d1fc19282", + "vout": 9, + "scriptSig": { + "asm": "304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "58840fee9c833f2f2d40575842f30f4b8d2553094d06ad88b03d06869acf3d88", + "vout": 30, + "scriptSig": { + "asm": "30440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "e69f9cd16946e570a665245354428a3f507ea69f4568b581e4af98edb3db9766", + "vout": 114, + "scriptSig": { + "asm": "304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "595d1257f654ed2cbe5a65421e8aefd2b4d70b5b6c89a03f1d7e518221fc3f02", + "vout": 103, + "scriptSig": { + "asm": "3046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "06fc818f9555a261248ecd7aad0993eafb5a82ceb2b5c87c3ddfb06671c7f816", + "vout": 1, + "scriptSig": { + "asm": "3045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec7669018[ALL] 0234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd", + "hex": "483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd" + }, + "sequence": 4294967295 + }, + { + "txid": "fb416c8155d6bb1d43f9395466ca90a638a7c2dd3ff617aadf3a7ac8f3967b19", + "vout": 0, + "scriptSig": { + "asm": "304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a[ALL] 027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34", + "hex": "49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34" + }, + "sequence": 4294967295 + }, + { + "txid": "3940b9683bd6104ad24c978e640ba4095993cafdb27d2ed91baa27ee61a2d920", + "vout": 221, + "scriptSig": { + "asm": "3045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "711b5714d3b5136147c02194cd95bde94a4648c4263ca6f972d86cd1d579f150", + "vout": 1, + "scriptSig": { + "asm": "3045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba9074[ALL] 0234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd", + "hex": "483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd" + }, + "sequence": 4294967295 + }, + { + "txid": "6364b5c5efe018430789e7fb4e338209546cae5d9c5f5e300aac68155d861b55", + "vout": 27, + "scriptSig": { + "asm": "304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "0bb57f6e38012c86d4c5a28c904f2675082859147921a707d48961015a3e5057", + "vout": 1095, + "scriptSig": { + "asm": "304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "9b34274814a2540bb062107117f8f3e75ef85d953e9372d8261a3e9dfbc1163f", + "vout": 37, + "scriptSig": { + "asm": "3045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "b86b5cc0d8a7374d94e277850b0a249cb26a7b42ddf014f28a49b8859da64241", + "vout": 20, + "scriptSig": { + "asm": "304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "3d0a2353eeec44d3c10aed259038db321912122cd4150048f7bfa4c0ecfee236", + "vout": 242, + "scriptSig": { + "asm": "3046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 1.3782, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 8fd139bb39ced713f231c58a4d07bf6954d1c201 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "1E7SGgAZFCHDnVZLuRViX3gUmxpMfdvd2o" + ] + } + } + ], + "hex": "0100000015fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffcb4ed1baba3a1eb2171e00ddec8e5b72b346dd8c07f9c2b0d122d0d06bc92ea7000000006c493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505ffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0160f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac00000000" +} diff --git a/src/test/data/tt-locktime317000-out.json b/src/test/data/tt-locktime317000-out.json new file mode 100644 index 00000000000..65b6a4451b2 --- /dev/null +++ b/src/test/data/tt-locktime317000-out.json @@ -0,0 +1,225 @@ +{ + "txid": "aded538f642c17e15f4d3306b8be7e1a4d1ae0c4616d641ab51ea09ba65e5cb5", + "version": 1, + "locktime": 317000, + "vin": [ + { + "txid": "27871a1a27d833e99cd392a502a647beaaeda6da535417501c76312d52235cfd", + "vout": 332, + "scriptSig": { + "asm": "3046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "a72ec96bd0d022d1b0c2f9078cdd46b3725b8eecdd001e17b21e3ababad14ecb", + "vout": 0, + "scriptSig": { + "asm": "3046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba[ALL] 03e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505", + "hex": "493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505" + }, + "sequence": 4294967295 + }, + { + "txid": "752f7f69b915637dc1c2f7aed1466ad676f6f3e24cf922809705f664e97ab3c1", + "vout": 1, + "scriptSig": { + "asm": "3044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba[ALL] 027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34", + "hex": "473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34" + }, + "sequence": 4294967295 + }, + { + "txid": "b0ac9cca2e69cd02410e31b1f4402a25758e71abd1ab06c265ef9077dc05d0ed", + "vout": 209, + "scriptSig": { + "asm": "304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "a135eafb595eaf4c1ea59ccb111cdc0eae1b2c979b226a1e5aa8b76fe2d628df", + "vout": 0, + "scriptSig": { + "asm": "3045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374[ALL] 03a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52", + "hex": "483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52" + }, + "sequence": 4294967295 + }, + { + "txid": "a5d6bf53ba21140b8a4d554feb00fe8bb9a62430ff9e4624aa2f58a120232aae", + "vout": 1, + "scriptSig": { + "asm": "3046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "1b299cf14f1a22e81ea56d71b7affbd7cf386807bf2b4d4b79a18a54125accb3", + "vout": 0, + "scriptSig": { + "asm": "3045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967[ALL] 03a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52", + "hex": "483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52" + }, + "sequence": 4294967295 + }, + { + "txid": "071df1cdcb3f0070f9d6af7b0274f02d0be2324a274727cfd288383167531485", + "vout": 21, + "scriptSig": { + "asm": "3045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "b012e500eb7adf7a13ed332dd6ece849f94f7a62bb3eac5babab356d1fc19282", + "vout": 9, + "scriptSig": { + "asm": "304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "58840fee9c833f2f2d40575842f30f4b8d2553094d06ad88b03d06869acf3d88", + "vout": 30, + "scriptSig": { + "asm": "30440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "e69f9cd16946e570a665245354428a3f507ea69f4568b581e4af98edb3db9766", + "vout": 114, + "scriptSig": { + "asm": "304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "595d1257f654ed2cbe5a65421e8aefd2b4d70b5b6c89a03f1d7e518221fc3f02", + "vout": 103, + "scriptSig": { + "asm": "3046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "06fc818f9555a261248ecd7aad0993eafb5a82ceb2b5c87c3ddfb06671c7f816", + "vout": 1, + "scriptSig": { + "asm": "3045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec7669018[ALL] 0234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd", + "hex": "483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd" + }, + "sequence": 4294967295 + }, + { + "txid": "fb416c8155d6bb1d43f9395466ca90a638a7c2dd3ff617aadf3a7ac8f3967b19", + "vout": 0, + "scriptSig": { + "asm": "304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a[ALL] 027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34", + "hex": "49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34" + }, + "sequence": 4294967295 + }, + { + "txid": "3940b9683bd6104ad24c978e640ba4095993cafdb27d2ed91baa27ee61a2d920", + "vout": 221, + "scriptSig": { + "asm": "3045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + }, + { + "txid": "711b5714d3b5136147c02194cd95bde94a4648c4263ca6f972d86cd1d579f150", + "vout": 1, + "scriptSig": { + "asm": "3045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba9074[ALL] 0234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd", + "hex": "483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cd" + }, + "sequence": 4294967295 + }, + { + "txid": "6364b5c5efe018430789e7fb4e338209546cae5d9c5f5e300aac68155d861b55", + "vout": 27, + "scriptSig": { + "asm": "304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "0bb57f6e38012c86d4c5a28c904f2675082859147921a707d48961015a3e5057", + "vout": 1095, + "scriptSig": { + "asm": "304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "9b34274814a2540bb062107117f8f3e75ef85d953e9372d8261a3e9dfbc1163f", + "vout": 37, + "scriptSig": { + "asm": "3045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "b86b5cc0d8a7374d94e277850b0a249cb26a7b42ddf014f28a49b8859da64241", + "vout": 20, + "scriptSig": { + "asm": "304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321[ALL] 03f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c", + "hex": "48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64c" + }, + "sequence": 4294967295 + }, + { + "txid": "3d0a2353eeec44d3c10aed259038db321912122cd4150048f7bfa4c0ecfee236", + "vout": 242, + "scriptSig": { + "asm": "3046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68[ALL] 03091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc", + "hex": "493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adc" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 1.3782, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 8fd139bb39ced713f231c58a4d07bf6954d1c201 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "1E7SGgAZFCHDnVZLuRViX3gUmxpMfdvd2o" + ] + } + }, + { + "value": 0.01000001, + "n": 1, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 6c772e9cf96371bba3da8cb733da70a2fcf20078 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "1AtWkdmfmYkErU16d3KYykJUbEp9MAj9Sb" + ] + } + } + ], + "hex": "0100000015fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffcb4ed1baba3a1eb2171e00ddec8e5b72b346dd8c07f9c2b0d122d0d06bc92ea7000000006c493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505ffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0260f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac41420f00000000001976a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac48d60400" +} diff --git a/src/test/data/txcreate1.json b/src/test/data/txcreate1.json new file mode 100644 index 00000000000..3890dbaf6e0 --- /dev/null +++ b/src/test/data/txcreate1.json @@ -0,0 +1,63 @@ +{ + "txid": "f70f0d6c71416ed538e37549f430ab3665fee2437a42f10238c1bd490e782231", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f", + "vout": 0, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967295 + }, + { + "txid": "bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c", + "vout": 18, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967295 + }, + { + "txid": "22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc", + "vout": 1, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 0.18, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 1fc11f39be1729bf973a7ab6a615ca4729d64574 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "13tuJJDR2RgArmgfv6JScSdreahzgc4T6o" + ] + } + }, + { + "value": 4.00, + "n": 1, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 f2d4db28cad6502226ee484ae24505c2885cb12d OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46" + ] + } + } + ], + "hex": "01000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000" +} diff --git a/src/test/data/txcreate2.json b/src/test/data/txcreate2.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/test/data/txcreatedata1.json b/src/test/data/txcreatedata1.json new file mode 100644 index 00000000000..2fed2281087 --- /dev/null +++ b/src/test/data/txcreatedata1.json @@ -0,0 +1,41 @@ +{ + "txid": "07894b4d12fe7853dd911402db1620920d261b9627c447f931417d330c25f06e", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f", + "vout": 0, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 0.18, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 1fc11f39be1729bf973a7ab6a615ca4729d64574 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "13tuJJDR2RgArmgfv6JScSdreahzgc4T6o" + ] + } + }, + { + "value": 4.00, + "n": 1, + "scriptPubKey": { + "asm": "OP_RETURN 54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e", + "hex": "6a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e", + "type": "nulldata" + } + } + ], + "hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d71700000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000" +} diff --git a/src/test/data/txcreatedata2.json b/src/test/data/txcreatedata2.json new file mode 100644 index 00000000000..3d4d367f37b --- /dev/null +++ b/src/test/data/txcreatedata2.json @@ -0,0 +1,41 @@ +{ + "txid": "4ed17118f5e932ba8c75c461787d171bc02a016d8557cb5bcf34cd416c27bb8b", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f", + "vout": 0, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 0.18, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 1fc11f39be1729bf973a7ab6a615ca4729d64574 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "13tuJJDR2RgArmgfv6JScSdreahzgc4T6o" + ] + } + }, + { + "value": 0.00, + "n": 1, + "scriptPubKey": { + "asm": "OP_RETURN 54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e", + "hex": "6a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e", + "type": "nulldata" + } + } + ], + "hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000" +} diff --git a/src/test/data/txcreatedata_seq0.json b/src/test/data/txcreatedata_seq0.json new file mode 100644 index 00000000000..f25aa43c2b2 --- /dev/null +++ b/src/test/data/txcreatedata_seq0.json @@ -0,0 +1,32 @@ +{ + "txid": "71603ccb1cd76d73d76eb6cfd5f0b9df6d65d90d76860ee52cb461c4be7032e8", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f", + "vout": 0, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967293 + } + ], + "vout": [ + { + "value": 0.18, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 1fc11f39be1729bf973a7ab6a615ca4729d64574 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "13tuJJDR2RgArmgfv6JScSdreahzgc4T6o" + ] + } + } + ], + "hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000" +} diff --git a/src/test/data/txcreatedata_seq1.json b/src/test/data/txcreatedata_seq1.json new file mode 100644 index 00000000000..33585d6dfad --- /dev/null +++ b/src/test/data/txcreatedata_seq1.json @@ -0,0 +1,41 @@ +{ + "txid": "c4dea671b0d7b48f8ab10bc46650e8329d3c5766931f548f513847a19f5ba75b", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f", + "vout": 0, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 4294967293 + }, + { + "txid": "5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f", + "vout": 0, + "scriptSig": { + "asm": "", + "hex": "" + }, + "sequence": 1 + } + ], + "vout": [ + { + "value": 0.18, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 1fc11f39be1729bf973a7ab6a615ca4729d64574 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "13tuJJDR2RgArmgfv6JScSdreahzgc4T6o" + ] + } + } + ], + "hex": "01000000021f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff1f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000010000000180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000" +} diff --git a/src/test/data/txcreatesign.json b/src/test/data/txcreatesign.json new file mode 100644 index 00000000000..057fe9b0102 --- /dev/null +++ b/src/test/data/txcreatesign.json @@ -0,0 +1,32 @@ +{ + "txid": "977e7cd286cb72cd470d539ba6cb48400f8f387d97451d45cdb8819437a303af", + "version": 1, + "locktime": 0, + "vin": [ + { + "txid": "4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485", + "vout": 0, + "scriptSig": { + "asm": "304502210096a75056c9e2cc62b7214777b3d2a592cfda7092520126d4ebfcd6d590c99bd8022051bb746359cf98c0603f3004477eac68701132380db8facba19c89dc5ab5c5e2[ALL] 0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", + "hex": "48304502210096a75056c9e2cc62b7214777b3d2a592cfda7092520126d4ebfcd6d590c99bd8022051bb746359cf98c0603f3004477eac68701132380db8facba19c89dc5ab5c5e201410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 0.001, + "n": 0, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 5834479edbbe0539b31ffd3a8f8ebadc2165ed01 OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac", + "reqSigs": 1, + "type": "pubkeyhash", + "addresses": [ + "193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7" + ] + } + } + ], + "hex": "01000000018594c5bdcaec8f06b78b596f31cd292a294fd031e24eec716f43dac91ea7494d000000008b48304502210096a75056c9e2cc62b7214777b3d2a592cfda7092520126d4ebfcd6d590c99bd8022051bb746359cf98c0603f3004477eac68701132380db8facba19c89dc5ab5c5e201410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ffffffff01a0860100000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac00000000" +} From 62886598dbed82a6ce2d987ad345ebf710751d26 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 20 Sep 2016 16:18:24 +0200 Subject: [PATCH 132/302] [Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfunds Github-Pull: #8765 Rebased-From: c6f5ca822f1308983431bf1b3c91f8aaccff51a0 --- src/wallet/rpcdump.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 443441a36a0..34b8c1fb793 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -346,8 +346,6 @@ UniValue removeprunedfunds(const UniValue& params, bool fHelp) throw JSONRPCError(RPC_INTERNAL_ERROR, "Transaction does not exist in wallet."); } - ThreadFlushWalletDB(pwalletMain->strWalletFile); - return NullUniValue; } From 83ad563ade3c7db887b12f7aaf6d5ad9c20f208a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 28 Sep 2016 21:05:11 +0200 Subject: [PATCH 133/302] [rpc] throw JSONRPCError when utxo set can not be read Github-Pull: #8832 Rebased-From: fa05cfdf256f3bc13b89ea80231e342f4302d204 --- src/rpc/blockchain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 9dc896b7af2..d95be05c3d4 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -704,6 +704,8 @@ UniValue gettxoutsetinfo(const UniValue& params, bool fHelp) ret.push_back(Pair("bytes_serialized", (int64_t)stats.nSerializedSize)); ret.push_back(Pair("hash_serialized", stats.hashSerialized.GetHex())); ret.push_back(Pair("total_amount", ValueFromAmount(stats.nTotalAmount))); + } else { + throw JSONRPCError(RPC_INTERNAL_ERROR, "Unable to read UTXO set"); } return ret; } From 1dd1783873db0a438a0141e908a9d08f1774e6e3 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 29 Sep 2016 11:21:33 +0200 Subject: [PATCH 134/302] [qa] blockstore: Switch to dumb dbm Github-Pull: #8834 Rebased-From: fa9cd25ed0587078e3218965606c79ebf8138d53 --- qa/rpc-tests/test_framework/blockstore.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/test_framework/blockstore.py b/qa/rpc-tests/test_framework/blockstore.py index 1e2bbb277ac..28a6b92b819 100644 --- a/qa/rpc-tests/test_framework/blockstore.py +++ b/qa/rpc-tests/test_framework/blockstore.py @@ -9,11 +9,11 @@ from .mininode import * from io import BytesIO -import dbm.ndbm +import dbm.dumb as dbmd class BlockStore(object): def __init__(self, datadir): - self.blockDB = dbm.ndbm.open(datadir + "/blocks", 'c') + self.blockDB = dbmd.open(datadir + "/blocks", 'c') self.currentBlock = 0 self.headers_map = dict() @@ -123,7 +123,7 @@ def get_locator(self, current_tip=None): class TxStore(object): def __init__(self, datadir): - self.txDB = dbm.ndbm.open(datadir + "/transactions", 'c') + self.txDB = dbmd.open(datadir + "/transactions", 'c') def close(self): self.txDB.close() From d87227d6d2d6e06af1ef4ad13e2b15f1d4d43600 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 29 Sep 2016 15:34:04 +0200 Subject: [PATCH 135/302] [qa] nulldummy: Don't run unused code Github-Pull: #8835 Rebased-From: fa156c604e7d86d84f7731b05d7530bc91d2736b --- qa/rpc-tests/nulldummy.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qa/rpc-tests/nulldummy.py b/qa/rpc-tests/nulldummy.py index eaed7a8c789..6488a92364e 100755 --- a/qa/rpc-tests/nulldummy.py +++ b/qa/rpc-tests/nulldummy.py @@ -3,11 +3,10 @@ # Distributed under the MIT 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.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, NetworkThread from test_framework.blocktools import create_coinbase, create_block, add_witness_commitment -from test_framework.comptool import TestManager from test_framework.script import CScript from io import BytesIO import time @@ -37,11 +36,12 @@ def trueDummy(tx): [Policy/Consensus] Check that the new NULLDUMMY rules are enforced on the 432nd block. ''' -class NULLDUMMYTest(ComparisonTestFramework): +class NULLDUMMYTest(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 1 + self.setup_clean_chain = True def setup_network(self): # Must set the blockversion for this test @@ -54,8 +54,6 @@ def run_test(self): self.wit_address = self.nodes[0].addwitnessaddress(self.address) self.wit_ms_address = self.nodes[0].addwitnessaddress(self.ms_address) - test = TestManager(self, self.options.tmpdir) - test.add_all_connections(self.nodes) NetworkThread().start() # Start up network handling in another thread self.coinbase_blocks = self.nodes[0].generate(2) # Block 2 coinbase_txid = [] @@ -145,4 +143,4 @@ def block_submit(self, node, txs, witness = False, accept = False): assert_equal(node.getbestblockhash(), self.lastblockhash) if __name__ == '__main__': - NULLDUMMYTest().main() \ No newline at end of file + NULLDUMMYTest().main() From eb18cc1272e1f29b2caccf08aedee3de6fc3c437 Mon Sep 17 00:00:00 2001 From: jnewbery Date: Thu, 29 Sep 2016 10:13:16 -0400 Subject: [PATCH 136/302] bitcoin-util-test.py should fail if the output file is empty Github-Pull: #8836 Rebased-From: da9469770847df56e67e629986129a087b5bd7a5 --- src/test/bctest.py | 3 +++ src/test/data/txcreate2.json | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/test/bctest.py b/src/test/bctest.py index 8105b87ffa3..39a27fcd0c4 100644 --- a/src/test/bctest.py +++ b/src/test/bctest.py @@ -24,6 +24,9 @@ def bctest(testDir, testObj, exeext): if "output_cmp" in testObj: outputFn = testObj['output_cmp'] outputData = open(testDir + "/" + outputFn).read() + if not outputData: + print("Output data missing for " + outputFn) + sys.exit(1) proc = subprocess.Popen(execrun, stdin=stdinCfg, stdout=subprocess.PIPE, stderr=subprocess.PIPE,universal_newlines=True) try: outs = proc.communicate(input=inputData) diff --git a/src/test/data/txcreate2.json b/src/test/data/txcreate2.json index e69de29bb2d..c56293eaf2c 100644 --- a/src/test/data/txcreate2.json +++ b/src/test/data/txcreate2.json @@ -0,0 +1,19 @@ +{ + "txid": "cf90229625e9eb10f6be8156bf6aa5ec2eca19a42b1e05c11f3029b560a32e13", + "version": 1, + "locktime": 0, + "vin": [ + ], + "vout": [ + { + "value": 0.00, + "n": 0, + "scriptPubKey": { + "asm": "", + "hex": "", + "type": "nonstandard" + } + } + ], + "hex": "01000000000100000000000000000000000000" +} From 31ab2f862ad48e89314611faa0debc916317cb16 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 29 Sep 2016 15:02:08 +0000 Subject: [PATCH 137/302] test: Avoid ConnectionResetErrors during RPC tests This is necessary on FreeBSD and MacOSX, at least. See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213 Github-Pull: #8839 Rebased-From: 1d28faf9e94fcf240ece7336d61ec297b064bc37 --- qa/rpc-tests/test_framework/authproxy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py index d095a56ce75..1a94bf5fe96 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -126,8 +126,9 @@ def _request(self, method, path, postdata): return self._get_response() else: raise - except BrokenPipeError: - # Python 3.5+ raises this instead of BadStatusLine when the connection was reset + except (BrokenPipeError,ConnectionResetError): + # Python 3.5+ raises BrokenPipeError instead of BadStatusLine when the connection was reset + # ConnectionResetError happens on FreeBSD with Python 3.4 self.__conn.close() self.__conn.request(method, path, postdata, headers) return self._get_response() From 3e4abb5025f4b7415fa57d576efebe1d45fd204e Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Fri, 30 Sep 2016 00:18:13 +0800 Subject: [PATCH 138/302] Fix nulldummy.py test Github-Pull: #8841 Rebased-From: 46a4774d2bb9cc863e43507212ef989fa10d56d4 --- qa/rpc-tests/nulldummy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/rpc-tests/nulldummy.py b/qa/rpc-tests/nulldummy.py index 6488a92364e..54b7eac3765 100755 --- a/qa/rpc-tests/nulldummy.py +++ b/qa/rpc-tests/nulldummy.py @@ -119,6 +119,8 @@ def tx_submit(self, node, tx, msg = ""): node.sendrawtransaction(bytes_to_hex_str(tx.serialize_with_witness()), True) except JSONRPCException as exp: assert_equal(exp.error["message"], msg) + else: + assert_equal('', msg) return tx.hash From 624a007f476027457b32e0bd42584e67bb003317 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 30 Sep 2016 20:54:30 -0400 Subject: [PATCH 139/302] [qa] Fix race condition in p2p-compactblocks test Also fix a bug in the sync_with_ping() helper function Github-Pull: #8854 Rebased-From: b5fd666984fdb7125cb809c773b36034f32128cc --- qa/rpc-tests/p2p-compactblocks.py | 2 ++ qa/rpc-tests/test_framework/mininode.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index bf4fb43add3..ac4655a841e 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -237,6 +237,8 @@ def test_compactblock_construction(self): for i in range(num_transactions): self.nodes[0].sendtoaddress(address, 0.1) + self.test_node.sync_with_ping() + # Now mine a block, and look at the resulting compact block. self.test_node.clear_block_announcement() block_hash = int(self.nodes[0].generate(1)[0], 16) diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index caffab35351..0b7b17cdb56 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -1536,7 +1536,7 @@ def sync_with_ping(self, timeout=30): def received_pong(): return (self.last_pong.nonce == self.ping_counter) self.send_message(msg_ping(nonce=self.ping_counter)) - success = wait_until(received_pong, timeout) + success = wait_until(received_pong, timeout=timeout) self.ping_counter += 1 return success From 1f60d455048b7c0af6a5fdc032022d3fac37e790 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 1 Oct 2016 11:36:25 +0200 Subject: [PATCH 140/302] [qa] mininode: Only allow named args in wait_until Github-Pull: #8857 Rebased-From: fa666094cf5b9ac4a7c1732a7ffa001afffcd938 --- qa/rpc-tests/maxuploadtarget.py | 2 +- qa/rpc-tests/p2p-mempool.py | 2 +- qa/rpc-tests/test_framework/mininode.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/maxuploadtarget.py b/qa/rpc-tests/maxuploadtarget.py index 125d4eb2751..d0e9fe9a3f5 100755 --- a/qa/rpc-tests/maxuploadtarget.py +++ b/qa/rpc-tests/maxuploadtarget.py @@ -75,7 +75,7 @@ def sync_with_ping(self, timeout=30): def received_pong(): return (self.last_pong.nonce == self.ping_counter) self.connection.send_message(msg_ping(nonce=self.ping_counter)) - success = wait_until(received_pong, timeout) + success = wait_until(received_pong, timeout=timeout) self.ping_counter += 1 return success diff --git a/qa/rpc-tests/p2p-mempool.py b/qa/rpc-tests/p2p-mempool.py index 5d2daf39f82..80948426d9e 100755 --- a/qa/rpc-tests/p2p-mempool.py +++ b/qa/rpc-tests/p2p-mempool.py @@ -63,7 +63,7 @@ def sync_with_ping(self, timeout=30): def received_pong(): return (self.last_pong.nonce == self.ping_counter) self.connection.send_message(msg_ping(nonce=self.ping_counter)) - success = wait_until(received_pong, timeout) + success = wait_until(received_pong, timeout=timeout) self.ping_counter += 1 return success diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 0b7b17cdb56..88a3b7e0f71 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -1320,7 +1320,7 @@ def __repr__(self): % (self.message, self.code, self.reason, self.data) # Helper function -def wait_until(predicate, attempts=float('inf'), timeout=float('inf')): +def wait_until(predicate, *, attempts=float('inf'), timeout=float('inf')): attempt = 0 elapsed = 0 From 794b007896aae7b180bdfc771bb4e1656a3e3329 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 25 Sep 2016 15:01:31 +0200 Subject: [PATCH 141/302] [qa] Add getinfo smoke tests and rework versionbits test Github-Pull: #8780 Rebased-From: fa6e71b27d00766897f3e69775d450924a58a153 --- qa/rpc-tests/p2p-versionbits-warning.py | 42 +++++++++++++++++++-------------- qa/rpc-tests/rpcbind_test.py | 2 +- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/qa/rpc-tests/p2p-versionbits-warning.py b/qa/rpc-tests/p2p-versionbits-warning.py index 962cafef0b1..00dbbc02cf3 100755 --- a/qa/rpc-tests/p2p-versionbits-warning.py +++ b/qa/rpc-tests/p2p-versionbits-warning.py @@ -6,6 +6,7 @@ from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * +import re import time from test_framework.blocktools import create_block, create_coinbase @@ -21,6 +22,10 @@ VB_TOP_BITS = 0x20000000 VB_UNKNOWN_BIT = 27 # Choose a bit unassigned to any deployment +WARN_UNKNOWN_RULES_MINED = "Unknown block versions being mined! It's possible unknown rules are in effect" +WARN_UNKNOWN_RULES_ACTIVE = "unknown new rules activated (versionbit {})".format(VB_UNKNOWN_BIT) +VB_PATTERN = re.compile("^Warning.*versionbit") + # TestNode: bare-bones "peer". Used mostly as a conduit for a test to sending # p2p messages to a node, generating the messages in the main testing logic. class TestNode(NodeConnCB): @@ -65,16 +70,12 @@ def __init__(self): self.num_nodes = 1 def setup_network(self): - self.nodes = [] self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt") # Open and close to create zero-length file - with open(self.alert_filename, 'w') as f: + with open(self.alert_filename, 'w') as _: pass - self.node_options = ["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""] - self.nodes.append(start_node(0, self.options.tmpdir, self.node_options)) - - import re - self.vb_pattern = re.compile("^Warning.*versionbit") + self.extra_args = [["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) # Send numblocks blocks via peer with nVersionToUse set. def send_blocks_with_version(self, peer, numblocks, nVersionToUse): @@ -83,7 +84,7 @@ def send_blocks_with_version(self, peer, numblocks, nVersionToUse): block_time = self.nodes[0].getblockheader(tip)["time"]+1 tip = int(tip, 16) - for i in range(numblocks): + for _ in range(numblocks): block = create_block(tip, create_coinbase(height+1), block_time) block.nVersion = nVersionToUse block.solve() @@ -96,7 +97,7 @@ def send_blocks_with_version(self, peer, numblocks, nVersionToUse): def test_versionbits_in_alert_file(self): with open(self.alert_filename, 'r') as f: alert_text = f.read() - assert(self.vb_pattern.match(alert_text)) + assert(VB_PATTERN.match(alert_text)) def run_test(self): # Setup the p2p connection and start up the network thread. @@ -122,8 +123,10 @@ def run_test(self): # Fill rest of period with regular version blocks self.nodes[0].generate(VB_PERIOD - VB_THRESHOLD + 1) # Check that we're not getting any versionbit-related errors in - # getinfo() - assert(not self.vb_pattern.match(self.nodes[0].getinfo()["errors"])) + # get*info() + assert(not VB_PATTERN.match(self.nodes[0].getinfo()["errors"])) + assert(not VB_PATTERN.match(self.nodes[0].getmininginfo()["errors"])) + assert(not VB_PATTERN.match(self.nodes[0].getnetworkinfo()["warnings"])) # 3. Now build one period of blocks with >= VB_THRESHOLD blocks signaling # some unknown bit @@ -132,8 +135,10 @@ def run_test(self): # Might not get a versionbits-related alert yet, as we should # have gotten a different alert due to more than 51/100 blocks # being of unexpected version. - # Check that getinfo() shows some kind of error. - assert(len(self.nodes[0].getinfo()["errors"]) != 0) + # Check that get*info() shows some kind of error. + assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getinfo()["errors"]) + assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getmininginfo()["errors"]) + assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getnetworkinfo()["warnings"]) # Mine a period worth of expected blocks so the generic block-version warning # is cleared, and restart the node. This should move the versionbit state @@ -142,20 +147,21 @@ def run_test(self): stop_node(self.nodes[0], 0) wait_bitcoinds() # Empty out the alert file - with open(self.alert_filename, 'w') as f: + with open(self.alert_filename, 'w') as _: pass - self.nodes[0] = start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]) + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) # Connecting one block should be enough to generate an error. self.nodes[0].generate(1) - assert(len(self.nodes[0].getinfo()["errors"]) != 0) + assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getinfo()["errors"]) + assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getmininginfo()["errors"]) + assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getnetworkinfo()["warnings"]) stop_node(self.nodes[0], 0) wait_bitcoinds() self.test_versionbits_in_alert_file() # Test framework expects the node to still be running... - self.nodes[0] = start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]) - + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) if __name__ == '__main__': VersionBitsWarningTest().main() diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py index bf1cc871261..b6407b91aee 100755 --- a/qa/rpc-tests/rpcbind_test.py +++ b/qa/rpc-tests/rpcbind_test.py @@ -46,7 +46,7 @@ def run_bind_test(self, allow_ips, connect_to, addresses, expected): def run_allowip_test(self, allow_ips, rpchost, rpcport): ''' - Start a node with rpcwallow IP, and request getinfo + Start a node with rpcallow IP, and request getinfo at a non-localhost IP. ''' base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips] From 0bee740845b9c7599e041b0be7111c8debaff63b Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 1 Oct 2016 21:07:31 +0200 Subject: [PATCH 142/302] [qa] util: Move wait_bitcoinds() into stop_nodes() Github-Pull: #8860 Rebased-From: fa7c35c4ec630838178b4674288da33561a66f08 --- qa/rpc-tests/bip9-softforks.py | 1 - qa/rpc-tests/fundrawtransaction.py | 1 - qa/rpc-tests/p2p-versionbits-warning.py | 6 ++---- qa/rpc-tests/reindex.py | 16 +++++++++------- qa/rpc-tests/rpcbind_test.py | 2 -- qa/rpc-tests/test_framework/test_framework.py | 4 ---- qa/rpc-tests/test_framework/util.py | 2 +- qa/rpc-tests/wallet.py | 3 --- 8 files changed, 12 insertions(+), 23 deletions(-) diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py index 979d1410c26..be6ddde112e 100755 --- a/qa/rpc-tests/bip9-softforks.py +++ b/qa/rpc-tests/bip9-softforks.py @@ -195,7 +195,6 @@ def test_BIP(self, bipName, activated_version, invalidate, invalidatePostSignatu # Restart all self.test.block_store.close() stop_nodes(self.nodes) - wait_bitcoinds() shutil.rmtree(self.options.tmpdir) self.setup_chain() self.setup_network() diff --git a/qa/rpc-tests/fundrawtransaction.py b/qa/rpc-tests/fundrawtransaction.py index eeb8476634f..8c45578fcfb 100755 --- a/qa/rpc-tests/fundrawtransaction.py +++ b/qa/rpc-tests/fundrawtransaction.py @@ -470,7 +470,6 @@ def run_test(self): self.nodes[1].encryptwallet("test") self.nodes.pop(1) stop_nodes(self.nodes) - wait_bitcoinds() self.nodes = start_nodes(self.num_nodes, self.options.tmpdir) # This test is not meant to test fee estimation and we'd like diff --git a/qa/rpc-tests/p2p-versionbits-warning.py b/qa/rpc-tests/p2p-versionbits-warning.py index 00dbbc02cf3..1fb4870e1a5 100755 --- a/qa/rpc-tests/p2p-versionbits-warning.py +++ b/qa/rpc-tests/p2p-versionbits-warning.py @@ -144,8 +144,7 @@ def run_test(self): # is cleared, and restart the node. This should move the versionbit state # to ACTIVE. self.nodes[0].generate(VB_PERIOD) - stop_node(self.nodes[0], 0) - wait_bitcoinds() + stop_nodes(self.nodes) # Empty out the alert file with open(self.alert_filename, 'w') as _: pass @@ -156,8 +155,7 @@ def run_test(self): assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getinfo()["errors"]) assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getmininginfo()["errors"]) assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getnetworkinfo()["warnings"]) - stop_node(self.nodes[0], 0) - wait_bitcoinds() + stop_nodes(self.nodes) self.test_versionbits_in_alert_file() # Test framework expects the node to still be running... diff --git a/qa/rpc-tests/reindex.py b/qa/rpc-tests/reindex.py index abbbb103369..25cf4c1679b 100755 --- a/qa/rpc-tests/reindex.py +++ b/qa/rpc-tests/reindex.py @@ -7,7 +7,11 @@ # Test -reindex and -reindex-chainstate with CheckBlockIndex # from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import * +from test_framework.util import ( + start_nodes, + stop_nodes, + assert_equal, +) import time class ReindexTest(BitcoinTestFramework): @@ -18,16 +22,14 @@ def __init__(self): self.num_nodes = 1 def setup_network(self): - self.nodes = [] - self.is_network_split = False - self.nodes.append(start_node(0, self.options.tmpdir)) + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir) def reindex(self, justchainstate=False): self.nodes[0].generate(3) blockcount = self.nodes[0].getblockcount() - stop_node(self.nodes[0], 0) - wait_bitcoinds() - self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug", "-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"]) + stop_nodes(self.nodes) + extra_args = [["-debug", "-reindex-chainstate" if justchainstate else "-reindex", "-checkblockindex=1"]] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) while self.nodes[0].getblockcount() < blockcount: time.sleep(0.1) assert_equal(self.nodes[0].getblockcount(), blockcount) diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py index b6407b91aee..3089455537e 100755 --- a/qa/rpc-tests/rpcbind_test.py +++ b/qa/rpc-tests/rpcbind_test.py @@ -42,7 +42,6 @@ def run_bind_test(self, allow_ips, connect_to, addresses, expected): assert_equal(set(get_bind_addrs(pid)), set(expected)) finally: stop_nodes(self.nodes) - wait_bitcoinds() def run_allowip_test(self, allow_ips, rpchost, rpcport): ''' @@ -58,7 +57,6 @@ def run_allowip_test(self, allow_ips, rpchost, rpcport): finally: node = None # make sure connection will be garbage collected and closed stop_nodes(self.nodes) - wait_bitcoinds() def run_test(self): # due to OS-specific network stats queries, this test works only on Linux diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index 306f31102b0..9d15d874565 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -21,7 +21,6 @@ sync_mempools, stop_nodes, stop_node, - wait_bitcoinds, enable_coverage, check_json_precision, initialize_chain_clean, @@ -81,7 +80,6 @@ def split_network(self): """ assert not self.is_network_split stop_nodes(self.nodes) - wait_bitcoinds() self.setup_network(True) def sync_all(self): @@ -100,7 +98,6 @@ def join_network(self): """ assert self.is_network_split stop_nodes(self.nodes) - wait_bitcoinds() self.setup_network(False) def main(self): @@ -168,7 +165,6 @@ def main(self): if not self.options.noshutdown: print("Stopping nodes") stop_nodes(self.nodes) - wait_bitcoinds() else: print("Note: bitcoinds were not stopped and may still be running") diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 8aa34265c54..53db1cc4927 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -262,7 +262,6 @@ def initialize_chain(test_dir, num_nodes): # Shut them down, and clean up cache directories: stop_nodes(rpcs) - wait_bitcoinds() disable_mocktime() for i in range(MAX_NODES): os.remove(log_filename("cache", i, "debug.log")) @@ -361,6 +360,7 @@ def stop_nodes(nodes): except http.client.CannotSendRequest as e: print("WARN: Unable to stop node: " + repr(e)) del nodes[:] # Emptying array closes connections as a side effect + wait_bitcoinds() def set_node_times(nodes, t): for node in nodes: diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index 3420be1a2ed..e43f6ea5d22 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -199,7 +199,6 @@ def run_test (self): #do some -walletbroadcast tests stop_nodes(self.nodes) - wait_bitcoinds() self.nodes = start_nodes(3, self.options.tmpdir, [["-walletbroadcast=0"],["-walletbroadcast=0"],["-walletbroadcast=0"]]) connect_nodes_bi(self.nodes,0,1) connect_nodes_bi(self.nodes,1,2) @@ -225,7 +224,6 @@ def run_test (self): #restart the nodes with -walletbroadcast=1 stop_nodes(self.nodes) - wait_bitcoinds() self.nodes = start_nodes(3, self.options.tmpdir) connect_nodes_bi(self.nodes,0,1) connect_nodes_bi(self.nodes,1,2) @@ -335,7 +333,6 @@ def run_test (self): for m in maintenance: print("check " + m) stop_nodes(self.nodes) - wait_bitcoinds() self.nodes = start_nodes(3, self.options.tmpdir, [[m]] * 3) while m == '-reindex' and [block_count] * 3 != [self.nodes[i].getblockcount() for i in range(3)]: # reindex will leave rpc warm up "early"; Wait for it to finish From cbc3fe59c4d92784411f5d40207ddde61fa5a892 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 29 Sep 2016 15:34:44 +0000 Subject: [PATCH 143/302] test: Explicitly set encoding to utf8 when opening text files These are text files but their encoding does not depend on the locale. Not all of them require utf8 but it is better to fix it at something to remove potential unpredictability. This is necessary on FreeBSD where no locale is set by default, and apparently Python defaults not only the terminal encoding to the locale but that of every text file. So without LOCALE environment it defaults text file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`. Luckily the locale doesn't affect the default encoding for str.encode() and bytes.decode() on Python 3, so this is the only change necessary. Github-Pull: #8840 Rebased-From: 30930e847e2483c7c8163cc581b392bc288250e9 --- qa/rpc-tests/forknotify.py | 6 +++--- qa/rpc-tests/multi_rpc.py | 2 +- qa/rpc-tests/p2p-versionbits-warning.py | 6 +++--- qa/rpc-tests/test_framework/coverage.py | 4 ++-- qa/rpc-tests/test_framework/netutil.py | 2 +- qa/rpc-tests/test_framework/util.py | 2 +- qa/rpc-tests/wallet-dump.py | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py index 5a3f75c8087..a1901aedab8 100755 --- a/qa/rpc-tests/forknotify.py +++ b/qa/rpc-tests/forknotify.py @@ -22,7 +22,7 @@ def __init__(self): def setup_network(self): self.nodes = [] self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt") - with open(self.alert_filename, 'w') as f: + with open(self.alert_filename, 'w', encoding='utf8') as f: pass # Just open then close to create zero-length file self.nodes.append(start_node(0, self.options.tmpdir, ["-blockversion=2", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""])) @@ -44,7 +44,7 @@ def run_test(self): self.nodes[1].generate(1) self.sync_all() - with open(self.alert_filename, 'r') as f: + with open(self.alert_filename, 'r', encoding='utf8') as f: alert_text = f.read() if len(alert_text) == 0: @@ -56,7 +56,7 @@ def run_test(self): self.nodes[1].generate(1) self.sync_all() - with open(self.alert_filename, 'r') as f: + with open(self.alert_filename, 'r', encoding='utf8') as f: alert_text2 = f.read() if alert_text != alert_text2: diff --git a/qa/rpc-tests/multi_rpc.py b/qa/rpc-tests/multi_rpc.py index 24373b257d7..cdeb94caa09 100755 --- a/qa/rpc-tests/multi_rpc.py +++ b/qa/rpc-tests/multi_rpc.py @@ -26,7 +26,7 @@ def setup_chain(self): #Append rpcauth to bitcoin.conf before initialization rpcauth = "rpcauth=rt:93648e835a54c573682c2eb19f882535$7681e9c5b74bdd85e78166031d2058e1069b3ed7ed967c93fc63abba06f31144" rpcauth2 = "rpcauth=rt2:f8607b1a88861fac29dfccf9b52ff9f$ff36a0c23c8c62b4846112e50fa888416e94c17bfd4c42f88fd8f55ec6a3137e" - with open(os.path.join(self.options.tmpdir+"/node0", "bitcoin.conf"), 'a') as f: + with open(os.path.join(self.options.tmpdir+"/node0", "bitcoin.conf"), 'a', encoding='utf8') as f: f.write(rpcauth+"\n") f.write(rpcauth2+"\n") diff --git a/qa/rpc-tests/p2p-versionbits-warning.py b/qa/rpc-tests/p2p-versionbits-warning.py index 1fb4870e1a5..fc3eddddee1 100755 --- a/qa/rpc-tests/p2p-versionbits-warning.py +++ b/qa/rpc-tests/p2p-versionbits-warning.py @@ -72,7 +72,7 @@ def __init__(self): def setup_network(self): self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt") # Open and close to create zero-length file - with open(self.alert_filename, 'w') as _: + with open(self.alert_filename, 'w', encoding='utf8') as _: pass self.extra_args = [["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]] self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) @@ -95,7 +95,7 @@ def send_blocks_with_version(self, peer, numblocks, nVersionToUse): peer.sync_with_ping() def test_versionbits_in_alert_file(self): - with open(self.alert_filename, 'r') as f: + with open(self.alert_filename, 'r', encoding='utf8') as f: alert_text = f.read() assert(VB_PATTERN.match(alert_text)) @@ -146,7 +146,7 @@ def run_test(self): self.nodes[0].generate(VB_PERIOD) stop_nodes(self.nodes) # Empty out the alert file - with open(self.alert_filename, 'w') as _: + with open(self.alert_filename, 'w', encoding='utf8') as _: pass self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) diff --git a/qa/rpc-tests/test_framework/coverage.py b/qa/rpc-tests/test_framework/coverage.py index 23fce610140..13b33869f54 100644 --- a/qa/rpc-tests/test_framework/coverage.py +++ b/qa/rpc-tests/test_framework/coverage.py @@ -50,7 +50,7 @@ def __call__(self, *args, **kwargs): rpc_method = self.auth_service_proxy_instance._service_name if self.coverage_logfile: - with open(self.coverage_logfile, 'a+') as f: + with open(self.coverage_logfile, 'a+', encoding='utf8') as f: f.write("%s\n" % rpc_method) return return_val @@ -100,7 +100,7 @@ def write_all_rpc_commands(dirname, node): if line and not line.startswith('='): commands.add("%s\n" % line.split()[0]) - with open(filename, 'w') as f: + with open(filename, 'w', encoding='utf8') as f: f.writelines(list(commands)) return True diff --git a/qa/rpc-tests/test_framework/netutil.py b/qa/rpc-tests/test_framework/netutil.py index 573b06772d7..b92a9f6e1ce 100644 --- a/qa/rpc-tests/test_framework/netutil.py +++ b/qa/rpc-tests/test_framework/netutil.py @@ -58,7 +58,7 @@ def netstat(typ='tcp'): To get pid of all network process running on system, you must run this script as superuser ''' - with open('/proc/net/'+typ,'r') as f: + with open('/proc/net/'+typ,'r',encoding='utf8') as f: content = f.readlines() content.pop(0) result = [] diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 53db1cc4927..47cebf4f6e0 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -157,7 +157,7 @@ def initialize_datadir(dirname, n): if not os.path.isdir(datadir): os.makedirs(datadir) rpc_u, rpc_p = rpc_auth_pair(n) - with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f: + with open(os.path.join(datadir, "bitcoin.conf"), 'w', encoding='utf8') as f: f.write("regtest=1\n") f.write("rpcuser=" + rpc_u + "\n") f.write("rpcpassword=" + rpc_p + "\n") diff --git a/qa/rpc-tests/wallet-dump.py b/qa/rpc-tests/wallet-dump.py index 6028d2c20b1..a37096a40ce 100755 --- a/qa/rpc-tests/wallet-dump.py +++ b/qa/rpc-tests/wallet-dump.py @@ -12,7 +12,7 @@ def read_dump(file_name, addrs, hd_master_addr_old): Read the given dump, count the addrs that match, count change and reserve. Also check that the old hd_master is inactive """ - with open(file_name) as inputfile: + with open(file_name, encoding='utf8') as inputfile: found_addr = 0 found_addr_chg = 0 found_addr_rsv = 0 From b98734843520bc09d11ab76842de420479468801 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 4 Oct 2016 22:20:07 +0000 Subject: [PATCH 144/302] Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is the lowest, not highest, block Github-Pull: #8884 Rebased-From: a78e5428acb862bfb47e6faff39f4889f5c73269 --- src/rpc/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index d95be05c3d4..6f97671f52a 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -894,7 +894,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) " \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n" " \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n" " \"pruned\": xx, (boolean) if the blocks are subject to pruning\n" - " \"pruneheight\": xxxxxx, (numeric) heighest block available\n" + " \"pruneheight\": xxxxxx, (numeric) lowest-height complete block stored\n" " \"softforks\": [ (array) status of softforks in progress\n" " {\n" " \"id\": \"xxxx\", (string) name of softfork\n" From b73f0653f30168db84b4521e5f315e53804feced Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 4 Oct 2016 15:17:19 -0400 Subject: [PATCH 145/302] [qa] Another attempt to fix race condition in p2p-compactblocks.py sync_with_ping() only guarantees that the node has processed messages it's received from the peer, not that block announcements from the node have made it back to the peer. Replace sync_with_ping() with an explicit check that the node's tip has been announced. Github-Pull: #8882 Rebased-From: 6976db2f4687d575e1b4bee5aaf1d93a794f23c3 --- qa/rpc-tests/p2p-compactblocks.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index ac4655a841e..cd680437696 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -28,6 +28,10 @@ def __init__(self): self.last_getblocktxn = None self.last_block = None self.last_blocktxn = None + # Store the hashes of blocks we've seen announced. + # This is for synchronizing the p2p message traffic, + # so we can eg wait until a particular block is announced. + self.set_announced_blockhashes = set() def on_sendcmpct(self, conn, message): self.last_sendcmpct = message @@ -38,14 +42,22 @@ def on_block(self, conn, message): def on_cmpctblock(self, conn, message): self.last_cmpctblock = message self.block_announced = True + self.last_cmpctblock.header_and_shortids.header.calc_sha256() + self.set_announced_blockhashes.add(self.last_cmpctblock.header_and_shortids.header.sha256) def on_headers(self, conn, message): self.last_headers = message self.block_announced = True + for x in self.last_headers.headers: + x.calc_sha256() + self.set_announced_blockhashes.add(x.sha256) def on_inv(self, conn, message): self.last_inv = message - self.block_announced = True + for x in self.last_inv.inv: + if x.type == 2: + self.block_announced = True + self.set_announced_blockhashes.add(x.hash) def on_getdata(self, conn, message): self.last_getdata = message @@ -85,6 +97,12 @@ def request_headers_and_sync(self, locator, hashstop=0): assert(self.received_block_announcement()) self.clear_block_announcement() + # Block until a block announcement for a particular block hash is + # received. + def wait_for_block_announcement(self, block_hash, timeout=30): + def received_hash(): + return (block_hash in self.set_announced_blockhashes) + return wait_until(received_hash, timeout=timeout) class CompactBlocksTest(BitcoinTestFramework): def __init__(self): @@ -237,7 +255,9 @@ def test_compactblock_construction(self): for i in range(num_transactions): self.nodes[0].sendtoaddress(address, 0.1) - self.test_node.sync_with_ping() + # Wait until we've seen the block announcement for the resulting tip + tip = int(self.nodes[0].getbestblockhash(), 16) + assert(self.test_node.wait_for_block_announcement(tip)) # Now mine a block, and look at the resulting compact block. self.test_node.clear_block_announcement() From d6c83b95cff2ff290533593719d6501ecf128f13 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 6 Oct 2016 14:21:11 -0400 Subject: [PATCH 146/302] [qa] Fix race condition in sendheaders.py Also de-duplicates code that has been moved to mininode Github-Pull: #8882 Rebased-From: b55d9411e7e1aa36ddabba3b942f2e1c736c1bd9 --- qa/rpc-tests/sendheaders.py | 68 +++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 42 deletions(-) diff --git a/qa/rpc-tests/sendheaders.py b/qa/rpc-tests/sendheaders.py index c3f3180b6bc..81b2442e6ae 100755 --- a/qa/rpc-tests/sendheaders.py +++ b/qa/rpc-tests/sendheaders.py @@ -80,20 +80,19 @@ Expect: disconnect. ''' -class BaseNode(NodeConnCB): +direct_fetch_response_time = 0.05 + +class BaseNode(SingleNodeConnCB): def __init__(self): - NodeConnCB.__init__(self) - self.connection = None + SingleNodeConnCB.__init__(self) self.last_inv = None self.last_headers = None self.last_block = None - self.ping_counter = 1 - self.last_pong = msg_pong(0) self.last_getdata = None - self.sleep_time = 0.05 self.block_announced = False self.last_getheaders = None self.disconnected = False + self.last_blockhash_announced = None def clear_last_announcement(self): with mininode_lock: @@ -101,9 +100,6 @@ def clear_last_announcement(self): self.last_inv = None self.last_headers = None - def add_connection(self, conn): - self.connection = conn - # Request data for a list of block hashes def get_data(self, block_hashes): msg = msg_getdata() @@ -122,17 +118,17 @@ def send_block_inv(self, blockhash): msg.inv = [CInv(2, blockhash)] self.connection.send_message(msg) - # Wrapper for the NodeConn's send_message function - def send_message(self, message): - self.connection.send_message(message) - def on_inv(self, conn, message): self.last_inv = message self.block_announced = True + self.last_blockhash_announced = message.inv[-1].hash def on_headers(self, conn, message): self.last_headers = message - self.block_announced = True + if len(message.headers): + self.block_announced = True + message.headers[-1].calc_sha256() + self.last_blockhash_announced = message.headers[-1].sha256 def on_block(self, conn, message): self.last_block = message.block @@ -141,9 +137,6 @@ def on_block(self, conn, message): def on_getdata(self, conn, message): self.last_getdata = message - def on_pong(self, conn, message): - self.last_pong = message - def on_getheaders(self, conn, message): self.last_getheaders = message @@ -157,7 +150,7 @@ def check_last_announcement(self, headers=None, inv=None): expect_headers = headers if headers != None else [] expect_inv = inv if inv != None else [] test_function = lambda: self.block_announced - self.sync(test_function) + assert(wait_until(test_function, timeout=60)) with mininode_lock: self.block_announced = False @@ -180,30 +173,14 @@ def check_last_announcement(self, headers=None, inv=None): return success # Syncing helpers - def sync(self, test_function, timeout=60): - while timeout > 0: - with mininode_lock: - if test_function(): - return - time.sleep(self.sleep_time) - timeout -= self.sleep_time - raise AssertionError("Sync failed to complete") - - def sync_with_ping(self, timeout=60): - self.send_message(msg_ping(nonce=self.ping_counter)) - test_function = lambda: self.last_pong.nonce == self.ping_counter - self.sync(test_function, timeout) - self.ping_counter += 1 - return - def wait_for_block(self, blockhash, timeout=60): test_function = lambda: self.last_block != None and self.last_block.sha256 == blockhash - self.sync(test_function, timeout) + assert(wait_until(test_function, timeout=timeout)) return def wait_for_getheaders(self, timeout=60): test_function = lambda: self.last_getheaders != None - self.sync(test_function, timeout) + assert(wait_until(test_function, timeout=timeout)) return def wait_for_getdata(self, hash_list, timeout=60): @@ -211,12 +188,17 @@ def wait_for_getdata(self, hash_list, timeout=60): return test_function = lambda: self.last_getdata != None and [x.hash for x in self.last_getdata.inv] == hash_list - self.sync(test_function, timeout) + assert(wait_until(test_function, timeout=timeout)) return def wait_for_disconnect(self, timeout=60): test_function = lambda: self.disconnected - self.sync(test_function, timeout) + assert(wait_until(test_function, timeout=timeout)) + return + + def wait_for_block_announcement(self, block_hash, timeout=60): + test_function = lambda: self.last_blockhash_announced == block_hash + assert(wait_until(test_function, timeout=timeout)) return def send_header_for_blocks(self, new_blocks): @@ -266,7 +248,9 @@ def mine_blocks(self, count): def mine_reorg(self, length): self.nodes[0].generate(length) # make sure all invalidated blocks are node0's sync_blocks(self.nodes, wait=0.1) - [x.clear_last_announcement() for x in self.p2p_connections] + for x in self.p2p_connections: + x.wait_for_block_announcement(int(self.nodes[0].getbestblockhash(), 16)) + x.clear_last_announcement() tip_height = self.nodes[1].getblockcount() hash_to_invalidate = self.nodes[1].getblockhash(tip_height-(length-1)) @@ -495,7 +479,7 @@ def run_test(self): test_node.send_header_for_blocks(blocks) test_node.sync_with_ping() - test_node.wait_for_getdata([x.sha256 for x in blocks], timeout=test_node.sleep_time) + test_node.wait_for_getdata([x.sha256 for x in blocks], timeout=direct_fetch_response_time) [ test_node.send_message(msg_block(x)) for x in blocks ] @@ -526,13 +510,13 @@ def run_test(self): # both blocks (same work as tip) test_node.send_header_for_blocks(blocks[1:2]) test_node.sync_with_ping() - test_node.wait_for_getdata([x.sha256 for x in blocks[0:2]], timeout=test_node.sleep_time) + test_node.wait_for_getdata([x.sha256 for x in blocks[0:2]], timeout=direct_fetch_response_time) # Announcing 16 more headers should trigger direct fetch for 14 more # blocks test_node.send_header_for_blocks(blocks[2:18]) test_node.sync_with_ping() - test_node.wait_for_getdata([x.sha256 for x in blocks[2:16]], timeout=test_node.sleep_time) + test_node.wait_for_getdata([x.sha256 for x in blocks[2:16]], timeout=direct_fetch_response_time) # Announcing 1 more header should not trigger any response test_node.last_getdata = None From 49be9f0c88b2bb8d1409c138f92e0cf753807353 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Fri, 7 Oct 2016 13:05:53 +0200 Subject: [PATCH 147/302] Fix wake from sleep issue with Boost 1.59.0 --- depends/packages/boost.mk | 2 ++ .../patches/boost/fix-win-wake-from-sleep.patch | 31 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 depends/patches/boost/fix-win-wake-from-sleep.patch diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index ef1307c241b..2bedbc6f18f 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -3,6 +3,7 @@ $(package)_version=1_59_0 $(package)_download_path=http://sourceforge.net/projects/boost/files/boost/1.59.0 $(package)_file_name=$(package)_$($(package)_version).tar.bz2 $(package)_sha256_hash=727a932322d94287b62abb1bd2d41723eec4356a7728909e38adb65ca25241ca +$(package)_patches=fix-win-wake-from-sleep.patch define $(package)_set_vars $(package)_config_opts_release=variant=release @@ -25,6 +26,7 @@ $(package)_cxxflags_linux=-fPIC endef define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/fix-win-wake-from-sleep.patch && \ echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef diff --git a/depends/patches/boost/fix-win-wake-from-sleep.patch b/depends/patches/boost/fix-win-wake-from-sleep.patch new file mode 100644 index 00000000000..8fb4d3028bf --- /dev/null +++ b/depends/patches/boost/fix-win-wake-from-sleep.patch @@ -0,0 +1,31 @@ +--- old/libs/thread/src/win32/thread.cpp ++++ new/libs/thread/src/win32/thread.cpp +@@ -645,7 +645,7 @@ + } Detailed; + } Reason; + } REASON_CONTEXT, *PREASON_CONTEXT; +- static REASON_CONTEXT default_reason_context={0/*POWER_REQUEST_CONTEXT_VERSION*/, 0x00000001/*POWER_REQUEST_CONTEXT_SIMPLE_STRING*/, (LPWSTR)L"generic"}; ++ //static REASON_CONTEXT default_reason_context={0/*POWER_REQUEST_CONTEXT_VERSION*/, 0x00000001/*POWER_REQUEST_CONTEXT_SIMPLE_STRING*/, (LPWSTR)L"generic"}; + typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG); + static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay) + { +@@ -715,7 +715,8 @@ + if(time_left.milliseconds/20>tolerable) // 5% + tolerable=time_left.milliseconds/20; + LARGE_INTEGER due_time=get_due_time(target_time); +- bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ //bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0; + if(set_time_succeeded) + { + timeout_index=handle_count; +@@ -799,7 +800,8 @@ + if(time_left.milliseconds/20>tolerable) // 5% + tolerable=time_left.milliseconds/20; + LARGE_INTEGER due_time=get_due_time(target_time); +- bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ //bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,&detail_::default_reason_context,tolerable)!=0; ++ bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0; + if(set_time_succeeded) + { + timeout_index=handle_count; From 5e0dd9e07c02422a263cc14a173d4ee21a7c1393 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 5 Oct 2016 16:47:57 +0800 Subject: [PATCH 148/302] [Doc] Update bips.md for Segregated Witness Github-Pull: #8891 Rebased-From: ef28d8a899aeb4487ef7fbfbfca9c0f2b60bdaf6 --- doc/bips.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/bips.md b/doc/bips.md index 039d5114fd9..040439fbcb1 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -26,4 +26,9 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**): * [`BIP 125`](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee signaling honoured in mempool and mining as of **v0.12.0** ([PR 6871](https://github.com/bitcoin/bitcoin/pull/6871)). * [`BIP 130`](https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki): direct headers announcement is negotiated with peer versions `>=70012` as of **v0.12.0** ([PR 6494](https://github.com/bitcoin/bitcoin/pull/6494)). * [`BIP 133`](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki): feefilter messages are respected and sent for peer versions `>=70013` as of **v0.13.0** ([PR 7542](https://github.com/bitcoin/bitcoin/pull/7542)). +* [`BIP 141`](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki): Segregated Witness (Consensus Layer) as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 143`](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki): Transaction Signature Verification for Version 0 Witness Program as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 144`](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki): Segregated Witness as of **0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 145`](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki): getblocktemplate updates for Segregated Witness as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636)). * [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)). From 7634d8eac4a5a727b77b4a7e2521bc2b95f53e5a Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 11 Oct 2016 17:41:45 +0200 Subject: [PATCH 149/302] qt: Translate all files, even if wallet disabled This passes all QT cpp files to the lupdate executable which extracts translations, no matter what conditional functionality is enabled. Rebased-From: 8aed5f6c23cbaae6bf56be04f2b8d861eacf588d Github-Pull: #8911 --- src/Makefile.qt.include | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 7730aba375c..7b01be9ab24 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -280,7 +280,7 @@ RES_ICONS = \ qt/res/icons/verify.png \ qt/res/icons/transaction_abandoned.png -BITCOIN_QT_CPP = \ +BITCOIN_QT_BASE_CPP = \ qt/bantablemodel.cpp \ qt/bitcoinaddressvalidator.cpp \ qt/bitcoinamountfield.cpp \ @@ -303,12 +303,9 @@ BITCOIN_QT_CPP = \ qt/trafficgraphwidget.cpp \ qt/utilitydialog.cpp -if TARGET_WINDOWS -BITCOIN_QT_CPP += qt/winshutdownmonitor.cpp -endif +BITCOIN_QT_WINDOWS_CPP = qt/winshutdownmonitor.cpp -if ENABLE_WALLET -BITCOIN_QT_CPP += \ +BITCOIN_QT_WALLET_CPP = \ qt/addressbookpage.cpp \ qt/addresstablemodel.cpp \ qt/askpassphrasedialog.cpp \ @@ -335,6 +332,13 @@ BITCOIN_QT_CPP += \ qt/walletmodel.cpp \ qt/walletmodeltransaction.cpp \ qt/walletview.cpp + +BITCOIN_QT_CPP = $(BITCOIN_QT_BASE_CPP) +if TARGET_WINDOWS +BITCOIN_QT_CPP += $(BITCOIN_QT_WINDOWS_CPP) +endif +if ENABLE_WALLET +BITCOIN_QT_CPP += $(BITCOIN_QT_WALLET_CPP) endif RES_IMAGES = @@ -403,7 +407,7 @@ $(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wal @test -n $(XGETTEXT) || echo "xgettext is required for updating translations" $(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" COPYRIGHT_HOLDERS_SUBSTITUTION="$(COPYRIGHT_HOLDERS_SUBSTITUTION)" $(PYTHON) ../share/qt/extract_strings_qt.py $^ -translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) +translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM) @test -n $(LUPDATE) || echo "lupdate is required for updating translations" $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts $(srcdir)/qt/locale/bitcoin_en.ts From 633c4a1f3690152bdda4b0ac7bcfde22c237183e Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 13 Oct 2016 10:26:44 +0000 Subject: [PATCH 150/302] qt: Periodic translations update Added languages: - `ne` - Niger --- src/Makefile.qt.include | 3 +- src/qt/bitcoin_locale.qrc | 3 +- src/qt/bitcoinstrings.cpp | 5 +- src/qt/locale/bitcoin_af.ts | 464 ++++++++- src/qt/locale/bitcoin_ar.ts | 2 +- src/qt/locale/bitcoin_cs.ts | 4 - src/qt/locale/bitcoin_da.ts | 10 +- src/qt/locale/bitcoin_de.ts | 58 +- src/qt/locale/bitcoin_en.ts | 2048 ++++++++++++++++++++++++++++++++----- src/qt/locale/bitcoin_en_GB.ts | 12 +- src/qt/locale/bitcoin_es.ts | 8 +- src/qt/locale/bitcoin_fa.ts | 82 +- src/qt/locale/bitcoin_fi.ts | 202 +++- src/qt/locale/bitcoin_fr.ts | 194 ++-- src/qt/locale/bitcoin_it.ts | 218 +++- src/qt/locale/bitcoin_it_IT.ts | 4 + src/qt/locale/bitcoin_ja.ts | 8 +- src/qt/locale/bitcoin_ko_KR.ts | 218 +++- src/qt/locale/bitcoin_nb.ts | 36 + src/qt/locale/bitcoin_ne.ts | 548 ++++++++++ src/qt/locale/bitcoin_nl.ts | 44 +- src/qt/locale/bitcoin_pl.ts | 4 + src/qt/locale/bitcoin_pt_BR.ts | 48 +- src/qt/locale/bitcoin_pt_PT.ts | 4 - src/qt/locale/bitcoin_ro.ts | 598 ++++++++++- src/qt/locale/bitcoin_ru.ts | 28 +- src/qt/locale/bitcoin_ru_RU.ts | 14 +- src/qt/locale/bitcoin_sk.ts | 64 ++ src/qt/locale/bitcoin_sl_SI.ts | 42 +- src/qt/locale/bitcoin_sr@latin.ts | 182 +++- src/qt/locale/bitcoin_sv.ts | 12 +- src/qt/locale/bitcoin_tr.ts | 8 +- src/qt/locale/bitcoin_zh_CN.ts | 43 +- src/qt/locale/bitcoin_zh_TW.ts | 8 +- 34 files changed, 4785 insertions(+), 441 deletions(-) create mode 100644 src/qt/locale/bitcoin_ne.ts diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 7b01be9ab24..bbef6417688 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -7,8 +7,8 @@ QT_TS = \ qt/locale/bitcoin_af_ZA.ts \ qt/locale/bitcoin_ar.ts \ qt/locale/bitcoin_be_BY.ts \ - qt/locale/bitcoin_bg.ts \ qt/locale/bitcoin_bg_BG.ts \ + qt/locale/bitcoin_bg.ts \ qt/locale/bitcoin_ca_ES.ts \ qt/locale/bitcoin_ca.ts \ qt/locale/bitcoin_ca@valencia.ts \ @@ -60,6 +60,7 @@ QT_TS = \ qt/locale/bitcoin_mn.ts \ qt/locale/bitcoin_ms_MY.ts \ qt/locale/bitcoin_nb.ts \ + qt/locale/bitcoin_ne.ts \ qt/locale/bitcoin_nl.ts \ qt/locale/bitcoin_pam.ts \ qt/locale/bitcoin_pl.ts \ diff --git a/src/qt/bitcoin_locale.qrc b/src/qt/bitcoin_locale.qrc index 8dd07c3d417..aae07ffb7e8 100644 --- a/src/qt/bitcoin_locale.qrc +++ b/src/qt/bitcoin_locale.qrc @@ -4,8 +4,8 @@ locale/bitcoin_af_ZA.qm locale/bitcoin_ar.qm locale/bitcoin_be_BY.qm - locale/bitcoin_bg.qm locale/bitcoin_bg_BG.qm + locale/bitcoin_bg.qm locale/bitcoin_ca_ES.qm locale/bitcoin_ca.qm locale/bitcoin_ca@valencia.qm @@ -57,6 +57,7 @@ locale/bitcoin_mn.qm locale/bitcoin_ms_MY.qm locale/bitcoin_nb.qm + locale/bitcoin_ne.qm locale/bitcoin_nl.qm locale/bitcoin_pam.qm locale/bitcoin_pl.qm diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index fefaaf8cd3a..b64ae5c70d7 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -84,8 +84,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "Fees (in %s/kB) smaller than this are considered zero fee for transaction " "creation (default: %s)"), QT_TRANSLATE_NOOP("bitcoin-core", "" -"Force relay of transactions from whitelisted peers even they violate local " -"relay policy (default: %d)"), +"Force relay of transactions from whitelisted peers even if they violate " +"local relay policy (default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "" "How thorough the block verification of -checkblocks is (0-4, default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "" @@ -325,6 +325,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: %s)"), QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)"), QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"), QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: %u)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Starting network threads..."), QT_TRANSLATE_NOOP("bitcoin-core", "The source code is available from %s."), QT_TRANSLATE_NOOP("bitcoin-core", "The transaction amount is too small to pay the fee"), QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."), diff --git a/src/qt/locale/bitcoin_af.ts b/src/qt/locale/bitcoin_af.ts index 97ada8dd5c6..8305b706032 100644 --- a/src/qt/locale/bitcoin_af.ts +++ b/src/qt/locale/bitcoin_af.ts @@ -22,6 +22,10 @@ &Dupliseer + C&lose + S&luit + + Delete the currently selected address from the list Verwyder die adres wat u gekies het van die lys @@ -87,14 +91,42 @@ &Transaksies + Browse transaction history + Blaai deur transaksiegeskiedenis + + + E&xit + &Sluit + + Quit application Stop en verlaat die applikasie + &About %1 + &Oor %1 + + + Show information about %1 + Wys inligting oor %1 + + + About &Qt + Oor &Qt + + + Show information about Qt + Wys inligting oor Qt + + &Options... &Opsies + Modify configuration options for %1 + Verander konfigurasie-opsies vir %1 + + &Encrypt Wallet... &Kodifiseer Beursie @@ -171,6 +203,10 @@ &Help + Tabs toolbar + Orebalk + + Request payments (generates QR codes and bitcoin: URIs) Versoek betalings (genereer QR-kodes en bitcoin: URI's) @@ -186,39 +222,383 @@ Open a bitcoin: URI or payment request Skep 'n bitcoin: URI of betalingsversoek + + Indexing blocks on disk... + Blokke op skyf word geïndekseer... + + + Processing blocks on disk... + Blokke op skyf word geprosesseer... + + + No block source available... + Geen blokbron beskikbaar... + + + Processed %n block(s) of transaction history. + %n blok van transaksiegeskiedenis geprosesseer.%n blokke van transaksiegeskiedenis geprosesseer. + + + %n hour(s) + %n uur%n ure + + + %n day(s) + %n dag%n dae + + + %n week(s) + %n week%n weke + + + %1 and %2 + %1 en %2 + + + %n year(s) + %n jaar%n jare + + + %1 behind + %1 agter + + + Last received block was generated %1 ago. + Laaste ontvange blok is %1 gelede gegenereer. + + + Transactions after this will not yet be visible. + Transaksies hierna sal nog nie sigbaar wees nie. + + + Error + Fout + + + Warning + Waarskuwing + + + Information + Inligting + + + Up to date + Op datum + + + Catching up... + Word op datum gebring... + + + Date: %1 + + Datum: %1 + + + + Address: %1 + + Adres: %1 + + + + Sent transaction + Gestuurde transaksie + + + Incoming transaction + Inkomende transaksie +
CoinControlDialog - + + Bytes: + Grepe: + + + Priority: + Prioriteit: + + + Fee: + Fooi: + + + Dust: + Stof: + + + After Fee: + Na Fooi: + + + (un)select all + (de)selekteer alle + + + List mode + Lysmodus + + + Date + Datum + + + Confirmations + Bevestigings + + + Confirmed + Bevestig + + + Priority + Prioriteit + +
EditAddressDialog + + Edit Address + Wysig Adres + FreespaceChecker + + name + naam + HelpMessageDialog - + + version + weergawe + + + About %1 + Ongeveer %1 + + + UI Options: + Gebruikerkoppelvlakopsies: + + + Start minimized + Begin geminimeer + + + Reset all settings changed in the GUI + Alle instellings wat in die grafiese gebruikerkoppelvlak gewysig is, terugstel + + Intro + + Welcome + Welkom + + + Welcome to %1. + Welkom by %1. + + + Error + Fout + OpenURIDialog OptionsDialog + + Options + Opsies + + + MB + MG + + + Accept connections from outside + Verbindings van buite toelaat + + + Allow incoming connections + Inkomende verbindings toelaat + + + Reset all client options to default. + Alle kliëntopsies na verstek terugstel. + + + Expert + Kenner + + + IPv6 + IPv6 + + + Tor + Tor + + + default + verstek + + + none + geen + + + Confirm options reset + Bevestig terugstel van opsies + + + Client restart required to activate changes. + Kliënt moet herbegin word om veranderinge te aktiveer. + OverviewPage + + Available: + Beskikbaar: + + + Pending: + Hangend: + + + Immature: + Onvolwasse: + + + Balances + Balanse + + + Total: + Totaal: + + + Your current total balance + U huidige totale balans + + + Spendable: + Besteebaar: + + + Recent transactions + Onlangse transaksies + PeerTableModel + + User Agent + Gebruikeragent + QObject - + + %1 d + %1 d + + + %1 h + %1 u + + + %1 m + %1 m + + + %1 s + %1 s + + + None + Geen + + + N/A + n.v.t. + + + %1 ms + %1 ms + + RPCConsole + + N/A + n.v.t. + + + Client version + Kliëntweergawe + + + General + Algemeen + + + Network + Netwerk + + + Name + Naam + + + Number of connections + Aantal verbindings + + + Block chain + Blokketting + + + Current number of blocks + Huidige aantal blokke + + + Received + Ontvang + + + Sent + Gestuur + + + Banned peers + Verbanne porture + + + Whitelisted + Gewitlys + + + Direction + Rigting + + + Version + Weergawe + + + User Agent + Gebruikeragent + ReceiveCoinsDialog @@ -228,6 +608,50 @@ SendCoinsDialog + + Bytes: + Grepe: + + + Priority: + Prioriteit: + + + Fee: + Fooi: + + + After Fee: + Na Fooi: + + + Transaction Fee: + Transaksiefooi: + + + Choose... + Kies... + + + per kilobyte + per kilogreep + + + Hide + Versteek + + + total at least + totaal ten minste + + + Dust: + Stof: + + + Balance: + Balans: + SendCoinsEntry @@ -257,8 +681,40 @@ Bitcoin Kern + Information + Inligting + + + Warning + Waarskuwing + + Do not keep transactions in the mempool longer than <n> hours (default: %u) Moenie transaksies vir langer as <n> ure in die geheuepoel hou nie (verstek: %u) - + + Insufficient funds + Onvoldoende fondse + + + Loading block index... + Blokindeks word gelaai... + + + Loading wallet... + Beursie word gelaai... + + + Rescanning... + Word herskandeer... + + + Done loading + Klaar met laai + + + Error + Fout + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts index af62207df2b..2e1603bb832 100644 --- a/src/qt/locale/bitcoin_ar.ts +++ b/src/qt/locale/bitcoin_ar.ts @@ -23,7 +23,7 @@ C&lose - &اغلاق + ا&غلاق Delete the currently selected address from the list diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index 4f198c9ae9d..0b28956ff02 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -1811,10 +1811,6 @@ Místo pro autentizační cookie (výchozí: adresář pro data) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Minimální počet bajtů na každý sigop v transakcích, které přeposíláme a těžíme (výchozí: %u) - - Not enough file descriptors available. Je nedostatek deskriptorů souborů. diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index 5fc6733b507..8675f8aa6a6 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -605,7 +605,7 @@ (of %n GB needed) - (ud af %n GB behøvet)(ud af %n GB behøvet) + (ud af %n GB nødvendig)(ud af %n GB nødvendig) @@ -1831,6 +1831,10 @@ Distribueret under MIT-softwarelicensen; se den vedlagte fil COPYING eller <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Tilsvarende bytes pr. sigop i transaktioner, som videresendes og mines (standard: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Fejl under indlæsning af %s: Du kan ikke aktivere HD på en allerede eksisterende ikke-HD-tegnebog @@ -2055,10 +2059,6 @@ Placering for autentificerings-cookie (standard: datamappe) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Minimum bytes pr. sigop i transaktioner, vi videresender og miner (standard: %u) - - Not enough file descriptors available. For få tilgængelige fildeskriptorer. diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index dc632a2466b..498baf97ec3 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -112,7 +112,7 @@ &About %1 - &Über %1 + Über %1 Show information about %1 @@ -1759,10 +1759,18 @@ Kürzungsmodus wurde kleiner als das Minimum in Höhe von %d MiB konfiguriert. Bitte verwenden Sie einen größeren Wert. + Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node) + Prune (Kürzung): Die letzte Syncronisation der Wallet liegt vor gekürzten (gelöschten) Blöcken. Es ist ein -reindex (download der gesamten Blockkette) notwendig. + + Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files) Speicherplatzanforderung durch kürzen (löschen) alter Blöcke reduzieren. Dieser Modus ist nicht mit -txindex und -rescan kompatibel. Warnung: Die Umkehr dieser Einstellung erfordert das erneute Herunterladen der gesamten Blockkette. (Standard: 0 = deaktiviert das Kürzen von Blöcken, >%u = Zielgröße in MiB, die für Blockdateien verwendet werden darf) + Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. + Rescans sind im pruned mode nicht möglich. Ein -reindex ist notwendig, welcher die gesmate Blockkette erneut herunterlädt. + + Error: A fatal internal error occurred, see debug.log for details Fehler: Ein schwerer interner Fehler ist aufgetreten, siehe debug.log für Details. @@ -1799,6 +1807,10 @@ Eine Transaktionsgebühr (in %s/kB) wird genutzt, wenn für die Gebührenschützung zu wenig Daten vorliegen (Standardwert: %s) + Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d) + Geben Sie immer die Transaktionen, die Sie von freigegebenen Peers erhalten haben, weiter (Voreinstellung: %d) + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 An die angegebene Adresse binden und immer abhören. Für IPv6 "[Host]:Port"-Notation verwenden @@ -1815,6 +1827,10 @@ Veröffentlicht unter der MIT-Softwarelizenz, siehe beiligende Datei COPYING oder <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u) + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die Transaktions-ID ersetzt) @@ -1823,6 +1839,14 @@ Leite Transaktionen von Peers auf der Positivliste auf jeden Fall weiter, auch wenn sie die lokale Weiterleitungsregeln verletzen (Standardeinstellung: %d) + Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) + Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) + + + Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) + Maximale Gesamtgebühr (in %s) in einer Börsentransaktion; wird dies zu niedrig gesetzten können große Transaktionen abgebrochen werden (Standard: %s) + + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da %s ansonsten nicht ordnungsgemäß funktionieren wird. @@ -1843,6 +1867,10 @@ Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen! + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um zum ungekürzten Modus zurückzukehren. Dies erfordert, dass die gesamte Blockkette erneut heruntergeladen wird. + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird und -proxy nicht gesetzt ist) @@ -1939,6 +1967,10 @@ Aktiviere das Veröffentlichen der Roh-Transaktion in <address> + Enable transaction replacement in the memory pool (default: %u) + Maximal <n> nicht-verbindbare Transaktionen im Speicher halten (Standard: %u) + + Error initializing block database Fehler beim Initialisieren der Blockdatenbank @@ -2031,10 +2063,26 @@ Kürzungsmodus ist nicht mit -txindex kompatibel. + Rebuild chain state and block index from the blk*.dat files on disk + Blockkettenindex aus aktuellen Dateien blk000??.dat beim Starten wiederaufbauen + + + Rebuild chain state from the currently indexed blocks + Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen + + + Rewinding blocks... + Verifiziere Blöcke... + + Set database cache size in megabytes (%d to %d, default: %d) Größe des Datenbankcaches in Megabyte festlegen (%d bis %d, Standard: %d) + Set maximum BIP141 block weight (default: %d) + Maximales BIP141 Blockgewicht festlegen (Standard: %d) + + Set maximum block size in bytes (default: %d) Maximale Blockgröße in Byte festlegen (Standard: %d) @@ -2083,6 +2131,10 @@ Wallet %s liegt außerhalb des Datenverzeichnisses %s + Wallet debugging/testing options: + Wallet Debugging-/Testoptionen: + + Wallet options: Wallet-Optionen: @@ -2151,6 +2203,10 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit <https://www.openssl.org/> entwickelt wird, sowie von Eric Young geschriebene kryptographische Software und von Thomas Bernard geschriebene UPnP-Software. + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway Erlaubte Gegenstellen werden nicht für DoS-Attacken gesperrt und ihre Transkationen werden immer weitergeleitet, auch wenn sie sich bereits im Speicherpool befinden, was z.B. für Gateways sinnvoll ist. diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 14126f2d61f..7631a666c8e 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -53,6 +53,94 @@ &Delete &Delete + + + Choose the address to send coins to + + + + + Choose the address to receive coins with + + + + + C&hoose + + + + + Sending addresses + + + + + Receiving addresses + + + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + + + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + + + + + &Copy Address + + + + + Copy &Label + + + + + &Edit + + + + + Export Address List + + + + + Comma separated file (*.csv) + + + + + Exporting Failed + + + + + There was an error trying to save the address list to %1. Please try again. + + + + + AddressTableModel + + + Label + + + + + Address + + + + + (no label) + + AskPassphraseDialog @@ -76,6 +164,124 @@ Repeat new passphrase Repeat new passphrase + + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + + + + + Encrypt wallet + + + + + This operation needs your wallet passphrase to unlock the wallet. + + + + + Unlock wallet + + + + + This operation needs your wallet passphrase to decrypt the wallet. + + + + + Decrypt wallet + + + + + Change passphrase + + + + + Enter the old passphrase and new passphrase to the wallet. + + + + + Confirm wallet encryption + + + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + + + + + Are you sure you wish to encrypt your wallet? + + + + + + Wallet encrypted + + + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + + + + + 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. + + + + + + + + Wallet encryption failed + + + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + + + + + + The supplied passphrases do not match. + + + + + Wallet unlock failed + + + + + + + The passphrase entered for the wallet decryption was incorrect. + + + + + Wallet decryption failed + + + + + Wallet passphrase was successfully changed. + + + + + + Warning: The Caps Lock key is on! + + BanTableModel @@ -442,7 +648,7 @@ Catching up... - + Date: %1 @@ -589,147 +795,370 @@ Priority - - - EditAddressDialog - - Edit Address - Edit Address + + Copy address + - - &Label - &Label + + Copy label + - - The label associated with this address list entry + + + Copy amount - - The address associated with this address list entry. This can only be modified for sending addresses. + + Copy transaction ID - - &Address - &Address + + Lock unspent + - - - FreespaceChecker - - A new data directory will be created. - A new data directory will be created. + + Unlock unspent + - name - name + Copy quantity + - Directory already exists. Add %1 if you intend to create a new directory here. - Directory already exists. Add %1 if you intend to create a new directory here. + Copy fee + - - Path already exists, and is not a directory. - Path already exists, and is not a directory. + + Copy after fee + - - Cannot create data directory here. - Cannot create data directory here. + + Copy bytes + - - - HelpMessageDialog - - version - version + + Copy priority + - - - (%1-bit) + + Copy dust - - About %1 + + Copy change - - Command-line options + + highest - Usage: - Usage: + higher + - command-line options - command-line options - - - - UI Options: + high - - Choose data directory on startup (default: %u) + + medium-high - Set language, for example "de_DE" (default: system locale) + medium - Start minimized + low-medium - Set SSL root certificates for payment request (default: -system-) + low - Show splash screen on startup (default: %u) + lower - Reset all settings changed in the GUI + lowest - - - Intro - - Welcome - Welcome + + (%1 locked) + - - Welcome to %1. + + none - - As this is the first time the program is launched, you can choose where %1 will store its data. + + yes + + + + + no + + + + + This label turns red if the transaction size is greater than 1000 bytes. + + + + + + This means a fee of at least %1 per kB is required. + + + + + Can vary +/- 1 byte per input. + + + + + Transactions with higher priority are more likely to get included into a block. + + + + + This label turns red if the priority is smaller than "medium". + + + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + + + + + Can vary +/- %1 satoshi(s) per input. + + + + + + (no label) + + + + + change from %1 (%2) + + + + + (change) + + + + + EditAddressDialog + + + Edit Address + Edit Address + + + + &Label + &Label + + + + The label associated with this address list entry + + + + + The address associated with this address list entry. This can only be modified for sending addresses. + + + + + &Address + &Address + + + + New receiving address + + + + + New sending address + + + + + Edit receiving address + + + + + Edit sending address + + + + + The entered address "%1" is not a valid Bitcoin address. + + + + + The entered address "%1" is already in the address book. + + + + + Could not unlock wallet. + + + + + New key generation failed. + + + + + FreespaceChecker + + + A new data directory will be created. + A new data directory will be created. + + + + name + name + + + + Directory already exists. Add %1 if you intend to create a new directory here. + Directory already exists. Add %1 if you intend to create a new directory here. + + + + Path already exists, and is not a directory. + Path already exists, and is not a directory. + + + + Cannot create data directory here. + Cannot create data directory here. + + + + HelpMessageDialog + + + version + version + + + + + (%1-bit) + + + + + About %1 + + + + + Command-line options + + + + + Usage: + Usage: + + + + command-line options + command-line options + + + + UI Options: + + + + + Choose data directory on startup (default: %u) + + + + + Set language, for example "de_DE" (default: system locale) + + + + + Start minimized + + + + + Set SSL root certificates for payment request (default: -system-) + + + + + Show splash screen on startup (default: %u) + + + + + Reset all settings changed in the GUI + + + + + Intro + + + Welcome + Welcome + + + + Welcome to %1. + + + + + As this is the first time the program is launched, you can choose where %1 will store its data. @@ -753,7 +1182,7 @@ - + Error Error @@ -796,6 +1225,11 @@ Select payment request file + + + Select payment request file to open + + OptionsDialog @@ -1193,52 +1627,178 @@ - PeerTableModel + PaymentServer - - User Agent + + + + + + + Payment request error - - Node/Service + + Cannot start bitcoin: click-to-pay handler - - Ping Time + + + + URI handling - - - QObject - - Amount - Amount + + Payment request fetch URL is invalid: %1 + - - Enter a Bitcoin address (e.g. %1) + + Invalid payment address %1 - - %1 d + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. - - %1 h + + Payment request file handling - - %1 m + + Payment request file cannot be read! This can be caused by an invalid payment request file. - + + + + + + + Payment request rejected + + + + + Payment request network doesn't match client network. + + + + + Payment request expired. + + + + + Payment request is not initialized. + + + + + Unverified payment requests to custom payment scripts are unsupported. + + + + + + Invalid payment request. + + + + + Requested payment amount of %1 is too small (considered dust). + + + + + Refund from %1 + + + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + + + + + Error communicating with %1: %2 + + + + + Payment request cannot be parsed! + + + + + Bad response from server %1 + + + + + Network request error + + + + + Payment acknowledged + + + + + PeerTableModel + + + User Agent + + + + + Node/Service + + + + + Ping Time + + + + + QObject + + + Amount + Amount + + + + Enter a Bitcoin address (e.g. %1) + + + + + %1 d + + + + + %1 h + + + + + %1 m + + + + %1 s @@ -1260,6 +1820,29 @@ + QRImageWidget + + + &Save Image... + + + + + &Copy Image + + + + + Save QR Code + + + + + PNG Image (*.png) + + + + RPCConsole @@ -1749,6 +2332,21 @@ Remove + + + Copy label + + + + + Copy message + + + + + Copy amount + + ReceiveRequestDialog @@ -1772,11 +2370,95 @@ &Save Image... + + + Request payment to %1 + + + + + Payment information + + + + + URI + + + + + Address + + + + + Amount + Amount + + + + Label + + + + + Message + + + + + Resulting URI too long, try to reduce the text for label / message. + + + + + Error encoding URI into QR Code. + + + + + RecentRequestsTableModel + + + Date + Date + + + + Label + + + + + Message + + + + + (no label) + + + + + (no message) + + + + + (no amount requested) + + + + + Requested + + SendCoinsDialog + Send Coins Send Coins @@ -1962,264 +2644,1135 @@ S&end S&end - - - SendCoinsEntry - - - - A&mount: - A&mount: + + Copy quantity + + + + + Copy amount + + + + + Copy fee + + + + + Copy after fee + + + + + Copy bytes + + + + + Copy priority + + + + + Copy dust + + + + + Copy change + + + + + + + + %1 to %2 + + + + + Are you sure you want to send? + + + + + added as transaction fee + + + + + Total Amount %1 + + + + + or + + + + + Confirm send coins + + + + + The recipient address is not valid. Please recheck. + + + + + The amount to pay must be larger than 0. + + + + + The amount exceeds your balance. + + + + + The total exceeds your balance when the %1 transaction fee is included. + + + + + Duplicate address found: addresses should only be used once each. + + + + + Transaction creation failed! + + + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + + + + + A fee higher than %1 is considered an absurdly high fee. + + + + + Payment request expired. + + + + + Pay only the required fee of %1 + + + + + Estimated to begin confirmation within %n block(s). + + + + + + + + Warning: Invalid Bitcoin address + + + + + Warning: Unknown change address + + + + + (no label) + + + + + SendCoinsEntry + + + + + A&mount: + A&mount: + + + + Pay &To: + Pay &To: + + + + &Label: + &Label: + + + + Choose previously used address + + + + + This is a normal payment. + + + + + The Bitcoin address to send the payment to + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Paste address from clipboard + + + + Alt+P + Alt+P + + + + + + Remove this entry + + + + + The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. + + + + + S&ubtract fee from amount + + + + + Message: + + + + + This is an unauthenticated payment request. + + + + + This is an authenticated payment request. + + + + + Enter a label for this address to add it to the list of used addresses + + + + + A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. + + + + + + Pay To: + + + + + + Memo: + + + + + Enter a label for this address to add it to your address book + + + + + SendConfirmationDialog + + + + Yes + + + + + ShutdownWindow + + + %1 is shutting down... + + + + + Do not shut down the computer until this window disappears. + + + + + SignVerifyMessageDialog + + + Signatures - Sign / Verify a Message + Signatures - Sign / Verify a Message + + + + &Sign Message + &Sign Message + + + + You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. + + + + + The Bitcoin address to sign the message with + + + + + + Choose previously used address + + + + + + Alt+A + Alt+A + + + + Paste address from clipboard + Paste address from clipboard + + + + Alt+P + Alt+P + + + + Enter the message you want to sign here + Enter the message you want to sign here + + + + Signature + Signature + + + + Copy the current signature to the system clipboard + Copy the current signature to the system clipboard + + + + Sign the message to prove you own this Bitcoin address + Sign the message to prove you own this Bitcoin address + + + + Sign &Message + Sign &Message + + + + Reset all sign message fields + Reset all sign message fields + + + + + Clear &All + Clear &All + + + + &Verify Message + &Verify Message + + + + Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction! + + + + + The Bitcoin address the message was signed with + + + + + Verify the message to ensure it was signed with the specified Bitcoin address + Verify the message to ensure it was signed with the specified Bitcoin address + + + + Verify &Message + Verify &Message + + + + Reset all verify message fields + Reset all verify message fields + + + + Click "Sign Message" to generate signature + + + + + + The entered address is invalid. + + + + + + + + Please check the address and try again. + + + + + + The entered address does not refer to a key. + + + + + Wallet unlock was cancelled. + + + + + Private key for the entered address is not available. + + + + + Message signing failed. + + + + + Message signed. + + + + + The signature could not be decoded. + + + + + + Please check the signature and try again. + + + + + The signature did not match the message digest. + + + + + Message verification failed. + + + + + Message verified. + + + + + SplashScreen + + + [testnet] + [testnet] + + + + TrafficGraphWidget + + + KB/s + + + + + TransactionDesc + + + Open for %n more block(s) + + + + + + + + Open until %1 + + + + + conflicted with a transaction with %1 confirmations + + + + + %1/offline + + + + + 0/unconfirmed, %1 + + + + + in memory pool + + + + + not in memory pool + + + + + abandoned + + + + + %1/unconfirmed + + + + + %1 confirmations + + + + + Status + + + + + , has not been successfully broadcast yet + + + + + , broadcast through %n node(s) + + + + + + + + Date + Date + + + + Source + + + + + Generated + + + + + + + From + + + + + unknown + + + + + + + To + + + + + own address + + + + + + watch-only + + + + + label + + + + + + + + + Credit + + + + + matures in %n more block(s) + + + + + + + + not accepted + + + + + + + Debit + + + + + Total debit + + + + + Total credit + + + + + Transaction fee + + + + + Net amount + + + + + + Message + + + + + Comment + + + + + Transaction ID + + + + + Output index + + + + + Merchant + + + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + + + + + Debug information + + + + + Transaction + + + + + Inputs + + + + + Amount + Amount + + + + + true + + + + + + false + + + + + TransactionDescDialog + + + This pane shows a detailed description of the transaction + This pane shows a detailed description of the transaction + + + + Details for %1 + + + + + TransactionTableModel + + + Date + Date + + + + Type + + + + + Label + + + + + Open for %n more block(s) + + + + + + + + Open until %1 + + + + + Offline + + + + + Unconfirmed + + + + + Abandoned + + + + + Confirming (%1 of %2 recommended confirmations) + + + + + Confirmed (%1 confirmations) + + + + + Conflicted + + + + + Immature (%1 confirmations, will be available after %2) + + + + + This block was not received by any other nodes and will probably not be accepted! + + + + + Generated but not accepted + + + + + Received with + + + + + Received from + + + + + Sent to + + + + + Payment to yourself + + + + + Mined + + + + + watch-only + + + + + (n/a) + + + + + (no label) + + + + + Transaction status. Hover over this field to show number of confirmations. + + + + + Date and time that the transaction was received. + + + + + Type of transaction. + - - Pay &To: - Pay &To: + + Whether or not a watch-only address is involved in this transaction. + - - &Label: - &Label: + + User-defined intent/purpose of the transaction. + - - Choose previously used address + + Amount removed from or added to balance. + + + TransactionView - - This is a normal payment. + + + All - - The Bitcoin address to send the payment to + + Today - - Alt+A - Alt+A + + This week + - - Paste address from clipboard - Paste address from clipboard + + This month + - - Alt+P - Alt+P + + Last month + - - - - Remove this entry + + This year - - The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. + + Range... - - S&ubtract fee from amount + + Received with - - Message: + + Sent to - - This is an unauthenticated payment request. + + To yourself - - This is an authenticated payment request. + + Mined - - Enter a label for this address to add it to the list of used addresses + + Other - - A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. + + Enter address or label to search - - - Pay To: + + Min amount - - - Memo: + + Abandon transaction - - - ShutdownWindow - - %1 is shutting down... + + Copy address - Do not shut down the computer until this window disappears. + Copy label - - - SignVerifyMessageDialog - - Signatures - Sign / Verify a Message - Signatures - Sign / Verify a Message + + Copy amount + - - &Sign Message - &Sign Message + + Copy transaction ID + - - You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. + + Copy raw transaction - - The Bitcoin address to sign the message with + + Copy full transaction details - - - Choose previously used address + + Edit label - - - Alt+A - Alt+A + + Show transaction details + - - Paste address from clipboard - Paste address from clipboard + + Export Transaction History + - - Alt+P - Alt+P + + Comma separated file (*.csv) + - - Enter the message you want to sign here - Enter the message you want to sign here + + Confirmed + Confirmed - - Signature - Signature + + Watch-only + - - Copy the current signature to the system clipboard - Copy the current signature to the system clipboard + + Date + Date - - Sign the message to prove you own this Bitcoin address - Sign the message to prove you own this Bitcoin address + + Type + - - Sign &Message - Sign &Message + + Label + - - Reset all sign message fields - Reset all sign message fields + + Address + - - - Clear &All - Clear &All + + ID + - - &Verify Message - &Verify Message + + Exporting Failed + - - Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction! + + There was an error trying to save the transaction history to %1. - - The Bitcoin address the message was signed with + + Exporting Successful - - Verify the message to ensure it was signed with the specified Bitcoin address - Verify the message to ensure it was signed with the specified Bitcoin address + + The transaction history was successfully saved to %1. + - - Verify &Message - Verify &Message + + Range: + - - Reset all verify message fields - Reset all verify message fields + + to + - SplashScreen + UnitDisplayStatusBarControl - - [testnet] - [testnet] + + Unit to show amounts in. Click to select another unit. + - TrafficGraphWidget + WalletFrame - - KB/s + + No wallet has been loaded. - TransactionDescDialog + WalletModel - - This pane shows a detailed description of the transaction - This pane shows a detailed description of the transaction + + Send Coins + Send Coins - UnitDisplayStatusBarControl + WalletView - - Unit to show amounts in. Click to select another unit. + + &Export + &Export + + + + Export the data in the current tab to a file + Export the data in the current tab to a file + + + + Backup Wallet + + + + + Wallet Data (*.dat) + + + + + Backup Failed + + + + + There was an error trying to save the wallet data to %1. + + + + + Backup Successful + + + + + The wallet data was successfully saved to %1. @@ -2296,12 +3849,12 @@ Run in the background as a daemon and accept commands - + Unable to start HTTP server. See debug log for details. - + Accept connections from outside (default: 1 if no -proxy or -connect) Accept connections from outside (default: 1 if no -proxy or -connect) @@ -2371,12 +3924,7 @@ Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - - - - + Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) @@ -2702,6 +4250,11 @@ + Starting network threads... + + + + The source code is available from %s. @@ -2766,7 +4319,7 @@ - + Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times @@ -2806,7 +4359,12 @@ - + + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + + + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) @@ -2961,7 +4519,7 @@ Signing transaction failed - + The transaction amount is too small to pay the fee @@ -3041,7 +4599,7 @@ - + Password for JSON-RPC connections Password for JSON-RPC connections @@ -3251,7 +4809,7 @@ - + Threshold for disconnecting misbehaving peers (default: %u) @@ -3261,7 +4819,7 @@ Unknown network specified in -onlynet: '%s' - + Insufficient funds Insufficient funds diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts index 596fd1db2ed..16a85ee346a 100644 --- a/src/qt/locale/bitcoin_en_GB.ts +++ b/src/qt/locale/bitcoin_en_GB.ts @@ -1831,6 +1831,10 @@ Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Error loading %s: You can't enable HD on a already existing non-HD wallet @@ -2055,10 +2059,6 @@ Location of the auth cookie (default: data dir) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - - Not enough file descriptors available. Not enough file descriptors available. @@ -2099,6 +2099,10 @@ Set database cache size in megabytes (%d to %d, default: %d) + Set maximum BIP141 block weight (default: %d) + Set maximum BIP141 block weight (default: %d) + + Set maximum block size in bytes (default: %d) Set maximum block size in bytes (default: %d) diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index 5e118730102..7b942585151 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -1830,6 +1830,10 @@ Distribuido bajo la licencia de software MIT, vea la copia del archivo adjunto o <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Bytes equivalentes por sigop en transacciones para retrasmisión y minado (predeterminado: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Error cargando %s: No puede habilitar HD en un monedero existente que no es HD @@ -2054,10 +2058,6 @@ Ubicación de la cookie de autenticación (default: data dir) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Mínimo de bytes por sigop en transacciones que retransmitimos y minamos (predeterminado: %u) - - Not enough file descriptors available. No hay suficientes descriptores de archivo disponibles. diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts index 98543ded461..a58743270f0 100644 --- a/src/qt/locale/bitcoin_fa.ts +++ b/src/qt/locale/bitcoin_fa.ts @@ -243,6 +243,10 @@ نمایش لیست آدرس های دریافت و لیبل ها + Open a bitcoin: URI or payment request + بازکردن یک بیت کوین: آدرس یا درخواست پرداخت + + &Command-line options گزینه‌های خط‌فرمان @@ -488,6 +492,14 @@ command-line options گزینه‌های خط فرمان + + UI Options: + گزینه‌های رابط کاربری: + + + Show splash screen on startup (default: %u) + نمایش پنجرهٔ خوشامدگویی در ابتدای اجرای برنامه (پیش‌فرض: %u) + Intro @@ -522,7 +534,11 @@ Open URI بازکردن آدرس - + + Select payment request file + انتخاب فایل درخواست پرداخت + + OptionsDialog @@ -534,6 +550,10 @@ &عمومی + MB + مگابایت + + Accept connections from outside پذیرش اتصالات از بیرون @@ -673,6 +693,10 @@ تراز علی‌الحساب شما + Pending: + در انتظار: + + Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance مجموع تراکنش‌هایی که هنوز تأیید نشده‌اند؛ و هنوز روی تراز علی‌الحساب اعمال نشده‌اند @@ -719,6 +743,10 @@ مبلغ + Enter a Bitcoin address (e.g. %1) + یک آدرس بیت‌کوین وارد کنید (مثلاً %1) + + %1 d %1 روز @@ -794,6 +822,10 @@ تعداد فعلی بلوک‌ها + Memory Pool + استخر حافظه + + Memory usage مصرف حافظه @@ -814,6 +846,14 @@ سرویس ها + Connection Time + مدت اتصال + + + Last Send + ارسال شده آخرین بار + + Last Receive آخرین دریافتی @@ -909,6 +949,14 @@ پیام: + Use this form to request payments. All fields are <b>optional</b>. + برای درخواست پرداخت از این فرم استفاده کنید.تمام قسمت ها <b>اختیاری<b> هستند. + + + Clear all fields of the form. + تمام قسمت های فرم را خالی کن. + + Clear پاک‌کردن @@ -917,6 +965,10 @@ نمایش + Remove the selected entries from the list + حذف ورودی های انتخاب‌شده از لیست + + Remove حذف کردن @@ -943,6 +995,14 @@ ارسال سکه + Inputs... + ورودی‌ها... + + + automatically selected + به طور خودکار انتخاب شدند + + Insufficient funds! بود جه نا کافی @@ -979,10 +1039,22 @@ هزینهٔ تراکنش: + Choose... + انتخاب... + + + per kilobyte + در هر کیلوبایت + + Hide پنهان کردن + total at least + در مجموع حداقل + + Recommended: توصیه شده: @@ -1011,6 +1083,10 @@ &دریافت‌کنندهٔ جدید + Clear all fields of the form. + تمام قسمت های فرم را خالی کن. + + Clear &All پاکسازی &همه @@ -1371,6 +1447,10 @@ بار گیری آدرس ها + (default: %s) + (پیش‌فرض %s) + + Invalid -proxy address: '%s' آدرس پراکسی اشتباه %s diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts index 4a2cc17f3cc..4be3085a4d8 100644 --- a/src/qt/locale/bitcoin_fi.ts +++ b/src/qt/locale/bitcoin_fi.ts @@ -115,6 +115,10 @@ &Tietoja %1 + Show information about %1 + Näytä tietoa aiheesta %1 + + About &Qt Tietoja &Qt @@ -127,6 +131,10 @@ &Asetukset... + Modify configuration options for %1 + Muuta kohteen %1 kokoonpanoasetuksia + + &Encrypt Wallet... &Salaa lompakko... @@ -255,6 +263,14 @@ %n aktiivinen yhteys Bitcoin-verkkoon%n aktiivista yhteyttä Bitcoin-verkkoon + Indexing blocks on disk... + Ladataan lohkoindeksiä... + + + Processing blocks on disk... + Käsitellään lohkoja levyllä... + + No block source available... Lohkojen lähdettä ei saatavilla... @@ -311,6 +327,14 @@ Rahansiirtohistoria on ajan tasalla + Show the %1 help message to get a list with possible Bitcoin command-line options + Näytä %1 ohjeet saadaksesi listan mahdollisista Bitcoinin komentorivivalinnoista + + + %1 client + %1-asiakas + + Catching up... Saavutetaan verkkoa... @@ -497,6 +521,10 @@ (%1-bit) + About %1 + Tietoja %1 + + Command-line options Komentorivi parametrit @@ -532,7 +560,11 @@ Show splash screen on startup (default: %u) Näytä aloitusruutu käynnistyksen yhteydessä (oletus: %u) - + + Reset all settings changed in the GUI + Nollaa kaikki graafisen käyttöliittymän kautta tehdyt muutokset + + Intro @@ -540,6 +572,18 @@ Tervetuloa + Welcome to %1. + Tervetuloa %1 pariin. + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Tämä on ensimmäinen kerta, kun %1 on käynnistetty, joten voit valita data-hakemiston paikan. + + + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 lataa ja tallentaa kopion Bitcoinin lohkoketjusta. Vähintään %2Gt dataa tullaan tallentamaan tähän hakemistoon, ja tarve kasvaa ajan myötä. Lompakko tullaan myös tallentamaan tähän hakemistoon. + + Use the default data directory Käytä oletuskansiota @@ -594,6 +638,14 @@ &Yleiset + Automatically start %1 after logging in to the system. + Käynnistä %1 automaattisesti järjestelmään kirjautumisen jälkeen. + + + &Start %1 on system login + &Käynnistä %1 järjestelmään kirjautuessa + + Size of &database cache &Tietokannan välimuistin koko @@ -750,6 +802,10 @@ &Käyttöliittymän kieli + The user interface language can be set here. This setting will take effect after restarting %1. + Tässä voit määritellä käyttöliittymän kielen. Muutokset astuvat voimaan seuraavan kerran, kun %1 käynnistetään. + + &Unit to show amounts in: Yksikkö jona bitcoin-määrät näytetään @@ -954,6 +1010,10 @@ Käyttää BerkeleyDB-versiota + Datadir + Data-hakemisto + + Startup time Käynnistysaika @@ -1038,6 +1098,10 @@ Käyttöliittymä + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. + Avaa %1 -debug-loki tämänhetkisestä data-hakemistosta. Tämä voi viedä muutaman sekunnin suurille lokitiedostoille. + + Decrease font size Pienennä fontin kokoa @@ -1482,6 +1546,10 @@ Poista tämä alkio + The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. + Kulu vähennetään lähetettävästä määrästä. Saaja vastaanottaa vähemmän bitcoineja kuin merkitset Määrä-kenttään. Jos saajia on monia, kulu jaetaan tasan. + + S&ubtract fee from amount V&ähennä maksukulu määrästä @@ -1715,6 +1783,14 @@ Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:portin merkintätapaa IPv6:lle. + Cannot obtain a lock on data directory %s. %s is probably already running. + Ei voida lukita data-hakemistoa %s. %s on luultavasti jo käynnissä. + + + Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. + Jaettu MIT-ohjelmistolisenssin alla, katso mukana tullut tiedosto COPYING tai <http://www.opensource.org/licenses/mit-license.php>. + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) Suorita käsky kun lompakossa rahansiirto muuttuu (%s cmd on vaihdettu TxID kanssa) @@ -1723,10 +1799,18 @@ Tarkistathan että tietokoneesi päivämäärä ja kellonaika ovat oikeassa! Jos kellosi on väärässä, %s ei toimi oikein. + Please contribute if you find %s useful. Visit %s for further information about the software. + Ole hyvä ja avusta, jos %s on mielestäsi hyödyllinen. Vieraile %s saadaksesi lisää tietoa ohjelmistosta. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Aseta script varmistuksen threadien lukumäärä (%u - %d, 0= auto, <0 = jätä näin monta ydintä vapaaksi, oletus: %d) + The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct + Lohkotietokanta sisältää lohkon, joka vaikuttaa olevan tulevaisuudesta. Tämä saattaa johtua tietokoneesi virheellisesti asetetuista aika-asetuksista. Rakenna lohkotietokanta uudelleen vain jos olet varma, että tietokoneesi päivämäärä ja aika ovat oikein. + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications Tämä on esi-julkaistu testiversio - Käytä omalla riskillä - Ei saa käytää louhimiseen tai kauppasovelluksiin. @@ -1747,6 +1831,14 @@ Salli vertaisten yhdistää annetusta verkkomaskista tai IP-osoitteesta. Voidaan määrittää useampia kertoja. + You need to rebuild the database using -reindex-chainstate to change -txindex + Sinun tulee uudelleenrakentaa tietokanta käyttäen -reindex-chainstate vaihtaaksesi -txindex + + + %s corrupt, salvage failed + %s korruptoitunut, korjaaminen epäonnistui + + -maxmempool must be at least %d MB -maxmempool on oltava vähintään %d MB @@ -1755,10 +1847,18 @@ <category> voi olla: + Attempt to recover private keys from a corrupt wallet on startup + Yritä palauttaa yksityiset avaimet korruptoituneesta lompakosta käynnistyksen yhteydessä + + Block creation options: Lohkon luonnin asetukset: + Cannot resolve -%s address: '%s' + -%s -osoitteen '%s' selvittäminen epäonnistui + + Connect only to the specified node(s) Yhidstä ainoastaan määrättyihin noodeihin @@ -1767,6 +1867,10 @@ Yhteyden valinnat: + Copyright (C) %i-%i + Tekijänoikeus (C) %i-%i + + Corrupted block database detected Vioittunut lohkotietokanta havaittu @@ -1795,6 +1899,18 @@ Virhe alustaessa lompakon tietokantaympäristöä %s! + Error loading %s + Virhe ladattaessa %s + + + Error loading %s: Wallet corrupted + Virhe ladattaessa %s: Lompakko vioittunut + + + Error loading %s: Wallet requires newer version of %s + Virhe ladattaessa %s: Tarvitset uudemman %s -version + + Error loading block database Virhe avattaessa lohkoketjua @@ -1823,6 +1939,22 @@ Virheellinen -onion osoite: '%s' + Invalid amount for -%s=<amount>: '%s' + Virheellinen määrä -%s=<amount>: '%s' + + + Invalid amount for -fallbackfee=<amount>: '%s' + Virheellinen määrä -fallbackfee=<amount>: '%s' + + + Loading banlist... + Ladataan kieltolistaa... + + + Location of the auth cookie (default: data dir) + Todennusevästeen sijainti (oletus: datahakemisto) + + Not enough file descriptors available. Ei tarpeeksi tiedostomerkintöjä vapaana. @@ -1831,6 +1963,14 @@ Yhdistä vain solmukohtiin <net>-verkossa (ipv4, ipv6 tai onion) + Print this help message and exit + Näytä tämä ohjeviesti ja poistu + + + Print version and exit + Näytä versio ja poistu. + + Prune mode is incompatible with -txindex. Karsittu tila ei ole yhteensopiva -txindex:n kanssa. @@ -1839,6 +1979,10 @@ Aseta tietokannan välimuistin koko megatavuissa (%d - %d, oletus: %d + Set maximum BIP141 block weight (default: %d) + Aseta suurin BIP141-lohkopaino (oletus: %d) + + Set maximum block size in bytes (default: %d) Aseta lohkon maksimikoko tavuissa (oletus: %d) @@ -1847,6 +1991,22 @@ Aseta lompakkotiedosto (data-hakemiston sisällä) + The source code is available from %s. + Lähdekoodi löytyy %s. + + + Unsupported argument -benchmark ignored, use -debug=bench. + Argumenttia -benchmark ei tueta, käytä -debug=bench. + + + Unsupported argument -debugnet ignored, use -debug=net. + Argumenttia -debugnet ei tueta, käytä -debug=net. + + + Unsupported argument -tor found, use -onion. + Argumenttia -tor ei tueta, käytä -onion. + + Use UPnP to map the listening port (default: %u) Käytä UPnP:ta kuuntelevan portin kartoittamiseen (oletus: %u) @@ -1863,6 +2023,10 @@ Lompakko %s sijaitsee data-hakemiston ulkopuolella %s + Wallet needed to be rewritten: restart %s to complete + Lompakko tarvitsee uudelleenkirjoittaa: käynnistä %s uudelleen + + Wallet options: Lompakon valinnat: @@ -1875,6 +2039,10 @@ Paljasta omat IP-osoitteet (oletus: 1 kun kuunnellaan ja -externalip tai -proxy ei ole käytössä) + Error: Listening for incoming connections failed (listen returned error %s) + Virhe: Saapuvien yhteyksien kuuntelu epäonnistui (kuuntelu palautti virheen %s) + + Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) Aja komento kun olennainen hälytys vastaanotetaan tai nähdään todella pitkä haara (%s komennossa korvataan viestillä) @@ -1883,6 +2051,14 @@ Aseta maksimikoko korkea prioriteetti/pieni palkkio rahansiirtoihin tavuissa (oletus: %d) + The transaction amount is too small to send after the fee has been deducted + Siirtomäärä on liian pieni lähetettäväksi kulun vähentämisen jälkeen. + + + This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard. + Tämä tuote sisältää ohjelmistoa, jonka on kehittänyt OpenSSL Project käytettäväksi OpenSSL Toolkit -ohjelmistossa <https://www.openssl.org/>, ja Eric Youngin kirjoittamaa salausohjelmistoa sekä Thomas Bernardin kirjoittamaa UPnP-ohjelmistoa. + + (default: %u) (oletus: %u) @@ -1891,6 +2067,10 @@ Hyväksy julkisia REST-pyyntöjä (oletus: %u) + Automatically create Tor hidden service (default: %d) + Luo Tor-salattu palvelu automaattisesti (oletus: %d) + + Connect through SOCKS5 proxy Yhdistä SOCKS5 proxin kautta @@ -1899,14 +2079,30 @@ Virheitä tietokantaa luettaessa, ohjelma pysäytetään. + Imports blocks from external blk000??.dat file on startup + Tuo lohkot ulkoisesta blk000??.dat -tiedostosta käynnistettäessä + + Information Tietoa + Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s) + Kelvoton määrä argumentille -paytxfee=<amount>: '%s' (pitää olla vähintään %s) + + + Invalid netmask specified in -whitelist: '%s' + Kelvoton verkkopeite määritelty argumentissa -whitelist: '%s' + + Keep at most <n> unconnectable transactions in memory (default: %u) Pidä enimmillään <n> yhdistämiskelvotonta rahansiirtoa muistissa (oletus: %u) + Need to specify a port with -whitebind: '%s' + Pitää määritellä portti argumentilla -whitebind: '%s' + + Node relay options: Välityssolmukohdan asetukset: @@ -2023,6 +2219,10 @@ Kuinka läpikäyvä lohkojen -checkblocks -todennus on (0-4, oletus: %u) + Output debugging information (default: %u, supplying <category> is optional) + Tulosta debuggaustieto (oletus: %u, annettu <category> valinnainen) + + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) Käytä erillistä SOCKS5-proxyä tavoittaaksesi vertaisia Tor-piilopalveluiden kautta (oletus: %s) diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index ebfc773fbca..ef27c6fc23c 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -80,7 +80,7 @@ Synchronizing with network... - Synchronisation avec le réseau en cours… + Synchronisation avec le réseau… &Overview @@ -156,7 +156,7 @@ Open &URI... - Ouvrir un &URI... + Ouvrir une &URI... Reindexing blocks on disk... @@ -204,7 +204,7 @@ &Show / Hide - &Afficher / Cacher + &Afficher / Masquer Show or hide the main Window @@ -220,7 +220,7 @@ Verify messages to ensure they were signed with specified Bitcoin addresses - Vérifier les messages pour vous assurer qu'ils ont été signés avec les adresses Bitcoin spécifiées + Vérifier les messages pour s'assurer qu'ils ont été signés avec les adresses Bitcoin spécifiées &File @@ -228,7 +228,7 @@ &Settings - &Réglages + &Paramètres &Help @@ -240,7 +240,7 @@ Request payments (generates QR codes and bitcoin: URIs) - Demander des paiements (génère des codes QR et des URIs bitcoin:) + Demander des paiements (génère des codes QR et des URI bitcoin:) Show the list of used sending addresses and labels @@ -300,7 +300,7 @@ %1 behind - %1 en retard + en retard d'%1 Last received block was generated %1 ago. @@ -308,7 +308,7 @@ Transactions after this will not yet be visible. - Les transactions après ceci ne sont pas encore visibles. + Les transactions suivantes ne seront pas déjà visibles. Error @@ -336,7 +336,7 @@ Catching up... - Rattrapage en cours… + Rattrapage… Date: %1 @@ -425,7 +425,7 @@ (un)select all - Tout (dé)sélectionner + Tout (des)sélectionner Tree mode @@ -472,7 +472,7 @@ &Label - &Étiquette + É&tiquette The label associated with this address list entry @@ -480,7 +480,7 @@ The address associated with this address list entry. This can only be modified for sending addresses. - L'adresse associée à cette entrée de la liste d'adresses. Ceci ne peut être modifié que pour les adresses d'envoi. + L'adresse associée à cette entrée de la liste d'adresses. Cela ne peut être modifié que pour les adresses d'envoi. &Address @@ -499,7 +499,7 @@ Directory already exists. Add %1 if you intend to create a new directory here. - Le répertoire existe déjà. Ajoutez %1 si vous voulez créer un nouveau répertoire ici. + Le répertoire existe déjà. Ajouter %1 si vous comptez créer un nouveau répertoire ici. Path already exists, and is not a directory. @@ -605,18 +605,18 @@ (of %n GB needed) - (sur %n Go nécessaire)(sur %n Go nécessaires) + (sur %n Go requis)(sur %n Go requis) OpenURIDialog Open URI - Ouvrir un URI + Ouvrir une URI Open payment request from URI or file - Ouvrir une demande de paiement à partir d'un URI ou d'un fichier + Ouvrir une demande de paiement à partir d'une URI ou d'un fichier URI: @@ -635,7 +635,7 @@ &Main - Réglages &principaux + &Principaux Automatically start %1 after logging in to the system. @@ -655,7 +655,7 @@ Number of script &verification threads - Nombre d'exétrons de &vérification de script + Nombre de fils de &vérification de script Accept connections from outside @@ -667,7 +667,7 @@ IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) - Adresse IP du mandataire (par ex. IPv4 : 127.0.0.1 / IPv6 : ::1) + Adresse IP du mandataire (p. ex. IPv4 : 127.0.0.1 / IPv6 : ::1) Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu. @@ -675,7 +675,7 @@ Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |. - URL de tiers (par ex. un explorateur de blocs) apparaissant dans l'onglet des transactions comme éléments du menu contextuel. %s dans l'URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |. + URL de tiers (p. ex. un explorateur de blocs) apparaissant dans l'onglet des transactions comme éléments du menu contextuel. %s dans l'URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |. Third party transaction URLs @@ -691,7 +691,7 @@ &Reset Options - &Réinitialisation des options + &Réinitialiser les options &Network @@ -711,11 +711,11 @@ Enable coin &control features - Activer les fonctions de &contrôle des pièces + Activer les fonctions de &contrôle des pièces If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed. - Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d'une transaction ne peut pas être utilisée tant que cette transaction n'a pas reçu au moins une confirmation. Ceci affecte aussi comment votre solde est calculé. + Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d'une transaction ne peut pas être utilisée tant que cette transaction n'a pas reçu au moins une confirmation. Celai affecte aussi le calcul de votre solde. &Spend unconfirmed change @@ -723,7 +723,7 @@ Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled. - Ouvrir le port du client Bitcoin automatiquement sur le routeur. Ceci ne fonctionne que si votre routeur supporte l'UPnP et si la fonctionnalité est activée. + Ouvrir automatiquement le port du client Bitcoin sur le routeur. Cela ne fonctionne que si votre routeur prend en charge l'UPnP et si la fonction est activée. Map port using &UPnP @@ -739,7 +739,7 @@ Proxy &IP: - &IP du serveur mandataire : + &IP du mandataire : &Port: @@ -747,7 +747,7 @@ Port of the proxy (e.g. 9050) - Port du serveur mandataire (par ex. 9050) + Port du mandataire (p. ex. 9050) Used for reaching peers via: @@ -791,11 +791,11 @@ Show only a tray icon after minimizing the window. - Afficher uniquement une icône système après minimisation. + N'afficher qu'une icône dans la zone de notification après minimisation. &Minimize to the tray instead of the taskbar - &Minimiser dans la barre système au lieu de la barre des tâches + &Minimiser dans la zone de notification au lieu de la barre des tâches M&inimize on close @@ -819,7 +819,7 @@ Choose the default subdivision unit to show in the interface and when sending coins. - Choisissez la sous-unité par défaut pour l'affichage dans l'interface et lors de l'envoi de pièces. + Choisir la sous-unité par défaut d'affichage dans l'interface et lors d'envoi de pièces. Whether to show coin control features or not. @@ -847,7 +847,7 @@ Client restart required to activate changes. - Le redémarrage du client est nécessaire pour activer les changements. + Le redémarrage du client est exigé pour activer les changements. Client will be shut down. Do you want to proceed? @@ -882,7 +882,7 @@ Your current spendable balance - Votre solde actuel pouvant être dépensé + Votre solde actuel disponible Pending: @@ -890,7 +890,7 @@ Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance - Total des transactions qui doivent encore être confirmées et qu'il n'est pas encore possible de dépenser + Total des transactions qui doivent encore être confirmées et qui ne sont pas prises en compte dans le solde disponible Immature: @@ -1143,7 +1143,7 @@ The duration of a currently outstanding ping. - La durée d'un ping actuellement en cours. + La durée d'un ping en cours. Ping Wait @@ -1171,7 +1171,7 @@ &Clear - &Nettoyer + &Effacer Totals @@ -1187,11 +1187,11 @@ Debug log file - Journal de débogage + Fichier journal de débogage Clear console - Nettoyer la console + Effacer la console &Disconnect Node @@ -1227,7 +1227,7 @@ Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. - Utiliser les touches de curseur pour naviguer dans l'historique et <b>Ctrl-L</b> pour effacer l'écran. + Utiliser les touches de déplacement pour naviguer dans l'historique et <b>Ctrl-L</b> pour effacer l'écran. Type <b>help</b> for an overview of available commands. @@ -1298,7 +1298,7 @@ Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before. - Réutilise une adresse de réception précédemment utilisée. Réutiliser une adresse pose des problèmes de sécurité et de vie privée. N'utilisez pas cette option sauf si vous générez à nouveau une demande de paiement déjà faite. + Réutiliser une adresse de réception utilisée précédemment. Réutiliser une adresse comporte des problèmes de sécurité et de confidentialité. À ne pas utiliser, sauf pour générer une demande de paiement faite au préalable. R&euse an existing receiving address (not recommended) @@ -1306,19 +1306,19 @@ An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network. - Un message optionnel à joindre à la demande de paiement qui sera affiché à l'ouverture de celle-ci. Note : le message ne sera pas envoyé avec le paiement par le réseau Bitcoin. + Un message facultatif à joindre à la demande de paiement et qui sera affiché à l'ouverture de celle-ci. Note : le message ne sera pas envoyé avec le paiement par le réseau Bitcoin. An optional label to associate with the new receiving address. - Un étiquette optionnelle à associer à la nouvelle adresse de réception + Un étiquette facultative à associer à la nouvelle adresse de réception. Use this form to request payments. All fields are <b>optional</b>. - Utiliser ce formulaire pour demander des paiements. Tous les champs sont <b>optionnels</b>. + Utiliser ce formulaire pour demander des paiements. Tous les champs sont <b>facultatifs</b>. An optional amount to request. Leave this empty or zero to not request a specific amount. - Un montant optionnel à demander. Laisser ceci vide ou à zéro pour ne pas demander de montant spécifique. + Un montant facultatif à demander. Ne rien saisir ou un zéro pour ne pas demander de montant spécifique. Clear all fields of the form. @@ -1334,11 +1334,11 @@ &Request payment - &Demande de paiement + &Demander un paiement Show the selected request (does the same as double clicking an entry) - Afficher la demande choisie (identique à un double-clic sur une entrée) + Afficher la demande choisie (comme double-cliquer sur une entrée) Show @@ -1346,11 +1346,11 @@ Remove the selected entries from the list - Enlever les entrées sélectionnées de la liste + Retirer les entrées sélectionnées de la liste Remove - Enlever + Retirer @@ -1369,7 +1369,7 @@ &Save Image... - &Sauvegarder l'image... + &Enregistrer l'image... @@ -1424,7 +1424,7 @@ If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address. - Si ceci est actif mais l'adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée. + Si cette option est activée, et l'adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée. Custom change address @@ -1460,7 +1460,7 @@ Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process. - Il est correct de payer les frais minimum tant que le volume transactionnel est inférieur à l'espace dans les blocs. Mais soyez conscient que ceci pourrait résulter en une transaction n'étant jamais confirmée une fois qu'il y aura plus de transactions que le réseau ne pourra en traiter. + Il est correct de payer les frais minimum tant que le volume transactionnel est inférieur à l'espace dans les blocs. Mais soyez conscient que cela pourrait résulter en une transaction n'étant jamais confirmée une fois qu'il y aura plus de transactions que le réseau ne pourra en traiter. (read the tooltip) @@ -1476,7 +1476,7 @@ (Smart fee not initialized yet. This usually takes a few blocks...) - (Les frais intelligents ne sont pas encore initialisés. Ceci prend habituellement quelques blocs...) + (Les frais intelligents ne sont pas encore initialisés. Cela prend habituellement quelques blocs...) Confirmation time: @@ -1508,7 +1508,7 @@ Clear &All - &Tout nettoyer + &Tout effacer Balance: @@ -1555,7 +1555,7 @@ Paste address from clipboard - Coller l'adresse depuis le presse-papiers + Coller l'adresse du presse-papiers Alt+P @@ -1563,7 +1563,7 @@ Remove this entry - Enlever cette entrée + Retirer cette entrée The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. @@ -1591,7 +1591,7 @@ A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. - Un message qui était joint à l'URI Bitcoin et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin. + Un message qui était joint à l'URI bitcoin: et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin. Pay To: @@ -1617,7 +1617,7 @@ SignVerifyMessageDialog Signatures - Sign / Verify a Message - Signatures - Signer / Vérifier un message + Signatures - Signer / vérifier un message &Sign Message @@ -1633,7 +1633,7 @@ Choose previously used address - Choisir une adresse précédemment utilisée + Choisir une adresse déjà utilisée Alt+A @@ -1641,7 +1641,7 @@ Paste address from clipboard - Coller une adresse depuis le presse-papiers + Coller une adresse du presse-papiers Alt+P @@ -1661,7 +1661,7 @@ Sign the message to prove you own this Bitcoin address - Signer le message pour prouver que vous détenez cette adresse Bitcoin + Signer le message afin de prouver que vous détenez cette adresse Bitcoin Sign &Message @@ -1673,7 +1673,7 @@ Clear &All - &Tout nettoyer + &Tout effacer &Verify Message @@ -1681,7 +1681,7 @@ Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction! - Saisissez ci-dessous l'adresse de destinataire, le message (assurez-vous de copier exactement les retours à la ligne, les espaces, les tabulations, etc.) et la signature pour vérifier le message. Faites attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé même, pour éviter d'être trompé par une attaque d'homme du milieu. Notez que ceci ne fait que prouver que le signataire reçoit l'adresse et ne peut pas prouver la provenance d'une transaction. + Saisir ci-dessous l'adresse du destinataire, le message (s'assurer de copier fidèlement les retours à la ligne, les espaces, les tabulations, etc.) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé même, pour éviter d'être trompé par une attaque d'homme du milieu. Prendre en compte que cela ne fait que prouver que le signataire reçoit l'adresse et ne peut pas prouver la provenance d'une transaction ! The Bitcoin address the message was signed with @@ -1689,7 +1689,7 @@ Verify the message to ensure it was signed with the specified Bitcoin address - Vérifier le message pour vous assurer qu'il a bien été signé par l'adresse Bitcoin spécifiée + Vérifier le message pour s'assurer qu'il a été signé avec l'adresse Bitcoin spécifiée Verify &Message @@ -1748,7 +1748,7 @@ Accept command line and JSON-RPC commands - Accepter les commandes de JSON-RPC et de la ligne de commande + Accepter les commandes JSON-RPC et en ligne de commande If <category> is not supplied or if <category> = 1, output all debugging information. @@ -1812,7 +1812,7 @@ Bind to given address and always listen on it. Use [host]:port notation for IPv6 - Se lier à l'adresse donnée et toujours l'écouter. Utilisez la notation [host]:port pour l'IPv6 + Se lier à l'adresse donnée et toujours l'écouter. Utiliser la notation [host]:port pour l'IPv6 Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup @@ -1823,6 +1823,10 @@ Distribué sous la licence MIT d'utilisation d'un logiciel. Consultez le fichier joint COPYING ou <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Octets équivalents par sigop dans les transactions pour relayer et miner (par défaut : %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Erreur de chargement de %s : vous ne pouvez pas activer HD sur un porte-monnaie non HD existant @@ -1844,7 +1848,7 @@ Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) - Définir le nombre d'exétrons de vérification des scripts (%u à %d, 0 = auto, < 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d) + Définir le nombre de fils de vérification des scripts (%u à %d, 0 = auto, < 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d) The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct @@ -1852,7 +1856,7 @@ This is a pre-release test build - use at your own risk - do not use for mining or merchant applications - Ceci est une pré-version de test - l'utiliser à vos risques et périls - ne pas l'utiliser pour miner ou pour des applications marchandes + Ceci est une préversion de test - l'utiliser à vos risques - ne pas l'utiliser pour miner ou pour des applications marchandes Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain @@ -1860,7 +1864,7 @@ Use UPnP to map the listening port (default: 1 when listening and no -proxy) - Utiliser l'UPnP pour mapper le port d'écoute (par défaut : 1 lors de l'écoute et pas de mandataire -proxy) + Utiliser l'UPnP pour mapper le port d'écoute (par défaut : 1 en écoute et sans -proxy) Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. @@ -1900,7 +1904,7 @@ Block creation options: - Options de création de bloc : + Options de création de blocs : Cannot resolve -%s address: '%s' @@ -1924,7 +1928,7 @@ Corrupted block database detected - Base corrompue de données des blocs détectée + Une base de données de blocs corrompue a été détectée Debugging/Testing options: @@ -1936,7 +1940,7 @@ Do you want to rebuild the block database now? - Voulez-vous reconstruire la base de données des blocs maintenant ? + Voulez-vous reconstruire la base de données de blocs maintenant ? Enable publish hash block in <address> @@ -1956,23 +1960,23 @@ Error initializing block database - Erreur lors de l'initialisation de la base de données des blocs + Erreur d'initialisation de la base de données de blocs Error initializing wallet database environment %s! - Erreur lors de l'initialisation de l'environnement de la base de données du porte-monnaie %s ! + Erreur d'initialisation de l'environnement de la base de données du porte-monnaie %s ! Error loading %s - Erreur lors du chargement de %s + Erreur de chargement de %s Error loading %s: Wallet corrupted - Erreur lors du chargement de %s : porte-monnaie corrompu + Erreur de chargement de %s : porte-monnaie corrompu Error loading %s: Wallet requires newer version of %s - Erreur lors du chargement de %s : le porte-monnaie exige une version plus récente de %s + Erreur de chargement de %s : le porte-monnaie exige une version plus récente de %s Error loading %s: You can't disable HD on a already existing HD wallet @@ -1980,11 +1984,11 @@ Error loading block database - Erreur du chargement de la base de données des blocs + Erreur de chargement de la base de données de blocs Error opening block database - Erreur lors de l'ouverture de la base de données des blocs + Erreur d'ouverture de la base de données de blocs Error: Disk space is low! @@ -1992,7 +1996,7 @@ Failed to listen on any port. Use -listen=0 if you want this. - Échec de l'écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci. + Échec d'écoute sur un port quelconque. Utiliser -listen=0 si vous le voulez. Importing... @@ -2000,7 +2004,7 @@ Incorrect or no genesis block found. Wrong datadir for network? - Bloc de genèse incorrect ou introuvable. Mauvais répertoire de données pour le réseau ? + Bloc de genèse incorrect ou introuvable. Mauvais datadir pour le réseau ? Invalid -onion address: '%s' @@ -2027,10 +2031,6 @@ Emplacement du fichier témoin auth (par défaut : data dir) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Octets minimaux par sigop dans les transactions que nous relayons et minons (par défaut : %u) - - Not enough file descriptors available. Pas assez de descripteurs de fichiers proposés. @@ -2068,7 +2068,7 @@ Set database cache size in megabytes (%d to %d, default: %d) - Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d) + Définir la taille du cache de la base de données en mégaoctets (%d à %d, default: %d) Set maximum BIP141 block weight (default: %d) @@ -2108,11 +2108,11 @@ Verifying blocks... - Vérification des blocs en cours... + Vérification des blocs... Verifying wallet... - Vérification du porte-monnaie en cours... + Vérification du porte-monnaie... Wallet %s resides outside data directory %s @@ -2152,7 +2152,7 @@ Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) - Exécuter une commande lorsqu'une alerte pertinente est reçue ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message) + Exécuter une commande lorsqu'une alerte pertinente est reçue, ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message) Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s) @@ -2176,7 +2176,7 @@ Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u) - Aléer les authentifiants pour chaque connexion mandataire. Ceci active l'isolement de flux de Tor (par défaut : %u) + Aléer les authentifiants pour chaque connexion mandataire. Cela active l'isolement de flux de Tor (par défaut : %u) Set maximum size of high-priority/low-fee transactions in bytes (default: %d) @@ -2200,7 +2200,7 @@ You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain - Vous devez reconstruire la base de données en utilisant -reindex afin de revenir au mode sans élagage. Ceci retéléchargera complètement la chaîne de blocs. + Vous devez reconstruire la base de données en utilisant -reindex afin de revenir au mode sans élagage. Cela retéléchargera complètement la chaîne de blocs. (default: %u) @@ -2264,7 +2264,7 @@ 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 + Envoyer les infos de débogage/trace à la console au lieu du fichier debug.log Send transactions as zero-fee transactions if possible (default: %u) @@ -2276,11 +2276,11 @@ Shrink debug.log file on client startup (default: 1 when no -debug) - Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n'est pas présent) + Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 sans -debug) Signing transaction failed - La signature de la transaction a échoué + Échec de signature de la transaction The transaction amount is too small to pay the fee @@ -2300,7 +2300,7 @@ Transaction amount too small - Montant de la transaction trop bas + Le montant de la transaction est trop bas Transaction amounts must be positive @@ -2312,7 +2312,7 @@ Transaction too large - Transaction trop volumineuse + La transaction est trop grosse Unable to bind to %s on this computer (bind returned error %s) @@ -2364,7 +2364,7 @@ (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) - (1 = conserver les métadonnées de transmission, par ex. les informations du propriétaire du compte et de la demande de paiement, 2 = abandonner les métadonnées de transmission) + (1 = conserver les métadonnées de transmission, p. ex. les informations du propriétaire du compte et de demande de paiement, 2 = abandonner les métadonnées de transmission) -maxtxfee is set very high! Fees this large could be paid on a single transaction. @@ -2396,7 +2396,7 @@ Output debugging information (default: %u, supplying <category> is optional) - Extraire les informations de débogage (par défaut : %u, fournir <category> est optionnel) + Extraire les informations de débogage (par défaut : %u, fournir <category> est facultatif) Support filtering of blocks and transaction with bloom filters (default: %u) @@ -2496,7 +2496,7 @@ Set the number of threads to service RPC calls (default: %d) - Définir le nombre d'exétrons pour desservir les appels RPC (par défaut : %d) + Définir le nombre de fils pour les appels RPC (par défaut : %d) Specify configuration file (default: %s) @@ -2520,7 +2520,7 @@ Unknown network specified in -onlynet: '%s' - Réseau inconnu spécifié sur -onlynet : « %s » + Réseau inconnu spécifié dans -onlynet : « %s » Insufficient funds diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 0ed0fc442da..2d99b90c65a 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -3,7 +3,7 @@ AddressBookPage Right-click to edit address or label - Fare clic con il tasto destro del mouse per modificare l'indirizzo o l'etichetta + Fare clic con il tasto destro del mouse per modificare l'indirizzo o l'etichettadefault Create a new address @@ -521,6 +521,10 @@ (%1-bit) + About %1 + Informazioni %1 + + Command-line options Opzioni della riga di comando @@ -576,6 +580,10 @@ Dato che questa è la prima volta che il programma viene lanciato, puoi scegliere dove %1 salverà i suoi dati. + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 scaricherà e salverà una copia della Blockchain di Bitcoin. Saranno salvati almeno %2GB di dati in questo percorso e continueranno ad aumentare col tempo. Anche il portafoglio verrà salvato in questo percorso. + + Use the default data directory Usa la cartella dati predefinita @@ -634,6 +642,10 @@ Avvia automaticamente %1 una volta effettuato l'accesso al sistema. + &Start %1 on system login + &Start %1 all'accesso al sistema + + Size of &database cache Dimensione della cache del &database. @@ -771,6 +783,10 @@ Per specificare più URL separarli con una barra verticale "|". &Finestra + Hide tray icon + Nascondi l'icona della barra applicazioni + + Show only a tray icon after minimizing the window. Mostra solo nella tray bar quando si riduce ad icona. @@ -791,6 +807,10 @@ Per specificare più URL separarli con una barra verticale "|". &Lingua Interfaccia Utente: + The user interface language can be set here. This setting will take effect after restarting %1. + La lingua dell'interfaccia utente può essere impostata qui. L'impostazione avrà effetto dopo il riavvio %1. + + &Unit to show amounts in: &Unità di misura con cui visualizzare gli importi: @@ -995,6 +1015,10 @@ Per specificare più URL separarli con una barra verticale "|". Versione BerkeleyDB in uso + Datadir + Datadir + + Startup time Ora di avvio @@ -1079,6 +1103,18 @@ Per specificare più URL separarli con una barra verticale "|". User Agent + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. + Apri il file log del debug di %1 dalla cartella dati attuale. Può richiedere alcuni secondi per file di log di grandi dimensioni. + + + Decrease font size + Riduci dimensioni font. + + + Increase font size + Aumenta dimensioni font + + Services Servizi @@ -1183,6 +1219,10 @@ Per specificare più URL separarli con una barra verticale "|". &Elimina Ban Nodo + Welcome to the %1 RPC console. + Benvenuto nella console RPC di %1. + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. Usa le frecce direzionali per scorrere la cronologia, e <b>Ctrl-L</b> per cancellarla. @@ -1562,6 +1602,10 @@ Per specificare più URL separarli con una barra verticale "|". ShutdownWindow + %1 is shutting down... + Arresto di %1 in corso... + + Do not shut down the computer until this window disappears. Non spegnere il computer fino a quando questa finestra non si sarà chiusa. @@ -1752,6 +1796,18 @@ Per specificare più URL separarli con una barra verticale "|". Bitcoin Core + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. + -fallbackfee è impostato su un valore molto elevato! Questa è la commissione che potresti pagare quando la stima della commissione non è disponibile. + + + A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s) + Un importo (in %s/kB) che sarà utilizzato quando la stima delle commissioni non ha abbastanza dati (default: %s) + + + Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d) + Accetta le transazioni trasmesse ricevute da peers in whitelist anche se non si stanno trasmettendo transazioni (default: %d) + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 Associa all'indirizzo indicato e resta permanentemente in ascolto su di esso. Usa la notazione [host]:porta per l'IPv6 @@ -1764,10 +1820,38 @@ Per specificare più URL separarli con una barra verticale "|". Distribuito secondo la licenza software MIT, vedi il file COPYING incluso oppure <http://www.opensource.org/licenses/mit-license.php>. + Error loading %s: You can't enable HD on a already existing non-HD wallet + Errore caricamento %s: Non puoi abilitare HD in un portafoglio non-HD già esistente + + + Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Errore lettura %s! Tutte le chiavi sono state lette correttamente, ma i dati delle transazioni o della rubrica potrebbero essere mancanti o non corretti. + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) Esegue un comando quando lo stato di una transazione del portamonete cambia (%s in cmd è sostituito da TxID) + Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) + Forza la trasmissione della transazione dai peer presenti nella whitelist anche se violano le regole di trasmissione locali (default: %d) + + + Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) + Regolazione della massima differenza media di tempo dei peer consentita. L'impostazione dell'orario locale può essere impostata in avanti o indietro di questa quantità. (default %u secondi) + + + Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) + Totale massimo di commissioni (in %s) da usare in una transazione singola o di gruppo del wallet; valori troppo bassi possono abortire grandi transazioni (default: %s) + + + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. + Per favore controllate che la data del computer e l'ora siano corrette! Se il vostro orologio è sbagliato %s non funzionerà correttamente. + + + Please contribute if you find %s useful. Visit %s for further information about the software. + Per favore contribuite se ritenete %s utile. Visitate %s per maggiori informazioni riguardo il software. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Imposta il numero di thread per la verifica degli script (da %u a %d, 0 = automatico, <0 = lascia questo numero di core liberi, predefinito: %d) @@ -1780,6 +1864,10 @@ Per specificare più URL separarli con una barra verticale "|". Questa versione è una compilazione pre-rilascio - usala a tuo rischio - non utilizzarla per la generazione o per applicazioni di commercio + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + Impossibile riportare il database ad un livello pre-fork. Dovrai riscaricare tutta la blockchain + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) Utilizza UPnP per mappare la porta in ascolto (default: 1 quando in ascolto e -proxy non è specificato) @@ -1796,6 +1884,14 @@ Per specificare più URL separarli con una barra verticale "|". Inserisce in whitelist i peer che si connettono da un dato indirizzo IP o netmask. Può essere specificato più volte. + You need to rebuild the database using -reindex-chainstate to change -txindex + È necessario ricostruire il database usando -reindex per cambiare -txindex + + + %s corrupt, salvage failed + %s corrotto, recupero fallito + + -maxmempool must be at least %d MB -maxmempool deve essere almeno %d MB @@ -1804,10 +1900,26 @@ Per specificare più URL separarli con una barra verticale "|". Valori possibili per <category>: + Append comment to the user agent string + Aggiungi commento alla stringa dell'applicazione utente + + + Attempt to recover private keys from a corrupt wallet on startup + Prova a recuperare le chiavi private da un portafoglio corrotto all'avvio + + Block creation options: Opzioni creazione blocco: + Cannot resolve -%s address: '%s' + Impossobile risolvere l'indirizzo -%s: '%s' + + + Change index out of range + Cambio indice fuori paramentro + + Connect only to the specified node(s) Connessione ai soli nodi specificati @@ -1816,6 +1928,10 @@ Per specificare più URL separarli con una barra verticale "|". Opzioni di connessione: + Copyright (C) %i-%i + Copyright (C) %i-%i + + Corrupted block database detected Rilevato database blocchi corrotto @@ -1848,6 +1964,10 @@ Per specificare più URL separarli con una barra verticale "|". Abilita pubblicazione transazione raw in <address> + Enable transaction replacement in the memory pool (default: %u) + Abilita la sostituzione della transazione nel pool della memoria (default: %u) + + Error initializing block database Errore durante l'inizializzazione del database dei blocchi @@ -1856,6 +1976,22 @@ Per specificare più URL separarli con una barra verticale "|". Errore durante l'inizializzazione dell'ambiente del database del portamonete %s! + Error loading %s + Errore caricamento %s + + + Error loading %s: Wallet corrupted + Errore caricamento %s: Portafoglio corrotto + + + Error loading %s: Wallet requires newer version of %s + Errore caricamento %s: il Portafoglio richiede una versione aggiornata di %s + + + Error loading %s: You can't disable HD on a already existing HD wallet + Errore caricamento %s: Non puoi disabilitare HD in un portafoglio HD già esistente + + Error loading block database Errore durante il caricamento del database blocchi @@ -1880,14 +2016,34 @@ Per specificare più URL separarli con una barra verticale "|". Blocco genesi non corretto o non trovato. È possibile che la cartella dati appartenga ad un'altra rete. + Initialization sanity check failed. %s is shutting down. + Test di integrità iniziale fallito. %s si arresterà. + + Invalid -onion address: '%s' Indirizzo -onion non valido: '%s' + Invalid amount for -%s=<amount>: '%s' + Importo non valido per -%s=<amount>: '%s' + + + Invalid amount for -fallbackfee=<amount>: '%s' + Importo non valido per -fallbackfee=<amount>: '%s' + + Keep the transaction memory pool below <n> megabytes (default: %u) Mantieni la memory pool delle transazioni al di sotto di <n> megabytes (default: %u) + Loading banlist... + Caricamento bloccati... + + + Location of the auth cookie (default: data dir) + Posizione del cookie di aiutorizzazione (default: data dir) + + Not enough file descriptors available. Non ci sono abbastanza descrittori di file disponibili. @@ -1896,6 +2052,14 @@ Per specificare più URL separarli con una barra verticale "|". Connessione ai soli nodi appartenenti alla rete <net> (ipv4, ipv6 o Tor) + Print this help message and exit + Mostra questo messaggio di aiuto ed esci + + + Print version and exit + Mostra la versione ed esci + + Prune cannot be configured with a negative value. La modalità prune non può essere configurata con un valore negativo. @@ -1904,10 +2068,26 @@ Per specificare più URL separarli con una barra verticale "|". La modalità prune è incompatibile con l'opzione -txindex. + Rebuild chain state and block index from the blk*.dat files on disk + Ricostruisci lo stato della catena e l'indice dei blocchi partendo dai file blk*.dat presenti sul disco + + + Rebuild chain state from the currently indexed blocks + Ricrea l'indice della catena dei blocchi partendo da quelli già indicizzati + + + Rewinding blocks... + Verifica blocchi... + + Set database cache size in megabytes (%d to %d, default: %d) Imposta la dimensione della cache del database in megabyte (%d a %d, predefinito: %d) + Set maximum BIP141 block weight (default: %d) + Imposta la dimensione massima del blocco BIP141 (default: %d) + + Set maximum block size in bytes (default: %d) Imposta la dimensione massima del blocco in byte (predefinito: %d) @@ -1916,6 +2096,14 @@ Per specificare più URL separarli con una barra verticale "|". Specifica il file del portamonete (all'interno della cartella dati) + The source code is available from %s. + Il codice sorgente è disponibile in %s + + + Unable to bind to %s on this computer. %s is probably already running. + Impossibile collegarsi a %s su questo computer. Probabilmente %s è già in esecuzione. + + Unsupported argument -benchmark ignored, use -debug=bench. Ignorata opzione -benchmark non supportata, utilizzare -debug=bench. @@ -1948,6 +2136,14 @@ Per specificare più URL separarli con una barra verticale "|". Il portamonete %s si trova al di fuori dalla cartella dati %s + Wallet debugging/testing options: + Opzioni di Debug/Test del portafoglio: + + + Wallet needed to be rewritten: restart %s to complete + Il portamonete necessita di essere riscritto: riavviare %s per completare + + Wallet options: Opzioni portamonete: @@ -2016,6 +2212,10 @@ Per specificare più URL separarli con una barra verticale "|". Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso del Toolkit OpenSSL <https://www.openssl.org/>, software crittografico scritto da Eric Young e software UPnP scritto da Thomas Bernard. + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + Usa la generazione gerarchica deterministica (HD) della chiave dopo BIP32. Valido solamente durante la creazione del portafoglio o al primo avvio + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway I peer inclusi in whitelist non possono subire ban per DoS e le loro transazioni saranno sempre trasmesse, anche nel caso in cui si trovino già nel mempool. Ciò è utile ad es. per i gateway @@ -2152,6 +2352,10 @@ Per specificare più URL separarli con una barra verticale "|". Attenzione + Warning: unknown new rules activated (versionbit %i) + Attenzione: nuove regole non conosciute attivate (versionbit %i) + + Whether to operate in a blocks only mode (default: %u) Imposta se operare in modalità solo blocchi (default: %u) @@ -2232,6 +2436,10 @@ Per specificare più URL separarli con una barra verticale "|". Argomento -socks non supportato. Non è più possibile impostare la versione SOCKS, solamente i proxy SOCKS5 sono supportati. + Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. + Argomento non supportato -whitelistalwaysrelay è stato ignorato, utilizzare -whitelistrelay e/o -whitelistforcerelay. + + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) Usa un proxy SOCKS5 a parte per raggiungere i peer attraverso gli hidden services di Tor (predefinito: %s) @@ -2240,6 +2448,14 @@ Per specificare più URL separarli con una barra verticale "|". Username e hash password per connessioni JSON-RPC. Il campo <userpw> utilizza il formato: <USERNAME>:<SALT>$<HASH>. Uno script python standard è incluso in share/rpcuser. Questa opzione può essere specificata più volte + Warning: Unknown block versions being mined! It's possible unknown rules are in effect + Attenzione: si stanno minando versioni sconocsiute di blocchi! E' possibile che siano attive regole sconosciute + + + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + Attenzione: file del Portafoglio corrotto, dati recuperati! %s originale salvato come %s in %s; se il saldo o le transazioni non sono corrette effettua un ripristino da un backup. + + (default: %s) (predefinito: %s) diff --git a/src/qt/locale/bitcoin_it_IT.ts b/src/qt/locale/bitcoin_it_IT.ts index f89f4bdc48d..d17b267ba1b 100644 --- a/src/qt/locale/bitcoin_it_IT.ts +++ b/src/qt/locale/bitcoin_it_IT.ts @@ -103,6 +103,10 @@ RPCConsole + + Ban Node for + Nodo bannato per + ReceiveCoinsDialog diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts index 52f18c118a2..63fb9d681fd 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/bitcoin_ja.ts @@ -1831,6 +1831,10 @@ MITソフトウェアライセンスのもとで配布されています。付属のCOPYINGファイルまたは<http://www.opensource.org/licenses/mit-license.php>を参照してください。 + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + 中継や採掘を行う際のトランザクション内の、sigopあたりバイト数の相当量 (初期値: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet %s の読み込みエラー: 非HDウォレットが既に存在するため、HDウォレットを有効化できません @@ -2056,10 +2060,6 @@ 認証クッキーの場所 (デフォルト: ) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - 中継や採掘を行ってもよい、sigopあたりの最小バイト数 (デフォルト: %u) - - Not enough file descriptors available. 使用可能なファイルディスクリプタが不足しています。 diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts index 012632c0e0a..8aad8df46a7 100644 --- a/src/qt/locale/bitcoin_ko_KR.ts +++ b/src/qt/locale/bitcoin_ko_KR.ts @@ -111,6 +111,14 @@ 어플리케이션 종료 + &About %1 + %1 정보(&A) + + + Show information about %1 + %1 정보를 표시합니다 + + About &Qt &Qt 정보 @@ -123,6 +131,10 @@ 옵션(&O) + Modify configuration options for %1 + %1 설정 옵션 수정 + + &Encrypt Wallet... 지갑 암호화(&E)... @@ -251,6 +263,14 @@ 비트코인 네트워크에 %n개의 연결이 활성화되어 있습니다. + Indexing blocks on disk... + 디스크에서 블록 색인중... + + + Processing blocks on disk... + 디스크에서 블록 처리중... + + No block source available... 사용 가능한 블록이 없습니다... @@ -307,6 +327,14 @@ 현재까지 + Show the %1 help message to get a list with possible Bitcoin command-line options + 사용할 수 있는 비트코인 명령줄 옵션 목록을 가져오기 위해 %1 도움말 메시지를 표시합니다. + + + %1 client + %1 클라이언트 + + Catching up... 블록 따라잡기... @@ -493,6 +521,10 @@ (%1-비트) + About %1 + %1 정보(&A) + + Command-line options 명령줄 옵션 @@ -528,7 +560,11 @@ Show splash screen on startup (default: %u) 실행시 시작화면 보기 (기본값: %u) - + + Reset all settings changed in the GUI + GUI를 통해 수정된 모든 설정을 초기화 + + Intro @@ -536,6 +572,18 @@ 환영합니다 + Welcome to %1. + %1에 오신것을 환영합니다. + + + As this is the first time the program is launched, you can choose where %1 will store its data. + 프로그램이 처음으로 실행되고 있습니다. %1가 어디에 데이터를 저장할지 선택할 수 있습니다. + + + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1가 블럭체인의 복사본을 다운로드 저장합니다. 적어도 %2GB의 데이터가 이 폴더에 저장되며 시간이 경과할수록 점차 증가합니다. 그리고 지갑 또한 이 폴더에 저장됩니다. + + Use the default data directory 기본 데이터 폴더를 사용하기 @@ -590,6 +638,14 @@ 메인(&M) + Automatically start %1 after logging in to the system. + 시스템 로그인후에 %1을 자동으로 시작합니다. + + + &Start %1 on system login + 시스템 로그인시 %1 시작(&S) + + Size of &database cache 데이터베이스 캐시 크기(&D) @@ -691,7 +747,7 @@ Port of the proxy (e.g. 9050) - 프록시의 포트번호입니다(예: 9050) + 프록시의 포트번호입니다 (예: 9050) Used for reaching peers via: @@ -726,6 +782,14 @@ 창(&W) + &Hide the icon from the system tray. + 시스템 트레이 로 부터 아이콘 숨기기(&H) + + + Hide tray icon + 트레이 아이콘 숨기기 + + Show only a tray icon after minimizing the window. 창을 최소화 하면 트레이에 아이콘만 표시합니다. @@ -746,6 +810,10 @@ 사용자 인터페이스 언어(&L): + The user interface language can be set here. This setting will take effect after restarting %1. + 사용자 인터페이스 언어를 여기서 설정할 수 있습니다. 이 설정은 %1을 다시 시작할때 적용됩니다. + + &Unit to show amounts in: 거래액을 표시할 단위(&U): @@ -950,6 +1018,10 @@ 사용 중인 BerkeleyDB 버전 + Datadir + 데이터 폴더 + + Startup time 시작 시간 @@ -1034,6 +1106,18 @@ 유저 에이전트 + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. + %1 디버그 로그파일을 현재 데이터 폴더에서 엽니다. 용량이 큰 로그 파일들은 몇 초가 걸릴 수 있습니다. + + + Decrease font size + 글자 크기 축소 + + + Increase font size + 글자 크기 확대 + + Services 서비스 @@ -1138,6 +1222,10 @@ 노드 추방 취소(&U) + Welcome to the %1 RPC console. + %1 RPC 콘솔에 오신걸 환영합니다 + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. 기록을 찾아보려면 위 아래 화살표 키를, 화면을 지우려면 <b>Ctrl-L</b>키를 사용하십시오. @@ -1443,11 +1531,11 @@ Pay &To: - 송금할 대상(&T) : + 송금할 대상(&T): &Label: - 라벨(&L) + 라벨(&L): Choose previously used address @@ -1507,7 +1595,7 @@ Pay To: - 송금할 대상 : + 송금할 대상: Memo: @@ -1517,6 +1605,10 @@ ShutdownWindow + %1 is shutting down... + %1이 종료 중입니다... + + Do not shut down the computer until this window disappears. 창이 사라지기 전까지 컴퓨터를 끄지마시오. @@ -1707,6 +1799,10 @@ 비트코인 코어 + The %s developers + %s 코어 개발자 + + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. -fallbackfee은 너무 높습니다! 이것은 수수료 예측을 이용할 수 없을 때 지불되는 트랜잭션 수수료입니다. @@ -1723,6 +1819,10 @@ 선택된 주소로 고정하며 항상 리슨(Listen)합니다. IPv6 프로토콜인 경우 [host]:port 방식의 명령어 표기법을 사용합니다. + Cannot obtain a lock on data directory %s. %s is probably already running. + %s 데이터 디렉토리에 락을 걸 수 없었습니다. %s가 이미 실행 중인 것으로 보입니다. + + Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup 시작시 모든 지갑 트랜잭션을 삭제하고 -rescan을 통하여 블록체인만 복구합니다. @@ -1731,6 +1831,14 @@ MIT 소프트웨어 라이센스에 따라 배포됩니다. 동봉된 파일 혹은 <http://www.opensource.org/licenses/mit-license.php>를 참조하세요. + Error loading %s: You can't enable HD on a already existing non-HD wallet + %s 불러오기 오류: 비-HD 지갑이 존재하는 상태에서 HD 지갑을 활성화 할 수 없습니다 + + + Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + %s 불러오기 오류: 주소 키는 모두 정확하게 로드되었으나 거래 데이터와 주소록 필드에서 누락이나 오류가 존재할 수 있습니다. + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) 지갑 거래가 바뀌면 명령을 실행합니다.(%s 안의 명령어가 TxID로 바뀝니다) @@ -1739,6 +1847,18 @@ 피어들이 로컬 중계 정책을 위반하더라도 화이트 리스트에 포함된 피어인경우 강제로 중계하기 (기본값: %d) + Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) + 하나의 지갑 트랜잭션에서의 총 수수료(%s)의 최대치; 너무 낮게 설정하면 큰 트랜잭션이 중지 됩니다 (기본값: %s) + + + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. + 컴퓨터의 날짜와 시간이 올바른지 확인하십시오! 시간이 잘못되면 %s은 제대로 동작하지 않습니다. + + + Please contribute if you find %s useful. Visit %s for further information about the software. + %s가 유용하다고 생각한다면 프로젝트에 공헌해주세요. 이 소프트웨어에 대한 보다 자세한 정보는 %s를 방문해주십시오. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) 스크립트 인증 스레드의 갯수 설정 (%u-%d, 0 = 자동, <0 = 지정된 코어 개수만큼 사용 안함, 기본값: %d) @@ -1751,6 +1871,10 @@ 이 빌드 버전은 정식 출시 전 테스트의 목적이며, 예기치 않은 위험과 오류가 발생할 수 있습니다. 채굴과 상점용 소프트웨어로 사용하는 것을 권하지 않습니다. + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + 데이터베이스를 포크 전 상태로 돌리지 못했습니다. 블록체인을 다시 다운로드 해주십시오. + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) 리슨(Listen) 포트를 할당하기 위해 UPnP 사용 (기본값: 열려있거나 -proxy 옵션을 사용하지 않을 시 1) @@ -1767,6 +1891,14 @@ 설정된 넷마스크 혹은 IP 주소로 화이트리스트에 포함된 피어에 접속합니다. 이 설정은 복수로 지정 할 수 있습니다. + You need to rebuild the database using -reindex-chainstate to change -txindex + -txindex를 바꾸기 위해서는 -reindex-chainstate를 사용해서 데이터베이스를 재구성해야 합니다. + + + %s corrupt, salvage failed + %s 손상되었고 복구가 실패하였습니다 + + -maxmempool must be at least %d MB -maxmempool은 최소한 %d MB가 필요합니다 @@ -1779,10 +1911,18 @@ 사용자 에이전트 문자열에 코멘트 첨부 + Attempt to recover private keys from a corrupt wallet on startup + 시작시 망가진 wallet.dat에서 개인키 복원을 시도합니다 + + Block creation options: 블록 생성 옵션: + Cannot resolve -%s address: '%s' + %s 주소를 확인할 수 없습니다: '%s' + + Connect only to the specified node(s) 지정된 노드에만 연결하기 @@ -1791,6 +1931,10 @@ 연결 설정 : + Copyright (C) %i-%i + Copyright (C) %i-%i + + Corrupted block database detected 손상된 블록 데이터베이스가 감지되었습니다 @@ -1835,6 +1979,22 @@ 지갑 데이터베이스 환경 초기화하는데 오류 %s + Error loading %s + %s 불러오기 오류 + + + Error loading %s: Wallet corrupted + %s 불러오기 오류: 지갑 오류 + + + Error loading %s: Wallet requires newer version of %s + %s 불러오기 에러: 지갑은 새 버전의 %s이 필요합니다 + + + Error loading %s: You can't disable HD on a already existing HD wallet + %s 불러오기 오류: 이미 HD 지갑이 존재하는 상태에서 HD 지갑을 비활성화 할 수 없습니다 + + Error loading block database 블록 데이터베이스를 불러오는데 오류 @@ -1859,10 +2019,18 @@ 올바르지 않거나 생성된 블록을 찾을 수 없습니다. 잘못된 네트워크 자료 디렉토리? + Initialization sanity check failed. %s is shutting down. + 무결성 확인 초기화가 실패했습니다. %s가 종료됩니다. + + Invalid -onion address: '%s' 잘못된 -onion 주소입니다: '%s' + Invalid amount for -%s=<amount>: '%s' + 유효하지 않은 금액 -%s=<amount>: '%s' + + Invalid amount for -fallbackfee=<amount>: '%s' 유효하지 않은 금액 -fallbackfee=<amount>: '%s' @@ -1871,12 +2039,12 @@ 트랜잭션 메모리 풀의 용량을 <n>메가바이트 아래로 유지하기 (기본값: %u) - Location of the auth cookie (default: data dir) - 인증 쿠키의 위치 (기본값: data dir) + Loading banlist... + 추방리스트를 불러오는 중... - Minimum bytes per sigop in transactions we relay and mine (default: %u) - 중계 및 채굴을 할 때 트랜잭션에서의 sigop 당 데이터의 최소 크기 (기본값: %u) + Location of the auth cookie (default: data dir) + 인증 쿠키의 위치 (기본값: data dir) Not enough file descriptors available. @@ -1887,6 +2055,10 @@ 오직 <net> 네트워크로 로만 접속 (IPv4, IPv6 혹은 onion) + Print this help message and exit + 도움말 메시지 출력 후 종료 + + Print version and exit 버전 출력후 종료 @@ -1899,6 +2071,18 @@ 블록 축소 모드는 -txindex와 호환되지 않습니다. + Rebuild chain state and block index from the blk*.dat files on disk + 현재의 blk*.dat 파일들로부터 블록체인 색인을 재구성합니다. + + + Rebuild chain state from the currently indexed blocks + 현재 색인 된 블록들로부터 블록체인을 재구성합니다. + + + Rewinding blocks... + 블록 되감는중... + + Set database cache size in megabytes (%d to %d, default: %d) 데이터베이스 케시 크기를 메가바이트로 설정(%d 부터 %d, 기본값: %d) @@ -1911,6 +2095,14 @@ 데이터 폴더 안에 지갑 파일을 선택하세요. + The source code is available from %s. + 소스코드는 %s 에서 확인하실 수 있습니다. + + + Unable to bind to %s on this computer. %s is probably already running. + 이 컴퓨터의 %s에 바인딩 할 수 없습니다. 아마도 %s이 실행중인 것 같습니다. + + Unsupported argument -benchmark ignored, use -debug=bench. 지원하지 않는 인수 -benchmark 은 무시됩니다, -debug=bench 형태로 사용하세요. @@ -1947,6 +2139,10 @@ 지갑 디버깅/테스트 옵션: + Wallet needed to be rewritten: restart %s to complete + 지갑을 새로 써야 합니다: 완성하기 위하여 %s을 다시 시작하십시오. + + Wallet options: 지갑 옵션: @@ -2247,6 +2443,10 @@ 경고: 알려지지 않은 버전의 블록이 채굴되었습니다. 알려지지 않은 규칙이 적용되었을 가능성이 있습니다. + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + 경고 : 지갑파일이 손상되어 데이터가 복구되었습니다. 원래의 %s 파일은 %s 후에 %s 이름으로 저장됩니다. 잔액과 거래 내역이 정확하지 않다면 백업 파일로 부터 복원해야 합니다. + + Always query for peer addresses via DNS lookup (default: %u) DNS lookup을 통해 항상 피어주소에 대한 쿼리 보내기 (기본값: %u) diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts index 4d270a6ef10..7ec8c36d9bc 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/bitcoin_nb.ts @@ -115,6 +115,10 @@ &Om %1 + Show information about %1 + Vis informasjon om %1 + + About &Qt Om &Qt @@ -127,6 +131,10 @@ &Innstillinger... + Modify configuration options for %1 + Endre innstilinger for %1 + + &Encrypt Wallet... &Krypter Lommebok... @@ -742,6 +750,10 @@ &Vindu + Hide tray icon + Skjul søppel ikon + + Show only a tray icon after minimizing the window. Vis kun ikon i systemkurv etter minimering av vinduet. @@ -1050,6 +1062,14 @@ Brukeragent + Decrease font size + Forminsk font størrelsen + + + Increase font size + Forstørr font størrelse + + Services Tjenester @@ -1827,6 +1847,10 @@ Feil under oppstart av lommeboken sitt databasemiljø %s! + Error loading %s + Feil ved lasting av %s + + Error loading block database Feil ved lasting av blokkdatabase @@ -1867,6 +1891,14 @@ Bare koble til noder i nettverket <net> (IPv4, IPv6 eller onion) + Print this help message and exit + Skriv ut denne hjelpemeldingen og avslutt + + + Print version and exit + Skriv ut denne versjonen og avslutt + + Prune cannot be configured with a negative value. Beskjæringsmodus kan ikke konfigureres med en negativ verdi. @@ -1887,6 +1919,10 @@ Angi lommebokfil (inne i datamappe) + The source code is available from %s. + Kildekoden er tilgjengelig fra %s. + + Unsupported argument -benchmark ignored, use -debug=bench. Ustøttet argument -benchmark ble ignorert, bruk -debug=bench. diff --git a/src/qt/locale/bitcoin_ne.ts b/src/qt/locale/bitcoin_ne.ts new file mode 100644 index 00000000000..6ffde979f15 --- /dev/null +++ b/src/qt/locale/bitcoin_ne.ts @@ -0,0 +1,548 @@ + + + AddressBookPage + + Right-click to edit address or label + ठेगाना वा लेबल सम्पादन गर्न दायाँ-क्लिक गर्नुहोस् + + + Create a new address + नयाँ ठेगाना सिर्जना गर्नुहोस् + + + &New + &amp;नयाँ + + + Copy the currently selected address to the system clipboard + भर्खरै चयन गरेको ठेगाना प्रणाली क्लिपबोर्डमा कपी गर्नुहोस् + + + &Copy + &amp;कपी गर्नुहोस् + + + C&lose + बन्द गर्नुहोस् + + + Delete the currently selected address from the list + भर्खरै चयन गरेको ठेगाना सूचीबाट मेटाउनुहोस् + + + Export the data in the current tab to a file + वर्तमान ट्याबको डाटालाई फाइलमा निर्यात गर्नुहोस् + + + &Export + &amp;निर्यात गर्नुहोस् + + + &Delete + &amp;मेटाउनुहोस् + + + + AskPassphraseDialog + + Passphrase Dialog + पासफ्रेज संवाद + + + Enter passphrase + पासफ्रेज प्रवेश गर्नुहोस् + + + New passphrase + नयाँ पासफ्रेज + + + Repeat new passphrase + नयाँ पासफ्रेज दोहोर्याउनुहोस् + + + + BanTableModel + + IP/Netmask + IP/नेटमास्क + + + Banned Until + प्रतिबन्धित समय + + + + BitcoinGUI + + Sign &message... + सन्देशमा &amp;हस्ताक्षर गर्नुहोस्... + + + Synchronizing with network... + नेटवर्कमा समिकरण हुँदै... + + + &Overview + शारांश + + + Node + नोड + + + Show general overview of wallet + वालेटको साधारण शारांश देखाउनुहोस् + + + &Transactions + &amp;कारोबार + + + Browse transaction history + कारोबारको इतिहास हेर्नुहोस् + + + E&xit + बाहिर निस्कनुहोस् + + + Quit application + एप्लिकेसन बन्द गर्नुहोस् + + + &About %1 + &amp;बारेमा %1 + + + Show information about %1 + %1 को बारेमा सूचना देखाउनुहोस् + + + About &Qt + &amp;Qt + + + Show information about Qt + Qt को बारेमा सूचना देखाउनुहोस् + + + &Options... + &amp;विकल्प... + + + Modify configuration options for %1 + %1 का लागि कन्फिगुरेसनको विकल्प परिमार्जन गर्नुहोस + + + &Encrypt Wallet... + &amp;वालेटलाई इन्क्रिप्ट गर्नुहोस्... + + + &Backup Wallet... + &amp;वालेटलाई ब्याकअप गर्नुहोस्... + + + &Change Passphrase... + &amp;पासफ्रेज परिवर्तन गर्नुहोस्... + + + &Sending addresses... + &amp;पठाउने ठेगानाहरू... + + + &Receiving addresses... + &amp;प्राप्त गर्ने ठेगानाहरू... + + + Open &URI... + URI &amp;खोल्नुहोस्... + + + Reindexing blocks on disk... + डिस्कमा ब्लकलाई पुनः सूचीकरण गरिँदै... + + + Send coins to a Bitcoin address + बिटकोइन ठेगानामा सिक्का पठाउनुहोस् + + + Backup wallet to another location + वालेटलाई अर्को ठेगानामा ब्याकअप गर्नुहोस् + + + Change the passphrase used for wallet encryption + वालेट इन्क्रिप्सनमा प्रयोग हुने इन्क्रिप्सन पासफ्रेज परिवर्तन गर्नुहोस् + + + &Debug window + &amp;डिबग विन्डो + + + Open debugging and diagnostic console + डिबगिङ र डायाग्नोस्टिक कन्सोल खोल्नुहोस् + + + + CoinControlDialog + + Amount + रकम + + + + EditAddressDialog + + + FreespaceChecker + + + HelpMessageDialog + + + Intro + + + OpenURIDialog + + + OptionsDialog + + + OverviewPage + + 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. + देखाइएको सूचना पूरानो हुन सक्छ । कनेक्सन स्थापित भएपछि, तपाईंको वालेट बिटकोइन नेटवर्कमा स्वचालित रूपमा समिकरण हुन्छ , तर यो प्रक्रिया अहिले सम्म पूरा भएको छैन । + + + Watch-only: + हेर्ने-मात्र: + + + Available: + उपलब्ध: + + + Your current spendable balance + तपाईंको खर्च गर्न मिल्ने ब्यालेन्स + + + Pending: + विचाराधिन: + + + Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance + अझै पुष्टि हुन बाँकी र खर्च गर्न मिल्ने ब्यालेन्समा गणना गर्न नमिल्ने जम्मा कारोबार + + + Immature: + अपरिपक्व: + + + Mined balance that has not yet matured + अझै परिपक्व नभएको खनन गरिएको ब्यालेन्स + + + Balances + ब्यालेन्स + + + Mined balance in watch-only addresses that has not yet matured + अहिलेसम्म परिपक्व नभएको खनन गरिएको, हेर्ने-मात्र ठेगानामा रहेको ब्यालेन्स + + + Current total balance in watch-only addresses + हेर्ने-मात्र ठेगानामा रहेको हालको जम्मा ब्यालेन्स + + + + PeerTableModel + + User Agent + प्रयोगकर्ता एजेन्ट + + + Node/Service + नोड/सेव + + + Ping Time + पिङ समय + + + + QObject + + Amount + रकम + + + + RPCConsole + + User Agent + प्रयोगकर्ता एजेन्ट + + + Ping Time + पिङ समय + + + + ReceiveCoinsDialog + + + ReceiveRequestDialog + + + SendCoinsDialog + + + SendCoinsEntry + + The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. + पठाइँदै गरेको रकमबाट शुल्क कटौती गरिनेछ । प्राप्तकर्ताले तपाईंले रकम क्षेत्रमा प्रवेष गरेको भन्दा थोरै बिटकोइन प्राप्त गर्ने छन् । धेरै प्राप्तकर्ता चयन गरिएको छ भने समान रूपमा शुल्क विभाजित गरिनेछ । + + + A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. + बिटकोइनमा संलग्न गरिएको सन्देश: तपाईंको मध्यस्थको लागि कारोबारको साथमा भण्डारण गरिने URI । नोट: यो सन्देश बिटकोइन नेटवर्क मार्फत पठाइने छैन । + + + + ShutdownWindow + + + SignVerifyMessageDialog + + You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. + आफ्नो ठेगानामा पठाइएको बिटकोइन प्राप्त गर्न सकिन्छ भनेर प्रमाणित गर्न तपाईंले ती ठेगानाले सन्देश/सम्झौताहरूमा हस्ताक्षर गर्न सक्नुहुन्छ । फिसिङ आक्रमणले तपाईंलाई छक्याएर अरूका लागि तपाईंको परिचयमा हस्ताक्षर गराउने प्रयास गर्न सक्ने भएकाले अस्पष्ट वा जथाभावीमा हस्ताक्षर गर्दा ध्यान दिनुहोस् । आफू सहमत भएको पूर्ण विस्तृत-कथनमा मात्र हस्ताक्षर गर्नुहोस् । + + + + SplashScreen + + + TrafficGraphWidget + + + TransactionDescDialog + + + UnitDisplayStatusBarControl + + + bitcoin-core + + The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct + ब्लक डाटाबेसमा भविष्यबाट आए जस्तो देखिने एउटा ब्लक हुन्छ । तपाईंको कम्प्युटरको मिति र समय गलत तरिकाले सेट गरिएकाले यस्तो हुन सक्छ । तपाईं आफ्नो कम्प्युटरको मिति र समय सही छ भनेर पक्का हुनुहुन्छ भने मात्र ब्लक डाटाबेस पुनर्निर्माण गर्नुहोस् । + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + यो जारी गर्नु पूर्वको परीक्षण संस्करण हो - आफ्नै जोखिममा प्रयोग गर्नुहोस् - खनन वा व्यापारीक प्रयोगको लागि प्रयोग नगर्नुहोस + + + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + प्रि-फर्क अवस्थामा डाटाबेस रिवाइन्ड गर्न सकिएन । तपाईंले फेरि ब्लकचेन डाउनलोड गर्नु पर्ने हुन्छ + + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) + UPnP प्रयोग गरेर सुन्ने पोर्टलाई म्याप गर्नुहोस् (सुन्दा र -प्रोक्सी नहुँदा डिफल्ट: 1) + + + Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. + चेतावनी: नेटवर्क पूरै तरिकाले सहमत छैन जस्तो देखिन्छ! केही खननकर्ताहरूले समस्या भोगिरहेका छन् जस्तो देखिन्छ । + + + Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. + चेतावनी: हामी हाम्रा सहकर्मीहरूसँग पूर्णतया सहमत छैनौं जस्तो देखिन्छ! तपाईंले अपग्रेड गर्नु पर्ने हुनसक्छ वा अरू नोडहरूले अपग्रेड गर्नु पर्ने हुनसक्छ । + + + Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. + दिइएको नेटमास्क वा ठेगानाबाट कनेक्ट भइरहेका श्वेतसूचीका सहकर्मी । + + + You need to rebuild the database using -reindex-chainstate to change -txindex + तपाईंले -चेनस्टेट-पुनः सूचकांकबाट -txindex परिवर्तन प्रयोग गरेर डाटाबेस पुनर्निर्माण गर्नु आवश्यक छ + + + %s corrupt, salvage failed + %s मा क्षति, बचाव विफल भयो + + + -maxmempool must be at least %d MB + -maxmempool कम्तिमा %d MB को हुनुपर्छ । + + + <category> can be: + &lt;वर्ग&gt; निम्न आकारको हुनसक्छ: + + + Append comment to the user agent string + प्रयोगकर्ता एजेन्ट स्ट्रिङमा टिप्पणी जोड्नुहोस् + + + Attempt to recover private keys from a corrupt wallet on startup + स्टार्टअपमा क्षति पूगेको वालेटबाट निजी की प्राप्त गर्न प्रयास गर्नुहोस् + + + Block creation options: + ब्लक सिर्जनाको बिकल्प: + + + Cannot resolve -%s address: '%s' + -%s ठेगाना: &apos;%s&apos; निश्चय गर्न सकिँदैन + + + Change index out of range + सूचकांक परिवर्तन सीमा भन्दा बाहर + + + Connect only to the specified node(s) + उल्लेख गरिएको नोड (हरू) मात्र कनेक्ट गर्नुहोस + + + Connection options: + कनेक्सनको विकल्प: + + + Copyright (C) %i-%i + सर्वाधिकार (C) %i-%i + + + Corrupted block database detected + क्षति पुगेको ब्लक डाटाबेस फेला पर + + + Debugging/Testing options: + डिबगिङ/परीक्षणका विकल्पहरू: + + + Do not load the wallet and disable wallet RPC calls + वालेट लोड नगर्नुहोस् र वालेट RPC कलहरू अक्षम गर्नुहोस् + + + Do you want to rebuild the block database now? + तपाईं अहिले ब्लक डेटाबेस पुनर्निर्माण गर्न चाहनुहुन्छ ? + + + Unable to bind to %s on this computer. %s is probably already running. + यो कम्प्युटरको %s मा बाँध्न सकिएन । %s सम्भवित रूपमा पहिलैबाट चलिरहेको छ । + + + Unsupported argument -benchmark ignored, use -debug=bench. + असमर्थित तर्क -बेन्चमार्कलाई बेवास्ता गरियो, -डिबग=बेन्च प्रयोग गर्नुहोस् । + + + Unsupported argument -debugnet ignored, use -debug=net. + असमर्थित तर्क -डिबगनेटलाई बेवास्ता गरियो, -डिबग=नेट प्रयोग गर्नुहोस् । + + + Unsupported argument -tor found, use -onion. + असमर्थित तर्क -टोर फेला पर्यो, -ओनियन प्रयोग गर्नुहोस् । + + + Use UPnP to map the listening port (default: %u) + UPnP प्रयोग गरेर सुन्ने पोर्ट म्याप गर्नुहोस् (डिफल्ट: %u) + + + Verifying blocks... + ब्लक प्रमाणित गरिँदै... + + + Verifying wallet... + वालेट प्रमाणित गरिँदै... + + + Wallet %s resides outside data directory %s + वालेट %s डाटा निर्देशिका %s बाहिरमा बस्छ + + + Wallet debugging/testing options: + वालेट डिबगिङ/परीक्षणका विकल्पहरू: + + + Wallet needed to be rewritten: restart %s to complete + वालेट फेरि लेख्नु आवश्यक छ: पूरा गर्न %s लाई पुन: सुरु गर्नुहोस् + + + Wallet options: + वालेटका विकल्पहरू: + + + Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times + निर्दिष्ट गरिएको स्रोतबाट आएको JSON-RPC कनेक्सनलाई अनुमति दिनुहोस् । एकल IP (e.g. 1.2.3.4), नेटवर्क/नेटमास्क (उदाहरण 1.2.3.4/255.255.255.0) वा नेटवर्क/CIDR (उदाहरण 1.2.3.4/24) &lt;ip&gt; का लागि मान्य छन् । यो विकल्पलाई धेरै पटक निर्दिष्ट गर्न सकिन्छ + + + Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 + दिइएको ठेगानामा बाँध्नुहोस् र यसमा कनेक्ट गर्ने सहकर्मीलाई श्वेतसूचीमा राख्नुहोस् । IPv6 लागि [होस्ट]:पोर्ट संकेतन प्रयोग गर्नुहोस् + + + Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces) + JSON-RPC कनेक्सन सुन्नको लागि दिइएको ठेगानामा बाँध्नुहोस् । IPv6 लागि [होस्ट]:पोर्ट संकेतन प्रयोग गर्नुहोस् । यो विकल्पलाई धेरै पटक निर्दिष्ट गर्न सकिन्छ (डिफल्ट: सबै इन्टरफेसमा बाँध्नुहोस्) + + + Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) + umask 077 को सट्टामा प्रणालीको डिफल्ट अनुमतिको साथमा नयाँ फाइलहरू सिर्जना गर्नुहोस् । (असक्षम गरिएको वालेट कार्यक्षमतामा मात्र प्रभावकारी हुने) + + + Discover own IP addresses (default: 1 when listening and no -externalip or -proxy) + आफ्नै IP ठेगाना पत्ता लगाउनुहोस् (सुन्दा र -बाहिरीआइपी वा -प्रोक्सी नहुँदा डिफल्ट: 1 ) + + + Error: Listening for incoming connections failed (listen returned error %s) + त्रुटि: आगमन कनेक्सनमा सुन्ने कार्य असफल भयो (सुन्ने कार्यले त्रुटि %s फर्कायो) + + + Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) + सान्दर्भिक चेतावनी प्राप्त गर्दा आदेश कार्यान्वयन गर्नुहोस् नभए धेरै लामो फोर्क देखा पर्न सक्छ । (cmd को %s लाई सन्देशले प्रतिस्थापन गर्छ) + + + Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s) + रिले, खनन वा कारोबारको सिर्जनाको लागि यो भन्दा कम शुल्क (%s/kB मा) लाई शून्य शुल्कको रूपमा लिइन्छ । (डिफल्ट: %s) + + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) + paytxfee सेट गरिएको छैन भने, औसतमा n ब्लक भित्र कारोबार पुष्टिकरण सुरु होस् भन्नका लागि पर्याप्त शुल्क समावेश गर्नुहोस् (डिफल्ट: %u) + + + Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions) + maxtxfee=&lt;रकम&gt;: का लागि अमान्य रकम &apos;%s&apos; (कारोबारलाई अड्कन नदिन अनिवार्य रूपमा कम्तिमा %s को न्यूनतम रिले शुल्क हुनु पर्छ) + + + Maximum size of data in data carrier transactions we relay and mine (default: %u) + हामीले रिले र खनन गर्ने डाटा वाहक कारोबारको डाटाको अधिकतम आकार (डिफल्ट: %u) + + + Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect) + यदि ठेगाना कम भएमा, DNS लुकअप मार्फत सहकर्मी ठेगानाको जाँच गर्नुहोस (डिफल्ट: 1 सिवाय -कनेक्ट) + + + Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u) + हरेक प्रोक्सी कनेक्सनका लागि क्रेडिन्सियल अनियमित बनाउनुहोस् । यसले टोर स्ट्रिमको अलगावलाई सक्षम पार्छ (डिफल्ट: %u) + + + Set maximum size of high-priority/low-fee transactions in bytes (default: %d) + बाइटमा उच्च-प्राथमिकता/कम शुल्कको कारोबारको अधिकतम आकार सेट गर्नुहोस् (डिफल्ट: %d) + + + The transaction amount is too small to send after the fee has been deducted + कारोबार रकम शुल्क कटौती गरेपछि पठाउँदा धेरै नै सानो हुन्छ + + + This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard. + यो उत्पादन ले OpenSSL टुलकिट <https://www.openssl.org/> को प्रयोगको लागि OpenSSL परियोजनाले विकास गरेको सफ्टवेयर, एरिक यंग द्वारा लिखित क्रिप्टोग्राफिक सफ्टवेयर र थमस बर्नार्डद्वारा लिखित UPnP सफ्टवेयरलाई समावेश गर्छ । + + + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + BIP32 पछि पदानुक्रमित निर्धारक की सिर्जना (HD) प्रयोग गर्नुहोस् ।. केवल वालेट सिर्जना/पहिलो सुरुवातको समयमा प्रभाव पार्छ + + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway + श्वेतसूचीका सहकर्मी पहिलैबाट मेमपूल, उपयोगीमा भए पनि उनीहरूलाई DoS banned गर्न सकिँदैन र उनीहरूको कारोबार सधैं रिले हुन्छ, उदाहरण, गेटवेको लाग + + + You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain + तपाईंले काटछाँट नगरेको मोडमा जान पुनः सूचकांक प्रयोग गरेर डाटाबेस पुनर्निर्माण गर्नु पर्ने हुन्छ । यसले सम्पूर्ण ब्लकचेनलाई फेरि डाउनलोड गर्नेछ + + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts index 6fe1acfbbef..80de2103cb8 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/bitcoin_nl.ts @@ -1827,6 +1827,14 @@ Uitgegeven onder de MIT-softwarelicentie, zie het bijgevoegde bestand COPYING of <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Equivalent byter per sigop in transactions voor doorsturen en mijnen (standaard: %u) + + + Error loading %s: You can't enable HD on a already existing non-HD wallet + Fout bij het laden van %s: Je kan HD niet activeren voor een reeds bestaande niet-HD portemonnee + + Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect. Waarschuwing: Fout bij het lezen van %s! Alle sleutels zijn in goede orde uitgelezen, maar transactiedata of adresboeklemma's zouden kunnen ontbreken of fouten bevatten. @@ -1851,6 +1859,10 @@ Waarschuwing: Controleer dat de datum en tijd van uw computer correct zijn ingesteld! Bij een onjuist ingestelde klok zal %s niet goed werken. + Please contribute if you find %s useful. Visit %s for further information about the software. + Gelieve bij te dragen als je %s nuttig vindt. Bezoek %s voor meer informatie over de software. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Kies het aantal scriptverificatie processen (%u tot %d, 0 = auto, <0 = laat dit aantal kernen vrij, standaard: %d) @@ -1860,7 +1872,11 @@ This is a pre-release test build - use at your own risk - do not use for mining or merchant applications - Dit is een prerelease testversie – gebruik op eigen risico! Gebruik deze niet voor het delven van munten of handelsdoeleinden + Dit is een prerelease testversie – gebruik op eigen risico! Gebruik deze niet voor mijnen of handelsdoeleinden + + + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + Niet mogelijk om de databank terug te draaien naar een staat voor de vork. Je zal je blokketen opnieuw moeten downloaden Use UPnP to map the listening port (default: 1 when listening and no -proxy) @@ -1979,6 +1995,10 @@ Fout bij laden %s: Portemonnee vereist een nieuwere versie van %s + Error loading %s: You can't disable HD on a already existing HD wallet + Fout bij het laden van %s: Je kan HD niet deactiveren voor een reeds bestaande HD portemonnee + + Error loading block database Fout bij het laden van blokkendatabase @@ -2031,10 +2051,6 @@ Locatie van de auth cookie (standaard: data dir) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Minimum aantal bytes dat er per sigop in een transactie gerelayed en gemined worden (standaard: %u) - - Not enough file descriptors available. Niet genoeg file descriptors beschikbaar. @@ -2067,10 +2083,18 @@ Herbouw ketenstaat vanuit de huidige geindexeerde blokken + Rewinding blocks... + Blokken aan het terugdraaien... + + Set database cache size in megabytes (%d to %d, default: %d) Zet database cache grootte in megabytes (%d tot %d, standaard: %d) + Set maximum BIP141 block weight (default: %d) + Zet het BIP141 maximum gewicht van een blok (standaard: %d) + + Set maximum block size in bytes (default: %d) Stel maximum blokgrootte in in bytes (standaard: %d) @@ -2079,6 +2103,10 @@ Specificeer het portemonnee bestand (vanuit de gegevensmap) + The source code is available from %s. + De broncode is beschikbaar van %s. + + Unable to bind to %s on this computer. %s is probably already running. Niet in staat om %s te verbinden op deze computer. %s draait waarschijnlijk al. @@ -2191,12 +2219,16 @@ Dit product bevat software dat ontwikkeld is door het OpenSSL Project voor gebruik in de OpenSSL Toolkit <https://www.openssl.org/> en cryptografische software geschreven door Eric Young en UPnP software geschreven door Thomas Bernard. + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + Gebruik hiërarchische deterministische sleutelgeneratie (HD) na BIP32. Dit heeft enkel effect bij het aanmaken van portemonnees of het eerste gebruik + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway Goedgekeurde peers kunnen niet ge-DoS-banned worden en hun transacties worden altijd doorgegeven, zelfs als ze reeds in de mempool aanwezig zijn, nuttig voor bijv. een gateway You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain - U moet de database herbouwen met -reindex om terug te gaan naar de ongesnoeide modus. Dit zal de gehele blokkketen opnieuw downloaden. + U moet de database herbouwen met -reindex om terug te gaan naar de ongesnoeide modus. Dit zal de gehele blokketen opnieuw downloaden. (default: %u) diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts index 929f38a5b5b..b902e69f560 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/bitcoin_pl.ts @@ -1872,6 +1872,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw <category> mogą być: + Append comment to the user agent string + Dodaj komentarz do pola user agent + + Attempt to recover private keys from a corrupt wallet on startup Próbuj odzyskać klucze prywatne z uszkodzonego portfela podczas uruchamiania. diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index bc7ee034d56..12da991addd 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -332,7 +332,7 @@ %1 client - cliente %1 + %1 Catching up... @@ -643,7 +643,7 @@ &Start %1 on system login - $Iniciar %1 ao fazer login no sistema + &Iniciar %1 ao fazer login no sistema Size of &database cache @@ -1752,11 +1752,11 @@ Prune configured below the minimum of %d MiB. Please use a higher number. - Corte configurado abaixo do nível mínimo de %d de MiB. Por favor use um número mais alto. + Prune configurado abaixo do mínimo de %d MiB. Por favor use um número mais alto. Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node) - Corte: a ultima sincronização da carteira foi além do dado comprimido. Você precisa reindexar ( -reindex , faça o download de toda a blockchain novamente) + Prune: A ultima sincronização da carteira foi além do dado comprimido. Você precisa reindexar (fazer o download de toda a blockchain novamente) Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files) @@ -1764,7 +1764,7 @@ Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. - Rescans não são possíveis no modo de corte. Você precisa usar -reindex, que irá fazer o download de toda a blockchain novamente. + Rescans não são possíveis no modo prune. Você precisa usar -reindex, que irá fazer o download de toda a blockchain novamente. Error: A fatal internal error occurred, see debug.log for details @@ -1792,7 +1792,7 @@ Bitcoin Core - Bitcoin + Bitcoin Core -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. @@ -1887,6 +1887,10 @@ Lista Branca pares de ligação da máscara de rede dado ou o endereço IP . Pode ser especificado várias vezes. + You need to rebuild the database using -reindex-chainstate to change -txindex + Você precisa reconstruir o banco de dados utilizando -reindex-chainstate para mudar -txindex + + %s corrupt, salvage failed %s corrompido, recuperação falhou @@ -1911,6 +1915,10 @@ Opções de criação de blocos: + Cannot resolve -%s address: '%s' + Impossível resolver -%s endereço: '%s' + + Connect only to the specified node(s) Conectar apenas a cliente(s) específico(s) @@ -2007,6 +2015,10 @@ Bloco gênese incorreto ou não encontrado. Datadir errado para a rede? + Initialization sanity check failed. %s is shutting down. + O teste de integridade de inicialização falhou. O %s está sendo desligado. + + Invalid -onion address: '%s' Endereço -onion inválido: '%s' @@ -2024,17 +2036,13 @@ Loading banlist... - Carregando banlist... + Carregando lista de banidos... Location of the auth cookie (default: data dir) Localização do cookie de autenticação (padrão: diretório de dados) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Número mínimo de bytes por sigop em transações que transmitimos e mineramos (default: %u) - - Not enough file descriptors available. Decriptadores de arquivos disponíveis insuficientes. @@ -2043,16 +2051,20 @@ Somente conectar a clientes na rede <net> (ipv4, ipv6 ou onion) + Print this help message and exit + Mostra essa mensagem de ajuda e sai + + Print version and exit Mostra a versão e sai Prune cannot be configured with a negative value. - O modo Prune não pode ser configurado com um valor negativo. + O modo prune não pode ser configurado com um valor negativo. Prune mode is incompatible with -txindex. - O modo Prune é incompatível com -txindex. + O modo prune é incompatível com -txindex. Rewinding blocks... @@ -2063,6 +2075,10 @@ Define o tamanho do cache do banco de dados em megabytes (%d para %d, padrão: %d) + Set maximum BIP141 block weight (default: %d) + Define a altura máxima BIP141 do bloco (padrão: %d) + + Set maximum block size in bytes (default: %d) Define o tamanho máximo de cada bloco em bytes (padrão: %d) @@ -2419,6 +2435,10 @@ Aviso: Versões de bloco desconhecidas sendo mineradas! É possível que regras estranhas estejam ativas + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + Atenção: Arquivo da carteira corrompido, dados recuperados! Original %s salvo como %s em %s; se seu saldo ou transações estiverem incorretos, você deve restaurar o backup. + + (default: %s) (padrão: %s) @@ -2536,7 +2556,7 @@ Done loading - Carregamento terminado + Carregamento terminado! Error diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts index 097c6de492b..83406789707 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/bitcoin_pt_PT.ts @@ -1952,10 +1952,6 @@ Localização de cookie de autorização (predefinição: diretoria de dados) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Mínimo de bytes por sigop nas transações que nós transmitimos e mine (predefinição: %u) - - Not enough file descriptors available. Os descritores de ficheiros disponíveis são insuficientes. diff --git a/src/qt/locale/bitcoin_ro.ts b/src/qt/locale/bitcoin_ro.ts index cf85cf44c2a..9f6ba27092f 100644 --- a/src/qt/locale/bitcoin_ro.ts +++ b/src/qt/locale/bitcoin_ro.ts @@ -64,6 +64,10 @@ BanTableModel + IP/Netmask + IP/Netmask + + Banned Until Blocat până @@ -71,55 +75,619 @@ BitcoinGUI + Sign &message... + Semnează &mesajul... + + Synchronizing with network... Se sincronizează cu rețeaua + Node + Nod + + + Show general overview of wallet + Arată o prezentare generală a portofelului. + + + &Transactions + &Tranzacții + + + Browse transaction history + Navighează în istoricul tranzacțiilor + + + Quit application + Părăsește aplicația + + + About &Qt + Despre &Qt + + + Show information about Qt + Arată informații despre Qt + + &Options... &Opțiuni... - + + &Encrypt Wallet... + &Criptează portofelul... + + + &Backup Wallet... + &Backup portofel + + + &Change Passphrase... + &Schimbă parola... + + + &Sending addresses... + &Trimite adresele... + + + &Receiving addresses... + &Primește adresele... + + + Open &URI... + Deschide &URI... + + + Send coins to a Bitcoin address + Trimite monedele către o adresă Bitcoin + + + Backup wallet to another location + Fă o copie de rezervă a portofelului într-o altă locație + + + Change the passphrase used for wallet encryption + Schimbă parola folosită pentru criptarea portofelului + + + &Debug window + &Fereastra pentru depanare + + + Open debugging and diagnostic console + Pornește consola pentru depanare si diagnoză + + + &Verify message... + &Verifică mesajul... + + + Bitcoin + Bitcoin + + + Wallet + Portofel + + + &Send + &Trimite + + + &Receive + &Primește + + + &Show / Hide + &Arată/Ascunde + + + Show or hide the main Window + Arată sau ascunde fereastra principală + + + Encrypt the private keys that belong to your wallet + Criptează cheile private care aparțin portofelului tău. + + + Sign messages with your Bitcoin addresses to prove you own them + Semnează mesajele cu adresa ta de Bitcoin pentru a face dovada că îți aparțin. + + + Verify messages to ensure they were signed with specified Bitcoin addresses + Verifică mesajele cu scopul de a asigura faptul că au fost semnate cu adresa de Bitcoin specificată. + + + &File + &Fișier + + + &Settings + &Setări + + + &Help + &Ajutor + + + Request payments (generates QR codes and bitcoin: URIs) + Cerere plată (generează coduri QR și bitcoin: URIs) + + + Open a bitcoin: URI or payment request + Deschide un bitcoin: URI sau cerere de plată + + + %1 and %2 + %1 și %2 + + + %1 behind + %1 în urmă + + + Last received block was generated %1 ago. + Ultimul bloc primit a fost generat acum %1 + + + Error + Eroare + + + Warning + Atenționare + + + Information + Informație + + + Up to date + Actual + + + Date: %1 + + Data: %1 + + + Amount: %1 + + Cantitate: %1 + + + Type: %1 + + Tip: %1 + + + + Label: %1 + + Etichetă: %1 + + + + Address: %1 + + Adresa: %1 + + + + Sent transaction + Trimite tranzacția + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + Portofelul este <b>criptat</b> și în prezent <b>deblocat</b> + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + Portofelul este <b>criptat</b> și în prezent <b>blocat</b> + + CoinControlDialog - + + Coin Selection + Selecția monedelor + + + Quantity: + Cantitatea: + + + Bytes: + Biți: + + + Amount: + Cantitate: + + + Priority: + Prioritate: + + + Fee: + Taxa: + + + After Fee: + După taxă: + + + Change: + Schimbă: + + + Tree mode + Mod arbore + + + List mode + Mod listă + + + Amount + Cantitate + + + Received with address + Primit cu adresa + + + Date + Data + + + Confirmations + Confirmări + + + Confirmed + Confirmat + + + Priority + Prioritate + + EditAddressDialog - + + Edit Address + Modifică adresa + + + &Address + &Adresa + + FreespaceChecker + + name + Nume + + + Directory already exists. Add %1 if you intend to create a new directory here. + Directoriul există deja. Adaugă %1 dacă ai intenționat să creezi aici un directoriu nou. + HelpMessageDialog + + version + versiune + + + (%1-bit) + (%1-bit) + + + Start minimized + Pornește minimalizat + Intro + + Welcome + Bine ai venit! + + + Use the default data directory + Folosește directoriul pentru date din modul implicit. + + + Error + Eroare + + + %n GB of free space available + %n GB de spațiu liber disponibil%n GB de spațiu liber disponibil%n GB de spațiu liber disponibil + OpenURIDialog + + Open URI + Deschide URI + + + URI: + URI: + OptionsDialog + + Options + Opțiuni + + + MB + MB + + + Accept connections from outside + Acceptă conexiuni externe + + + Allow incoming connections + Acceptă conexiunea care sosește + + + IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) + Adresa IP a proxy-ului (ex. IPv4: 127.0.0.1 / IPv6: ::1) + + + &Reset Options + &Resetează opțiunile + + + &Network + &Rețea + + + Expert + Expert + + + Proxy &IP: + Proxy &IP: + + + &Port: + &Port: + + + Port of the proxy (e.g. 9050) + Portul pentru proxy (ex.: 9050) + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + &OK + &OK + + + &Cancel + &Anulează + + + default + inițial + + + none + fără + + + Confirm options reset + Confirmă resetarea opțiunilor + + + Client restart required to activate changes. + Repornirea clientului este necesară pentru ca schimbările să fie activate + + + Client will be shut down. Do you want to proceed? + Clientul va fi oprit. Dorești sa continui? + + + This change would require a client restart. + Această schimbare necesită repornirea clientului. + OverviewPage + + Available: + Disponibil: + + + Total: + Total: + + + Recent transactions + Tranzacții recente + PeerTableModel QObject + + Amount + Cantitate + RPCConsole - + + Client version + Versiunea clientului + + + &Information + &Informații + + + Debug window + Fereastra pentru depanare + + + General + General + + + Network + Rețea + + + Name + Nume + + + Number of connections + Numărul de conexiuni + + + Received + Primit + + + Sent + Trimis + + + Direction + Direcția + + + Version + Versiune + + + Connection Time + Durata conexiunii + + + &Open + &Deschide + + + &Console + &Consolă + + + 1 &hour + 1 &ore + + + 1 &day + 1 &zi + + + 1 &week + 1 &săptămână + + + 1 &year + 1 &an + + + %1 B + %1 B + + + %1 KB + %1 KB + + + %1 MB + %1 MB + + + %1 GB + %1 GB + + + Yes + Da + + + No + Nu + + + Unknown + Necunoscut + + ReceiveCoinsDialog - + + Show + Arată + + + Remove + Elimină + + ReceiveRequestDialog - + + &Save Image... + &Salvează imaginea... + + SendCoinsDialog + + Quantity: + Cantitatea: + + + Bytes: + Biți: + + + Amount: + Cantitate: + + + Priority: + Prioritate: + + + Fee: + Taxa: + + + After Fee: + După taxă: + + + Change: + Schimbă: + SendCoinsEntry @@ -144,5 +712,21 @@ bitcoin-core - + + Bitcoin Core + Bitcoin Core + + + Information + Informație + + + Warning + Atenționare + + + Error + Eroare + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index 271b1112252..25fe77bee7e 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -327,6 +327,10 @@ Синхронизировано + Show the %1 help message to get a list with possible Bitcoin command-line options + Показать помощь по %1, чтобы получить список доступных параметров командной строки + + %1 client %1 клиент @@ -1823,6 +1827,10 @@ Распространяется под лицензией MIT, см. приложенный файл COPYING или <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Эквивалентных байт на sigop в транзакциях для ретрансляции или добычи (по умолчанию: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Ошибка загрузки %s: Вы не можете включить HD в уже существующем не-HD кошельке @@ -1839,10 +1847,22 @@ Всегда разрешать транзакции, полученные от участников из белого списка (по умолчанию: %d) + Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) + Максимально допустимое среднее отклонение времени участников. Локальное представление времени может меняться вперед или назад на это количество. (по умолчанию: %u секунд) + + + Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) + Максимальная сумма комиссий (%s) для одной транзакции в бумажнике или сырой транзакции; слишком низкое значение может вызвать прерывание больших транзакций (по умолчанию: %s) + + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. Пожалуйста убедитесь в корректности установки времени и даты на вашем компьютере! Если время установлено неверно, %s не будет работать правильно. + Please contribute if you find %s useful. Visit %s for further information about the software. + Пожалуйста, внести свой вклад, если вы найдете %s полезными. Посетите %s для получения дополнительной информации о программном обеспечении. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Задать число потоков проверки скрипта (от %u до %d, 0=авто, <0 = оставить столько ядер свободными, по умолчанию: %d) @@ -2027,10 +2047,6 @@ Расположение куки входы(по умолчанию: data dir) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Минимально байт на sigop в транзакциях, которые мы ретранслируем и добываем (по умолчанию: %u) - - Not enough file descriptors available. Недостаточно файловых дескрипторов. @@ -2055,6 +2071,10 @@ Режим удаления блоков несовместим с -txindex. + Rebuild chain state and block index from the blk*.dat files on disk + Перестроить состояние цепи блоков и индекс блоков из blk*.dat файлов с диска + + Rebuild chain state from the currently indexed blocks Перестроить индекс цепи из текущих индексированных блоков diff --git a/src/qt/locale/bitcoin_ru_RU.ts b/src/qt/locale/bitcoin_ru_RU.ts index 66419728e2c..52a0020c51e 100644 --- a/src/qt/locale/bitcoin_ru_RU.ts +++ b/src/qt/locale/bitcoin_ru_RU.ts @@ -23,7 +23,7 @@ C&lose - Закрыть + &Закрыть Delete the currently selected address from the list @@ -55,6 +55,10 @@ BitcoinGUI + Bitcoin + Bitcoin Core + + &Command-line options Опции командной строки @@ -185,6 +189,10 @@ Bitcoin Core + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway + bitcoin-core + + Information Информация @@ -193,6 +201,10 @@ Предупреждение + Do not keep transactions in the mempool longer than <n> hours (default: %u) + Do not keep transactions in the mempool longer than <n> hours (default: %u) + + Error Ошибка diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts index 527f95d14cd..60eeba70253 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/bitcoin_sk.ts @@ -580,6 +580,10 @@ Keďže toto je prvé spustenie programu, môžete si vybrať, kam %1 bude ukladať vaše údaje. + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 stiahne a uloží kópiu Bitcoin block chain. Minimálne %2GB dát bude uložených v tejto zložke, a bude sa zväčšovať postupom času. Peňaženka bude taktiež uložená v tejto zložke. + + Use the default data directory Použiť predvolený dátový adresár @@ -1014,6 +1018,10 @@ Používa BerkeleyDB verziu + Datadir + Zložka s dátami + + Startup time Čas spustenia @@ -1135,6 +1143,10 @@ Čas odozvy + The duration of a currently outstanding ping. + Trvanie aktuálneho pingu + + Ping Wait Čakanie na ping @@ -1211,6 +1223,10 @@ &odblokovať uzol + Welcome to the %1 RPC console. + Vitajte v %1 RPC konzole + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. Použi šípky hore a dolu pre navigáciu históriou a <b>Ctrl-L</b> pre vyčistenie obrazovky. @@ -1764,6 +1780,10 @@ Jadro Bitcoin + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. + -fallbackfee je nastavená veľmi vysoko. Ide o poplatok za transakciu, ktorý môže platiť, keď odhady poplatku nie sú k dispozícii. + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6 @@ -1780,6 +1800,10 @@ Distribuované pod softvérovou licenciou MIT, viď sprievodný súbor COPYING alebo <http://www.opensource.org/licenses/mit-license.php>. + Error loading %s: You can't enable HD on a already existing non-HD wallet + Chyba počas načítavania %s: Nemôžete povoliť HD na už existujúcej non-HD peaženke + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID) @@ -1818,6 +1842,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Uzle na zoznam povolených, ktoré sa pripájajú z danej netmask alebo IP adresy. Môže byť zadané viac krát. + %s corrupt, salvage failed + %s je poškodený, záchrana zlyhala + + -maxmempool must be at least %d MB -maxmempool musí byť najmenej %d MB @@ -1942,6 +1970,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Načítavam banlist... + Location of the auth cookie (default: data dir) + Poloha overovacieho cookie súboru (predvolená: zložka s dátami) + + Not enough file descriptors available. Nedostatok kľúčových slov súboru. @@ -2218,6 +2250,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Zmazať všetky transakcie z peňaženky... + ZeroMQ notification options: + Možnosti pripojenia ZeroMQ: + + Password for JSON-RPC connections Heslo pre JSON-rPC spojenia @@ -2254,10 +2290,38 @@ The network does not appear to fully agree! Some miners appear to be experiencin Výstupné ladiace informácie (predvolené: %u, dodanie <category> je voliteľné) + Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments. + Celková dĺžka verzie sieťového reťazca (%i) prekračuje maximálnu dĺžku (%i). Znížte počet a veľkosť komentárov. + + + Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d) + Sa snaží držať odchádzajúce prevádzku v rámci daného cieľa (v MB za 24h), 0 = žiadny limit (predvolený: %d) + + + Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. + Nepodporovaný argument -socks nájdený. Nastavenie SOCKS verzie už nie je viac moźné, iba SOCKS5 proxies sú podporované. + + + Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. + Nepodporovaný argument -whitelistalwaysrelay ignorovaný, použite -whitelistrelay a/alebo -whitelistforcerelay. + + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) Použiť samostatný SOCKS5 proxy server na dosiahnutie počítačov cez skryté služby Tor (predvolené: %s) + Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times + Užívateľské hash meno a heslo pre JSON-RPC pripojenia. Pole <userpw> je vo formáte <USERNAME>:<SALT>$<HASH>. Kanonický python skript je zahrnutý v share/rpcuser. Toto nastavenie môže byť špecifikované viac krát + + + Warning: Unknown block versions being mined! It's possible unknown rules are in effect + Varovanie: Neznáma verzia blokov sa doluje! Je možné, že neznáme pravidlá majú efekt + + + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + Varovanie: Peňaženka poškodená, dáta boli zachránené! Originálna %s ako %s v %s; ak váš zostatok alebo transakcie sú nesprávne, mali by ste obnoviť zálohu. + + (default: %s) (predvolené: %s) diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts index 16ef20ea3a0..94e2196367c 100644 --- a/src/qt/locale/bitcoin_sl_SI.ts +++ b/src/qt/locale/bitcoin_sl_SI.ts @@ -63,7 +63,15 @@ BanTableModel - + + IP/Netmask + IP/Netmaska + + + Banned Until + Prepoved do + + BitcoinGUI @@ -243,6 +251,14 @@ %n aktivna povezava v omrežje Bitcoin%n aktivni povezavi v omrežje Bitcoin%n aktivne povezave v omrežje Bitcoin%n aktivnih povezav v omrežje Bitcoin + Indexing blocks on disk... + Indeksirani bloki na disku ... + + + Processing blocks on disk... + Obdelava blokov na disku ... + + No block source available... Ni virov za prenos blokov ... @@ -299,6 +315,10 @@ Posodobljeno + %1 client + %1 odjemalec + + Catching up... Dohitevam omrežje ... @@ -485,6 +505,10 @@ (%1-bit) + About %1 + O %1 + + Command-line options Možnosti ukazne vrstice @@ -496,6 +520,18 @@ command-line options možnosti ukazne vrstice + + UI Options: + UI možnosti: + + + Set language, for example "de_DE" (default: system locale) + Nastavi jezik, na primer "sl_SI" (privzeto: sistemsko) + + + Start minimized + Začni minimizirano + Intro @@ -504,6 +540,10 @@ Dobrodošli + Welcome to %1. + Dobrodošli v %1 + + Use the default data directory Uporabi privzeto podatkovno mapo diff --git a/src/qt/locale/bitcoin_sr@latin.ts b/src/qt/locale/bitcoin_sr@latin.ts index 86243bc14c1..229618e3437 100644 --- a/src/qt/locale/bitcoin_sr@latin.ts +++ b/src/qt/locale/bitcoin_sr@latin.ts @@ -75,13 +75,147 @@ BitcoinGUI + Synchronizing with network... + Usklađivanje sa mrežom... + + + &Overview + &Pregled + + + Quit application + Isključi aplikaciju + + + &Options... + &Opcije... + + + &Change Passphrase... + &Izmeni pristupnu frazu... + + + &Sending addresses... + &Slanje adresa... + + + &Receiving addresses... + &Primanje adresa... + + + Open &URI... + Otvori &URI... + + + Send coins to a Bitcoin address + Pošalji novčiće na Bitcoin adresu + + + &Verify message... + &Proveri poruku... + + + Bitcoin + Bitcoin + + + Wallet + Novčanik + + + &Send + &Pošalji + + + &Receive + &Primi + + + &Show / Hide + &Prikazati / Sakriti + + + Show or hide the main Window + Prikaži ili sakrij glavni prozor + + + &Settings + &Podešavanja + + + &Help + &Pomoć + + Error Greska + + Warning + Upozorenje + + + Information + Informacije + + + %1 client + %1 klijent + + + Date: %1 + + Datum: %1 + + + + Amount: %1 + + Iznos: %1 + + + + Type: %1 + + Tip: %1 + + + + Label: %1 + + Oznaka: %1 + + + + Address: %1 + + Adresa: %1 + + CoinControlDialog + Quantity: + Količina: + + + Amount: + Iznos: + + + Priority: + Prioritet: + + + Fee: + Naknada: + + + After Fee: + Nakon Naknade: + + Amount Kolicina @@ -89,10 +223,26 @@ Date Datum - + + Priority + Prioritet + + EditAddressDialog - + + Edit Address + Izmeni Adresu + + + &Label + &Oznaka + + + &Address + &Adresa + + FreespaceChecker @@ -136,6 +286,26 @@ SendCoinsDialog + + Quantity: + Količina: + + + Amount: + Iznos: + + + Priority: + Prioritet: + + + Fee: + Naknada: + + + After Fee: + Nakon Naknade: + SendCoinsEntry @@ -165,6 +335,14 @@ Bitcoin Core + Information + Informacije + + + Warning + Upozorenje + + Insufficient funds Nedovoljno sredstava diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index 84ae9145e9b..bcee9768f69 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -1827,6 +1827,10 @@ Distribuerad under MIT mjukvarulicens, se den bifogade filen COPYING eller <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Samma antal byte per sigop i transaktioner som vi reläar och bryter (förvalt: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Fel vid laddning av %s: Du kan inte aktivera HD på en existerande icke-HD plånbok @@ -2051,10 +2055,6 @@ Plats för authcookie (förvalt: datamapp) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Minimum antal byte per sigop i transaktioner som vi reläar och bryter (förvalt: %u) - - Not enough file descriptors available. Inte tillräckligt med filbeskrivningar tillgängliga. @@ -2095,6 +2095,10 @@ Sätt databasens cachestorlek i megabyte (%d till %d, förvalt: %d) + Set maximum BIP141 block weight (default: %d) + Sätt maximal BIP141 blockvikt (förvalt: %d) + + Set maximum block size in bytes (default: %d) Sätt maximal blockstorlek i byte (förvalt: %d) diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index 21a91a86fcc..8e9ec36b029 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -1831,6 +1831,10 @@ MIT yazılım lisansı kapsamında yayınlanmıştır, ekteki COPYING dosyasına ya da <http://www.opensource.org/licenses/mit-license.php> adresine bakınız. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Oluşturma ve aktarşa muamelelerinde sigop başına eşdeğer bayt (varsayılan: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet %s yüklenmesinde hata: zaten var olan ve HD olmayan bir cüzdanda HD etkinleştirilemez. @@ -2055,10 +2059,6 @@ auth çerezinin konumu (varsayılan: veri klasörü) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - Aktardığımız ve oluşturduğumuz muamelelerdeki sigop başına asgari bayt (varsayılan: %u) - - Not enough file descriptors available. Kafi derecede dosya tanımlayıcıları mevcut değil. diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index e7a706ee524..b8296649b6b 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -115,6 +115,10 @@ &关于 %1 + Show information about %1 + 显示 %1 相关信息 + + About &Qt 关于Qt(&Q) @@ -127,6 +131,10 @@ 选项(&O)... + Modify configuration options for %1 + 修改%1配置选项 + + &Encrypt Wallet... 加密钱包(&E)... @@ -255,6 +263,14 @@ %n 个到比特币网络的活动连接 + Indexing blocks on disk... + 正在为数据块建立索引... + + + Processing blocks on disk... + 正在处理数据块... + + No block source available... 沒有可用的区块来源... @@ -311,6 +327,10 @@ 已是最新 + %1 client + %1 客戶 + + Catching up... 更新中... @@ -497,6 +517,10 @@ (%1 位) + About %1 + 關於 %1 + + Command-line options 命令行选项 @@ -532,7 +556,11 @@ Show splash screen on startup (default: %u) 显示启动画面(默认:%u) - + + Reset all settings changed in the GUI + 重置图形界面所有的变更设置 + + Intro @@ -540,6 +568,15 @@ 欢迎 + Welcome to %1. + +歡迎來到 %1 + + + As this is the first time the program is launched, you can choose where %1 will store its data. + 由于这是第一次启动此程序,您可以选择%1的数据所存储的位置 + + Use the default data directory 使用默认的数据目录 @@ -1880,10 +1917,6 @@ 认证Cookie的位置 (默认: data目录) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - 我们关联和挖掘的每sigop的最低交易字节(默认: %u) - - Not enough file descriptors available. 没有足够的文件描述符可用。 diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index 21ca417ac6c..efea3da9e3f 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -1832,6 +1832,10 @@ 這套軟體是依據 MIT 軟體授權條款散布,詳情請見附帶的 COPYING 檔案,或是以下網站: <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + 轉發和開採時,交易資料中每個 sigop 的等同位元組數(預設值: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet 載入 %s 發生錯誤:不能對已存在的非 HD 錢包啟用 HD 功能。 @@ -2056,10 +2060,6 @@ 認證 cookie 資料的位置(預設值: 同資料目錄) - Minimum bytes per sigop in transactions we relay and mine (default: %u) - 轉發和開採時,對交易資料的 sigop 平均位元組數下限(預設值: %u) - - Not enough file descriptors available. 檔案描述元不足。 From 0027672c8075d063f376c8c84e1cce77d572d353 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Fri, 23 Sep 2016 13:06:45 +0800 Subject: [PATCH 151/302] Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH Github-Pull: #8526 Rebased-From: c72c5b1e3bd42e84465677e94aa83316ff3d9a14 --- src/policy/policy.h | 1 + src/script/interpreter.cpp | 6 +++ src/script/interpreter.h | 4 ++ src/script/script_error.cpp | 2 + src/script/script_error.h | 3 +- src/test/data/script_tests.json | 85 ++++++++++++++++++++++++++++++++++++++++- src/test/script_tests.cpp | 1 + src/test/transaction_tests.cpp | 1 + 8 files changed, 101 insertions(+), 2 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index 6bf5ca0ee55..458ec4a0cb4 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -42,6 +42,7 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY SCRIPT_VERIFY_NULLDUMMY | SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | SCRIPT_VERIFY_CLEANSTACK | + SCRIPT_VERIFY_MINIMALIF | SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | SCRIPT_VERIFY_CHECKSEQUENCEVERIFY | SCRIPT_VERIFY_LOW_S | diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 47ea261e310..fd356fed0ab 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -428,6 +428,12 @@ bool EvalScript(vector >& stack, const CScript& script, un if (stack.size() < 1) return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL); valtype& vch = stacktop(-1); + if (sigversion == SIGVERSION_WITNESS_V0 && (flags & SCRIPT_VERIFY_MINIMALIF)) { + if (vch.size() > 1) + return set_error(serror, SCRIPT_ERR_MINIMALIF); + if (vch.size() == 1 && vch[0] != 1) + return set_error(serror, SCRIPT_ERR_MINIMALIF); + } fValue = CastToBool(vch); if (opcode == OP_NOTIF) fValue = !fValue; diff --git a/src/script/interpreter.h b/src/script/interpreter.h index e5d7865cd3d..2ce4b23e54f 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -94,6 +94,10 @@ enum // Making v1-v16 witness program non-standard // SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM = (1U << 12), + + // Segwit script only: Require the argument of OP_IF/NOTIF to be exactly 0x01 or empty vector + // + SCRIPT_VERIFY_MINIMALIF = (1U << 13), }; bool CheckSignatureEncoding(const std::vector &vchSig, unsigned int flags, ScriptError* serror); diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp index cef807edcf4..9969c232fc3 100644 --- a/src/script/script_error.cpp +++ b/src/script/script_error.cpp @@ -63,6 +63,8 @@ const char* ScriptErrorString(const ScriptError serror) return "Non-canonical signature: S value is unnecessarily high"; case SCRIPT_ERR_SIG_NULLDUMMY: return "Dummy CHECKMULTISIG argument must be zero"; + case SCRIPT_ERR_MINIMALIF: + return "OP_IF/NOTIF argument must be minimal"; case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS: return "NOPx reserved for soft-fork upgrades"; case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM: diff --git a/src/script/script_error.h b/src/script/script_error.h index 09dc6945adb..6d34d37925b 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -39,7 +39,7 @@ typedef enum ScriptError_t SCRIPT_ERR_NEGATIVE_LOCKTIME, SCRIPT_ERR_UNSATISFIED_LOCKTIME, - /* BIP62 */ + /* Malleability */ SCRIPT_ERR_SIG_HASHTYPE, SCRIPT_ERR_SIG_DER, SCRIPT_ERR_MINIMALDATA, @@ -48,6 +48,7 @@ typedef enum ScriptError_t SCRIPT_ERR_SIG_NULLDUMMY, SCRIPT_ERR_PUBKEYTYPE, SCRIPT_ERR_CLEANSTACK, + SCRIPT_ERR_MINIMALIF, /* softfork safeness */ SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS, diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json index fcd5457386d..d456a8beffd 100644 --- a/src/test/data/script_tests.json +++ b/src/test/data/script_tests.json @@ -2125,5 +2125,88 @@ ["0", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "UNSATISFIED_LOCKTIME", "CSV fails if stack top bit 1 << 31 is set and the tx version < 2"], ["4294967296", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "UNSATISFIED_LOCKTIME", "CSV fails if stack top bit 1 << 31 is not set, and tx version < 2"], -["The End"] + +["MINIMALIF tests"], +["MINIMALIF is not applied to non-segwit scripts"], +["1", "IF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "OK"], +["2", "IF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "OK"], +["0x02 0x0100", "IF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "OK"], +["0", "IF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0x01 0x00", "IF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["1", "NOTIF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["2", "NOTIF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0x02 0x0100", "NOTIF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0", "NOTIF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "OK"], +["0x01 0x00", "NOTIF 1 ENDIF", "P2SH,WITNESS,MINIMALIF", "OK"], +["Normal P2SH IF 1 ENDIF"], +["1 0x03 0x635168", "HASH160 0x14 0xe7309652a8e3f600f06f5d8d52d6df03d2176cc3 EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +["2 0x03 0x635168", "HASH160 0x14 0xe7309652a8e3f600f06f5d8d52d6df03d2176cc3 EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +["0x02 0x0100 0x03 0x635168", "HASH160 0x14 0xe7309652a8e3f600f06f5d8d52d6df03d2176cc3 EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +["0 0x03 0x635168", "HASH160 0x14 0xe7309652a8e3f600f06f5d8d52d6df03d2176cc3 EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0x01 0x00 0x03 0x635168", "HASH160 0x14 0xe7309652a8e3f600f06f5d8d52d6df03d2176cc3 EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0x03 0x635168", "HASH160 0x14 0xe7309652a8e3f600f06f5d8d52d6df03d2176cc3 EQUAL", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], +["Normal P2SH NOTIF 1 ENDIF"], +["1 0x03 0x645168", "HASH160 0x14 0x0c3f8fe3d6ca266e76311ecda544c67d15fdd5b0 EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["2 0x03 0x645168", "HASH160 0x14 0x0c3f8fe3d6ca266e76311ecda544c67d15fdd5b0 EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0x02 0x0100 0x03 0x645168", "HASH160 0x14 0x0c3f8fe3d6ca266e76311ecda544c67d15fdd5b0 EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +["0 0x03 0x645168", "HASH160 0x14 0x0c3f8fe3d6ca266e76311ecda544c67d15fdd5b0 EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +["0x01 0x00 0x03 0x645168", "HASH160 0x14 0x0c3f8fe3d6ca266e76311ecda544c67d15fdd5b0 EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +["0x03 0x645168", "HASH160 0x14 0x0c3f8fe3d6ca266e76311ecda544c67d15fdd5b0 EQUAL", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], +["P2WSH IF 1 ENDIF"], +[["01", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS", "OK"], +[["02", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS", "OK"], +[["0100", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS", "OK"], +[["", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS", "EVAL_FALSE"], +[["00", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS", "EVAL_FALSE"], +[["01", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS,MINIMALIF", "OK"], +[["02", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["0100", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +[["00", "635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS", "UNBALANCED_CONDITIONAL"], +[["635168", 0.00000001], "", "0 0x20 0xc7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], +["P2WSH NOTIF 1 ENDIF"], +[["01", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS", "EVAL_FALSE"], +[["02", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS", "EVAL_FALSE"], +[["0100", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS", "EVAL_FALSE"], +[["", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS", "OK"], +[["00", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS", "OK"], +[["01", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +[["02", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["0100", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS,MINIMALIF", "OK"], +[["00", "645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS", "UNBALANCED_CONDITIONAL"], +[["645168", 0.00000001], "", "0 0x20 0xf913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], + + + +["P2SH-P2WSH IF 1 ENDIF"], +[["01", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS", "OK"], +[["02", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS", "OK"], +[["0100", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS", "OK"], +[["", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS", "EVAL_FALSE"], +[["00", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS", "EVAL_FALSE"], +[["01", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +[["02", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["0100", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +[["00", "635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS", "UNBALANCED_CONDITIONAL"], +[["635168", 0.00000001], "0x22 0x0020c7eaf06d5ae01a58e376e126eb1e6fab2036076922b96b2711ffbec1e590665d", "HASH160 0x14 0x9b27ee6d9010c21bf837b334d043be5d150e7ba7 EQUAL", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], +["P2SH-P2WSH NOTIF 1 ENDIF"], +[["01", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "EVAL_FALSE"], +[["02", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "EVAL_FALSE"], +[["0100", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "EVAL_FALSE"], +[["", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "OK"], +[["00", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "OK"], +[["01", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "EVAL_FALSE"], +[["02", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["0100", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "OK"], +[["00", "645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "MINIMALIF"], +[["645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "UNBALANCED_CONDITIONAL"], +[["645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], + + ["The End"] ] diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 5a9aaf9bc07..36c591d616f 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -89,6 +89,7 @@ static ScriptErrorDesc script_errors[]={ {SCRIPT_ERR_SIG_NULLDUMMY, "SIG_NULLDUMMY"}, {SCRIPT_ERR_PUBKEYTYPE, "PUBKEYTYPE"}, {SCRIPT_ERR_CLEANSTACK, "CLEANSTACK"}, + {SCRIPT_ERR_MINIMALIF, "MINIMALIF"}, {SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS, "DISCOURAGE_UPGRADABLE_NOPS"}, {SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM, "DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"}, {SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH, "WITNESS_PROGRAM_WRONG_LENGTH"}, diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index b5af400bc54..165dfd9a3e0 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -50,6 +50,7 @@ static std::map mapFlagNames = boost::assign::map_list_of (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY) (string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) (string("CLEANSTACK"), (unsigned int)SCRIPT_VERIFY_CLEANSTACK) + (string("MINIMALIF"), (unsigned int)SCRIPT_VERIFY_MINIMALIF) (string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY) (string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY) (string("WITNESS"), (unsigned int)SCRIPT_VERIFY_WITNESS) From 3e80ab7f2a338d1bb3d9321c13a18f1324130617 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Thu, 22 Sep 2016 15:06:54 +0800 Subject: [PATCH 152/302] Add policy: null signature for failed CHECK(MULTI)SIG Github-Pull: #8634 Rebased-From: e41bd449ab2b8d01260795383af2c40b659d8587 --- src/policy/policy.h | 1 + src/script/interpreter.cpp | 14 +++++++++++++- src/script/interpreter.h | 4 ++++ src/script/script_error.cpp | 2 ++ src/script/script_error.h | 1 + src/test/data/script_tests.json | 33 ++++++++++++++++++++++++++++++++- src/test/script_tests.cpp | 1 + src/test/transaction_tests.cpp | 1 + 8 files changed, 55 insertions(+), 2 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index 458ec4a0cb4..9d6ff1233b6 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -43,6 +43,7 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | SCRIPT_VERIFY_CLEANSTACK | SCRIPT_VERIFY_MINIMALIF | + SCRIPT_VERIFY_NULLFAIL | SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | SCRIPT_VERIFY_CHECKSEQUENCEVERIFY | SCRIPT_VERIFY_LOW_S | diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index fd356fed0ab..41756ea7119 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -885,6 +885,9 @@ bool EvalScript(vector >& stack, const CScript& script, un } bool fSuccess = checker.CheckSig(vchSig, vchPubKey, scriptCode, sigversion); + if (!fSuccess && (flags & SCRIPT_VERIFY_NULLFAIL) && vchSig.size()) + return set_error(serror, SCRIPT_ERR_SIG_NULLFAIL); + popstack(stack); popstack(stack); stack.push_back(fSuccess ? vchTrue : vchFalse); @@ -914,6 +917,9 @@ bool EvalScript(vector >& stack, const CScript& script, un if (nOpCount > MAX_OPS_PER_SCRIPT) return set_error(serror, SCRIPT_ERR_OP_COUNT); int ikey = ++i; + // ikey2 is the position of last non-signature item in the stack. Top stack item = 1. + // With SCRIPT_VERIFY_NULLFAIL, this is used for cleanup if operation fails. + int ikey2 = nKeysCount + 2; i += nKeysCount; if ((int)stack.size() < i) return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION); @@ -970,8 +976,14 @@ bool EvalScript(vector >& stack, const CScript& script, un } // Clean up stack of actual arguments - while (i-- > 1) + while (i-- > 1) { + // If the operation failed, we require that all signatures must be empty vector + if (!fSuccess && (flags & SCRIPT_VERIFY_NULLFAIL) && !ikey2 && stacktop(-1).size()) + return set_error(serror, SCRIPT_ERR_SIG_NULLFAIL); + if (ikey2 > 0) + ikey2--; popstack(stack); + } // A bug causes CHECKMULTISIG to consume one extra argument // whose contents were not checked in any way. diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 2ce4b23e54f..0adc9482ffe 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -98,6 +98,10 @@ enum // Segwit script only: Require the argument of OP_IF/NOTIF to be exactly 0x01 or empty vector // SCRIPT_VERIFY_MINIMALIF = (1U << 13), + + // Signature(s) must be empty vector if an CHECK(MULTI)SIG operation failed + // + SCRIPT_VERIFY_NULLFAIL = (1U << 14), }; bool CheckSignatureEncoding(const std::vector &vchSig, unsigned int flags, ScriptError* serror); diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp index 9969c232fc3..e27b715c2cf 100644 --- a/src/script/script_error.cpp +++ b/src/script/script_error.cpp @@ -65,6 +65,8 @@ const char* ScriptErrorString(const ScriptError serror) return "Dummy CHECKMULTISIG argument must be zero"; case SCRIPT_ERR_MINIMALIF: return "OP_IF/NOTIF argument must be minimal"; + case SCRIPT_ERR_SIG_NULLFAIL: + return "Signature must be zero for failed CHECK(MULTI)SIG operation"; case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS: return "NOPx reserved for soft-fork upgrades"; case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM: diff --git a/src/script/script_error.h b/src/script/script_error.h index 6d34d37925b..bccfdb99e23 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -49,6 +49,7 @@ typedef enum ScriptError_t SCRIPT_ERR_PUBKEYTYPE, SCRIPT_ERR_CLEANSTACK, SCRIPT_ERR_MINIMALIF, + SCRIPT_ERR_SIG_NULLFAIL, /* softfork safeness */ SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS, diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json index d456a8beffd..06103ea5bdd 100644 --- a/src/test/data/script_tests.json +++ b/src/test/data/script_tests.json @@ -1492,6 +1492,27 @@ "BIP66 example 4, with DERSIG" ], [ + "0x09 0x300602010102010101", + "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT", + "DERSIG", + "OK", + "BIP66 example 4, with DERSIG, non-null DER-compliant signature" +], +[ + "0", + "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT", + "DERSIG,NULLFAIL", + "OK", + "BIP66 example 4, with DERSIG and NULLFAIL" +], +[ + "0x09 0x300602010102010101", + "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT", + "DERSIG,NULLFAIL", + "NULLFAIL", + "BIP66 example 4, with DERSIG and NULLFAIL, non-null DER-compliant signature" +], +[ "1", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", @@ -2208,5 +2229,15 @@ [["645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS", "UNBALANCED_CONDITIONAL"], [["645168", 0.00000001], "0x22 0x0020f913eacf2e38a5d6fc3a8311d72ae704cb83866350a984dd3e5eb76d2a8c28e8", "HASH160 0x14 0xdbb7d1c0a56b7a9c423300c8cca6e6e065baf1dc EQUAL", "P2SH,WITNESS,MINIMALIF", "UNBALANCED_CONDITIONAL"], - ["The End"] +["NULLFAIL should cover all signatures and signatures only"], +["0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG", "OK", "BIP66 and NULLFAIL-compliant"], +["0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG,NULLFAIL", "OK", "BIP66 and NULLFAIL-compliant"], +["1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG,NULLFAIL", "OK", "BIP66 and NULLFAIL-compliant, not NULLDUMMY-compliant"], +["1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG,NULLFAIL,NULLDUMMY", "SIG_NULLDUMMY", "BIP66 and NULLFAIL-compliant, not NULLDUMMY-compliant"], +["0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x09 0x300602010102010101", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG", "OK", "BIP66-compliant but not NULLFAIL-compliant"], +["0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0x09 0x300602010102010101", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG,NULLFAIL", "NULLFAIL", "BIP66-compliant but not NULLFAIL-compliant"], +["0 0x09 0x300602010102010101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG", "OK", "BIP66-compliant but not NULLFAIL-compliant"], +["0 0x09 0x300602010102010101 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0", "0x01 0x14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0x01 0x14 CHECKMULTISIG NOT", "DERSIG,NULLFAIL", "NULLFAIL", "BIP66-compliant but not NULLFAIL-compliant"], + +["The End"] ] diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 36c591d616f..836ef734ddf 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -90,6 +90,7 @@ static ScriptErrorDesc script_errors[]={ {SCRIPT_ERR_PUBKEYTYPE, "PUBKEYTYPE"}, {SCRIPT_ERR_CLEANSTACK, "CLEANSTACK"}, {SCRIPT_ERR_MINIMALIF, "MINIMALIF"}, + {SCRIPT_ERR_SIG_NULLFAIL, "NULLFAIL"}, {SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS, "DISCOURAGE_UPGRADABLE_NOPS"}, {SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM, "DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"}, {SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH, "WITNESS_PROGRAM_WRONG_LENGTH"}, diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 165dfd9a3e0..6163d2f6306 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -51,6 +51,7 @@ static std::map mapFlagNames = boost::assign::map_list_of (string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) (string("CLEANSTACK"), (unsigned int)SCRIPT_VERIFY_CLEANSTACK) (string("MINIMALIF"), (unsigned int)SCRIPT_VERIFY_MINIMALIF) + (string("NULLFAIL"), (unsigned int)SCRIPT_VERIFY_NULLFAIL) (string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY) (string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY) (string("WITNESS"), (unsigned int)SCRIPT_VERIFY_WITNESS) From 7ae624296000e714034d86891ffcd4a565f278fa Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Mon, 12 Sep 2016 21:32:53 -0400 Subject: [PATCH 153/302] net: fix a few cases where messages were sent rather than dropped upon disconnection 75ead758 turned these into crashes in the event of a handshake failure, most notably when a peer does not offer the expected services. There are likely other cases that these assertions will find as well. Github-Pull: #8862 Rebased-From: 905bc68d05595f41cca36b3df83accd10c00cc48 --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c9869d04f99..c8e290ae515 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6342,7 +6342,7 @@ bool SendMessages(CNode* pto) // Ping automatically sent as a latency probe & keepalive. pingSend = true; } - if (pingSend) { + if (pingSend && !pto->fDisconnect) { uint64_t nonce = 0; while (nonce == 0) { GetRandBytes((unsigned char*)&nonce, sizeof(nonce)); @@ -6423,7 +6423,7 @@ bool SendMessages(CNode* pto) if (pindexBestHeader == NULL) pindexBestHeader = chainActive.Tip(); bool fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do. - if (!state.fSyncStarted && !pto->fClient && !fImporting && !fReindex) { + if (!state.fSyncStarted && !pto->fClient && !pto->fDisconnect && !fImporting && !fReindex) { // Only actively request headers from a single peer, unless we're close to today. if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60) { state.fSyncStarted = true; From 7a34a4614c3ac89ef31cb4854620e381d5df72ad Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Fri, 30 Sep 2016 23:08:29 +0800 Subject: [PATCH 154/302] Add NULLDUMMY verify flag in bitcoinconsensus.h Github-Pull: #8848 Rebased-From: 2fa0063c26c80c719a1c0d30e548e338689ac917 --- doc/shared-libraries.md | 5 +++++ src/script/bitcoinconsensus.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/shared-libraries.md b/doc/shared-libraries.md index ec6f16c8aaf..dc363582cc8 100644 --- a/doc/shared-libraries.md +++ b/doc/shared-libraries.md @@ -30,12 +30,17 @@ The interface is defined in the C header `bitcoinconsensus.h` located in `src/s - `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE` - `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH` - Evaluate P2SH ([BIP16](https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki)) subscripts - `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG` - Enforce strict DER ([BIP66](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki)) compliance +- `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY` - Enforce NULLDUMMY ([BIP147](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki)) +- `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY` - Enable CHECKLOCKTIMEVERIFY ([BIP65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki)) +- `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY` - Enable CHECKSEQUENCEVERIFY ([BIP112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki)) +- `bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS` - Enable WITNESS ([BIP141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki)) ##### Errors - `bitcoinconsensus_ERR_OK` - No errors with input parameters *(see the return value of `bitcoinconsensus_verify_script` for the verification status)* - `bitcoinconsensus_ERR_TX_INDEX` - An invalid index for `txTo` - `bitcoinconsensus_ERR_TX_SIZE_MISMATCH` - `txToLen` did not match with the size of `txTo` - `bitcoinconsensus_ERR_DESERIALIZE` - An error deserializing `txTo` +- `bitcoinconsensus_ERR_AMOUNT_REQUIRED` - Input amount is required if WITNESS is used ### Example Implementations - [NBitcoin](https://github.com/NicolasDorier/NBitcoin/blob/master/NBitcoin/Script.cs#L814) (.NET Bindings) diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h index f73a8e30bc6..1d2d5c23e47 100644 --- a/src/script/bitcoinconsensus.h +++ b/src/script/bitcoinconsensus.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -50,6 +50,7 @@ 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_NULLDUMMY = (1U << 4), // enforce NULLDUMMY (BIP147) bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), // enable CHECKLOCKTIMEVERIFY (BIP65) bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), // enable CHECKSEQUENCEVERIFY (BIP112) bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), // enable WITNESS (BIP141) From e47299a8f2ebc98644bb8d15a3222faac51875fd Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 16 Sep 2016 20:48:23 -0400 Subject: [PATCH 155/302] [qa] Update p2p-compactblocks.py for compactblocks v2 Github-Pull: #8393 Rebased-From: 27acfc1d2ee53cc52b54befd2d4bfa24a77a2eef --- qa/rpc-tests/p2p-compactblocks.py | 583 +++++++++++++++++++++++++------------- 1 file changed, 389 insertions(+), 194 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index cd680437696..cdcfb36e7bd 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -12,14 +12,16 @@ ''' CompactBlocksTest -- test compact blocks (BIP 152) -''' +Version 1 compact blocks are pre-segwit (txids) +Version 2 compact blocks are post-segwit (wtxids) +''' # TestNode: A peer we use to send messages to bitcoind, and store responses. class TestNode(SingleNodeConnCB): def __init__(self): SingleNodeConnCB.__init__(self) - self.last_sendcmpct = None + self.last_sendcmpct = [] self.last_headers = None self.last_inv = None self.last_cmpctblock = None @@ -34,7 +36,7 @@ def __init__(self): self.set_announced_blockhashes = set() def on_sendcmpct(self, conn, message): - self.last_sendcmpct = message + self.last_sendcmpct.append(message) def on_block(self, conn, message): self.last_block = message @@ -108,29 +110,31 @@ class CompactBlocksTest(BitcoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True - self.num_nodes = 1 + # Node0 = pre-segwit, node1 = segwit-aware + self.num_nodes = 2 self.utxos = [] def setup_network(self): self.nodes = [] - # Turn off segwit in this test, as compact blocks don't currently work - # with segwit. (After BIP 152 is updated to support segwit, we can - # test behavior with and without segwit enabled by adding a second node - # to the test.) - self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [["-debug", "-logtimemicros=1", "-bip9params=segwit:0:0"]]) + # Start up node0 to be a version 1, pre-segwit node. + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, + [["-debug", "-logtimemicros=1", "-bip9params=segwit:0:0"], + ["-debug", "-logtimemicros", "-txindex"]]) + connect_nodes(self.nodes[0], 1) - def build_block_on_tip(self): - height = self.nodes[0].getblockcount() - tip = self.nodes[0].getbestblockhash() - mtp = self.nodes[0].getblockheader(tip)['mediantime'] + def build_block_on_tip(self, node): + height = node.getblockcount() + tip = node.getbestblockhash() + mtp = node.getblockheader(tip)['mediantime'] block = create_block(int(tip, 16), create_coinbase(height + 1), mtp + 1) block.solve() return block # Create 10 more anyone-can-spend utxo's for testing. def make_utxos(self): - block = self.build_block_on_tip() + # Doesn't matter which node we use, just use node0. + block = self.build_block_on_tip(self.nodes[0]) self.test_node.send_and_ping(msg_block(block)) assert(int(self.nodes[0].getbestblockhash(), 16) == block.sha256) self.nodes[0].generate(100) @@ -143,7 +147,7 @@ def make_utxos(self): tx.vout.append(CTxOut(out_value, CScript([OP_TRUE]))) tx.rehash() - block2 = self.build_block_on_tip() + block2 = self.build_block_on_tip(self.nodes[0]) block2.vtx.append(tx) block2.hashMerkleRoot = block2.calc_merkle_root() block2.solve() @@ -152,26 +156,30 @@ def make_utxos(self): self.utxos.extend([[tx.sha256, i, out_value] for i in range(10)]) return - # Test "sendcmpct": - # - No compact block announcements or getdata(MSG_CMPCT_BLOCK) unless - # sendcmpct is sent. - # - If sendcmpct is sent with version > 1, the message is ignored. + # Test "sendcmpct" (between peers preferring the same version): + # - No compact block announcements unless sendcmpct is sent. + # - If sendcmpct is sent with version > preferred_version, the message is ignored. # - If sendcmpct is sent with boolean 0, then block announcements are not # made with compact blocks. # - If sendcmpct is then sent with boolean 1, then new block announcements # are made with compact blocks. - def test_sendcmpct(self): - print("Testing SENDCMPCT p2p message... ") - - # Make sure we get a version 0 SENDCMPCT message from our peer + # If old_node is passed in, request compact blocks with version=preferred-1 + # and verify that it receives block announcements via compact block. + def test_sendcmpct(self, node, test_node, preferred_version, old_node=None): + # Make sure we get a SENDCMPCT message from our peer def received_sendcmpct(): - return (self.test_node.last_sendcmpct is not None) + return (len(test_node.last_sendcmpct) > 0) got_message = wait_until(received_sendcmpct, timeout=30) assert(received_sendcmpct()) assert(got_message) - assert_equal(self.test_node.last_sendcmpct.version, 1) + with mininode_lock: + # Check that the first version received is the preferred one + assert_equal(test_node.last_sendcmpct[0].version, preferred_version) + # And that we receive versions down to 1. + assert_equal(test_node.last_sendcmpct[-1].version, 1) + test_node.last_sendcmpct = [] - tip = int(self.nodes[0].getbestblockhash(), 16) + tip = int(node.getbestblockhash(), 16) def check_announcement_of_new_block(node, peer, predicate): peer.clear_block_announcement() @@ -183,56 +191,75 @@ def check_announcement_of_new_block(node, peer, predicate): assert(predicate(peer)) # We shouldn't get any block announcements via cmpctblock yet. - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None) # Try one more time, this time after requesting headers. - self.test_node.request_headers_and_sync(locator=[tip]) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None) + test_node.request_headers_and_sync(locator=[tip]) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None) # Test a few ways of using sendcmpct that should NOT # result in compact block announcements. # Before each test, sync the headers chain. - self.test_node.request_headers_and_sync(locator=[tip]) + test_node.request_headers_and_sync(locator=[tip]) # Now try a SENDCMPCT message with too-high version sendcmpct = msg_sendcmpct() - sendcmpct.version = 2 - self.test_node.send_and_ping(sendcmpct) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None) + sendcmpct.version = preferred_version+1 + sendcmpct.announce = True + test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None) # Headers sync before next test. - self.test_node.request_headers_and_sync(locator=[tip]) + test_node.request_headers_and_sync(locator=[tip]) # Now try a SENDCMPCT message with valid version, but announce=False - self.test_node.send_and_ping(msg_sendcmpct()) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None) + sendcmpct.version = preferred_version + sendcmpct.announce = False + test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None) # Headers sync before next test. - self.test_node.request_headers_and_sync(locator=[tip]) + test_node.request_headers_and_sync(locator=[tip]) # Finally, try a SENDCMPCT message with announce=True - sendcmpct.version = 1 + sendcmpct.version = preferred_version sendcmpct.announce = True - self.test_node.send_and_ping(sendcmpct) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is not None) + test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is not None) # Try one more time (no headers sync should be needed!) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is not None) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is not None) # Try one more time, after turning on sendheaders - self.test_node.send_and_ping(msg_sendheaders()) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is not None) + test_node.send_and_ping(msg_sendheaders()) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is not None) + + # Try one more time, after sending a version-1, announce=false message. + sendcmpct.version = preferred_version-1 + sendcmpct.announce = False + test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is not None) # Now turn off announcements + sendcmpct.version = preferred_version sendcmpct.announce = False - self.test_node.send_and_ping(sendcmpct) - check_announcement_of_new_block(self.nodes[0], self.test_node, lambda p: p.last_cmpctblock is None and p.last_headers is not None) + test_node.send_and_ping(sendcmpct) + check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_headers is not None) + + if old_node is not None: + # Verify that a peer using an older protocol version can receive + # announcements from this node. + sendcmpct.version = preferred_version-1 + sendcmpct.announce = True + old_node.send_and_ping(sendcmpct) + # Header sync + old_node.request_headers_and_sync(locator=[tip]) + check_announcement_of_new_block(node, old_node, lambda p: p.last_cmpctblock is not None) # This test actually causes bitcoind to (reasonably!) disconnect us, so do this last. def test_invalid_cmpctblock_message(self): - print("Testing invalid index in cmpctblock message...") self.nodes[0].generate(101) - block = self.build_block_on_tip() + block = self.build_block_on_tip(self.nodes[0]) cmpct_block = P2PHeaderAndShortIDs() cmpct_block.header = CBlockHeader(block) @@ -245,47 +272,63 @@ def test_invalid_cmpctblock_message(self): # Compare the generated shortids to what we expect based on BIP 152, given # bitcoind's choice of nonce. - def test_compactblock_construction(self): - print("Testing compactblock headers and shortIDs are correct...") - + def test_compactblock_construction(self, node, test_node, version, use_witness_address): # Generate a bunch of transactions. - self.nodes[0].generate(101) + node.generate(101) num_transactions = 25 - address = self.nodes[0].getnewaddress() + address = node.getnewaddress() + if use_witness_address: + # Want at least one segwit spend, so move all funds to + # a witness address. + address = node.addwitnessaddress(address) + value_to_send = node.getbalance() + node.sendtoaddress(address, satoshi_round(value_to_send-Decimal(0.1))) + node.generate(1) + + segwit_tx_generated = False for i in range(num_transactions): - self.nodes[0].sendtoaddress(address, 0.1) + txid = node.sendtoaddress(address, 0.1) + hex_tx = node.gettransaction(txid)["hex"] + tx = FromHex(CTransaction(), hex_tx) + if not tx.wit.is_null(): + segwit_tx_generated = True + + if use_witness_address: + assert(segwit_tx_generated) # check that our test is not broken # Wait until we've seen the block announcement for the resulting tip tip = int(self.nodes[0].getbestblockhash(), 16) assert(self.test_node.wait_for_block_announcement(tip)) # Now mine a block, and look at the resulting compact block. - self.test_node.clear_block_announcement() - block_hash = int(self.nodes[0].generate(1)[0], 16) + test_node.clear_block_announcement() + block_hash = int(node.generate(1)[0], 16) # Store the raw block in our internal format. - block = FromHex(CBlock(), self.nodes[0].getblock("%02x" % block_hash, False)) + block = FromHex(CBlock(), node.getblock("%02x" % block_hash, False)) [tx.calc_sha256() for tx in block.vtx] block.rehash() # Don't care which type of announcement came back for this test; just # request the compact block if we didn't get one yet. - wait_until(self.test_node.received_block_announcement, timeout=30) + wait_until(test_node.received_block_announcement, timeout=30) + assert(test_node.received_block_announcement()) with mininode_lock: - if self.test_node.last_cmpctblock is None: - self.test_node.clear_block_announcement() + if test_node.last_cmpctblock is None: + test_node.clear_block_announcement() inv = CInv(4, block_hash) # 4 == "CompactBlock" - self.test_node.send_message(msg_getdata([inv])) + test_node.send_message(msg_getdata([inv])) - wait_until(self.test_node.received_block_announcement, timeout=30) + wait_until(test_node.received_block_announcement, timeout=30) + assert(test_node.received_block_announcement()) # Now we should have the compactblock header_and_shortids = None with mininode_lock: - assert(self.test_node.last_cmpctblock is not None) + assert(test_node.last_cmpctblock is not None) # Convert the on-the-wire representation to absolute indexes - header_and_shortids = HeaderAndShortIDs(self.test_node.last_cmpctblock.header_and_shortids) + header_and_shortids = HeaderAndShortIDs(test_node.last_cmpctblock.header_and_shortids) # Check that we got the right block! header_and_shortids.header.calc_sha256() @@ -298,8 +341,17 @@ def test_compactblock_construction(self): # Check that all prefilled_txn entries match what's in the block. for entry in header_and_shortids.prefilled_txn: entry.tx.calc_sha256() + # This checks the non-witness parts of the tx agree assert_equal(entry.tx.sha256, block.vtx[entry.index].sha256) + # And this checks the witness + wtxid = entry.tx.calc_sha256(True) + if version == 2: + assert_equal(wtxid, block.vtx[entry.index].calc_sha256(True)) + else: + # Shouldn't have received a witness + assert(entry.tx.wit.is_null()) + # Check that the cmpctblock message announced all the transactions. assert_equal(len(header_and_shortids.prefilled_txn) + len(header_and_shortids.shortids), len(block.vtx)) @@ -314,7 +366,10 @@ def test_compactblock_construction(self): # Already checked prefilled transactions above header_and_shortids.prefilled_txn.pop(0) else: - shortid = calculate_shortid(k0, k1, block.vtx[index].sha256) + tx_hash = block.vtx[index].sha256 + if version == 2: + tx_hash = block.vtx[index].calc_sha256(True) + shortid = calculate_shortid(k0, k1, tx_hash) assert_equal(shortid, header_and_shortids.shortids[0]) header_and_shortids.shortids.pop(0) index += 1 @@ -322,49 +377,50 @@ def test_compactblock_construction(self): # Test that bitcoind requests compact blocks when we announce new blocks # via header or inv, and that responding to getblocktxn causes the block # to be successfully reconstructed. - def test_compactblock_requests(self): - print("Testing compactblock requests... ") - + # Post-segwit: upgraded nodes would only make this request of cb-version-2, + # NODE_WITNESS peers. Unupgraded nodes would still make this request of + # any cb-version-1-supporting peer. + def test_compactblock_requests(self, node, test_node): # Try announcing a block with an inv or header, expect a compactblock # request for announce in ["inv", "header"]: - block = self.build_block_on_tip() + block = self.build_block_on_tip(node) with mininode_lock: - self.test_node.last_getdata = None + test_node.last_getdata = None if announce == "inv": - self.test_node.send_message(msg_inv([CInv(2, block.sha256)])) + test_node.send_message(msg_inv([CInv(2, block.sha256)])) else: - self.test_node.send_header_for_blocks([block]) - success = wait_until(lambda: self.test_node.last_getdata is not None, timeout=30) + test_node.send_header_for_blocks([block]) + success = wait_until(lambda: test_node.last_getdata is not None, timeout=30) assert(success) - assert_equal(len(self.test_node.last_getdata.inv), 1) - assert_equal(self.test_node.last_getdata.inv[0].type, 4) - assert_equal(self.test_node.last_getdata.inv[0].hash, block.sha256) + assert_equal(len(test_node.last_getdata.inv), 1) + assert_equal(test_node.last_getdata.inv[0].type, 4) + assert_equal(test_node.last_getdata.inv[0].hash, block.sha256) # Send back a compactblock message that omits the coinbase comp_block = HeaderAndShortIDs() comp_block.header = CBlockHeader(block) comp_block.nonce = 0 comp_block.shortids = [1] # this is useless, and wrong - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.hashPrevBlock) + test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock) # Expect a getblocktxn message. with mininode_lock: - assert(self.test_node.last_getblocktxn is not None) - absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert(test_node.last_getblocktxn is not None) + absolute_indexes = test_node.last_getblocktxn.block_txn_request.to_absolute() assert_equal(absolute_indexes, [0]) # should be a coinbase request # Send the coinbase, and verify that the tip advances. msg = msg_blocktxn() msg.block_transactions.blockhash = block.sha256 msg.block_transactions.transactions = [block.vtx[0]] - self.test_node.send_and_ping(msg) - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + test_node.send_and_ping(msg) + assert_equal(int(node.getbestblockhash(), 16), block.sha256) # Create a chain of transactions from given utxo, and add to a new block. - def build_block_with_transactions(self, utxo, num_transactions): - block = self.build_block_on_tip() + def build_block_with_transactions(self, node, utxo, num_transactions): + block = self.build_block_on_tip(node) for i in range(num_transactions): tx = CTransaction() @@ -381,118 +437,113 @@ def build_block_with_transactions(self, utxo, num_transactions): # Test that we only receive getblocktxn requests for transactions that the # node needs, and that responding to them causes the block to be # reconstructed. - def test_getblocktxn_requests(self): - print("Testing getblocktxn requests...") + def test_getblocktxn_requests(self, node, test_node, version): + with_witness = (version==2) + + def test_getblocktxn_response(compact_block, peer, expected_result): + msg = msg_cmpctblock(compact_block.to_p2p()) + peer.send_and_ping(msg) + with mininode_lock: + assert(peer.last_getblocktxn is not None) + absolute_indexes = peer.last_getblocktxn.block_txn_request.to_absolute() + assert_equal(absolute_indexes, expected_result) + + def test_tip_after_message(node, peer, msg, tip): + peer.send_and_ping(msg) + assert_equal(int(node.getbestblockhash(), 16), tip) # First try announcing compactblocks that won't reconstruct, and verify # that we receive getblocktxn messages back. utxo = self.utxos.pop(0) - block = self.build_block_with_transactions(utxo, 5) + block = self.build_block_with_transactions(node, utxo, 5) self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) - comp_block = HeaderAndShortIDs() - comp_block.initialize_from_block(block) + comp_block.initialize_from_block(block, use_witness=with_witness) - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) - with mininode_lock: - assert(self.test_node.last_getblocktxn is not None) - absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() - assert_equal(absolute_indexes, [1, 2, 3, 4, 5]) - msg = msg_blocktxn() - msg.block_transactions = BlockTransactions(block.sha256, block.vtx[1:]) - self.test_node.send_and_ping(msg) - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + test_getblocktxn_response(comp_block, test_node, [1, 2, 3, 4, 5]) + + msg_bt = msg_blocktxn() + if with_witness: + msg_bt = msg_witness_blocktxn() # serialize with witnesses + msg_bt.block_transactions = BlockTransactions(block.sha256, block.vtx[1:]) + test_tip_after_message(node, test_node, msg_bt, block.sha256) utxo = self.utxos.pop(0) - block = self.build_block_with_transactions(utxo, 5) + block = self.build_block_with_transactions(node, utxo, 5) self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) # Now try interspersing the prefilled transactions - comp_block.initialize_from_block(block, prefill_list=[0, 1, 5]) - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) - with mininode_lock: - assert(self.test_node.last_getblocktxn is not None) - absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() - assert_equal(absolute_indexes, [2, 3, 4]) - msg.block_transactions = BlockTransactions(block.sha256, block.vtx[2:5]) - self.test_node.send_and_ping(msg) - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + comp_block.initialize_from_block(block, prefill_list=[0, 1, 5], use_witness=with_witness) + test_getblocktxn_response(comp_block, test_node, [2, 3, 4]) + msg_bt.block_transactions = BlockTransactions(block.sha256, block.vtx[2:5]) + test_tip_after_message(node, test_node, msg_bt, block.sha256) # Now try giving one transaction ahead of time. utxo = self.utxos.pop(0) - block = self.build_block_with_transactions(utxo, 5) + block = self.build_block_with_transactions(node, utxo, 5) self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) - self.test_node.send_and_ping(msg_tx(block.vtx[1])) - assert(block.vtx[1].hash in self.nodes[0].getrawmempool()) + test_node.send_and_ping(msg_tx(block.vtx[1])) + assert(block.vtx[1].hash in node.getrawmempool()) # Prefill 4 out of the 6 transactions, and verify that only the one # that was not in the mempool is requested. - comp_block.initialize_from_block(block, prefill_list=[0, 2, 3, 4]) - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) - with mininode_lock: - assert(self.test_node.last_getblocktxn is not None) - absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() - assert_equal(absolute_indexes, [5]) + comp_block.initialize_from_block(block, prefill_list=[0, 2, 3, 4], use_witness=with_witness) + test_getblocktxn_response(comp_block, test_node, [5]) - msg.block_transactions = BlockTransactions(block.sha256, [block.vtx[5]]) - self.test_node.send_and_ping(msg) - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + msg_bt.block_transactions = BlockTransactions(block.sha256, [block.vtx[5]]) + test_tip_after_message(node, test_node, msg_bt, block.sha256) # Now provide all transactions to the node before the block is # announced and verify reconstruction happens immediately. utxo = self.utxos.pop(0) - block = self.build_block_with_transactions(utxo, 10) + block = self.build_block_with_transactions(node, utxo, 10) self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) for tx in block.vtx[1:]: - self.test_node.send_message(msg_tx(tx)) - self.test_node.sync_with_ping() + test_node.send_message(msg_tx(tx)) + test_node.sync_with_ping() # Make sure all transactions were accepted. - mempool = self.nodes[0].getrawmempool() + mempool = node.getrawmempool() for tx in block.vtx[1:]: assert(tx.hash in mempool) # Clear out last request. with mininode_lock: - self.test_node.last_getblocktxn = None + test_node.last_getblocktxn = None # Send compact block - comp_block.initialize_from_block(block, prefill_list=[0]) - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + comp_block.initialize_from_block(block, prefill_list=[0], use_witness=with_witness) + test_tip_after_message(node, test_node, msg_cmpctblock(comp_block.to_p2p()), block.sha256) with mininode_lock: # Shouldn't have gotten a request for any transaction - assert(self.test_node.last_getblocktxn is None) - # Tip should have updated - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) + assert(test_node.last_getblocktxn is None) # Incorrectly responding to a getblocktxn shouldn't cause the block to be # permanently failed. - def test_incorrect_blocktxn_response(self): - print("Testing handling of incorrect blocktxn responses...") - + def test_incorrect_blocktxn_response(self, node, test_node, version): if (len(self.utxos) == 0): self.make_utxos() utxo = self.utxos.pop(0) - block = self.build_block_with_transactions(utxo, 10) + block = self.build_block_with_transactions(node, utxo, 10) self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) # Relay the first 5 transactions from the block in advance for tx in block.vtx[1:6]: - self.test_node.send_message(msg_tx(tx)) - self.test_node.sync_with_ping() + test_node.send_message(msg_tx(tx)) + test_node.sync_with_ping() # Make sure all transactions were accepted. - mempool = self.nodes[0].getrawmempool() + mempool = node.getrawmempool() for tx in block.vtx[1:6]: assert(tx.hash in mempool) # Send compact block comp_block = HeaderAndShortIDs() - comp_block.initialize_from_block(block, prefill_list=[0]) - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + comp_block.initialize_from_block(block, prefill_list=[0], use_witness=(version == 2)) + test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) absolute_indexes = [] with mininode_lock: - assert(self.test_node.last_getblocktxn is not None) - absolute_indexes = self.test_node.last_getblocktxn.block_txn_request.to_absolute() + assert(test_node.last_getblocktxn is not None) + absolute_indexes = test_node.last_getblocktxn.block_txn_request.to_absolute() assert_equal(absolute_indexes, [6, 7, 8, 9, 10]) # Now give an incorrect response. @@ -504,100 +555,107 @@ def test_incorrect_blocktxn_response(self): # verifying that the block isn't marked bad permanently. This is good # enough for now. msg = msg_blocktxn() + if version==2: + msg = msg_witness_blocktxn() msg.block_transactions = BlockTransactions(block.sha256, [block.vtx[5]] + block.vtx[7:]) - self.test_node.send_and_ping(msg) + test_node.send_and_ping(msg) # Tip should not have updated - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.hashPrevBlock) + assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock) # We should receive a getdata request - success = wait_until(lambda: self.test_node.last_getdata is not None, timeout=10) + success = wait_until(lambda: test_node.last_getdata is not None, timeout=10) assert(success) - assert_equal(len(self.test_node.last_getdata.inv), 1) - assert_equal(self.test_node.last_getdata.inv[0].type, 2) - assert_equal(self.test_node.last_getdata.inv[0].hash, block.sha256) + assert_equal(len(test_node.last_getdata.inv), 1) + assert(test_node.last_getdata.inv[0].type == 2 or test_node.last_getdata.inv[0].type == 2|MSG_WITNESS_FLAG) + assert_equal(test_node.last_getdata.inv[0].hash, block.sha256) # Deliver the block - self.test_node.send_and_ping(msg_block(block)) - assert_equal(int(self.nodes[0].getbestblockhash(), 16), block.sha256) - - def test_getblocktxn_handler(self): - print("Testing getblocktxn handler...") + if version==2: + test_node.send_and_ping(msg_witness_block(block)) + else: + test_node.send_and_ping(msg_block(block)) + assert_equal(int(node.getbestblockhash(), 16), block.sha256) + def test_getblocktxn_handler(self, node, test_node, version): # bitcoind won't respond for blocks whose height is more than 15 blocks # deep. MAX_GETBLOCKTXN_DEPTH = 15 - chain_height = self.nodes[0].getblockcount() + chain_height = node.getblockcount() current_height = chain_height while (current_height >= chain_height - MAX_GETBLOCKTXN_DEPTH): - block_hash = self.nodes[0].getblockhash(current_height) - block = FromHex(CBlock(), self.nodes[0].getblock(block_hash, False)) + block_hash = node.getblockhash(current_height) + block = FromHex(CBlock(), node.getblock(block_hash, False)) msg = msg_getblocktxn() msg.block_txn_request = BlockTransactionsRequest(int(block_hash, 16), []) num_to_request = random.randint(1, len(block.vtx)) msg.block_txn_request.from_absolute(sorted(random.sample(range(len(block.vtx)), num_to_request))) - self.test_node.send_message(msg) - success = wait_until(lambda: self.test_node.last_blocktxn is not None, timeout=10) + test_node.send_message(msg) + success = wait_until(lambda: test_node.last_blocktxn is not None, timeout=10) assert(success) [tx.calc_sha256() for tx in block.vtx] with mininode_lock: - assert_equal(self.test_node.last_blocktxn.block_transactions.blockhash, int(block_hash, 16)) + assert_equal(test_node.last_blocktxn.block_transactions.blockhash, int(block_hash, 16)) all_indices = msg.block_txn_request.to_absolute() for index in all_indices: - tx = self.test_node.last_blocktxn.block_transactions.transactions.pop(0) + tx = test_node.last_blocktxn.block_transactions.transactions.pop(0) tx.calc_sha256() assert_equal(tx.sha256, block.vtx[index].sha256) - self.test_node.last_blocktxn = None + if version == 1: + # Witnesses should have been stripped + assert(tx.wit.is_null()) + else: + # Check that the witness matches + assert_equal(tx.calc_sha256(True), block.vtx[index].calc_sha256(True)) + test_node.last_blocktxn = None current_height -= 1 # Next request should be ignored, as we're past the allowed depth. - block_hash = self.nodes[0].getblockhash(current_height) + block_hash = node.getblockhash(current_height) msg.block_txn_request = BlockTransactionsRequest(int(block_hash, 16), [0]) - self.test_node.send_and_ping(msg) + test_node.send_and_ping(msg) with mininode_lock: - assert_equal(self.test_node.last_blocktxn, None) - - def test_compactblocks_not_at_tip(self): - print("Testing compactblock requests/announcements not at chain tip...") + assert_equal(test_node.last_blocktxn, None) + def test_compactblocks_not_at_tip(self, node, test_node): # Test that requesting old compactblocks doesn't work. MAX_CMPCTBLOCK_DEPTH = 11 new_blocks = [] for i in range(MAX_CMPCTBLOCK_DEPTH): - self.test_node.clear_block_announcement() - new_blocks.append(self.nodes[0].generate(1)[0]) - wait_until(self.test_node.received_block_announcement, timeout=30) + test_node.clear_block_announcement() + new_blocks.append(node.generate(1)[0]) + wait_until(test_node.received_block_announcement, timeout=30) - self.test_node.clear_block_announcement() - self.test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) - success = wait_until(lambda: self.test_node.last_cmpctblock is not None, timeout=30) + test_node.clear_block_announcement() + test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) + success = wait_until(lambda: test_node.last_cmpctblock is not None, timeout=30) assert(success) - self.test_node.clear_block_announcement() - self.nodes[0].generate(1) - wait_until(self.test_node.received_block_announcement, timeout=30) - self.test_node.clear_block_announcement() - self.test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) - success = wait_until(lambda: self.test_node.last_block is not None, timeout=30) + test_node.clear_block_announcement() + node.generate(1) + wait_until(test_node.received_block_announcement, timeout=30) + test_node.clear_block_announcement() + test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) + success = wait_until(lambda: test_node.last_block is not None, timeout=30) assert(success) with mininode_lock: - self.test_node.last_block.block.calc_sha256() - assert_equal(self.test_node.last_block.block.sha256, int(new_blocks[0], 16)) + test_node.last_block.block.calc_sha256() + assert_equal(test_node.last_block.block.sha256, int(new_blocks[0], 16)) # Generate an old compactblock, and verify that it's not accepted. - cur_height = self.nodes[0].getblockcount() - hashPrevBlock = int(self.nodes[0].getblockhash(cur_height-5), 16) - block = self.build_block_on_tip() + cur_height = node.getblockcount() + hashPrevBlock = int(node.getblockhash(cur_height-5), 16) + block = self.build_block_on_tip(node) block.hashPrevBlock = hashPrevBlock block.solve() comp_block = HeaderAndShortIDs() comp_block.initialize_from_block(block) - self.test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) + test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) - tips = self.nodes[0].getchaintips() + tips = node.getchaintips() found = False for x in tips: if x["hash"] == block.hash: @@ -611,18 +669,61 @@ def test_compactblocks_not_at_tip(self): msg = msg_getblocktxn() msg.block_txn_request = BlockTransactionsRequest(block.sha256, [0]) with mininode_lock: - self.test_node.last_blocktxn = None - self.test_node.send_and_ping(msg) + test_node.last_blocktxn = None + test_node.send_and_ping(msg) with mininode_lock: - assert(self.test_node.last_blocktxn is None) + assert(test_node.last_blocktxn is None) + + def activate_segwit(self, node): + node.generate(144*3) + assert_equal(get_bip9_status(node, "segwit")["status"], 'active') + + def test_end_to_end_block_relay(self, node, listeners): + utxo = self.utxos.pop(0) + + block = self.build_block_with_transactions(node, utxo, 10) + + [l.clear_block_announcement() for l in listeners] + + # ToHex() won't serialize with witness, but this block has no witnesses + # anyway. TODO: repeat this test with witness tx's to a segwit node. + node.submitblock(ToHex(block)) + + for l in listeners: + wait_until(lambda: l.received_block_announcement(), timeout=30) + with mininode_lock: + for l in listeners: + assert(l.last_cmpctblock is not None) + l.last_cmpctblock.header_and_shortids.header.calc_sha256() + assert_equal(l.last_cmpctblock.header_and_shortids.header.sha256, block.sha256) + + # Helper for enabling cb announcements + # Send the sendcmpct request and sync headers + def request_cb_announcements(self, peer, node, version): + tip = node.getbestblockhash() + peer.get_headers(locator=[int(tip, 16)], hashstop=0) + + msg = msg_sendcmpct() + msg.version = version + msg.announce = True + peer.send_and_ping(msg) + def run_test(self): # Setup the p2p connections and start up the network thread. self.test_node = TestNode() + self.segwit_node = TestNode() + self.old_node = TestNode() # version 1 peer <--> segwit node connections = [] connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.test_node)) + connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], + self.segwit_node, services=NODE_NETWORK|NODE_WITNESS)) + connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], + self.old_node, services=NODE_NETWORK)) self.test_node.add_connection(connections[0]) + self.segwit_node.add_connection(connections[1]) + self.old_node.add_connection(connections[2]) NetworkThread().start() # Start up network handling in another thread @@ -632,13 +733,107 @@ def run_test(self): # We will need UTXOs to construct transactions in later tests. self.make_utxos() - self.test_sendcmpct() - self.test_compactblock_construction() - self.test_compactblock_requests() - self.test_getblocktxn_requests() - self.test_getblocktxn_handler() - self.test_compactblocks_not_at_tip() - self.test_incorrect_blocktxn_response() + print("Running tests, pre-segwit activation:") + + print("\tTesting SENDCMPCT p2p message... ") + self.test_sendcmpct(self.nodes[0], self.test_node, 1) + sync_blocks(self.nodes) + self.test_sendcmpct(self.nodes[1], self.segwit_node, 2, old_node=self.old_node) + sync_blocks(self.nodes) + + print("\tTesting compactblock construction...") + self.test_compactblock_construction(self.nodes[0], self.test_node, 1, False) + sync_blocks(self.nodes) + self.test_compactblock_construction(self.nodes[1], self.segwit_node, 2, False) + sync_blocks(self.nodes) + + print("\tTesting compactblock requests... ") + self.test_compactblock_requests(self.nodes[0], self.test_node) + sync_blocks(self.nodes) + self.test_compactblock_requests(self.nodes[1], self.segwit_node) + sync_blocks(self.nodes) + + print("\tTesting getblocktxn requests...") + self.test_getblocktxn_requests(self.nodes[0], self.test_node, 1) + sync_blocks(self.nodes) + self.test_getblocktxn_requests(self.nodes[1], self.segwit_node, 2) + sync_blocks(self.nodes) + + print("\tTesting getblocktxn handler...") + self.test_getblocktxn_handler(self.nodes[0], self.test_node, 1) + sync_blocks(self.nodes) + self.test_getblocktxn_handler(self.nodes[1], self.segwit_node, 2) + self.test_getblocktxn_handler(self.nodes[1], self.old_node, 1) + sync_blocks(self.nodes) + + print("\tTesting compactblock requests/announcements not at chain tip...") + self.test_compactblocks_not_at_tip(self.nodes[0], self.test_node) + sync_blocks(self.nodes) + self.test_compactblocks_not_at_tip(self.nodes[1], self.segwit_node) + self.test_compactblocks_not_at_tip(self.nodes[1], self.old_node) + sync_blocks(self.nodes) + + print("\tTesting handling of incorrect blocktxn responses...") + self.test_incorrect_blocktxn_response(self.nodes[0], self.test_node, 1) + sync_blocks(self.nodes) + self.test_incorrect_blocktxn_response(self.nodes[1], self.segwit_node, 2) + sync_blocks(self.nodes) + + # End-to-end block relay tests + print("\tTesting end-to-end block relay...") + self.request_cb_announcements(self.test_node, self.nodes[0], 1) + self.request_cb_announcements(self.old_node, self.nodes[1], 1) + self.request_cb_announcements(self.segwit_node, self.nodes[1], 2) + self.test_end_to_end_block_relay(self.nodes[0], [self.segwit_node, self.test_node, self.old_node]) + self.test_end_to_end_block_relay(self.nodes[1], [self.segwit_node, self.test_node, self.old_node]) + + # Advance to segwit activation + print ("\nAdvancing to segwit activation\n") + self.activate_segwit(self.nodes[1]) + print ("Running tests, post-segwit activation...") + + print("\tTesting compactblock construction...") + self.test_compactblock_construction(self.nodes[1], self.old_node, 1, True) + self.test_compactblock_construction(self.nodes[1], self.segwit_node, 2, True) + sync_blocks(self.nodes) + + print("\tTesting compactblock requests (unupgraded node)... ") + self.test_compactblock_requests(self.nodes[0], self.test_node) + + print("\tTesting getblocktxn requests (unupgraded node)...") + self.test_getblocktxn_requests(self.nodes[0], self.test_node, 1) + + # Need to manually sync node0 and node1, because post-segwit activation, + # node1 will not download blocks from node0. + print("\tSyncing nodes...") + assert(self.nodes[0].getbestblockhash() != self.nodes[1].getbestblockhash()) + while (self.nodes[0].getblockcount() > self.nodes[1].getblockcount()): + block_hash = self.nodes[0].getblockhash(self.nodes[1].getblockcount()+1) + self.nodes[1].submitblock(self.nodes[0].getblock(block_hash, False)) + assert_equal(self.nodes[0].getbestblockhash(), self.nodes[1].getbestblockhash()) + + print("\tTesting compactblock requests (segwit node)... ") + self.test_compactblock_requests(self.nodes[1], self.segwit_node) + + print("\tTesting getblocktxn requests (segwit node)...") + self.test_getblocktxn_requests(self.nodes[1], self.segwit_node, 2) + sync_blocks(self.nodes) + + print("\tTesting getblocktxn handler (segwit node should return witnesses)...") + self.test_getblocktxn_handler(self.nodes[1], self.segwit_node, 2) + self.test_getblocktxn_handler(self.nodes[1], self.old_node, 1) + + # Test that if we submitblock to node1, we'll get a compact block + # announcement to all peers. + # (Post-segwit activation, blocks won't propagate from node0 to node1 + # automatically, so don't bother testing a block announced to node0.) + print("\tTesting end-to-end block relay...") + self.request_cb_announcements(self.test_node, self.nodes[0], 1) + self.request_cb_announcements(self.old_node, self.nodes[1], 1) + self.request_cb_announcements(self.segwit_node, self.nodes[1], 2) + self.test_end_to_end_block_relay(self.nodes[1], [self.segwit_node, self.test_node, self.old_node]) + + print("\tTesting invalid index in cmpctblock message...") self.test_invalid_cmpctblock_message() From 61e282b62d7d4f0bca435c6e1b836d3b2c3a0874 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 14 Sep 2016 21:00:29 -0400 Subject: [PATCH 156/302] [qa] Add support for compactblocks v2 to mininode Github-Pull: #8393 Rebased-From: 422fac649f75c907cad6ab7e2768b9032b9eae42 --- qa/rpc-tests/test_framework/mininode.py | 35 +++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 88a3b7e0f71..b7e47374890 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -755,6 +755,9 @@ def serialize(self, with_witness=False): r += self.tx.serialize_without_witness() return r + def serialize_with_witness(self): + return self.serialize(with_witness=True) + def __repr__(self): return "PrefilledTransaction(index=%d, tx=%s)" % (self.index, repr(self.tx)) @@ -779,6 +782,7 @@ def deserialize(self, f): self.prefilled_txn = deser_vector(f, PrefilledTransaction) self.prefilled_txn_length = len(self.prefilled_txn) + # When using version 2 compact blocks, we must serialize with_witness. def serialize(self, with_witness=False): r = b"" r += self.header.serialize() @@ -787,12 +791,20 @@ def serialize(self, with_witness=False): for x in self.shortids: # We only want the first 6 bytes r += struct.pack(" Date: Sat, 17 Sep 2016 22:11:00 -0400 Subject: [PATCH 157/302] [qa] Fix bug in mininode witness deserialization Also improve tx printing Github-Pull: #8393 Rebased-From: f5b9b8f437c040205896ad0d7a6656efa08b5601 --- qa/rpc-tests/test_framework/mininode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index b7e47374890..4d238c08d9c 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -452,7 +452,7 @@ def deserialize(self, f): else: self.vout = deser_vector(f, CTxOut) if flags != 0: - self.wit.vtxinwit = [CTxInWitness()]*len(self.vin) + self.wit.vtxinwit = [CTxInWitness() for i in range(len(self.vin))] self.wit.deserialize(f) self.nLockTime = struct.unpack(" Date: Sat, 25 Jun 2016 19:17:45 +0200 Subject: [PATCH 158/302] Use cmpctblock type 2 for segwit-enabled transfer Contains version negotiation logic by Matt Corallo and bugfixes by Suhas Daftuar. Github-Pull: #8393 Rebased-From: 6aa28abf53ef4694692474b4a3b0a8fa7559b50b --- src/blockencodings.cpp | 4 +- src/blockencodings.h | 2 +- src/main.cpp | 78 ++++++++++++++++++++++++++++----------- src/test/blockencodings_tests.cpp | 6 +-- src/txmempool.cpp | 2 +- src/txmempool.h | 2 +- 6 files changed, 64 insertions(+), 30 deletions(-) diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index df237f8f26f..93d3fa372b3 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -17,7 +17,7 @@ #define MIN_TRANSACTION_BASE_SIZE (::GetSerializeSize(CTransaction(), SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS)) -CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) : +CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block, bool fUseWTXID) : nonce(GetRand(std::numeric_limits::max())), shorttxids(block.vtx.size() - 1), prefilledtxn(1), header(block) { FillShortTxIDSelector(); @@ -25,7 +25,7 @@ CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) : prefilledtxn[0] = {0, block.vtx[0]}; for (size_t i = 1; i < block.vtx.size(); i++) { const CTransaction& tx = block.vtx[i]; - shorttxids[i - 1] = GetShortID(tx.GetHash()); + shorttxids[i - 1] = GetShortID(fUseWTXID ? tx.GetWitnessHash() : tx.GetHash()); } } diff --git a/src/blockencodings.h b/src/blockencodings.h index b980e9e2866..2f87c6d31de 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -146,7 +146,7 @@ class CBlockHeaderAndShortTxIDs { // Dummy for deserialization CBlockHeaderAndShortTxIDs() {} - CBlockHeaderAndShortTxIDs(const CBlock& block); + CBlockHeaderAndShortTxIDs(const CBlock& block, bool fUseWTXID); uint64_t GetShortID(const uint256& txhash) const; diff --git a/src/main.cpp b/src/main.cpp index c8e290ae515..ea7c7fd95e4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -292,10 +292,21 @@ struct CNodeState { bool fPreferHeaders; //! Whether this peer wants invs or cmpctblocks (when possible) for block announcements. bool fPreferHeaderAndIDs; - //! Whether this peer will send us cmpctblocks if we request them + /** + * Whether this peer will send us cmpctblocks if we request them. + * This is not used to gate request logic, as we really only care about fSupportsDesiredCmpctVersion, + * but is used as a flag to "lock in" the version of compact blocks (fWantsCmpctWitness) we send. + */ bool fProvidesHeaderAndIDs; //! Whether this peer can give us witnesses bool fHaveWitness; + //! Whether this peer wants witnesses in cmpctblocks/blocktxns + bool fWantsCmpctWitness; + /** + * If we've announced NODE_WITNESS to this peer: whether the peer sends witnesses in cmpctblocks/blocktxns, + * otherwise: whether this peer sends non-witnesses in cmpctblocks/blocktxns. + */ + bool fSupportsDesiredCmpctVersion; CNodeState() { fCurrentlyConnected = false; @@ -316,6 +327,8 @@ struct CNodeState { fPreferHeaderAndIDs = false; fProvidesHeaderAndIDs = false; fHaveWitness = false; + fWantsCmpctWitness = false; + fSupportsDesiredCmpctVersion = false; } }; @@ -475,8 +488,8 @@ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) { } void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pfrom) { - if (nLocalServices & NODE_WITNESS) { - // Don't ever request compact blocks when segwit is enabled. + if (!nodestate->fSupportsDesiredCmpctVersion) { + // Never ask from peers who can't provide witnesses. return; } if (nodestate->fProvidesHeaderAndIDs) { @@ -484,7 +497,7 @@ void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pf if (nodeid == pfrom->GetId()) return; bool fAnnounceUsingCMPCTBLOCK = false; - uint64_t nCMPCTBLOCKVersion = 1; + uint64_t nCMPCTBLOCKVersion = (pfrom->GetLocalServices() & NODE_WITNESS) ? 2 : 1; if (lNodesAnnouncingHeaderAndIDs.size() >= 3) { // As per BIP152, we only get 3 of our peers to announce // blocks using compact encodings. @@ -4832,11 +4845,12 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam // they wont have a useful mempool to match against a compact block, // and we don't feel like constructing the object for them, so // instead we respond with the full, non-compact block. + bool fPeerWantsWitness = State(pfrom->GetId())->fWantsCmpctWitness; if (mi->second->nHeight >= chainActive.Height() - 10) { - CBlockHeaderAndShortTxIDs cmpctblock(block); - pfrom->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock); + CBlockHeaderAndShortTxIDs cmpctblock(block, fPeerWantsWitness); + pfrom->PushMessageWithFlag(fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock); } else - pfrom->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCK, block); + pfrom->PushMessageWithFlag(fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCK, block); } // Trigger the peer node to send a getblocks request for the next batch of inventory @@ -5102,13 +5116,16 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pfrom->PushMessage(NetMsgType::SENDHEADERS); } if (pfrom->nVersion >= SHORT_IDS_BLOCKS_VERSION) { - // Tell our peer we are willing to provide version-1 cmpctblocks + // Tell our peer we are willing to provide version 1 or 2 cmpctblocks // However, we do not request new block announcements using // cmpctblock messages. // We send this to non-NODE NETWORK peers as well, because // they may wish to request compact blocks from us bool fAnnounceUsingCMPCTBLOCK = false; - uint64_t nCMPCTBLOCKVersion = 1; + uint64_t nCMPCTBLOCKVersion = 2; + if (pfrom->GetLocalServices() & NODE_WITNESS) + pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); + nCMPCTBLOCKVersion = 1; pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); } } @@ -5188,12 +5205,23 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, else if (strCommand == NetMsgType::SENDCMPCT) { bool fAnnounceUsingCMPCTBLOCK = false; - uint64_t nCMPCTBLOCKVersion = 1; + uint64_t nCMPCTBLOCKVersion = 0; vRecv >> fAnnounceUsingCMPCTBLOCK >> nCMPCTBLOCKVersion; - if (nCMPCTBLOCKVersion == 1) { + if (nCMPCTBLOCKVersion == 1 || ((pfrom->GetLocalServices() & NODE_WITNESS) && nCMPCTBLOCKVersion == 2)) { LOCK(cs_main); - State(pfrom->GetId())->fProvidesHeaderAndIDs = true; - State(pfrom->GetId())->fPreferHeaderAndIDs = fAnnounceUsingCMPCTBLOCK; + // fProvidesHeaderAndIDs is used to "lock in" version of compact blocks we send (fWantsCmpctWitness) + if (!State(pfrom->GetId())->fProvidesHeaderAndIDs) { + State(pfrom->GetId())->fProvidesHeaderAndIDs = true; + State(pfrom->GetId())->fWantsCmpctWitness = nCMPCTBLOCKVersion == 2; + } + if (State(pfrom->GetId())->fWantsCmpctWitness == (nCMPCTBLOCKVersion == 2)) // ignore later version announces + State(pfrom->GetId())->fPreferHeaderAndIDs = fAnnounceUsingCMPCTBLOCK; + if (!State(pfrom->GetId())->fSupportsDesiredCmpctVersion) { + if (pfrom->GetLocalServices() & NODE_WITNESS) + State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 2); + else + State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 1); + } } } @@ -5251,7 +5279,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER && (!IsWitnessEnabled(chainActive.Tip(), chainparams.GetConsensus()) || State(pfrom->GetId())->fHaveWitness)) { inv.type |= nFetchFlags; - if (nodestate->fProvidesHeaderAndIDs && !(nLocalServices & NODE_WITNESS)) + if (nodestate->fSupportsDesiredCmpctVersion) vToFetch.push_back(CInv(MSG_CMPCT_BLOCK, inv.hash)); else vToFetch.push_back(inv); @@ -5379,7 +5407,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } resp.txn[i] = block.vtx[req.indexes[i]]; } - pfrom->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCKTXN, resp); + pfrom->PushMessageWithFlag(State(pfrom->GetId())->fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCKTXN, resp); } @@ -5643,7 +5671,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // We requested this block for some reason, but our mempool will probably be useless // so we just grab the block via normal getdata std::vector vInv(1); - vInv[0] = CInv(MSG_BLOCK, cmpctblock.header.GetHash()); + vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash()); pfrom->PushMessage(NetMsgType::GETDATA, vInv); } return true; @@ -5655,6 +5683,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, CNodeState *nodestate = State(pfrom->GetId()); + if (IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus()) && !nodestate->fSupportsDesiredCmpctVersion) { + // Don't bother trying to process compact blocks from v1 peers + // after segwit activates. + return true; + } + // We want to be a bit conservative just to be extra careful about DoS // possibilities in compact block processing... if (pindex->nHeight <= chainActive.Height() + 2) { @@ -5681,7 +5715,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } else if (status == READ_STATUS_FAILED) { // Duplicate txindexes, the block is now in-flight, so just request it std::vector vInv(1); - vInv[0] = CInv(MSG_BLOCK, cmpctblock.header.GetHash()); + vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash()); pfrom->PushMessage(NetMsgType::GETDATA, vInv); return true; } @@ -5708,7 +5742,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // We requested this block, but its far into the future, so our // mempool will probably be useless - request the block normally std::vector vInv(1); - vInv[0] = CInv(MSG_BLOCK, cmpctblock.header.GetHash()); + vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash()); pfrom->PushMessage(NetMsgType::GETDATA, vInv); return true; } else { @@ -5750,7 +5784,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } else if (status == READ_STATUS_FAILED) { // Might have collided, fall back to getdata now :( std::vector invs; - invs.push_back(CInv(MSG_BLOCK, resp.blockhash)); + invs.push_back(CInv(MSG_BLOCK | GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus()), resp.blockhash)); pfrom->PushMessage(NetMsgType::GETDATA, invs); } else { CValidationState state; @@ -5899,7 +5933,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, pindexLast->GetBlockHash().ToString(), pindexLast->nHeight); } if (vGetData.size() > 0) { - if (nodestate->fProvidesHeaderAndIDs && vGetData.size() == 1 && mapBlocksInFlight.size() == 1 && pindexLast->pprev->IsValid(BLOCK_VALID_CHAIN) && !(nLocalServices & NODE_WITNESS)) { + if (nodestate->fSupportsDesiredCmpctVersion && vGetData.size() == 1 && mapBlocksInFlight.size() == 1 && pindexLast->pprev->IsValid(BLOCK_VALID_CHAIN)) { // We seem to be rather well-synced, so it appears pfrom was the first to provide us // with this block! Let's get them to announce using compact blocks in the future. MaybeSetPeerAsAnnouncingHeaderAndIDs(nodestate, pfrom); @@ -6527,8 +6561,8 @@ bool SendMessages(CNode* pto) //TODO: Shouldn't need to reload block from disk, but requires refactor CBlock block; assert(ReadBlockFromDisk(block, pBestIndex, consensusParams)); - CBlockHeaderAndShortTxIDs cmpctblock(block); - pto->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock); + CBlockHeaderAndShortTxIDs cmpctblock(block, state.fWantsCmpctWitness); + pto->PushMessageWithFlag(state.fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock); state.pindexBestHeaderSent = pBestIndex; } else if (state.fPreferHeaders) { if (vHeaders.size() > 1) { diff --git a/src/test/blockencodings_tests.cpp b/src/test/blockencodings_tests.cpp index 3884bf3fe37..153a41ba74c 100644 --- a/src/test/blockencodings_tests.cpp +++ b/src/test/blockencodings_tests.cpp @@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(SimpleRoundTripTest) // Do a simple ShortTxIDs RT { - CBlockHeaderAndShortTxIDs shortIDs(block); + CBlockHeaderAndShortTxIDs shortIDs(block, true); CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); stream << shortIDs; @@ -116,7 +116,7 @@ class TestHeaderAndShortIDs { stream >> *this; } TestHeaderAndShortIDs(const CBlock& block) : - TestHeaderAndShortIDs(CBlockHeaderAndShortTxIDs(block)) {} + TestHeaderAndShortIDs(CBlockHeaderAndShortTxIDs(block, true)) {} uint64_t GetShortID(const uint256& txhash) const { CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); @@ -267,7 +267,7 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest) // Test simple header round-trip with only coinbase { - CBlockHeaderAndShortTxIDs shortIDs(block); + CBlockHeaderAndShortTxIDs shortIDs(block, false); CDataStream stream(SER_NETWORK, PROTOCOL_VERSION); stream << shortIDs; diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 8b974d73124..59afb2cf5ab 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -444,7 +444,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, totalTxSize += entry.GetTxSize(); minerPolicyEstimator->processTransaction(entry, fCurrentEstimate); - vTxHashes.emplace_back(hash, newit); + vTxHashes.emplace_back(tx.GetWitnessHash(), newit); newit->vTxHashesIdx = vTxHashes.size() - 1; return true; diff --git a/src/txmempool.h b/src/txmempool.h index 2c2127f326d..afb328b5af3 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -462,7 +462,7 @@ class CTxMemPool indexed_transaction_set mapTx; typedef indexed_transaction_set::nth_index<0>::type::iterator txiter; - std::vector > vTxHashes; //!< All tx hashes/entries in mapTx, in random order + std::vector > vTxHashes; //!< All tx witness hashes/entries in mapTx, in random order struct CompareIteratorByHash { bool operator()(const txiter &a, const txiter &b) const { From 890ac2563872f9b71b9863ad531c639e526df5d7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 3 Oct 2016 13:33:07 -0400 Subject: [PATCH 159/302] Fix overly-prescriptive p2p-segwit test for new fetch logic Github-Pull: #8393 Rebased-From: be7555f0c03057bb5537cc42ca9d4937389f0670 --- qa/rpc-tests/p2p-segwit.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index ada5fba7f33..69bab387677 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -909,14 +909,6 @@ def test_witness_tx_relay_before_segwit_activation(self): # But eliminating the witness should fix it self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) - # Verify that inv's to test_node come with getdata's for non-witness tx's - # Just tweak the transaction, announce it, and verify we get a getdata - # for a normal tx - tx.vout[0].scriptPubKey = CScript([OP_TRUE, OP_TRUE]) - tx.rehash() - self.test_node.announce_tx_and_wait_for_getdata(tx) - assert(self.test_node.last_getdata.inv[0].type == 1) - # Cleanup: mine the first transaction and update utxo self.nodes[0].generate(1) assert_equal(len(self.nodes[0].getrawmempool()), 0) @@ -1022,7 +1014,7 @@ def test_tx_relay_after_segwit_activation(self): def test_block_relay(self, segwit_activated): print("\tTesting block relay") - blocktype = 2|MSG_WITNESS_FLAG if segwit_activated else 2 + blocktype = 2|MSG_WITNESS_FLAG # test_node has set NODE_WITNESS, so all getdata requests should be for # witness blocks. From 4bb9ce8a958f5a55d6a72330728b7fc3b5c820c0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 3 Oct 2016 13:00:14 -0400 Subject: [PATCH 160/302] Use cmpctblock type 2 for segwit-enabled transfer Contains version negotiation logic by Matt Corallo and bugfixes by Suhas Daftuar. Github-Pull: #8393 Rebased-From: 6aa28abf53ef4694692474b4a3b0a8fa7559b50b --- src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index ea7c7fd95e4..7fd13f4ecf9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -497,7 +497,7 @@ void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pf if (nodeid == pfrom->GetId()) return; bool fAnnounceUsingCMPCTBLOCK = false; - uint64_t nCMPCTBLOCKVersion = (pfrom->GetLocalServices() & NODE_WITNESS) ? 2 : 1; + uint64_t nCMPCTBLOCKVersion = (nLocalServices & NODE_WITNESS) ? 2 : 1; if (lNodesAnnouncingHeaderAndIDs.size() >= 3) { // As per BIP152, we only get 3 of our peers to announce // blocks using compact encodings. @@ -4912,7 +4912,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam uint32_t GetFetchFlags(CNode* pfrom, CBlockIndex* pprev, const Consensus::Params& chainparams) { uint32_t nFetchFlags = 0; - if (IsWitnessEnabled(pprev, chainparams) && State(pfrom->GetId())->fHaveWitness) { + if ((nLocalServices & NODE_WITNESS) && State(pfrom->GetId())->fHaveWitness) { nFetchFlags |= MSG_WITNESS_FLAG; } return nFetchFlags; @@ -5123,7 +5123,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // they may wish to request compact blocks from us bool fAnnounceUsingCMPCTBLOCK = false; uint64_t nCMPCTBLOCKVersion = 2; - if (pfrom->GetLocalServices() & NODE_WITNESS) + if (nLocalServices & NODE_WITNESS) pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); nCMPCTBLOCKVersion = 1; pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); @@ -5207,7 +5207,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, bool fAnnounceUsingCMPCTBLOCK = false; uint64_t nCMPCTBLOCKVersion = 0; vRecv >> fAnnounceUsingCMPCTBLOCK >> nCMPCTBLOCKVersion; - if (nCMPCTBLOCKVersion == 1 || ((pfrom->GetLocalServices() & NODE_WITNESS) && nCMPCTBLOCKVersion == 2)) { + if (nCMPCTBLOCKVersion == 1 || ((nLocalServices & NODE_WITNESS) && nCMPCTBLOCKVersion == 2)) { LOCK(cs_main); // fProvidesHeaderAndIDs is used to "lock in" version of compact blocks we send (fWantsCmpctWitness) if (!State(pfrom->GetId())->fProvidesHeaderAndIDs) { @@ -5217,7 +5217,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (State(pfrom->GetId())->fWantsCmpctWitness == (nCMPCTBLOCKVersion == 2)) // ignore later version announces State(pfrom->GetId())->fPreferHeaderAndIDs = fAnnounceUsingCMPCTBLOCK; if (!State(pfrom->GetId())->fSupportsDesiredCmpctVersion) { - if (pfrom->GetLocalServices() & NODE_WITNESS) + if (nLocalServices & NODE_WITNESS) State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 2); else State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 1); From cc6f55191a75dafa669fc6ee93ed86d860eb0d4a Mon Sep 17 00:00:00 2001 From: Dagur Valberg Johannsson Date: Sun, 9 Oct 2016 15:47:55 -0400 Subject: [PATCH 161/302] [qa] Fix compact block shortids for a test case Github-Pull: #8904 Rebased-From: 4cdece40419bcc97345357f9268e03b0aff400b5 --- qa/rpc-tests/p2p-compactblocks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index cdcfb36e7bd..e7f5a1c9c6f 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -402,7 +402,9 @@ def test_compactblock_requests(self, node, test_node): comp_block = HeaderAndShortIDs() comp_block.header = CBlockHeader(block) comp_block.nonce = 0 - comp_block.shortids = [1] # this is useless, and wrong + [k0, k1] = comp_block.get_siphash_keys() + comp_block.shortids = [ + calculate_shortid(k0, k1, block.vtx[0].sha256) ] test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock) # Expect a getblocktxn message. From bcf3806f4cb9dad1424c78f458b5398a927161e8 Mon Sep 17 00:00:00 2001 From: jonnynewbs Date: Wed, 21 Sep 2016 10:52:53 -0400 Subject: [PATCH 162/302] Update bitcoin-tx to output witness data. Github-Pull: #8817 Rebased-From: 4408558843c6c2b7abeb4160f641dfdbf5be5eb4 --- src/core_write.cpp | 11 ++++++++++- src/test/data/blanktx.json | 1 + src/test/data/tt-delin1-out.json | 1 + src/test/data/tt-delout1-out.json | 1 + src/test/data/tt-locktime317000-out.json | 1 + src/test/data/txcreate1.json | 1 + src/test/data/txcreate2.json | 1 + src/test/data/txcreatedata1.json | 1 + src/test/data/txcreatedata2.json | 1 + src/test/data/txcreatedata_seq0.json | 1 + src/test/data/txcreatedata_seq1.json | 1 + src/test/data/txcreatesign.json | 1 + 12 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/core_write.cpp b/src/core_write.cpp index 6f9e2266a39..ea01ddc10d8 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -151,11 +151,13 @@ void ScriptPubKeyToUniv(const CScript& scriptPubKey, void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry) { entry.pushKV("txid", tx.GetHash().GetHex()); + entry.pushKV("hash", tx.GetWitnessHash().GetHex()); entry.pushKV("version", tx.nVersion); entry.pushKV("locktime", (int64_t)tx.nLockTime); UniValue vin(UniValue::VARR); - BOOST_FOREACH(const CTxIn& txin, tx.vin) { + for (unsigned int i = 0; i < tx.vin.size(); i++) { + const CTxIn& txin = tx.vin[i]; UniValue in(UniValue::VOBJ); if (tx.IsCoinBase()) in.pushKV("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())); @@ -166,6 +168,13 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry) o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true)); o.pushKV("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())); in.pushKV("scriptSig", o); + if (!tx.wit.IsNull() && i < tx.wit.vtxinwit.size() && !tx.wit.vtxinwit[i].IsNull()) { + UniValue txinwitness(UniValue::VARR); + for (const auto& item : tx.wit.vtxinwit[i].scriptWitness.stack) { + txinwitness.push_back(HexStr(item.begin(), item.end())); + } + in.pushKV("txinwitness", txinwitness); + } } in.pushKV("sequence", (int64_t)txin.nSequence); vin.push_back(in); diff --git a/src/test/data/blanktx.json b/src/test/data/blanktx.json index f6d6ab58842..51c25a5a98c 100644 --- a/src/test/data/blanktx.json +++ b/src/test/data/blanktx.json @@ -1,5 +1,6 @@ { "txid": "d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43", + "hash": "d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/tt-delin1-out.json b/src/test/data/tt-delin1-out.json index 2c7a68636a2..712a2c27f8f 100644 --- a/src/test/data/tt-delin1-out.json +++ b/src/test/data/tt-delin1-out.json @@ -1,5 +1,6 @@ { "txid": "81b2035be1da1abe745c6141174a73d151009ec17b3d5ebffa2e177408c50dfd", + "hash": "81b2035be1da1abe745c6141174a73d151009ec17b3d5ebffa2e177408c50dfd", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/tt-delout1-out.json b/src/test/data/tt-delout1-out.json index 9cf8cbb16c0..afc4e95762d 100644 --- a/src/test/data/tt-delout1-out.json +++ b/src/test/data/tt-delout1-out.json @@ -1,5 +1,6 @@ { "txid": "c46ccd75b5050e942b2e86a3648f843f525fe6fc000bf0534ba5973063354493", + "hash": "c46ccd75b5050e942b2e86a3648f843f525fe6fc000bf0534ba5973063354493", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/tt-locktime317000-out.json b/src/test/data/tt-locktime317000-out.json index 65b6a4451b2..2b9075f8ace 100644 --- a/src/test/data/tt-locktime317000-out.json +++ b/src/test/data/tt-locktime317000-out.json @@ -1,5 +1,6 @@ { "txid": "aded538f642c17e15f4d3306b8be7e1a4d1ae0c4616d641ab51ea09ba65e5cb5", + "hash": "aded538f642c17e15f4d3306b8be7e1a4d1ae0c4616d641ab51ea09ba65e5cb5", "version": 1, "locktime": 317000, "vin": [ diff --git a/src/test/data/txcreate1.json b/src/test/data/txcreate1.json index 3890dbaf6e0..567e8026a32 100644 --- a/src/test/data/txcreate1.json +++ b/src/test/data/txcreate1.json @@ -1,5 +1,6 @@ { "txid": "f70f0d6c71416ed538e37549f430ab3665fee2437a42f10238c1bd490e782231", + "hash": "f70f0d6c71416ed538e37549f430ab3665fee2437a42f10238c1bd490e782231", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/txcreate2.json b/src/test/data/txcreate2.json index c56293eaf2c..a70c1d302a2 100644 --- a/src/test/data/txcreate2.json +++ b/src/test/data/txcreate2.json @@ -1,5 +1,6 @@ { "txid": "cf90229625e9eb10f6be8156bf6aa5ec2eca19a42b1e05c11f3029b560a32e13", + "hash": "cf90229625e9eb10f6be8156bf6aa5ec2eca19a42b1e05c11f3029b560a32e13", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/txcreatedata1.json b/src/test/data/txcreatedata1.json index 2fed2281087..760518d30a9 100644 --- a/src/test/data/txcreatedata1.json +++ b/src/test/data/txcreatedata1.json @@ -1,5 +1,6 @@ { "txid": "07894b4d12fe7853dd911402db1620920d261b9627c447f931417d330c25f06e", + "hash": "07894b4d12fe7853dd911402db1620920d261b9627c447f931417d330c25f06e", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/txcreatedata2.json b/src/test/data/txcreatedata2.json index 3d4d367f37b..56dfe4a1b05 100644 --- a/src/test/data/txcreatedata2.json +++ b/src/test/data/txcreatedata2.json @@ -1,5 +1,6 @@ { "txid": "4ed17118f5e932ba8c75c461787d171bc02a016d8557cb5bcf34cd416c27bb8b", + "hash": "4ed17118f5e932ba8c75c461787d171bc02a016d8557cb5bcf34cd416c27bb8b", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/txcreatedata_seq0.json b/src/test/data/txcreatedata_seq0.json index f25aa43c2b2..9bc0ed45936 100644 --- a/src/test/data/txcreatedata_seq0.json +++ b/src/test/data/txcreatedata_seq0.json @@ -1,5 +1,6 @@ { "txid": "71603ccb1cd76d73d76eb6cfd5f0b9df6d65d90d76860ee52cb461c4be7032e8", + "hash": "71603ccb1cd76d73d76eb6cfd5f0b9df6d65d90d76860ee52cb461c4be7032e8", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/txcreatedata_seq1.json b/src/test/data/txcreatedata_seq1.json index 33585d6dfad..d323255418d 100644 --- a/src/test/data/txcreatedata_seq1.json +++ b/src/test/data/txcreatedata_seq1.json @@ -1,5 +1,6 @@ { "txid": "c4dea671b0d7b48f8ab10bc46650e8329d3c5766931f548f513847a19f5ba75b", + "hash": "c4dea671b0d7b48f8ab10bc46650e8329d3c5766931f548f513847a19f5ba75b", "version": 1, "locktime": 0, "vin": [ diff --git a/src/test/data/txcreatesign.json b/src/test/data/txcreatesign.json index 057fe9b0102..ff39e71b40c 100644 --- a/src/test/data/txcreatesign.json +++ b/src/test/data/txcreatesign.json @@ -1,5 +1,6 @@ { "txid": "977e7cd286cb72cd470d539ba6cb48400f8f387d97451d45cdb8819437a303af", + "hash": "977e7cd286cb72cd470d539ba6cb48400f8f387d97451d45cdb8819437a303af", "version": 1, "locktime": 0, "vin": [ From df5069bb0e56476fe3c0670922d9cdb678c40c29 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 14 Oct 2016 12:54:15 -0400 Subject: [PATCH 163/302] [qa] Send segwit-encoded blocktxn messages in p2p-compactblocks Github-Pull: #8916 Rebased-From: 032e883b937a6b70d5c367fc2ee57d7eea8cb473 --- qa/rpc-tests/p2p-compactblocks.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index e7f5a1c9c6f..1beab609b68 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -6,7 +6,7 @@ from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * -from test_framework.blocktools import create_block, create_coinbase +from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment from test_framework.siphash import siphash256 from test_framework.script import CScript, OP_TRUE @@ -123,11 +123,13 @@ def setup_network(self): ["-debug", "-logtimemicros", "-txindex"]]) connect_nodes(self.nodes[0], 1) - def build_block_on_tip(self, node): + def build_block_on_tip(self, node, segwit=False): height = node.getblockcount() tip = node.getbestblockhash() mtp = node.getblockheader(tip)['mediantime'] block = create_block(int(tip, 16), create_coinbase(height + 1), mtp + 1) + if segwit: + add_witness_commitment(block) block.solve() return block @@ -380,11 +382,11 @@ def test_compactblock_construction(self, node, test_node, version, use_witness_a # Post-segwit: upgraded nodes would only make this request of cb-version-2, # NODE_WITNESS peers. Unupgraded nodes would still make this request of # any cb-version-1-supporting peer. - def test_compactblock_requests(self, node, test_node): + def test_compactblock_requests(self, node, test_node, version, segwit): # Try announcing a block with an inv or header, expect a compactblock # request for announce in ["inv", "header"]: - block = self.build_block_on_tip(node) + block = self.build_block_on_tip(node, segwit=segwit) with mininode_lock: test_node.last_getdata = None @@ -403,8 +405,11 @@ def test_compactblock_requests(self, node, test_node): comp_block.header = CBlockHeader(block) comp_block.nonce = 0 [k0, k1] = comp_block.get_siphash_keys() + coinbase_hash = block.vtx[0].sha256 + if version == 2: + coinbase_hash = block.vtx[0].calc_sha256(True) comp_block.shortids = [ - calculate_shortid(k0, k1, block.vtx[0].sha256) ] + calculate_shortid(k0, k1, coinbase_hash) ] test_node.send_and_ping(msg_cmpctblock(comp_block.to_p2p())) assert_equal(int(node.getbestblockhash(), 16), block.hashPrevBlock) # Expect a getblocktxn message. @@ -414,7 +419,10 @@ def test_compactblock_requests(self, node, test_node): assert_equal(absolute_indexes, [0]) # should be a coinbase request # Send the coinbase, and verify that the tip advances. - msg = msg_blocktxn() + if version == 2: + msg = msg_witness_blocktxn() + else: + msg = msg_blocktxn() msg.block_transactions.blockhash = block.sha256 msg.block_transactions.transactions = [block.vtx[0]] test_node.send_and_ping(msg) @@ -750,9 +758,9 @@ def run_test(self): sync_blocks(self.nodes) print("\tTesting compactblock requests... ") - self.test_compactblock_requests(self.nodes[0], self.test_node) + self.test_compactblock_requests(self.nodes[0], self.test_node, 1, False) sync_blocks(self.nodes) - self.test_compactblock_requests(self.nodes[1], self.segwit_node) + self.test_compactblock_requests(self.nodes[1], self.segwit_node, 2, False) sync_blocks(self.nodes) print("\tTesting getblocktxn requests...") @@ -800,7 +808,7 @@ def run_test(self): sync_blocks(self.nodes) print("\tTesting compactblock requests (unupgraded node)... ") - self.test_compactblock_requests(self.nodes[0], self.test_node) + self.test_compactblock_requests(self.nodes[0], self.test_node, 1, True) print("\tTesting getblocktxn requests (unupgraded node)...") self.test_getblocktxn_requests(self.nodes[0], self.test_node, 1) @@ -815,7 +823,7 @@ def run_test(self): assert_equal(self.nodes[0].getbestblockhash(), self.nodes[1].getbestblockhash()) print("\tTesting compactblock requests (segwit node)... ") - self.test_compactblock_requests(self.nodes[1], self.segwit_node) + self.test_compactblock_requests(self.nodes[1], self.segwit_node, 2, True) print("\tTesting getblocktxn requests (segwit node)...") self.test_getblocktxn_requests(self.nodes[1], self.segwit_node, 2) From 9bb2a02f0dd8851a6dc413fd86ce0b51878b5007 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 15 Oct 2016 17:51:05 -0400 Subject: [PATCH 164/302] [qa] Build v4 blocks in p2p-compactblocktests This fixes an issue in backporting to 0.13 as 0.13 enforces SF activation by block version lockin instead of through a hard-coded block height. Github-Pull: #8916 Rebased-From: a4ad37d4ef4bcd81bc9d867b277efdebc86bc2e8 --- qa/rpc-tests/p2p-compactblocks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 1beab609b68..131654c333d 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -128,6 +128,7 @@ def build_block_on_tip(self, node, segwit=False): tip = node.getbestblockhash() mtp = node.getblockheader(tip)['mediantime'] block = create_block(int(tip, 16), create_coinbase(height + 1), mtp + 1) + block.nVersion = 4 if segwit: add_witness_commitment(block) block.solve() From 540413d9958fd253d4bf99858db431164db275e1 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Sun, 16 Oct 2016 23:53:16 +0800 Subject: [PATCH 165/302] Add standard limits for P2WSH with tests Github-Pull: #8499 Rebased-From: 3ade2f64cfe43ab53e4869ffc35d5fd23201e1c1 --- qa/rpc-tests/p2p-segwit.py | 111 +++++++++++++++++++++++++++++++++++++++++++++ src/main.cpp | 6 ++- src/policy/policy.cpp | 54 +++++++++++++++++++++- src/policy/policy.h | 12 +++++ 4 files changed, 181 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 69bab387677..90f43b417a9 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -1703,6 +1703,116 @@ def test_getblocktemplate_before_lockin(self): assert(block_version & (1 << VB_WITNESS_BIT) != 0) self.nodes[0].setmocktime(0) # undo mocktime + def test_non_standard_witness(self): + print("\tTesting detection of non-standard P2WSH witness") + pad = chr(1).encode('latin-1') + + # Create scripts for tests + scripts = [] + scripts.append(CScript([OP_DROP] * 100)) + scripts.append(CScript([OP_DROP] * 99)) + scripts.append(CScript([pad * 59] * 59 + [OP_DROP] * 60)) + scripts.append(CScript([pad * 59] * 59 + [OP_DROP] * 61)) + + p2wsh_scripts = [] + + assert(len(self.utxo)) + tx = CTransaction() + tx.vin.append(CTxIn(COutPoint(self.utxo[0].sha256, self.utxo[0].n), b"")) + + # For each script, generate a pair of P2WSH and P2SH-P2WSH output. + outputvalue = (self.utxo[0].nValue - 1000) // (len(scripts) * 2) + for i in scripts: + p2wsh = CScript([OP_0, sha256(i)]) + p2sh = hash160(p2wsh) + p2wsh_scripts.append(p2wsh) + tx.vout.append(CTxOut(outputvalue, p2wsh)) + tx.vout.append(CTxOut(outputvalue, CScript([OP_HASH160, p2sh, OP_EQUAL]))) + tx.rehash() + txid = tx.sha256 + self.test_node.test_transaction_acceptance(tx, with_witness=False, accepted=True) + + self.nodes[0].generate(1) + sync_blocks(self.nodes) + + # Creating transactions for tests + p2wsh_txs = [] + p2sh_txs = [] + for i in range(len(scripts)): + p2wsh_tx = CTransaction() + p2wsh_tx.vin.append(CTxIn(COutPoint(txid,i*2))) + p2wsh_tx.vout.append(CTxOut(outputvalue - 5000, CScript([OP_0, hash160(hex_str_to_bytes(""))]))) + p2wsh_tx.wit.vtxinwit.append(CTxInWitness()) + p2wsh_tx.rehash() + p2wsh_txs.append(p2wsh_tx) + p2sh_tx = CTransaction() + p2sh_tx.vin.append(CTxIn(COutPoint(txid,i*2+1), CScript([p2wsh_scripts[i]]))) + p2sh_tx.vout.append(CTxOut(outputvalue - 5000, CScript([OP_0, hash160(hex_str_to_bytes(""))]))) + p2sh_tx.wit.vtxinwit.append(CTxInWitness()) + p2sh_tx.rehash() + p2sh_txs.append(p2sh_tx) + + # Testing native P2WSH + # Witness stack size, excluding witnessScript, over 100 is non-standard + p2wsh_txs[0].wit.vtxinwit[0].scriptWitness.stack = [pad] * 101 + [scripts[0]] + self.std_node.test_transaction_acceptance(p2wsh_txs[0], True, False, b'bad-witness-nonstandard') + # Non-standard nodes should accept + self.test_node.test_transaction_acceptance(p2wsh_txs[0], True, True) + + # Stack element size over 80 bytes is non-standard + p2wsh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 81] * 100 + [scripts[1]] + # It can't be used to blind a node to the transaction + self.std_node.announce_tx_and_wait_for_getdata(p2wsh_txs[1]) + self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, False, b'bad-witness-nonstandard') + self.std_node.announce_tx_and_wait_for_getdata(p2wsh_txs[1]) + self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, False, b'bad-witness-nonstandard') + # Non-standard nodes should accept + self.test_node.test_transaction_acceptance(p2wsh_txs[1], True, True) + # Standard nodes should accept if element size is not over 80 bytes + p2wsh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 80] * 100 + [scripts[1]] + self.std_node.announce_tx_and_wait_for_getdata(p2wsh_txs[1]) + self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, True) + + # witnessScript size at 3600 bytes is standard + p2wsh_txs[2].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, scripts[2]] + self.test_node.test_transaction_acceptance(p2wsh_txs[2], True, True) + self.std_node.test_transaction_acceptance(p2wsh_txs[2], True, True) + + # witnessScript size at 3601 bytes is non-standard + p2wsh_txs[3].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, pad, scripts[3]] + self.std_node.test_transaction_acceptance(p2wsh_txs[3], True, False, b'bad-witness-nonstandard') + # Non-standard nodes should accept + self.test_node.test_transaction_acceptance(p2wsh_txs[3], True, True) + + # Repeating the same tests with P2SH-P2WSH + p2sh_txs[0].wit.vtxinwit[0].scriptWitness.stack = [pad] * 101 + [scripts[0]] + self.std_node.test_transaction_acceptance(p2sh_txs[0], True, False, b'bad-witness-nonstandard') + self.test_node.test_transaction_acceptance(p2sh_txs[0], True, True) + p2sh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 81] * 100 + [scripts[1]] + self.std_node.announce_tx_and_wait_for_getdata(p2sh_txs[1]) + self.std_node.test_transaction_acceptance(p2sh_txs[1], True, False, b'bad-witness-nonstandard') + self.std_node.announce_tx_and_wait_for_getdata(p2sh_txs[1]) + self.std_node.test_transaction_acceptance(p2sh_txs[1], True, False, b'bad-witness-nonstandard') + self.test_node.test_transaction_acceptance(p2sh_txs[1], True, True) + p2sh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 80] * 100 + [scripts[1]] + self.std_node.announce_tx_and_wait_for_getdata(p2sh_txs[1]) + self.std_node.test_transaction_acceptance(p2sh_txs[1], True, True) + p2sh_txs[2].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, scripts[2]] + self.test_node.test_transaction_acceptance(p2sh_txs[2], True, True) + self.std_node.test_transaction_acceptance(p2sh_txs[2], True, True) + p2sh_txs[3].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, pad, scripts[3]] + self.std_node.test_transaction_acceptance(p2sh_txs[3], True, False, b'bad-witness-nonstandard') + self.test_node.test_transaction_acceptance(p2sh_txs[3], True, True) + + self.nodes[0].generate(1) # Mine and clean up the mempool of non-standard node + # Valid but non-standard transactions in a block should be accepted by standard node + sync_blocks(self.nodes) + assert_equal(len(self.nodes[0].getrawmempool()), 0) + assert_equal(len(self.nodes[1].getrawmempool()), 0) + + self.utxo.pop(0) + + def run_test(self): # Setup the p2p connections and start up the network thread. self.test_node = TestNode() # sets NODE_WITNESS|NODE_NETWORK @@ -1775,6 +1885,7 @@ def run_test(self): self.test_segwit_versions() self.test_premature_coinbase_witness_spend() self.test_signature_version_1() + self.test_non_standard_witness() sync_blocks(self.nodes) if self.test_upgrade: self.test_upgrade_after_activation(self.nodes[2], 2) diff --git a/src/main.cpp b/src/main.cpp index 7fd13f4ecf9..61d0aaf0b9b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -1282,6 +1282,10 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C if (fRequireStandard && !AreInputsStandard(tx, view)) return state.Invalid(false, REJECT_NONSTANDARD, "bad-txns-nonstandard-inputs"); + // Check for non-standard witness in P2WSH + if (!tx.wit.IsNull() && fRequireStandard && !IsWitnessStandard(tx, view)) + return state.DoS(0, false, REJECT_NONSTANDARD, "bad-witness-nonstandard", true); + int64_t nSigOpsCost = GetTransactionSigOpCost(tx, view, STANDARD_SCRIPT_VERIFY_FLAGS); CAmount nValueOut = tx.GetValueOut(); diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 48080abc778..ae42b2bd74f 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin developers +// Copyright (c) 2009-2016 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -154,6 +154,58 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) return true; } +bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs) +{ + if (tx.IsCoinBase()) + return true; // Coinbases are skipped + + for (unsigned int i = 0; i < tx.vin.size(); i++) + { + // We don't care if witness for this input is empty, since it must not be bloated. + // If the script is invalid without witness, it would be caught sooner or later during validation. + if (tx.wit.vtxinwit[i].IsNull()) + continue; + + const CTxOut &prev = mapInputs.GetOutputFor(tx.vin[i]); + + // get the scriptPubKey corresponding to this input: + CScript prevScript = prev.scriptPubKey; + + if (prevScript.IsPayToScriptHash()) { + std::vector > stack; + // If the scriptPubKey is P2SH, we try to extract the redeemScript casually by converting the scriptSig + // into a stack. We do not check IsPushOnly nor compare the hash as these will be done later anyway. + // If the check fails at this stage, we know that this txid must be a bad one. + if (!EvalScript(stack, tx.vin[i].scriptSig, SCRIPT_VERIFY_NONE, BaseSignatureChecker(), SIGVERSION_BASE)) + return false; + if (stack.empty()) + return false; + prevScript = CScript(stack.back().begin(), stack.back().end()); + } + + int witnessversion = 0; + std::vector witnessprogram; + + // Non-witness program must not be associated with any witness + if (!prevScript.IsWitnessProgram(witnessversion, witnessprogram)) + return false; + + // Check P2WSH standard limits + if (witnessversion == 0 && witnessprogram.size() == 32) { + if (tx.wit.vtxinwit[i].scriptWitness.stack.back().size() > MAX_STANDARD_P2WSH_SCRIPT_SIZE) + return false; + size_t sizeWitnessStack = tx.wit.vtxinwit[i].scriptWitness.stack.size() - 1; + if (sizeWitnessStack > MAX_STANDARD_P2WSH_STACK_ITEMS) + return false; + for (unsigned int j = 0; j < sizeWitnessStack; j++) { + if (tx.wit.vtxinwit[i].scriptWitness.stack[j].size() > MAX_STANDARD_P2WSH_STACK_ITEM_SIZE) + return false; + } + } + } + return true; +} + unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP; int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost) diff --git a/src/policy/policy.h b/src/policy/policy.h index 9d6ff1233b6..fb528d74868 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -30,6 +30,12 @@ static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5; static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300; /** Default for -bytespersigop */ static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20; +/** The maximum number of witness stack items in a standard P2WSH script */ +static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEMS = 100; +/** The maximum size of each witness stack item in a standard P2WSH script */ +static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80; +/** The maximum size of a standard witnessScript */ +static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600; /** * Standard script verification flags that standard transactions will comply * with. However scripts violating these flags may still be present in valid @@ -69,6 +75,12 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes * @return True if all inputs (scriptSigs) use only standard transaction forms */ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs); + /** + * Check if the transaction is over standard P2WSH resources limit: + * 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements + * These limits are adequate for multi-signature up to n-of-100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL, + */ +bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs); extern unsigned int nBytesPerSigOp; From 821f3e67510b9ea0b5c7b79d162daf5f0f075462 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Sun, 2 Oct 2016 01:19:33 +0800 Subject: [PATCH 166/302] Require compressed keys in segwit as policy and disable signing with uncompressed keys for segwit scripts Github-Pull: #8499 Rebased-From: 4c0c25a604cec39675187507df423cff5d707ab5 --- src/policy/policy.h | 5 +++-- src/script/interpreter.cpp | 28 ++++++++++++++++++++++------ src/script/interpreter.h | 6 +++++- src/script/script_error.cpp | 2 ++ src/script/script_error.h | 1 + src/script/sign.cpp | 6 +++++- src/test/script_tests.cpp | 1 + src/test/transaction_tests.cpp | 36 ++++++++++-------------------------- 8 files changed, 49 insertions(+), 36 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index fb528d74868..814e6c0b6ff 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin developers +// Copyright (c) 2009-2016 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -54,7 +54,8 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY SCRIPT_VERIFY_CHECKSEQUENCEVERIFY | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_WITNESS | - SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM; + SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM | + SCRIPT_VERIFY_WITNESS_PUBKEYTYPE; /** For convenience, standard but not mandatory verify flags. */ static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS; diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 41756ea7119..836cf9ee352 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -79,8 +79,20 @@ bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) { return false; } } else { - // Non-canonical public key: neither compressed nor uncompressed - return false; + // Non-canonical public key: neither compressed nor uncompressed + return false; + } + return true; +} + +bool static IsCompressedPubKey(const valtype &vchPubKey) { + if (vchPubKey.size() != 33) { + // Non-canonical public key: invalid length for compressed key + return false; + } + if (vchPubKey[0] != 0x02 && vchPubKey[0] != 0x03) { + // Non-canonical public key: invalid prefix for compressed key + return false; } return true; } @@ -199,10 +211,14 @@ bool CheckSignatureEncoding(const vector &vchSig, unsigned int fl return true; } -bool static CheckPubKeyEncoding(const valtype &vchSig, unsigned int flags, ScriptError* serror) { - if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsCompressedOrUncompressedPubKey(vchSig)) { +bool static CheckPubKeyEncoding(const valtype &vchPubKey, unsigned int flags, const SigVersion &sigversion, ScriptError* serror) { + if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsCompressedOrUncompressedPubKey(vchPubKey)) { return set_error(serror, SCRIPT_ERR_PUBKEYTYPE); } + // Only compressed keys are accepted in segwit + if ((flags & SCRIPT_VERIFY_WITNESS_PUBKEYTYPE) != 0 && sigversion == SIGVERSION_WITNESS_V0 && !IsCompressedPubKey(vchPubKey)) { + return set_error(serror, SCRIPT_ERR_WITNESS_PUBKEYTYPE); + } return true; } @@ -879,7 +895,7 @@ bool EvalScript(vector >& stack, const CScript& script, un scriptCode.FindAndDelete(CScript(vchSig)); } - if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, serror)) { + if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, sigversion, serror)) { //serror is set return false; } @@ -953,7 +969,7 @@ bool EvalScript(vector >& stack, const CScript& script, un // Note how this makes the exact order of pubkey/signature evaluation // distinguishable by CHECKMULTISIG NOT if the STRICTENC flag is set. // See the script_(in)valid tests for details. - if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, serror)) { + if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, sigversion, serror)) { // serror is set return false; } diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 0adc9482ffe..79894c53003 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -102,6 +102,10 @@ enum // Signature(s) must be empty vector if an CHECK(MULTI)SIG operation failed // SCRIPT_VERIFY_NULLFAIL = (1U << 14), + + // Public keys in segregated witness scripts must be compressed + // + SCRIPT_VERIFY_WITNESS_PUBKEYTYPE = (1U << 15), }; bool CheckSignatureEncoding(const std::vector &vchSig, unsigned int flags, ScriptError* serror); diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp index e27b715c2cf..2c5359fe8af 100644 --- a/src/script/script_error.cpp +++ b/src/script/script_error.cpp @@ -85,6 +85,8 @@ const char* ScriptErrorString(const ScriptError serror) return "Witness requires only-redeemscript scriptSig"; case SCRIPT_ERR_WITNESS_UNEXPECTED: return "Witness provided for non-witness script"; + case SCRIPT_ERR_WITNESS_PUBKEYTYPE: + return "Using non-compressed keys in segwit"; case SCRIPT_ERR_UNKNOWN_ERROR: case SCRIPT_ERR_ERROR_COUNT: default: break; diff --git a/src/script/script_error.h b/src/script/script_error.h index bccfdb99e23..430836991b2 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -62,6 +62,7 @@ typedef enum ScriptError_t SCRIPT_ERR_WITNESS_MALLEATED, SCRIPT_ERR_WITNESS_MALLEATED_P2SH, SCRIPT_ERR_WITNESS_UNEXPECTED, + SCRIPT_ERR_WITNESS_PUBKEYTYPE, SCRIPT_ERR_ERROR_COUNT } ScriptError; diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 87f38d9c725..f552ad5bbad 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -26,6 +26,10 @@ bool TransactionSignatureCreator::CreateSig(std::vector& vchSig, if (!keystore->GetKey(address, key)) return false; + // Signing with uncompressed keys is disabled in witness scripts + if (sigversion == SIGVERSION_WITNESS_V0 && !key.IsCompressed()) + return false; + uint256 hash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion); if (!key.Sign(hash, vchSig)) return false; diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 836ef734ddf..68a9991e7dc 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -99,6 +99,7 @@ static ScriptErrorDesc script_errors[]={ {SCRIPT_ERR_WITNESS_MALLEATED, "WITNESS_MALLEATED"}, {SCRIPT_ERR_WITNESS_MALLEATED_P2SH, "WITNESS_MALLEATED_P2SH"}, {SCRIPT_ERR_WITNESS_UNEXPECTED, "WITNESS_UNEXPECTED"}, + {SCRIPT_ERR_WITNESS_PUBKEYTYPE, "WITNESS_PUBKEYTYPE"}, }; const char *FormatScriptError(ScriptError_t err) diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 6163d2f6306..34d9547f3dc 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2015 The Bitcoin Core developers +// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -55,7 +55,8 @@ static std::map mapFlagNames = boost::assign::map_list_of (string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY) (string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY) (string("WITNESS"), (unsigned int)SCRIPT_VERIFY_WITNESS) - (string("DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM); + (string("DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM) + (string("WITNESS_PUBKEYTYPE"), (unsigned int)SCRIPT_VERIFY_WITNESS_PUBKEYTYPE); unsigned int ParseScriptFlags(string strFlags) { @@ -429,7 +430,7 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) { mtx.nVersion = 1; CKey key; - key.MakeNewKey(false); + key.MakeNewKey(true); // Need to use compressed keys in segwit or the signing will fail CBasicKeyStore keystore; keystore.AddKeyPubKey(key, key.GetPubKey()); CKeyID hash = key.GetPubKey().GetID(); @@ -625,30 +626,13 @@ BOOST_AUTO_TEST_CASE(test_witness) CheckWithFlag(output1, input2, SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false); CheckWithFlag(output1, input2, STANDARD_SCRIPT_VERIFY_FLAGS, false); - // Witness pay-to-uncompressed-pubkey (v1). - CreateCreditAndSpend(keystore, GetScriptForWitness(scriptPubkey1L), output1, input1); - CreateCreditAndSpend(keystore, GetScriptForWitness(scriptPubkey2L), output2, input2); - CheckWithFlag(output1, input1, 0, true); - CheckWithFlag(output1, input1, SCRIPT_VERIFY_P2SH, true); - CheckWithFlag(output1, input1, SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, true); - CheckWithFlag(output1, input1, STANDARD_SCRIPT_VERIFY_FLAGS, true); - CheckWithFlag(output1, input2, 0, true); - CheckWithFlag(output1, input2, SCRIPT_VERIFY_P2SH, true); - CheckWithFlag(output1, input2, SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false); - CheckWithFlag(output1, input2, STANDARD_SCRIPT_VERIFY_FLAGS, false); + // Signing disabled for witness pay-to-uncompressed-pubkey (v1). + CreateCreditAndSpend(keystore, GetScriptForWitness(scriptPubkey1L), output1, input1, false); + CreateCreditAndSpend(keystore, GetScriptForWitness(scriptPubkey2L), output2, input2, false); - // P2SH witness pay-to-uncompressed-pubkey (v1). - CreateCreditAndSpend(keystore, GetScriptForDestination(CScriptID(GetScriptForWitness(scriptPubkey1L))), output1, input1); - CreateCreditAndSpend(keystore, GetScriptForDestination(CScriptID(GetScriptForWitness(scriptPubkey2L))), output2, input2); - ReplaceRedeemScript(input2.vin[0].scriptSig, GetScriptForWitness(scriptPubkey1L)); - CheckWithFlag(output1, input1, 0, true); - CheckWithFlag(output1, input1, SCRIPT_VERIFY_P2SH, true); - CheckWithFlag(output1, input1, SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, true); - CheckWithFlag(output1, input1, STANDARD_SCRIPT_VERIFY_FLAGS, true); - CheckWithFlag(output1, input2, 0, true); - CheckWithFlag(output1, input2, SCRIPT_VERIFY_P2SH, true); - CheckWithFlag(output1, input2, SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false); - CheckWithFlag(output1, input2, STANDARD_SCRIPT_VERIFY_FLAGS, false); + // Signing disabled for P2SH witness pay-to-uncompressed-pubkey (v1). + CreateCreditAndSpend(keystore, GetScriptForDestination(CScriptID(GetScriptForWitness(scriptPubkey1L))), output1, input1, false); + CreateCreditAndSpend(keystore, GetScriptForDestination(CScriptID(GetScriptForWitness(scriptPubkey2L))), output2, input2, false); // Normal 2-of-2 multisig CreateCreditAndSpend(keystore, scriptMulti, output1, input1, false); From b4b85279a906605bd2d98498f5b65f4991ebffa4 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Wed, 24 Aug 2016 14:44:17 +0800 Subject: [PATCH 167/302] Make test framework produce lowS signatures Github-Pull: #8499 Rebased-From: 9f0397aff7afa2afa9328daea0a2053122e79d44 --- qa/rpc-tests/test_framework/key.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/test_framework/key.py b/qa/rpc-tests/test_framework/key.py index ba3038fe044..c63a15c1e0c 100644 --- a/qa/rpc-tests/test_framework/key.py +++ b/qa/rpc-tests/test_framework/key.py @@ -75,6 +75,9 @@ # this specifies the curve used with ECDSA. NID_secp256k1 = 714 # from openssl/obj_mac.h +SECP256K1_ORDER = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 +SECP256K1_ORDER_HALF = SECP256K1_ORDER // 2 + # Thx to Sam Devlin for the ctypes magic 64-bit fix. def _check_result(val, func, args): if val == 0: @@ -147,7 +150,7 @@ def get_ecdh_key(self, other_pubkey, kdf=lambda k: hashlib.sha256(k).digest()): r = self.get_raw_ecdh_key(other_pubkey) return kdf(r) - def sign(self, hash): + def sign(self, hash, low_s = True): # FIXME: need unit tests for below cases if not isinstance(hash, bytes): raise TypeError('Hash must be bytes instance; got %r' % hash.__class__) @@ -159,7 +162,25 @@ def sign(self, hash): mb_sig = ctypes.create_string_buffer(sig_size0.value) result = ssl.ECDSA_sign(0, hash, len(hash), mb_sig, ctypes.byref(sig_size0), self.k) assert 1 == result - return mb_sig.raw[:sig_size0.value] + assert mb_sig.raw[0] == 0x30 + assert mb_sig.raw[1] == sig_size0.value - 2 + total_size = mb_sig.raw[1] + assert mb_sig.raw[2] == 2 + r_size = mb_sig.raw[3] + assert mb_sig.raw[4 + r_size] == 2 + s_size = mb_sig.raw[5 + r_size] + s_value = int.from_bytes(mb_sig.raw[6+r_size:6+r_size+s_size], byteorder='big') + if (not low_s) or s_value <= SECP256K1_ORDER_HALF: + return mb_sig.raw[:sig_size0.value] + else: + low_s_value = SECP256K1_ORDER - s_value + low_s_bytes = (low_s_value).to_bytes(33, byteorder='big') + while len(low_s_bytes) > 1 and low_s_bytes[0] == 0 and low_s_bytes[1] < 0x80: + low_s_bytes = low_s_bytes[1:] + new_s_size = len(low_s_bytes) + new_total_size_byte = (total_size + new_s_size - s_size).to_bytes(1,byteorder='big') + new_s_size_byte = (new_s_size).to_bytes(1,byteorder='big') + return b'\x30' + new_total_size_byte + mb_sig.raw[2:5+r_size] + new_s_size_byte + low_s_bytes def verify(self, hash, sig): """Verify a DER signature""" From 908fced29600514d5fff544e429fa40ebbc58733 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 6 Oct 2016 13:15:33 -0400 Subject: [PATCH 168/302] [qa] Add tests for uncompressed pubkeys in segwit Github-Pull: #8499 Rebased-From: b811124202152424109b8e95ebe7ac25ff2e83c0 --- qa/rpc-tests/p2p-segwit.py | 125 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 117 insertions(+), 8 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 90f43b417a9..864579dc477 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -166,6 +166,17 @@ def __init__(self, sha256, n, nValue): self.n = n self.nValue = nValue +# Helper for getting the script associated with a P2PKH +def GetP2PKHScript(pubkeyhash): + return CScript([CScriptOp(OP_DUP), CScriptOp(OP_HASH160), pubkeyhash, CScriptOp(OP_EQUALVERIFY), CScriptOp(OP_CHECKSIG)]) + +# Add signature for a P2PK witness program. +def sign_P2PK_witness_input(script, txTo, inIdx, hashtype, value, key): + tx_hash = SegwitVersion1SignatureHash(script, txTo, inIdx, hashtype, value) + signature = key.sign(tx_hash) + chr(hashtype).encode('latin-1') + txTo.wit.vtxinwit[inIdx].scriptWitness.stack = [signature, script] + txTo.rehash() + class SegWitTest(BitcoinTestFramework): def setup_chain(self): @@ -1320,13 +1331,6 @@ def test_signature_version_1(self): sync_blocks(self.nodes) self.utxo.pop(0) - # Add signature for a P2PK witness program. - def sign_P2PK_witness_input(script, txTo, inIdx, hashtype, value, key): - tx_hash = SegwitVersion1SignatureHash(script, txTo, inIdx, hashtype, value) - signature = key.sign(tx_hash) + chr(hashtype).encode('latin-1') - txTo.wit.vtxinwit[inIdx].scriptWitness.stack = [signature, script] - txTo.rehash() - # Test each hashtype prev_utxo = UTXO(tx.sha256, 0, tx.vout[0].nValue) for sigflag in [ 0, SIGHASH_ANYONECANPAY ]: @@ -1440,7 +1444,7 @@ def sign_P2PK_witness_input(script, txTo, inIdx, hashtype, value, key): tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) tx2.vout.append(CTxOut(tx.vout[0].nValue, CScript([OP_TRUE]))) - script = CScript([CScriptOp(OP_DUP), CScriptOp(OP_HASH160), pubkeyhash, CScriptOp(OP_EQUALVERIFY), CScriptOp(OP_CHECKSIG)]) + script = GetP2PKHScript(pubkeyhash) sig_hash = SegwitVersion1SignatureHash(script, tx2, 0, SIGHASH_ALL, tx.vout[0].nValue) signature = key.sign(sig_hash) + b'\x01' # 0x1 is SIGHASH_ALL @@ -1703,6 +1707,110 @@ def test_getblocktemplate_before_lockin(self): assert(block_version & (1 << VB_WITNESS_BIT) != 0) self.nodes[0].setmocktime(0) # undo mocktime + # Uncompressed pubkeys are no longer supported in default relay policy, + # but (for now) are still valid in blocks. + def test_uncompressed_pubkey(self): + print("\tTesting uncompressed pubkeys") + # Segwit transactions using uncompressed pubkeys are not accepted + # under default policy, but should still pass consensus. + key = CECKey() + key.set_secretbytes(b"9") + key.set_compressed(False) + pubkey = CPubKey(key.get_pubkey()) + assert_equal(len(pubkey), 65) # This should be an uncompressed pubkey + + assert(len(self.utxo) > 0) + utxo = self.utxo.pop(0) + + # Test 1: P2WPKH + # First create a P2WPKH output that uses an uncompressed pubkey + pubkeyhash = hash160(pubkey) + scriptPKH = CScript([OP_0, pubkeyhash]) + tx = CTransaction() + tx.vin.append(CTxIn(COutPoint(utxo.sha256, utxo.n), b"")) + tx.vout.append(CTxOut(utxo.nValue-1000, scriptPKH)) + tx.rehash() + + # Confirm it in a block. + block = self.build_next_block() + self.update_witness_block_with_transactions(block, [tx]) + self.test_node.test_witness_block(block, accepted=True) + + # Now try to spend it. Send it to a P2WSH output, which we'll + # use in the next test. + witness_program = CScript([pubkey, CScriptOp(OP_CHECKSIG)]) + witness_hash = sha256(witness_program) + scriptWSH = CScript([OP_0, witness_hash]) + + tx2 = CTransaction() + tx2.vin.append(CTxIn(COutPoint(tx.sha256, 0), b"")) + tx2.vout.append(CTxOut(tx.vout[0].nValue-1000, scriptWSH)) + script = GetP2PKHScript(pubkeyhash) + sig_hash = SegwitVersion1SignatureHash(script, tx2, 0, SIGHASH_ALL, tx.vout[0].nValue) + signature = key.sign(sig_hash) + b'\x01' # 0x1 is SIGHASH_ALL + tx2.wit.vtxinwit.append(CTxInWitness()) + tx2.wit.vtxinwit[0].scriptWitness.stack = [ signature, pubkey ] + tx2.rehash() + + # Should fail policy test. + self.test_node.test_transaction_acceptance(tx2, True, False, b'non-mandatory-script-verify-flag (Using non-compressed keys in segwit)') + # But passes consensus. + block = self.build_next_block() + self.update_witness_block_with_transactions(block, [tx2]) + self.test_node.test_witness_block(block, accepted=True) + + # Test 2: P2WSH + # Try to spend the P2WSH output created in last test. + # Send it to a P2SH(P2WSH) output, which we'll use in the next test. + p2sh_witness_hash = hash160(scriptWSH) + scriptP2SH = CScript([OP_HASH160, p2sh_witness_hash, OP_EQUAL]) + scriptSig = CScript([scriptWSH]) + + tx3 = CTransaction() + tx3.vin.append(CTxIn(COutPoint(tx2.sha256, 0), b"")) + tx3.vout.append(CTxOut(tx2.vout[0].nValue-1000, scriptP2SH)) + tx3.wit.vtxinwit.append(CTxInWitness()) + sign_P2PK_witness_input(witness_program, tx3, 0, SIGHASH_ALL, tx2.vout[0].nValue, key) + + # Should fail policy test. + self.test_node.test_transaction_acceptance(tx3, True, False, b'non-mandatory-script-verify-flag (Using non-compressed keys in segwit)') + # But passes consensus. + block = self.build_next_block() + self.update_witness_block_with_transactions(block, [tx3]) + self.test_node.test_witness_block(block, accepted=True) + + # Test 3: P2SH(P2WSH) + # Try to spend the P2SH output created in the last test. + # Send it to a P2PKH output, which we'll use in the next test. + scriptPubKey = GetP2PKHScript(pubkeyhash) + tx4 = CTransaction() + tx4.vin.append(CTxIn(COutPoint(tx3.sha256, 0), scriptSig)) + tx4.vout.append(CTxOut(tx3.vout[0].nValue-1000, scriptPubKey)) + tx4.wit.vtxinwit.append(CTxInWitness()) + sign_P2PK_witness_input(witness_program, tx4, 0, SIGHASH_ALL, tx3.vout[0].nValue, key) + + # Should fail policy test. + self.test_node.test_transaction_acceptance(tx4, True, False, b'non-mandatory-script-verify-flag (Using non-compressed keys in segwit)') + block = self.build_next_block() + self.update_witness_block_with_transactions(block, [tx4]) + self.test_node.test_witness_block(block, accepted=True) + + # Test 4: Uncompressed pubkeys should still be valid in non-segwit + # transactions. + tx5 = CTransaction() + tx5.vin.append(CTxIn(COutPoint(tx4.sha256, 0), b"")) + tx5.vout.append(CTxOut(tx4.vout[0].nValue-1000, CScript([OP_TRUE]))) + (sig_hash, err) = SignatureHash(scriptPubKey, tx5, 0, SIGHASH_ALL) + signature = key.sign(sig_hash) + b'\x01' # 0x1 is SIGHASH_ALL + tx5.vin[0].scriptSig = CScript([signature, pubkey]) + tx5.rehash() + # Should pass policy and consensus. + self.test_node.test_transaction_acceptance(tx5, True, True) + block = self.build_next_block() + self.update_witness_block_with_transactions(block, [tx5]) + self.test_node.test_witness_block(block, accepted=True) + self.utxo.append(UTXO(tx5.sha256, 0, tx5.vout[0].nValue)) + def test_non_standard_witness(self): print("\tTesting detection of non-standard P2WSH witness") pad = chr(1).encode('latin-1') @@ -1884,6 +1992,7 @@ def run_test(self): self.test_standardness_v0(segwit_activated=True) self.test_segwit_versions() self.test_premature_coinbase_witness_spend() + self.test_uncompressed_pubkey() self.test_signature_version_1() self.test_non_standard_witness() sync_blocks(self.nodes) From 4ec21e8a64f53f0fb4cef5ff26b6b3551dba70e6 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 17 Oct 2016 00:32:36 +0800 Subject: [PATCH 169/302] Fix ismine and addwitnessaddress: no uncompressed keys in segwit Github-Pull: #8499 Rebased-From: 248f3a76a825a332e5495c5947ad283a9e5e938f --- src/script/ismine.cpp | 62 +++++++++++++++++++++++++++++++++++++++++------- src/script/ismine.h | 11 +++++++-- src/wallet/rpcwallet.cpp | 17 +++++++++---- 3 files changed, 75 insertions(+), 15 deletions(-) diff --git a/src/script/ismine.cpp b/src/script/ismine.cpp index 0bf180341e4..7467d23b2d3 100644 --- a/src/script/ismine.cpp +++ b/src/script/ismine.cpp @@ -29,13 +29,25 @@ unsigned int HaveKeys(const vector& pubkeys, const CKeyStore& keystore) return nResult; } -isminetype IsMine(const CKeyStore &keystore, const CTxDestination& dest) +isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, SigVersion sigversion) +{ + bool isInvalid = false; + return IsMine(keystore, scriptPubKey, isInvalid, sigversion); +} + +isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, SigVersion sigversion) +{ + bool isInvalid = false; + return IsMine(keystore, dest, isInvalid, sigversion); +} + +isminetype IsMine(const CKeyStore &keystore, const CTxDestination& dest, bool& isInvalid, SigVersion sigversion) { CScript script = GetScriptForDestination(dest); - return IsMine(keystore, script); + return IsMine(keystore, script, isInvalid, sigversion); } -isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey) +isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey, bool& isInvalid, SigVersion sigversion) { vector vSolutions; txnouttype whichType; @@ -53,12 +65,35 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey) break; case TX_PUBKEY: keyID = CPubKey(vSolutions[0]).GetID(); + if (sigversion != SIGVERSION_BASE && vSolutions[0].size() != 33) { + isInvalid = true; + return ISMINE_NO; + } if (keystore.HaveKey(keyID)) return ISMINE_SPENDABLE; break; - case TX_PUBKEYHASH: case TX_WITNESS_V0_KEYHASH: + { + if (!keystore.HaveCScript(CScriptID(CScript() << OP_0 << vSolutions[0]))) { + // We do not support bare witness outputs unless the P2SH version of it would be + // acceptable as well. This protects against matching before segwit activates. + // This also applies to the P2WSH case. + break; + } + isminetype ret = ::IsMine(keystore, GetScriptForDestination(CKeyID(uint160(vSolutions[0]))), isInvalid, SIGVERSION_WITNESS_V0); + if (ret == ISMINE_SPENDABLE || ret == ISMINE_WATCH_SOLVABLE || (ret == ISMINE_NO && isInvalid)) + return ret; + break; + } + case TX_PUBKEYHASH: keyID = CKeyID(uint160(vSolutions[0])); + if (sigversion != SIGVERSION_BASE) { + CPubKey pubkey; + if (keystore.GetPubKey(keyID, pubkey) && !pubkey.IsCompressed()) { + isInvalid = true; + return ISMINE_NO; + } + } if (keystore.HaveKey(keyID)) return ISMINE_SPENDABLE; break; @@ -67,21 +102,24 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey) CScriptID scriptID = CScriptID(uint160(vSolutions[0])); CScript subscript; if (keystore.GetCScript(scriptID, subscript)) { - isminetype ret = IsMine(keystore, subscript); - if (ret == ISMINE_SPENDABLE) + isminetype ret = IsMine(keystore, subscript, isInvalid); + if (ret == ISMINE_SPENDABLE || ret == ISMINE_WATCH_SOLVABLE || (ret == ISMINE_NO && isInvalid)) return ret; } break; } case TX_WITNESS_V0_SCRIPTHASH: { + if (!keystore.HaveCScript(CScriptID(CScript() << OP_0 << vSolutions[0]))) { + break; + } uint160 hash; CRIPEMD160().Write(&vSolutions[0][0], vSolutions[0].size()).Finalize(hash.begin()); CScriptID scriptID = CScriptID(hash); CScript subscript; if (keystore.GetCScript(scriptID, subscript)) { - isminetype ret = IsMine(keystore, subscript); - if (ret == ISMINE_SPENDABLE) + isminetype ret = IsMine(keystore, subscript, isInvalid, SIGVERSION_WITNESS_V0); + if (ret == ISMINE_SPENDABLE || ret == ISMINE_WATCH_SOLVABLE || (ret == ISMINE_NO && isInvalid)) return ret; } break; @@ -95,6 +133,14 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey) // them) enable spend-out-from-under-you attacks, especially // in shared-wallet situations. vector keys(vSolutions.begin()+1, vSolutions.begin()+vSolutions.size()-1); + if (sigversion != SIGVERSION_BASE) { + for (size_t i = 0; i < keys.size(); i++) { + if (keys[i].size() != 33) { + isInvalid = true; + return ISMINE_NO; + } + } + } if (HaveKeys(keys, keystore) == keys.size()) return ISMINE_SPENDABLE; break; diff --git a/src/script/ismine.h b/src/script/ismine.h index 4b7db8802ba..ec7a620e330 100644 --- a/src/script/ismine.h +++ b/src/script/ismine.h @@ -28,7 +28,14 @@ enum isminetype /** used for bitflags of isminetype */ typedef uint8_t isminefilter; -isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey); -isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest); +/* isInvalid becomes true when the script is found invalid by consensus or policy. This will terminate the recursion + * and return a ISMINE_NO immediately, as an invalid script should never be considered as "mine". This is needed as + * different SIGVERSION may have different network rules. Currently the only use of isInvalid is indicate uncompressed + * keys in SIGVERSION_WITNESS_V0 script, but could also be used in similar cases in the future + */ +isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, bool& isInvalid, SigVersion = SIGVERSION_BASE); +isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, SigVersion = SIGVERSION_BASE); +isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, bool& isInvalid, SigVersion = SIGVERSION_BASE); +isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, SigVersion = SIGVERSION_BASE); #endif // BITCOIN_SCRIPT_ISMINE_H diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 901e6a5d1ed..2ad379e46bc 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2010 Satoshi Nakamoto -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -1020,9 +1020,12 @@ class Witnessifier : public boost::static_visitor bool operator()(const CKeyID &keyID) { CPubKey pubkey; - if (pwalletMain && pwalletMain->GetPubKey(keyID, pubkey)) { - CScript basescript; - basescript << ToByteVector(pubkey) << OP_CHECKSIG; + if (pwalletMain) { + CScript basescript = GetScriptForDestination(keyID); + isminetype typ; + typ = IsMine(*pwalletMain, basescript, SIGVERSION_WITNESS_V0); + if (typ != ISMINE_SPENDABLE && typ != ISMINE_WATCH_SOLVABLE) + return false; CScript witscript = GetScriptForWitness(basescript); pwalletMain->AddCScript(witscript); result = CScriptID(witscript); @@ -1040,6 +1043,10 @@ class Witnessifier : public boost::static_visitor result = scriptID; return true; } + isminetype typ; + typ = IsMine(*pwalletMain, subscript, SIGVERSION_WITNESS_V0); + if (typ != ISMINE_SPENDABLE && typ != ISMINE_WATCH_SOLVABLE) + return false; CScript witscript = GetScriptForWitness(subscript); pwalletMain->AddCScript(witscript); result = CScriptID(witscript); @@ -1085,7 +1092,7 @@ UniValue addwitnessaddress(const UniValue& params, bool fHelp) CTxDestination dest = address.Get(); bool ret = boost::apply_visitor(w, dest); if (!ret) { - throw JSONRPCError(RPC_WALLET_ERROR, "Public key or redeemscript not known to wallet"); + throw JSONRPCError(RPC_WALLET_ERROR, "Public key or redeemscript not known to wallet, or the key is uncompressed"); } pwalletMain->SetAddressBook(w.result, "", "receive"); From fef7b468415e77e1876225988a177eed70418eb1 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Sat, 15 Oct 2016 02:29:39 +0800 Subject: [PATCH 170/302] test segwit uncompressed key fixes Github-Pull: #8499 Rebased-From: 9260085377e89e666d0cb95b462261d7e3a9c82f --- qa/rpc-tests/segwit.py | 362 +++++++++++++++++++++++++++++++- qa/rpc-tests/test_framework/address.py | 74 +++++++ src/test/data/script_tests.json | 368 ++++++++++++++++++++++++++++++++- src/test/script_tests.cpp | 93 +++++++++ 4 files changed, 893 insertions(+), 4 deletions(-) create mode 100644 qa/rpc-tests/test_framework/address.py diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py index 097e119f323..493ad2e67c8 100755 --- a/qa/rpc-tests/segwit.py +++ b/qa/rpc-tests/segwit.py @@ -9,9 +9,10 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * -from test_framework.mininode import sha256, ripemd160 -import os -import shutil +from test_framework.mininode import sha256, ripemd160, CTransaction, CTxIn, COutPoint, CTxOut +from test_framework.address import script_to_p2sh, key_to_p2pkh +from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG +from io import BytesIO NODE_0 = 0 NODE_1 = 1 @@ -243,5 +244,360 @@ def run_test(self): # This is an acceptable outcome pass + print("Verify behaviour of importaddress, addwitnessaddress and listunspent") + + # Some public keys to be used later + pubkeys = [ + "0363D44AABD0F1699138239DF2F042C3282C0671CC7A76826A55C8203D90E39242", # cPiM8Ub4heR9NBYmgVzJQiUH1if44GSBGiqaeJySuL2BKxubvgwb + "02D3E626B3E616FC8662B489C123349FECBFC611E778E5BE739B257EAE4721E5BF", # cPpAdHaD6VoYbW78kveN2bsvb45Q7G5PhaPApVUGwvF8VQ9brD97 + "04A47F2CBCEFFA7B9BCDA184E7D5668D3DA6F9079AD41E422FA5FD7B2D458F2538A62F5BD8EC85C2477F39650BD391EA6250207065B2A81DA8B009FC891E898F0E", # 91zqCU5B9sdWxzMt1ca3VzbtVm2YM6Hi5Rxn4UDtxEaN9C9nzXV + "02A47F2CBCEFFA7B9BCDA184E7D5668D3DA6F9079AD41E422FA5FD7B2D458F2538", # cPQFjcVRpAUBG8BA9hzr2yEzHwKoMgLkJZBBtK9vJnvGJgMjzTbd + "036722F784214129FEB9E8129D626324F3F6716555B603FFE8300BBCB882151228", # cQGtcm34xiLjB1v7bkRa4V3aAc9tS2UTuBZ1UnZGeSeNy627fN66 + "0266A8396EE936BF6D99D17920DB21C6C7B1AB14C639D5CD72B300297E416FD2EC", # cTW5mR5M45vHxXkeChZdtSPozrFwFgmEvTNnanCW6wrqwaCZ1X7K + "0450A38BD7F0AC212FEBA77354A9B036A32E0F7C81FC4E0C5ADCA7C549C4505D2522458C2D9AE3CEFD684E039194B72C8A10F9CB9D4764AB26FCC2718D421D3B84", # 92h2XPssjBpsJN5CqSP7v9a7cf2kgDunBC6PDFwJHMACM1rrVBJ + ] + + # Import a compressed key and an uncompressed key, generate some multisig addresses + self.nodes[0].importprivkey("92e6XLo5jVAVwrQKPNTs93oQco8f8sDNBcpv73Dsrs397fQtFQn") + uncompressed_spendable_address = ["mvozP4UwyGD2mGZU4D2eMvMLPB9WkMmMQu"] + self.nodes[0].importprivkey("cNC8eQ5dg3mFAVePDX4ddmPYpPbw41r9bm2jd1nLJT77e6RrzTRR") + compressed_spendable_address = ["mmWQubrDomqpgSYekvsU7HWEVjLFHAakLe"] + assert ((self.nodes[0].validateaddress(uncompressed_spendable_address[0])['iscompressed'] == False)) + assert ((self.nodes[0].validateaddress(compressed_spendable_address[0])['iscompressed'] == True)) + + self.nodes[0].importpubkey(pubkeys[0]) + compressed_solvable_address = [key_to_p2pkh(pubkeys[0])] + self.nodes[0].importpubkey(pubkeys[1]) + compressed_solvable_address.append(key_to_p2pkh(pubkeys[1])) + self.nodes[0].importpubkey(pubkeys[2]) + uncompressed_solvable_address = [key_to_p2pkh(pubkeys[2])] + + spendable_anytime = [] # These outputs should be seen anytime after importprivkey and addmultisigaddress + spendable_after_importaddress = [] # These outputs should be seen after importaddress + solvable_after_importaddress = [] # These outputs should be seen after importaddress but not spendable + unsolvable_after_importaddress = [] # These outputs should be unsolvable after importaddress + solvable_anytime = [] # These outputs should be solvable after importpubkey + unseen_anytime = [] # These outputs should never be seen + + uncompressed_spendable_address.append(self.nodes[0].addmultisigaddress(2, [uncompressed_spendable_address[0], compressed_spendable_address[0]])) + uncompressed_spendable_address.append(self.nodes[0].addmultisigaddress(2, [uncompressed_spendable_address[0], uncompressed_spendable_address[0]])) + compressed_spendable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_spendable_address[0], compressed_spendable_address[0]])) + uncompressed_solvable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_spendable_address[0], uncompressed_solvable_address[0]])) + compressed_solvable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_spendable_address[0], compressed_solvable_address[0]])) + compressed_solvable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_solvable_address[0], compressed_solvable_address[1]])) + unknown_address = ["mtKKyoHabkk6e4ppT7NaM7THqPUt7AzPrT", "2NDP3jLWAFT8NDAiUa9qiE6oBt2awmMq7Dx"] + + # Test multisig_without_privkey + # We have 2 public keys without private keys, use addmultisigaddress to add to wallet. + # Money sent to P2SH of multisig of this should only be seen after importaddress with the BASE58 P2SH address. + + multisig_without_privkey_address = self.nodes[0].addmultisigaddress(2, [pubkeys[3], pubkeys[4]]) + script = CScript([OP_2, hex_str_to_bytes(pubkeys[3]), hex_str_to_bytes(pubkeys[4]), OP_2, OP_CHECKMULTISIG]) + solvable_after_importaddress.append(CScript([OP_HASH160, hash160(script), OP_EQUAL])) + + for i in compressed_spendable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + # bare and p2sh multisig with compressed keys should always be spendable + spendable_anytime.extend([bare, p2sh]) + # P2WSH and P2SH(P2WSH) multisig with compressed keys are spendable after direct importaddress + spendable_after_importaddress.extend([p2wsh, p2sh_p2wsh]) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # normal P2PKH and P2PK with compressed keys should always be spendable + spendable_anytime.extend([p2pkh, p2pk]) + # P2SH_P2PK, P2SH_P2PKH, and witness with compressed keys are spendable after direct importaddress + spendable_after_importaddress.extend([p2wpkh, p2sh_p2wpkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh]) + + for i in uncompressed_spendable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + # bare and p2sh multisig with uncompressed keys should always be spendable + spendable_anytime.extend([bare, p2sh]) + # P2WSH and P2SH(P2WSH) multisig with uncompressed keys are never seen + unseen_anytime.extend([p2wsh, p2sh_p2wsh]) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # normal P2PKH and P2PK with uncompressed keys should always be spendable + spendable_anytime.extend([p2pkh, p2pk]) + # P2SH_P2PK and P2SH_P2PKH are spendable after direct importaddress + spendable_after_importaddress.extend([p2sh_p2pk, p2sh_p2pkh]) + # witness with uncompressed keys are never seen + unseen_anytime.extend([p2wpkh, p2sh_p2wpkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh]) + + for i in compressed_solvable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + # Multisig without private is not seen after addmultisigaddress, but seen after importaddress + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + solvable_after_importaddress.extend([bare, p2sh, p2wsh, p2sh_p2wsh]) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # normal P2PKH and P2PK with compressed keys should always be seen + solvable_anytime.extend([p2pkh, p2pk]) + # P2SH_P2PK, P2SH_P2PKH, and witness with compressed keys are seen after direct importaddress + solvable_after_importaddress.extend([p2wpkh, p2sh_p2wpkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh]) + + for i in uncompressed_solvable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + # Base uncompressed multisig without private is not seen after addmultisigaddress, but seen after importaddress + solvable_after_importaddress.extend([bare, p2sh]) + # P2WSH and P2SH(P2WSH) multisig with uncompressed keys are never seen + unseen_anytime.extend([p2wsh, p2sh_p2wsh]) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # normal P2PKH and P2PK with uncompressed keys should always be seen + solvable_anytime.extend([p2pkh, p2pk]) + # P2SH_P2PK, P2SH_P2PKH with uncompressed keys are seen after direct importaddress + solvable_after_importaddress.extend([p2sh_p2pk, p2sh_p2pkh]) + # witness with uncompressed keys are never seen + unseen_anytime.extend([p2wpkh, p2sh_p2wpkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh]) + + op1 = CScript([OP_1]) + op0 = CScript([OP_0]) + # 2N7MGY19ti4KDMSzRfPAssP6Pxyuxoi6jLe is the P2SH(P2PKH) version of mjoE3sSrb8ByYEvgnC3Aox86u1CHnfJA4V + unsolvable_address = ["mjoE3sSrb8ByYEvgnC3Aox86u1CHnfJA4V", "2N7MGY19ti4KDMSzRfPAssP6Pxyuxoi6jLe", script_to_p2sh(op1), script_to_p2sh(op0)] + unsolvable_address_key = hex_str_to_bytes("02341AEC7587A51CDE5279E0630A531AEA2615A9F80B17E8D9376327BAEAA59E3D") + unsolvablep2pkh = CScript([OP_DUP, OP_HASH160, hash160(unsolvable_address_key), OP_EQUALVERIFY, OP_CHECKSIG]) + unsolvablep2wshp2pkh = CScript([OP_0, sha256(unsolvablep2pkh)]) + p2shop0 = CScript([OP_HASH160, hash160(op0), OP_EQUAL]) + p2wshop1 = CScript([OP_0, sha256(op1)]) + unsolvable_after_importaddress.append(unsolvablep2pkh) + unsolvable_after_importaddress.append(unsolvablep2wshp2pkh) + unsolvable_after_importaddress.append(op1) # OP_1 will be imported as script + unsolvable_after_importaddress.append(p2wshop1) + unseen_anytime.append(op0) # OP_0 will be imported as P2SH address with no script provided + unsolvable_after_importaddress.append(p2shop0) + + spendable_txid = [] + solvable_txid = [] + spendable_txid.append(self.mine_and_test_listunspent(spendable_anytime, 2)) + solvable_txid.append(self.mine_and_test_listunspent(solvable_anytime, 1)) + self.mine_and_test_listunspent(spendable_after_importaddress + solvable_after_importaddress + unseen_anytime + unsolvable_after_importaddress, 0) + + importlist = [] + for i in compressed_spendable_address + uncompressed_spendable_address + compressed_solvable_address + uncompressed_solvable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + bare = hex_str_to_bytes(v['hex']) + importlist.append(bytes_to_hex_str(bare)) + importlist.append(bytes_to_hex_str(CScript([OP_0, sha256(bare)]))) + else: + pubkey = hex_str_to_bytes(v['pubkey']) + p2pk = CScript([pubkey, OP_CHECKSIG]) + p2pkh = CScript([OP_DUP, OP_HASH160, hash160(pubkey), OP_EQUALVERIFY, OP_CHECKSIG]) + importlist.append(bytes_to_hex_str(p2pk)) + importlist.append(bytes_to_hex_str(p2pkh)) + importlist.append(bytes_to_hex_str(CScript([OP_0, hash160(pubkey)]))) + importlist.append(bytes_to_hex_str(CScript([OP_0, sha256(p2pk)]))) + importlist.append(bytes_to_hex_str(CScript([OP_0, sha256(p2pkh)]))) + + importlist.append(bytes_to_hex_str(unsolvablep2pkh)) + importlist.append(bytes_to_hex_str(unsolvablep2wshp2pkh)) + importlist.append(bytes_to_hex_str(op1)) + importlist.append(bytes_to_hex_str(p2wshop1)) + + for i in importlist: + try: + self.nodes[0].importaddress(i,"",False,True) + except JSONRPCException as exp: + assert_equal(exp.error["message"], "The wallet already contains the private key for this address or script") + + self.nodes[0].importaddress(script_to_p2sh(op0)) # import OP_0 as address only + self.nodes[0].importaddress(multisig_without_privkey_address) # Test multisig_without_privkey + + spendable_txid.append(self.mine_and_test_listunspent(spendable_anytime + spendable_after_importaddress, 2)) + solvable_txid.append(self.mine_and_test_listunspent(solvable_anytime + solvable_after_importaddress, 1)) + self.mine_and_test_listunspent(unsolvable_after_importaddress, 1) + self.mine_and_test_listunspent(unseen_anytime, 0) + + # addwitnessaddress should refuse to return a witness address if an uncompressed key is used or the address is + # not in the wallet + # note that no witness address should be returned by unsolvable addresses + # the multisig_without_privkey_address will fail because its keys were not added with importpubkey + for i in uncompressed_spendable_address + uncompressed_solvable_address + unknown_address + unsolvable_address + [multisig_without_privkey_address]: + try: + self.nodes[0].addwitnessaddress(i) + except JSONRPCException as exp: + assert_equal(exp.error["message"], "Public key or redeemscript not known to wallet, or the key is uncompressed") + else: + assert(False) + + for i in compressed_spendable_address + compressed_solvable_address: + witaddress = self.nodes[0].addwitnessaddress(i) + # addwitnessaddress should return the same address if it is a known P2SH-witness address + assert_equal(witaddress, self.nodes[0].addwitnessaddress(witaddress)) + + spendable_txid.append(self.mine_and_test_listunspent(spendable_anytime + spendable_after_importaddress, 2)) + solvable_txid.append(self.mine_and_test_listunspent(solvable_anytime + solvable_after_importaddress, 1)) + self.mine_and_test_listunspent(unsolvable_after_importaddress, 1) + self.mine_and_test_listunspent(unseen_anytime, 0) + + # Repeat some tests. This time we don't add witness scripts with importaddress + # Import a compressed key and an uncompressed key, generate some multisig addresses + self.nodes[0].importprivkey("927pw6RW8ZekycnXqBQ2JS5nPyo1yRfGNN8oq74HeddWSpafDJH") + uncompressed_spendable_address = ["mguN2vNSCEUh6rJaXoAVwY3YZwZvEmf5xi"] + self.nodes[0].importprivkey("cMcrXaaUC48ZKpcyydfFo8PxHAjpsYLhdsp6nmtB3E2ER9UUHWnw") + compressed_spendable_address = ["n1UNmpmbVUJ9ytXYXiurmGPQ3TRrXqPWKL"] + + self.nodes[0].importpubkey(pubkeys[5]) + compressed_solvable_address = [key_to_p2pkh(pubkeys[5])] + self.nodes[0].importpubkey(pubkeys[6]) + uncompressed_solvable_address = [key_to_p2pkh(pubkeys[6])] + + spendable_after_addwitnessaddress = [] # These outputs should be seen after importaddress + solvable_after_addwitnessaddress=[] # These outputs should be seen after importaddress but not spendable + unseen_anytime = [] # These outputs should never be seen + + uncompressed_spendable_address.append(self.nodes[0].addmultisigaddress(2, [uncompressed_spendable_address[0], compressed_spendable_address[0]])) + uncompressed_spendable_address.append(self.nodes[0].addmultisigaddress(2, [uncompressed_spendable_address[0], uncompressed_spendable_address[0]])) + compressed_spendable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_spendable_address[0], compressed_spendable_address[0]])) + uncompressed_solvable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_solvable_address[0], uncompressed_solvable_address[0]])) + compressed_solvable_address.append(self.nodes[0].addmultisigaddress(2, [compressed_spendable_address[0], compressed_solvable_address[0]])) + + premature_witaddress = [] + + for i in compressed_spendable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + # P2WSH and P2SH(P2WSH) multisig with compressed keys are spendable after addwitnessaddress + spendable_after_addwitnessaddress.extend([p2wsh, p2sh_p2wsh]) + premature_witaddress.append(script_to_p2sh(p2wsh)) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # P2WPKH, P2SH_P2WPKH are spendable after addwitnessaddress + spendable_after_addwitnessaddress.extend([p2wpkh, p2sh_p2wpkh]) + premature_witaddress.append(script_to_p2sh(p2wpkh)) + + for i in uncompressed_spendable_address + uncompressed_solvable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + # P2WSH and P2SH(P2WSH) multisig with uncompressed keys are never seen + unseen_anytime.extend([p2wsh, p2sh_p2wsh]) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # P2WPKH, P2SH_P2WPKH with uncompressed keys are never seen + unseen_anytime.extend([p2wpkh, p2sh_p2wpkh]) + + for i in compressed_solvable_address: + v = self.nodes[0].validateaddress(i) + if (v['isscript']): + # P2WSH multisig without private key are seen after addwitnessaddress + [bare, p2sh, p2wsh, p2sh_p2wsh] = self.p2sh_address_to_script(v) + solvable_after_addwitnessaddress.extend([p2wsh, p2sh_p2wsh]) + premature_witaddress.append(script_to_p2sh(p2wsh)) + else: + [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] = self.p2pkh_address_to_script(v) + # P2SH_P2PK, P2SH_P2PKH with compressed keys are seen after addwitnessaddress + solvable_after_addwitnessaddress.extend([p2wpkh, p2sh_p2wpkh]) + premature_witaddress.append(script_to_p2sh(p2wpkh)) + + self.mine_and_test_listunspent(spendable_after_addwitnessaddress + solvable_after_addwitnessaddress + unseen_anytime, 0) + + # addwitnessaddress should refuse to return a witness address if an uncompressed key is used + # note that a multisig address returned by addmultisigaddress is not solvable until it is added with importaddress + # premature_witaddress are not accepted until the script is added with addwitnessaddress first + for i in uncompressed_spendable_address + uncompressed_solvable_address + premature_witaddress + [compressed_solvable_address[1]]: + try: + self.nodes[0].addwitnessaddress(i) + except JSONRPCException as exp: + assert_equal(exp.error["message"], "Public key or redeemscript not known to wallet, or the key is uncompressed") + else: + assert(False) + + # after importaddress it should pass addwitnessaddress + v = self.nodes[0].validateaddress(compressed_solvable_address[1]) + self.nodes[0].importaddress(v['hex'],"",False,True) + for i in compressed_spendable_address + compressed_solvable_address + premature_witaddress: + witaddress = self.nodes[0].addwitnessaddress(i) + assert_equal(witaddress, self.nodes[0].addwitnessaddress(witaddress)) + + spendable_txid.append(self.mine_and_test_listunspent(spendable_after_addwitnessaddress, 2)) + solvable_txid.append(self.mine_and_test_listunspent(solvable_after_addwitnessaddress, 1)) + self.mine_and_test_listunspent(unseen_anytime, 0) + + # Check that spendable outputs are really spendable + self.create_and_mine_tx_from_txids(spendable_txid) + + # import all the private keys so solvable addresses become spendable + self.nodes[0].importprivkey("cPiM8Ub4heR9NBYmgVzJQiUH1if44GSBGiqaeJySuL2BKxubvgwb") + self.nodes[0].importprivkey("cPpAdHaD6VoYbW78kveN2bsvb45Q7G5PhaPApVUGwvF8VQ9brD97") + self.nodes[0].importprivkey("91zqCU5B9sdWxzMt1ca3VzbtVm2YM6Hi5Rxn4UDtxEaN9C9nzXV") + self.nodes[0].importprivkey("cPQFjcVRpAUBG8BA9hzr2yEzHwKoMgLkJZBBtK9vJnvGJgMjzTbd") + self.nodes[0].importprivkey("cQGtcm34xiLjB1v7bkRa4V3aAc9tS2UTuBZ1UnZGeSeNy627fN66") + self.nodes[0].importprivkey("cTW5mR5M45vHxXkeChZdtSPozrFwFgmEvTNnanCW6wrqwaCZ1X7K") + self.create_and_mine_tx_from_txids(solvable_txid) + + def mine_and_test_listunspent(self, script_list, ismine): + utxo = find_unspent(self.nodes[0], 50) + tx = CTransaction() + tx.vin.append(CTxIn(COutPoint(int('0x'+utxo['txid'],0), utxo['vout']))) + for i in script_list: + tx.vout.append(CTxOut(10000000, i)) + tx.rehash() + signresults = self.nodes[0].signrawtransaction(bytes_to_hex_str(tx.serialize_without_witness()))['hex'] + txid = self.nodes[0].sendrawtransaction(signresults, True) + self.nodes[0].generate(1) + sync_blocks(self.nodes) + watchcount = 0 + spendcount = 0 + for i in self.nodes[0].listunspent(): + if (i['txid'] == txid): + watchcount += 1 + if (i['spendable'] == True): + spendcount += 1 + if (ismine == 2): + assert_equal(spendcount, len(script_list)) + elif (ismine == 1): + assert_equal(watchcount, len(script_list)) + assert_equal(spendcount, 0) + else: + assert_equal(watchcount, 0) + return txid + + def p2sh_address_to_script(self,v): + bare = CScript(hex_str_to_bytes(v['hex'])) + p2sh = CScript(hex_str_to_bytes(v['scriptPubKey'])) + p2wsh = CScript([OP_0, sha256(bare)]) + p2sh_p2wsh = CScript([OP_HASH160, hash160(p2wsh), OP_EQUAL]) + return([bare, p2sh, p2wsh, p2sh_p2wsh]) + + def p2pkh_address_to_script(self,v): + pubkey = hex_str_to_bytes(v['pubkey']) + p2wpkh = CScript([OP_0, hash160(pubkey)]) + p2sh_p2wpkh = CScript([OP_HASH160, hash160(p2wpkh), OP_EQUAL]) + p2pk = CScript([pubkey, OP_CHECKSIG]) + p2pkh = CScript(hex_str_to_bytes(v['scriptPubKey'])) + p2sh_p2pk = CScript([OP_HASH160, hash160(p2pk), OP_EQUAL]) + p2sh_p2pkh = CScript([OP_HASH160, hash160(p2pkh), OP_EQUAL]) + p2wsh_p2pk = CScript([OP_0, sha256(p2pk)]) + p2wsh_p2pkh = CScript([OP_0, sha256(p2pkh)]) + p2sh_p2wsh_p2pk = CScript([OP_HASH160, hash160(p2wsh_p2pk), OP_EQUAL]) + p2sh_p2wsh_p2pkh = CScript([OP_HASH160, hash160(p2wsh_p2pkh), OP_EQUAL]) + return [p2wpkh, p2sh_p2wpkh, p2pk, p2pkh, p2sh_p2pk, p2sh_p2pkh, p2wsh_p2pk, p2wsh_p2pkh, p2sh_p2wsh_p2pk, p2sh_p2wsh_p2pkh] + + def create_and_mine_tx_from_txids(self, txids, success = True): + tx = CTransaction() + for i in txids: + txtmp = CTransaction() + txraw = self.nodes[0].getrawtransaction(i) + f = BytesIO(hex_str_to_bytes(txraw)) + txtmp.deserialize(f) + for j in range(len(txtmp.vout)): + tx.vin.append(CTxIn(COutPoint(int('0x'+i,0), j))) + tx.vout.append(CTxOut(0, CScript())) + tx.rehash() + signresults = self.nodes[0].signrawtransaction(bytes_to_hex_str(tx.serialize_without_witness()))['hex'] + self.nodes[0].sendrawtransaction(signresults, True) + self.nodes[0].generate(1) + sync_blocks(self.nodes) + + if __name__ == '__main__': SegWitTest().main() diff --git a/qa/rpc-tests/test_framework/address.py b/qa/rpc-tests/test_framework/address.py new file mode 100644 index 00000000000..50b999be611 --- /dev/null +++ b/qa/rpc-tests/test_framework/address.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +# +# address.py +# +# This file encodes and decodes BASE58 P2PKH and P2SH addresses +# + +from .script import hash256, hash160, sha256, CScript, OP_0 +from .util import bytes_to_hex_str, hex_str_to_bytes + +chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' + +def byte_to_base58(b, version): + result = '' + str = bytes_to_hex_str(b) + str = bytes_to_hex_str(chr(version).encode('latin-1')) + str + checksum = bytes_to_hex_str(hash256(hex_str_to_bytes(str))) + str += checksum[:8] + value = int('0x'+str,0) + while value > 0: + result = chars[value % 58] + result + value //= 58 + while (str[:2] == '00'): + result = chars[0] + result + str = str[2:] + return result + +# TODO: def base58_decode + +def keyhash_to_p2pkh(hash, main = False): + assert (len(hash) == 20) + version = 0 if main else 111 + return byte_to_base58(hash, version) + +def scripthash_to_p2sh(hash, main = False): + assert (len(hash) == 20) + version = 5 if main else 196 + return byte_to_base58(hash, version) + +def key_to_p2pkh(key, main = False): + key = check_key(key) + return keyhash_to_p2pkh(hash160(key), main) + +def script_to_p2sh(script, main = False): + script = check_script(script) + return scripthash_to_p2sh(hash160(script), main) + +def key_to_p2sh_p2wpkh(key, main = False): + key = check_key(key) + p2shscript = CScript([OP_0, hash160(key)]) + return script_to_p2sh(p2shscript, main) + +def script_to_p2sh_p2wsh(script, main = False): + script = check_script(script) + p2shscript = CScript([OP_0, sha256(script)]) + return script_to_p2sh(p2shscript, main) + +def check_key(key): + if (type(key) is str): + key = hex_str_to_bytes(key) # Assuming this is hex string + if (type(key) is bytes and (len(key) == 33 or len(key) == 65)): + return key + assert(False) + +def check_script(script): + if (type(script) is str): + script = hex_str_to_bytes(script) # Assuming this is hex string + if (type(script) is bytes or type(script) is CScript): + return script + assert(False) diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json index 06103ea5bdd..5c054ed3e8f 100644 --- a/src/test/data/script_tests.json +++ b/src/test/data/script_tests.json @@ -1855,6 +1855,8 @@ "OK", "P2SH with CLEANSTACK" ], + +["Testing with uncompressed keys in witness v0 without WITNESS_PUBKEYTYPE"], [ [ "304402200d461c140cfdfcf36b94961db57ae8c18d1cb80e9d95a9e47ac22470c1bf125502201c8dc1cbfef6a3ef90acbbb992ca22fe9466ee6f9d4898eda277a7ac3ab4b25101", @@ -2139,7 +2141,371 @@ "P2PK with witness" ], -["CHECKSEQUENCEVERIFY tests"], +["Testing with compressed keys in witness v0 with WITNESS_PUBKEYTYPE"], +[ + [ + "304402204256146fcf8e73b0fd817ffa2a4e408ff0418ff987dd08a4f485b62546f6c43c02203f3c8c3e2febc051e1222867f5f9d0eaf039d6792911c10940aa3cc74123378e01", + "210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac", + 0.00000001 + ], + "", + "0 0x20 0x1863143c14c5166804bd19203356da136c985678cd4d27a1b8c6329604903262", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "Basic P2WSH with compressed key" +], +[ + [ + "304402204edf27486f11432466b744df533e1acac727e0c83e5f912eb289a3df5bf8035f022075809fdd876ede40ad21667eba8b7e96394938f9c9c50f11b6a1280cce2cea8601", + "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", + 0.00000001 + ], + "", + "0 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "Basic P2WPKH with compressed key" +], +[ + [ + "304402203a549090cc46bce1e5e95c4922ea2c12747988e0207b04c42f81cdbe87bb1539022050f57a245b875fd5119c419aaf050bcdf41384f0765f04b809e5bced1fe7093d01", + "210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac", + 0.00000001 + ], + "0x22 0x00201863143c14c5166804bd19203356da136c985678cd4d27a1b8c6329604903262", + "HASH160 0x14 0xe4300531190587e3880d4c3004f5355d88ff928d EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "Basic P2SH(P2WSH) with compressed key" +], +[ + [ + "304402201bc0d53046827f4a35a3166e33e3b3366c4085540dc383b95d21ed2ab11e368a0220333e78c6231214f5f8e59621e15d7eeab0d4e4d0796437e00bfbd2680c5f9c1701", + "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", + 0.00000001 + ], + "0x16 0x0014751e76e8199196d454941c45d1b3a323f1433bd6", + "HASH160 0x14 0xbcfeb728b584253d5f3f70bcb780e9ef218a68f4 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "Basic P2SH(P2WPKH) with compressed key" +], + +["Testing with uncompressed keys in witness v0 with WITNESS_PUBKEYTYPE"], +[ + [ + "304402200d461c140cfdfcf36b94961db57ae8c18d1cb80e9d95a9e47ac22470c1bf125502201c8dc1cbfef6a3ef90acbbb992ca22fe9466ee6f9d4898eda277a7ac3ab4b25101", + "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac", + 0.00000001 + ], + "", + "0 0x20 0xb95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "Basic P2WSH" +], +[ + [ + "304402201e7216e5ccb3b61d46946ec6cc7e8c4e0117d13ac2fd4b152197e4805191c74202203e9903e33e84d9ee1dd13fb057afb7ccfb47006c23f6a067185efbc9dd780fc501", + "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", + 0.00000001 + ], + "", + "0 0x14 0x91b24bf9f5288532960ac687abb035127b1d28a5", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "Basic P2WPKH" +], +[ + [ + "3044022066e02c19a513049d49349cf5311a1b012b7c4fae023795a18ab1d91c23496c22022025e216342c8e07ce8ef51e8daee88f84306a9de66236cab230bb63067ded1ad301", + "410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ac", + 0.00000001 + ], + "0x22 0x0020b95237b48faaa69eb078e1170be3b5cbb3fddf16d0a991e14ad274f7b33a4f64", + "HASH160 0x14 0xf386c2ba255cc56d20cfa6ea8b062f8b59945518 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "Basic P2SH(P2WSH)" +], +[ + [ + "304402200929d11561cd958460371200f82e9cae64c727a495715a31828e27a7ad57b36d0220361732ced04a6f97351ecca21a56d0b8cd4932c1da1f8f569a2b68e5e48aed7801", + "0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", + 0.00000001 + ], + "0x16 0x001491b24bf9f5288532960ac687abb035127b1d28a5", + "HASH160 0x14 0x17743beb429c55c942d2ec703b98c4d57c2df5c6 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "Basic P2SH(P2WPKH)" +], + +["Testing P2WSH multisig with compressed keys"], +[ + [ + "", + "304402207eb8a59b5c65fc3f6aeef77066556ed5c541948a53a3ba7f7c375b8eed76ee7502201e036a7a9a98ff919ff94dc905d67a1ec006f79ef7cff0708485c8bb79dce38e01", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "", + "0 0x20 0x06c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "P2WSH CHECKMULTISIG with compressed keys" +], +[ + [ + "", + "3044022033706aed33b8155d5486df3b9bca8cdd3bd4bdb5436dce46d72cdaba51d22b4002203626e94fe53a178af46624f17315c6931f20a30b103f5e044e1eda0c3fe185c601", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "0x22 0x002006c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460", + "HASH160 0x14 0x26282aad7c29369d15fed062a778b6100d31a340 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "P2SH(P2WSH) CHECKMULTISIG with compressed keys" +], +[ + [ + "", + "304402204048b7371ab1c544362efb89af0c80154747d665aa4fcfb2edfd2d161e57b42e02207e043748e96637080ffc3acbd4dcc6fee1e58d30f6d1269535f32188e5ddae7301", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "", + "0 0x20 0x06c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "P2WSH CHECKMULTISIG with compressed keys" +], +[ + [ + "", + "3044022073902ef0b8a554c36c44cc03c1b64df96ce2914ebcf946f5bb36078fd5245cdf02205b148f1ba127065fb8c83a5a9576f2dcd111739788ed4bb3ee08b2bd3860c91c01", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "0x22 0x002006c24420938f0fa3c1cb2707d867154220dca365cdbfa0dd2a83854730221460", + "HASH160 0x14 0x26282aad7c29369d15fed062a778b6100d31a340 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "P2SH(P2WSH) CHECKMULTISIG with compressed keys" +], + +["Testing P2WSH multisig with compressed and uncompressed keys (first key being the key closer to the top of stack)"], +[ + [ + "", + "304402202d092ededd1f060609dbf8cb76950634ff42b3e62cf4adb69ab92397b07d742302204ff886f8d0817491a96d1daccdcc820f6feb122ee6230143303100db37dfa79f01", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "", + "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "P2SH,WITNESS", + "OK", + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the first key" +], +[ + [ + "", + "304402202dd7e91243f2235481ffb626c3b7baf2c859ae3a5a77fb750ef97b99a8125dc002204960de3d3c3ab9496e218ec57e5240e0e10a6f9546316fe240c216d45116d29301", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL", + "P2SH,WITNESS", + "OK", + "P2SH(P2WSH) CHECKMULTISIG first key uncompressed and signing with the first key" +], +[ + [ + "", + "304402202d092ededd1f060609dbf8cb76950634ff42b3e62cf4adb69ab92397b07d742302204ff886f8d0817491a96d1daccdcc820f6feb122ee6230143303100db37dfa79f01", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "", + "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the first key" +], +[ + [ + "", + "304402202dd7e91243f2235481ffb626c3b7baf2c859ae3a5a77fb750ef97b99a8125dc002204960de3d3c3ab9496e218ec57e5240e0e10a6f9546316fe240c216d45116d29301", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the first key" +], +[ + [ + "", + "304402201e9e6f7deef5b2f21d8223c5189b7d5e82d237c10e97165dd08f547c4e5ce6ed02206796372eb1cc6acb52e13ee2d7f45807780bf96b132cb6697f69434be74b1af901", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "", + "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "P2SH,WITNESS", + "OK", + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the second key" +], +[ + [ + "", + "3044022045e667f3f0f3147b95597a24babe9afecea1f649fd23637dfa7ed7e9f3ac18440220295748e81005231135289fe3a88338dabba55afa1bdb4478691337009d82b68d01", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL", + "P2SH,WITNESS", + "OK", + "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the second key" +], +[ + [ + "", + "304402201e9e6f7deef5b2f21d8223c5189b7d5e82d237c10e97165dd08f547c4e5ce6ed02206796372eb1cc6acb52e13ee2d7f45807780bf96b132cb6697f69434be74b1af901", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "", + "0 0x20 0x08a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the second key" +], +[ + [ + "", + "3044022045e667f3f0f3147b95597a24babe9afecea1f649fd23637dfa7ed7e9f3ac18440220295748e81005231135289fe3a88338dabba55afa1bdb4478691337009d82b68d01", + "5121038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b852ae", + 0.00000001 + ], + "0x22 0x002008a6665ebfd43b02323423e764e185d98d1587f903b81507dbb69bfc41005efa", + "HASH160 0x14 0x6f5ecd4b83b77f3c438f5214eff96454934fc5d1 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the second key" +], +[ + [ + "", + "3044022046f5367a261fd8f8d7de6eb390491344f8ec2501638fb9a1095a0599a21d3f4c02205c1b3b51d20091c5f1020841bbca87b44ebe25405c64e4acf758f2eae8665f8401", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "", + "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "P2SH,WITNESS", + "OK", + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the first key" +], +[ + [ + "", + "3044022053e210e4fb1881e6092fd75c3efc5163105599e246ded661c0ee2b5682cc2d6c02203a26b7ada8682a095b84c6d1b881637000b47d761fc837c4cee33555296d63f101", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL", + "P2SH,WITNESS", + "OK", + "P2SH(P2WSH) CHECKMULTISIG second key uncompressed and signing with the first key" +], +[ + [ + "", + "3044022046f5367a261fd8f8d7de6eb390491344f8ec2501638fb9a1095a0599a21d3f4c02205c1b3b51d20091c5f1020841bbca87b44ebe25405c64e4acf758f2eae8665f8401", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "", + "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the first key should pass as the uncompressed key is not used" +], +[ + [ + "", + "3044022053e210e4fb1881e6092fd75c3efc5163105599e246ded661c0ee2b5682cc2d6c02203a26b7ada8682a095b84c6d1b881637000b47d761fc837c4cee33555296d63f101", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "OK", + "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the first key should pass as the uncompressed key is not used" +], +[ + [ + "", + "304402206c6d9f5daf85b54af2a93ec38b15ab27f205dbf5c735365ff12451e43613d1f40220736a44be63423ed5ebf53491618b7cc3d8a5093861908da853739c73717938b701", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "", + "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "P2SH,WITNESS", + "OK", + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the second key" +], +[ + [ + "", + "30440220687871bc6144012d75baf585bb26ce13997f7d8c626f4d8825b069c3b2d064470220108936fe1c57327764782253e99090b09c203ec400ed35ce9e026ce2ecf842a001", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL", + "P2SH,WITNESS", + "OK", + "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the second key" +], +[ + [ + "", + "304402206c6d9f5daf85b54af2a93ec38b15ab27f205dbf5c735365ff12451e43613d1f40220736a44be63423ed5ebf53491618b7cc3d8a5093861908da853739c73717938b701", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "", + "0 0x20 0x230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the second key" +], +[ + [ + "", + "30440220687871bc6144012d75baf585bb26ce13997f7d8c626f4d8825b069c3b2d064470220108936fe1c57327764782253e99090b09c203ec400ed35ce9e026ce2ecf842a001", + "5141048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179852ae", + 0.00000001 + ], + "0x22 0x0020230828ed48871f0f362ce9432aa52f620f442cc8d9ce7a8b5e798365595a38bb", + "HASH160 0x14 0x3478e7019ce61a68148f87549579b704cbe4c393 EQUAL", + "P2SH,WITNESS,WITNESS_PUBKEYTYPE", + "WITNESS_PUBKEYTYPE", + "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the second key" +], + +["CHECKSEQUENCEVERIFY tests"], ["", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "INVALID_STACK_OPERATION", "CSV automatically fails on a empty stack"], ["-1", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY", "NEGATIVE_LOCKTIME", "CSV automatically fails if stack top is negative"], ["0x0100", "CHECKSEQUENCEVERIFY", "CHECKSEQUENCEVERIFY,MINIMALDATA", "UNKNOWN_ERROR", "CSV fails if stack top is not minimally encoded"], diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 68a9991e7dc..532921a7224 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -826,6 +826,99 @@ BOOST_AUTO_TEST_CASE(script_build) "P2PK with witness", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH ).PushSig(keys.key0).Push("0").AsWit().ScriptError(SCRIPT_ERR_WITNESS_UNEXPECTED)); + // Compressed keys should pass SCRIPT_VERIFY_WITNESS_PUBKEYTYPE + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG, + "Basic P2WSH with compressed key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).PushWitSig(keys.key0C).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C), + "Basic P2WPKH with compressed key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_PKH, + 0, 1).PushWitSig(keys.key0C).Push(keys.pubkey0C).AsWit()); + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG, + "Basic P2SH(P2WSH) with compressed key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).PushWitSig(keys.key0C).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C), + "Basic P2SH(P2WPKH) with compressed key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_PKH, + 0, 1).PushWitSig(keys.key0C).Push(keys.pubkey0C).AsWit().PushRedeem()); + + // Testing uncompressed key in witness with SCRIPT_VERIFY_WITNESS_PUBKEYTYPE + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0) << OP_CHECKSIG, + "Basic P2WSH", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).PushWitSig(keys.key0).PushWitRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0), + "Basic P2WPKH", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_PKH, + 0, 1).PushWitSig(keys.key0).Push(keys.pubkey0).AsWit().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0) << OP_CHECKSIG, + "Basic P2SH(P2WSH)", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).PushWitSig(keys.key0).PushWitRedeem().PushRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0), + "Basic P2SH(P2WPKH)", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_PKH, + 0, 1).PushWitSig(keys.key0).Push(keys.pubkey0).AsWit().PushRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + + // P2WSH 1-of-2 multisig with compressed keys + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with compressed keys", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0C).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with compressed keys", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0C).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with compressed keys", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1C).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with compressed keys", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1C).PushWitRedeem().PushRedeem()); + + // P2WSH 1-of-2 multisig with first key uncompressed + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the first key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG first key uncompressed and signing with the first key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the first key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0).PushWitRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the first key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0).PushWitRedeem().PushRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1C).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1C).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with first key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1C).PushWitRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with first key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1C).PushWitRedeem().PushRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + // P2WSH 1-of-2 multisig with second key uncompressed + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the first key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0C).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG second key uncompressed and signing with the first key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0C).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the first key should pass as the uncompressed key is not used", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0C).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the first key should pass as the uncompressed key is not used", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key0C).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1).PushWitRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1).PushWitRedeem().PushRedeem()); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2WSH CHECKMULTISIG with second key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, false, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1).PushWitRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + tests.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1) << ToByteVector(keys.pubkey0C) << OP_2 << OP_CHECKMULTISIG, + "P2SH(P2WSH) CHECKMULTISIG with second key uncompressed and signing with the second key", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS_PUBKEYTYPE, true, WITNESS_SH, + 0, 1).Push(CScript()).AsWit().PushWitSig(keys.key1).PushWitRedeem().PushRedeem().ScriptError(SCRIPT_ERR_WITNESS_PUBKEYTYPE)); + std::set tests_set; { From 9777fe12722ddab7b1b17df11077d448c7a25006 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Mon, 17 Oct 2016 03:18:36 +0800 Subject: [PATCH 171/302] remove redundant tests in p2p-segwit.py Github-Pull: #8499 Rebased-From: 67d6ee1e3679504f46473fe0818970565ff3b137 --- qa/rpc-tests/p2p-segwit.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 864579dc477..7218ae83d88 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -1869,16 +1869,11 @@ def test_non_standard_witness(self): # Stack element size over 80 bytes is non-standard p2wsh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 81] * 100 + [scripts[1]] - # It can't be used to blind a node to the transaction - self.std_node.announce_tx_and_wait_for_getdata(p2wsh_txs[1]) - self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, False, b'bad-witness-nonstandard') - self.std_node.announce_tx_and_wait_for_getdata(p2wsh_txs[1]) self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, False, b'bad-witness-nonstandard') # Non-standard nodes should accept self.test_node.test_transaction_acceptance(p2wsh_txs[1], True, True) # Standard nodes should accept if element size is not over 80 bytes p2wsh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 80] * 100 + [scripts[1]] - self.std_node.announce_tx_and_wait_for_getdata(p2wsh_txs[1]) self.std_node.test_transaction_acceptance(p2wsh_txs[1], True, True) # witnessScript size at 3600 bytes is standard @@ -1897,13 +1892,9 @@ def test_non_standard_witness(self): self.std_node.test_transaction_acceptance(p2sh_txs[0], True, False, b'bad-witness-nonstandard') self.test_node.test_transaction_acceptance(p2sh_txs[0], True, True) p2sh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 81] * 100 + [scripts[1]] - self.std_node.announce_tx_and_wait_for_getdata(p2sh_txs[1]) - self.std_node.test_transaction_acceptance(p2sh_txs[1], True, False, b'bad-witness-nonstandard') - self.std_node.announce_tx_and_wait_for_getdata(p2sh_txs[1]) self.std_node.test_transaction_acceptance(p2sh_txs[1], True, False, b'bad-witness-nonstandard') self.test_node.test_transaction_acceptance(p2sh_txs[1], True, True) p2sh_txs[1].wit.vtxinwit[0].scriptWitness.stack = [pad * 80] * 100 + [scripts[1]] - self.std_node.announce_tx_and_wait_for_getdata(p2sh_txs[1]) self.std_node.test_transaction_acceptance(p2sh_txs[1], True, True) p2sh_txs[2].wit.vtxinwit[0].scriptWitness.stack = [pad, pad, scripts[2]] self.test_node.test_transaction_acceptance(p2sh_txs[2], True, True) From cb8887e87df315dbc6c560149b3a97b704a676aa Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 17 Oct 2016 14:15:01 +0000 Subject: [PATCH 172/302] qt: periodic translation update --- src/qt/locale/bitcoin_af.ts | 39 +- src/qt/locale/bitcoin_af_ZA.ts | 41 +- src/qt/locale/bitcoin_ar.ts | 51 +- src/qt/locale/bitcoin_be_BY.ts | 45 +- src/qt/locale/bitcoin_bg.ts | 51 +- src/qt/locale/bitcoin_bg_BG.ts | 37 +- src/qt/locale/bitcoin_ca.ts | 55 +- src/qt/locale/bitcoin_ca@valencia.ts | 55 +- src/qt/locale/bitcoin_ca_ES.ts | 55 +- src/qt/locale/bitcoin_cs.ts | 59 +- src/qt/locale/bitcoin_cs_CZ.ts | 41 +- src/qt/locale/bitcoin_cy.ts | 39 +- src/qt/locale/bitcoin_da.ts | 1273 +++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_de.ts | 395 ++++++++++- src/qt/locale/bitcoin_el.ts | 39 +- src/qt/locale/bitcoin_el_GR.ts | 55 +- src/qt/locale/bitcoin_en_GB.ts | 59 +- src/qt/locale/bitcoin_eo.ts | 55 +- src/qt/locale/bitcoin_es.ts | 59 +- src/qt/locale/bitcoin_es_AR.ts | 37 +- src/qt/locale/bitcoin_es_CL.ts | 47 +- src/qt/locale/bitcoin_es_CO.ts | 37 +- src/qt/locale/bitcoin_es_DO.ts | 55 +- src/qt/locale/bitcoin_es_ES.ts | 39 +- src/qt/locale/bitcoin_es_MX.ts | 43 +- src/qt/locale/bitcoin_es_UY.ts | 41 +- src/qt/locale/bitcoin_es_VE.ts | 43 +- src/qt/locale/bitcoin_et.ts | 47 +- src/qt/locale/bitcoin_eu_ES.ts | 41 +- src/qt/locale/bitcoin_fa.ts | 55 +- src/qt/locale/bitcoin_fa_IR.ts | 45 +- src/qt/locale/bitcoin_fi.ts | 55 +- src/qt/locale/bitcoin_fr.ts | 195 +++++- src/qt/locale/bitcoin_fr_CA.ts | 39 +- src/qt/locale/bitcoin_fr_FR.ts | 51 +- src/qt/locale/bitcoin_gl.ts | 53 +- src/qt/locale/bitcoin_he.ts | 155 ++++- src/qt/locale/bitcoin_hi_IN.ts | 41 +- src/qt/locale/bitcoin_hr.ts | 77 +- src/qt/locale/bitcoin_hu.ts | 53 +- src/qt/locale/bitcoin_id_ID.ts | 55 +- src/qt/locale/bitcoin_it.ts | 63 +- src/qt/locale/bitcoin_it_IT.ts | 37 +- src/qt/locale/bitcoin_ja.ts | 1237 ++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_ka.ts | 55 +- src/qt/locale/bitcoin_kk_KZ.ts | 41 +- src/qt/locale/bitcoin_ko_KR.ts | 59 +- src/qt/locale/bitcoin_ku_IQ.ts | 39 +- src/qt/locale/bitcoin_ky.ts | 39 +- src/qt/locale/bitcoin_la.ts | 45 +- src/qt/locale/bitcoin_lt.ts | 45 +- src/qt/locale/bitcoin_lv_LV.ts | 55 +- src/qt/locale/bitcoin_mk_MK.ts | 43 +- src/qt/locale/bitcoin_mn.ts | 45 +- src/qt/locale/bitcoin_ms_MY.ts | 37 +- src/qt/locale/bitcoin_nb.ts | 55 +- src/qt/locale/bitcoin_ne.ts | 37 +- src/qt/locale/bitcoin_nl.ts | 1237 ++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_pam.ts | 45 +- src/qt/locale/bitcoin_pl.ts | 59 +- src/qt/locale/bitcoin_pt_BR.ts | 69 +- src/qt/locale/bitcoin_pt_PT.ts | 59 +- src/qt/locale/bitcoin_ro.ts | 45 +- src/qt/locale/bitcoin_ro_RO.ts | 55 +- src/qt/locale/bitcoin_ru.ts | 1235 ++++++++++++++++++++++++++++++++- src/qt/locale/bitcoin_ru_RU.ts | 37 +- src/qt/locale/bitcoin_sk.ts | 55 +- src/qt/locale/bitcoin_sl_SI.ts | 55 +- src/qt/locale/bitcoin_sq.ts | 41 +- src/qt/locale/bitcoin_sr.ts | 43 +- src/qt/locale/bitcoin_sr@latin.ts | 89 ++- src/qt/locale/bitcoin_sv.ts | 91 ++- src/qt/locale/bitcoin_ta.ts | 43 +- src/qt/locale/bitcoin_th_TH.ts | 43 +- src/qt/locale/bitcoin_tr.ts | 59 +- src/qt/locale/bitcoin_tr_TR.ts | 37 +- src/qt/locale/bitcoin_uk.ts | 55 +- src/qt/locale/bitcoin_ur_PK.ts | 39 +- src/qt/locale/bitcoin_uz@Cyrl.ts | 51 +- src/qt/locale/bitcoin_vi.ts | 37 +- src/qt/locale/bitcoin_vi_VN.ts | 41 +- src/qt/locale/bitcoin_zh.ts | 33 + src/qt/locale/bitcoin_zh_CN.ts | 59 +- src/qt/locale/bitcoin_zh_HK.ts | 37 +- src/qt/locale/bitcoin_zh_TW.ts | 1231 +++++++++++++++++++++++++++++++- 85 files changed, 10000 insertions(+), 719 deletions(-) diff --git a/src/qt/locale/bitcoin_af.ts b/src/qt/locale/bitcoin_af.ts index 8305b706032..0b8a738ea0d 100644 --- a/src/qt/locale/bitcoin_af.ts +++ b/src/qt/locale/bitcoin_af.ts @@ -41,7 +41,10 @@ &Delete &Vee uit - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Herhaal nuwe wagwoord - + BanTableModel @@ -357,7 +360,7 @@ Priority Prioriteit - + EditAddressDialog @@ -500,6 +503,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -538,6 +544,9 @@ + QRImageWidget + + RPCConsole N/A @@ -607,6 +616,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Bytes: @@ -657,6 +669,9 @@ SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -669,12 +684,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts index e553fc77593..1d4d726c75f 100644 --- a/src/qt/locale/bitcoin_af_ZA.ts +++ b/src/qt/locale/bitcoin_af_ZA.ts @@ -13,7 +13,10 @@ &Delete &Verwyder - + + + AddressTableModel + AskPassphraseDialog @@ -32,7 +35,7 @@ Repeat new passphrase Herhaal nuwe wagfrase - + BanTableModel @@ -140,7 +143,7 @@ &Address &Adres - + FreespaceChecker @@ -180,6 +183,9 @@ + PaymentServer + + PeerTableModel @@ -190,6 +196,9 @@ + QRImageWidget + + RPCConsole &Information @@ -211,6 +220,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -240,7 +252,7 @@ S&end S&tuur - + SendCoinsEntry @@ -253,6 +265,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -277,12 +292,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts index 2e1603bb832..4077889894a 100644 --- a/src/qt/locale/bitcoin_ar.ts +++ b/src/qt/locale/bitcoin_ar.ts @@ -41,7 +41,10 @@ &Delete &أمسح - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase ادخل كلمة المرور الجديدة مرة أخرى - + BanTableModel @@ -411,7 +414,7 @@ Priority أفضلية - + EditAddressDialog @@ -434,7 +437,7 @@ &Address &العنوان - + FreespaceChecker @@ -538,7 +541,7 @@ Select payment request file حدد ملف طلب الدفع - + OptionsDialog @@ -662,6 +665,9 @@ + PaymentServer + + PeerTableModel @@ -684,6 +690,9 @@ + QRImageWidget + + RPCConsole N/A @@ -868,7 +877,7 @@ Remove ازل - + ReceiveRequestDialog @@ -887,7 +896,10 @@ &Save Image... &حفظ الصورة - + + + RecentRequestsTableModel + SendCoinsDialog @@ -978,7 +990,7 @@ S&end &ارسال - + SendCoinsEntry @@ -1031,6 +1043,9 @@ + SendConfirmationDialog + + ShutdownWindow Do not shut down the computer until this window disappears. @@ -1099,16 +1114,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction يبين هذا الجزء وصفا مفصلا لهده المعاملة - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts index 5894148fe03..dfbf3873ae7 100644 --- a/src/qt/locale/bitcoin_be_BY.ts +++ b/src/qt/locale/bitcoin_be_BY.ts @@ -41,7 +41,10 @@ &Delete Выдаліць - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Паўтарыце новую кодавую фразу - + BanTableModel @@ -415,7 +418,7 @@ Priority Прыярытэт - + EditAddressDialog @@ -430,7 +433,7 @@ &Address Адрас - + FreespaceChecker @@ -514,6 +517,9 @@ + PaymentServer + + PeerTableModel @@ -524,6 +530,9 @@ + QRImageWidget + + RPCConsole &Information @@ -553,6 +562,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -641,7 +653,10 @@ Memo: Памятка: - + + + SendConfirmationDialog + ShutdownWindow @@ -675,16 +690,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Гэтая панэль паказвае дэтальнае апісанне транзакцыі - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts index acb60cf41c5..b1d772ea134 100644 --- a/src/qt/locale/bitcoin_bg.ts +++ b/src/qt/locale/bitcoin_bg.ts @@ -41,7 +41,10 @@ &Delete &Изтриване - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Въведете новата парола повторно - + BanTableModel @@ -463,7 +466,7 @@ Priority Приоритет - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Адрес - + FreespaceChecker @@ -830,6 +833,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -880,6 +886,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1112,7 +1121,7 @@ Remove Премахване - + ReceiveRequestDialog @@ -1131,7 +1140,10 @@ &Save Image... &Запиши изображение... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1254,7 +1266,7 @@ S&end И&зпрати - + SendCoinsEntry @@ -1305,7 +1317,10 @@ Memo: Бележка: - + + + SendConfirmationDialog + ShutdownWindow @@ -1391,16 +1406,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Описание на транзакцията - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_bg_BG.ts b/src/qt/locale/bitcoin_bg_BG.ts index 4bddb5ff4a8..977fbf57e5e 100644 --- a/src/qt/locale/bitcoin_bg_BG.ts +++ b/src/qt/locale/bitcoin_bg_BG.ts @@ -41,7 +41,10 @@ &Delete Изтрий - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Повтори парола - + BanTableModel @@ -188,12 +191,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -203,12 +212,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -221,12 +236,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts index f066760ffdc..355cd4418e7 100644 --- a/src/qt/locale/bitcoin_ca.ts +++ b/src/qt/locale/bitcoin_ca.ts @@ -41,7 +41,10 @@ &Delete &Elimina - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetiu la nova contrasenya - + BanTableModel @@ -435,7 +438,7 @@ Priority Prioritat - + EditAddressDialog @@ -458,7 +461,7 @@ &Address &Adreça - + FreespaceChecker @@ -578,7 +581,7 @@ Select payment request file Selecciona un fitxer de sol·licitud de pagament - + OptionsDialog @@ -870,6 +873,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -924,6 +930,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1264,7 +1273,7 @@ Remove Esborra - + ReceiveRequestDialog @@ -1283,7 +1292,10 @@ &Save Image... De&sa la imatge... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1434,7 +1446,7 @@ S&end E&nvia - + SendCoinsEntry @@ -1513,7 +1525,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1607,7 +1622,7 @@ Reset all verify message fields Neteja tots els camps de verificació de missatge - + SplashScreen @@ -1623,12 +1638,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Aquest panell mostra una descripció detallada de la transacció - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1637,6 +1661,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts index bf779aad6ce..213e57ce1ba 100644 --- a/src/qt/locale/bitcoin_ca@valencia.ts +++ b/src/qt/locale/bitcoin_ca@valencia.ts @@ -41,7 +41,10 @@ &Delete &Elimina - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetiu la nova contrasenya - + BanTableModel @@ -427,7 +430,7 @@ Priority Prioritat - + EditAddressDialog @@ -450,7 +453,7 @@ &Address &Adreça - + FreespaceChecker @@ -546,7 +549,7 @@ Select payment request file Selecciona un fitxer de sol·licitud de pagament - + OptionsDialog @@ -814,6 +817,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -868,6 +874,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1136,7 +1145,7 @@ Remove Esborra - + ReceiveRequestDialog @@ -1155,7 +1164,10 @@ &Save Image... &Guarda la imatge... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1306,7 +1318,7 @@ S&end E&nvia - + SendCoinsEntry @@ -1385,7 +1397,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1479,7 +1494,7 @@ Reset all verify message fields Neteja tots els camps de verificació de missatge - + SplashScreen @@ -1495,12 +1510,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Este panell mostra una descripció detallada de la transacció - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1509,6 +1533,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts index 9835c8547f9..976881531bc 100644 --- a/src/qt/locale/bitcoin_ca_ES.ts +++ b/src/qt/locale/bitcoin_ca_ES.ts @@ -41,7 +41,10 @@ &Delete &Elimina - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetiu la nova contrasenya - + BanTableModel @@ -435,7 +438,7 @@ Priority Prioritat - + EditAddressDialog @@ -458,7 +461,7 @@ &Address &Adreça - + FreespaceChecker @@ -578,7 +581,7 @@ Select payment request file Selecciona un fitxer de sol·licitud de pagament - + OptionsDialog @@ -870,6 +873,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -924,6 +930,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1264,7 +1273,7 @@ Remove Esborra - + ReceiveRequestDialog @@ -1283,7 +1292,10 @@ &Save Image... De&sa la imatge... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1434,7 +1446,7 @@ S&end E&nvia - + SendCoinsEntry @@ -1513,7 +1525,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1607,7 +1622,7 @@ Reset all verify message fields Neteja tots els camps de verificació de missatge - + SplashScreen @@ -1623,12 +1638,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Aquest panell mostra una descripció detallada de la transacció - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1637,6 +1661,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index 0b28956ff02..449e67dd3ee 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -41,7 +41,10 @@ &Delete S&maž - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Totéž heslo ještě jednou - + BanTableModel @@ -427,7 +430,7 @@ Priority Priorita - + EditAddressDialog @@ -450,7 +453,7 @@ &Address &Adresa - + FreespaceChecker @@ -570,7 +573,7 @@ Select payment request file Vyber soubor platebního požadavku - + OptionsDialog @@ -862,6 +865,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -916,6 +922,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1220,7 +1229,7 @@ Remove Smazat - + ReceiveRequestDialog @@ -1239,7 +1248,10 @@ &Save Image... &Ulož obrázek... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1390,7 +1402,7 @@ S&end Pošl&i - + SendCoinsEntry @@ -1469,7 +1481,10 @@ Memo: Poznámka: - + + + SendConfirmationDialog + ShutdownWindow @@ -1563,7 +1578,7 @@ Reset all verify message fields Vymaž všechna pole formuláře pro ověření zrávy - + SplashScreen @@ -1579,12 +1594,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Toto okno zobrazuje detailní popis transakce - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1593,6 +1617,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1691,10 +1724,6 @@ Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Vynutit přeposílání transakcí od vždy vítaných protějšků (tj. těch na bílé listině), i když porušují místní zásady pro přeposílání (výchozí: %d) - - Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Nastavení počtu vláken pro verifikaci skriptů (%u až %d, 0 = automaticky, <0 = nechat daný počet jader volný, výchozí: %d) diff --git a/src/qt/locale/bitcoin_cs_CZ.ts b/src/qt/locale/bitcoin_cs_CZ.ts index 70aa981f503..e7e38d65acc 100644 --- a/src/qt/locale/bitcoin_cs_CZ.ts +++ b/src/qt/locale/bitcoin_cs_CZ.ts @@ -29,7 +29,10 @@ &Delete &Odstranit - + + + AddressTableModel + AskPassphraseDialog @@ -44,7 +47,7 @@ Repeat new passphrase Zopakujte nové heslo - + BanTableModel @@ -160,7 +163,7 @@ &Address &Adresa - + FreespaceChecker @@ -200,6 +203,9 @@ OverviewPage + PaymentServer + + PeerTableModel @@ -210,6 +216,9 @@ + QRImageWidget + + RPCConsole Name @@ -231,6 +240,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Amount: @@ -253,6 +265,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -269,16 +284,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Toto podokno zobrazuje detailní popis transakce - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts index 38bc45775bc..9fcd5eeb8c6 100644 --- a/src/qt/locale/bitcoin_cy.ts +++ b/src/qt/locale/bitcoin_cy.ts @@ -29,7 +29,10 @@ &Delete &Dileu - + + + AddressTableModel + AskPassphraseDialog @@ -44,7 +47,7 @@ Repeat new passphrase Ailadroddwch gyfrinymadrodd newydd - + BanTableModel @@ -252,7 +255,7 @@ &Address &Cyfeiriad - + FreespaceChecker @@ -332,12 +335,18 @@ + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole &Information @@ -367,6 +376,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -417,6 +429,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -445,12 +460,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index 8675f8aa6a6..eee6cf20aae 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -41,6 +41,77 @@ &Delete &Slet + + Choose the address to send coins to + Vælg adresse at sende bitcoins til + + + Choose the address to receive coins with + Vælg adresse at modtage bitcoins med + + + C&hoose + &Vælg + + + Sending addresses + Afsendelsesadresser + + + Receiving addresses + Modtagelsesadresser + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Disse er dine Bitcoin-adresser til afsendelse af betalinger. Tjek altid beløb og modtagelsesadresse, inden du sender bitcoins. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Dette er dine Bitcoin-adresser til modtagelse af betalinger. Det anbefales at bruge en ny modtagelsesadresse for hver transaktion. + + + &Copy Address + &Kopiér adresse + + + Copy &Label + Kopiér &mærkat + + + &Edit + &Redigér + + + Export Address List + Eksportér adresseliste + + + Comma separated file (*.csv) + Kommasepareret fil (*.csv) + + + Exporting Failed + Eksport mislykkedes + + + There was an error trying to save the address list to %1. Please try again. + Der opstod en fejl under gemning af adresselisten til %1. Prøv venligst igen. + + + + AddressTableModel + + Label + Mærkat + + + Address + Adresse + + + (no label) + (ingen mærkat) + AskPassphraseDialog @@ -60,6 +131,94 @@ Repeat new passphrase Gentag ny adgangskode + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Indtast det nye kodeord til tegnebogen.<br/>Brug venligst et kodeord på <b>ti eller flere tilfældige tegn</b> eller <b>otte eller flere ord</b>. + + + Encrypt wallet + Kryptér tegnebog + + + This operation needs your wallet passphrase to unlock the wallet. + Denne funktion har brug for din tegnebogs adgangskode for at låse tegnebogen op. + + + Unlock wallet + Lås tegnebog op + + + This operation needs your wallet passphrase to decrypt the wallet. + Denne funktion har brug for din tegnebogs adgangskode for at dekryptere tegnebogen. + + + Decrypt wallet + Dekryptér tegnebog + + + Change passphrase + Skift adgangskode + + + Enter the old passphrase and new passphrase to the wallet. + Indtast den gamle adgangskode og en ny adgangskode til tegnebogen. + + + Confirm wallet encryption + Bekræft tegnebogskryptering + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Advarsel: Hvis du krypterer din tegnebog og mister din adgangskode, vil du <b>MISTE ALLE DINE BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + Er du sikker på, at du ønsker at kryptere din tegnebog? + + + Wallet encrypted + Tegnebog krypteret + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 vil nu lukke for at færdiggøre krypteringsprocessen. Husk at kryptering af din tegnebog kan ikke beskytte dine bitcoin fuldt ud mod at blive stjålet af eventuel malware, der måtte have inficeret din computer. + + + 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. + VIGTIGT: Enhver tidligere sikkerhedskopi, som du har lavet af tegnebogsfilen, bør blive erstattet af den nyligt genererede, krypterede tegnebogsfil. Af sikkerhedsmæssige årsager vil tidligere sikkerhedskopier af den ikke-krypterede tegnebogsfil blive ubrugelige i det øjeblik, du starter med at anvende den nye, krypterede tegnebog. + + + Wallet encryption failed + Tegnebogskryptering mislykkedes + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Tegnebogskryptering mislykkedes på grund af en intern fejl. Din tegnebog blev ikke krypteret. + + + The supplied passphrases do not match. + De angivne adgangskoder stemmer ikke overens. + + + Wallet unlock failed + Tegnebogsoplåsning mislykkedes + + + The passphrase entered for the wallet decryption was incorrect. + Den angivne adgangskode for tegnebogsdekrypteringen er forkert. + + + Wallet decryption failed + Tegnebogsdekryptering mislykkedes + + + Wallet passphrase was successfully changed. + Tegnebogens adgangskode blev ændret. + + + Warning: The Caps Lock key is on! + Advarsel: Caps Lock-tasten er aktiveret! + BanTableModel @@ -76,7 +235,7 @@ BitcoinGUI Sign &message... - Underskriv &besked… + Signér &besked… Synchronizing with network... @@ -216,11 +375,11 @@ Sign messages with your Bitcoin addresses to prove you own them - Underskriv beskeder med dine Bitcoin-adresser for at bevise, at de tilhører dig + Signér beskeder med dine Bitcoin-adresser for at bevise, at de tilhører dig Verify messages to ensure they were signed with specified Bitcoin addresses - Verificér beskeder for at sikre, at de er underskrevet med de angivne Bitcoin-adresser + Verificér beskeder for at sikre, at de er signeret med de angivne Bitcoin-adresser &File @@ -463,6 +622,150 @@ Priority Prioritet + + Copy address + Kopiér adresse + + + Copy label + Kopiér mærkat + + + Copy amount + Kopiér beløb + + + Copy transaction ID + Kopiér transaktions-ID + + + Lock unspent + Fastlås ubrugte + + + Unlock unspent + Lås ubrugte op + + + Copy quantity + Kopiér mængde + + + Copy fee + Kopiér gebyr + + + Copy after fee + Kopiér eftergebyr + + + Copy bytes + Kopiér byte + + + Copy priority + Kopiér prioritet + + + Copy dust + Kopiér støv + + + Copy change + Kopiér byttepenge + + + highest + højest + + + higher + højere + + + high + højt + + + medium-high + mellemhøjt + + + medium + medium + + + low-medium + mellemlavt + + + low + lavt + + + lower + lavere + + + lowest + lavest + + + (%1 locked) + (%1 fastlåst) + + + none + ingen + + + yes + ja + + + no + nej + + + This label turns red if the transaction size is greater than 1000 bytes. + Denne mærkat bliver rød, hvis transaktionsstørrelsen er større end 1000 byte. + + + This means a fee of at least %1 per kB is required. + Dette betyder, at et gebyr på mindst %1 pr. kB er nødvendigt. + + + Can vary +/- 1 byte per input. + Kan variere ±1 byte pr. input. + + + Transactions with higher priority are more likely to get included into a block. + Transaktioner med højere prioritet har højere sansynlighed for at blive inkluderet i en blok. + + + This label turns red if the priority is smaller than "medium". + Denne mærkat bliver rød, hvis prioriteten er mindre end "medium". + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Denne mærkat bliver rød, hvis en eller flere modtagere modtager et beløb, der er mindre end den aktuelle støvgrænse. + + + Can vary +/- %1 satoshi(s) per input. + Kan variere med ±%1 satoshi per input. + + + (no label) + (ingen mærkat) + + + change from %1 (%2) + byttepenge fra %1 (%2) + + + (change) + (byttepange) + EditAddressDialog @@ -486,6 +789,38 @@ &Address &Adresse + + New receiving address + Ny modtagelsesadresse + + + New sending address + Ny afsendelsesadresse + + + Edit receiving address + Redigér modtagelsesadresse + + + Edit sending address + Redigér afsendelsesadresse + + + The entered address "%1" is not a valid Bitcoin address. + Den indtastede adresse "%1" er ikke en gyldig Bitcoin-adresse. + + + The entered address "%1" is already in the address book. + Den indtastede adresse "%1" er allerede i adressebogen. + + + Could not unlock wallet. + Kunne ikke låse tegnebog op. + + + New key generation failed. + Ny nøglegenerering mislykkedes. + FreespaceChecker @@ -626,6 +961,10 @@ Select payment request file Vælg fil for betalingsanmodning + + Select payment request file to open + Vælg fil for betalingsanmodning til åbning + OptionsDialog @@ -938,6 +1277,97 @@ + PaymentServer + + Payment request error + Fejl i betalingsanmodning + + + Cannot start bitcoin: click-to-pay handler + Kan ikke starte bitcoin: click-to-pay-håndtering + + + URI handling + URI-håndtering + + + Payment request fetch URL is invalid: %1 + Hentnings-URL for betalingsanmodning er ugyldig: %1 + + + Invalid payment address %1 + Ugyldig betalingsadresse %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI kan ikke tolkes! Dette kan skyldes en ugyldig Bitcoin-adresse eller forkert udformede URL-parametre. + + + Payment request file handling + Filhåndtering for betalingsanmodninger + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Fil for betalingsanmodning kan ikke læses! Dette kan skyldes en ugyldig fil for betalingsanmodning. + + + Payment request rejected + Betalingsanmodning afvist + + + Payment request network doesn't match client network. + Netværk for betalingsanmodning stemmer ikke overens med klientens netværk. + + + Payment request expired. + Betalingsanmodning er udløbet. + + + Payment request is not initialized. + Betalingsanmodning er ikke klargjort. + + + Unverified payment requests to custom payment scripts are unsupported. + Ikke-verificerede betalingsanmodninger for tilpassede betalings-scripts understøttes ikke. + + + Invalid payment request. + Ugyldig betalingsanmodning. + + + Requested payment amount of %1 is too small (considered dust). + Anmodet betalingsbeløb på %1 er for lille (regnes som støv). + + + Refund from %1 + Tilbagebetaling fra %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Betalingsanmodning %1 er for stor (%2 byte; %3 byte tilladt). + + + Error communicating with %1: %2 + Fejl under kommunikation med %1: %2 + + + Payment request cannot be parsed! + Betalingsanmodning kan ikke tolkes! + + + Bad response from server %1 + Fejlagtigt svar fra server %1 + + + Network request error + Fejl i netværksforespørgsel + + + Payment acknowledged + Betaling anerkendt + + + PeerTableModel User Agent @@ -992,6 +1422,25 @@ + QRImageWidget + + &Save Image... + Gem billede… + + + &Copy Image + &Kopiér foto + + + Save QR Code + Gem QR-kode + + + PNG Image (*.png) + PNG-billede (*.png) + + + RPCConsole N/A @@ -1352,6 +1801,18 @@ Remove Fjern + + Copy label + Kopiér mærkat + + + Copy message + Kopiér besked + + + Copy amount + Kopiér beløb + ReceiveRequestDialog @@ -1371,40 +1832,107 @@ &Save Image... &Gem billede… - - - SendCoinsDialog - Send Coins - Send bitcoins + Request payment to %1 + Anmod om betaling til %1 - Coin Control Features - Egenskaber for coin-styring + Payment information + Betalingsinformation - Inputs... - Inputs… + URI + URI - automatically selected - valgt automatisk + Address + Adresse - Insufficient funds! - Utilstrækkelige midler! + Amount + Beløb - Quantity: - Mængde: + Label + Mærkat - Bytes: - Byte: + Message + Besked - Amount: - Beløb: + Resulting URI too long, try to reduce the text for label / message. + Resulterende URI var for lang; prøv at forkorte teksten til mærkaten/beskeden. + + + Error encoding URI into QR Code. + Fejl ved kodning fra URI til QR-kode. + + + + RecentRequestsTableModel + + Date + Dato + + + Label + Mærkat + + + Message + Besked + + + (no label) + (ingen mærkat) + + + (no message) + (ingen besked) + + + (no amount requested) + (intet anmodet beløb) + + + Requested + Anmodet + + + + SendCoinsDialog + + Send Coins + Send bitcoins + + + Coin Control Features + Egenskaber for coin-styring + + + Inputs... + Inputs… + + + automatically selected + valgt automatisk + + + Insufficient funds! + Utilstrækkelige midler! + + + Quantity: + Mængde: + + + Bytes: + Byte: + + + Amount: + Beløb: Priority: @@ -1522,6 +2050,118 @@ S&end &Afsend + + Copy quantity + Kopiér mængde + + + Copy amount + Kopiér beløb + + + Copy fee + Kopiér gebyr + + + Copy after fee + Kopiér eftergebyr + + + Copy bytes + Kopiér byte + + + Copy priority + Kopiér prioritet + + + Copy dust + Kopiér støv + + + Copy change + Kopiér byttepenge + + + %1 to %2 + %1 til %2 + + + Are you sure you want to send? + Er du sikker på, at du vil sende? + + + added as transaction fee + tilføjet som transaktionsgebyr + + + Total Amount %1 + Beløb i alt %1 + + + or + eller + + + Confirm send coins + Bekræft afsendelse af bitcoins + + + The recipient address is not valid. Please recheck. + Modtageradressen er ikke gyldig. Tjek venligst igen. + + + The amount to pay must be larger than 0. + Beløbet til betaling skal være større end 0. + + + The amount exceeds your balance. + Beløbet overstiger din saldo. + + + The total exceeds your balance when the %1 transaction fee is included. + Totalen overstiger din saldo, når transaktionsgebyret på %1 er inkluderet. + + + Duplicate address found: addresses should only be used once each. + Adressegenganger fundet. Adresser bør kun bruges én gang hver. + + + Transaction creation failed! + Oprettelse af transaktion mislykkedes! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + Transaktionen blev afvist! Dette kan ske, hvis nogle af dine bitcoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine bitcoins er blevet brugt i kopien, men ikke er markeret som brugt her. + + + A fee higher than %1 is considered an absurdly high fee. + Et gebyr højere end %1 opfattes som et absurd højt gebyr. + + + Payment request expired. + Betalingsanmodning er udløbet. + + + Pay only the required fee of %1 + Betal kun det påkrævede gebyr på %1 + + + Estimated to begin confirmation within %n block(s). + Bekræftelse estimeret til at begynde inden for %n blok.Bekræftelse estimeret til at begynde inden for %n blokke. + + + Warning: Invalid Bitcoin address + Advarsel: Ugyldig Bitcoin-adresse + + + Warning: Unknown change address + Advarsel: Ukendt byttepengeadresse + + + (no label) + (ingen mærkat) + SendCoinsEntry @@ -1601,6 +2241,17 @@ Memo: Memo: + + Enter a label for this address to add it to your address book + Indtast en mærkat for denne adresse for at føje den til din adressebog + + + + SendConfirmationDialog + + Yes + Ja + ShutdownWindow @@ -1617,11 +2268,11 @@ SignVerifyMessageDialog Signatures - Sign / Verify a Message - Signature - Underskriv/verificér en besked + Signaturer – Underskriv/verificér en besked &Sign Message - &Underskriv besked + &Singér besked You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. @@ -1649,27 +2300,27 @@ Enter the message you want to sign here - Indtast her beskeden, du ønsker at underskrive + Indtast her beskeden, du ønsker at signere Signature - Underskrift + Signatur Copy the current signature to the system clipboard - Kopiér den nuværende underskrift til systemets udklipsholder + Kopiér den nuværende signatur til systemets udklipsholder Sign the message to prove you own this Bitcoin address - Underskriv denne besked for at bevise, at Bitcoin-adressen tilhører dig + Signér denne besked for at bevise, at Bitcoin-adressen tilhører dig Sign &Message - Underskriv &besked + Signér &besked Reset all sign message fields - Nulstil alle "underskriv besked"-felter + Nulstil alle "signér besked"-felter Clear &All @@ -1689,7 +2340,7 @@ Verify the message to ensure it was signed with the specified Bitcoin address - Verificér beskeden for at sikre, at den er underskrevet med den angivne Bitcoin-adresse + Verificér beskeden for at sikre, at den er signeret med den angivne Bitcoin-adresse Verify &Message @@ -1699,6 +2350,58 @@ Reset all verify message fields Nulstil alle "verificér besked"-felter + + Click "Sign Message" to generate signature + Klik "Signér besked" for at generere underskriften + + + The entered address is invalid. + Den indtastede adresse er ugyldig. + + + Please check the address and try again. + Tjek venligst adressen og forsøg igen. + + + The entered address does not refer to a key. + Den indtastede adresse henviser ikke til en nøgle. + + + Wallet unlock was cancelled. + Tegnebogsoplåsning annulleret. + + + Private key for the entered address is not available. + Den private nøgle for den indtastede adresse er ikke tilgængelig. + + + Message signing failed. + Signering af besked mislykkedes. + + + Message signed. + Besked signeret. + + + The signature could not be decoded. + Signaturen kunne ikke afkodes. + + + Please check the signature and try again. + Tjek venligst signaturen og forsøg igen. + + + The signature did not match the message digest. + Signaturen passer ikke overens med beskedens indhold. + + + Message verification failed. + Verificering af besked mislykkedes. + + + Message verified. + Besked verificeret. + SplashScreen @@ -1715,11 +2418,456 @@ + TransactionDesc + + Open for %n more block(s) + Åbn yderligere %n blokÅbn yderligere %n blokke + + + Open until %1 + Åben indtil %1 + + + conflicted with a transaction with %1 confirmations + i konflikt med en transaktion, der har %1 bekræftelser + + + %1/offline + %1/offline + + + 0/unconfirmed, %1 + 0/ubekræftet, %1 + + + in memory pool + i hukommelsespulje + + + not in memory pool + ikke i hukommelsespulje + + + abandoned + opgivet + + + %1/unconfirmed + %1/ubekræftet + + + %1 confirmations + %1 bekræftelser + + + Status + Status + + + , has not been successfully broadcast yet + , er ikke blevet transmitteret endnu + + + , broadcast through %n node(s) + , transmitteret igennem %n knude, transmitteret igennem %n knuder + + + Date + Dato + + + Source + Kilde + + + Generated + Genereret + + + From + Fra + + + unknown + ukendt + + + To + Til + + + own address + egen adresse + + + watch-only + kigge + + + label + mærkat + + + Credit + Kredit + + + matures in %n more block(s) + modner efter yderligere %n blokmodner efter yderligere %n blokke + + + not accepted + ikke accepteret + + + Debit + Debet + + + Total debit + Total debet + + + Total credit + Total kredit + + + Transaction fee + Transaktionsgebyr + + + Net amount + Nettobeløb + + + Message + Besked + + + Comment + Kommentar + + + Transaction ID + Transaktions-ID + + + Output index + Outputindeks + + + Merchant + Forretningsdrivende + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Minede bitcoins skal modne %1 blokke, før de kan bruges. Da du genererede denne blok, blev den transmitteret til netværket for at blive føjet til blokkæden. Hvis det ikke lykkes at få den i kæden, vil dens tilstand ændres til "ikke accepteret", og den vil ikke kunne bruges. Dette kan ske nu og da, hvis en anden knude udvinder en blok inden for nogle få sekunder fra din. + + + Debug information + Fejlsøgningsinformation + + + Transaction + Transaktion + + + Inputs + Input + + + Amount + Beløb + + + true + sand + + + false + falsk + + + TransactionDescDialog This pane shows a detailed description of the transaction Denne rude viser en detaljeret beskrivelse af transaktionen + + Details for %1 + Detaljer for %1 + + + + TransactionTableModel + + Date + Dato + + + Type + Type + + + Label + Mærkat + + + Open for %n more block(s) + Åben i yderligere %n blokÅben i yderligere %n blokke + + + Open until %1 + Åben indtil %1 + + + Offline + Offline + + + Unconfirmed + Ubekræftet + + + Abandoned + Opgivet + + + Confirming (%1 of %2 recommended confirmations) + Bekræfter (%1 af %2 anbefalede bekræftelser) + + + Confirmed (%1 confirmations) + Bekræftet (%1 bekræftelser) + + + Conflicted + Konflikt + + + Immature (%1 confirmations, will be available after %2) + Umoden (%1 bekræftelser; vil være tilgængelig efter %2) + + + This block was not received by any other nodes and will probably not be accepted! + Denne blok blev ikke modtaget af nogen andre knuder og vil formentlig ikke blive accepteret! + + + Generated but not accepted + Genereret, men ikke accepteret + + + Received with + Modtaget med + + + Received from + Modtaget fra + + + Sent to + Sendt til + + + Payment to yourself + Betaling til dig selv + + + Mined + Minet + + + watch-only + kigge + + + (n/a) + (n/a) + + + (no label) + (ingen mærkat) + + + Transaction status. Hover over this field to show number of confirmations. + Transaktionsstatus. Hold musen over dette felt for at vise antallet af bekræftelser. + + + Date and time that the transaction was received. + Dato og klokkeslæt for modtagelse af transaktionen. + + + Type of transaction. + Transaktionstype. + + + Whether or not a watch-only address is involved in this transaction. + Afgør hvorvidt en kigge-adresse er involveret i denne transaktion. + + + User-defined intent/purpose of the transaction. + Brugerdefineret hensigt/formål med transaktionen. + + + Amount removed from or added to balance. + Beløb trukket fra eller tilføjet balance. + + + + TransactionView + + All + Alle + + + Today + I dag + + + This week + Denne uge + + + This month + Denne måned + + + Last month + Sidste måned + + + This year + I år + + + Range... + Interval… + + + Received with + Modtaget med + + + Sent to + Sendt til + + + To yourself + Til dig selv + + + Mined + Minet + + + Other + Andet + + + Enter address or label to search + Indtast adresse eller mærkat for at søge + + + Min amount + Minimumsbeløb + + + Abandon transaction + Opgiv transaktion + + + Copy address + Kopiér adresse + + + Copy label + Kopiér mærkat + + + Copy amount + Kopiér beløb + + + Copy transaction ID + Kopiér transaktions-ID + + + Copy raw transaction + Kopiér rå transaktion + + + Copy full transaction details + Kopiér komplette transaktionsdetaljer + + + Edit label + Redigér mærkat + + + Show transaction details + Vis transaktionsdetaljer + + + Export Transaction History + Eksportér transaktionshistorik + + + Comma separated file (*.csv) + Kommasepareret fil (*.csv) + + + Confirmed + Bekræftet + + + Watch-only + Kigge + + + Date + Dato + + + Type + Type + + + Label + Mærkat + + + Address + Adresse + + + ID + ID + + + Exporting Failed + Eksport mislykkedes + + + There was an error trying to save the transaction history to %1. + En fejl opstod under gemning af transaktionshistorik til %1. + + + Exporting Successful + Eksport problemfri + + + The transaction history was successfully saved to %1. + Transaktionshistorikken blev gemt til %1. + + + Range: + Interval: + + + to + til + UnitDisplayStatusBarControl @@ -1729,6 +2877,55 @@ + WalletFrame + + No wallet has been loaded. + Ingen tegnebog er indlæst. + + + + WalletModel + + Send Coins + Send bitcoins + + + + WalletView + + &Export + &Eksportér + + + Export the data in the current tab to a file + Eksportér den aktuelle visning til en fil + + + Backup Wallet + Sikkerhedskopiér tegnebog + + + Wallet Data (*.dat) + Tegnebogsdata (*.dat) + + + Backup Failed + Sikkerhedskopiering mislykkedes + + + There was an error trying to save the wallet data to %1. + Der skete en fejl under gemning af tegnebogsdata til %1. + + + Backup Successful + Sikkerhedskopiering problemfri + + + The wallet data was successfully saved to %1. + Tegnebogsdata blev gemt til %1. + + + bitcoin-core Options: @@ -1847,10 +3044,6 @@ Udfør kommando, når en transaktion i tegnebogen ændres (%s i kommandoen erstattes med TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Gennemtving videresendelse af transaktioner fra hvidlistede knuder, selv om de overtræder lokal videresendelsespolitik (standard: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Justering af maksimalt tilladt gennemsnitlig afvigelse fra peer-tid. Den lokale opfattelse af tid kan blive påvirket frem eller tilbage af peers med denne mængde tid. (standard: %u sekunder) @@ -2111,6 +3304,10 @@ Angiv tegnebogsfil (inden for datamappe) + Starting network threads... + Starter netværkstråde… + + The source code is available from %s. Kildekoden er tilgængelig fra %s. @@ -2195,6 +3392,10 @@ Gebyrer (i %s/kB) mindre end dette opfattes som intet gebyr for videresendelse, mining og oprettelse af transaktioner (standard: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Gennemtving videresendelse af transaktioner fra hvidlistede knuder, selv om de overtræder lokal videresendelsespolitik (standard: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Hvis paytxfee ikke er sat, inkluderes nok gebyr til at transaktioner begynder at blive bekræftet ingen for gennemsnitligt n blokke (standard: %u) @@ -2316,7 +3517,7 @@ Signing transaction failed - Underskrift af transaktion mislykkedes + Signering af transaktion mislykkedes The transaction amount is too small to pay the fee diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 498baf97ec3..0e99b8df055 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -41,6 +41,77 @@ &Delete &Löschen + + Choose the address to send coins to + Wählen Sie die Adresse aus, an die Sie Bitcoins überweisen möchten + + + Choose the address to receive coins with + Wählen Sie die Adresse aus, über die Sie Bitcoins empfangen wollen + + + C&hoose + &Auswählen + + + Sending addresses + Zahlungsadressen + + + Receiving addresses + Empfangsadressen + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Dies sind ihre Bitcoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Bitcoins überweisen. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Dies sind Ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es wird empfohlen, für jede Transaktion eine neue Empfangsadresse zu verwenden. + + + &Copy Address + Adresse &kopieren + + + Copy &Label + &Bezeichnung kopieren + + + &Edit + &Editieren + + + Export Address List + Addressliste exportieren + + + Comma separated file (*.csv) + Kommagetrennte-Datei (*.csv) + + + Exporting Failed + Exportieren fehlgeschlagen + + + There was an error trying to save the address list to %1. Please try again. + Beim Speichern der Adressliste nach %1 ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut. + + + + AddressTableModel + + Label + Bezeichnung + + + Address + Adresse + + + (no label) + (keine Bezeichnung) + AskPassphraseDialog @@ -60,7 +131,59 @@ Repeat new passphrase Neue Passphrase bestätigen - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Geben Sie die neue Passphrase für die Wallet ein.<br>Bitte benutzen Sie eine Passphrase bestehend aus <b>zehn oder mehr zufälligen Zeichen</b> oder <b>acht oder mehr Wörtern</b>. + + + Encrypt wallet + Wallet verschlüsseln + + + This operation needs your wallet passphrase to unlock the wallet. + Dieser Vorgang benötigt ihre Passphrase, um die Wallet zu entsperren. + + + Unlock wallet + Wallet entsperren + + + This operation needs your wallet passphrase to decrypt the wallet. + Dieser Vorgang benötigt Ihre Passphrase, um die Wallet zu entschlüsseln. + + + Decrypt wallet + Wallet entschlüsseln + + + Change passphrase + Passphrase ändern + + + Enter the old passphrase and new passphrase to the wallet. + Geben Sie die alte und neue Wallet-Passphrase ein. + + + Confirm wallet encryption + Wallet-Verschlüsselung bestätigen + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Warnung: Wenn Sie Ihre Wallet verschlüsseln und Ihre Passphrase verlieren, werden Sie <b>alle Ihre Bitcoins verlieren</b>! + + + Are you sure you wish to encrypt your wallet? + Sind Sie sich sicher, dass Sie Ihre Wallet verschlüsseln möchten? + + + Wallet encrypted + Wallet verschlüsselt + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Wallet-Verschlüsselung nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadprogramme schützt, die Ihren Computer befällt. + + BanTableModel @@ -463,6 +586,102 @@ Priority Priorität + + Copy address + Adresse kopieren + + + Copy label + Bezeichnung kopieren + + + Copy amount + Betrag kopieren + + + Copy transaction ID + Transaktionskennung kopieren + + + Copy fee + Gebühr kopieren + + + Copy after fee + Abzüglich Gebühr kopieren + + + Copy bytes + Byte kopieren + + + Copy priority + Priorität kopieren + + + Copy change + Wechselgeld kopieren + + + highest + am höchsten + + + higher + höher + + + high + hoch + + + medium-high + mittel-hoch + + + medium + mittel + + + low-medium + niedrig-mittel + + + low + niedrig + + + lower + niedriger + + + lowest + am niedrigsten + + + (%1 locked) + (%1 gesperrt) + + + none + keine + + + yes + ja + + + no + nein + + + (no label) + (keine Bezeichnung) + + + (change) + (Wechselgeld) + EditAddressDialog @@ -486,7 +705,7 @@ &Address &Adresse - + FreespaceChecker @@ -626,7 +845,7 @@ Select payment request file Zahlungsanforderungsdatei auswählen - + OptionsDialog @@ -938,6 +1157,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +1214,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,6 +1577,14 @@ Remove Entfernen + + Copy label + Bezeichnung kopieren + + + Copy amount + Betrag kopieren + ReceiveRequestDialog @@ -1371,7 +1604,26 @@ &Save Image... Grafik &speichern... - + + Address + Adresse + + + Label + Bezeichnung + + + + RecentRequestsTableModel + + Label + Bezeichnung + + + (no label) + (keine Bezeichnung) + + SendCoinsDialog @@ -1522,6 +1774,34 @@ S&end &Überweisen + + Copy amount + Betrag kopieren + + + Copy fee + Gebühr kopieren + + + Copy after fee + Abzüglich Gebühr kopieren + + + Copy bytes + Byte kopieren + + + Copy priority + Priorität kopieren + + + Copy change + Wechselgeld kopieren + + + (no label) + (keine Bezeichnung) + SendCoinsEntry @@ -1601,7 +1881,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1699,7 +1982,7 @@ Reset all verify message fields Alle "Nachricht verifizieren"-Felder zurücksetzen - + SplashScreen @@ -1715,12 +1998,61 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an - + + + TransactionTableModel + + Label + Bezeichnung + + + (no label) + (keine Bezeichnung) + + + + TransactionView + + Copy address + Adresse kopieren + + + Copy label + Bezeichnung kopieren + + + Copy amount + Betrag kopieren + + + Copy transaction ID + Transaktionskennung kopieren + + + Comma separated file (*.csv) + Kommagetrennte-Datei (*.csv) + + + Label + Bezeichnung + + + Address + Adresse + + + Exporting Failed + Exportieren fehlgeschlagen + + UnitDisplayStatusBarControl @@ -1729,6 +2061,47 @@ + WalletFrame + + + WalletModel + + + WalletView + + &Export + E&xportieren + + + Export the data in the current tab to a file + Daten der aktuellen Ansicht in eine Datei exportieren + + + Backup Wallet + Wallet sichern + + + Wallet Data (*.dat) + Wallet-Daten (*.dat) + + + Backup Failed + Sicherung fehlgeschlagen + + + There was an error trying to save the wallet data to %1. + Beim Speichern der Wallet-Daten nach %1 ist ein Fehler aufgetreten. + + + Backup Successful + Sicherung erfolgreich + + + The wallet data was successfully saved to %1. + Speichern der Wallet-Daten nach %1 war erfolgreich. + + + bitcoin-core Options: @@ -1835,10 +2208,6 @@ Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die Transaktions-ID ersetzt) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Leite Transaktionen von Peers auf der Positivliste auf jeden Fall weiter, auch wenn sie die lokale Weiterleitungsregeln verletzen (Standardeinstellung: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) @@ -2171,6 +2540,10 @@ Niedrigere Gebühren (in %s/Kb) als diese werden bei der Transaktionserstellung als gebührenfrei angesehen (Standard: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Leite Transaktionen von Peers auf der Positivliste auf jeden Fall weiter, auch wenn sie die lokale Weiterleitungsregeln verletzen (Standardeinstellung: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Wenn -paytxfee nicht festgelegt wurde Gebühren einschließen, so dass mit der Bestätigung von Transaktionen im Schnitt innerhalb von n Blöcken begonnen wird (Standard: %u) diff --git a/src/qt/locale/bitcoin_el.ts b/src/qt/locale/bitcoin_el.ts index de76a110cfc..8134baeac3b 100644 --- a/src/qt/locale/bitcoin_el.ts +++ b/src/qt/locale/bitcoin_el.ts @@ -7,6 +7,9 @@ + AddressTableModel + + AskPassphraseDialog Enter passphrase @@ -20,7 +23,7 @@ Repeat new passphrase Επαναλάβετε νέο συνθηματικό - + BanTableModel @@ -56,7 +59,7 @@ &Address Διεύθυνση - + FreespaceChecker @@ -92,12 +95,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole Services @@ -110,11 +119,14 @@ Remove Αφαίρεση - + ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Insufficient funds! @@ -133,6 +145,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -145,12 +160,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Insufficient funds diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts index 2814e4f6e7a..43b04f1a88a 100644 --- a/src/qt/locale/bitcoin_el_GR.ts +++ b/src/qt/locale/bitcoin_el_GR.ts @@ -41,7 +41,10 @@ &Delete &Διαγραφή - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Επανέλαβε τον νέο κωδικό πρόσβασης - + BanTableModel @@ -407,7 +410,7 @@ Priority Προτεραιότητα - + EditAddressDialog @@ -430,7 +433,7 @@ &Address &Διεύθυνση - + FreespaceChecker @@ -526,7 +529,7 @@ Select payment request file Επιλέξτε πληρωμή αρχείου αίτησης - + OptionsDialog @@ -787,6 +790,9 @@ + PaymentServer + + PeerTableModel Ping Time @@ -833,6 +839,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1053,7 +1062,7 @@ Remove Αφαίρεση - + ReceiveRequestDialog @@ -1072,7 +1081,10 @@ &Save Image... &Αποθήκευση εικόνας... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1203,7 +1215,7 @@ S&end Αποστολη - + SendCoinsEntry @@ -1262,7 +1274,10 @@ Memo: Σημείωση: - + + + SendConfirmationDialog + ShutdownWindow @@ -1348,7 +1363,7 @@ Reset all verify message fields Επαναφορά όλων επαλήθευμενων πεδίων μήνυματος - + SplashScreen @@ -1364,12 +1379,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Αυτό το παράθυρο δείχνει μια λεπτομερή περιγραφή της συναλλαγής - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1378,6 +1402,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts index 16a85ee346a..f308f6d4d38 100644 --- a/src/qt/locale/bitcoin_en_GB.ts +++ b/src/qt/locale/bitcoin_en_GB.ts @@ -41,7 +41,10 @@ &Delete &Delete - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repeat new passphrase - + BanTableModel @@ -463,7 +466,7 @@ Priority Priority - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Address - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Select payment request file - + OptionsDialog @@ -938,6 +941,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +998,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1361,7 @@ Remove Remove - + ReceiveRequestDialog @@ -1371,7 +1380,10 @@ &Save Image... &Save Image... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1522,7 +1534,7 @@ S&end S&end - + SendCoinsEntry @@ -1601,7 +1613,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1699,7 +1714,7 @@ Reset all verify message fields Reset all verify message fields - + SplashScreen @@ -1715,12 +1730,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction This pane shows a detailed description of the transaction - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1729,6 +1753,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1847,10 +1880,6 @@ Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts index 4471aeb72e6..e29527063ec 100644 --- a/src/qt/locale/bitcoin_eo.ts +++ b/src/qt/locale/bitcoin_eo.ts @@ -41,7 +41,10 @@ &Delete &Forigi - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Ripetu la novan pasfrazon - + BanTableModel @@ -415,7 +418,7 @@ Priority Prioritato - + EditAddressDialog @@ -438,7 +441,7 @@ &Address &Adreso - + FreespaceChecker @@ -526,7 +529,7 @@ Select payment request file Elektu la dosieron de la pagpeto - + OptionsDialog @@ -710,6 +713,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -740,6 +746,9 @@ + QRImageWidget + + RPCConsole N/A @@ -920,7 +929,7 @@ Remove Forigi - + ReceiveRequestDialog @@ -939,7 +948,10 @@ &Save Image... &Konservi Bildon... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1022,7 +1034,7 @@ S&end Ŝendi - + SendCoinsEntry @@ -1077,7 +1089,10 @@ Memo: Memorando: - + + + SendConfirmationDialog + ShutdownWindow @@ -1155,7 +1170,7 @@ Reset all verify message fields Reagordigi ĉiujn prikontrolajn kampojn - + SplashScreen @@ -1171,16 +1186,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Tiu ĉi panelo montras detalan priskribon de la transakcio - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index 7b942585151..aa0ebd2924c 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -41,7 +41,10 @@ &Delete &Eliminar - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repita la nueva contraseña - + BanTableModel @@ -463,7 +466,7 @@ Priority Prioridad - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Dirección - + FreespaceChecker @@ -622,7 +625,7 @@ Select payment request file Seleccionar archivo de sulicitud de pago - + OptionsDialog @@ -934,6 +937,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -988,6 +994,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1348,7 +1357,7 @@ Remove Eliminar - + ReceiveRequestDialog @@ -1367,7 +1376,10 @@ &Save Image... Guardar Imagen... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1518,7 +1530,7 @@ S&end &Enviar - + SendCoinsEntry @@ -1597,7 +1609,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1695,7 +1710,7 @@ Reset all verify message fields Vaciar todos los campos de la verificación de mensaje - + SplashScreen @@ -1711,12 +1726,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Esta ventana muestra información detallada sobre la transacción - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1725,6 +1749,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1846,10 +1879,6 @@ Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Fuerza la retransmisión de transacciones desde nodos en la lista blanca incluso si violan la política de retransmisiones local (predeterminado: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Ajuste máximo permitido del tiempo offset medio de pares. La perspectiva local de tiempo se verá influenciada por los pares anteriores y posteriores a esta cantidad. (Por defecto: %u segundos) diff --git a/src/qt/locale/bitcoin_es_AR.ts b/src/qt/locale/bitcoin_es_AR.ts index 40ebaf88560..c1581b798a0 100644 --- a/src/qt/locale/bitcoin_es_AR.ts +++ b/src/qt/locale/bitcoin_es_AR.ts @@ -41,7 +41,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetí la nueva Frase de Contraseña - + BanTableModel @@ -92,12 +95,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -107,12 +116,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -125,12 +140,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts index 188641d6e7a..c864753f209 100644 --- a/src/qt/locale/bitcoin_es_CL.ts +++ b/src/qt/locale/bitcoin_es_CL.ts @@ -41,7 +41,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Repite nueva contraseña - + BanTableModel @@ -282,7 +285,7 @@ Priority prioridad - + EditAddressDialog @@ -297,7 +300,7 @@ &Address &Dirección - + FreespaceChecker @@ -442,6 +445,9 @@ + PaymentServer + + PeerTableModel @@ -456,6 +462,9 @@ + QRImageWidget + + RPCConsole N/A @@ -548,7 +557,10 @@ &Save Image... Guardar imagen... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -608,7 +620,7 @@ S&end &Envía - + SendCoinsEntry @@ -645,6 +657,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -709,16 +724,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Esta ventana muestra información detallada sobre la transacción - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_es_CO.ts b/src/qt/locale/bitcoin_es_CO.ts index 7d10e0320d8..6cf512fdc36 100644 --- a/src/qt/locale/bitcoin_es_CO.ts +++ b/src/qt/locale/bitcoin_es_CO.ts @@ -37,7 +37,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Repetir nueva contraseña - + BanTableModel @@ -216,12 +219,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -231,12 +240,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -249,12 +264,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts index ba963d2b804..9cb1e93ada4 100644 --- a/src/qt/locale/bitcoin_es_DO.ts +++ b/src/qt/locale/bitcoin_es_DO.ts @@ -37,7 +37,10 @@ &Delete &Eliminar - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Repita la nueva contraseña - + BanTableModel @@ -349,7 +352,7 @@ Priority Prioridad - + EditAddressDialog @@ -372,7 +375,7 @@ &Address &Dirección - + FreespaceChecker @@ -452,7 +455,7 @@ Select payment request file Seleccione archivo de sulicitud de pago - + OptionsDialog @@ -616,6 +619,9 @@ + PaymentServer + + PeerTableModel @@ -638,6 +644,9 @@ + QRImageWidget + + RPCConsole N/A @@ -798,7 +807,7 @@ Remove Eliminar - + ReceiveRequestDialog @@ -817,7 +826,10 @@ &Save Image... Guardar Imagen... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -908,7 +920,7 @@ S&end &Enviar - + SendCoinsEntry @@ -963,7 +975,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1037,7 +1052,7 @@ Reset all verify message fields Limpiar todos los campos de la verificación de mensaje - + SplashScreen @@ -1053,16 +1068,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Esta ventana muestra información detallada sobre la transacción - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_es_ES.ts b/src/qt/locale/bitcoin_es_ES.ts index c66a477cc29..40b6bb7df04 100644 --- a/src/qt/locale/bitcoin_es_ES.ts +++ b/src/qt/locale/bitcoin_es_ES.ts @@ -41,7 +41,10 @@ &Delete &Eliminar - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repite la nueva contraseña - + BanTableModel @@ -164,7 +167,7 @@ &Address Dirección - + FreespaceChecker @@ -184,12 +187,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -203,12 +212,18 @@ + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -221,12 +236,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts index 0a6ea1e1dd1..bfda085d90a 100644 --- a/src/qt/locale/bitcoin_es_MX.ts +++ b/src/qt/locale/bitcoin_es_MX.ts @@ -41,7 +41,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repita la nueva contraseña - + BanTableModel @@ -293,7 +296,7 @@ Priority Prioridad - + EditAddressDialog @@ -308,7 +311,7 @@ &Address &Dirección - + FreespaceChecker @@ -376,6 +379,9 @@ + PaymentServer + + PeerTableModel @@ -386,6 +392,9 @@ + QRImageWidget + + RPCConsole Debug window @@ -427,6 +436,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -521,6 +533,9 @@ + SendConfirmationDialog + + ShutdownWindow Do not shut down the computer until this window disappears. @@ -553,16 +568,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Este panel muestras una descripción detallada de la transacción - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts index c565a63cd88..5e37c3f170d 100644 --- a/src/qt/locale/bitcoin_es_UY.ts +++ b/src/qt/locale/bitcoin_es_UY.ts @@ -33,7 +33,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -48,7 +51,7 @@ Repeat new passphrase Repetir nueva contraseña - + BanTableModel @@ -224,7 +227,7 @@ Priority Prioridad - + EditAddressDialog @@ -239,7 +242,7 @@ &Address &Direccion - + FreespaceChecker @@ -275,12 +278,18 @@ + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole &Information @@ -302,6 +311,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -372,6 +384,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -400,12 +415,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_es_VE.ts b/src/qt/locale/bitcoin_es_VE.ts index 432adc57eea..322b311ed86 100644 --- a/src/qt/locale/bitcoin_es_VE.ts +++ b/src/qt/locale/bitcoin_es_VE.ts @@ -41,7 +41,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetir nueva frase de contraseña - + BanTableModel @@ -301,7 +304,7 @@ Priority Prioridad - + EditAddressDialog @@ -324,7 +327,7 @@ &Address &Dirección - + FreespaceChecker @@ -408,7 +411,7 @@ Select payment request file Seleccionar archivo de solicitud de pago - + OptionsDialog @@ -448,6 +451,9 @@ + PaymentServer + + PeerTableModel @@ -458,6 +464,9 @@ + QRImageWidget + + RPCConsole &Information @@ -495,6 +504,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Quantity: @@ -537,6 +549,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -549,12 +564,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts index d17904d97e1..5d2423eef11 100644 --- a/src/qt/locale/bitcoin_et.ts +++ b/src/qt/locale/bitcoin_et.ts @@ -41,7 +41,10 @@ &Delete &Kustuta - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Korda salafraasi - + BanTableModel @@ -350,7 +353,7 @@ &Address &Aadress - + FreespaceChecker @@ -530,6 +533,9 @@ + PaymentServer + + PeerTableModel @@ -544,6 +550,9 @@ + QRImageWidget + + RPCConsole N/A @@ -676,7 +685,7 @@ Remove Eemalda - + ReceiveRequestDialog @@ -685,6 +694,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -754,7 +766,7 @@ S&end S&aada - + SendCoinsEntry @@ -791,6 +803,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -859,7 +874,7 @@ Reset all verify message fields Tühjenda kõik sõnumi kinnitamise väljad - + SplashScreen @@ -875,16 +890,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Paan kuvab tehingu detailid - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts index cbe246f4438..51ee5b0b8ab 100644 --- a/src/qt/locale/bitcoin_eu_ES.ts +++ b/src/qt/locale/bitcoin_eu_ES.ts @@ -41,7 +41,10 @@ &Delete &Ezabatu - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Errepikatu pasahitz berria - + BanTableModel @@ -184,7 +187,7 @@ &Address &Helbidea - + FreespaceChecker @@ -212,6 +215,9 @@ + PaymentServer + + PeerTableModel @@ -222,6 +228,9 @@ + QRImageWidget + + RPCConsole @@ -247,6 +256,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -305,6 +317,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -333,16 +348,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Panel honek transakzioaren deskribapen xehea erakusten du - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts index a58743270f0..a02c2dd9a93 100644 --- a/src/qt/locale/bitcoin_fa.ts +++ b/src/qt/locale/bitcoin_fa.ts @@ -41,7 +41,10 @@ &Delete &حذف - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase تکرار گذرواژهٔ جدید - + BanTableModel @@ -431,7 +434,7 @@ Priority اولویت - + EditAddressDialog @@ -446,7 +449,7 @@ &Address &نشانی - + FreespaceChecker @@ -538,7 +541,7 @@ Select payment request file انتخاب فایل درخواست پرداخت - + OptionsDialog @@ -730,6 +733,9 @@ + PaymentServer + + PeerTableModel Ping Time @@ -776,6 +782,9 @@ + QRImageWidget + + RPCConsole N/A @@ -972,7 +981,7 @@ Remove حذف کردن - + ReceiveRequestDialog @@ -987,7 +996,10 @@ &Save Image... &ذخیره عکس... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1102,7 +1114,7 @@ S&end &ارسال - + SendCoinsEntry @@ -1157,7 +1169,10 @@ Memo: یادداشت: - + + + SendConfirmationDialog + ShutdownWindow @@ -1243,7 +1258,7 @@ Reset all verify message fields بازنشانی تمام فیلدهای پیام - + SplashScreen @@ -1259,16 +1274,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction این پانل شامل توصیف کاملی از جزئیات تراکنش است - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts index afeab08c73f..64faca8fe8f 100644 --- a/src/qt/locale/bitcoin_fa_IR.ts +++ b/src/qt/locale/bitcoin_fa_IR.ts @@ -37,7 +37,10 @@ &Delete حذف - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase رمز/پَس فرِیز را دوباره وارد کنید - + BanTableModel @@ -224,7 +227,7 @@ &Address حساب& - + FreespaceChecker @@ -288,6 +291,9 @@ + PaymentServer + + PeerTableModel @@ -298,6 +304,9 @@ + QRImageWidget + + RPCConsole Client version @@ -343,6 +352,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -372,7 +384,7 @@ S&end و ارسال - + SendCoinsEntry @@ -411,7 +423,10 @@ Memo: یادداشت: - + + + SendConfirmationDialog + ShutdownWindow @@ -453,16 +468,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction این بخش جزئیات تراکنش را نشان می دهد - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts index 4be3085a4d8..9f7974eee96 100644 --- a/src/qt/locale/bitcoin_fi.ts +++ b/src/qt/locale/bitcoin_fi.ts @@ -41,7 +41,10 @@ &Delete &Poista - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Toista uusi tunnuslause - + BanTableModel @@ -463,7 +466,7 @@ Priority Prioriteetti - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Osoite - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Valitse maksupyynnön tiedosto - + OptionsDialog @@ -930,6 +933,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -984,6 +990,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1340,7 +1349,7 @@ Remove Poista - + ReceiveRequestDialog @@ -1359,7 +1368,10 @@ &Save Image... &Tallenna kuva - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1502,7 +1514,7 @@ S&end &Lähetä - + SendCoinsEntry @@ -1581,7 +1593,10 @@ Memo: Muistio: - + + + SendConfirmationDialog + ShutdownWindow @@ -1671,7 +1686,7 @@ Reset all verify message fields Tyhjennä kaikki varmista-viesti-kentät - + SplashScreen @@ -1687,12 +1702,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Tämä ruutu näyttää yksityiskohtaisen tiedon rahansiirrosta - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1701,6 +1725,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index ef27c6fc23c..4d33a58bf1e 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -41,6 +41,77 @@ &Delete &Supprimer + + Choose the address to send coins to + Choisir l'adresse à laquelle envoyer des pièces + + + Choose the address to receive coins with + Choisir l'adresse avec laquelle recevoir des pîèces + + + C&hoose + C&hoisir + + + Sending addresses + Adresses d'envoi + + + Receiving addresses + Adresses de réception + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Voici vos adresses Bitcoin pour envoyer des paiements. Vérifiez toujours le montant et l'adresse du destinataire avant d'envoyer des pièces. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Voici vos adresses Bitcoin pour recevoir des paiements. Il est recommandé d'utiliser une nouvelle adresse de réception pour chaque transaction. + + + &Copy Address + &Copier l'adresse + + + Copy &Label + Copier l'é&tiquette + + + &Edit + &Modifier + + + Export Address List + Exporter la liste d'adresses + + + Comma separated file (*.csv) + Valeurs séparées par des virgules (*.csv) + + + Exporting Failed + L'exportation a échoué + + + There was an error trying to save the address list to %1. Please try again. + Une erreur est survenue lors de l'enregistrement de la liste d'adresses vers %1. Veuillez ressayer plus tard. + + + + AddressTableModel + + Label + Étiquette + + + Address + Adresse + + + (no label) + (aucune étiquette) + AskPassphraseDialog @@ -60,7 +131,35 @@ Repeat new passphrase Répéter la phrase de passe - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Saisissez une nouvelle phrase de passe pour le portefeuille.<br/>Veuillez utiliser une phrase composée de <b>dix caractères aléatoires ou plus</b>, ou bien de <b>huit mots ou plus</b>. + + + Encrypt wallet + Chiffrer le porte-monnaie + + + This operation needs your wallet passphrase to unlock the wallet. + Cette opération nécessite votre phrase de passe pour déverrouiller le porte-monnaie. + + + Unlock wallet + Déverrouiller le porte-monnaie + + + This operation needs your wallet passphrase to decrypt the wallet. + Cette opération nécessite votre phrase de passe pour déchiffrer le porte-monnaie. + + + Decrypt wallet + Déchiffrer le porte-monnaie + + + Change passphrase + Changer la phrase de passe + + BanTableModel @@ -463,7 +562,11 @@ Priority Priorité - + + (no label) + (aucune étiquette) + + EditAddressDialog @@ -486,7 +589,7 @@ &Address &Adresse - + FreespaceChecker @@ -626,7 +729,7 @@ Select payment request file Choisir le fichier de demande de paiement - + OptionsDialog @@ -938,6 +1041,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +1098,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1461,7 @@ Remove Retirer - + ReceiveRequestDialog @@ -1371,7 +1480,26 @@ &Save Image... &Enregistrer l'image... - + + Address + Adresse + + + Label + Étiquette + + + + RecentRequestsTableModel + + Label + Étiquette + + + (no label) + (aucune étiquette) + + SendCoinsDialog @@ -1522,6 +1650,10 @@ S&end E&nvoyer + + (no label) + (aucune étiquette) + SendCoinsEntry @@ -1601,7 +1733,10 @@ Memo: Mémo : - + + + SendConfirmationDialog + ShutdownWindow @@ -1699,7 +1834,7 @@ Reset all verify message fields Réinitialiser tous les champs de vérification de message - + SplashScreen @@ -1715,12 +1850,45 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ce panneau affiche une description détaillée de la transaction - + + + TransactionTableModel + + Label + Étiquette + + + (no label) + (aucune étiquette) + + + + TransactionView + + Comma separated file (*.csv) + Valeurs séparées par des virgules (*.csv) + + + Label + Étiquette + + + Address + Adresse + + + Exporting Failed + L'exportation a échoué + + UnitDisplayStatusBarControl @@ -1729,6 +1897,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts index fca1e62883d..e576f8d74c1 100644 --- a/src/qt/locale/bitcoin_fr_CA.ts +++ b/src/qt/locale/bitcoin_fr_CA.ts @@ -13,7 +13,10 @@ &Delete &Supprimer - + + + AddressTableModel + AskPassphraseDialog @@ -28,7 +31,7 @@ Repeat new passphrase Répéter Mot de Passe - + BanTableModel @@ -52,7 +55,7 @@ &Address Addresse - + FreespaceChecker @@ -76,12 +79,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -91,12 +100,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -109,12 +124,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_fr_FR.ts b/src/qt/locale/bitcoin_fr_FR.ts index a6f6ac4fd10..3fa055de2d5 100644 --- a/src/qt/locale/bitcoin_fr_FR.ts +++ b/src/qt/locale/bitcoin_fr_FR.ts @@ -41,7 +41,10 @@ &Delete &Supprimer - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Répétez la phrase de passe - + BanTableModel @@ -443,7 +446,7 @@ Priority Priorité - + EditAddressDialog @@ -458,7 +461,7 @@ &Address &Adresse - + FreespaceChecker @@ -566,7 +569,7 @@ Select payment request file Sélectionner un fichier de demande de paiement - + OptionsDialog @@ -754,6 +757,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -808,6 +814,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1064,7 +1073,7 @@ Remove Retirer - + ReceiveRequestDialog @@ -1083,7 +1092,10 @@ &Save Image... &Sauvegarder image - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1241,7 +1253,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1311,16 +1326,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ce panneau affiche une description détaillée de la transaction - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts index 9aa7b550964..3308c24015c 100644 --- a/src/qt/locale/bitcoin_gl.ts +++ b/src/qt/locale/bitcoin_gl.ts @@ -37,7 +37,10 @@ &Delete &Borrar - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Repite novo contrasinal - + BanTableModel @@ -333,7 +336,7 @@ Priority Prioridade - + EditAddressDialog @@ -356,7 +359,7 @@ &Address &Dirección - + FreespaceChecker @@ -436,7 +439,7 @@ Select payment request file Seleccionar ficheiro de solicitude de pago - + OptionsDialog @@ -572,6 +575,9 @@ + PaymentServer + + PeerTableModel @@ -594,6 +600,9 @@ + QRImageWidget + + RPCConsole N/A @@ -749,7 +758,10 @@ &Save Image... &Gardar Imaxe... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -816,7 +828,7 @@ S&end &Enviar - + SendCoinsEntry @@ -871,7 +883,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -945,7 +960,7 @@ Reset all verify message fields Restaurar todos os campos de verificación de mensaxe - + SplashScreen @@ -961,16 +976,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Este panel amosa unha descripción detallada da transacción - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts index 4a293c1c3f2..394cc317365 100644 --- a/src/qt/locale/bitcoin_he.ts +++ b/src/qt/locale/bitcoin_he.ts @@ -41,6 +41,69 @@ &Delete מ&חיקה + + Choose the address to send coins to + בחר את הכתובת אליה תרצה לשלוח את המטבעות + + + Choose the address to receive coins with + בחר את הכתובת בה תקבל את המטבעות + + + C&hoose + בחר + + + Sending addresses + כתובת לשליחה + + + Receiving addresses + מקבל כתובות + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + אלה הם כתובות הביטקוין שלך לשליחת תשלומים. חשוב לבדוק את הכמות של הכתובות המקבלות לפני שליחת מטבעות + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + אלה הן כתובות הביטקוין שלך לקבלת תשלומים. מומלץ להשתמש בכתובת חדשה לכל העברה. + + + &Copy Address + &העתק כתובת + + + Copy &Label + העתק &תוית + + + &Edit + &ערוך + + + Exporting Failed + יצוא נכשל + + + There was an error trying to save the address list to %1. Please try again. + אירעה שגיאה בעת הניסיון לשמור את רשימת הכתובת אל %1. נא לנסות שוב. + + + + AddressTableModel + + Label + תוית + + + Address + כתובת + + + (no label) + (ללא תוית) + AskPassphraseDialog @@ -60,7 +123,7 @@ Repeat new passphrase נא לחזור על מילת הצופן החדשה - + BanTableModel @@ -389,7 +452,11 @@ Priority עדיפות - + + (no label) + (ללא תוית) + + EditAddressDialog @@ -412,7 +479,7 @@ &Address &כתובת - + FreespaceChecker @@ -516,7 +583,7 @@ Select payment request file בחירת קובץ בקשת תשלום - + OptionsDialog @@ -776,6 +843,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -826,6 +896,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1150,7 +1223,7 @@ Remove הסרה - + ReceiveRequestDialog @@ -1169,7 +1242,26 @@ &Save Image... &שמירת תמונה… - + + Address + כתובת + + + Label + תוית + + + + RecentRequestsTableModel + + Label + תוית + + + (no label) + (ללא תוית) + + SendCoinsDialog @@ -1300,6 +1392,10 @@ S&end &שליחה + + (no label) + (ללא תוית) + SendCoinsEntry @@ -1367,7 +1463,10 @@ Memo: תזכורת: - + + + SendConfirmationDialog + ShutdownWindow @@ -1453,7 +1552,7 @@ Reset all verify message fields איפוס כל שדות אימות ההודעה - + SplashScreen @@ -1469,12 +1568,41 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction חלונית זו מציגה תיאור מפורט של ההעברה - + + + TransactionTableModel + + Label + תוית + + + (no label) + (ללא תוית) + + + + TransactionView + + Label + תוית + + + Address + כתובת + + + Exporting Failed + יצוא נכשל + + UnitDisplayStatusBarControl @@ -1483,6 +1611,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts index 86c53b4ce3d..1cb5cf17a46 100644 --- a/src/qt/locale/bitcoin_hi_IN.ts +++ b/src/qt/locale/bitcoin_hi_IN.ts @@ -13,7 +13,10 @@ &Delete &मिटाए !! - + + + AddressTableModel + AskPassphraseDialog @@ -28,7 +31,7 @@ Repeat new passphrase दोबारा नया पहचान शब्द/अक्षर डालिए ! - + BanTableModel @@ -169,7 +172,7 @@ &Address &पता - + FreespaceChecker @@ -221,6 +224,9 @@ + PaymentServer + + PeerTableModel @@ -236,6 +242,9 @@ + QRImageWidget + + RPCConsole N/A @@ -266,6 +275,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -320,6 +332,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -352,16 +367,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction ये खिड़की आपको लेन-देन का विस्तृत विवरण देगी ! - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts index f5accfb0b8f..f770cf14667 100644 --- a/src/qt/locale/bitcoin_hr.ts +++ b/src/qt/locale/bitcoin_hr.ts @@ -41,7 +41,34 @@ &Delete Iz&briši - + + Choose the address to send coins to + Odaberi adresu na koju šalješ novac + + + Choose the address to receive coins with + Odaberi adresu na koju primaš novac + + + C&hoose + &Odaberi + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Ovo su vaše Bitcoin adrese za slanje novca. Uvijek provjerite iznos i adresu primatelja prije slanja novca. + + + &Copy Address + &Kopiraj adresu + + + Exporting Failed + Izvoz neuspješan + + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +87,7 @@ Repeat new passphrase Ponovite novu lozinku - + BanTableModel @@ -411,7 +438,7 @@ Priority Prioriteta - + EditAddressDialog @@ -434,7 +461,7 @@ &Address &Adresa - + FreespaceChecker @@ -502,7 +529,7 @@ Select payment request file Izaberi datoteku zahtjeva za plaćanje - + OptionsDialog @@ -642,6 +669,9 @@ + PaymentServer + + PeerTableModel @@ -656,6 +686,9 @@ + QRImageWidget + + RPCConsole N/A @@ -791,7 +824,10 @@ &Save Image... &Spremi sliku... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -862,7 +898,7 @@ S&end &Pošalji - + SendCoinsEntry @@ -899,6 +935,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -955,16 +994,38 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ovaj prozor prikazuje detaljni opis transakcije - + + + TransactionTableModel + + + TransactionView + + Exporting Failed + Izvoz neuspješan + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts index 895e919c998..e5e0d10597a 100644 --- a/src/qt/locale/bitcoin_hu.ts +++ b/src/qt/locale/bitcoin_hu.ts @@ -41,7 +41,10 @@ &Delete &Törlés - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Új jelszó újra - + BanTableModel @@ -439,7 +442,7 @@ Priority Prioritás - + EditAddressDialog @@ -462,7 +465,7 @@ &Address &Cím - + FreespaceChecker @@ -550,7 +553,7 @@ Select payment request file Fizetési kérelmi fájl kiválasztása - + OptionsDialog @@ -762,6 +765,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -812,6 +818,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1072,7 +1081,7 @@ Remove Eltávolítás - + ReceiveRequestDialog @@ -1091,7 +1100,10 @@ &Save Image... &Kép mentése - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1202,7 +1214,7 @@ S&end &Küldés - + SendCoinsEntry @@ -1249,7 +1261,10 @@ Memo: Jegyzet: - + + + SendConfirmationDialog + ShutdownWindow @@ -1331,16 +1346,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ez a mező a tranzakció részleteit mutatja - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts index feb6f690c45..f47ed16baaa 100644 --- a/src/qt/locale/bitcoin_id_ID.ts +++ b/src/qt/locale/bitcoin_id_ID.ts @@ -41,7 +41,10 @@ &Delete &Hapus - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Ulangi kata kunci baru - + BanTableModel @@ -435,7 +438,7 @@ Priority Prioritas - + EditAddressDialog @@ -458,7 +461,7 @@ &Address &Alamat - + FreespaceChecker @@ -578,7 +581,7 @@ Select payment request file Pilih data permintaan pembayaran - + OptionsDialog @@ -822,6 +825,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -852,6 +858,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1070,7 +1079,7 @@ Remove Menghapus - + ReceiveRequestDialog @@ -1089,7 +1098,10 @@ &Save Image... &Simpan Gambaran... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1200,7 +1212,7 @@ S&end K&irim - + SendCoinsEntry @@ -1255,7 +1267,10 @@ Memo: Catatan Peringatan: - + + + SendConfirmationDialog + ShutdownWindow @@ -1329,7 +1344,7 @@ Reset all verify message fields Hapus semua bidang verifikasi pesan - + SplashScreen @@ -1345,16 +1360,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Jendela ini menampilkan deskripsi rinci dari transaksi tersebut - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 2d99b90c65a..26615ecd206 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -41,7 +41,10 @@ &Delete &Elimina - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Ripeti la nuova passphrase - + BanTableModel @@ -463,7 +466,7 @@ Priority Priorità - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Indirizzo - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Seleziona il file di richiesta di pagamento - + OptionsDialog @@ -935,6 +938,9 @@ Per specificare più URL separarli con una barra verticale "|". + PaymentServer + + PeerTableModel User Agent @@ -989,6 +995,9 @@ Per specificare più URL separarli con una barra verticale "|". + QRImageWidget + + RPCConsole N/A @@ -1349,7 +1358,7 @@ Per specificare più URL separarli con una barra verticale "|". Remove Rimuovi - + ReceiveRequestDialog @@ -1368,7 +1377,10 @@ Per specificare più URL separarli con una barra verticale "|". &Save Image... &Salva Immagine... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1519,7 +1531,7 @@ Per specificare più URL separarli con una barra verticale "|". S&end &Invia - + SendCoinsEntry @@ -1598,7 +1610,10 @@ Per specificare più URL separarli con una barra verticale "|". Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1696,7 +1711,7 @@ Per specificare più URL separarli con una barra verticale "|". Reset all verify message fields Reimposta tutti i campi della verifica messaggio - + SplashScreen @@ -1712,12 +1727,21 @@ Per specificare più URL separarli con una barra verticale "|". + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Questo pannello mostra una descrizione dettagliata della transazione - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1726,6 +1750,15 @@ Per specificare più URL separarli con una barra verticale "|". + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1820,6 +1853,10 @@ Per specificare più URL separarli con una barra verticale "|". Distribuito secondo la licenza software MIT, vedi il file COPYING incluso oppure <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Byte equivalenti per ottimizzazione segnale dedicati a ritrasmissione ed estrazione (default: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Errore caricamento %s: Non puoi abilitare HD in un portafoglio non-HD già esistente @@ -1832,10 +1869,6 @@ Per specificare più URL separarli con una barra verticale "|". Esegue un comando quando lo stato di una transazione del portamonete cambia (%s in cmd è sostituito da TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Forza la trasmissione della transazione dai peer presenti nella whitelist anche se violano le regole di trasmissione locali (default: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Regolazione della massima differenza media di tempo dei peer consentita. L'impostazione dell'orario locale può essere impostata in avanti o indietro di questa quantità. (default %u secondi) diff --git a/src/qt/locale/bitcoin_it_IT.ts b/src/qt/locale/bitcoin_it_IT.ts index d17b267ba1b..10216a71f06 100644 --- a/src/qt/locale/bitcoin_it_IT.ts +++ b/src/qt/locale/bitcoin_it_IT.ts @@ -41,7 +41,10 @@ &Delete Cancella - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Ripeti nuova passphrase - + BanTableModel @@ -96,12 +99,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole Ban Node for @@ -115,12 +124,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -133,12 +148,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts index 63fb9d681fd..3ca1f3e4f3a 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/bitcoin_ja.ts @@ -41,6 +41,77 @@ &Delete 削除(&D) + + Choose the address to send coins to + 先のアドレスを選択 + + + Choose the address to receive coins with + 支払いを受け取るアドレスを指定する + + + C&hoose + 選択 (&C) + + + Sending addresses + 送金用 + + + Receiving addresses + 受け取りアドレス + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + これらは支払いを送信するためのあなたの Bitcoin アドレスです。コインを送信する前に、常に額と受信アドレスを確認してください。 + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + これらは支払いを受け取るためのビットコインアドレスです。トランザクションごとに新しい受け取り用アドレスを作成することが推奨されます。 + + + &Copy Address + アドレスをコピー (&C) + + + Copy &Label + ラベルをコピー (&L) + + + &Edit + 編集 (&E) + + + Export Address List + アドレス帳をエクスポート + + + Comma separated file (*.csv) + テキスト CSV (*.csv) + + + Exporting Failed + エクスポートに失敗しました + + + There was an error trying to save the address list to %1. Please try again. + トランザクション履歴を %1 へ保存する際にエラーが発生しました。再試行してください。 + + + + AddressTableModel + + Label + ラベル + + + Address + アドレス + + + (no label) + (ラベル無し) + AskPassphraseDialog @@ -60,6 +131,94 @@ Repeat new passphrase 新しいパスフレーズをもう一度 + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + ウォレットの新しいパスフレーズを入力してください。<br/><b>10文字以上のランダムな文字</b>で構成されたものか、<b>8単語以上の単語</b>で構成されたパスフレーズを使用してください。 + + + Encrypt wallet + ウォレットを暗号化する + + + This operation needs your wallet passphrase to unlock the wallet. + この操作はウォレットをアンロックするためにパスフレーズが必要です。 + + + Unlock wallet + ウォレットをアンロックする + + + This operation needs your wallet passphrase to decrypt the wallet. + この操作はウォレットの暗号化解除のためにパスフレーズが必要です。 + + + Decrypt wallet + ウォレットの暗号化を解除する + + + Change passphrase + パスフレーズの変更 + + + Enter the old passphrase and new passphrase to the wallet. + ウォレットの古いパスフレーズおよび新しいパスフレーズを入力してください。 + + + Confirm wallet encryption + ウォレットの暗号化を確認する + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + 警告: もしもあなたのウォレットを暗号化してパスフレーズを失ってしまったなら、<b>あなたの Bitcoin はすべて失われます</b>! + + + Are you sure you wish to encrypt your wallet? + 本当にウォレットを暗号化しますか? + + + Wallet encrypted + ウォレットは暗号化されました + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + 暗号化処理を完了させるため %1 をいますぐ終了します。ウォレットの暗号化では、コンピュータに感染したマルウェアなどによるビットコインの盗難から完全に守ることはできないことにご注意ください。 + + + 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. + 重要: 過去のウォレット ファイルのバックアップは、暗号化された新しいウォレット ファイルに取り替える必要があります。セキュリティ上の理由により、暗号化された新しいウォレットを使い始めると、暗号化されていないウォレット ファイルのバックアップはすぐに使えなくなります。 + + + Wallet encryption failed + ウォレットの暗号化に失敗しました + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + 内部エラーによりウォレットの暗号化が失敗しました。ウォレットは暗号化されませんでした。 + + + The supplied passphrases do not match. + パスフレーズが同じではありません。 + + + Wallet unlock failed + ウォレットのアンロックに失敗しました + + + The passphrase entered for the wallet decryption was incorrect. + ウォレットの暗号化解除のパスフレーズが正しくありません。 + + + Wallet decryption failed + ウォレットの暗号化解除に失敗しました + + + Wallet passphrase was successfully changed. + ウォレットのパスフレーズの変更が成功しました。 + + + Warning: The Caps Lock key is on! + 警告: Caps Lock キーがオンになっています! + BanTableModel @@ -463,6 +622,150 @@ Priority 優先度 + + Copy address + アドレスをコピーする + + + Copy label + ラベルをコピーする + + + Copy amount + 総額のコピー + + + Copy transaction ID + 取引 ID をコピー + + + Lock unspent + 未使用トランザクションをロックする + + + Unlock unspent + 未使用トランザクションをアンロックする + + + Copy quantity + 数量をコピーする + + + Copy fee + 手数料をコピーする + + + Copy after fee + 手数料差引後の値をコピーする + + + Copy bytes + バイト数をコピーする + + + Copy priority + 優先度をコピーする + + + Copy dust + ダストをコピーする + + + Copy change + 釣り銭をコピー + + + highest + 最高 + + + higher + 非常に高 + + + high + + + + medium-high + 中〜高 + + + medium + + + + low-medium + 低〜中 + + + low + + + + lower + 非常に低 + + + lowest + 最低 + + + (%1 locked) + (%1 がロック済み) + + + none + なし + + + yes + はい + + + no + いいえ + + + This label turns red if the transaction size is greater than 1000 bytes. + トランザクションのサイズが1000バイトを超える場合にはこのラベルは赤色になります。 + + + This means a fee of at least %1 per kB is required. + これは少なくとも1kBあたり %1 の手数料が必要であることを意味します。 + + + Can vary +/- 1 byte per input. + ひとつの入力につき1バイト程度ずれることがあります。 + + + Transactions with higher priority are more likely to get included into a block. + より高い優先度を持つトランザクションの方がブロックに取り込まれやすくなります。 + + + This label turns red if the priority is smaller than "medium". + 優先度が「中」未満の場合、このラベルは赤色になります。 + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + 少なくともひとつの受取額が現在のダスト閾値を下回る場合にはこのラベルは赤くなります。 + + + Can vary +/- %1 satoshi(s) per input. + ひとつの入力につき %1 satoshi 前後ずれることがあります。 + + + (no label) + (ラベル無し) + + + change from %1 (%2) + %1 (%2) からのおつり + + + (change) + (おつり) + EditAddressDialog @@ -486,6 +789,38 @@ &Address アドレス帳 (&A) + + New receiving address + 新しい受信アドレス + + + New sending address + 新しい送信アドレス + + + Edit receiving address + 入金アドレスを編集 + + + Edit sending address + 送信アドレスを編集 + + + The entered address "%1" is not a valid Bitcoin address. + 入力されたアドレス "%1" は無効な Bitcoin アドレスです。 + + + The entered address "%1" is already in the address book. + 入力されたアドレス "%1" は既にアドレス帳にあります。 + + + Could not unlock wallet. + ウォレットをアンロックできませんでした。 + + + New key generation failed. + 新しいキーの生成に失敗しました。 + FreespaceChecker @@ -626,6 +961,10 @@ Select payment request file 支払いリクエストファイルを選択してください + + Select payment request file to open + 開きたい支払いリクエストファイルを選択してください + OptionsDialog @@ -938,6 +1277,97 @@ + PaymentServer + + Payment request error + 支払いのリクエストのエラーです + + + Cannot start bitcoin: click-to-pay handler + Bitcoin を起動できません: click-to-pay handler + + + URI handling + URI の操作 + + + Payment request fetch URL is invalid: %1 + 支払い要求の取得先URLが無効です: %1 + + + Invalid payment address %1 + 支払いのアドレス「%1」は無効です + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI を解析できません! これは無効な Bitcoin アドレスあるいや不正な形式の URI パラメーターによって引き起こされる場合があります。 + + + Payment request file handling + 支払いリクエストファイルを処理しています + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + 支払いリクエストファイルを読み込めませんでした!無効な支払いリクエストファイルにより引き起こされた可能性があります。 + + + Payment request rejected + 支払い要求は拒否されました + + + Payment request network doesn't match client network. + 支払いリクエストのネットワークは現在のクライアントのネットワークに一致しません。 + + + Payment request expired. + 支払いリクエストの期限が切れました。 + + + Payment request is not initialized. + 支払いリクエストは開始されていません。 + + + Unverified payment requests to custom payment scripts are unsupported. + カスタム支払いスクリプトに対する、検証されていない支払いリクエストはサポートされていません。 + + + Invalid payment request. + 無効な支払いリクエスト。 + + + Requested payment amount of %1 is too small (considered dust). + 要求された支払額 %1 は少なすぎます (ダストとみなされてしまいます)。 + + + Refund from %1 + %1 からの返金 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + 支払リクエスト %1 は大きすぎます(%2バイトですが、%3バイトまでが許されています)。 + + + Error communicating with %1: %2 + %1: %2とコミュニケーション・エラーです + + + Payment request cannot be parsed! + 支払リクエストを読み込めませんでした! + + + Bad response from server %1 + サーバーの返事は無効 %1 + + + Network request error + ネットワーク・リクエストのエラーです + + + Payment acknowledged + 支払いは確認しました + + + PeerTableModel User Agent @@ -992,6 +1422,25 @@ + QRImageWidget + + &Save Image... + 画像を保存(&S) + + + &Copy Image + 画像をコピー(&C) + + + Save QR Code + QR コードの保存 + + + PNG Image (*.png) + PNG画像ファイル(*.png) + + + RPCConsole N/A @@ -1352,6 +1801,18 @@ Remove 削除 + + Copy label + ラベルをコピーする + + + Copy message + メッセージをコピーする + + + Copy amount + 総額のコピー + ReceiveRequestDialog @@ -1371,35 +1832,102 @@ &Save Image... 画像を保存(&S) - - - SendCoinsDialog - Send Coins - コインを送る + Request payment to %1 + %1 への支払いリクエストを行う - Coin Control Features - コインコントロール機能 + Payment information + 支払い情報 - Inputs... - 入力... + URI + URI - automatically selected - 自動選択 + Address + アドレス - Insufficient funds! - 残高不足です! + Amount + 総額 - Quantity: - 数量: + Label + ラベル - Bytes: + Message + メッセージ + + + Resulting URI too long, try to reduce the text for label / message. + URI が長くなり過ぎます。ラベルやメッセージのテキストを短くしてください。 + + + Error encoding URI into QR Code. + QR コード用の URI エンコードでエラー。 + + + + RecentRequestsTableModel + + Date + 日付 + + + Label + ラベル + + + Message + メッセージ + + + (no label) + (ラベル無し) + + + (no message) + (メッセージなし) + + + (no amount requested) + (金額指定なし) + + + Requested + 要求 + + + + SendCoinsDialog + + Send Coins + コインを送る + + + Coin Control Features + コインコントロール機能 + + + Inputs... + 入力... + + + automatically selected + 自動選択 + + + Insufficient funds! + 残高不足です! + + + Quantity: + 数量: + + + Bytes: バイト: @@ -1522,6 +2050,114 @@ S&end 送金 (&E) + + Copy quantity + 数量をコピーする + + + Copy amount + 総額のコピー + + + Copy fee + 手数料をコピーする + + + Copy after fee + 手数料差引後の値をコピーする + + + Copy bytes + バイト数をコピーする + + + Copy priority + 優先度をコピーする + + + Copy dust + ダストをコピーする + + + Copy change + 釣り銭をコピー + + + %1 to %2 + %1 から %2 + + + Are you sure you want to send? + 送ってよろしいですか? + + + added as transaction fee + 取引手数料として追加された + + + Total Amount %1 + 合計: %1 + + + or + または + + + Confirm send coins + コインを送る確認 + + + The recipient address is not valid. Please recheck. + 受取アドレスが不正です。再チェックしてください。 + + + The amount to pay must be larger than 0. + 支払額は0より大きくないといけません。 + + + The amount exceeds your balance. + 額が残高を超えています。 + + + The total exceeds your balance when the %1 transaction fee is included. + %1 の取引手数料を含めると額が残高を超えています。 + + + Duplicate address found: addresses should only be used once each. + 重複したアドレスが見つかりました: アドレスはそれぞれ一度のみ使用することができます。 + + + Transaction creation failed! + トラザクションの作成に失敗しました! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + トランザクションは拒否されました。wallet.dat のコピーを使い、そしてコピーしたウォレットからコインを使用したことがマークされなかったときなど、ウォレットのいくつかのコインがすでに使用されている場合に、このエラーは起こるかもしれません。 + + + A fee higher than %1 is considered an absurdly high fee. + %1 よりも高い手数料の場合、手数料が高すぎると判断されます。 + + + Payment request expired. + 支払いリクエストの期限が切れました。 + + + Pay only the required fee of %1 + 要求手数料 %1 のみを支払う + + + Warning: Invalid Bitcoin address + 警告:無効なBitcoinアドレスです + + + Warning: Unknown change address + 警告:未知のおつりアドレスです + + + (no label) + (ラベル無し) + SendCoinsEntry @@ -1601,6 +2237,17 @@ Memo: メモ: + + Enter a label for this address to add it to your address book + アドレス帳に追加するには、このアドレスのラベルを入力します + + + + SendConfirmationDialog + + Yes + はい + ShutdownWindow @@ -1699,6 +2346,58 @@ Reset all verify message fields 入力項目の内容をすべて消去します + + Click "Sign Message" to generate signature + 署名を作成するには"メッセージの署名"をクリック + + + The entered address is invalid. + 不正なアドレスが入力されました。 + + + Please check the address and try again. + アドレスを確かめてからもう一度試してください。 + + + The entered address does not refer to a key. + 入力されたアドレスに関連するキーがありません。 + + + Wallet unlock was cancelled. + ウォレットのアンロックはキャンセルされました。 + + + Private key for the entered address is not available. + 入力されたアドレスのプライベート キーが無効です。 + + + Message signing failed. + メッセージの署名に失敗しました。 + + + Message signed. + メッセージに署名しました。 + + + The signature could not be decoded. + 署名がデコードできません。 + + + Please check the signature and try again. + 署名を確認してからもう一度試してください。 + + + The signature did not match the message digest. + 署名はメッセージ ダイジェストと一致しませんでした。 + + + Message verification failed. + メッセージの検証に失敗しました。 + + + Message verified. + メッセージは検証されました。 + SplashScreen @@ -1715,11 +2414,456 @@ + TransactionDesc + + Open for %n more block(s) + %n 以上のブロックを開く + + + Open until %1 + ユニット %1 を開く + + + conflicted with a transaction with %1 confirmations + %1 検証のトランザクションと衝突 + + + %1/offline + %1/オフライン + + + 0/unconfirmed, %1 + 0/未検証, %1 + + + in memory pool + メモリプール内 + + + not in memory pool + メモリプール外 + + + abandoned + 中止 + + + %1/unconfirmed + %1/未検証 + + + %1 confirmations + %1 確認 + + + Status + ステータス + + + , has not been successfully broadcast yet + まだブロードキャストが成功していません + + + , broadcast through %n node(s) + %n ノードにブロードキャスト + + + Date + 日付 + + + Source + ソース + + + Generated + 生成された + + + From + 送信 + + + unknown + 未確認 + + + To + 受信 + + + own address + 自分のアドレス + + + watch-only + 監視限定 + + + label + ラベル + + + Credit + クレジット + + + matures in %n more block(s) + %n 以上のブロックが満期 + + + not accepted + 承認されなかった + + + Debit + 引き落とし額 + + + Total debit + 総出金額 + + + Total credit + 総入金額 + + + Transaction fee + 取引手数料 + + + Net amount + 正味金額 + + + Message + メッセージ + + + Comment + コメント + + + Transaction ID + 取引 ID + + + Output index + 出力インデックス + + + Merchant + 商人 + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + 生成されたコインは使う前に%1のブロックを完成させる必要があります。あなたが生成した時、このブロックはブロック チェーンに追加されるネットワークにブロードキャストされました。チェーンに追加されるのが失敗した場合、状態が"不承認"に変更されて使えなくなるでしょう。これは、別のノードがあなたの数秒前にブロックを生成する場合に時々起こるかもしれません。 + + + Debug information + デバッグ情報 + + + Transaction + 取引 + + + Inputs + 入力 + + + Amount + 総額 + + + true + 正しい + + + false + 正しくない + + + TransactionDescDialog This pane shows a detailed description of the transaction ここでは取引の詳細を表示しています + + Details for %1 + %1 の詳細 + + + + TransactionTableModel + + Date + 日付 + + + Type + タイプ + + + Label + ラベル + + + Open for %n more block(s) + %n 以上のブロックを開く + + + Open until %1 + ユニット %1 を開く + + + Offline + オフライン + + + Unconfirmed + 未検証 + + + Abandoned + 中止 + + + Confirming (%1 of %2 recommended confirmations) + 検証中(%2の推奨検証数のうち、%1検証が完了) + + + Confirmed (%1 confirmations) + 検証されました (%1 検証済み) + + + Conflicted + 衝突 + + + Immature (%1 confirmations, will be available after %2) + 未成熟(%1検証。%2検証完了後に使用可能となります) + + + This block was not received by any other nodes and will probably not be accepted! + このブロックは他のどのノードによっても受け取られないで、多分受け入れられないでしょう! + + + Generated but not accepted + 生成されましたが承認されませんでした + + + Received with + 送り主 + + + Received from + 送り主 + + + Sent to + 送り先 + + + Payment to yourself + 自分自身への支払い + + + Mined + 発掘した + + + watch-only + 監視限定 + + + (n/a) + (n/a) + + + (no label) + (ラベル無し) + + + Transaction status. Hover over this field to show number of confirmations. + 取引の状況。このフィールドの上にカーソルを置くと検証の数を表示します。 + + + Date and time that the transaction was received. + 取引を受信した日時。 + + + Type of transaction. + 取引の種類。 + + + Whether or not a watch-only address is involved in this transaction. + 監視限定アドレスがこのトランザクションに含まれているかどうか + + + User-defined intent/purpose of the transaction. + ユーザ定義のトランザクションの意図や目的。 + + + Amount removed from or added to balance. + 残高に追加または削除された総額。 + + + + TransactionView + + All + すべて + + + Today + 今日 + + + This week + 今週 + + + This month + 今月 + + + Last month + 先月 + + + This year + 今年 + + + Range... + 期間... + + + Received with + 送り主 + + + Sent to + 送り先 + + + To yourself + 自分自身 + + + Mined + 発掘した + + + Other + その他 + + + Enter address or label to search + 検索するアドレスまたはラベルを入力 + + + Min amount + 最小の額 + + + Abandon transaction + 取引の中止 + + + Copy address + アドレスをコピーする + + + Copy label + ラベルをコピーする + + + Copy amount + 総額のコピー + + + Copy transaction ID + 取引 ID をコピー + + + Copy raw transaction + 生トランザクションをコピー + + + Copy full transaction details + トランザクションの詳細すべてをコピー + + + Edit label + ラベルの編集 + + + Show transaction details + 取引の詳細を表示 + + + Export Transaction History + トランザクション履歴をエクスポートする + + + Comma separated file (*.csv) + テキスト CSV (*.csv) + + + Confirmed + 検証済み + + + Watch-only + 監視限定 + + + Date + 日付 + + + Type + タイプ + + + Label + ラベル + + + Address + アドレス + + + ID + ID + + + Exporting Failed + エクスポートに失敗しました + + + There was an error trying to save the transaction history to %1. + トランザクション履歴を %1 へ保存する際にエラーが発生しました。 + + + Exporting Successful + エクスポートに成功しました + + + The transaction history was successfully saved to %1. + トランザクション履歴は正常に%1に保存されました。 + + + Range: + 期間: + + + to + から + UnitDisplayStatusBarControl @@ -1729,6 +2873,55 @@ + WalletFrame + + No wallet has been loaded. + ウォレットがロードされていません + + + + WalletModel + + Send Coins + コインを送る + + + + WalletView + + &Export + エクスポート (&E) + + + Export the data in the current tab to a file + ファイルに現在のタブのデータをエクスポート + + + Backup Wallet + ウォレットのバックアップ + + + Wallet Data (*.dat) + ウォレット データ (*.dat) + + + Backup Failed + バックアップに失敗しました + + + There was an error trying to save the wallet data to %1. + ウォレットデータを%1へ保存する際にエラーが発生しました。 + + + Backup Successful + バックアップ成功 + + + The wallet data was successfully saved to %1. + ウォレット データは正常に%1に保存されました。 + + + bitcoin-core Options: @@ -1847,10 +3040,6 @@ ウォレットの取引を変更する際にコマンドを実行 (cmd の %s は TxID に置換される) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - ホワイトリストのピアから受け取ったトランザクションに関しては、たとえローカルの中継ポリシーに違反しているとしても中継を行うようにする (デフォルト: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) 時間オフセット調整値のピア中央値に対する最大の許容値。ローカル時間の見込み値は、接続するピアにより前方ないし後方へ影響されます。(初期値: %u 秒) @@ -2112,6 +3301,10 @@ ウォレットのファイルを指定 (データ・ディレクトリの中に) + Starting network threads... + ネットワークのスレッドを起動しています... + + The source code is available from %s. ソースコードは %s より入手可能です。 @@ -2196,6 +3389,10 @@ トランザクションの中継、採掘および作成の際には、この値未満の手数料 (%s/kB単位) はゼロであるとみなす (デフォルト: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + ホワイトリストのピアから受け取ったトランザクションに関しては、たとえローカルの中継ポリシーに違反しているとしても中継を行うようにする (デフォルト: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) paytxfee が設定されていなかった場合、平均して n ブロック以内にトランザクションが検証され始めるのに十分な手数料を含める (初期値: %u) diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts index 80508be8eeb..b2b9a58e568 100644 --- a/src/qt/locale/bitcoin_ka.ts +++ b/src/qt/locale/bitcoin_ka.ts @@ -37,7 +37,10 @@ &Delete &წაშლა - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase გაიმეორეთ ახალი ფრაზა-პაროლი - + BanTableModel @@ -353,7 +356,7 @@ Priority პრიორიტეტი - + EditAddressDialog @@ -376,7 +379,7 @@ &Address მის&ამართი - + FreespaceChecker @@ -456,7 +459,7 @@ Select payment request file გადახდის მოთხოვნის ფაილის არჩევა - + OptionsDialog @@ -640,6 +643,9 @@ + PaymentServer + + PeerTableModel @@ -662,6 +668,9 @@ + QRImageWidget + + RPCConsole N/A @@ -842,7 +851,7 @@ Remove წაშლა - + ReceiveRequestDialog @@ -861,7 +870,10 @@ &Save Image... გამო&სახულების შენახვა... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -952,7 +964,7 @@ S&end გაგ&ზავნა - + SendCoinsEntry @@ -1011,7 +1023,10 @@ Memo: შენიშვნა: - + + + SendConfirmationDialog + ShutdownWindow @@ -1089,7 +1104,7 @@ Reset all verify message fields ვერიფიკაციის ყველა ველის წაშლა - + SplashScreen @@ -1105,16 +1120,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction ტრანსაქციის დაწვრილებითი აღწერილობა - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts index ff02521264f..28c9949589a 100644 --- a/src/qt/locale/bitcoin_kk_KZ.ts +++ b/src/qt/locale/bitcoin_kk_KZ.ts @@ -25,7 +25,10 @@ &Delete Жою - + + + AddressTableModel + AskPassphraseDialog @@ -40,7 +43,7 @@ Repeat new passphrase Жаңа құпия сөзді қайта енгізу - + BanTableModel @@ -173,7 +176,7 @@ Priority Басымдық - + EditAddressDialog @@ -184,7 +187,7 @@ &Address Адрес - + FreespaceChecker @@ -212,6 +215,9 @@ OverviewPage + PaymentServer + + PeerTableModel @@ -222,6 +228,9 @@ + QRImageWidget + + RPCConsole &Information @@ -239,6 +248,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Amount: @@ -269,6 +281,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -281,12 +296,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Information diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts index 8aad8df46a7..3fc93b7e275 100644 --- a/src/qt/locale/bitcoin_ko_KR.ts +++ b/src/qt/locale/bitcoin_ko_KR.ts @@ -41,7 +41,10 @@ &Delete 삭제(&D) - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase 새로운 암호 재확인 - + BanTableModel @@ -463,7 +466,7 @@ Priority 우선순위 - + EditAddressDialog @@ -486,7 +489,7 @@ &Address 주소(&A) - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file 지불 요청 파일을 선택하세요 - + OptionsDialog @@ -938,6 +941,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +998,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1361,7 @@ Remove 삭제 - + ReceiveRequestDialog @@ -1371,7 +1380,10 @@ &Save Image... 이미지 저장(&S)... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1522,7 +1534,7 @@ S&end 보내기(&E) - + SendCoinsEntry @@ -1601,7 +1613,10 @@ Memo: 메모: - + + + SendConfirmationDialog + ShutdownWindow @@ -1699,7 +1714,7 @@ Reset all verify message fields 모든 검증 메시지 필드 재설정 - + SplashScreen @@ -1715,12 +1730,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction 이 창은 거래의 세부내역을 보여줍니다 - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1729,6 +1753,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1843,10 +1876,6 @@ 지갑 거래가 바뀌면 명령을 실행합니다.(%s 안의 명령어가 TxID로 바뀝니다) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - 피어들이 로컬 중계 정책을 위반하더라도 화이트 리스트에 포함된 피어인경우 강제로 중계하기 (기본값: %d) - - Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) 하나의 지갑 트랜잭션에서의 총 수수료(%s)의 최대치; 너무 낮게 설정하면 큰 트랜잭션이 중지 됩니다 (기본값: %s) diff --git a/src/qt/locale/bitcoin_ku_IQ.ts b/src/qt/locale/bitcoin_ku_IQ.ts index da5e41a3583..9e52770aa1d 100644 --- a/src/qt/locale/bitcoin_ku_IQ.ts +++ b/src/qt/locale/bitcoin_ku_IQ.ts @@ -25,7 +25,10 @@ &Delete &سڕینەوە - + + + AddressTableModel + AskPassphraseDialog @@ -89,7 +92,7 @@ Priority لەپێشی - + EditAddressDialog @@ -136,6 +139,9 @@ + PaymentServer + + PeerTableModel @@ -146,6 +152,9 @@ + QRImageWidget + + RPCConsole &Information @@ -202,11 +211,14 @@ Remove سڕینەوە - + ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Amount: @@ -233,6 +245,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -245,12 +260,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts index 14cb9c20201..b9be5f8ec65 100644 --- a/src/qt/locale/bitcoin_ky.ts +++ b/src/qt/locale/bitcoin_ky.ts @@ -9,7 +9,10 @@ &Delete Ө&чүрүү - + + + AddressTableModel + AskPassphraseDialog @@ -72,7 +75,7 @@ &Address &Дарек - + FreespaceChecker @@ -136,12 +139,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole &Information @@ -183,6 +192,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Clear &All @@ -192,7 +204,7 @@ S&end &Жөнөтүү - + SendCoinsEntry @@ -205,6 +217,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -225,12 +240,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Information diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts index dc532fe0119..4fff8c6536a 100644 --- a/src/qt/locale/bitcoin_la.ts +++ b/src/qt/locale/bitcoin_la.ts @@ -25,7 +25,10 @@ &Delete &Dele - + + + AddressTableModel + AskPassphraseDialog @@ -44,7 +47,7 @@ Repeat new passphrase Itera novam tesseram - + BanTableModel @@ -276,7 +279,7 @@ &Address &Inscriptio - + FreespaceChecker @@ -428,6 +431,9 @@ + PaymentServer + + PeerTableModel @@ -442,6 +448,9 @@ + QRImageWidget + + RPCConsole N/A @@ -531,6 +540,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -572,7 +584,7 @@ S&end &Mitte - + SendCoinsEntry @@ -609,6 +621,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -677,7 +692,7 @@ Reset all verify message fields Reconstitue omnes campos verificandi nuntii - + SplashScreen @@ -689,16 +704,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Haec tabula monstrat descriptionem verbosam transactionis - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts index 1f6cda1f52b..3ed8e2ca312 100644 --- a/src/qt/locale/bitcoin_lt.ts +++ b/src/qt/locale/bitcoin_lt.ts @@ -41,7 +41,10 @@ &Delete &Trinti - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Pakartokite naują slaptafrazę - + BanTableModel @@ -325,7 +328,7 @@ Priority Pirmumas - + EditAddressDialog @@ -340,7 +343,7 @@ &Address &Adresas - + FreespaceChecker @@ -540,6 +543,9 @@ + PaymentServer + + PeerTableModel @@ -562,6 +568,9 @@ + QRImageWidget + + RPCConsole N/A @@ -703,6 +712,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -768,7 +780,7 @@ S&end &Siųsti - + SendCoinsEntry @@ -805,6 +817,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -869,16 +884,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Šis langas sandorio detalų aprašymą - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts index 38333531e48..ab528229c42 100644 --- a/src/qt/locale/bitcoin_lv_LV.ts +++ b/src/qt/locale/bitcoin_lv_LV.ts @@ -37,7 +37,10 @@ &Delete &Dzēst - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Jaunā parole vēlreiz - + BanTableModel @@ -341,7 +344,7 @@ Priority Prioritāte - + EditAddressDialog @@ -356,7 +359,7 @@ &Address &Adrese - + FreespaceChecker @@ -436,7 +439,7 @@ Select payment request file Izvēlies maksājuma pieprasījuma datni - + OptionsDialog @@ -628,6 +631,9 @@ + PaymentServer + + PeerTableModel @@ -650,6 +656,9 @@ + QRImageWidget + + RPCConsole N/A @@ -810,7 +819,7 @@ Remove Noņemt - + ReceiveRequestDialog @@ -829,7 +838,10 @@ &Save Image... &Saglabāt Attēlu... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -916,7 +928,7 @@ S&end &Sūtīt - + SendCoinsEntry @@ -967,7 +979,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1041,7 +1056,7 @@ Reset all verify message fields Atiestatīt visus laukus - + SplashScreen @@ -1057,16 +1072,34 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Šis panelis parāda transakcijas detaļas - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_mk_MK.ts b/src/qt/locale/bitcoin_mk_MK.ts index b696111a537..dd1ce4d0894 100644 --- a/src/qt/locale/bitcoin_mk_MK.ts +++ b/src/qt/locale/bitcoin_mk_MK.ts @@ -41,7 +41,10 @@ &Delete &Избриши - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase Повторете ја новата тајна фраза - + BanTableModel @@ -287,7 +290,7 @@ Priority Приоритет - + EditAddressDialog @@ -302,7 +305,7 @@ &Address &Адреса - + FreespaceChecker @@ -382,6 +385,9 @@ + PaymentServer + + PeerTableModel @@ -412,6 +418,9 @@ + QRImageWidget + + RPCConsole Network @@ -495,7 +504,10 @@ &Save Image... &Сними Слика... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -543,6 +555,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -555,12 +570,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts index d9ef0d127b8..70b1b470d63 100644 --- a/src/qt/locale/bitcoin_mn.ts +++ b/src/qt/locale/bitcoin_mn.ts @@ -37,7 +37,10 @@ &Delete &Устгах - + + + AddressTableModel + AskPassphraseDialog @@ -52,7 +55,7 @@ Repeat new passphrase Шинэ нууц үгийг давтана уу - + BanTableModel @@ -212,7 +215,7 @@ &Address &Хаяг - + FreespaceChecker @@ -276,6 +279,9 @@ + PaymentServer + + PeerTableModel @@ -290,6 +296,9 @@ + QRImageWidget + + RPCConsole N/A @@ -370,7 +379,7 @@ Remove Устгах - + ReceiveRequestDialog @@ -379,6 +388,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -424,7 +436,7 @@ S&end Яв&уул - + SendCoinsEntry @@ -461,6 +473,9 @@ + SendConfirmationDialog + + ShutdownWindow Do not shut down the computer until this window disappears. @@ -493,16 +508,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Гүйлгээний дэлгэрэнгүйг энэ бичил цонх харуулж байна - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts index acfb38e418c..d680a501308 100644 --- a/src/qt/locale/bitcoin_ms_MY.ts +++ b/src/qt/locale/bitcoin_ms_MY.ts @@ -34,7 +34,10 @@ Alihkan fail data ke dalam tab semasa &Delete &Padam - + + + AddressTableModel + AskPassphraseDialog @@ -61,7 +64,7 @@ Alihkan fail data ke dalam tab semasa &Address Alamat - + FreespaceChecker @@ -81,12 +84,18 @@ Alihkan fail data ke dalam tab semasa OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -100,6 +109,9 @@ Alihkan fail data ke dalam tab semasa + RecentRequestsTableModel + + SendCoinsDialog Balance: @@ -110,6 +122,9 @@ Alihkan fail data ke dalam tab semasa SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -122,12 +137,30 @@ Alihkan fail data ke dalam tab semasa TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts index 7ec8c36d9bc..7ae530335d6 100644 --- a/src/qt/locale/bitcoin_nb.ts +++ b/src/qt/locale/bitcoin_nb.ts @@ -41,7 +41,10 @@ &Delete &Slett - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Gjenta ny adgangsfrase - + BanTableModel @@ -451,7 +454,7 @@ Priority Prioritet - + EditAddressDialog @@ -474,7 +477,7 @@ &Address &Adresse - + FreespaceChecker @@ -602,7 +605,7 @@ Select payment request file Velg fil for betalingsetterspørring - + OptionsDialog @@ -898,6 +901,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -952,6 +958,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1300,7 +1309,7 @@ Remove Fjern - + ReceiveRequestDialog @@ -1319,7 +1328,10 @@ &Save Image... &Lagre Bilde... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1470,7 +1482,7 @@ S&end S&end - + SendCoinsEntry @@ -1549,7 +1561,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1643,7 +1658,7 @@ Reset all verify message fields Tilbakestill alle felter for meldingsverifikasjon - + SplashScreen @@ -1659,12 +1674,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Her vises en detaljert beskrivelse av transaksjonen - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1673,6 +1697,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ne.ts b/src/qt/locale/bitcoin_ne.ts index 6ffde979f15..0cffd96f98d 100644 --- a/src/qt/locale/bitcoin_ne.ts +++ b/src/qt/locale/bitcoin_ne.ts @@ -41,7 +41,10 @@ &Delete &amp;मेटाउनुहोस् - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase नयाँ पासफ्रेज दोहोर्याउनुहोस् - + BanTableModel @@ -256,6 +259,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -278,6 +284,9 @@ + QRImageWidget + + RPCConsole User Agent @@ -295,6 +304,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog @@ -309,6 +321,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -325,12 +340,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts index 80de2103cb8..272714fc7b5 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/bitcoin_nl.ts @@ -41,6 +41,77 @@ &Delete &Verwijder + + Choose the address to send coins to + Kies het adres om munten naar te versturen + + + Choose the address to receive coins with + Kies het adres om munten op te ontvangen + + + C&hoose + K&iezen + + + Sending addresses + Verzendadressen + + + Receiving addresses + Ontvangstadressen + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Dit zijn uw Bitcoinadressen om betalingen mee te verzenden. Controleer altijd het bedrag en het ontvangstadres voordat u uw bitcoins verzendt. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Dit zijn uw Bitcoin-adressen waarmee u betalingen kunt ontvangen. We raden u aan om een nieuw ontvangstadres voor elke transactie te gebruiken. + + + &Copy Address + &Kopiëer Adres + + + Copy &Label + Kopieer &Label + + + &Edit + &Bewerk + + + Export Address List + Exporteer adreslijst + + + Comma separated file (*.csv) + Kommagescheiden bestand (*.csv) + + + Exporting Failed + Export mislukt + + + There was an error trying to save the address list to %1. Please try again. + Een fout is opgetreden tijdens het opslaan van deze adreslijst naar %1. Probeer het nogmaals. + + + + AddressTableModel + + Label + Label + + + Address + Adres + + + (no label) + (geen label) + AskPassphraseDialog @@ -60,6 +131,94 @@ Repeat new passphrase Herhaal nieuw wachtwoord + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Voer een nieuw wachtwoord in voor uw portemonnee.<br/>Gebruik een wachtwoord van <b>tien of meer willekeurige karakters</b>, of <b>acht of meer woorden</b>. + + + Encrypt wallet + Versleutel portemonnee + + + This operation needs your wallet passphrase to unlock the wallet. + Deze operatie vereist uw portemonneewachtwoord om de portemonnee te openen. + + + Unlock wallet + Open portemonnee + + + This operation needs your wallet passphrase to decrypt the wallet. + Deze operatie vereist uw portemonneewachtwoord om de portemonnee te ontsleutelen + + + Decrypt wallet + Ontsleutel portemonnee + + + Change passphrase + Wijzig wachtwoord + + + Enter the old passphrase and new passphrase to the wallet. + Voer het oude en nieuwe wachtwoord in voor uw portemonnee. + + + Confirm wallet encryption + Bevestig versleuteling van de portemonnee + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Waarschuwing: Als u uw portemonnee versleutelt en uw wachtwoord vergeet, zult u <b>AL UW BITCOINS VERLIEZEN</b>! + + + Are you sure you wish to encrypt your wallet? + Weet u zeker dat u uw portemonnee wilt versleutelen? + + + Wallet encrypted + Portemonnee versleuteld + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 zal nu afsluiten om het versleutelingsproces te voltooien. Onthoud dat het versleutelen van uw portemonnee u niet volledig kan beschermen: Malware kan uw computer infecteren en uw bitcoins stelen. + + + 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. + BELANGRIJK: Elke eerder gemaakte backup van uw portemonneebestand dient u te vervangen door het nieuw gegenereerde, versleutelde portemonneebestand. Om veiligheidsredenen zullen eerdere backups van het niet-versleutelde portemonneebestand onbruikbaar worden zodra u uw nieuwe, versleutelde, portemonnee begint te gebruiken. + + + Wallet encryption failed + Portemonneeversleuteling mislukt + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Portemonneeversleuteling mislukt door een interne fout. Uw portemonnee is niet versleuteld. + + + The supplied passphrases do not match. + De opgegeven wachtwoorden komen niet overeen + + + Wallet unlock failed + Portemonnee openen mislukt + + + The passphrase entered for the wallet decryption was incorrect. + Het opgegeven wachtwoord voor de portemonnee-ontsleuteling is niet correct. + + + Wallet decryption failed + Portemonnee-ontsleuteling mislukt + + + Wallet passphrase was successfully changed. + Portemonneewachtwoord is met succes gewijzigd. + + + Warning: The Caps Lock key is on! + Waarschuwing: De Caps-Lock-toets staat aan! + BanTableModel @@ -463,6 +622,150 @@ Priority Prioriteit + + Copy address + Kopieer adres + + + Copy label + Kopieer label + + + Copy amount + Kopieer bedrag + + + Copy transaction ID + Kopieer transactie-ID + + + Lock unspent + Blokeer ongebruikte + + + Unlock unspent + Deblokkeer ongebruikte + + + Copy quantity + Kopieer aantal + + + Copy fee + Kopieer vergoeding + + + Copy after fee + Kopieer na vergoeding + + + Copy bytes + Kopieer bytes + + + Copy priority + Kopieer prioriteit + + + Copy dust + Kopieër stof + + + Copy change + Kopieer wijziging + + + highest + hoogste + + + higher + hoger + + + high + hoog + + + medium-high + gemiddeld hoog + + + medium + gemiddeld + + + low-medium + laag gemiddeld + + + low + laag + + + lower + lager + + + lowest + laagste + + + (%1 locked) + (%1 geblokkeerd) + + + none + geen + + + yes + ja + + + no + nee + + + This label turns red if the transaction size is greater than 1000 bytes. + Dit label wordt rood als de transactie groter is dan 1000 bytes. + + + This means a fee of at least %1 per kB is required. + Dit betekent dat een vergoeding van minimaal %1 per kB nodig is. + + + Can vary +/- 1 byte per input. + Kan +/- 1 byte per invoer variëren. + + + Transactions with higher priority are more likely to get included into a block. + Transacties met een hogere prioriteit zullen eerder in een blok gezet worden. + + + This label turns red if the priority is smaller than "medium". + Dit label wordt rood als de prioriteit lager is dan "gemiddeld". + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Dit label wordt rood, als een ontvanger een bedrag van minder dan de huidige dust-drempel gekregen heeft. + + + Can vary +/- %1 satoshi(s) per input. + Kan per input +/- %1 satoshi(s) variëren. + + + (no label) + (geen label) + + + change from %1 (%2) + wijzig van %1 (%2) + + + (change) + (wijzig) + EditAddressDialog @@ -486,6 +789,38 @@ &Address &Adres + + New receiving address + Nieuw ontvangstadres + + + New sending address + Nieuw verzendadres + + + Edit receiving address + Bewerk ontvangstadres + + + Edit sending address + Bewerk verzendadres + + + The entered address "%1" is not a valid Bitcoin address. + Het opgegeven adres "%1" is een ongeldig Bitcoinadres. + + + The entered address "%1" is already in the address book. + Het opgegeven adres "%1" bestaat al in uw adresboek. + + + Could not unlock wallet. + Kon de portemonnee niet openen. + + + New key generation failed. + Genereren nieuwe sleutel mislukt. + FreespaceChecker @@ -626,6 +961,10 @@ Select payment request file Selecteer betalingsverzoek bestand + + Select payment request file to open + Selecteer betalingsverzoekbestand om te openen + OptionsDialog @@ -938,6 +1277,97 @@ + PaymentServer + + Payment request error + Fout bij betalingsverzoek + + + Cannot start bitcoin: click-to-pay handler + Kan bitcoin niet starten: click-to-pay handler + + + URI handling + URI-behandeling + + + Payment request fetch URL is invalid: %1 + URL om betalingsverzoek te verkrijgen is ongeldig: %1 + + + Invalid payment address %1 + Ongeldig betalingsadres %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI kan niet verwerkt worden! Dit kan het gevolg zijn van een ongeldig Bitcoin adres of misvormde URI parameters. + + + Payment request file handling + Betalingsverzoek bestandsafhandeling + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Betalingsverzoekbestand kan niet gelezen of verwerkt worden! Dit kan veroorzaakt worden door een ongeldig betalingsverzoekbestand. + + + Payment request rejected + Betalingsverzoek geweigerd + + + Payment request network doesn't match client network. + Betalingsaanvraagnetwerk komt niet overeen met klantennetwerk. + + + Payment request expired. + Betalingsverzoek verlopen. + + + Payment request is not initialized. + Betalingsaanvraag is niet geïnitialiseerd. + + + Unverified payment requests to custom payment scripts are unsupported. + Niet-geverifieerde betalingsverzoeken naar aangepaste betalingsscripts worden niet ondersteund. + + + Invalid payment request. + Ongeldig betalingsverzoek. + + + Requested payment amount of %1 is too small (considered dust). + Het gevraagde betalingsbedrag van %1 is te weinig (beschouwd als stof). + + + Refund from %1 + Restitutie van %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Betalingsverzoek %1 is te groot (%2 bytes, toegestaan ​​%3 bytes). + + + Error communicating with %1: %2 + Fout bij communiceren met %1: %2 + + + Payment request cannot be parsed! + Betalingsverzoek kan niet worden verwerkt! + + + Bad response from server %1 + Ongeldige respons van server %1 + + + Network request error + Fout bij netwerkverzoek + + + Payment acknowledged + Betaling bevestigd + + + PeerTableModel User Agent @@ -992,6 +1422,25 @@ + QRImageWidget + + &Save Image... + &Sla afbeelding op... + + + &Copy Image + &Afbeelding kopiëren + + + Save QR Code + Sla QR-code op + + + PNG Image (*.png) + PNG afbeelding (*.png) + + + RPCConsole N/A @@ -1352,6 +1801,18 @@ Remove Verwijder + + Copy label + Kopieer label + + + Copy message + Kopieer bericht + + + Copy amount + Kopieer bedrag + ReceiveRequestDialog @@ -1371,39 +1832,106 @@ &Save Image... &Sla afbeelding op... - - - SendCoinsDialog - Send Coins - Verstuurde munten + Request payment to %1 + Betalingsverzoek tot %1 - Coin Control Features - Coin controle opties + Payment information + Betalingsinformatie - Inputs... - Invoer... + URI + URI - automatically selected - automatisch geselecteerd + Address + Adres - Insufficient funds! - Onvoldoende fonds! + Amount + Bedrag - Quantity: - Kwantiteit + Label + Label - Bytes: - Bytes: + Message + Bericht - Amount: + Resulting URI too long, try to reduce the text for label / message. + Resulterende URI te lang, probeer de tekst korter te maken voor het label/bericht. + + + Error encoding URI into QR Code. + Fout tijdens encoderen URI in QR-code + + + + RecentRequestsTableModel + + Date + Datum + + + Label + Label + + + Message + Bericht + + + (no label) + (geen label) + + + (no message) + (geen bericht) + + + (no amount requested) + (geen bedrag aangevraagd) + + + Requested + Verzoek ingediend + + + + SendCoinsDialog + + Send Coins + Verstuurde munten + + + Coin Control Features + Coin controle opties + + + Inputs... + Invoer... + + + automatically selected + automatisch geselecteerd + + + Insufficient funds! + Onvoldoende fonds! + + + Quantity: + Kwantiteit + + + Bytes: + Bytes: + + + Amount: Bedrag: @@ -1522,6 +2050,110 @@ S&end V&erstuur + + Copy quantity + Kopieer aantal + + + Copy amount + Kopieer bedrag + + + Copy fee + Kopieer vergoeding + + + Copy after fee + Kopieer na vergoeding + + + Copy bytes + Kopieer bytes + + + Copy priority + Kopieer prioriteit + + + Copy dust + Kopieër stof + + + Copy change + Kopieer wijziging + + + %1 to %2 + %1 tot %2 + + + Are you sure you want to send? + Weet u zeker dat u wilt verzenden? + + + added as transaction fee + toegevoegd als transactiekosten + + + Total Amount %1 + Totaalbedrag %1 + + + or + of + + + Confirm send coins + Bevestig versturen munten + + + The recipient address is not valid. Please recheck. + Het adres van de ontvanger is niet geldig. Gelieve opnieuw te controleren. + + + The amount to pay must be larger than 0. + Het ingevoerde bedrag moet groter zijn dan 0. + + + The amount exceeds your balance. + Het bedrag is hoger dan uw huidige saldo. + + + The total exceeds your balance when the %1 transaction fee is included. + Het totaal overschrijdt uw huidige saldo wanneer de %1 transactiekosten worden meegerekend. + + + Duplicate address found: addresses should only be used once each. + Dubbel adres gevonden: adressen mogen maar één keer worden gebruikt worden. + + + Transaction creation failed! + Transactiecreatie mislukt + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + De transactie was afgewezen. Dit kan gebeuren als u eerder uitgegeven munten opnieuw wilt versturen, zoals wanneer u een kopie van uw wallet.dat heeft gebruikt en in de kopie deze munten zijn gemarkeerd als uitgegeven, maar in de huidige nog niet. + + + Payment request expired. + Betalingsverzoek verlopen. + + + Pay only the required fee of %1 + Betaal alleen de verplichte transactiekosten van %1 + + + Warning: Invalid Bitcoin address + Waarschuwing: Ongeldig Bitcoinadres + + + Warning: Unknown change address + Waarschuwing: Onbekend wisselgeldadres + + + (no label) + (geen label) + SendCoinsEntry @@ -1601,6 +2233,17 @@ Memo: Memo: + + Enter a label for this address to add it to your address book + Vul een label in voor dit adres om het toe te voegen aan uw adresboek + + + + SendConfirmationDialog + + Yes + Ja + ShutdownWindow @@ -1699,6 +2342,58 @@ Reset all verify message fields Verwijder alles in de invulvelden + + Click "Sign Message" to generate signature + Klik op "Onderteken Bericht" om de handtekening te genereren + + + The entered address is invalid. + Het opgegeven adres is ongeldig. + + + Please check the address and try again. + Controleer het adres en probeer het opnieuw. + + + The entered address does not refer to a key. + Het opgegeven adres verwijst niet naar een sleutel. + + + Wallet unlock was cancelled. + Portemonnee-ontsleuteling is geannuleerd. + + + Private key for the entered address is not available. + Geheime sleutel voor het ingevoerde adres is niet beschikbaar. + + + Message signing failed. + Ondertekenen van het bericht is mislukt. + + + Message signed. + Bericht ondertekend. + + + The signature could not be decoded. + De handtekening kon niet worden gedecodeerd. + + + Please check the signature and try again. + Controleer de handtekening en probeer het opnieuw. + + + The signature did not match the message digest. + De handtekening hoort niet bij het bericht. + + + Message verification failed. + Berichtverificatie mislukt. + + + Message verified. + Bericht geverifiëerd. + SplashScreen @@ -1715,11 +2410,456 @@ + TransactionDesc + + Open for %n more block(s) + Open voor nog %n blok(ken)Open voor nog %n blok(ken) + + + Open until %1 + Open tot %1 + + + conflicted with a transaction with %1 confirmations + geconflicteerd met een transactie met %1 confirmaties + + + %1/offline + %1/offline + + + 0/unconfirmed, %1 + 0/onbevestigd, %1 + + + in memory pool + in geheugenpoel + + + not in memory pool + niet in geheugenpoel + + + abandoned + opgegeven + + + %1/unconfirmed + %1/onbevestigd + + + %1 confirmations + %1 bevestigingen + + + Status + Status + + + , has not been successfully broadcast yet + , is nog niet met succes uitgezonden + + + , broadcast through %n node(s) + , uitgezonden naar %n node(s), uitgezonden naar %n node(s) + + + Date + Datum + + + Source + Bron + + + Generated + Gegenereerd + + + From + Van + + + unknown + onbekend + + + To + Aan + + + own address + eigen adres + + + watch-only + alleen-bekijkbaar + + + label + label + + + Credit + Credit + + + matures in %n more block(s) + komt beschikbaar na %n nieuwe blokkenkomt beschikbaar na %n nieuwe blokken + + + not accepted + niet geaccepteerd + + + Debit + Debet + + + Total debit + Totaal debit + + + Total credit + Totaal credit + + + Transaction fee + Transactiekosten + + + Net amount + Netto bedrag + + + Message + Bericht + + + Comment + Opmerking + + + Transaction ID + Transactie-ID + + + Output index + Output index + + + Merchant + Handelaar + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Gegenereerde munten moeten %1 blokken rijpen voordat ze kunnen worden besteed. Toen dit blok gegenereerd werd, werd het uitgezonden naar het netwerk om aan de blokketen toegevoegd te worden. Als het niet lukt om in de keten toegevoegd te worden, zal de status te veranderen naar "niet geaccepteerd" en zal het niet besteedbaar zijn. Dit kan soms gebeuren als een ander knooppunt een blok genereert binnen een paar seconden na die van u. + + + Debug information + Debug-informatie + + + Transaction + Transactie + + + Inputs + Inputs + + + Amount + Bedrag + + + true + waar + + + false + onwaar + + + TransactionDescDialog This pane shows a detailed description of the transaction Dit venster laat een uitgebreide beschrijving van de transactie zien + + Details for %1 + Details voor %1 + + + + TransactionTableModel + + Date + Datum + + + Type + Type + + + Label + Label + + + Open for %n more block(s) + Open voor nog %n blok(ken)Open voor nog %n blok(ken) + + + Open until %1 + Open tot %1 + + + Offline + Offline + + + Unconfirmed + Onbevestigd + + + Abandoned + Opgegeven + + + Confirming (%1 of %2 recommended confirmations) + Bevestigen (%1 van %2 aanbevolen bevestigingen) + + + Confirmed (%1 confirmations) + Bevestigd (%1 bevestigingen) + + + Conflicted + Conflicterend + + + Immature (%1 confirmations, will be available after %2) + Niet beschikbaar (%1 bevestigingen, zal beschikbaar zijn na %2) + + + This block was not received by any other nodes and will probably not be accepted! + Dit blok is niet ontvangen bij andere nodes en zal waarschijnlijk niet worden geaccepteerd! + + + Generated but not accepted + Gegenereerd maar niet geaccepteerd + + + Received with + Ontvangen met + + + Received from + Ontvangen van + + + Sent to + Verzonden aan + + + Payment to yourself + Betaling aan uzelf + + + Mined + Gedolven + + + watch-only + alleen-bekijkbaar + + + (n/a) + (nvt) + + + (no label) + (geen label) + + + Transaction status. Hover over this field to show number of confirmations. + Transactiestatus. Houd de cursor boven dit veld om het aantal bevestigingen te laten zien. + + + Date and time that the transaction was received. + Datum en tijd waarop deze transactie is ontvangen. + + + Type of transaction. + Type transactie. + + + Whether or not a watch-only address is involved in this transaction. + Of er een alleen-bekijken-adres is betrokken bij deze transactie. + + + User-defined intent/purpose of the transaction. + Door gebruiker gedefinieerde intentie/doel van de transactie. + + + Amount removed from or added to balance. + Bedrag verwijderd van of toegevoegd aan saldo. + + + + TransactionView + + All + Alles + + + Today + Vandaag + + + This week + Deze week + + + This month + Deze maand + + + Last month + Vorige maand + + + This year + Dit jaar + + + Range... + Bereik... + + + Received with + Ontvangen met + + + Sent to + Verzonden aan + + + To yourself + Aan uzelf + + + Mined + Gedolven + + + Other + Anders + + + Enter address or label to search + Vul adres of label in om te zoeken + + + Min amount + Min. bedrag + + + Abandon transaction + Doe afstand van transactie + + + Copy address + Kopieer adres + + + Copy label + Kopieer label + + + Copy amount + Kopieer bedrag + + + Copy transaction ID + Kopieer transactie-ID + + + Copy raw transaction + Kopieer ruwe transactie + + + Copy full transaction details + Kopieer volledige transactiedetials + + + Edit label + Bewerk label + + + Show transaction details + Toon transactiedetails + + + Export Transaction History + Exporteer transactiegeschiedenis + + + Comma separated file (*.csv) + Kommagescheiden bestand (*.csv) + + + Confirmed + Bevestigd + + + Watch-only + Alleen-bekijkbaar + + + Date + Datum + + + Type + Type + + + Label + Label + + + Address + Adres + + + ID + ID + + + Exporting Failed + Export mislukt + + + There was an error trying to save the transaction history to %1. + Er is een fout opgetreden bij het opslaan van de transactiegeschiedenis naar %1. + + + Exporting Successful + Export succesvol + + + The transaction history was successfully saved to %1. + De transactiegeschiedenis was succesvol bewaard in %1. + + + Range: + Bereik: + + + to + naar + UnitDisplayStatusBarControl @@ -1729,6 +2869,55 @@ + WalletFrame + + No wallet has been loaded. + Er is geen portemonnee geladen. + + + + WalletModel + + Send Coins + Verstuur munten + + + + WalletView + + &Export + &Exporteer + + + Export the data in the current tab to a file + Exporteer de data in de huidige tab naar een bestand + + + Backup Wallet + Portemonnee backuppen + + + Wallet Data (*.dat) + Portemonneedata (*.dat) + + + Backup Failed + Backup mislukt + + + There was an error trying to save the wallet data to %1. + Er is een fout opgetreden bij het wegschrijven van de portemonneedata naar %1. + + + Backup Successful + Backup succesvol + + + The wallet data was successfully saved to %1. + De portemonneedata is succesvol opgeslagen in %1. + + + bitcoin-core Options: @@ -1843,10 +3032,6 @@ Voer opdracht uit zodra een portemonneetransactie verandert (%s in cmd wordt vervangen door TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Forceer het doorsturen van transacties van goedgekeurde peers, zelfs wanneer deze niet voldoen aan de lokale doorstuur regels (standaard: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Maximum toegestane peer tijd compensatie. Lokaal perspectief van tijd mag worden beinvloed door peers die met deze hoeveelheid voor of achter lopen. (standaard: %u seconden) @@ -2103,6 +3288,10 @@ Specificeer het portemonnee bestand (vanuit de gegevensmap) + Starting network threads... + Netwerkthread starten... + + The source code is available from %s. De broncode is beschikbaar van %s. @@ -2187,6 +3376,10 @@ Transactiekosten (in %s/kB) kleiner dan dit worden beschouw dat geen transactiekosten in rekening worden gebracht voor doorgeven, mijnen en transactiecreatie (standaard: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Forceer het doorsturen van transacties van goedgekeurde peers, zelfs wanneer deze niet voldoen aan de lokale doorstuurregels (standaard: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Als paytxfee niet is ingesteld, voeg voldoende transactiekosten toe zodat transacties starten met bevestigingen binnen in n blokken (standaard: %u) diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts index 53515433384..674c1b1d9db 100644 --- a/src/qt/locale/bitcoin_pam.ts +++ b/src/qt/locale/bitcoin_pam.ts @@ -33,7 +33,10 @@ &Delete &Ilako - + + + AddressTableModel + AskPassphraseDialog @@ -52,7 +55,7 @@ Repeat new passphrase Pasibayuan ya ing bayung passphrase - + BanTableModel @@ -256,7 +259,7 @@ &Address &Address - + FreespaceChecker @@ -412,6 +415,9 @@ + PaymentServer + + PeerTableModel @@ -426,6 +432,9 @@ + QRImageWidget + + RPCConsole N/A @@ -511,6 +520,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -552,7 +564,7 @@ S&end Ipadala - + SendCoinsEntry @@ -589,6 +601,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -657,7 +672,7 @@ Reset all verify message fields Ibalik king dati reng ngan fields na ning pamag beripikang mensayi - + SplashScreen @@ -669,16 +684,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ining pane a ini magpakit yang detalyadung description ning transaksion - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts index b902e69f560..57c336c852e 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/bitcoin_pl.ts @@ -41,7 +41,10 @@ &Delete &Usuń - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Powtórz nowe hasło - + BanTableModel @@ -463,7 +466,7 @@ Priority Priorytet - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Adres - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Otwórz żądanie zapłaty z pliku - + OptionsDialog @@ -938,6 +941,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +998,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1361,7 @@ Remove Usuń - + ReceiveRequestDialog @@ -1371,7 +1380,10 @@ &Save Image... &Zapisz obraz... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1522,7 +1534,7 @@ S&end Wy&syłka - + SendCoinsEntry @@ -1601,7 +1613,10 @@ Memo: Notatka: - + + + SendConfirmationDialog + ShutdownWindow @@ -1700,7 +1715,7 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Reset all verify message fields Resetuje wszystkie pola weryfikacji wiadomości - + SplashScreen @@ -1716,12 +1731,21 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ten panel pokazuje szczegółowy opis transakcji - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1730,6 +1754,15 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1824,10 +1857,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Wymuś przekazywanie transakcji od osób z białej listy, nawet jeśli narusza to lokalną politykę przekazywania (default: %d) - - Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. Proszę sprawdzić czy data i czas na Twoim komputerze są poprawne! Jeżeli ustawienia zegara będą złe, %s nie będzie działał prawidłowo. diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index 12da991addd..2dbd28dc610 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -23,7 +23,7 @@ C&lose - &Fechar + Fechar Delete the currently selected address from the list @@ -41,7 +41,10 @@ &Delete &Excluir - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repita a nova frase de segurança - + BanTableModel @@ -463,7 +466,7 @@ Priority Prioridade - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Endereço - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Selecione o arquivo de cobrança - + OptionsDialog @@ -938,6 +941,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +998,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1361,7 @@ Remove Remover - + ReceiveRequestDialog @@ -1371,7 +1380,10 @@ &Save Image... &Salvar Imagem... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1522,7 +1534,7 @@ S&end Enviar - + SendCoinsEntry @@ -1601,7 +1613,10 @@ Memo: Memorizar: - + + + SendConfirmationDialog + ShutdownWindow @@ -1695,7 +1710,7 @@ Reset all verify message fields Limpar todos os campos de assinatura da mensagem - + SplashScreen @@ -1711,12 +1726,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Este painel mostra uma descrição detalhada da transação - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1725,6 +1749,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1835,12 +1868,8 @@ Executa um comando quando uma transação da carteira mudar (%s no comando será substituído por TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Força a retransmissão de transações de pares da lista branca, mesmo quando violam a política local de retransmissão (default: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) - A mediana máxima permitida de peer time compensa o ajuste. Perspectiva local de horário pode ser influenciada por pares à frente ou atrás neste montante. (padrão: %u segundos) + A media máxima permitida de peer time compensa o ajuste. Perspectiva local de horário pode ser influenciada por pares à frente ou atrás neste montante. (padrão: %u segundos) Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) @@ -1919,6 +1948,10 @@ Impossível resolver -%s endereço: '%s' + Change index out of range + Índice de mudança fora da faixa. + + Connect only to the specified node(s) Conectar apenas a cliente(s) específico(s) @@ -2056,7 +2089,7 @@ Print version and exit - Mostra a versão e sai + Imprimir versão e sair Prune cannot be configured with a negative value. diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts index 83406789707..cbecf905855 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/bitcoin_pt_PT.ts @@ -41,7 +41,10 @@ &Delete &Eliminar - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repita a nova frase de palavra-passe - + BanTableModel @@ -455,7 +458,7 @@ Priority Prioridade - + EditAddressDialog @@ -478,7 +481,7 @@ &Address E&ndereço - + FreespaceChecker @@ -606,7 +609,7 @@ Select payment request file Seleccione o ficheiro de pedido de pagamento - + OptionsDialog @@ -911,6 +914,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -965,6 +971,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1317,7 +1326,7 @@ Remove Remover - + ReceiveRequestDialog @@ -1336,7 +1345,10 @@ &Save Image... &Salvar Imagem... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1487,7 +1499,7 @@ S&end E&nviar - + SendCoinsEntry @@ -1566,7 +1578,10 @@ Memo: Memorando: - + + + SendConfirmationDialog + ShutdownWindow @@ -1664,7 +1679,7 @@ Reset all verify message fields Repor todos os campos de verificação de mensagem - + SplashScreen @@ -1680,12 +1695,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Esta janela mostra uma descrição detalhada da transação - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1694,6 +1718,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1792,10 +1825,6 @@ Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Forçar retransmissão das transações a partir dos pares da lista branca, mesmo que estes violem a política de retransmissão local (predefinição: %d) - - Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Defina o número de processos de verificação (%u até %d, 0 = automático, <0 = ldisponibiliza esse número de núcleos livres, por defeito: %d) diff --git a/src/qt/locale/bitcoin_ro.ts b/src/qt/locale/bitcoin_ro.ts index 9f6ba27092f..d1f17e29c88 100644 --- a/src/qt/locale/bitcoin_ro.ts +++ b/src/qt/locale/bitcoin_ro.ts @@ -41,7 +41,10 @@ &Delete Șterge - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetati noua parolă - + BanTableModel @@ -353,7 +356,7 @@ Priority Prioritate - + EditAddressDialog @@ -364,7 +367,7 @@ &Address &Adresa - + FreespaceChecker @@ -528,6 +531,9 @@ + PaymentServer + + PeerTableModel @@ -538,6 +544,9 @@ + QRImageWidget + + RPCConsole Client version @@ -650,14 +659,17 @@ Remove Elimină - + ReceiveRequestDialog &Save Image... &Salvează imaginea... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -693,6 +705,9 @@ SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -705,12 +720,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts index afd3cc5f103..a16a497fb2c 100644 --- a/src/qt/locale/bitcoin_ro_RO.ts +++ b/src/qt/locale/bitcoin_ro_RO.ts @@ -41,7 +41,10 @@ &Delete &Şterge - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Repetaţi noua frază de acces - + BanTableModel @@ -435,7 +438,7 @@ Priority Prioritate - + EditAddressDialog @@ -458,7 +461,7 @@ &Address &Adresă - + FreespaceChecker @@ -582,7 +585,7 @@ Select payment request file Selectaţi fişierul cerere de plată - + OptionsDialog @@ -858,6 +861,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -912,6 +918,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1216,7 +1225,7 @@ Remove Înlătură - + ReceiveRequestDialog @@ -1235,7 +1244,10 @@ &Save Image... &Salvează imaginea... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1366,7 +1378,7 @@ S&end Trimit&e - + SendCoinsEntry @@ -1429,7 +1441,10 @@ Memo: Memo: - + + + SendConfirmationDialog + ShutdownWindow @@ -1519,7 +1534,7 @@ Reset all verify message fields Resetează toate cîmpurile mesajelor semnate - + SplashScreen @@ -1535,12 +1550,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Acest panou arată o descriere detaliată a tranzacţiei - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1549,6 +1573,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index 25fe77bee7e..5e1a5ee9def 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -41,6 +41,77 @@ &Delete &Удалить + + Choose the address to send coins to + Выберите адрес для отправки перевода + + + Choose the address to receive coins with + Выберите адрес для получения перевода + + + C&hoose + &Выбрать + + + Sending addresses + Адреса отправки + + + Receiving addresses + Адреса получения + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Это ваши адреса Bitcoin для отправки платежей. Всегда проверяйте количество и адрес получателя перед отправкой перевода. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Это ваши адреса Bitcoin для приёма платежей. Рекомендуется использовать новый адрес получения для каждой транзакции. + + + &Copy Address + Копировать &адрес + + + Copy &Label + Копировать &метку + + + &Edit + &Правка + + + Export Address List + Экспортировать список адресов + + + Comma separated file (*.csv) + Текст, разделённый запятыми (*.csv) + + + Exporting Failed + Экспорт не удался + + + There was an error trying to save the address list to %1. Please try again. + Произошла ошибка при сохранении списка адресов в %1. Пожалуйста, попробуйте еще раз. + + + + AddressTableModel + + Label + Метка + + + Address + Адрес + + + (no label) + (нет метки) + AskPassphraseDialog @@ -60,6 +131,94 @@ Repeat new passphrase Повторите новый пароль + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Введите новый пароль бумажника.<br/>Используйте пароль, состоящий из <b>десяти или более случайных символов</b>, или <b>восьми или более слов</b>. + + + Encrypt wallet + Зашифровать бумажник + + + This operation needs your wallet passphrase to unlock the wallet. + Для выполнения операции требуется пароль вашего бумажника. + + + Unlock wallet + Разблокировать бумажник + + + This operation needs your wallet passphrase to decrypt the wallet. + Для выполнения операции требуется пароль вашего бумажника. + + + Decrypt wallet + Расшифровать бумажник + + + Change passphrase + Сменить пароль + + + Enter the old passphrase and new passphrase to the wallet. + Введите старый и новый пароль для бумажника. + + + Confirm wallet encryption + Подтвердите шифрование бумажника + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Предупреждение: если вы зашифруете бумажник и потеряете пароль, вы <b>ПОТЕРЯЕТЕ ВСЕ ВАШИ БИТКОИНЫ</b>! + + + Are you sure you wish to encrypt your wallet? + Вы уверены, что хотите зашифровать ваш бумажник? + + + Wallet encrypted + Бумажник зашифрован + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + Сейчас %1 закроется для завершения процесса шифрования. Помните, что шифрование вашего бумажника не может полностью защитить ваши биткоины от кражи с помощью инфицирования вашего компьютера вредоносным ПО. + + + 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. + ВАЖНО: все предыдущие резервные копии вашего бумажника должны быть заменены новым зашифрованным файлом. В целях безопасности предыдущие резервные копии незашифрованного бумажника станут бесполезны, как только вы начнёте использовать новый зашифрованный бумажник. + + + Wallet encryption failed + Не удалось зашифровать бумажник + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Шифрование бумажника не удалось из-за внутренней ошибки. Ваш бумажник не был зашифрован. + + + The supplied passphrases do not match. + Введённые пароли не совпадают. + + + Wallet unlock failed + Разблокировка бумажника не удалась + + + The passphrase entered for the wallet decryption was incorrect. + Неверный пароль для расшифровки бумажника. + + + Wallet decryption failed + Расшифровка бумажника не удалась + + + Wallet passphrase was successfully changed. + Пароль бумажника успешно изменён. + + + Warning: The Caps Lock key is on! + Внимание: Caps Lock включен! + BanTableModel @@ -463,6 +622,150 @@ Priority Приоритет + + Copy address + Копировать адрес + + + Copy label + Копировать метку + + + Copy amount + Копировать сумму + + + Copy transaction ID + Копировать ID транзакции + + + Lock unspent + Заблокировать непотраченное + + + Unlock unspent + Разблокировать непотраченное + + + Copy quantity + Копировать количество + + + Copy fee + Копировать комиссию + + + Copy after fee + Копировать после комиссии + + + Copy bytes + Копировать байты + + + Copy priority + Копировать приоритет + + + Copy dust + Копировать пыль + + + Copy change + Копировать сдачу + + + highest + самый высокий + + + higher + выше + + + high + высокий + + + medium-high + выше среднего + + + medium + средний + + + low-medium + ниже среднего + + + low + низкий + + + lower + ниже + + + lowest + самый низкий + + + (%1 locked) + (%1 заблокировано) + + + none + ничего + + + yes + да + + + no + нет + + + This label turns red if the transaction size is greater than 1000 bytes. + Эта метка станет красной, если размер транзакции будет больше 1000 байт. + + + This means a fee of at least %1 per kB is required. + Это значит, что требуется комиссия как минимум %1 на КБ. + + + Can vary +/- 1 byte per input. + Может отличаться на +/- 1 байт на вход. + + + Transactions with higher priority are more likely to get included into a block. + Транзакции с более высоким приоритетом будут вероятнее других включены в блок. + + + This label turns red if the priority is smaller than "medium". + Эта метка станет красной, если приоритет будет ниже "среднего". + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Эта метка станет красной, если любой получатель получит сумму меньше, чем текущий порог пыли. + + + Can vary +/- %1 satoshi(s) per input. + Может отличаться на +/- %1 сатоши на вход. + + + (no label) + (нет метки) + + + change from %1 (%2) + сдача с %1 (%2) + + + (change) + (сдача) + EditAddressDialog @@ -486,6 +789,38 @@ &Address &Адрес + + New receiving address + Новый адрес получения + + + New sending address + Новый адрес отправки + + + Edit receiving address + Изменить адрес получения + + + Edit sending address + Изменить адрес отправки + + + The entered address "%1" is not a valid Bitcoin address. + Введённый адрес "%1" не является правильным Bitcoin-адресом. + + + The entered address "%1" is already in the address book. + Введённый адрес "%1" уже находится в адресной книге. + + + Could not unlock wallet. + Не удается разблокировать бумажник. + + + New key generation failed. + Генерация нового ключа не удалась. + FreespaceChecker @@ -626,6 +961,10 @@ Select payment request file Выбрать файл запроса платежа + + Select payment request file to open + Выберите файл запроса платежа + OptionsDialog @@ -938,6 +1277,97 @@ + PaymentServer + + Payment request error + Ошибка запроса платежа + + + Cannot start bitcoin: click-to-pay handler + Не удаётся запустить bitcoin: обработчик click-to-pay + + + URI handling + Обработка URI + + + Payment request fetch URL is invalid: %1 + Неверный URL запроса платежа: %1 + + + Invalid payment address %1 + Неверный адрес платежа %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + Не удалось обработать URI! Это может быть связано с неверным адресом Bitcoin или неправильными параметрами URI. + + + Payment request file handling + Обработка файла запроса платежа + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Файл запроса платежа не может быть прочитан! Обычно это происходит из-за неверного файла запроса платежа. + + + Payment request rejected + Запрос платежа отклонён + + + Payment request network doesn't match client network. + Сеть запроса платежа не совпадает с сетью клиента. + + + Payment request expired. + Запрос платежа просрочен. + + + Payment request is not initialized. + Запрос платежа не инициализирован. + + + Unverified payment requests to custom payment scripts are unsupported. + Непроверенные запросы платежей с нестандартными платёжными сценариями не поддерживаются. + + + Invalid payment request. + Неверный запрос платежа. + + + Requested payment amount of %1 is too small (considered dust). + Запрошенная сумма платежа %1 слишком мала (считается пылью). + + + Refund from %1 + Возврат от %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Запрос платежа %1 слишком большой (%2 байтов, разрешено %3 байтов). + + + Error communicating with %1: %2 + Ошибка связи с %1: %2 + + + Payment request cannot be parsed! + Запрос платежа не может быть разобран! + + + Bad response from server %1 + Плохой ответ сервера %1 + + + Network request error + Ошибка сетевого запроса + + + Payment acknowledged + Платёж принят + + + PeerTableModel User Agent @@ -992,6 +1422,25 @@ + QRImageWidget + + &Save Image... + &Сохранить изображение... + + + &Copy Image + Копировать &изображение + + + Save QR Code + Сохранить QR-код + + + PNG Image (*.png) + Изображение PNG (*.png) + + + RPCConsole N/A @@ -1352,6 +1801,18 @@ Remove Удалить + + Copy label + Копировать метку + + + Copy message + Копировать сообщение + + + Copy amount + Копировать сумму + ReceiveRequestDialog @@ -1371,36 +1832,103 @@ &Save Image... &Сохранить изображение... - - - SendCoinsDialog - Send Coins - Отправка + Request payment to %1 + Запросить платёж на %1 - Coin Control Features - Функции Контроля Монет + Payment information + Информация платежа - Inputs... - Входы... + URI + URI - automatically selected - автоматически выбрано + Address + Адрес - Insufficient funds! - Недостаточно средств! + Amount + Сумма - Quantity: - Количество: + Label + Метка - Bytes: - Байт: + Message + Сообщение + + + Resulting URI too long, try to reduce the text for label / message. + Получившийся URI слишком длинный, попробуйте сократить текст метки / сообщения. + + + Error encoding URI into QR Code. + Ошибка кодирования URI в QR-код + + + + RecentRequestsTableModel + + Date + Дата + + + Label + Метка + + + Message + Сообщение + + + (no label) + (нет метки) + + + (no message) + (нет сообщения) + + + (no amount requested) + (нет запрошенной суммы) + + + Requested + Запрошено + + + + SendCoinsDialog + + Send Coins + Отправка + + + Coin Control Features + Функции Контроля Монет + + + Inputs... + Входы... + + + automatically selected + автоматически выбрано + + + Insufficient funds! + Недостаточно средств! + + + Quantity: + Количество: + + + Bytes: + Байт: Amount: @@ -1522,6 +2050,114 @@ S&end &Отправить + + Copy quantity + Копировать количество + + + Copy amount + Копировать сумму + + + Copy fee + Копировать комиссию + + + Copy after fee + Копировать после комиссии + + + Copy bytes + Копировать байты + + + Copy priority + Копировать приоритет + + + Copy dust + Копировать пыль + + + Copy change + Копировать сдачу + + + %1 to %2 + С %1 на %2 + + + Are you sure you want to send? + Вы уверены, что хотите отправить? + + + added as transaction fee + добавлено как комиссия + + + Total Amount %1 + Общая сумма %1 + + + or + или + + + Confirm send coins + Подтвердите отправку монет + + + The recipient address is not valid. Please recheck. + Адрес получателя неверный. Пожалуйста, перепроверьте. + + + The amount to pay must be larger than 0. + Сумма для отправки должна быть больше 0. + + + The amount exceeds your balance. + Сумма превышает ваш баланс. + + + The total exceeds your balance when the %1 transaction fee is included. + Сумма с учётом комиссии %1 превысит ваш баланс. + + + Duplicate address found: addresses should only be used once each. + Обнаружен дублирующийся адрес: используйте каждый адрес только один раз. + + + Transaction creation failed! + Не удалось создать транзакцию! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + Транзакция была отклонена! Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию wallet.dat, а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой. + + + A fee higher than %1 is considered an absurdly high fee. + Комиссия больше чем %1 считается невероятно большой. + + + Payment request expired. + Запрос платежа просрочен. + + + Pay only the required fee of %1 + Заплатить только обязательную комиссию %1 + + + Warning: Invalid Bitcoin address + Внимание: неверный адрес Bitcoin + + + Warning: Unknown change address + Внимание: неизвестный адрес для сдачи + + + (no label) + (нет метки) + SendCoinsEntry @@ -1601,6 +2237,17 @@ Memo: Примечание: + + Enter a label for this address to add it to your address book + Введите метку для данного адреса, чтобы добавить его в адресную книгу + + + + SendConfirmationDialog + + Yes + Да + ShutdownWindow @@ -1699,6 +2346,58 @@ Reset all verify message fields Сбросить все поля проверки сообщения + + Click "Sign Message" to generate signature + Нажмите "Подписать сообщение" для создания подписи + + + The entered address is invalid. + Введённый адрес неверен. + + + Please check the address and try again. + Пожалуйста, проверьте адрес и попробуйте ещё раз. + + + The entered address does not refer to a key. + Введённый адрес не связан с ключом. + + + Wallet unlock was cancelled. + Разблокировка бумажника была отменена. + + + Private key for the entered address is not available. + Недоступен секретный ключ для введённого адреса. + + + Message signing failed. + Не удалось подписать сообщение. + + + Message signed. + Сообщение подписано. + + + The signature could not be decoded. + Подпись не может быть раскодирована. + + + Please check the signature and try again. + Пожалуйста, проверьте подпись и попробуйте ещё раз. + + + The signature did not match the message digest. + Подпись не соответствует отпечатку сообщения. + + + Message verification failed. + Сообщение не прошло проверку. + + + Message verified. + Сообщение проверено. + SplashScreen @@ -1715,11 +2414,452 @@ + TransactionDesc + + Open for %n more block(s) + Открыто для ещё %n блокаОткрыто для ещё %n блоковОткрыто для ещё %n блоковОткрыто для ещё %n блоков + + + Open until %1 + Открыто до %1 + + + conflicted with a transaction with %1 confirmations + конфликт с транзакцией с %1 подтверждений + + + %1/offline + %1/отключен + + + 0/unconfirmed, %1 + 0/не подтверждено, %1 + + + in memory pool + В памяти + + + not in memory pool + Не в памяти + + + abandoned + заброшено + + + %1/unconfirmed + %1/не подтверждено + + + %1 confirmations + %1 подтверждений + + + Status + Статус + + + , has not been successfully broadcast yet + , ещё не было успешно разослано + + + , broadcast through %n node(s) + , разослано через %n узел, разослано через %n узла, разослано через %n узлов, разослано через %n узлов + + + Date + Дата + + + Source + Источник + + + Generated + Сгенерированно + + + From + От + + + unknown + неизвестно + + + To + Для + + + own address + свой адрес + + + watch-only + только наблюдение + + + label + метка + + + Credit + Кредит + + + matures in %n more block(s) + будет доступно через %n блокбудет доступно через %n блокабудет доступно через %n блоковбудет доступно через %n блоков + + + not accepted + не принято + + + Debit + Дебет + + + Total debit + Всего дебет + + + Total credit + Всего кредит + + + Transaction fee + Комиссия + + + Net amount + Чистая сумма + + + Message + Сообщение + + + Comment + Комментарий + + + Transaction ID + ID транзакции + + + Output index + Номер выхода + + + Merchant + Продавец + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Сгенерированные монеты должны подождать %1 блоков, прежде чем они могут быть потрачены. Когда вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если он не попадёт в цепь, его статус изменится на "не принят", и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас. + + + Debug information + Отладочная информация + + + Transaction + Транзакция + + + Inputs + Входы + + + Amount + Сумма + + + true + истина + + + false + ложь + + + TransactionDescDialog This pane shows a detailed description of the transaction Эта панель отображает детальное описание транзакции. + + Details for %1 + Подробности %1 + + + + TransactionTableModel + + Date + Дата + + + Type + Тип + + + Label + Метка + + + Open for %n more block(s) + Открыто для ещё %n блокаОткрыто для ещё %n блоковОткрыто для ещё %n блоковОткрыто для ещё %n блоков + + + Open until %1 + Открыто до %1 + + + Offline + Отключен + + + Unconfirmed + Не подтверждено + + + Abandoned + Заброшено + + + Confirmed (%1 confirmations) + Подтверждено (%1 подтверждений) + + + Conflicted + В противоречии + + + Immature (%1 confirmations, will be available after %2) + Незрелый (%1 подтверждений, будет доступно после %2) + + + This block was not received by any other nodes and will probably not be accepted! + Этот блок не был получен другими узлами и, возможно, не будет принят! + + + Generated but not accepted + Сгенерировано, но не принято + + + Received with + Получено на + + + Received from + Получено от + + + Sent to + Отправлено на + + + Payment to yourself + Отправлено себе + + + Mined + Добыто + + + watch-only + только наблюдение + + + (n/a) + (недоступно) + + + (no label) + (нет метки) + + + Transaction status. Hover over this field to show number of confirmations. + Статус транзакции. Подведите курсор к этому полю, чтобы увидеть количество подтверждений. + + + Date and time that the transaction was received. + Дата и время получения транзакции. + + + Type of transaction. + Тип транзакции. + + + Whether or not a watch-only address is involved in this transaction. + Использовался ли в транзакции адрес для наблюдения. + + + User-defined intent/purpose of the transaction. + Определяемое пользователем намерение/цель транзакции. + + + Amount removed from or added to balance. + Снятая или добавленная к балансу сумма. + + + + TransactionView + + All + Все + + + Today + Сегодня + + + This week + На этой неделе + + + This month + В этом месяце + + + Last month + В прошлом месяце + + + This year + В этом году + + + Range... + Диапазон... + + + Received with + Получено на + + + Sent to + Отправлено на + + + To yourself + Себе + + + Mined + Добыто + + + Other + Другое + + + Enter address or label to search + Введите адрес или метку для поиска + + + Min amount + Мин. сумма + + + Abandon transaction + Отказаться от транзакции + + + Copy address + Копировать адрес + + + Copy label + Копировать метку + + + Copy amount + Копировать сумму + + + Copy transaction ID + Копировать ID транзакции + + + Copy raw transaction + Копировать исходный код транзакции + + + Copy full transaction details + Копировать все подробности транзакции + + + Edit label + Изменить метку + + + Show transaction details + Показать подробности транзакции + + + Export Transaction History + Экспортировать историю транзакций + + + Comma separated file (*.csv) + Текст, разделённый запятыми (*.csv) + + + Confirmed + Подтверждено + + + Watch-only + Для наблюдения + + + Date + Дата + + + Type + Тип + + + Label + Метка + + + Address + Адрес + + + ID + ID + + + Exporting Failed + Экспорт не удался + + + There was an error trying to save the transaction history to %1. + Произошла ошибка при сохранении истории транзакций в %1. + + + Exporting Successful + Экспорт успешно завершён + + + The transaction history was successfully saved to %1. + История транзакций была успешно сохранена в %1. + + + Range: + Диапазон: + + + to + до + UnitDisplayStatusBarControl @@ -1729,6 +2869,55 @@ + WalletFrame + + No wallet has been loaded. + Не был загружен ни один бумажник. + + + + WalletModel + + Send Coins + Отправка + + + + WalletView + + &Export + &Экспорт + + + Export the data in the current tab to a file + Экспортировать данные текущей вкладки в файл + + + Backup Wallet + Резервная копия бумажника + + + Wallet Data (*.dat) + Данные бумажника (*.dat) + + + Backup Failed + Резервное копирование не удалось + + + There was an error trying to save the wallet data to %1. + Произошла ошибка при сохранении данных бумажника в %1. + + + Backup Successful + Резервное копирование успешно завершено + + + The wallet data was successfully saved to %1. + Данные бумажника были успешно сохранены в %1. + + + bitcoin-core Options: @@ -1843,10 +3032,6 @@ Выполнить команду, когда меняется транзакция в бумажнике (%s в команде заменяется на TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Всегда разрешать транзакции, полученные от участников из белого списка (по умолчанию: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Максимально допустимое среднее отклонение времени участников. Локальное представление времени может меняться вперед или назад на это количество. (по умолчанию: %u секунд) @@ -2099,6 +3284,10 @@ Укажите файл бумажника (внутри каталога данных) + Starting network threads... + Запускаем сетевые потоки... + + The source code is available from %s. Исходный код доступен в %s. @@ -2183,6 +3372,10 @@ Комиссии (в %s/Кб) меньшие этого значения считаются нулевыми для создания, ретрансляции, получения транзакции (по умолчанию: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Всегда ретранслировать транзакции, полученные из белого списка участников, даже если они нарушают локальную политику ретрансляции (по умолчанию: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Если paytxfee не задан, включить достаточную комиссию для подтверждения транзакции в среднем за n блоков (по умолчанию: %u) diff --git a/src/qt/locale/bitcoin_ru_RU.ts b/src/qt/locale/bitcoin_ru_RU.ts index 52a0020c51e..db9b2e8c88e 100644 --- a/src/qt/locale/bitcoin_ru_RU.ts +++ b/src/qt/locale/bitcoin_ru_RU.ts @@ -41,14 +41,17 @@ &Delete Удалить - + + + AddressTableModel + AskPassphraseDialog Repeat new passphrase Повторите новый пароль - + BanTableModel @@ -140,12 +143,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole &Information @@ -159,12 +168,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -177,12 +192,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts index 60eeba70253..ee0568ed50d 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/bitcoin_sk.ts @@ -41,7 +41,10 @@ &Delete &Zmazať - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Zopakujte nové heslo - + BanTableModel @@ -463,7 +466,7 @@ Priority Priorita - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Adresa - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Vyberte súbor s výzvou k platbe - + OptionsDialog @@ -938,6 +941,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +998,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1353,7 +1362,7 @@ Remove Odstrániť - + ReceiveRequestDialog @@ -1372,7 +1381,10 @@ &Save Image... Uložiť obrázok... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1523,7 +1535,7 @@ S&end &Odoslať - + SendCoinsEntry @@ -1602,7 +1614,10 @@ Memo: Poznámka: - + + + SendConfirmationDialog + ShutdownWindow @@ -1692,7 +1707,7 @@ Reset all verify message fields Obnoviť všetky polia v overiť správu - + SplashScreen @@ -1708,12 +1723,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Táto časť obrazovky zobrazuje detailný popis transakcie - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1722,6 +1746,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts index 94e2196367c..8c8cf94a963 100644 --- a/src/qt/locale/bitcoin_sl_SI.ts +++ b/src/qt/locale/bitcoin_sl_SI.ts @@ -41,7 +41,10 @@ &Delete I&zbriši - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Ponovite novo geslo - + BanTableModel @@ -447,7 +450,7 @@ Priority Prioriteta - + EditAddressDialog @@ -470,7 +473,7 @@ &Address &Naslov - + FreespaceChecker @@ -586,7 +589,7 @@ Select payment request file Izbiranje datoteke z zahtevkom za plačilo - + OptionsDialog @@ -854,6 +857,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -908,6 +914,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1176,7 +1185,7 @@ Remove Odstrani - + ReceiveRequestDialog @@ -1195,7 +1204,10 @@ &Save Image... &Shrani sliko ... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1346,7 +1358,7 @@ S&end &Pošlji - + SendCoinsEntry @@ -1425,7 +1437,10 @@ Memo: Opomba: - + + + SendConfirmationDialog + ShutdownWindow @@ -1519,7 +1534,7 @@ Reset all verify message fields Počisti vsa polja za vnos v oknu za preverjanje - + SplashScreen @@ -1535,12 +1550,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction V tem podoknu so prikazane podrobnosti o transakciji - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1549,6 +1573,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts index 6c86b7d9fcd..5a1f4d64ac2 100644 --- a/src/qt/locale/bitcoin_sq.ts +++ b/src/qt/locale/bitcoin_sq.ts @@ -33,7 +33,10 @@ &Delete &Fshi - + + + AddressTableModel + AskPassphraseDialog @@ -48,7 +51,7 @@ Repeat new passphrase Përsërisni frazkalimin e ri - + BanTableModel @@ -200,7 +203,7 @@ &Address &Adresa - + FreespaceChecker @@ -248,6 +251,9 @@ + PaymentServer + + PeerTableModel @@ -258,6 +264,9 @@ + QRImageWidget + + RPCConsole &Information @@ -303,6 +312,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -361,6 +373,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -389,16 +404,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ky panel tregon një përshkrim të detajuar të transaksionit - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts index 729bd08b39d..c43e9124776 100644 --- a/src/qt/locale/bitcoin_sr.ts +++ b/src/qt/locale/bitcoin_sr.ts @@ -37,7 +37,10 @@ &Delete &Избриши - + + + AddressTableModel + AskPassphraseDialog @@ -52,7 +55,7 @@ Repeat new passphrase Поновите нову лозинку - + BanTableModel @@ -200,7 +203,7 @@ &Address &Адреса - + FreespaceChecker @@ -248,6 +251,9 @@ + PaymentServer + + PeerTableModel @@ -258,6 +264,9 @@ + QRImageWidget + + RPCConsole @@ -283,6 +292,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -300,7 +312,7 @@ S&end &Пошаљи - + SendCoinsEntry @@ -325,6 +337,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -349,16 +364,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ovaj odeljak pokazuje detaljan opis transakcije - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_sr@latin.ts b/src/qt/locale/bitcoin_sr@latin.ts index 229618e3437..933e2ad35e2 100644 --- a/src/qt/locale/bitcoin_sr@latin.ts +++ b/src/qt/locale/bitcoin_sr@latin.ts @@ -41,7 +41,10 @@ &Delete &Izbrisati - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,55 @@ Repeat new passphrase Ponovo unesite pristupnu frazu - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Unesite novu pristupnu frazu u novčanik. <br/>Molimo, koristite pristupnu frazu koja ima <b> deset ili više nasumičnih znakova</b>, ili <b>osam ili više reči</b>. + + + Encrypt wallet + Šifrujte novčanik + + + This operation needs your wallet passphrase to unlock the wallet. + Da biste otključali novčanik potrebno je da unesete svoju pristupnu frazu. + + + Unlock wallet + Otključajte novčanik + + + This operation needs your wallet passphrase to decrypt the wallet. + Da biste dešifrovali novčanik, potrebno je da unesete svoju pristupnu frazu. + + + Decrypt wallet + Dešifrujte novčanik + + + Change passphrase + Promenite pristupnu frazu + + + Enter the old passphrase and new passphrase to the wallet. + Unesite u novčanik staru pristupnu frazu i novu pristupnu frazu. + + + Confirm wallet encryption + Potvrdite šifrovanje novčanika + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Upozorenje: Ako šifrujete svoj novčanik, i potom izgubite svoju pristupnu frazu <b>IZGUBIĆETE SVE SVOJE BITKOINE</b>! + + + Are you sure you wish to encrypt your wallet? + Da li ste sigurni da želite da šifrujete svoj novčanik? + + + Wallet encrypted + Novčanik je šifrovan + + BanTableModel @@ -227,7 +278,7 @@ Priority Prioritet - + EditAddressDialog @@ -242,7 +293,7 @@ &Address &Adresa - + FreespaceChecker @@ -266,6 +317,9 @@ OverviewPage + PaymentServer + + PeerTableModel @@ -276,6 +330,9 @@ + QRImageWidget + + RPCConsole @@ -285,6 +342,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Quantity: @@ -311,6 +371,9 @@ SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -323,12 +386,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index bcee9768f69..5b122f76c25 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -41,7 +41,42 @@ &Delete &Radera - + + Choose the address to send coins to + Välj en adress att sända betalning till + + + Choose the address to receive coins with + Välj en adress att ta emot betalning till + + + C&hoose + V&älj + + + Sending addresses + Avsändaradresser + + + Receiving addresses + Mottagaradresser + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Detta är dina Bitcoin adresser för att skicka betalningar. Kolla alltid summan och den mottagande adressen innan du skickar Bitcoins. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Detta är dina Bitcoin adresser för att ta emot betalningar. Det rekommenderas att använda en ny mottagningsadress för varje transaktion. + + + &Copy Address + &Kopiera adress + + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +95,7 @@ Repeat new passphrase Upprepa nytt lösenord - + BanTableModel @@ -463,7 +498,7 @@ Priority Prioritet - + EditAddressDialog @@ -486,7 +521,7 @@ &Address &Adress - + FreespaceChecker @@ -626,7 +661,7 @@ Select payment request file Välj betalningsbegäransfil - + OptionsDialog @@ -938,6 +973,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +1030,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1393,7 @@ Remove Ta bort - + ReceiveRequestDialog @@ -1371,7 +1412,10 @@ &Save Image... &Spara Bild... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1522,7 +1566,7 @@ S&end &Skicka - + SendCoinsEntry @@ -1601,7 +1645,10 @@ Memo: PM: - + + + SendConfirmationDialog + ShutdownWindow @@ -1699,7 +1746,7 @@ Reset all verify message fields Rensa alla fält - + SplashScreen @@ -1715,12 +1762,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Den här panelen visar en detaljerad beskrivning av transaktionen - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1729,6 +1785,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1843,10 +1908,6 @@ Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Vidarebefodra alltid transaktioner från vitlistade noder även om de bryter mot lokala reläpolicyn (förvalt: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Maximalt tillåten median-peer tidsoffset justering. Lokalt perspektiv av tiden kan bli påverkad av partners, framåt eller bakåt denna tidsrymd. (förvalt: %u sekunder) diff --git a/src/qt/locale/bitcoin_ta.ts b/src/qt/locale/bitcoin_ta.ts index 921171c5449..699ded2c67c 100644 --- a/src/qt/locale/bitcoin_ta.ts +++ b/src/qt/locale/bitcoin_ta.ts @@ -25,7 +25,10 @@ &Delete &அழி - + + + AddressTableModel + AskPassphraseDialog @@ -205,7 +208,7 @@ Priority முன்னுரிமை - + EditAddressDialog @@ -332,6 +335,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -370,6 +376,9 @@ + QRImageWidget + + RPCConsole N/A @@ -530,7 +539,7 @@ Remove நீக்கு - + ReceiveRequestDialog @@ -549,7 +558,10 @@ &Save Image... &படத்தை சேமி... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -600,7 +612,7 @@ S&end &அனுப்பு - + SendCoinsEntry @@ -625,6 +637,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -653,12 +668,30 @@ + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Bitcoin Core diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts index 34c75263416..9c4a2679861 100644 --- a/src/qt/locale/bitcoin_th_TH.ts +++ b/src/qt/locale/bitcoin_th_TH.ts @@ -41,7 +41,10 @@ &Delete &ลบ - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase กรุณากรอกรหัสผ่านใหม่อีกครั้งหนึ่ง - + BanTableModel @@ -463,7 +466,7 @@ Priority ระดับความสำคัญ - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &ที่เก็บ - + FreespaceChecker @@ -622,7 +625,7 @@ Select payment request file เลือก ไฟล์การเรียกการชำระเงิน - + OptionsDialog @@ -798,6 +801,9 @@ + PaymentServer + + PeerTableModel @@ -808,6 +814,9 @@ + QRImageWidget + + RPCConsole @@ -821,6 +830,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Send Coins @@ -867,6 +879,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -883,12 +898,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index 8e9ec36b029..7a4b95a2282 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -41,7 +41,10 @@ &Delete &Sil - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Yeni parolayı tekrarlayınız - + BanTableModel @@ -463,7 +466,7 @@ Priority Öncelik - + EditAddressDialog @@ -486,7 +489,7 @@ &Address &Adres - + FreespaceChecker @@ -626,7 +629,7 @@ Select payment request file Ödeme talebi dosyasını seç - + OptionsDialog @@ -938,6 +941,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -992,6 +998,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1352,7 +1361,7 @@ Remove Kaldır - + ReceiveRequestDialog @@ -1371,7 +1380,10 @@ &Save Image... Resmi ka&ydet... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1522,7 +1534,7 @@ S&end G&önder - + SendCoinsEntry @@ -1601,7 +1613,10 @@ Memo: Not: - + + + SendConfirmationDialog + ShutdownWindow @@ -1699,7 +1714,7 @@ Reset all verify message fields Tüm mesaj kontrolü alanlarını sıfırla - + SplashScreen @@ -1715,12 +1730,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Bu pano muamelenin ayrıntılı açıklamasını gösterir - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1729,6 +1753,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1847,10 +1880,6 @@ Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s muamele kimliği ile değiştirilecektir) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - Yerel aktarma politikasını ihlal ettiklerinde bile beyaz listedeki eşlerden gelen muamelelerin aktarılmasını zorla (varsayılan: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) Müsaade edilen azami medyan eş zamanı değişiklik sınırının ayarlaması. Zamanın yerel perspektifi bu miktar kadar ileri ya da geri eşler tarafından etkilenebilir. (Varsayılan %u saniye) diff --git a/src/qt/locale/bitcoin_tr_TR.ts b/src/qt/locale/bitcoin_tr_TR.ts index 344309c25fd..bc99091fbf7 100644 --- a/src/qt/locale/bitcoin_tr_TR.ts +++ b/src/qt/locale/bitcoin_tr_TR.ts @@ -41,7 +41,10 @@ &Delete &Sil - + + + AddressTableModel + AskPassphraseDialog @@ -68,7 +71,7 @@ &Address Adres - + FreespaceChecker @@ -88,12 +91,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -107,12 +116,18 @@ + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -125,12 +140,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts index bdfe3f57e35..09c167dfc78 100644 --- a/src/qt/locale/bitcoin_uk.ts +++ b/src/qt/locale/bitcoin_uk.ts @@ -41,7 +41,10 @@ &Delete &Видалити - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Повторіть пароль - + BanTableModel @@ -439,7 +442,7 @@ Priority Пріоритет - + EditAddressDialog @@ -462,7 +465,7 @@ &Address &Адреса - + FreespaceChecker @@ -582,7 +585,7 @@ Select payment request file Виберіть файл запиту платежу - + OptionsDialog @@ -874,6 +877,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -928,6 +934,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1268,7 +1277,7 @@ Remove Вилучити - + ReceiveRequestDialog @@ -1287,7 +1296,10 @@ &Save Image... &Зберегти зображення... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1438,7 +1450,7 @@ S&end &Відправити - + SendCoinsEntry @@ -1517,7 +1529,10 @@ Memo: Нотатка: - + + + SendConfirmationDialog + ShutdownWindow @@ -1611,7 +1626,7 @@ Reset all verify message fields Скинути всі поля перевірки повідомлення - + SplashScreen @@ -1627,12 +1642,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Даний діалог показує детальну статистику по вибраній транзакції - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1641,6 +1665,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts index 6b43bf63e51..60311ac41e1 100644 --- a/src/qt/locale/bitcoin_ur_PK.ts +++ b/src/qt/locale/bitcoin_ur_PK.ts @@ -41,7 +41,10 @@ &Delete مٹا - + + + AddressTableModel + AskPassphraseDialog @@ -56,7 +59,7 @@ Repeat new passphrase نیا پاس فریز دہرائیں - + BanTableModel @@ -92,7 +95,7 @@ &Address پتہ - + FreespaceChecker @@ -116,6 +119,9 @@ OverviewPage + PaymentServer + + PeerTableModel @@ -126,6 +132,9 @@ + QRImageWidget + + RPCConsole @@ -139,6 +148,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Insufficient funds! @@ -157,6 +169,9 @@ SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -169,12 +184,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Insufficient funds diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts index 0062abfc1d4..2503ed4a10a 100644 --- a/src/qt/locale/bitcoin_uz@Cyrl.ts +++ b/src/qt/locale/bitcoin_uz@Cyrl.ts @@ -41,7 +41,10 @@ &Delete &Ўчириш - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Янги махфий сузни такрорланг - + BanTableModel @@ -381,7 +384,7 @@ Priority Муҳимлиги - + EditAddressDialog @@ -404,7 +407,7 @@ &Address &Манзил - + FreespaceChecker @@ -492,7 +495,7 @@ Select payment request file Тўлов сўрови файлини танлаш - + OptionsDialog @@ -684,6 +687,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -726,6 +732,9 @@ + QRImageWidget + + RPCConsole N/A @@ -962,7 +971,7 @@ Remove Ўчириш - + ReceiveRequestDialog @@ -977,7 +986,10 @@ &Save Image... Расмни &сақлаш - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1088,7 +1100,7 @@ S&end Жў&натиш - + SendCoinsEntry @@ -1133,6 +1145,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -1173,16 +1188,34 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction Ушбу ойна операциянинг батафсил таърифини кўрсатади - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts index e8bf01ab1b7..46bf75f5838 100644 --- a/src/qt/locale/bitcoin_vi.ts +++ b/src/qt/locale/bitcoin_vi.ts @@ -21,7 +21,10 @@ &Delete &Xóa - + + + AddressTableModel + AskPassphraseDialog @@ -52,7 +55,7 @@ &Address Địa chỉ - + FreespaceChecker @@ -72,6 +75,9 @@ OverviewPage + PaymentServer + + PeerTableModel @@ -82,6 +88,9 @@ + QRImageWidget + + RPCConsole @@ -95,6 +104,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Amount: @@ -105,6 +117,9 @@ SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -117,12 +132,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts index e5f955eb422..5774f5b9b38 100644 --- a/src/qt/locale/bitcoin_vi_VN.ts +++ b/src/qt/locale/bitcoin_vi_VN.ts @@ -41,7 +41,10 @@ &Delete &Xó&a - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase Điền lại passphrase - + BanTableModel @@ -415,7 +418,7 @@ Priority Tầm quan trọng - + EditAddressDialog @@ -430,7 +433,7 @@ &Address Địa chỉ - + FreespaceChecker @@ -598,6 +601,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -612,6 +618,9 @@ + QRImageWidget + + RPCConsole &Information @@ -653,6 +662,9 @@ + RecentRequestsTableModel + + SendCoinsDialog Insufficient funds! @@ -695,6 +707,9 @@ + SendConfirmationDialog + + ShutdownWindow @@ -707,12 +722,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: diff --git a/src/qt/locale/bitcoin_zh.ts b/src/qt/locale/bitcoin_zh.ts index bceba9dfdd8..61b95f4b6c6 100644 --- a/src/qt/locale/bitcoin_zh.ts +++ b/src/qt/locale/bitcoin_zh.ts @@ -3,6 +3,9 @@ AddressBookPage + AddressTableModel + + AskPassphraseDialog @@ -52,12 +55,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -67,6 +76,9 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog Insufficient funds! @@ -81,6 +93,9 @@ SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -93,12 +108,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Transaction amounts must be positive diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index b8296649b6b..b8d3cadc2fb 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -41,7 +41,10 @@ &Delete 删除(&D) - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase 重复新密码 - + BanTableModel @@ -459,7 +462,7 @@ Priority 优先级 - + EditAddressDialog @@ -482,7 +485,7 @@ &Address 地址(&A) - + FreespaceChecker @@ -619,7 +622,7 @@ Select payment request file 选择付款请求文件 - + OptionsDialog @@ -911,6 +914,9 @@ + PaymentServer + + PeerTableModel User Agent @@ -965,6 +971,9 @@ + QRImageWidget + + RPCConsole N/A @@ -1301,7 +1310,7 @@ Remove 移除 - + ReceiveRequestDialog @@ -1320,7 +1329,10 @@ &Save Image... 保存图片(&S)... - + + + RecentRequestsTableModel + SendCoinsDialog @@ -1471,7 +1483,7 @@ S&end 发送(&E) - + SendCoinsEntry @@ -1550,7 +1562,10 @@ Memo: 便条: - + + + SendConfirmationDialog + ShutdownWindow @@ -1644,7 +1659,7 @@ Reset all verify message fields 清空所有验证消息栏 - + SplashScreen @@ -1660,12 +1675,21 @@ + TransactionDesc + + TransactionDescDialog This pane shows a detailed description of the transaction 当前面板显示了交易的详细信息 - + + + TransactionTableModel + + + TransactionView + UnitDisplayStatusBarControl @@ -1674,6 +1698,15 @@ + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core Options: @@ -1777,10 +1810,6 @@ 当最佳区块变化时执行命令 (命令行中的 %s 会被替换成区块哈希值) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - 强制关联来自白名单同行的交易即使他们违反本地关联政策(默认: %d) - - Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) 设置脚本验证的程序 (%u 到 %d, 0 = 自动, <0 = 保留自由的核心, 默认值: %d) diff --git a/src/qt/locale/bitcoin_zh_HK.ts b/src/qt/locale/bitcoin_zh_HK.ts index aa014db0bd0..ecc00f3a278 100644 --- a/src/qt/locale/bitcoin_zh_HK.ts +++ b/src/qt/locale/bitcoin_zh_HK.ts @@ -41,7 +41,10 @@ &Delete 刪除 &D - + + + AddressTableModel + AskPassphraseDialog @@ -60,7 +63,7 @@ Repeat new passphrase 重複新密碼 - + BanTableModel @@ -224,12 +227,18 @@ OverviewPage + PaymentServer + + PeerTableModel QObject + QRImageWidget + + RPCConsole @@ -239,12 +248,18 @@ ReceiveRequestDialog + RecentRequestsTableModel + + SendCoinsDialog SendCoinsEntry + SendConfirmationDialog + + ShutdownWindow @@ -257,12 +272,30 @@ TrafficGraphWidget + TransactionDesc + + TransactionDescDialog + TransactionTableModel + + + TransactionView + + UnitDisplayStatusBarControl + WalletFrame + + + WalletModel + + + WalletView + + bitcoin-core \ No newline at end of file diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index efea3da9e3f..4b1e81e9659 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -41,6 +41,77 @@ &Delete 刪掉 + + Choose the address to send coins to + 選擇要付錢過去的位址 + + + Choose the address to receive coins with + 選擇要收錢進來的位址 + + + C&hoose + 選取 + + + Sending addresses + 付款位址 + + + Receiving addresses + 收款位址 + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + 這些是你要付款過去的 Bitcoin 位址。在付錢之前,務必要檢查金額和收款位址是否正確。 + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + 這些是你用來收款的 Bitcoin 位址。建議在每次交易時,都使用一個新的收款位址。 + + + &Copy Address + 複製位址 + + + Copy &Label + 複製標記 + + + &Edit + 編輯 + + + Export Address List + 匯出位址清單 + + + Comma separated file (*.csv) + 逗點分隔資料檔(*.csv) + + + Exporting Failed + 匯出失敗 + + + There was an error trying to save the address list to %1. Please try again. + 儲存位址列表到 %1 時發生錯誤。請重試一次。 + + + + AddressTableModel + + Label + 標記 + + + Address + 位址 + + + (no label) + (無標記) + AskPassphraseDialog @@ -60,6 +131,94 @@ Repeat new passphrase 重複新密碼 + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + 輸入錢包的新密碼。<br/>密碼請用<b>10 個以上的隨機字元</b>,或是<b>8 個以上的字詞</b>。 + + + Encrypt wallet + 加密錢包 + + + This operation needs your wallet passphrase to unlock the wallet. + 這個動作需要你的錢包密碼來解鎖錢包。 + + + Unlock wallet + 解鎖錢包 + + + This operation needs your wallet passphrase to decrypt the wallet. + 這個動作需要你的錢包密碼來把錢包解密。 + + + Decrypt wallet + 解密錢包 + + + Change passphrase + 改變密碼 + + + Enter the old passphrase and new passphrase to the wallet. + 請輸入錢包的舊密碼和新密碼。 + + + Confirm wallet encryption + 確認錢包加密 + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + 警告: 如果把錢包加密後又忘記密碼,你就會從此<b>失去其中所有的 Bitcoin 了</b>! + + + Are you sure you wish to encrypt your wallet? + 你確定要把錢包加密嗎? + + + Wallet encrypted + 錢包已加密 + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 現在要關閉,好完成加密程序。請注意,加密錢包不能完全防止入侵你的電腦的惡意程式偷取錢幣。 + + + 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. + 重要: 請改用新產生有加密的錢包檔,來取代舊錢包檔的備份。為了安全性的理由,當你開始使用新的有加密的錢包後,舊錢包檔的備份就不能再使用了。 + + + Wallet encryption failed + 錢包加密失敗 + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + 因為內部錯誤導致錢包加密失敗。你的錢包還是沒加密。 + + + The supplied passphrases do not match. + 提供的密碼不一樣。 + + + Wallet unlock failed + 錢包解鎖失敗 + + + The passphrase entered for the wallet decryption was incorrect. + 輸入要用來解密錢包的密碼不對。 + + + Wallet decryption failed + 錢包解密失敗 + + + Wallet passphrase was successfully changed. + 錢包密碼改成功了。 + + + Warning: The Caps Lock key is on! + 警告: 大寫字母鎖定作用中! + BanTableModel @@ -463,6 +622,150 @@ Priority 優先度 + + Copy address + 複製位址 + + + Copy label + 複製標記 + + + Copy amount + 複製金額 + + + Copy transaction ID + 複製交易識別碼 + + + Lock unspent + 鎖定不用 + + + Unlock unspent + 解鎖可用 + + + Copy quantity + 複製數目 + + + Copy fee + 複製手續費 + + + Copy after fee + 複製計費後金額 + + + Copy bytes + 複製位元組數 + + + Copy priority + 複製優先度 + + + Copy dust + 複製零散金額 + + + Copy change + 複製找零金額 + + + highest + 最高 + + + higher + 很高 + + + high + + + + medium-high + 中高 + + + medium + 中等 + + + low-medium + 中低 + + + low + + + + lower + 很低 + + + lowest + 最低 + + + (%1 locked) + (鎖定 %1 枚) + + + none + + + + yes + + + + no + + + + This label turns red if the transaction size is greater than 1000 bytes. + 當交易大小大於 1000 位元組時,文字會變紅色。 + + + This means a fee of at least %1 per kB is required. + 表示每一千位元組(kB)需要至少 %1 的手續費。 + + + Can vary +/- 1 byte per input. + 每組輸入可能會誤差多或少 1 個位元組。 + + + Transactions with higher priority are more likely to get included into a block. + 優先度較高的交易比較有可能被接受放進區塊中。 + + + This label turns red if the priority is smaller than "medium". + 當優先度低於「中等」時,文字會變紅色。 + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + 當任何一個收款金額小於目前的零散金額上限時,文字會變紅色。 + + + Can vary +/- %1 satoshi(s) per input. + 每組輸入可能有 +/- %1 個 satoshi 的誤差。 + + + (no label) + (無標記) + + + change from %1 (%2) + 找零前是 %1 (%2) + + + (change) + (找零) + EditAddressDialog @@ -486,6 +789,38 @@ &Address 位址 + + New receiving address + 造新的收款位址 + + + New sending address + 造新的付款位址 + + + Edit receiving address + 編輯收款位址 + + + Edit sending address + 編輯付款位址 + + + The entered address "%1" is not a valid Bitcoin address. + 輸入的位址 %1 並不是有效的 Bitcoin 位址。 + + + The entered address "%1" is already in the address book. + 輸入的位址 %1 在位址簿中已經有了。 + + + Could not unlock wallet. + 沒辦法把錢包解鎖。 + + + New key generation failed. + 產生新的密鑰失敗了。 + FreespaceChecker @@ -626,6 +961,10 @@ Select payment request file 選擇付款要求資料檔 + + Select payment request file to open + 選擇要開啟的付款要求資料檔 + OptionsDialog @@ -938,6 +1277,97 @@ + PaymentServer + + Payment request error + 要求付款時發生錯誤 + + + Cannot start bitcoin: click-to-pay handler + 沒辦法啟動 bitcoin 協議的「按就付」處理器 + + + URI handling + URI 處理 + + + Payment request fetch URL is invalid: %1 + 取得付款要求的 URL 無效: %1 + + + Invalid payment address %1 + 無效的付款位址 %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + 沒辦法解析 URI 位址!可能是因為 Bitcoin 位址無效,或是 URI 參數格式錯誤。 + + + Payment request file handling + 處理付款要求檔案 + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + 沒辦法讀取付款要求檔案!可能是無效的檔案造成的。 + + + Payment request rejected + 付款的要求被拒絕了 + + + Payment request network doesn't match client network. + 付款要求的網路類型跟客戶端不符。 + + + Payment request expired. + 付款的要求過期了。 + + + Payment request is not initialized. + 付款的要求沒有完成初始化。 + + + Unverified payment requests to custom payment scripts are unsupported. + 不支援含有自訂付款指令碼,且沒驗證過的付款要求。 + + + Invalid payment request. + 付款的要求無效。 + + + Requested payment amount of %1 is too small (considered dust). + 要求付款的金額 %1 太少(會被網路認為是沒必要的零散錢)。 + + + Refund from %1 + 來自 %1 的退款 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + 付款要求 %1 過大 (%2 位元組, 上限 %3 位元組). + + + Error communicating with %1: %2 + 跟 %1 通訊時發生錯誤: %2 + + + Payment request cannot be parsed! + 沒辦法解析付款要求內容! + + + Bad response from server %1 + 伺服器 %1 的回應有誤 + + + Network request error + 發出要求時發生網路錯誤 + + + Payment acknowledged + 付款已確認 + + + PeerTableModel User Agent @@ -992,6 +1422,25 @@ + QRImageWidget + + &Save Image... + 儲存圖片... + + + &Copy Image + 複製圖片 + + + Save QR Code + 儲存 QR Code + + + PNG Image (*.png) + PNG 圖檔(*.png) + + + RPCConsole N/A @@ -1352,6 +1801,18 @@ Remove 刪掉 + + Copy label + 複製標記 + + + Copy message + 複製訊息 + + + Copy amount + 複製金額 + ReceiveRequestDialog @@ -1371,27 +1832,94 @@ &Save Image... 儲存圖片... - - - SendCoinsDialog - Send Coins - 付款 + Request payment to %1 + 付款給 %1 的要求 - Coin Control Features - 錢幣控制功能 + Payment information + 付款資訊 - Inputs... - 輸入... + URI + URI - automatically selected - 自動選擇 + Address + 位址 - Insufficient funds! + Amount + 金額 + + + Label + 標記: + + + Message + 訊息 + + + Resulting URI too long, try to reduce the text for label / message. + 產生的 URI 過長,請試著縮短標記或訊息的文字內容。 + + + Error encoding URI into QR Code. + 把 URI 編碼成 QR Code 時發生錯誤。 + + + + RecentRequestsTableModel + + Date + 日期 + + + Label + 標記: + + + Message + 訊息 + + + (no label) + (無標記) + + + (no message) + (無訊息) + + + (no amount requested) + (無要求金額) + + + Requested + 要求金額 + + + + SendCoinsDialog + + Send Coins + 付款 + + + Coin Control Features + 錢幣控制功能 + + + Inputs... + 輸入... + + + automatically selected + 自動選擇 + + + Insufficient funds! 累計金額不足! @@ -1522,6 +2050,114 @@ S&end 付款 + + Copy quantity + 複製數目 + + + Copy amount + 複製金額 + + + Copy fee + 複製手續費 + + + Copy after fee + 複製計費後金額 + + + Copy bytes + 複製位元組數 + + + Copy priority + 複製優先度 + + + Copy dust + 複製零散金額 + + + Copy change + 複製找零金額 + + + %1 to %2 + %1 給 %2 + + + Are you sure you want to send? + 你確定要付錢出去嗎? + + + added as transaction fee + 加做交易手續費 + + + Total Amount %1 + 總金額 %1 + + + or + + + + Confirm send coins + 確認付款金額 + + + The recipient address is not valid. Please recheck. + 收款位址無效。請再檢查看看。 + + + The amount to pay must be larger than 0. + 付款金額必須大於零。 + + + The amount exceeds your balance. + 金額超過餘額了。 + + + The total exceeds your balance when the %1 transaction fee is included. + 包含 %1 的交易手續費後,總金額超過你的餘額了。 + + + Duplicate address found: addresses should only be used once each. + 發現有重複的位址: 每個位址只能出現一次。 + + + Transaction creation failed! + 製造交易失敗了! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + 交易被拒絕了!有時候會發生這種錯誤,是因為你錢包中的一些錢已經被花掉了。比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢,你現在所用的原來的錢包中,卻沒有那筆錢已經花掉的紀錄。 + + + A fee higher than %1 is considered an absurdly high fee. + 高於 %1 的手續費會被認為是不合理。 + + + Payment request expired. + 付款的要求過期了。 + + + Pay only the required fee of %1 + 只付必要的手續費 %1 + + + Warning: Invalid Bitcoin address + 警告: Bitcoin 位址無效 + + + Warning: Unknown change address + 警告: 不明的找零位址 + + + (no label) + (無標記) + SendCoinsEntry @@ -1601,6 +2237,17 @@ Memo: 備註: + + Enter a label for this address to add it to your address book + 請輸入這個位址的標記來把它加進位址簿中 + + + + SendConfirmationDialog + + Yes + + ShutdownWindow @@ -1699,6 +2346,58 @@ Reset all verify message fields 重設所有訊息驗證欄位 + + Click "Sign Message" to generate signature + 請按一下「簽署訊息」來產生簽章 + + + The entered address is invalid. + 輸入的位址無效。 + + + Please check the address and try again. + 請檢查位址是否正確後再試一次。 + + + The entered address does not refer to a key. + 輸入的位址沒有對應到你的任何密鑰。 + + + Wallet unlock was cancelled. + 錢包解鎖已取消。 + + + Private key for the entered address is not available. + 沒有對應輸入位址的密鑰。 + + + Message signing failed. + 訊息簽署失敗。 + + + Message signed. + 訊息簽署好了。 + + + The signature could not be decoded. + 沒辦法把這個簽章解碼。 + + + Please check the signature and try again. + 請檢查簽章是否正確後再試一次。 + + + The signature did not match the message digest. + 這個簽章跟訊息的數位摘要不符。 + + + Message verification failed. + 訊息驗證失敗。 + + + Message verified. + 訊息驗證沒錯。 + SplashScreen @@ -1715,11 +2414,456 @@ + TransactionDesc + + Open for %n more block(s) + 到下 %n 個區塊生出來前可修改 + + + Open until %1 + 到 %1 前可修改 + + + conflicted with a transaction with %1 confirmations + 跟一個目前確認 %1 次的交易互相衝突 + + + %1/offline + %1 次/離線中 + + + 0/unconfirmed, %1 + 0 次/未確認,%1 + + + in memory pool + 在記憶池中 + + + not in memory pool + 不在記憶池中 + + + abandoned + 已中止 + + + %1/unconfirmed + %1 次/未確認 + + + %1 confirmations + 確認 %1 次 + + + Status + 狀態 + + + , has not been successfully broadcast yet + ,還沒成功公告出去 + + + , broadcast through %n node(s) + ,已公告給 %n 個節點 + + + Date + 日期 + + + Source + 來源 + + + Generated + 生產出來 + + + From + 來源 + + + unknown + 未知 + + + To + 目的 + + + own address + 自己的位址 + + + watch-only + 只能看 + + + label + 標記 + + + Credit + 入帳 + + + matures in %n more block(s) + 再等 %n 個區塊生出來後成熟 + + + not accepted + 不被接受 + + + Debit + 出帳 + + + Total debit + 出帳總額 + + + Total credit + 入帳總額 + + + Transaction fee + 交易手續費 + + + Net amount + 淨額 + + + Message + 訊息 + + + Comment + 附註 + + + Transaction ID + 交易識別碼 + + + Output index + 輸出索引 + + + Merchant + 商家 + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + 生產出來的錢要再等 %1 個區塊生出來後才成熟可以用。當區塊生產出來時會公布到網路上,來被加進區塊鏈。如果加失敗了,狀態就會變成「不被接受」,而且不能夠花。如果在你生產出區塊的幾秒鐘內,也有其他節點生產出來的話,就有可能會發生這種情形。 + + + Debug information + 除錯資訊 + + + Transaction + 交易 + + + Inputs + 輸入 + + + Amount + 金額 + + + true + + + + false + + + + TransactionDescDialog This pane shows a detailed description of the transaction 這個版面顯示這次交易的詳細說明 + + Details for %1 + 交易 %1 的明細 + + + + TransactionTableModel + + Date + 日期 + + + Type + 種類 + + + Label + 標記: + + + Open for %n more block(s) + 到下 %n 個區塊生出來前可修改 + + + Open until %1 + 到 %1 前可修改 + + + Offline + 離線中 + + + Unconfirmed + 未確認 + + + Abandoned + 已中止 + + + Confirming (%1 of %2 recommended confirmations) + 確認中(已經 %1 次,建議至少 %2 次) + + + Confirmed (%1 confirmations) + 已確認(%1 次) + + + Conflicted + 有衝突 + + + Immature (%1 confirmations, will be available after %2) + 未成熟(確認 %1 次,會在 %2 次後可用) + + + This block was not received by any other nodes and will probably not be accepted! + 沒有其他節點收到這個區塊,也許它不會被接受! + + + Generated but not accepted + 生產出來但是不被接受 + + + Received with + 收款 + + + Received from + 收款自 + + + Sent to + 付款 + + + Payment to yourself + 付給自己 + + + Mined + 開採所得 + + + watch-only + 只能看 + + + (n/a) + (不適用) + + + (no label) + (無標記) + + + Transaction status. Hover over this field to show number of confirmations. + 交易狀態。把游標停在欄位上會顯示確認次數。 + + + Date and time that the transaction was received. + 收到交易的日期和時間。 + + + Type of transaction. + 交易的種類。 + + + Whether or not a watch-only address is involved in this transaction. + 不論如何有一個只能觀看的地只有參與這次的交易 + + + User-defined intent/purpose of the transaction. + 使用者定義的交易動機或理由。 + + + Amount removed from or added to balance. + 要減掉或加進餘額的金額。 + + + + TransactionView + + All + 全部 + + + Today + 今天 + + + This week + 這星期 + + + This month + 這個月 + + + Last month + 上個月 + + + This year + 今年 + + + Range... + 指定範圍... + + + Received with + 收款 + + + Sent to + 付款 + + + To yourself + 給自己 + + + Mined + 開採所得 + + + Other + 其它 + + + Enter address or label to search + 請輸入要搜尋的位址或標記 + + + Min amount + 最小金額 + + + Abandon transaction + 中止交易 + + + Copy address + 複製位址 + + + Copy label + 複製標記 + + + Copy amount + 複製金額 + + + Copy transaction ID + 複製交易識別碼 + + + Copy raw transaction + 複製交易原始資料 + + + Copy full transaction details + 複製完整交易明細 + + + Edit label + 編輯標記 + + + Show transaction details + 顯示交易明細 + + + Export Transaction History + 匯出交易記錄 + + + Comma separated file (*.csv) + 逗點分隔資料檔(*.csv) + + + Confirmed + 已確認 + + + Watch-only + 只能觀看的 + + + Date + 日期 + + + Type + 種類 + + + Label + 標記: + + + Address + 位址 + + + ID + 識別碼 + + + Exporting Failed + 匯出失敗 + + + There was an error trying to save the transaction history to %1. + 儲存交易記錄到 %1 時發生錯誤。 + + + Exporting Successful + 匯出成功 + + + The transaction history was successfully saved to %1. + 交易記錄已經成功儲存到 %1 了。 + + + Range: + 範圍: + + + to + + UnitDisplayStatusBarControl @@ -1729,6 +2873,55 @@ + WalletFrame + + No wallet has been loaded. + 沒有載入錢包。 + + + + WalletModel + + Send Coins + 付款 + + + + WalletView + + &Export + 匯出 + + + Export the data in the current tab to a file + 將目前分頁的資料匯出存成檔案 + + + Backup Wallet + 備份錢包 + + + Wallet Data (*.dat) + 錢包資料檔(*.dat) + + + Backup Failed + 備份失敗 + + + There was an error trying to save the wallet data to %1. + 儲存錢包資料到 %1 時發生錯誤。 + + + Backup Successful + 備份成功 + + + The wallet data was successfully saved to %1. + 錢包的資料已經成功儲存到 %1 了。 + + + bitcoin-core Options: @@ -1848,10 +3041,6 @@ 當錢包有交易改變時要執行的指令(指令中的 %s 會被取代成交易識別碼) - Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d) - 強制轉發從白名點節點收到的交易,即使它們違反了本機的轉發準則(預設值: %d) - - Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) 跟其他節點的時間差最高可接受的中位數值。本機所認為的時間可能會被其他節點影響,往前或往後在這個值之內。(預設值: %u 秒) @@ -2093,7 +3282,7 @@ Rewinding blocks... - 倒轉回區塊鏈之前的狀態... + 正在倒轉回區塊鏈之前的狀態... Set database cache size in megabytes (%d to %d, default: %d) @@ -2112,6 +3301,10 @@ 指定錢包檔(會在資料目錄中) + Starting network threads... + 正在啟動網路執行緒... + + The source code is available from %s. 原始碼可以在 %s 取得。 @@ -2196,6 +3389,10 @@ 當處理轉發的交易、挖礦、或製造交易時,如果每千位元組(kB)的手續費比這個值(單位是 %s)低,就視為沒付手續費(預設值: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + 強制轉發從白名點節點收到的交易,即使它們違反了本機的轉發準則(預設值: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) 當沒有設定 paytxfee 時,自動包含可以讓交易能在平均 n 個區塊內開始確認的手續費(預設值: %u) From 8b66659921e6170831f3a043e9a54fa45776aa68 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 17 Oct 2016 13:24:37 +0200 Subject: [PATCH 173/302] Define start and end time for segwit deployment Github-Pull: #8937 Rebased-From: f9c23dea976465c51b9fe2cead81b707678c16bb --- src/chainparams.cpp | 8 ++++---- src/consensus/params.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 7b493ed8a7e..3be2d2ff805 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -92,10 +92,10 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1462060800; // May 1st, 2016 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017 - // Deployment of SegWit (BIP141 and BIP143) + // Deployment of SegWit (BIP141, BIP143, and BIP147) consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1; - consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0; - consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 0; // Never / undefined + consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1479168000; // November 15th, 2016. + consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017. /** * The message start string is designed to be unlikely to occur in normal data. @@ -188,7 +188,7 @@ class CTestNetParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1456790400; // March 1st, 2016 consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017 - // Deployment of SegWit (BIP141 and BIP143) + // Deployment of SegWit (BIP141, BIP143, and BIP147) consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1; consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1462060800; // May 1st 2016 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017 diff --git a/src/consensus/params.h b/src/consensus/params.h index 822ec87d69e..d97017d0c46 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -16,7 +16,7 @@ enum DeploymentPos { DEPLOYMENT_TESTDUMMY, DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113. - DEPLOYMENT_SEGWIT, // Deployment of BIP141 and BIP143 + DEPLOYMENT_SEGWIT, // Deployment of BIP141, BIP143, and BIP147. // NOTE: Also add new deployments to VersionBitsDeploymentInfo in versionbits.cpp MAX_VERSION_BITS_DEPLOYMENTS }; From 7462125724ed3b88de490ab1bc3a4c3bea65fe2d Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 17 Oct 2016 18:44:23 +0200 Subject: [PATCH 174/302] doc: Fill in changelog and authors in release notes --- doc/release-notes.md | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 148 insertions(+), 2 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 4478f872a9e..3007815dd52 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -57,13 +57,159 @@ behavior, not code moves, refactors and string updates. For convenience in locat the code changes and accompanying discussion, both the pull request and git merge commit are mentioned. - ... fill in here +### Consensus +- #8636 `9dfa0c8` Implement NULLDUMMY softfork (BIP147) (jl2012) +- #8848 `7a34a46` Add NULLDUMMY verify flag in bitcoinconsensus.h (jl2012) +- #8937 `8b66659` Define start and end time for segwit deployment (sipa) + +### RPC and other APIs +- #8581 `526d2b0` Drop misleading option (MarcoFalke) +- #8699 `a5ec248` Remove createwitnessaddress RPC command (jl2012) +- #8780 `794b007` Deprecate getinfo (MarcoFalke) +- #8832 `83ad563` Throw JSONRPCError when utxo set can not be read (MarcoFalke) +- #8884 `b987348` getblockchaininfo help: pruneheight is the lowest, not highest, block (luke-jr) + +### Block and transaction handling +- #8611 `a9429ca` Reduce default number of blocks to check at startup (sipa) +- #8634 `3e80ab7` Add policy: null signature for failed CHECK(MULTI)SIG (jl2012) +- #8525 `1672225` Do not store witness txn in rejection cache (sipa) +- #8499 `9777fe1` Add several policy limits and disable uncompressed keys for segwit scripts (jl2012) +- #8526 `0027672` Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (jl2012) +- #8524 `b8c79a0` Precompute sighashes (sipa) +- #8651 `b8c79a0` Predeclare PrecomputedTransactionData as struct (sipa) + +### P2P protocol and network code +- #8740 `42ea51a` No longer send local address in addrMe (laanwj) +- #8427 `69d1cd2` Ignore `notfound` P2P messages (laanwj) +- #8573 `4f84082` Set jonasschnellis dns-seeder filter flag (jonasschnelli) +- #8712 `23feab1` Remove maxuploadtargets recommended minimum (jonasschnelli) +- #8862 `7ae6242` Fix a few cases where messages were sent after requested disconnect (theuni) +- #8393 `fe1975a` Support for compact blocks together with segwit (sipa) +- #8282 `2611ad7` Feeler connections to increase online addrs in the tried table (EthanHeilman) +- #8612 `2215c22` Check for compatibility with download in FindNextBlocksToDownload (sipa) +- #8606 `bbf379b` Fix some locks (sipa) +- #8594 `ab295bb` Do not add random inbound peers to addrman (gmaxwell) + +### Build system +- #8293 `fa5b249` Allow building libbitcoinconsensus without any univalue (luke-jr) +- #8492 `8b0bdd3` Allow building bench_bitcoin by itself (luke-jr) +- #8563 `147003c` Add configure check for -latomic (ajtowns) +- #8626 `ea51b0f` Berkeley DB v6 compatibility fix (netsafe) +- #8520 `75f2065` Remove check for `openssl/ec.h` (laanwj) + +### GUI +- #8481 `d9f0d4e` Fix minimize and close bugs (adlawren) +- #8487 `a37cec5` Persist the datadir after option reset (achow101) +- #8697 `41fd852` Fix op order to append first alert (rodasmith) +- #8678 `8e03382` Fix UI bug that could result in paying unexpected fee (jonasschnelli) +- #8911 `7634d8e` Translate all files, even if wallet disabled (laanwj) +- #8540 `1db3352` Fix random segfault when closing "Choose data directory" dialog (laanwj) +- #7579 `f1c0d78` Show network/chain errors in the GUI (jonasschnelli) + +### Wallet +- #8716 `e34374e` Check legacy wallet as well (MarcoFalke) +- #8443 `464dedd` Trivial cleanup of HD wallet changes (jonasschnelli) +- #8539 `cb07f19` CDB: fix debug output (crowning-) +- #8664 `091cdeb` Fix segwit-related wallet bug (sdaftuar) +- #8693 `c6a6291` Add witness address to address book (instagibbs) +- #8765 `6288659` Remove "unused" ThreadFlushWalletDB from removeprunedfunds (jonasschnelli) + +### Tests and QA +- #8713 `ae8c7df` create_cache: Delete temp dir when done (MarcoFalke) +- #8750 `d6ebe13` Refactor RPCTestHandler to prevent TimeoutExpired (MarcoFalke) +- #8652 `63462c2` remove root test directory for RPC tests (yurizhykin) +- #8724 `da94272` walletbackup: Sync blocks inside the loop (MarcoFalke) +- #8400 `bea02dc` enable rpcbind_test (yurizhykin) +- #8417 `f70be14` Add walletdump RPC test (including HD- & encryption-tests) (jonasschnelli) +- #8419 `a7aa3cc` Enable size accounting in mining unit tests (sdaftuar) +- #8442 `8bb1efd` Rework hd wallet dump test (MarcoFalke) +- #8528 `3606b6b` Update p2p-segwit.py to reflect correct behavior (instagibbs) +- #8531 `a27cdd8` abandonconflict: Use assert_equal (MarcoFalke) +- #8667 `6b07362` Fix SIGHASH_SINGLE bug in test_framework SignatureHash (jl2012) +- #8673 `03b0196` Fix obvious assignment/equality error in test (JeremyRubin) +- #8739 `cef633c` Fix broken sendcmpct test in p2p-compactblocks.py (sdaftuar) +- #8418 `ff893aa` Add tests for compact blocks (sdaftuar) +- #8803 `375437c` Ping regularly in p2p-segwit.py to keep connection alive (jl2012) +- #8827 `9bbe66e` Split up slow RPC calls to avoid pruning test timeouts (sdaftuar) +- #8829 `2a8bca4` Add bitcoin-tx JSON tests (jnewbery) +- #8834 `1dd1783` blockstore: Switch to dumb dbm (MarcoFalke) +- #8835 `d87227d` nulldummy.py: Don't run unused code (MarcoFalke) +- #8836 `eb18cc1` bitcoin-util-test.py should fail if the output file is empty (jnewbery) +- #8839 `31ab2f8` Avoid ConnectionResetErrors during RPC tests (laanwj) +- #8840 `cbc3fe5` Explicitly set encoding to utf8 when opening text files (laanwj) +- #8841 `3e4abb5` Fix nulldummy test (jl2012) +- #8854 `624a007` Fix race condition in p2p-compactblocks test (sdaftuar) +- #8857 `1f60d45` mininode: Only allow named args in wait_until (MarcoFalke) +- #8860 `0bee740` util: Move wait_bitcoinds() into stop_nodes() (MarcoFalke) +- #8882 `b73f065` Fix race conditions in p2p-compactblocks.py and sendheaders.py (sdaftuar) +- #8904 `cc6f551` Fix compact block shortids for a test case (dagurval) + +### Documentation +- #8754 `0e2c6bd` Target protobuf 2.6 in OS X build notes. (fanquake) +- #8461 `b17a3f9` Document return value of networkhashps for getmininginfo RPC endpoint (jlopp) +- #8512 `156e305` Corrected JSON typo on setban of net.cpp (sevastos) +- #8683 `8a7d7ff` Fix incorrect file name bitcoin.qrc (bitcoinsSG) +- #8891 `5e0dd9e` Update bips.md for Segregated Witness (fanquake) +- #8545 `863ae74` Update git-subtree-check.sh README (MarcoFalke) +- #8607 `486650a` Fix doxygen off-by-one comments, fix typos (MarcoFalke) +- #8560 `c493f43` Fix two VarInt examples in serialize.h (cbarcenas) +- #8737 `084cae9` UndoReadFromDisk works on undo files (rev), not on block files (paveljanik) +- #8625 `0a35573` Clarify statement about parallel jobs in rpc-tests.py (isle2983) +- #8624 `0e6d753` build: Mention curl (MarcoFalke) +- #8604 `b09e13c` build,doc: Update for 0.13.0+ and OpenBSD 5.9 (laanwj) + +### Miscellaneous +- #8742 `d31ac72` Specify Protobuf version 2 in paymentrequest.proto (fanquake) +- #8414,#8558,#8676,#8700,#8701,#8702 Add missing copyright headers (isle2983, kazcw) +- #8899 `4ed2627` Fix wake from sleep issue with Boost 1.59.0 (fanquake) +- #8817 `bcf3806` update bitcoin-tx to output witness data (jnewbery) +- #8513 `4e5fc31` Fix a type error that would not compile on OSX. (JeremyRubin) +- #8392 `30eac2d` Fix several node initialization issues (sipa) +- #8548 `305d8ac` Use __func__ to get function name for output printing (MarcoFalke) +- #8291 `a987431` [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke) Credits ======= Thanks to everyone who directly contributed to this release: - ... fill in here +- Alexey Vesnin +- Anders Øyvind Urke-Sætre +- Andrew Chow +- Anthony Towns +- BtcDrak +- Chris Stewart +- Christian Barcenas +- Cory Fields +- Dagur Valberg Johannsson +- Ethan Heilman +- Gaurav Rana +- Gregory Maxwell +- Jameson Lopp +- Jeremy Rubin +- Johnson Lau +- Jonas Schnelli +- Justin Camarena +- Kaz Wesley +- Luke Dashjr +- MarcoFalke +- Marty Jones +- Matt Corallo +- Michael Ford +- Pavel Janík +- Pieter Wuille +- Sev +- Suhas Daftuar +- Wladimir J. van der Laan +- adlawren +- crowning- +- fanquake +- instagibbs +- isle2983 +- jnewbery +- jonnynewbs +- leijurv +- rodasmith +- whythat As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 614ef85ff97602c31f471436004210a74f2d8946 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 17 Oct 2016 18:49:28 +0200 Subject: [PATCH 175/302] doc: Properly sort authors list --- doc/release-notes.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 3007815dd52..24540bfcc09 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -173,6 +173,7 @@ Credits Thanks to everyone who directly contributed to this release: +- adlawren - Alexey Vesnin - Anders Øyvind Urke-Sætre - Andrew Chow @@ -181,16 +182,23 @@ Thanks to everyone who directly contributed to this release: - Chris Stewart - Christian Barcenas - Cory Fields +- crowning- - Dagur Valberg Johannsson - Ethan Heilman +- fanquake - Gaurav Rana - Gregory Maxwell +- instagibbs +- isle2983 - Jameson Lopp - Jeremy Rubin +- jnewbery - Johnson Lau - Jonas Schnelli +- jonnynewbs - Justin Camarena - Kaz Wesley +- leijurv - Luke Dashjr - MarcoFalke - Marty Jones @@ -198,18 +206,10 @@ Thanks to everyone who directly contributed to this release: - Michael Ford - Pavel Janík - Pieter Wuille +- rodasmith - Sev - Suhas Daftuar -- Wladimir J. van der Laan -- adlawren -- crowning- -- fanquake -- instagibbs -- isle2983 -- jnewbery -- jonnynewbs -- leijurv -- rodasmith - whythat +- Wladimir J. van der Laan As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 06d15fbea6fafb714f9576664422615704ad05fb Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 17 Oct 2016 17:09:38 +0200 Subject: [PATCH 176/302] Update implemented bips for 0.13.1 Github-Pull: #8939 Rebased-From: 0941f556b7f228517fcb35f8b19926dfd62f481c --- doc/bips.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/bips.md b/doc/bips.md index 040439fbcb1..4f416100891 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -26,9 +26,9 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**): * [`BIP 125`](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee signaling honoured in mempool and mining as of **v0.12.0** ([PR 6871](https://github.com/bitcoin/bitcoin/pull/6871)). * [`BIP 130`](https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki): direct headers announcement is negotiated with peer versions `>=70012` as of **v0.12.0** ([PR 6494](https://github.com/bitcoin/bitcoin/pull/6494)). * [`BIP 133`](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki): feefilter messages are respected and sent for peer versions `>=70013` as of **v0.13.0** ([PR 7542](https://github.com/bitcoin/bitcoin/pull/7542)). -* [`BIP 141`](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki): Segregated Witness (Consensus Layer) as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). -* [`BIP 143`](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki): Transaction Signature Verification for Version 0 Witness Program as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). +* [`BIP 141`](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki): Segregated Witness (Consensus Layer) as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)), and defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)). +* [`BIP 143`](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki): Transaction Signature Verification for Version 0 Witness Program as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)) and defined for mainnet as of **v0.13.1** ([PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)). * [`BIP 144`](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki): Segregated Witness as of **0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). * [`BIP 145`](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki): getblocktemplate updates for Segregated Witness as of **v0.13.0** ([PR 8149](https://github.com/bitcoin/bitcoin/pull/8149)). -* [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636)). +* [`BIP 147`](https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki): NULLDUMMY softfork as of **v0.13.1** ([PR 8636](https://github.com/bitcoin/bitcoin/pull/8636) and [PR 8937](https://github.com/bitcoin/bitcoin/pull/8937)). * [`BIP 152`](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki): Compact block transfer and related optimizations are used as of **v0.13.0** ([PR 8068](https://github.com/bitcoin/bitcoin/pull/8068)). From fa161e8cc1dc2b9a52e61973369c7cbe516900ac Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 17 Oct 2016 19:28:18 +0200 Subject: [PATCH 177/302] [doc] 0.13.1: Minor clarification to release notes --- doc/release-notes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 24540bfcc09..c5719e0bddf 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -63,7 +63,7 @@ git merge commit are mentioned. - #8937 `8b66659` Define start and end time for segwit deployment (sipa) ### RPC and other APIs -- #8581 `526d2b0` Drop misleading option (MarcoFalke) +- #8581 `526d2b0` Drop misleading option in importprunedfunds (MarcoFalke) - #8699 `a5ec248` Remove createwitnessaddress RPC command (jl2012) - #8780 `794b007` Deprecate getinfo (MarcoFalke) - #8832 `83ad563` Throw JSONRPCError when utxo set can not be read (MarcoFalke) @@ -107,7 +107,6 @@ git merge commit are mentioned. - #7579 `f1c0d78` Show network/chain errors in the GUI (jonasschnelli) ### Wallet -- #8716 `e34374e` Check legacy wallet as well (MarcoFalke) - #8443 `464dedd` Trivial cleanup of HD wallet changes (jonasschnelli) - #8539 `cb07f19` CDB: fix debug output (crowning-) - #8664 `091cdeb` Fix segwit-related wallet bug (sdaftuar) @@ -116,6 +115,7 @@ git merge commit are mentioned. ### Tests and QA - #8713 `ae8c7df` create_cache: Delete temp dir when done (MarcoFalke) +- #8716 `e34374e` Check legacy wallet as well (MarcoFalke) - #8750 `d6ebe13` Refactor RPCTestHandler to prevent TimeoutExpired (MarcoFalke) - #8652 `63462c2` remove root test directory for RPC tests (yurizhykin) - #8724 `da94272` walletbackup: Sync blocks inside the loop (MarcoFalke) @@ -165,7 +165,7 @@ git merge commit are mentioned. - #8817 `bcf3806` update bitcoin-tx to output witness data (jnewbery) - #8513 `4e5fc31` Fix a type error that would not compile on OSX. (JeremyRubin) - #8392 `30eac2d` Fix several node initialization issues (sipa) -- #8548 `305d8ac` Use __func__ to get function name for output printing (MarcoFalke) +- #8548 `305d8ac` Use `__func__` to get function name for output printing (MarcoFalke) - #8291 `a987431` [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke) Credits From 9aa0c1597230ef2c50f751960865102e3c938425 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 17 Oct 2016 11:25:25 -0400 Subject: [PATCH 178/302] Comment that most dnsseeds only support some service bits combos Github-Pull: #8940 Rebased-From: 504c72ad346a1b619f1fc58d0edce91ec955a67d --- src/chainparams.cpp | 5 +++-- src/net.cpp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 3be2d2ff805..4344ec930b3 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -114,12 +114,13 @@ class CMainParams : public CChainParams { assert(consensus.hashGenesisBlock == uint256S("0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f")); assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b")); - vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille + // Note that of those with the service bits flag, most only support a subset of possible options + vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille, only supports x1, x5, x9, and xd vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik - vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli + vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli, only supports x1, x5, x9, and xd base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,0); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,5); diff --git a/src/net.cpp b/src/net.cpp index 5e38ec07790..e44c66c2a09 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1489,6 +1489,7 @@ static std::string GetDNSHost(const CDNSSeedData& data, ServiceFlags* requiredSe return data.host; } + // See chainparams.cpp, most dnsseeds only support one or two possible servicebits hostnames return strprintf("x%x.%s", *requiredServiceBits, data.host); } From 3d770a88d3863220742776f02f3c35aa274e1e0c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 17 Oct 2016 11:25:52 -0400 Subject: [PATCH 179/302] Add x9 service bit support to dnsseed.bluematt.me Github-Pull: #8940 Rebased-From: ffb4713920205db39bfd219b6162986a52ddf32b --- src/chainparams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 4344ec930b3..bd0406016b5 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -116,7 +116,7 @@ class CMainParams : public CChainParams { // Note that of those with the service bits flag, most only support a subset of possible options vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille, only supports x1, x5, x9, and xd - vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me")); // Matt Corallo + vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me", true)); // Matt Corallo, only supports x9 vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik From 5b4192bc4c401245e9c225c99c21efd0808e6162 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 17 Oct 2016 13:27:23 -0400 Subject: [PATCH 180/302] My DNS seed supports filtering Currently supports filtering by any combination of the 4 least significant bits. Github-Pull: #8940 Rebased-From: 2449e12681ab549695f143d9b3ad2c24be03a78d --- src/chainparams.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index bd0406016b5..3ad9f4d2d34 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -118,7 +118,7 @@ class CMainParams : public CChainParams { vSeeds.push_back(CDNSSeedData("bitcoin.sipa.be", "seed.bitcoin.sipa.be", true)); // Pieter Wuille, only supports x1, x5, x9, and xd vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me", true)); // Matt Corallo, only supports x9 vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr - vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com")); // Christian Decker + vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com", true)); // Christian Decker, supports x1 - xf vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org")); // Jeff Garzik vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli, only supports x1, x5, x9, and xd From e1169b052991671db1043f432a85b31f9245a4c2 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 17 Oct 2016 19:49:52 +0200 Subject: [PATCH 181/302] doc: Update release notes for last-minute pulls --- doc/release-notes.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index c5719e0bddf..3d83be9647f 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -89,6 +89,7 @@ git merge commit are mentioned. - #8612 `2215c22` Check for compatibility with download in FindNextBlocksToDownload (sipa) - #8606 `bbf379b` Fix some locks (sipa) - #8594 `ab295bb` Do not add random inbound peers to addrman (gmaxwell) +- #8940 `5b4192b` Add x9 service bit support to dnsseed.bluematt.me, seed.bitcoinstats.com (TheBlueMatt, cdecker) ### Build system - #8293 `fa5b249` Allow building libbitcoinconsensus without any univalue (luke-jr) @@ -157,6 +158,7 @@ git merge commit are mentioned. - #8625 `0a35573` Clarify statement about parallel jobs in rpc-tests.py (isle2983) - #8624 `0e6d753` build: Mention curl (MarcoFalke) - #8604 `b09e13c` build,doc: Update for 0.13.0+ and OpenBSD 5.9 (laanwj) +- #8939 `06d15fb` Update implemented bips for 0.13.1 (sipa) ### Miscellaneous - #8742 `d31ac72` Specify Protobuf version 2 in paymentrequest.proto (fanquake) @@ -181,6 +183,7 @@ Thanks to everyone who directly contributed to this release: - BtcDrak - Chris Stewart - Christian Barcenas +- Christian Decker - Cory Fields - crowning- - Dagur Valberg Johannsson From 5f9c7b0abd080862d1fa0b410996eced0884a96f Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Mon, 17 Oct 2016 13:52:20 -0400 Subject: [PATCH 182/302] Release notes: add info about segwit and null dummy soft forks [no ci] --- doc/release-notes.md | 82 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 78 insertions(+), 4 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 3d83be9647f..609fd6def6c 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,6 +1,6 @@ -Bitcoin Core version 0.13.x is now available from: +Bitcoin Core version 0.13.1 is now available from: - + This is a new major version release, including new features, various bugfixes and performance improvements, as well as updated translations. @@ -38,8 +38,82 @@ report issues about Windows XP to the issue tracker. Notable changes =============== -Example item --------------- +Segregated witness soft fork +---------------------------- + +Segregated witness (segwit) is a soft fork that, if activated, will +allow transaction-producing software to separate (segregate) transaction +signatures (witnesses) from the rest of the data in a transaction, and +to allow miners to place those witnesses outside of the traditional +block structure. This provides two immediate benefits: + +- **Elimination of malleability:** Segregating the witness allows both + existing software and upgraded software that receives transactions to + calculate the transaction identifier (txid) of segwit-using + transactions without referencing the witness. This solves all known + cases of unwanted third-party transaction malleability, which is a + problem that makes programming Bitcoin wallet software more difficult + and which seriously complicates the design of smart contracts for + Bitcoin. + +- **Capacity increase:** Moving witness data outside of the traditional + block structure (but still inside a new-style block structure) means + new-style blocks can hold more data than older-style blocks, allowing + a modest increase to the amount of transaction data that can fit in a + block. + +Segwit also simplifies the ability to add new features to Bitcoin and +improves the efficiency of full nodes, which will help provide long-term +benefits to Bitcoin users. + +Activation for the segwit soft fork is being managed using BIP9 versionbits. +The earliest activation date is set to 15 November 2016 (UTC) and +its versionbit is bit 1. + +For more information about segwit, please see the [segwit FAQ][], the +[segwit wallet developers guide][] or BIPs [141][BIP141], [143][BIP143], +[144][BIP144], and [145][BIP145]. If you're a miner or mining pool +operator, please see the [versionbits FAQ][] for information about +signaling support for a soft fork. + +[Segwit FAQ]: https://bitcoincore.org/en/2016/01/26/segwit-benefits/ +[segwit wallet developers guide]: https://bitcoincore.org/en/segwit_wallet_dev/ +[BIP141]: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki +[BIP143]: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki +[BIP144]: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki +[BIP145]: https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki +[versionbits FAQ]: https://bitcoincore.org/en/2016/06/08/version-bits-miners-faq/ + + +Null dummy soft fork +------------------- + +Combined with the segwit soft fork is a soft fork that turns a +long-existing network relay policy into a consensus rule. The +`OP_CHECKMULTISIG` and `OP_CHECKMULTISIGVERIFY` opcodes consume an extra +stack element ("dummy element") after signature validation. The dummy +element is not inspected in any manner, and could be replaced by any +value without invalidating the script. + +Because any value can be used for this dummy element, it's possible for +a third-party to insert data into other people's transactions, changing +the transaction's txid (called transaction malleability) and possibly +causing other problems. + +Since Bitcoin Core 0.10.0, nodes have defaulted to only relaying and +mining transactions whose dummy element was a null value (0x00, also +called OP_0). The null dummy soft fork turns this relay rule into a +consensus rule both for non-segwit transactions and segwit transactions, +so that this method of mutating transactions is permanently eliminated +from the network. + +Signaling for the null dummy soft fork is done by signaling support +for segwit, and the null dummy soft fork will activate at the same time +as segwit. + +For more information, please see [BIP147][]. + +[BIP147]: https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki Low-level RPC changes --------------------- From 2de93f0a9bf244d23aa9ebbea99c412d6de82473 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Mon, 17 Oct 2016 14:05:21 -0400 Subject: [PATCH 183/302] Relase notes: correct segwit activation point --- doc/release-notes.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 609fd6def6c..55c764d7c18 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -66,9 +66,12 @@ Segwit also simplifies the ability to add new features to Bitcoin and improves the efficiency of full nodes, which will help provide long-term benefits to Bitcoin users. -Activation for the segwit soft fork is being managed using BIP9 versionbits. -The earliest activation date is set to 15 November 2016 (UTC) and -its versionbit is bit 1. +Activation for the segwit soft fork is being managed using BIP9 +versionbits. Segwit's version bit is bit 1, and nodes will begin +tracking which blocks signal support for segwit on 15 November 2016 +(UTC). If 95% of blocks within a 2,016-block retarget period (about two +weeks) signal support for segwit, the soft fork will be locked in. +After another 2,016 blocks, segwit will activate. For more information about segwit, please see the [segwit FAQ][], the [segwit wallet developers guide][] or BIPs [141][BIP141], [143][BIP143], From bf86073e45b475c37bc250c03d1f05a18fc9a190 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Mon, 17 Oct 2016 14:14:14 -0400 Subject: [PATCH 184/302] Release notes: correct segwit signalling period start conditions [ci skip] --- doc/release-notes.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 55c764d7c18..d107f305d63 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -68,10 +68,11 @@ benefits to Bitcoin users. Activation for the segwit soft fork is being managed using BIP9 versionbits. Segwit's version bit is bit 1, and nodes will begin -tracking which blocks signal support for segwit on 15 November 2016 -(UTC). If 95% of blocks within a 2,016-block retarget period (about two -weeks) signal support for segwit, the soft fork will be locked in. -After another 2,016 blocks, segwit will activate. +tracking which blocks signal support for segwit at the beginning of the +first retarget period after segwit's start date of 15 November 2016. If +95% of blocks within a 2,016-block retarget period (about two weeks) +signal support for segwit, the soft fork will be locked in. After +another 2,016 blocks, segwit will activate. For more information about segwit, please see the [segwit FAQ][], the [segwit wallet developers guide][] or BIPs [141][BIP141], [143][BIP143], From c9ffe9044da08773039060983632cc3fbd4f0eb8 Mon Sep 17 00:00:00 2001 From: Micha Date: Tue, 18 Oct 2016 00:04:06 +0300 Subject: [PATCH 185/302] Add historical release notes for v0.13.0 [skip ci] --- doc/release-notes/release-notes-0.13.0.md | 863 ++++++++++++++++++++++++++++++ 1 file changed, 863 insertions(+) create mode 100644 doc/release-notes/release-notes-0.13.0.md diff --git a/doc/release-notes/release-notes-0.13.0.md b/doc/release-notes/release-notes-0.13.0.md new file mode 100644 index 00000000000..f9bf3d75de0 --- /dev/null +++ b/doc/release-notes/release-notes-0.13.0.md @@ -0,0 +1,863 @@ +Bitcoin Core version 0.13.0 is now available from: + + + +This is a new major version release, including new features, various bugfixes +and performance improvements, as well as updated translations. + +Please report bugs using the issue tracker at github: + + + +To receive security and update notifications, please subscribe to: + + + +Compatibility +============== + +Microsoft ended support for Windows XP on [April 8th, 2014](https://www.microsoft.com/en-us/WindowsForBusiness/end-of-xp-support), +an OS initially released in 2001. This means that not even critical security +updates will be released anymore. Without security updates, using a bitcoin +wallet on a XP machine is irresponsible at least. + +In addition to that, with 0.12.x there have been varied reports of Bitcoin Core +randomly crashing on Windows XP. It is [not clear](https://github.com/bitcoin/bitcoin/issues/7681#issuecomment-217439891) +what the source of these crashes is, but it is likely that upstream +libraries such as Qt are no longer being tested on XP. + +We do not have time nor resources to provide support for an OS that is +end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are +suggested to upgrade to a newer verion of Windows, or install an alternative OS +that is supported. + +No attempt is made to prevent installing or running the software on Windows XP, +you can still do so at your own risk, but do not expect it to work: do not +report issues about Windows XP to the issue tracker. + +Notable changes +=============== + +Database cache memory increased +-------------------------------- + +As a result of growth of the UTXO set, performance with the prior default +database cache of 100 MiB has suffered. +For this reason the default was changed to 300 MiB in this release. + +For nodes on low-memory systems, the database cache can be changed back to +100 MiB (or to another value) by either: + +- Adding `dbcache=100` in bitcoin.conf +- Changing it in the GUI under `Options → Size of database cache` + +Note that the database cache setting has the most performance impact +during initial sync of a node, and when catching up after downtime. + + +bitcoin-cli: arguments privacy +------------------------------ + +The RPC command line client gained a new argument, `-stdin` +to read extra arguments from standard input, one per line until EOF/Ctrl-D. +For example: + + $ src/bitcoin-cli -stdin walletpassphrase + mysecretcode + 120 + ..... press Ctrl-D here to end input + $ + +It is recommended to use this for sensitive information such as wallet +passphrases, as command-line arguments can usually be read from the process +table by any user on the system. + + +C++11 and Python 3 +------------------ + +Various code modernizations have been done. The Bitcoin Core code base has +started using C++11. This means that a C++11-capable compiler is now needed for +building. Effectively this means GCC 4.7 or higher, or Clang 3.3 or higher. + +When cross-compiling for a target that doesn't have C++11 libraries, configure with +`./configure --enable-glibc-back-compat ... LDFLAGS=-static-libstdc++`. + +For running the functional tests in `qa/rpc-tests`, Python3.4 or higher is now +required. + + +Linux ARM builds +---------------- + +Due to popular request, Linux ARM builds have been added to the uploaded +executables. + +The following extra files can be found in the download directory or torrent: + +- `bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz`: Linux binaries for the most + common 32-bit ARM architecture. +- `bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz`: Linux binaries for the most + common 64-bit ARM architecture. + +ARM builds are still experimental. If you have problems on a certain device or +Linux distribution combination please report them on the bug tracker, it may be +possible to resolve them. + +Note that Android is not considered ARM Linux in this context. The executables +are not expected to work out of the box on Android. + + +Compact Block support (BIP 152) +------------------------------- + +Support for block relay using the Compact Blocks protocol has been implemented +in PR 8068. + +The primary goal is reducing the bandwidth spikes at relay time, though in many +cases it also reduces propagation delay. It is automatically enabled between +compatible peers. +[BIP 152](https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki) + +As a side-effect, ordinary non-mining nodes will download and upload blocks +faster if those blocks were produced by miners using similar transaction +filtering policies. This means that a miner who produces a block with many +transactions discouraged by your node will be relayed slower than one with +only transactions already in your memory pool. The overall effect of such +relay differences on the network may result in blocks which include widely- +discouraged transactions losing a stale block race, and therefore miners may +wish to configure their node to take common relay policies into consideration. + + +Hierarchical Deterministic Key Generation +----------------------------------------- +Newly created wallets will use hierarchical deterministic key generation +according to BIP32 (keypath m/0'/0'/k'). +Existing wallets will still use traditional key generation. + +Backups of HD wallets, regardless of when they have been created, can +therefore be used to re-generate all possible private keys, even the +ones which haven't already been generated during the time of the backup. +**Attention:** Encrypting the wallet will create a new seed which requires +a new backup! + +Wallet dumps (created using the `dumpwallet` RPC) will contain the deterministic +seed. This is expected to allow future versions to import the seed and all +associated funds, but this is not yet implemented. + +HD key generation for new wallets can be disabled by `-usehd=0`. Keep in +mind that this flag only has affect on newly created wallets. +You can't disable HD key generation once you have created a HD wallet. + +There is no distinction between internal (change) and external keys. + +HD wallets are incompatible with older versions of Bitcoin Core. + +[Pull request](https://github.com/bitcoin/bitcoin/pull/8035/files), [BIP 32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) + + +Segregated Witness +------------------ + +The code preparations for Segregated Witness ("segwit"), as described in [BIP +141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki), [BIP +143](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki), [BIP +144](https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki), and [BIP +145](https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki) are +finished and included in this release. However, BIP 141 does not yet specify +activation parameters on mainnet, and so this release does not support segwit +use on mainnet. Testnet use is supported, and after BIP 141 is updated with +proposed parameters, a future release of Bitcoin Core is expected that +implements those parameters for mainnet. + +Furthermore, because segwit activation is not yet specified for mainnet, +version 0.13.0 will behave similarly as other pre-segwit releases even after a +future activation of BIP 141 on the network. Upgrading from 0.13.0 will be +required in order to utilize segwit-related features on mainnet (such as signal +BIP 141 activation, mine segwit blocks, fully validate segwit blocks, relay +segwit blocks to other segwit nodes, and use segwit transactions in the +wallet, etc). + + +Mining transaction selection ("Child Pays For Parent") +------------------------------------------------------ + +The mining transaction selection algorithm has been replaced with an algorithm +that selects transactions based on their feerate inclusive of unconfirmed +ancestor transactions. This means that a low-fee transaction can become more +likely to be selected if a high-fee transaction that spends its outputs is +relayed. + +With this change, the `-blockminsize` command line option has been removed. + +The command line option `-blockmaxsize` remains an option to specify the +maximum number of serialized bytes in a generated block. In addition, the new +command line option `-blockmaxweight` has been added, which specifies the +maximum "block weight" of a generated block, as defined by [BIP 141 (Segregated +Witness)] (https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki). + +In preparation for Segregated Witness, the mining algorithm has been modified +to optimize transaction selection for a given block weight, rather than a given +number of serialized bytes in a block. In this release, transaction selection +is unaffected by this distinction (as BIP 141 activation is not supported on +mainnet in this release, see above), but in future releases and after BIP 141 +activation, these calculations would be expected to differ. + +For optimal runtime performance, miners using this release should specify +`-blockmaxweight` on the command line, and not specify `-blockmaxsize`. +Additionally (or only) specifying `-blockmaxsize`, or relying on default +settings for both, may result in performance degradation, as the logic to +support `-blockmaxsize` performs additional computation to ensure that +constraint is met. (Note that for mainnet, in this release, the equivalent +parameter for `-blockmaxweight` would be four times the desired +`-blockmaxsize`. See [BIP 141] +(https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki) for additional +details.) + +In the future, the `-blockmaxsize` option may be removed, as block creation is +no longer optimized for this metric. Feedback is requested on whether to +deprecate or keep this command line option in future releases. + + +Reindexing changes +------------------ + +In earlier versions, reindexing did validation while reading through the block +files on disk. These two have now been split up, so that all blocks are known +before validation starts. This was necessary to make certain optimizations that +are available during normal synchronizations also available during reindexing. + +The two phases are distinct in the Bitcoin-Qt GUI. During the first one, +"Reindexing blocks on disk" is shown. During the second (slower) one, +"Processing blocks on disk" is shown. + +It is possible to only redo validation now, without rebuilding the block index, +using the command line option `-reindex-chainstate` (in addition to +`-reindex` which does both). This new option is useful when the blocks on disk +are assumed to be fine, but the chainstate is still corrupted. It is also +useful for benchmarks. + + +Removal of internal miner +-------------------------- + +As CPU mining has been useless for a long time, the internal miner has been +removed in this release, and replaced with a simpler implementation for the +test framework. + +The overall result of this is that `setgenerate` RPC call has been removed, as +well as the `-gen` and `-genproclimit` command-line options. + +For testing, the `generate` call can still be used to mine a block, and a new +RPC call `generatetoaddress` has been added to mine to a specific address. This +works with wallet disabled. + + +New bytespersigop implementation +-------------------------------- + +The former implementation of the bytespersigop filter accidentally broke bare +multisig (which is meant to be controlled by the `permitbaremultisig` option), +since the consensus protocol always counts these older transaction forms as 20 +sigops for backwards compatibility. Simply fixing this bug by counting more +accurately would have reintroduced a vulnerability. It has therefore been +replaced with a new implementation that rather than filter such transactions, +instead treats them (for fee purposes only) as if they were in fact the size +of a transaction actually using all 20 sigops. + + +Low-level P2P changes +---------------------- + +- The optional new p2p message "feefilter" is implemented and the protocol + version is bumped to 70013. Upon receiving a feefilter message from a peer, + a node will not send invs for any transactions which do not meet the filter + feerate. [BIP 133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki) + +- The P2P alert system has been removed in PR #7692 and the `alert` P2P message + is no longer supported. + +- The transaction relay mechanism used to relay one quarter of all transactions + instantly, while queueing up the rest and sending them out in batch. As + this resulted in chains of dependent transactions being reordered, it + systematically hurt transaction relay. The relay code was redesigned in PRs + \#7840 and #8082, and now always batches transactions announcements while also + sorting them according to dependency order. This significantly reduces orphan + transactions. To compensate for the removal of instant relay, the frequency of + batch sending was doubled for outgoing peers. + +- Since PR #7840 the BIP35 `mempool` command is also subject to batch processing. + Also the `mempool` message is no longer handled for non-whitelisted peers when + `NODE_BLOOM` is disabled through `-peerbloomfilters=0`. + +- The maximum size of orphan transactions that are kept in memory until their + ancestors arrive has been raised in PR #8179 from 5000 to 99999 bytes. They + are now also removed from memory when they are included in a block, conflict + with a block, and time out after 20 minutes. + +- We respond at most once to a getaddr request during the lifetime of a + connection since PR #7856. + +- Connections to peers who have recently been the first one to give us a valid + new block or transaction are protected from disconnections since PR #8084. + + +Low-level RPC changes +---------------------- + +- RPC calls have been added to output detailed statistics for individual mempool + entries, as well as to calculate the in-mempool ancestors or descendants of a + transaction: see `getmempoolentry`, `getmempoolancestors`, `getmempooldescendants`. + +- `gettxoutsetinfo` UTXO hash (`hash_serialized`) has changed. There was a divergence between + 32-bit and 64-bit platforms, and the txids were missing in the hashed data. This has been + fixed, but this means that the output will be different than from previous versions. + +- Full UTF-8 support in the RPC API. Non-ASCII characters in, for example, + wallet labels have always been malformed because they weren't taken into account + properly in JSON RPC processing. This is no longer the case. This also affects + the GUI debug console. + +- Asm script outputs replacements for OP_NOP2 and OP_NOP3 + + - OP_NOP2 has been renamed to OP_CHECKLOCKTIMEVERIFY by [BIP +65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) + + - OP_NOP3 has been renamed to OP_CHECKSEQUENCEVERIFY by [BIP +112](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki) + + - The following outputs are affected by this change: + + - RPC `getrawtransaction` (in verbose mode) + - RPC `decoderawtransaction` + - RPC `decodescript` + - REST `/rest/tx/` (JSON format) + - REST `/rest/block/` (JSON format when including extended tx details) + - `bitcoin-tx -json` + +- The sorting of the output of the `getrawmempool` output has changed. + +- New RPC commands: `generatetoaddress`, `importprunedfunds`, `removeprunedfunds`, `signmessagewithprivkey`, + `getmempoolancestors`, `getmempooldescendants`, `getmempoolentry`, + `createwitnessaddress`, `addwitnessaddress`. + +- Removed RPC commands: `setgenerate`, `getgenerate`. + +- New options were added to `fundrawtransaction`: `includeWatching`, `changeAddress`, `changePosition` and `feeRate`. + + +Low-level ZMQ changes +---------------------- + +- Each ZMQ notification now contains an up-counting sequence number that allows + listeners to detect lost notifications. + The sequence number is always the last element in a multi-part ZMQ notification and + therefore backward compatible. Each message type has its own counter. + PR [#7762](https://github.com/bitcoin/bitcoin/pull/7762). + + +0.13.0 Change log +================= + +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. + +### RPC and other APIs + +- #7156 `9ee02cf` Remove cs_main lock from `createrawtransaction` (laanwj) +- #7326 `2cd004b` Fix typo, wrong information in gettxout help text (paveljanik) +- #7222 `82429d0` Indicate which transactions are signaling opt-in RBF (sdaftuar) +- #7480 `b49a623` Changed getnetworkhps value to double to avoid overflow (instagibbs) +- #7550 `8b958ab` Input-from-stdin mode for bitcoin-cli (laanwj) +- #7670 `c9a1265` Use cached block hash in blockToJSON() (rat4) +- #7726 `9af69fa` Correct importaddress help reference to importpubkey (CypherGrue) +- #7766 `16555b6` Register calls where they are defined (laanwj) +- #7797 `e662a76` Fix generatetoaddress failing to parse address (mruddy) +- #7774 `916b15a` Add versionHex in getblock and getblockheader JSON results (mruddy) +- #7863 `72c54e3` Getblockchaininfo: make bip9_softforks an object, not an array (rustyrussell) +- #7842 `d97101e` Do not print minping time in getpeerinfo when no ping received yet (paveljanik) +- #7518 `be14ca5` Add multiple options to fundrawtransaction (promag) +- #7756 `9e47fce` Add cursor to iterate over utxo set, use this in `gettxoutsetinfo` (laanwj) +- #7848 `88616d2` Divergence between 32- and 64-bit when hashing >4GB affects `gettxoutsetinfo` (laanwj) +- #7827 `4205ad7` Speed up `getchaintips` (mrbandrews) +- #7762 `a1eb344` Append a message sequence number to every ZMQ notification (jonasschnelli) +- #7688 `46880ed` List solvability in listunspent output and improve help (sipa) +- #7926 `5725807` Push back `getaddednodeinfo` dead value (instagibbs) +- #7953 `0630353` Create `signmessagewithprivkey` rpc (achow101) +- #8049 `c028c7b` Expose information on whether transaction relay is enabled in `getnetworkinfo` (laanwj) +- #7967 `8c1e49b` Add feerate option to `fundrawtransaction` (jonasschnelli) +- #8118 `9b6a48c` Reduce unnecessary hashing in `signrawtransaction` (jonasnick) +- #7957 `79004d4` Add support for transaction sequence number (jonasschnelli) +- #8153 `75ec320` `fundrawtransaction` feeRate: Use BTC/kB (MarcoFalke) +- #7292 `7ce9ac5` Expose ancestor/descendant information over RPC (sdaftuar) +- #8171 `62fcf27` Fix createrawtx sequence number unsigned int parsing (jonasschnelli) +- #7892 `9c3d0fa` Add full UTF-8 support to RPC (laanwj) +- #8317 `304eff3` Don't use floating point in rpcwallet (MarcoFalke) +- #8258 `5a06ebb` Hide softfork in `getblockchaininfo` if timeout is 0 (jl2012) +- #8244 `1922e5a` Remove unnecessary LOCK(cs_main) in getrawmempool (dcousens) + +### Block and transaction handling + +- #7056 `6a07208` Save last db read (morcos) +- #6842 `0192806` Limitfreerelay edge case bugfix (ptschip) +- #7084 `11d74f6` Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee in mempool (MarcoFalke) +- #7539 `9f33dba` Add tags to mempool's mapTx indices (sdaftuar) +- #7592 `26a2a72` Re-remove ERROR logging for mempool rejects (laanwj) +- #7187 `14d6324` Keep reorgs fast for SequenceLocks checks (morcos) +- #7594 `01f4267` Mempool: Add tracking of ancestor packages (sdaftuar) +- #7904 `fc9e334` Txdb: Fix assert crash in new UTXO set cursor (laanwj) +- #7927 `f9c2ac7` Minor changes to dbwrapper to simplify support for other databases (laanwj) +- #7933 `e26b620` Fix OOM when deserializing UTXO entries with invalid length (sipa) +- #8020 `5e374f7` Use SipHash-2-4 for various non-cryptographic hashes (sipa) +- #8076 `d720980` VerifyDB: don't check blocks that have been pruned (sdaftuar) +- #8080 `862fd24` Do not use mempool for GETDATA for tx accepted after the last mempool req (gmaxwell) +- #7997 `a82f033` Replace mapNextTx with slimmer setSpends (kazcw) +- #8220 `1f86d64` Stop trimming when mapTx is empty (sipa) +- #8273 `396f9d6` Bump `-dbcache` default to 300MiB (laanwj) +- #7225 `eb33179` Eliminate unnecessary call to CheckBlock (sdaftuar) +- #7907 `006cdf6` Optimize and Cleanup CScript::FindAndDelete (pstratem) +- #7917 `239d419` Optimize reindex (sipa) +- #7763 `3081fb9` Put hex-encoded version in UpdateTip (sipa) +- #8149 `d612837` Testnet-only segregated witness (sipa) +- #8305 `3730393` Improve handling of unconnecting headers (sdaftuar) +- #8363 `fca1a41` Rename "block cost" to "block weight" (sdaftuar) +- #8381 `f84ee3d` Make witness v0 outputs non-standard (jl2012) +- #8364 `3f65ba2` Treat high-sigop transactions as larger rather than rejecting them (sipa) + +### P2P protocol and network code + +- #6589 `dc0305d` Log bytes recv/sent per command (jonasschnelli) +- #7164 `3b43cad` Do not download transactions during initial blockchain sync (ptschip) +- #7458 `898fedf` peers.dat, banlist.dat recreated when missing (kirkalx) +- #7637 `3da5d1b` Fix memleak in TorController (laanwj, jonasschnelli) +- #7553 `9f14e5a` Remove vfReachable and modify IsReachable to only use vfLimited (pstratem) +- #7708 `9426632` De-neuter NODE_BLOOM (pstratem) +- #7692 `29b2be6` Remove P2P alert system (btcdrak) +- #7542 `c946a15` Implement "feefilter" P2P message (morcos) +- #7573 `352fd57` Add `-maxtimeadjustment` command line option (mruddy) +- #7570 `232592a` Add IPv6 Link-Local Address Support (mruddy) +- #7874 `e6a4d48` Improve AlreadyHave (morcos) +- #7856 `64e71b3` Only send one GetAddr response per connection (gmaxwell) +- #7868 `7daa3ad` Split DNS resolving functionality out of net structures (theuni) +- #7919 `7617682` Fix headers announcements edge case (sdaftuar) +- #7514 `d9594bf` Fix IsInitialBlockDownload for testnet (jmacwhyte) +- #7959 `03cf6e8` fix race that could fail to persist a ban (kazcw) +- #7840 `3b9a0bf` Several performance and privacy improvements to inv/mempool handling (sipa) +- #8011 `65aecda` Don't run ThreadMessageHandler at lowered priority (kazcw) +- #7696 `5c3f8dd` Fix de-serialization bug where AddrMan is left corrupted (EthanHeilman) +- #7932 `ed749bd` CAddrMan::Deserialize handle corrupt serializations better (pstratem) +- #7906 `83121cc` Prerequisites for p2p encapsulation changes (theuni) +- #8033 `18436d8` Fix Socks5() connect failures to be less noisy and less unnecessarily scary (wtogami) +- #8082 `01d8359` Defer inserting into maprelay until just before relaying (gmaxwell) +- #7960 `6a22373` Only use AddInventoryKnown for transactions (sdaftuar) +- #8078 `2156fa2` Disable the mempool P2P command when bloom filters disabled (petertodd) +- #8065 `67c91f8` Addrman offline attempts (gmaxwell) +- #7703 `761cddb` Tor: Change auth order to only use password auth if -torpassword (laanwj) +- #8083 `cd0c513` Add support for dnsseeds with option to filter by servicebits (jonasschnelli) +- #8173 `4286f43` Use SipHash for node eviction (sipa) +- #8154 `1445835` Drop vAddrToSend after sending big addr message (kazcw) +- #7749 `be9711e` Enforce expected outbound services (sipa) +- #8208 `0a64777` Do not set extra flags for unfiltered DNS seed results (sipa) +- #8084 `e4bb4a8` Add recently accepted blocks and txn to AttemptToEvictConnection (gmaxwell) +- #8113 `3f89a53` Rework addnode behaviour (sipa) +- #8179 `94ab58b` Evict orphans which are included or precluded by accepted blocks (gmaxwell) +- #8068 `e9d76a1` Compact Blocks (TheBlueMatt) +- #8204 `0833894` Update petertodd's testnet seed (petertodd) +- #8247 `5cd35d3` Mark my dnsseed as supporting filtering (sipa) +- #8275 `042c323` Remove bad chain alert partition check (btcdrak) +- #8271 `1bc9c80` Do not send witnesses in cmpctblock (sipa) +- #8312 `ca40ef6` Fix mempool DoS vulnerability from malleated transactions (sdaftuar) +- #7180 `16ccb74` Account for `sendheaders` `verack` messages (laanwj) +- #8102 `425278d` Bugfix: use global ::fRelayTxes instead of CNode in version send (sipa) +- #8408 `b7e2011` Prevent fingerprinting, disk-DoS with compact blocks (sdaftuar) + +### Build system + +- #7302 `41f1a3e` C++11 build/runtime fixes (theuni) +- #7322 `fd9356b` c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locally (theuni) +- #7441 `a6771fc` Use Debian 8.3 in gitian build guide (fanquake) +- #7349 `152a821` Build against system UniValue when available (luke-jr) +- #7520 `621940e` LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead (paveljanik) +- #7528 `9b9bfce` autogen.sh: warn about needing autoconf if autoreconf is not found (knocte) +- #7504 `19324cf` Crystal clean make clean (paveljanik) +- #7619 `18b3f1b` Add missing sudo entry in gitian VM setup (btcdrak) +- #7616 `639ec58` [depends] Delete unused patches (MarcoFalke) +- #7658 `c15eb28` Add curl to Gitian setup instructions (btcdrak) +- #7710 `909b72b` [Depends] Bump miniupnpc and config.guess+sub (fanquake) +- #7723 `5131005` build: python 3 compatibility (laanwj) +- #7477 `28ad4d9` Fix quoting of copyright holders in configure.ac (domob1812) +- #7711 `a67bc5e` [build-aux] Update Boost & check macros to latest serials (fanquake) +- #7788 `4dc1b3a` Use relative paths instead of absolute paths in protoc calls (paveljanik) +- #7809 `bbd210d` depends: some base fixes/changes (theuni) +- #7603 `73fc922` Build System: Use PACKAGE_TARNAME in NSIS script (JeremyRand) +- #7905 `187186b` test: move accounting_tests and rpc_wallet_tests to wallet/test (laanwj) +- #7911 `351abf9` leveldb: integrate leveldb into our buildsystem (theuni) +- #7944 `a407807` Re-instate TARGET_OS=linux in configure.ac. Removed by 351abf9e035 (randy-waterhouse) +- #7920 `c3e3cfb` Switch Travis to Trusty (theuni) +- #7954 `08b37c5` build: quiet annoying warnings without adding new ones (theuni) +- #7165 `06162f1` build: Enable C++11 in build, require C++11 compiler (laanwj) +- #7982 `559fbae` build: No need to check for leveldb atomics (theuni) +- #8002 `f9b4582` [depends] Add -stdlib=libc++ to darwin CXX flags (fanquake) +- #7993 `6a034ed` [depends] Bump Freetype, ccache, ZeroMQ, miniupnpc, expat (fanquake) +- #8167 `19ea173` Ship debug tarballs/zips with debug symbols (theuni) +- #8175 `f0299d8` Add --disable-bench to config flags for windows (laanwj) +- #7283 `fd9881a` [gitian] Default reference_datetime to commit author date (MarcoFalke) +- #8181 `9201ce8` Get rid of `CLIENT_DATE` (laanwj) +- #8133 `fde0ac4` Finish up out-of-tree changes (theuni) +- #8188 `65a9d7d` Add armhf/aarch64 gitian builds (theuni) +- #8194 `cca1c8c` [gitian] set correct PATH for wrappers (MarcoFalke) +- #8198 `5201614` Sync ax_pthread with upstream draft4 (fanquake) +- #8210 `12a541e` [Qt] Bump to Qt5.6.1 (jonasschnelli) +- #8285 `da50997` windows: Add testnet link to installer (laanwj) +- #8304 `0cca2fe` [travis] Update SDK_URL (MarcoFalke) +- #8310 `6ae20df` Require boost for bench (theuni) +- #8315 `2e51590` Don't require sudo for Linux (theuni) +- #8314 `67caef6` Fix pkg-config issues for 0.13 (theuni) +- #8373 `1fe7f40` Fix OSX non-deterministic dmg (theuni) +- #8358 `cfd1280` Gbuild: Set memory explicitly (default is too low) (MarcoFalke) + +### GUI + +- #7154 `00b4b8d` Add InMempool() info to transaction details (jonasschnelli) +- #7068 `5f3c670` [RPC-Tests] add simple way to run rpc test over QT clients (jonasschnelli) +- #7218 `a1c185b` Fix misleading translation (MarcoFalke) +- #7214 `be9a9a3` qt5: Use the fixed font the system recommends (MarcoFalke) +- #7256 `08ab906` Add note to coin control dialog QT5 workaround (fanquake) +- #7255 `e289807` Replace some instances of formatWithUnit with formatHtmlWithUnit (fanquake) +- #7317 `3b57e9c` Fix RPCTimerInterface ordering issue (jonasschnelli) +- #7327 `c079d79` Transaction View: LastMonth calculation fixed (crowning-) +- #7334 `e1060c5` coincontrol workaround is still needed in qt5.4 (fixed in qt5.5) (MarcoFalke) +- #7383 `ae2db67` Rename "amount" to "requested amount" in receive coins table (jonasschnelli) +- #7396 `cdcbc59` Add option to increase/decrease font size in the console window (jonasschnelli) +- #7437 `9645218` Disable tab navigation for peers tables (Kefkius) +- #7604 `354b03d` build: Remove spurious dollar sign. Fixes #7189 (dooglus) +- #7605 `7f001bd` Remove openssl info from init/log and from Qt debug window (jonasschnelli) +- #7628 `87d6562` Add 'copy full transaction details' option (ericshawlinux) +- #7613 `3798e5d` Add autocomplete to bitcoin-qt's console window (GamerSg) +- #7668 `b24266c` Fix history deletion bug after font size change (achow101) +- #7680 `41d2dfa` Remove reflection from `about` icon (laanwj) +- #7686 `f034bce` Remove 0-fee from send dialog (MarcoFalke) +- #7506 `b88e0b0` Use CCoinControl selection in CWallet::FundTransaction (promag) +- #7732 `0b98dd7` Debug window: replace "Build date" with "Datadir" (jonasschnelli) +- #7761 `60db51d` remove trailing output-index from transaction-id (jonasschnelli) +- #7772 `6383268` Clear the input line after activating autocomplete (paveljanik) +- #7925 `f604bf6` Fix out-of-tree GUI builds (laanwj) +- #7939 `574ddc6` Make it possible to show details for multiple transactions (laanwj) +- #8012 `b33824b` Delay user confirmation of send (Tyler-Hardin) +- #8006 `7c8558d` Add option to disable the system tray icon (Tyler-Hardin) +- #8046 `169d379` Fix Cmd-Q / Menu Quit shutdown on OSX (jonasschnelli) +- #8042 `6929711` Don't allow to open the debug window during splashscreen & verification state (jonasschnelli) +- #8014 `77b49ac` Sort transactions by date (Tyler-Hardin) +- #8073 `eb2f6f7` askpassphrasedialog: Clear pass fields on accept (rat4) +- #8129 `ee1533e` Fix RPC console auto completer (UdjinM6) +- #7636 `fb0ac48` Add bitcoin address label to request payment QR code (makevoid) +- #8231 `760a6c7` Fix a bug where the SplashScreen will not be hidden during startup (jonasschnelli) +- #8256 `af2421c` BUG: bitcoin-qt crash (fsb4000) +- #8257 `ff03c50` Do not ask a UI question from bitcoind (sipa) +- #8288 `91abb77` Network-specific example address (laanwj) +- #7707 `a914968` UI support for abandoned transactions (jonasschnelli) +- #8207 `f7a403b` Add a link to the Bitcoin-Core repository and website to the About Dialog (MarcoFalke) +- #8281 `6a87eb0` Remove client name from debug window (laanwj) +- #8407 `45eba4b` Add dbcache migration path (jonasschnelli) + +### Wallet + +- #7262 `fc08994` Reduce inefficiency of GetAccountAddress() (dooglus) +- #7537 `78e81b0` Warn on unexpected EOF while salvaging wallet (laanwj) +- #7521 `3368895` Don't resend wallet txs that aren't in our own mempool (morcos) +- #7576 `86a1ec5` Move wallet help string creation to CWallet (jonasschnelli) +- #7577 `5b3b5a7` Move "load wallet phase" to CWallet (jonasschnelli) +- #7608 `0735c0c` Move hardcoded file name out of log messages (MarcoFalke) +- #7649 `4900641` Prevent multiple calls to CWallet::AvailableCoins (promag) +- #7646 `e5c3511` Fix lockunspent help message (promag) +- #7558 `b35a591` Add import/removeprunedfunds rpc call (instagibbs) +- #6215 `48c5adf` add bip32 pub key serialization (jonasschnelli) +- #7913 `bafd075` Fix for incorrect locking in GetPubKey() (keystore.cpp) (yurizhykin) +- #8036 `41138f9` init: Move berkeleydb version reporting to wallet (laanwj) +- #8028 `373b50d` Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDisk (pstratem) +- #8061 `f6b7df3` Improve Wallet encapsulation (pstratem) +- #7891 `950be19` Always require OS randomness when generating secret keys (sipa) +- #7689 `b89ef13` Replace OpenSSL AES with ctaes-based version (sipa) +- #7825 `f972b04` Prevent multiple calls to ExtractDestination (pedrobranco) +- #8137 `243ac0c` Improve CWallet API with new AccountMove function (pstratem) +- #8142 `52c3f34` Improve CWallet API with new GetAccountPubkey function (pstratem) +- #8035 `b67a472` Add simplest BIP32/deterministic key generation implementation (jonasschnelli) +- #7687 `a6ddb19` Stop treating importaddress'ed scripts as change (sipa) +- #8298 `aef3811` wallet: Revert input selection post-pruning (laanwj) +- #8324 `bc94b87` Keep HD seed during salvagewallet (jonasschnelli) +- #8323 `238300b` Add HD keypath to CKeyMetadata, report metadata in validateaddress (jonasschnelli) +- #8367 `3b38a6a` Ensure <0.13 clients can't open HD wallets (jonasschnelli) +- #8378 `ebea651` Move SetMinVersion for FEATURE_HD to SetHDMasterKey (pstratem) +- #8390 `73adfe3` Correct hdmasterkeyid/masterkeyid name confusion (jonasschnelli) +- #8206 `18b8ee1` Add HD xpriv to dumpwallet (jonasschnelli) +- #8389 `c3c82c4` Create a new HD seed after encrypting the wallet (jonasschnelli) + +### Tests and QA + +- #7320 `d3dfc6d` Test walletpassphrase timeout (MarcoFalke) +- #7208 `47c5ed1` Make max tip age an option instead of chainparam (laanwj) +- #7372 `21376af` Trivial: [qa] wallet: Print maintenance (MarcoFalke) +- #7280 `668906f` [travis] Fail when documentation is outdated (MarcoFalke) +- #7177 `93b0576` [qa] Change default block priority size to 0 (MarcoFalke) +- #7236 `02676c5` Use createrawtx locktime parm in txn_clone (dgenr8) +- #7212 `326ffed` Adds unittests for CAddrMan and CAddrinfo, removes source of non-determinism (EthanHeilman) +- #7490 `d007511` tests: Remove May15 test (laanwj) +- #7531 `18cb2d5` Add bip68-sequence.py to extended rpc tests (btcdrak) +- #7536 `ce5fc02` test: test leading spaces for ParseHex (laanwj) +- #7620 `1b68de3` [travis] Only run check-doc.py once (MarcoFalke) +- #7455 `7f96671` [travis] Exit early when check-doc.py fails (MarcoFalke) +- #7667 `56d2c4e` Move GetTempPath() to testutil (musalbas) +- #7517 `f1ca891` test: script_error checking in script_invalid tests (laanwj) +- #7684 `3d0dfdb` Extend tests (MarcoFalke) +- #7697 `622fe6c` Tests: make prioritise_transaction.py more robust (sdaftuar) +- #7709 `efde86b` Tests: fix missing import in mempool_packages (sdaftuar) +- #7702 `29e1131` Add tests verifychain, lockunspent, getbalance, listsinceblock (MarcoFalke) +- #7720 `3b4324b` rpc-test: Normalize assert() (MarcoFalke) +- #7757 `26794d4` wallet: Wait for reindex to catch up (MarcoFalke) +- #7764 `a65b36c` Don't run pruning.py twice (MarcoFalke) +- #7773 `7c80e72` Fix comments in tests (btcdrak) +- #7489 `e9723cb` tests: Make proxy_test work on travis servers without IPv6 (laanwj) +- #7801 `70ac71b` Remove misleading "errorString syntax" (MarcoFalke) +- #7803 `401c65c` maxblocksinflight: Actually enable test (MarcoFalke) +- #7802 `3bc71e1` httpbasics: Actually test second connection (MarcoFalke) +- #7849 `ab8586e` tests: add varints_bitpatterns test (laanwj) +- #7846 `491171f` Clean up lockorder data of destroyed mutexes (sipa) +- #7853 `6ef5e00` py2: Unfiddle strings into bytes explicitly (MarcoFalke) +- #7878 `53adc83` [test] bctest.py: Revert faa41ee (MarcoFalke) +- #7798 `cabba24` [travis] Print the commit which was evaluated (MarcoFalke) +- #7833 `b1bf511` tests: Check Content-Type header returned from RPC server (laanwj) +- #7851 `fa9d86f` pull-tester: Don't mute zmq ImportError (MarcoFalke) +- #7822 `0e6fd5e` Add listunspent() test for spendable/unspendable UTXO (jpdffonseca) +- #7912 `59ad568` Tests: Fix deserialization of reject messages (sdaftuar) +- #7941 `0ea3941` Fixing comment in script_test.json test case (Christewart) +- #7807 `0ad1041` Fixed miner test values, gave constants for less error-prone values (instagibbs) +- #7980 `88b77c7` Smartfees: Properly use ordered dict (MarcoFalke) +- #7814 `77b637f` Switch to py3 (MarcoFalke) +- #8030 `409a8a1` Revert fatal-ness of missing python-zmq (laanwj) +- #8018 `3e90fe6` Autofind rpc tests --srcdir (jonasschnelli) +- #8016 `5767e80` Fix multithread CScheduler and reenable test (paveljanik) +- #7972 `423ca30` pull-tester: Run rpc test in parallel (MarcoFalke) +- #8039 `69b3a6d` Bench: Add crypto hash benchmarks (laanwj) +- #8041 `5b736dd` Fix bip9-softforks blockstore issue (MarcoFalke) +- #7994 `1f01443` Add op csv tests to script_tests.json (Christewart) +- #8038 `e2bf830` Various minor fixes (MarcoFalke) +- #8072 `1b87e5b` Travis: 'make check' in parallel and verbose (theuni) +- #8056 `8844ef1` Remove hardcoded "4 nodes" from test_framework (MarcoFalke) +- #8047 `37f9a1f` Test_framework: Set wait-timeout for bitcoind procs (MarcoFalke) +- #8095 `6700cc9` Test framework: only cleanup on successful test runs (sdaftuar) +- #8098 `06bd4f6` Test_framework: Append portseed to tmpdir (MarcoFalke) +- #8104 `6ff2c8d` Add timeout to sync_blocks() and sync_mempools() (sdaftuar) +- #8111 `61b8684` Benchmark SipHash (sipa) +- #8107 `52b803e` Bench: Added base58 encoding/decoding benchmarks (yurizhykin) +- #8115 `0026e0e` Avoid integer division in the benchmark inner-most loop (gmaxwell) +- #8090 `a2df115` Adding P2SH(p2pkh) script test case (Christewart) +- #7992 `ec45cc5` Extend #7956 with one more test (TheBlueMatt) +- #8139 `ae5575b` Fix interrupted HTTP RPC connection workaround for Python 3.5+ (sipa) +- #8164 `0f24eaf` [Bitcoin-Tx] fix missing test fixtures, fix 32bit atoi issue (jonasschnelli) +- #8166 `0b5279f` Src/test: Do not shadow local variables (paveljanik) +- #8141 `44c1b1c` Continuing port of java comparison tool (mrbandrews) +- #8201 `36b7400` fundrawtransaction: Fix race, assert amounts (MarcoFalke) +- #8214 `ed2cd59` Mininode: fail on send_message instead of silent return (MarcoFalke) +- #8215 `a072d1a` Don't use floating point in wallet tests (MarcoFalke) +- #8066 `65c2058` Test_framework: Use different rpc_auth_pair for each node (MarcoFalke) +- #8216 `0d41d70` Assert 'changePosition out of bounds' (MarcoFalke) +- #8222 `961893f` Enable mempool consistency checks in unit tests (sipa) +- #7751 `84370d5` test_framework: python3.4 authproxy compat (laanwj) +- #7744 `d8e862a` test_framework: detect failure of bitcoind startup (laanwj) +- #8280 `115735d` Increase sync_blocks() timeouts in pruning.py (MarcoFalke) +- #8340 `af9b7a9` Solve trivial merge conflict in p2p-segwit.py (MarcoFalke) +- #8067 `3e4cf8f` Travis: use slim generic image, and some fixups (theuni) +- #7951 `5c7df70` Test_framework: Properly print exception (MarcoFalke) +- #8070 `7771aa5` Remove non-determinism which is breaking net_tests #8069 (EthanHeilman) +- #8309 `bb2646a` Add wallet-hd test (MarcoFalke) +- #8444 `cd0910b` Fix p2p-feefilter.py for changed tx relay behavior (sdaftuar) + +### Mining + +- #7507 `11c7699` Remove internal miner (Leviathn) +- #7663 `c87f51e` Make the generate RPC call function for non-regtest (sipa) +- #7671 `e2ebd25` Add generatetoaddress RPC to mine to an address (achow101) +- #7935 `66ed450` Versionbits: GBT support (luke-jr) +- #7600 `66db2d6` Select transactions using feerate-with-ancestors (sdaftuar) +- #8295 `f5660d3` Mining-related fixups for 0.13.0 (sdaftuar) +- #7796 `536b75e` Add support for negative fee rates, fixes `prioritizetransaction` (MarcoFalke) +- #8362 `86edc20` Scale legacy sigop count in CreateNewBlock (sdaftuar) +- #8489 `8b0eee6` Bugfix: Use pre-BIP141 sigops until segwit activates (GBT) (luke-jr) + +### Documentation and miscellaneous + +- #7423 `69e2a40` Add example for building with constrained resources (jarret) +- #8254 `c2c69ed` Add OSX ZMQ requirement to QA readme (fanquake) +- #8203 `377d131` Clarify documentation for running a tor node (nathaniel-mahieu) +- #7428 `4b12266` Add example for listing ./configure flags (nathaniel-mahieu) +- #7847 `3eae681` Add arch linux build example (mruddy) +- #7968 `ff69aaf` Fedora build requirements (wtogami) +- #8013 `fbedc09` Fedora build requirements, add gcc-c++ and fix typo (wtogami) +- #8009 `fbd8478` Fixed invalid example paths in gitian-building.md (JeremyRand) +- #8240 `63fbdbc` Mention Windows XP end of support in release notes (laanwj) +- #8303 `5077d2c` Update bips.md for CSV softfork (fanquake) +- #7789 `e0b3e19` Add note about using the Qt official binary installer (paveljanik) +- #7791 `e30a5b0` Change Precise to Trusty in gitian-building.md (JeremyRand) +- #7838 `8bb5d3d` Update gitian build guide to debian 8.4.0 (fanquake) +- #7855 `b778e59` Replace precise with trusty (MarcoFalke) +- #7975 `fc23fee` Update bitcoin-core GitHub links (MarcoFalke) +- #8034 `e3a8207` Add basic git squash workflow (fanquake) +- #7813 `214ec0b` Update port in tor.md (MarcoFalke) +- #8193 `37c9830` Use Debian 8.5 in the gitian-build guide (fanquake) +- #8261 `3685e0c` Clarify help for `getblockchaininfo` (paveljanik) +- #7185 `ea0f5a2` Note that reviewers should mention the id of the commits they reviewed (pstratem) +- #7290 `c851d8d` [init] Add missing help for args (MarcoFalke) +- #7281 `f9fd4c2` Improve CheckInputs() comment about sig verification (petertodd) +- #7417 `1e06bab` Minor improvements to the release process (PRabahy) +- #7444 `4cdbd42` Improve block validity/ConnectBlock() comments (petertodd) +- #7527 `db2e1c0` Fix and cleanup listreceivedbyX documentation (instagibbs) +- #7541 `b6e00af` Clarify description of blockindex (pinheadmz) +- #7590 `f06af57` Improving wording related to Boost library requirements [updated] (jonathancross) +- #7635 `0fa88ef` Add dependency info to test docs (elliotolds) +- #7609 `3ba07bd` RPM spec file project (AliceWonderMiscreations) +- #7850 `229a17c` Removed call to `TryCreateDirectory` from `GetDefaultDataDir` in `src/util.cpp` (alexreg) +- #7888 `ec870e1` Prevector: fix 2 bugs in currently unreached code paths (kazcw) +- #7922 `90653bc` CBase58Data::SetString: cleanse the full vector (kazcw) +- #7881 `c4e8390` Update release process (laanwj) +- #7952 `a9c8b74` Log invalid block hash to make debugging easier (paveljanik) +- #7974 `8206835` More comments on the design of AttemptToEvictConnection (gmaxwell) +- #7795 `47a7cfb` UpdateTip: log only one line at most per block (laanwj) +- #8110 `e7e25ea` Add benchmarking notes (fanquake) +- #8121 `58f0c92` Update implemented BIPs list (fanquake) +- #8029 `58725ba` Simplify OS X build notes (fanquake) +- #8143 `d46b8b5` comment nit: miners don't vote (instagibbs) +- #8136 `22e0b35` Log/report in 10% steps during VerifyDB (jonasschnelli) +- #8168 `d366185` util: Add ParseUInt32 and ParseUInt64 (laanwj) +- #8178 `f7b1bfc` Add git and github tips and tricks to developer notes (sipa) +- #8177 `67db011` developer notes: updates for C++11 (kazcw) +- #8229 `8ccdac1` [Doc] Update OS X build notes for 10.11 SDK (fanquake) +- #8233 `9f1807a` Mention Linux ARM executables in release process and notes (laanwj) +- #7540 `ff46dd4` Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY (btcdrak) +- #8289 `26316ff` bash-completion: Adapt for 0.12 and 0.13 (roques) +- #7453 `3dc3149` Missing patches from 0.12 (MarcoFalke) +- #7113 `54a550b` Switch to a more efficient rolling Bloom filter (sipa) +- #7257 `de9e5ea` Combine common error strings for different options so translations can be shared and reused (luke-jr) +- #7304 `b8f485c` [contrib] Add clang-format-diff.py (MarcoFalke) +- #7378 `e6f97ef` devtools: replace github-merge with python version (laanwj) +- #7395 `0893705` devtools: show pull and commit information in github-merge (laanwj) +- #7402 `6a5932b` devtools: github-merge get toplevel dir without extra whitespace (achow101) +- #7425 `20a408c` devtools: Fix utf-8 support in messages for github-merge (laanwj) +- #7632 `409f843` Delete outdated test-patches reference (Lewuathe) +- #7662 `386f438` remove unused NOBLKS_VERSION_{START,END} constants (rat4) +- #7737 `aa0d2b2` devtools: make github-merge.py use py3 (laanwj) +- #7781 `55db5f0` devtools: Auto-set branch to merge to in github-merge (laanwj) +- #7934 `f17032f` Improve rolling bloom filter performance and benchmark (sipa) +- #8004 `2efe38b` signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (catilac) +- #7713 `f6598df` Fixes for verify-commits script (petertodd) +- #8412 `8360d5b` libconsensus: Expose a flag for BIP112 (jtimon) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- 21E14 +- accraze +- Adam Brown +- Alexander Regueiro +- Alex Morcos +- Alfie John +- Alice Wonder +- AlSzacrel +- Andrew Chow +- Andrés G. Aragoneses +- Bob McElrath +- BtcDrak +- calebogden +- Cédric Félizard +- Chirag Davé +- Chris Moore +- Chris Stewart +- Christian von Roques +- Chris Wheeler +- Cory Fields +- crowning- +- Daniel Cousens +- Daniel Kraft +- Denis Lukianov +- Elias Rohrer +- Elliot Olds +- Eric Shaw +- error10 +- Ethan Heilman +- face +- fanquake +- Francesco 'makevoid' Canessa +- fsb4000 +- Gavin Andresen +- gladoscc +- Gregory Maxwell +- Gregory Sanders +- instagibbs +- James O'Beirne +- Jannes Faber +- Jarret Dyrbye +- Jeremy Rand +- jloughry +- jmacwhyte +- Joao Fonseca +- Johnson Lau +- Jonas Nick +- Jonas Schnelli +- Jonathan Cross +- João Barbosa +- Jorge Timón +- Kaz Wesley +- Kefkius +- kirkalx +- Krzysztof Jurewicz +- Leviathn +- lewuathe +- Luke Dashjr +- Luv Khemani +- Marcel Krüger +- Marco Falke +- Mark Friedenbach +- Matt +- Matt Bogosian +- Matt Corallo +- Matthew English +- Matthew Zipkin +- mb300sd +- Mitchell Cash +- mrbandrews +- mruddy +- Murch +- Mustafa +- Nathaniel Mahieu +- Nicolas Dorier +- Patrick Strateman +- Paul Rabahy +- paveljanik +- Pavel Janík +- Pavel Vasin +- Pedro Branco +- Peter Todd +- Philip Kaufmann +- Pieter Wuille +- Prayag Verma +- ptschip +- Puru +- randy-waterhouse +- R E Broadley +- Rusty Russell +- Suhas Daftuar +- Suriyaa Kudo +- TheLazieR Yip +- Thomas Kerin +- Tom Harding +- Tyler Hardin +- UdjinM6 +- Warren Togami +- Will Binns +- Wladimir J. van der Laan +- Yuri Zhykin + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From a5cef7b0777f13ac83312759ebf576c9d773599f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 18 Oct 2016 00:15:59 +0200 Subject: [PATCH 186/302] Bump version to 0.13.1 --- configure.ac | 2 +- doc/Doxyfile | 2 +- doc/README.md | 2 +- doc/README_windows.txt | 2 +- src/clientversion.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index a545bc57b7c..97b330449f1 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, 13) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2016) diff --git a/doc/Doxyfile b/doc/Doxyfile index 93da55fbbe8..b088c7623f0 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.13.0 +PROJECT_NUMBER = 0.13.1 # 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 7aa82e1d527..25a280155ca 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Bitcoin Core 0.13.0 +Bitcoin Core 0.13.1 ===================== Setup diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 3f41db14b04..1127ea76654 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin Core 0.13.0 +Bitcoin Core 0.13.1 ===================== Intro diff --git a/src/clientversion.h b/src/clientversion.h index 30f557526a3..74d0a94bfab 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 13 -#define CLIENT_VERSION_REVISION 0 +#define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build From 3f508edcfb92f80092ed1ac4ccc3c33b2f20d207 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 1 Oct 2016 16:57:25 +0200 Subject: [PATCH 187/302] rpc: Generate auth cookie in hex instead of base64 Base64 contains '/', and the '/' character in credentials is problematic for AuthServiceProxy which represents the RPC endpoint as an URI with user and password embedded. Closes #8399. Github-Pull: #8858 Rebased-From: 1c80386bceb216ca5b5da657e03a29f9c779d58b --- src/rpc/protocol.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index f5275062a24..bb885bb5a65 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -77,9 +77,10 @@ boost::filesystem::path GetAuthCookieFile() bool GenerateAuthCookie(std::string *cookie_out) { - unsigned char rand_pwd[32]; - GetRandBytes(rand_pwd, 32); - std::string cookie = COOKIEAUTH_USER + ":" + EncodeBase64(&rand_pwd[0],32); + const size_t COOKIE_SIZE = 32; + unsigned char rand_pwd[COOKIE_SIZE]; + GetRandBytes(rand_pwd, COOKIE_SIZE); + std::string cookie = COOKIEAUTH_USER + ":" + HexStr(rand_pwd, rand_pwd+COOKIE_SIZE); /** the umask determines what permissions are used to create this file - * these are set to 077 in init.cpp unless overridden with -sysperms. From 685e4c78f8ed3c25043f395125d7fc57d8183fef Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 17 Oct 2016 16:29:03 -0400 Subject: [PATCH 188/302] Remove bogus assert on number of oubound connections. This value can be significantly higher if the users uses addnode Github-Pull: #8944 Rebased-From: 1ab21cf344ed0547de5ae679b7e479cb4b1a923b --- src/net.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index e44c66c2a09..42fde435308 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1655,7 +1655,6 @@ void ThreadOpenConnections() } } } - assert(nOutbound <= (MAX_OUTBOUND_CONNECTIONS + MAX_FEELER_CONNECTIONS)); // Feeler Connections // From d179eed6ca9555da6d78e2ccf41e2454951d18e3 Mon Sep 17 00:00:00 2001 From: mruddy Date: Tue, 18 Oct 2016 11:20:47 -0400 Subject: [PATCH 189/302] doc: update 0.13.1 release note info on linux arm builds [skip ci] --- doc/release-notes.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index d107f305d63..0868fbc3d50 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -127,6 +127,33 @@ Low-level RPC changes than two arguments. +Linux ARM builds +---------------- + +With the 0.13.0 release, pre-built Linux ARM binaries were added to the set of +uploaded executables. Additional detail on the ARM architecture targeted by each +is provided below. + +The following extra files can be found in the download directory or torrent: + +- `bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz`: Linux binaries targeting + the 32-bit ARMv7-A architecture. +- `bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz`: Linux binaries targeting + the 64-bit ARMv8-A architecture. + +ARM builds are still experimental. If you have problems on a certain device or +Linux distribution combination please report them on the bug tracker, it may be +possible to resolve them. Note that the device you use must be (backward) +compatible with the architecture targeted by the binary that you use. +For example, a Raspberry Pi 2 Model B or Raspberry Pi 3 Model B (in its 32-bit +execution state) device, can run the 32-bit ARMv7-A targeted binary. However, +no model of Raspberry Pi 1 device can run either binary because they are all +ARMv6 architecture devices that are not compatible with ARMv7-A or ARMv8-A. + +Note that Android is not considered ARM Linux in this context. The executables +are not expected to work out of the box on Android. + + 0.13.1 Change log ================= From 33cd5539b2f96a1cc4f7a660e317d3484eb6ffc4 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Mon, 17 Oct 2016 23:08:52 +0000 Subject: [PATCH 190/302] Be more aggressive in connecting to peers with relevant services. Only allow skipping relevant services until there are four outbound connections up. This avoids quickly filling up with peers lacking the relevant services when addrman has few or none of them. Github-Pull: #8949 Rebased-From: 9583477288072e203541b747fcffe8d50cfefb8d --- src/net.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index 42fde435308..b28ce0b8a36 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1707,8 +1707,8 @@ void ThreadOpenConnections() if (nANow - addr.nLastTry < 600 && nTries < 30) continue; - // only consider nodes missing relevant services after 40 failed attempts - if ((addr.nServices & nRelevantServices) != nRelevantServices && nTries < 40) + // only consider nodes missing relevant services after 40 failed attempts and only if less than half the outbound are up. + if ((addr.nServices & nRelevantServices) != nRelevantServices && (nTries < 40 || nOutbound >= (nMaxOutbound >> 1))) continue; // do not allow non-default ports, unless after 50 invalid addresses selected already From 91ae0b06b9d56a06bd0aae498571a7785ee385ee Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Mon, 17 Oct 2016 23:11:35 +0000 Subject: [PATCH 191/302] Make dnsseed's definition of acute need include relevant services. We normally prefer to connect to peers offering the relevant services. If we're not connected to enough peers with relevant services, we probably don't know about them and could use dnsseed's help. Github-Pull: #8949 Rebased-From: 46304791353d2bb61004a035869612620c30b4eb --- src/net.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index b28ce0b8a36..9bfdb9bc2e4 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1497,12 +1497,19 @@ static std::string GetDNSHost(const CDNSSeedData& data, ServiceFlags* requiredSe void ThreadDNSAddressSeed() { // goal: only query DNS seeds if address need is acute + // Avoiding DNS seeds when we don't need them improves user privacy by + // creating fewer identifying DNS requests, reduces trust by giving seeds + // less influence on the network topology, and reduces traffic to the seeds. if ((addrman.size() > 0) && (!GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED))) { MilliSleep(11 * 1000); LOCK(cs_vNodes); - if (vNodes.size() >= 2) { + int nRelevant = 0; + for (auto pnode : vNodes) { + nRelevant += pnode->fSuccessfullyConnected && ((pnode->nServices & nRelevantServices) == nRelevantServices); + } + if (nRelevant >= 2) { LogPrintf("P2P peers available. Skipped DNS seeding.\n"); return; } From 7c2bf4b1759b4d2fe7291649ed25bb8e90ad9dc2 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 18 Oct 2016 07:17:19 +0000 Subject: [PATCH 192/302] RPC/Mining: getblocktemplate: Update and fix formatting of help Github-Pull: #8951 Rebased-From: 59daa58d6a17bb1170c724f2d01d43c2ec21a9b4 --- src/rpc/mining.cpp | 66 +++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index a26340f3e42..14a61a55dd8 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -320,67 +320,73 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) { if (fHelp || params.size() > 1) throw runtime_error( - "getblocktemplate ( \"jsonrequestobject\" )\n" + "getblocktemplate ( TemplateRequest )\n" "\nIf the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'.\n" "It returns data needed to construct a block to work on.\n" - "For full specification, see BIPs 22 and 9:\n" + "For full specification, see BIPs 22, 23, 9, and 145:\n" " https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki\n" + " https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki\n" " https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes\n" + " https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki\n" "\nArguments:\n" - "1. \"jsonrequestobject\" (string, optional) A json object in the following spec\n" + "1. TemplateRequest (json object, optional) A json object in the following spec\n" " {\n" - " \"mode\":\"template\" (string, optional) This must be set to \"template\" or omitted\n" - " \"capabilities\":[ (array, optional) A list of strings\n" - " \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'\n" + " \"mode\":\"template\" (string, optional) This must be set to \"template\", \"proposal\" (see BIP 23), or omitted\n" + " \"capabilities\":[ (array, optional) A list of strings\n" + " \"support\" (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid'\n" " ,...\n" - " ]\n" + " ],\n" + " \"rules\":[ (array, optional) A list of strings\n" + " \"support\" (string) client side supported softfork deployment\n" + " ,...\n" + " ]\n" " }\n" "\n" "\nResult:\n" "{\n" - " \"version\" : n, (numeric) The block version\n" + " \"version\" : n, (numeric) The preferred block version\n" " \"rules\" : [ \"rulename\", ... ], (array of strings) specific block rules that are to be enforced\n" " \"vbavailable\" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments\n" - " \"rulename\" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule\n" + " \"rulename\" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule\n" " ,...\n" " },\n" " \"vbrequired\" : n, (numeric) bit mask of versionbits the server requires set in submissions\n" - " \"previousblockhash\" : \"xxxx\", (string) The hash of current highest block\n" + " \"previousblockhash\" : \"xxxx\", (string) The hash of current highest block\n" " \"transactions\" : [ (array) contents of non-coinbase transactions that should be included in the next block\n" " {\n" - " \"data\" : \"xxxx\", (string) transaction data encoded in hexadecimal (byte-for-byte)\n" - " \"txid\" : \"xxxx\", (string) transaction id encoded in little-endian hexadecimal\n" - " \"hash\" : \"xxxx\", (string) hash encoded in little-endian hexadecimal (including witness data)\n" - " \"depends\" : [ (array) array of numbers \n" - " n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is\n" + " \"data\" : \"xxxx\", (string) transaction data encoded in hexadecimal (byte-for-byte)\n" + " \"txid\" : \"xxxx\", (string) transaction id encoded in little-endian hexadecimal\n" + " \"hash\" : \"xxxx\", (string) hash encoded in little-endian hexadecimal (including witness data)\n" + " \"depends\" : [ (array) array of numbers \n" + " n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is\n" " ,...\n" " ],\n" - " \"fee\": n, (numeric) difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one\n" - " \"sigops\" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero\n" - " \"weight\" : n, (numeric) total transaction weight, as counted for purposes of block limits\n" - " \"required\" : true|false (boolean) if provided and true, this transaction must be in the final block\n" + " \"fee\": n, (numeric) difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one\n" + " \"sigops\" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero\n" + " \"weight\" : n, (numeric) total transaction weight, as counted for purposes of block limits\n" + " \"required\" : true|false (boolean) if provided and true, this transaction must be in the final block\n" " }\n" " ,...\n" " ],\n" - " \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n" - " \"flags\" : \"flags\" (string) \n" + " \"coinbaseaux\" : { (json object) data that should be included in the coinbase's scriptSig content\n" + " \"flags\" : \"xx\" (string) key name is to be ignored, and value included in scriptSig\n" " },\n" - " \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)\n" - " \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n" - " \"target\" : \"xxxx\", (string) The hash target\n" - " \"mintime\" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)\n" - " \"mutable\" : [ (array of string) list of ways the block template may be changed \n" - " \"value\" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n" + " \"coinbasevalue\" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)\n" + " \"coinbasetxn\" : { ... }, (json object) information for coinbase transaction\n" + " \"target\" : \"xxxx\", (string) The hash target\n" + " \"mintime\" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)\n" + " \"mutable\" : [ (array of string) list of ways the block template may be changed \n" + " \"value\" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock'\n" " ,...\n" " ],\n" - " \"noncerange\" : \"00000000ffffffff\", (string) A range of valid nonces\n" - " \"sigoplimit\" : n, (numeric) cost limit of sigops in blocks\n" + " \"noncerange\" : \"00000000ffffffff\",(string) A range of valid nonces\n" + " \"sigoplimit\" : n, (numeric) limit of sigops in blocks\n" " \"sizelimit\" : n, (numeric) limit of block size\n" " \"weightlimit\" : n, (numeric) limit of block weight\n" " \"curtime\" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT)\n" - " \"bits\" : \"xxx\", (string) compressed target of next block\n" + " \"bits\" : \"xxxxxxxx\", (string) compressed target of next block\n" " \"height\" : n (numeric) The height of the next block\n" "}\n" From 53e6196a90a8503c5a79a3542421878bd6109a9d Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 19 Oct 2016 09:34:44 +0000 Subject: [PATCH 193/302] qt: pre-rc2 translations update --- src/qt/locale/bitcoin_es.ts | 186 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 183 insertions(+), 3 deletions(-) diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index aa0ebd2924c..a0b188e5b7d 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -41,10 +41,74 @@ &Delete &Eliminar - + + Choose the address to send coins to + Seleccione la dirección a la que enviar monedas + + + Choose the address to receive coins with + Seleccione la dirección de la que recibir monedas + + + Sending addresses + Enviando direcciones + + + Receiving addresses + Recibiendo direcciones + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estas son sus direcciones Bitcoin para enviar pagos. Verifique siempre la cantidad y la dirección de recibimiento antes de enviar monedas. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Estas son sus direcciones Bitcoin para recibir pagos. Se recomienda utilizar una nueva dirección de recibimiento para cada transacción + + + &Copy Address + &Copiar Dirección + + + Copy &Label + Copiar &Etiqueta + + + &Edit + &Editar + + + Export Address List + Exportar lista de direcciones + + + Comma separated file (*.csv) + Archivo separado de coma (*.csv) + + + Exporting Failed + Falló la exportación + + + There was an error trying to save the address list to %1. Please try again. + Había un error intentando guardar la lista de direcciones en %1. Por favor inténtelo de nuevo. + + AddressTableModel - + + Label + Etiqueta + + + Address + Dirección + + + (no label) + (sin etiqueta) + + AskPassphraseDialog @@ -63,6 +127,74 @@ Repeat new passphrase Repita la nueva contraseña + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Introduzca la nueva frase clave del monedero. <br/>Por favor utilice una frase clave de <b>diez o más carácteres aleatorios</b>, o <b>ocho o más palabras</b>. + + + Encrypt wallet + Monedero encriptado + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operación necesita su frase clave de monedero para desbloquear el monedero. + + + Unlock wallet + Desbloquear monedero + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operación necesita su frase clave de cartera para desencriptar el monedero. + + + Decrypt wallet + Desencriptar monedero + + + Change passphrase + Cambiar frase clave + + + Enter the old passphrase and new passphrase to the wallet. + Introduzca la vieja frase clave y la nueva flase clave para el monedero. + + + Confirm wallet encryption + Confirmar encriptación del monedero + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Advertencia: Si encripta su monedero y pierde su frase clave <b>PERDERÁ TODOS SUS BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + ¿Seguro que desea encriptar su monedero? + + + Wallet encrypted + Monedero encriptado + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 se cerrará ahora para terminar el proceso de encriptación. Recuerde que encriptar su monedero no puede proteger completamente su monedero de ser robado por malware que infecte su ordenador. + + + 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. + IMPORTANTE: Cualquier copia de seguridad anterior que haya hecho en su archivo de monedero debería ser reemplazada con el archivo de monedero encriptado generado recientemente. Por razones de seguridad, las copias de seguridad anteriores del archivo de monedero desencriptado serán inútiles en cuanto empiece a utilizar el nuevo monedero encriptado. + + + Wallet encryption failed + Fracasó la encriptación de monedero + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Falló la encriptación del monedero debido a un error interno. Su monedero no fue encriptado. + + + The supplied passphrases do not match. + La frase clave introducida no coincide. + BanTableModel @@ -466,6 +598,10 @@ Priority Prioridad + + (no label) + (sin etiqueta) + EditAddressDialog @@ -1376,9 +1512,25 @@ &Save Image... Guardar Imagen... + + Address + Dirección + + + Label + Etiqueta + RecentRequestsTableModel + + Label + Etiqueta + + + (no label) + (sin etiqueta) + SendCoinsDialog @@ -1530,7 +1682,11 @@ S&end &Enviar - + + (no label) + (sin etiqueta) + + SendCoinsEntry @@ -1737,9 +1893,33 @@ TransactionTableModel + + Label + Etiqueta + + + (no label) + (sin etiqueta) + TransactionView + + Comma separated file (*.csv) + Archivo separado de coma (*.csv) + + + Label + Etiqueta + + + Address + Dirección + + + Exporting Failed + Falló la exportación + UnitDisplayStatusBarControl From 0dbc48a5bd831816870940287dc1131b30cf613d Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 19 Oct 2016 11:48:23 +0200 Subject: [PATCH 194/302] nMaxOutbound is MAX_OUTBOUND_CONNECTIONS on 0.13 Github-Pull: #8949 --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 9bfdb9bc2e4..06fc3fdb859 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1715,7 +1715,7 @@ void ThreadOpenConnections() continue; // only consider nodes missing relevant services after 40 failed attempts and only if less than half the outbound are up. - if ((addr.nServices & nRelevantServices) != nRelevantServices && (nTries < 40 || nOutbound >= (nMaxOutbound >> 1))) + if ((addr.nServices & nRelevantServices) != nRelevantServices && (nTries < 40 || nOutbound >= (MAX_OUTBOUND_CONNECTIONS >> 1))) continue; // do not allow non-default ports, unless after 50 invalid addresses selected already From 6e8936032fb865c0448bec0e0f168e041a586285 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 19 Oct 2016 11:58:19 +0200 Subject: [PATCH 195/302] doc: Update release notes for rc2 --- doc/release-notes.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 0868fbc3d50..ba6f0ed609e 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -173,6 +173,8 @@ git merge commit are mentioned. - #8780 `794b007` Deprecate getinfo (MarcoFalke) - #8832 `83ad563` Throw JSONRPCError when utxo set can not be read (MarcoFalke) - #8884 `b987348` getblockchaininfo help: pruneheight is the lowest, not highest, block (luke-jr) +- #8858 `3f508ed` rpc: Generate auth cookie in hex instead of base64 (laanwj) +- #8951 `7c2bf4b` RPC/Mining: getblocktemplate: Update and fix formatting of help (luke-jr) ### Block and transaction handling - #8611 `a9429ca` Reduce default number of blocks to check at startup (sipa) @@ -195,6 +197,8 @@ git merge commit are mentioned. - #8606 `bbf379b` Fix some locks (sipa) - #8594 `ab295bb` Do not add random inbound peers to addrman (gmaxwell) - #8940 `5b4192b` Add x9 service bit support to dnsseed.bluematt.me, seed.bitcoinstats.com (TheBlueMatt, cdecker) +- #8944 `685e4c7` Remove bogus assert on number of oubound connections. (TheBlueMatt) +- #8949 `0dbc48a` Be more agressive in getting connections to peers with relevant services (gmaxwell) ### Build system - #8293 `fa5b249` Allow building libbitcoinconsensus without any univalue (luke-jr) @@ -292,6 +296,7 @@ Thanks to everyone who directly contributed to this release: - Cory Fields - crowning- - Dagur Valberg Johannsson +- David A. Harding - Ethan Heilman - fanquake - Gaurav Rana @@ -311,7 +316,9 @@ Thanks to everyone who directly contributed to this release: - MarcoFalke - Marty Jones - Matt Corallo +- Micha - Michael Ford +- mruddy - Pavel Janík - Pieter Wuille - rodasmith From 5f6b312e51dadaf40ea68c0f85bbb4e51fa987f1 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 20 Oct 2016 12:26:42 +0200 Subject: [PATCH 196/302] doc: Add missing credit to release notes (Eric participated in Segwit work but has no direct commits, so should be mentioned) --- doc/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index ba6f0ed609e..9f12dca78b7 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -297,6 +297,7 @@ Thanks to everyone who directly contributed to this release: - crowning- - Dagur Valberg Johannsson - David A. Harding +- Eric Lombrozo - Ethan Heilman - fanquake - Gaurav Rana From c9a5baddeef3d8721a7c71acf070f92a3d8d43a3 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 20 Oct 2016 13:02:07 +0200 Subject: [PATCH 197/302] doc: Update blurb in release notes Minor version, not major version. --- doc/release-notes.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 9f12dca78b7..dbb3d5f3f61 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -2,8 +2,9 @@ Bitcoin Core version 0.13.1 is now available from: -This is a new major version release, including new features, various bugfixes -and performance improvements, as well as updated translations. +This is a new minor version release, including activation parameters for the +segwit softfork, various bugfixes and performance improvements, as well as +updated translations. Please report bugs using the issue tracker at github: From 99f5cf189313c6056b06410dc858363ba6fc2807 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 25 Oct 2016 11:30:28 +0000 Subject: [PATCH 198/302] release-notes: Update from blog draft --- doc/release-notes.md | 122 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 98 insertions(+), 24 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index dbb3d5f3f61..0941290c8cd 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -44,28 +44,102 @@ Segregated witness soft fork Segregated witness (segwit) is a soft fork that, if activated, will allow transaction-producing software to separate (segregate) transaction -signatures (witnesses) from the rest of the data in a transaction, and -to allow miners to place those witnesses outside of the traditional -block structure. This provides two immediate benefits: - -- **Elimination of malleability:** Segregating the witness allows both - existing software and upgraded software that receives transactions to - calculate the transaction identifier (txid) of segwit-using - transactions without referencing the witness. This solves all known - cases of unwanted third-party transaction malleability, which is a - problem that makes programming Bitcoin wallet software more difficult - and which seriously complicates the design of smart contracts for - Bitcoin. - -- **Capacity increase:** Moving witness data outside of the traditional - block structure (but still inside a new-style block structure) means - new-style blocks can hold more data than older-style blocks, allowing - a modest increase to the amount of transaction data that can fit in a - block. - -Segwit also simplifies the ability to add new features to Bitcoin and -improves the efficiency of full nodes, which will help provide long-term -benefits to Bitcoin users. +signatures (witnesses) from the part of the data in a transaction that is +covered by the txid. This provides several immediate benefits: + +- **Elimination of unwanted transaction malleability:** Segregating the witness + allows both existing and upgraded software to calculate the transaction + identifier (txid) of transactions without referencing the witness, which can + sometimes be changed by third-parties (such as miners) or by co-signers in a + multisig spend. This solves all known cases of unwanted transaction + malleability, which is a problem that makes programming Bitcoin wallet + software more difficult and which seriously complicates the design of smart + contracts for Bitcoin. + +- **Capacity increase:** Segwit transactions contain new fields that are not + part of the data currently used to calculate the size of a block, which + allows a block containing segwit transactions to hold more data than allowed + by the current maximum block size. Estimates based on the transactions + currently found in blocks indicate that if all wallets switch to using + segwit, the network will be able to support about 70% more transactions. The + network will also be able to support more of the advanced-style payments + (such as multisig) than it can support now because of the different weighting + given to different parts of a transaction after segwit activates (see the + following section for details). + +- **Weighting data based on how it affects node performance:** Some parts of + each Bitcoin block need to be stored by nodes in order to validate future + blocks; other parts of a block can be immediately forgotten (pruned) or used + only for helping other nodes sync their copy of the block chain. One large + part of the immediately prunable data are transaction signatures (witnesses), + and segwit makes it possible to give a different "weight" to segregated + witnesses to correspond with the lower demands they place on node resources. + Specifically, each byte of a segregated witness is given a weight of 1, each + other byte in a block is given a weight of 4, and the maximum allowed weight + of a block is 4 million. Weighting the data this way better aligns the most + profitable strategy for creating blocks with the long-term costs of block + validation. + +- **Signature covers value:** A simple improvement in the way signatures are + generated in segwit simplifies the design of secure signature generators + (such as hardware wallets), reduces the amount of data the signature + generator needs to download, and allows the signature generator to operate + more quickly. This is made possible by having the generator sign the amount + of bitcoins they think they are spending, and by having full nodes refuse to + accept those signatures unless the amount of bitcoins being spent is exactly + the same as was signed. For non-segwit transactions, wallets instead had to + download the complete previous transactions being spent for every payment + they made, which could be a slow operation on hardware wallets and in other + situations where bandwidth or computation speed was constrained. + +- **Linear scaling of sighash operations:** In 2015 a block was produced that + required about 25 seconds to validate on modern hardware because of the way + transaction signature hashes are performed. Other similar blocks, or blocks + that could take even longer to validate, can still be produced today. The + problem that caused this can't be fixed in a soft fork without unwanted + side-effects, but transactions that opt-in to using segwit will now use a + different signature method that doesn't suffer from this problem and doesn't + have any unwanted side-effects. + +- **Increased security for multisig:** Bitcoin addresses (both P2PKH addresses + that start with a '1' and P2SH addresses that start with a '3') use a hash + function known as RIPEMD-160. For P2PKH addresses, this provides about 160 + bits of security---which is beyond what cryptographers believe can be broken + today. But because P2SH is more flexible, only about 80 bits of security is + provided per address. Although 80 bits is very strong security, it is within + the realm of possibility that it can be broken by a powerful adversary. + Segwit allows advanced transactions to use the SHA256 hash function instead, + which provides about 128 bits of security (that is 281 trillion times as + much security as 80 bits and is equivalent to the maximum bits of security + believed to be provided by Bitcoin's choice of parameters for its Elliptic + Curve Digital Security Algorithm [ECDSA].) + +- **More efficient almost-full-node security** Satoshi Nakamoto's original + Bitcoin paper describes a method for allowing newly-started full nodes to + skip downloading and validating some data from historic blocks that are + protected by large amounts of proof of work. Unfortunately, Nakamoto's + method can't guarantee that a newly-started node using this method will + produce an accurate copy of Bitcoin's current ledger (called the UTXO set), + making the node vulnerable to falling out of consensus with other nodes. + Although the problems with Nakamoto's method can't be fixed in a soft fork, + Segwit accomplishes something similar to his original proposal: it makes it + possible for a node to optionally skip downloading some blockchain data + (specifically, the segregated witnesses) while still ensuring that the node + can build an accurate copy of the UTXO set for the block chain with the most + proof of work. Segwit enables this capability at the consensus layer, but + note that Bitcoin Core does not provide an option to use this capability as + of this 0.13.1 release. + +- **Script versioning:** Segwit makes it easy for future soft forks to allow + Bitcoin users to individually opt-in to almost any change in the Bitcoin + Script language when those users receive new transactions. Features + currently being researched by Bitcoin Core contributors that may use this + capability include support for Schnorr signatures, which can improve the + privacy and efficiency of multisig transactions (or transactions with + multiple inputs), and Merklized Abstract Syntax Trees (MAST), which can + improve the privacy and efficiency of scripts with two or more conditions. + Other Bitcoin community members are studying several other improvements + that can be made using script versioning. Activation for the segwit soft fork is being managed using BIP9 versionbits. Segwit's version bit is bit 1, and nodes will begin @@ -93,8 +167,8 @@ signaling support for a soft fork. Null dummy soft fork ------------------- -Combined with the segwit soft fork is a soft fork that turns a -long-existing network relay policy into a consensus rule. The +Combined with the segwit soft fork is an additional change that turns a +long-existing network relay policy into a consensus rule. The `OP_CHECKMULTISIG` and `OP_CHECKMULTISIGVERIFY` opcodes consume an extra stack element ("dummy element") after signature validation. The dummy element is not inspected in any manner, and could be replaced by any From 58d4fa7da30cb57e5fc3dca62f49a64e126c76cd Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 24 Oct 2016 21:38:20 +0200 Subject: [PATCH 199/302] [net] Remove assert(nMaxInbound > 0) nMaxInbound might very well be 0 or -1, if the user prefers to keep a small number of maxconnections. Note: nMaxInbound of -1 means that the user set maxconnections to 8 or less, but we still want to keep an additional slot for the feeler connection. Github-Pull: #9008 Rebased-From: fa1c3c2eb0a1853ed0e0662fc2bdbca51e05ccf5 --- src/net.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 06fc3fdb859..faa7b002813 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1021,7 +1021,6 @@ static void AcceptConnection(const ListenSocket& hListenSocket) { CAddress addr; int nInbound = 0; int nMaxInbound = nMaxConnections - (MAX_OUTBOUND_CONNECTIONS + MAX_FEELER_CONNECTIONS); - assert(nMaxInbound > 0); if (hSocket != INVALID_SOCKET) if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr)) From a32d7c23fc0eedebe3579edb5d488a4c63b67b70 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 25 Oct 2016 14:04:33 -0400 Subject: [PATCH 200/302] release: bump required osx version to 10.8. Credit jonasschnelli. libc++ on 10.7 causes too many issues. See #8577 for discussion/details. Github-Pull: #9015 Rebased-From: 339c4b6c3a8e68e4bba1969d144e413a462b68f1 --- share/qt/Info.plist.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in index 6a34d64cd53..5ca6d9d015b 100644 --- a/share/qt/Info.plist.in +++ b/share/qt/Info.plist.in @@ -3,7 +3,7 @@ LSMinimumSystemVersion - 10.7.0 + 10.8.0 LSArchitecturePriority From 1d1246314f761b3f84c869cb7b0af49cc25b55b3 Mon Sep 17 00:00:00 2001 From: Michael Ford Date: Wed, 26 Oct 2016 18:04:27 +0800 Subject: [PATCH 201/302] Update release notes for dropping osx 10.7 support --- doc/build-osx.md | 2 +- doc/release-notes.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/build-osx.md b/doc/build-osx.md index bc90a305622..63a7ee28ca9 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -90,6 +90,6 @@ Uncheck everything except Qt Creator during the installation process. Notes ----- -* Tested on OS X 10.7 through 10.11 on 64-bit Intel processors only. +* Tested on OS X 10.8 through 10.12 on 64-bit Intel processors only. * Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714) diff --git a/doc/release-notes.md b/doc/release-notes.md index 0941290c8cd..75c2d61be8d 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -36,6 +36,10 @@ No attempt is made to prevent installing or running the software on Windows XP, you can still do so at your own risk, but do not expect it to work: do not report issues about Windows XP to the issue tracker. +From 0.13.1 onwards OS X 10.7 is no longer supported. 0.13.0 was intended to work on 10.7+, +but severe issues with the libc++ version on 10.7.x keep it from running reliably. +0.13.1 now requires 10.8+, and will communicate that to 10.7 users, rather than crashing unexpectedly. + Notable changes =============== From 9ef38758a69abfb6166099bf8dea1d69e258ae00 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 21 Oct 2016 12:15:19 -0400 Subject: [PATCH 202/302] Add missing cs_main lock to ::GETBLOCKTXN processing Note that this is not a major issue as, in order for the missing lock to cause issues, you have to receive a GETBLOCKTXN message while reindexing, adding a block header via RPC, etc, which results in either a table rehash or an insert into the bucket which you are currently looking at. Github-Pull: #8995 Rebased-From: dfe79060a62c8de098e75d527d97b99c3b10de50 --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 61d0aaf0b9b..84f4607dba1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5388,6 +5388,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, BlockTransactionsRequest req; vRecv >> req; + LOCK(cs_main); + BlockMap::iterator it = mapBlockIndex.find(req.blockhash); if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) { LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id); From ce0d817b9b59baa243c3ac0844a654704872aa2f Mon Sep 17 00:00:00 2001 From: maiiz Date: Mon, 18 Jul 2016 15:01:34 +0800 Subject: [PATCH 203/302] Fix relaypriority calculation error Github-Pull: #8357 Rebased-From: 94a34a5d951cee59ef9c9274c5ad49ac2a91ab8a --- src/coins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coins.cpp b/src/coins.cpp index 39db7dedfbb..8ff652b474b 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -275,7 +275,7 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight, CAmount assert(coins); if (!coins->IsAvailable(txin.prevout.n)) continue; if (coins->nHeight <= nHeight) { - dResult += coins->vout[txin.prevout.n].nValue * (nHeight-coins->nHeight); + dResult += (double)(coins->vout[txin.prevout.n].nValue) * (nHeight-coins->nHeight); inChainInputValue += coins->vout[txin.prevout.n].nValue; } } From 1d048b917b83489f9e56d8fab522475544b98793 Mon Sep 17 00:00:00 2001 From: jnewbery Date: Mon, 26 Sep 2016 17:01:10 -0400 Subject: [PATCH 204/302] Don't return the address of a P2SH of a P2SH. Github-Pull: #8845 Rebased-From: d51f18246165b580761af824f1bb4a49b6908f28 --- src/rpc/rawtransaction.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 3270cd384f4..b2bbb8b3edc 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -535,7 +535,7 @@ UniValue decodescript(const UniValue& params, bool fHelp) " \"address\" (string) bitcoin address\n" " ,...\n" " ],\n" - " \"p2sh\",\"address\" (string) script address\n" + " \"p2sh\",\"address\" (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).\n" "}\n" "\nExamples:\n" + HelpExampleCli("decodescript", "\"hexstring\"") @@ -554,7 +554,15 @@ UniValue decodescript(const UniValue& params, bool fHelp) } ScriptPubKeyToJSON(script, r, false); - r.push_back(Pair("p2sh", CBitcoinAddress(CScriptID(script)).ToString())); + UniValue type; + type = find_value(r, "type"); + + if (type.isStr() && type.get_str() != "scripthash") { + // P2SH cannot be wrapped in a P2SH. If this script is already a P2SH, + // don't return the address for a P2SH of the P2SH. + r.push_back(Pair("p2sh", CBitcoinAddress(CScriptID(script)).ToString())); + } + return r; } From 6d05fe115b07588f41631663ace2f3f14c3ed3d7 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 21 Sep 2016 22:31:23 +0000 Subject: [PATCH 205/302] Add MIT license to Makefiles Github-Pull: #8784 Rebased-From: f4dffdd6bffc58377b7505b639f0431244321c32 --- Makefile.am | 4 ++++ src/Makefile.am | 4 ++++ src/Makefile.bench.include | 4 ++++ src/Makefile.leveldb.include | 4 ++++ src/Makefile.qt.include | 4 ++++ src/Makefile.qttest.include | 4 ++++ src/Makefile.test.include | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/Makefile.am b/Makefile.am index b10d0850664..f3dc016b933 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,7 @@ +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + ACLOCAL_AMFLAGS = -I build-aux/m4 SUBDIRS = src .PHONY: deploy FORCE diff --git a/src/Makefile.am b/src/Makefile.am index e3eaacdb4c9..1e033de9daf 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,7 @@ +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + DIST_SUBDIRS = secp256k1 univalue AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index 4067ceb3993..8c024a8c4ad 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.include @@ -1,3 +1,7 @@ +# Copyright (c) 2015-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + bin_PROGRAMS += bench/bench_bitcoin BENCH_SRCDIR = bench BENCH_BINARY = bench/bench_bitcoin$(EXEEXT) diff --git a/src/Makefile.leveldb.include b/src/Makefile.leveldb.include index 4b3cd6364a2..d7346aa181d 100644 --- a/src/Makefile.leveldb.include +++ b/src/Makefile.leveldb.include @@ -1,3 +1,7 @@ +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + LIBLEVELDB_INT = leveldb/libleveldb.a LIBMEMENV_INT = leveldb/libmemenv.a diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index bbef6417688..8e6805d4aaf 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -1,3 +1,7 @@ +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + bin_PROGRAMS += qt/bitcoin-qt EXTRA_LIBRARIES += qt/libbitcoinqt.a diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index 813a343ffa3..a071fe1362f 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -1,3 +1,7 @@ +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + bin_PROGRAMS += qt/test/test_bitcoin-qt TESTS += qt/test/test_bitcoin-qt diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 27e7694748c..ef30eeb4ae2 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -1,3 +1,7 @@ +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + TESTS += test/test_bitcoin bin_PROGRAMS += test/test_bitcoin TEST_SRCDIR = test From fa58e55cef9a901b433544338dccd562dbe461ee Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 21 Sep 2016 22:35:21 +0000 Subject: [PATCH 206/302] Add MIT license to autogen.sh and share/genbuild.sh Github-Pull: #8784 Rebased-From: 3b4b6dcdd77f3ba76fb0cda6f2c277ec1629d8d3 --- autogen.sh | 4 ++++ share/genbuild.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/autogen.sh b/autogen.sh index 46e36ff5b21..27417daf769 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright (c) 2013-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + set -e srcdir="$(dirname $0)" cd "$srcdir" diff --git a/share/genbuild.sh b/share/genbuild.sh index 1ef77d706f7..eecac4bd00b 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -1,4 +1,8 @@ #!/bin/sh +# Copyright (c) 2012-2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + if [ $# -gt 1 ]; then cd "$2" fi From 2cfcca7ca6f4036845f8e845cb4b55bd4e07ed64 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 21 Sep 2016 22:54:49 +0000 Subject: [PATCH 207/302] Trivial: build-aux/m4/l_atomic: Fix typo Github-Pull: #8784 Rebased-From: 3f8a5d8f6e95c3c1aa62433abc5edb0c93caae11 --- build-aux/m4/l_atomic.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 index 906724b6405..1cb13587a9f 100644 --- a/build-aux/m4/l_atomic.m4 +++ b/build-aux/m4/l_atomic.m4 @@ -32,7 +32,7 @@ AC_DEFUN([CHECK_ATOMIC], [ AC_MSG_RESULT([yes]) ],[ AC_MSG_RESULT([no]) - AC_MSG_FAILURE([cannot figure our how to use std::atomic]) + AC_MSG_FAILURE([cannot figure out how to use std::atomic]) ]) ]) From b16cdb71ff20ebf23372d116e9bb4bbe84d30fce Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Wed, 21 Sep 2016 22:54:41 +0000 Subject: [PATCH 208/302] Add MIT license to build-aux/m4 scripts Github-Pull: #8784 Rebased-From: 0c4e6ce88f58c13ed81807e3a5bef28b673aa503 --- build-aux/m4/bitcoin_find_bdb48.m4 | 4 ++++ build-aux/m4/bitcoin_qt.m4 | 4 ++++ build-aux/m4/bitcoin_subdir_to_include.m4 | 4 ++++ build-aux/m4/l_atomic.m4 | 6 ++++++ 4 files changed, 18 insertions(+) diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4 index 2aa493a6af6..0c3d49c2bc0 100644 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ b/build-aux/m4/bitcoin_find_bdb48.m4 @@ -1,3 +1,7 @@ +dnl Copyright (c) 2013-2015 The Bitcoin Core developers +dnl Distributed under the MIT software license, see the accompanying +dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. + AC_DEFUN([BITCOIN_FIND_BDB48],[ AC_MSG_CHECKING([for Berkeley DB C++ headers]) BDB_CPPFLAGS= diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4 index d26136cbe9a..509283a0b9c 100644 --- a/build-aux/m4/bitcoin_qt.m4 +++ b/build-aux/m4/bitcoin_qt.m4 @@ -1,3 +1,7 @@ +dnl Copyright (c) 2013-2016 The Bitcoin Core developers +dnl Distributed under the MIT software license, see the accompanying +dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. + dnl Helper for cases where a qt dependency is not met. dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit. AC_DEFUN([BITCOIN_QT_FAIL],[ diff --git a/build-aux/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4 index 66f106c7d47..7841042ac87 100644 --- a/build-aux/m4/bitcoin_subdir_to_include.m4 +++ b/build-aux/m4/bitcoin_subdir_to_include.m4 @@ -1,3 +1,7 @@ +dnl Copyright (c) 2013-2014 The Bitcoin Core developers +dnl Distributed under the MIT software license, see the accompanying +dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. + dnl BITCOIN_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE]) dnl SUBDIRECTORY-NAME must end with a path separator AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[ diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 index 1cb13587a9f..75c43f9a92d 100644 --- a/build-aux/m4/l_atomic.m4 +++ b/build-aux/m4/l_atomic.m4 @@ -1,3 +1,9 @@ +dnl Copyright (c) 2015 Tim Kosse +dnl Copying and distribution of this file, with or without modification, are +dnl permitted in any medium without royalty provided the copyright notice +dnl and this notice are preserved. This file is offered as-is, without any +dnl warranty. + # Some versions of gcc/libstdc++ require linking with -latomic if # using the C++ atomic library. # From 2e2388a5cbb9a6e101b36e4501698fec538a5738 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 27 Oct 2016 14:53:30 +0200 Subject: [PATCH 209/302] Move release notes to release-notes/release-notes-0.13.1.md And clean out current release notes, ready for next release from this branch. --- doc/release-notes.md | 363 +------------------------- doc/release-notes/release-notes-0.13.1.md | 410 ++++++++++++++++++++++++++++++ 2 files changed, 419 insertions(+), 354 deletions(-) create mode 100644 doc/release-notes/release-notes-0.13.1.md diff --git a/doc/release-notes.md b/doc/release-notes.md index 75c2d61be8d..e54f9ac0216 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,10 +1,9 @@ -Bitcoin Core version 0.13.1 is now available from: +Bitcoin Core version 0.13.x is now available from: - + -This is a new minor version release, including activation parameters for the -segwit softfork, various bugfixes and performance improvements, as well as -updated translations. +This is a new minor version release, including ..., various bugfixes and +performance improvements, as well as updated translations. Please report bugs using the issue tracker at github: @@ -43,197 +42,10 @@ but severe issues with the libc++ version on 10.7.x keep it from running reliabl Notable changes =============== -Segregated witness soft fork ----------------------------- +Example item +--------------- -Segregated witness (segwit) is a soft fork that, if activated, will -allow transaction-producing software to separate (segregate) transaction -signatures (witnesses) from the part of the data in a transaction that is -covered by the txid. This provides several immediate benefits: - -- **Elimination of unwanted transaction malleability:** Segregating the witness - allows both existing and upgraded software to calculate the transaction - identifier (txid) of transactions without referencing the witness, which can - sometimes be changed by third-parties (such as miners) or by co-signers in a - multisig spend. This solves all known cases of unwanted transaction - malleability, which is a problem that makes programming Bitcoin wallet - software more difficult and which seriously complicates the design of smart - contracts for Bitcoin. - -- **Capacity increase:** Segwit transactions contain new fields that are not - part of the data currently used to calculate the size of a block, which - allows a block containing segwit transactions to hold more data than allowed - by the current maximum block size. Estimates based on the transactions - currently found in blocks indicate that if all wallets switch to using - segwit, the network will be able to support about 70% more transactions. The - network will also be able to support more of the advanced-style payments - (such as multisig) than it can support now because of the different weighting - given to different parts of a transaction after segwit activates (see the - following section for details). - -- **Weighting data based on how it affects node performance:** Some parts of - each Bitcoin block need to be stored by nodes in order to validate future - blocks; other parts of a block can be immediately forgotten (pruned) or used - only for helping other nodes sync their copy of the block chain. One large - part of the immediately prunable data are transaction signatures (witnesses), - and segwit makes it possible to give a different "weight" to segregated - witnesses to correspond with the lower demands they place on node resources. - Specifically, each byte of a segregated witness is given a weight of 1, each - other byte in a block is given a weight of 4, and the maximum allowed weight - of a block is 4 million. Weighting the data this way better aligns the most - profitable strategy for creating blocks with the long-term costs of block - validation. - -- **Signature covers value:** A simple improvement in the way signatures are - generated in segwit simplifies the design of secure signature generators - (such as hardware wallets), reduces the amount of data the signature - generator needs to download, and allows the signature generator to operate - more quickly. This is made possible by having the generator sign the amount - of bitcoins they think they are spending, and by having full nodes refuse to - accept those signatures unless the amount of bitcoins being spent is exactly - the same as was signed. For non-segwit transactions, wallets instead had to - download the complete previous transactions being spent for every payment - they made, which could be a slow operation on hardware wallets and in other - situations where bandwidth or computation speed was constrained. - -- **Linear scaling of sighash operations:** In 2015 a block was produced that - required about 25 seconds to validate on modern hardware because of the way - transaction signature hashes are performed. Other similar blocks, or blocks - that could take even longer to validate, can still be produced today. The - problem that caused this can't be fixed in a soft fork without unwanted - side-effects, but transactions that opt-in to using segwit will now use a - different signature method that doesn't suffer from this problem and doesn't - have any unwanted side-effects. - -- **Increased security for multisig:** Bitcoin addresses (both P2PKH addresses - that start with a '1' and P2SH addresses that start with a '3') use a hash - function known as RIPEMD-160. For P2PKH addresses, this provides about 160 - bits of security---which is beyond what cryptographers believe can be broken - today. But because P2SH is more flexible, only about 80 bits of security is - provided per address. Although 80 bits is very strong security, it is within - the realm of possibility that it can be broken by a powerful adversary. - Segwit allows advanced transactions to use the SHA256 hash function instead, - which provides about 128 bits of security (that is 281 trillion times as - much security as 80 bits and is equivalent to the maximum bits of security - believed to be provided by Bitcoin's choice of parameters for its Elliptic - Curve Digital Security Algorithm [ECDSA].) - -- **More efficient almost-full-node security** Satoshi Nakamoto's original - Bitcoin paper describes a method for allowing newly-started full nodes to - skip downloading and validating some data from historic blocks that are - protected by large amounts of proof of work. Unfortunately, Nakamoto's - method can't guarantee that a newly-started node using this method will - produce an accurate copy of Bitcoin's current ledger (called the UTXO set), - making the node vulnerable to falling out of consensus with other nodes. - Although the problems with Nakamoto's method can't be fixed in a soft fork, - Segwit accomplishes something similar to his original proposal: it makes it - possible for a node to optionally skip downloading some blockchain data - (specifically, the segregated witnesses) while still ensuring that the node - can build an accurate copy of the UTXO set for the block chain with the most - proof of work. Segwit enables this capability at the consensus layer, but - note that Bitcoin Core does not provide an option to use this capability as - of this 0.13.1 release. - -- **Script versioning:** Segwit makes it easy for future soft forks to allow - Bitcoin users to individually opt-in to almost any change in the Bitcoin - Script language when those users receive new transactions. Features - currently being researched by Bitcoin Core contributors that may use this - capability include support for Schnorr signatures, which can improve the - privacy and efficiency of multisig transactions (or transactions with - multiple inputs), and Merklized Abstract Syntax Trees (MAST), which can - improve the privacy and efficiency of scripts with two or more conditions. - Other Bitcoin community members are studying several other improvements - that can be made using script versioning. - -Activation for the segwit soft fork is being managed using BIP9 -versionbits. Segwit's version bit is bit 1, and nodes will begin -tracking which blocks signal support for segwit at the beginning of the -first retarget period after segwit's start date of 15 November 2016. If -95% of blocks within a 2,016-block retarget period (about two weeks) -signal support for segwit, the soft fork will be locked in. After -another 2,016 blocks, segwit will activate. - -For more information about segwit, please see the [segwit FAQ][], the -[segwit wallet developers guide][] or BIPs [141][BIP141], [143][BIP143], -[144][BIP144], and [145][BIP145]. If you're a miner or mining pool -operator, please see the [versionbits FAQ][] for information about -signaling support for a soft fork. - -[Segwit FAQ]: https://bitcoincore.org/en/2016/01/26/segwit-benefits/ -[segwit wallet developers guide]: https://bitcoincore.org/en/segwit_wallet_dev/ -[BIP141]: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki -[BIP143]: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki -[BIP144]: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki -[BIP145]: https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki -[versionbits FAQ]: https://bitcoincore.org/en/2016/06/08/version-bits-miners-faq/ - - -Null dummy soft fork -------------------- - -Combined with the segwit soft fork is an additional change that turns a -long-existing network relay policy into a consensus rule. The -`OP_CHECKMULTISIG` and `OP_CHECKMULTISIGVERIFY` opcodes consume an extra -stack element ("dummy element") after signature validation. The dummy -element is not inspected in any manner, and could be replaced by any -value without invalidating the script. - -Because any value can be used for this dummy element, it's possible for -a third-party to insert data into other people's transactions, changing -the transaction's txid (called transaction malleability) and possibly -causing other problems. - -Since Bitcoin Core 0.10.0, nodes have defaulted to only relaying and -mining transactions whose dummy element was a null value (0x00, also -called OP_0). The null dummy soft fork turns this relay rule into a -consensus rule both for non-segwit transactions and segwit transactions, -so that this method of mutating transactions is permanently eliminated -from the network. - -Signaling for the null dummy soft fork is done by signaling support -for segwit, and the null dummy soft fork will activate at the same time -as segwit. - -For more information, please see [BIP147][]. - -[BIP147]: https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki - -Low-level RPC changes ---------------------- - -- `importprunedfunds` only accepts two required arguments. Some versions accept - an optional third arg, which was always ignored. Make sure to never pass more - than two arguments. - - -Linux ARM builds ----------------- - -With the 0.13.0 release, pre-built Linux ARM binaries were added to the set of -uploaded executables. Additional detail on the ARM architecture targeted by each -is provided below. - -The following extra files can be found in the download directory or torrent: - -- `bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz`: Linux binaries targeting - the 32-bit ARMv7-A architecture. -- `bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz`: Linux binaries targeting - the 64-bit ARMv8-A architecture. - -ARM builds are still experimental. If you have problems on a certain device or -Linux distribution combination please report them on the bug tracker, it may be -possible to resolve them. Note that the device you use must be (backward) -compatible with the architecture targeted by the binary that you use. -For example, a Raspberry Pi 2 Model B or Raspberry Pi 3 Model B (in its 32-bit -execution state) device, can run the 32-bit ARMv7-A targeted binary. However, -no model of Raspberry Pi 1 device can run either binary because they are all -ARMv6 architecture devices that are not compatible with ARMv7-A or ARMv8-A. - -Note that Android is not considered ARM Linux in this context. The executables -are not expected to work out of the box on Android. - - -0.13.1 Change log +0.13.x Change log ================= Detailed release notes follow. This overview includes changes that affect @@ -241,170 +53,13 @@ behavior, not code moves, refactors and string updates. For convenience in locat the code changes and accompanying discussion, both the pull request and git merge commit are mentioned. -### Consensus -- #8636 `9dfa0c8` Implement NULLDUMMY softfork (BIP147) (jl2012) -- #8848 `7a34a46` Add NULLDUMMY verify flag in bitcoinconsensus.h (jl2012) -- #8937 `8b66659` Define start and end time for segwit deployment (sipa) - -### RPC and other APIs -- #8581 `526d2b0` Drop misleading option in importprunedfunds (MarcoFalke) -- #8699 `a5ec248` Remove createwitnessaddress RPC command (jl2012) -- #8780 `794b007` Deprecate getinfo (MarcoFalke) -- #8832 `83ad563` Throw JSONRPCError when utxo set can not be read (MarcoFalke) -- #8884 `b987348` getblockchaininfo help: pruneheight is the lowest, not highest, block (luke-jr) -- #8858 `3f508ed` rpc: Generate auth cookie in hex instead of base64 (laanwj) -- #8951 `7c2bf4b` RPC/Mining: getblocktemplate: Update and fix formatting of help (luke-jr) - -### Block and transaction handling -- #8611 `a9429ca` Reduce default number of blocks to check at startup (sipa) -- #8634 `3e80ab7` Add policy: null signature for failed CHECK(MULTI)SIG (jl2012) -- #8525 `1672225` Do not store witness txn in rejection cache (sipa) -- #8499 `9777fe1` Add several policy limits and disable uncompressed keys for segwit scripts (jl2012) -- #8526 `0027672` Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (jl2012) -- #8524 `b8c79a0` Precompute sighashes (sipa) -- #8651 `b8c79a0` Predeclare PrecomputedTransactionData as struct (sipa) - -### P2P protocol and network code -- #8740 `42ea51a` No longer send local address in addrMe (laanwj) -- #8427 `69d1cd2` Ignore `notfound` P2P messages (laanwj) -- #8573 `4f84082` Set jonasschnellis dns-seeder filter flag (jonasschnelli) -- #8712 `23feab1` Remove maxuploadtargets recommended minimum (jonasschnelli) -- #8862 `7ae6242` Fix a few cases where messages were sent after requested disconnect (theuni) -- #8393 `fe1975a` Support for compact blocks together with segwit (sipa) -- #8282 `2611ad7` Feeler connections to increase online addrs in the tried table (EthanHeilman) -- #8612 `2215c22` Check for compatibility with download in FindNextBlocksToDownload (sipa) -- #8606 `bbf379b` Fix some locks (sipa) -- #8594 `ab295bb` Do not add random inbound peers to addrman (gmaxwell) -- #8940 `5b4192b` Add x9 service bit support to dnsseed.bluematt.me, seed.bitcoinstats.com (TheBlueMatt, cdecker) -- #8944 `685e4c7` Remove bogus assert on number of oubound connections. (TheBlueMatt) -- #8949 `0dbc48a` Be more agressive in getting connections to peers with relevant services (gmaxwell) - -### Build system -- #8293 `fa5b249` Allow building libbitcoinconsensus without any univalue (luke-jr) -- #8492 `8b0bdd3` Allow building bench_bitcoin by itself (luke-jr) -- #8563 `147003c` Add configure check for -latomic (ajtowns) -- #8626 `ea51b0f` Berkeley DB v6 compatibility fix (netsafe) -- #8520 `75f2065` Remove check for `openssl/ec.h` (laanwj) - -### GUI -- #8481 `d9f0d4e` Fix minimize and close bugs (adlawren) -- #8487 `a37cec5` Persist the datadir after option reset (achow101) -- #8697 `41fd852` Fix op order to append first alert (rodasmith) -- #8678 `8e03382` Fix UI bug that could result in paying unexpected fee (jonasschnelli) -- #8911 `7634d8e` Translate all files, even if wallet disabled (laanwj) -- #8540 `1db3352` Fix random segfault when closing "Choose data directory" dialog (laanwj) -- #7579 `f1c0d78` Show network/chain errors in the GUI (jonasschnelli) - -### Wallet -- #8443 `464dedd` Trivial cleanup of HD wallet changes (jonasschnelli) -- #8539 `cb07f19` CDB: fix debug output (crowning-) -- #8664 `091cdeb` Fix segwit-related wallet bug (sdaftuar) -- #8693 `c6a6291` Add witness address to address book (instagibbs) -- #8765 `6288659` Remove "unused" ThreadFlushWalletDB from removeprunedfunds (jonasschnelli) - -### Tests and QA -- #8713 `ae8c7df` create_cache: Delete temp dir when done (MarcoFalke) -- #8716 `e34374e` Check legacy wallet as well (MarcoFalke) -- #8750 `d6ebe13` Refactor RPCTestHandler to prevent TimeoutExpired (MarcoFalke) -- #8652 `63462c2` remove root test directory for RPC tests (yurizhykin) -- #8724 `da94272` walletbackup: Sync blocks inside the loop (MarcoFalke) -- #8400 `bea02dc` enable rpcbind_test (yurizhykin) -- #8417 `f70be14` Add walletdump RPC test (including HD- & encryption-tests) (jonasschnelli) -- #8419 `a7aa3cc` Enable size accounting in mining unit tests (sdaftuar) -- #8442 `8bb1efd` Rework hd wallet dump test (MarcoFalke) -- #8528 `3606b6b` Update p2p-segwit.py to reflect correct behavior (instagibbs) -- #8531 `a27cdd8` abandonconflict: Use assert_equal (MarcoFalke) -- #8667 `6b07362` Fix SIGHASH_SINGLE bug in test_framework SignatureHash (jl2012) -- #8673 `03b0196` Fix obvious assignment/equality error in test (JeremyRubin) -- #8739 `cef633c` Fix broken sendcmpct test in p2p-compactblocks.py (sdaftuar) -- #8418 `ff893aa` Add tests for compact blocks (sdaftuar) -- #8803 `375437c` Ping regularly in p2p-segwit.py to keep connection alive (jl2012) -- #8827 `9bbe66e` Split up slow RPC calls to avoid pruning test timeouts (sdaftuar) -- #8829 `2a8bca4` Add bitcoin-tx JSON tests (jnewbery) -- #8834 `1dd1783` blockstore: Switch to dumb dbm (MarcoFalke) -- #8835 `d87227d` nulldummy.py: Don't run unused code (MarcoFalke) -- #8836 `eb18cc1` bitcoin-util-test.py should fail if the output file is empty (jnewbery) -- #8839 `31ab2f8` Avoid ConnectionResetErrors during RPC tests (laanwj) -- #8840 `cbc3fe5` Explicitly set encoding to utf8 when opening text files (laanwj) -- #8841 `3e4abb5` Fix nulldummy test (jl2012) -- #8854 `624a007` Fix race condition in p2p-compactblocks test (sdaftuar) -- #8857 `1f60d45` mininode: Only allow named args in wait_until (MarcoFalke) -- #8860 `0bee740` util: Move wait_bitcoinds() into stop_nodes() (MarcoFalke) -- #8882 `b73f065` Fix race conditions in p2p-compactblocks.py and sendheaders.py (sdaftuar) -- #8904 `cc6f551` Fix compact block shortids for a test case (dagurval) - -### Documentation -- #8754 `0e2c6bd` Target protobuf 2.6 in OS X build notes. (fanquake) -- #8461 `b17a3f9` Document return value of networkhashps for getmininginfo RPC endpoint (jlopp) -- #8512 `156e305` Corrected JSON typo on setban of net.cpp (sevastos) -- #8683 `8a7d7ff` Fix incorrect file name bitcoin.qrc (bitcoinsSG) -- #8891 `5e0dd9e` Update bips.md for Segregated Witness (fanquake) -- #8545 `863ae74` Update git-subtree-check.sh README (MarcoFalke) -- #8607 `486650a` Fix doxygen off-by-one comments, fix typos (MarcoFalke) -- #8560 `c493f43` Fix two VarInt examples in serialize.h (cbarcenas) -- #8737 `084cae9` UndoReadFromDisk works on undo files (rev), not on block files (paveljanik) -- #8625 `0a35573` Clarify statement about parallel jobs in rpc-tests.py (isle2983) -- #8624 `0e6d753` build: Mention curl (MarcoFalke) -- #8604 `b09e13c` build,doc: Update for 0.13.0+ and OpenBSD 5.9 (laanwj) -- #8939 `06d15fb` Update implemented bips for 0.13.1 (sipa) - -### Miscellaneous -- #8742 `d31ac72` Specify Protobuf version 2 in paymentrequest.proto (fanquake) -- #8414,#8558,#8676,#8700,#8701,#8702 Add missing copyright headers (isle2983, kazcw) -- #8899 `4ed2627` Fix wake from sleep issue with Boost 1.59.0 (fanquake) -- #8817 `bcf3806` update bitcoin-tx to output witness data (jnewbery) -- #8513 `4e5fc31` Fix a type error that would not compile on OSX. (JeremyRubin) -- #8392 `30eac2d` Fix several node initialization issues (sipa) -- #8548 `305d8ac` Use `__func__` to get function name for output printing (MarcoFalke) -- #8291 `a987431` [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke) +(to be filled in at release time) Credits ======= Thanks to everyone who directly contributed to this release: -- adlawren -- Alexey Vesnin -- Anders Øyvind Urke-Sætre -- Andrew Chow -- Anthony Towns -- BtcDrak -- Chris Stewart -- Christian Barcenas -- Christian Decker -- Cory Fields -- crowning- -- Dagur Valberg Johannsson -- David A. Harding -- Eric Lombrozo -- Ethan Heilman -- fanquake -- Gaurav Rana -- Gregory Maxwell -- instagibbs -- isle2983 -- Jameson Lopp -- Jeremy Rubin -- jnewbery -- Johnson Lau -- Jonas Schnelli -- jonnynewbs -- Justin Camarena -- Kaz Wesley -- leijurv -- Luke Dashjr -- MarcoFalke -- Marty Jones -- Matt Corallo -- Micha -- Michael Ford -- mruddy -- Pavel Janík -- Pieter Wuille -- rodasmith -- Sev -- Suhas Daftuar -- whythat -- Wladimir J. van der Laan +(to be filled in at release time) 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.13.1.md b/doc/release-notes/release-notes-0.13.1.md new file mode 100644 index 00000000000..75c2d61be8d --- /dev/null +++ b/doc/release-notes/release-notes-0.13.1.md @@ -0,0 +1,410 @@ +Bitcoin Core version 0.13.1 is now available from: + + + +This is a new minor version release, including activation parameters for the +segwit softfork, various bugfixes and performance improvements, as well as +updated translations. + +Please report bugs using the issue tracker at github: + + + +To receive security and update notifications, please subscribe to: + + + +Compatibility +============== + +Microsoft ended support for Windows XP on [April 8th, 2014](https://www.microsoft.com/en-us/WindowsForBusiness/end-of-xp-support), +an OS initially released in 2001. This means that not even critical security +updates will be released anymore. Without security updates, using a bitcoin +wallet on a XP machine is irresponsible at least. + +In addition to that, with 0.12.x there have been varied reports of Bitcoin Core +randomly crashing on Windows XP. It is [not clear](https://github.com/bitcoin/bitcoin/issues/7681#issuecomment-217439891) +what the source of these crashes is, but it is likely that upstream +libraries such as Qt are no longer being tested on XP. + +We do not have time nor resources to provide support for an OS that is +end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are +suggested to upgrade to a newer version of Windows, or install an alternative OS +that is supported. + +No attempt is made to prevent installing or running the software on Windows XP, +you can still do so at your own risk, but do not expect it to work: do not +report issues about Windows XP to the issue tracker. + +From 0.13.1 onwards OS X 10.7 is no longer supported. 0.13.0 was intended to work on 10.7+, +but severe issues with the libc++ version on 10.7.x keep it from running reliably. +0.13.1 now requires 10.8+, and will communicate that to 10.7 users, rather than crashing unexpectedly. + +Notable changes +=============== + +Segregated witness soft fork +---------------------------- + +Segregated witness (segwit) is a soft fork that, if activated, will +allow transaction-producing software to separate (segregate) transaction +signatures (witnesses) from the part of the data in a transaction that is +covered by the txid. This provides several immediate benefits: + +- **Elimination of unwanted transaction malleability:** Segregating the witness + allows both existing and upgraded software to calculate the transaction + identifier (txid) of transactions without referencing the witness, which can + sometimes be changed by third-parties (such as miners) or by co-signers in a + multisig spend. This solves all known cases of unwanted transaction + malleability, which is a problem that makes programming Bitcoin wallet + software more difficult and which seriously complicates the design of smart + contracts for Bitcoin. + +- **Capacity increase:** Segwit transactions contain new fields that are not + part of the data currently used to calculate the size of a block, which + allows a block containing segwit transactions to hold more data than allowed + by the current maximum block size. Estimates based on the transactions + currently found in blocks indicate that if all wallets switch to using + segwit, the network will be able to support about 70% more transactions. The + network will also be able to support more of the advanced-style payments + (such as multisig) than it can support now because of the different weighting + given to different parts of a transaction after segwit activates (see the + following section for details). + +- **Weighting data based on how it affects node performance:** Some parts of + each Bitcoin block need to be stored by nodes in order to validate future + blocks; other parts of a block can be immediately forgotten (pruned) or used + only for helping other nodes sync their copy of the block chain. One large + part of the immediately prunable data are transaction signatures (witnesses), + and segwit makes it possible to give a different "weight" to segregated + witnesses to correspond with the lower demands they place on node resources. + Specifically, each byte of a segregated witness is given a weight of 1, each + other byte in a block is given a weight of 4, and the maximum allowed weight + of a block is 4 million. Weighting the data this way better aligns the most + profitable strategy for creating blocks with the long-term costs of block + validation. + +- **Signature covers value:** A simple improvement in the way signatures are + generated in segwit simplifies the design of secure signature generators + (such as hardware wallets), reduces the amount of data the signature + generator needs to download, and allows the signature generator to operate + more quickly. This is made possible by having the generator sign the amount + of bitcoins they think they are spending, and by having full nodes refuse to + accept those signatures unless the amount of bitcoins being spent is exactly + the same as was signed. For non-segwit transactions, wallets instead had to + download the complete previous transactions being spent for every payment + they made, which could be a slow operation on hardware wallets and in other + situations where bandwidth or computation speed was constrained. + +- **Linear scaling of sighash operations:** In 2015 a block was produced that + required about 25 seconds to validate on modern hardware because of the way + transaction signature hashes are performed. Other similar blocks, or blocks + that could take even longer to validate, can still be produced today. The + problem that caused this can't be fixed in a soft fork without unwanted + side-effects, but transactions that opt-in to using segwit will now use a + different signature method that doesn't suffer from this problem and doesn't + have any unwanted side-effects. + +- **Increased security for multisig:** Bitcoin addresses (both P2PKH addresses + that start with a '1' and P2SH addresses that start with a '3') use a hash + function known as RIPEMD-160. For P2PKH addresses, this provides about 160 + bits of security---which is beyond what cryptographers believe can be broken + today. But because P2SH is more flexible, only about 80 bits of security is + provided per address. Although 80 bits is very strong security, it is within + the realm of possibility that it can be broken by a powerful adversary. + Segwit allows advanced transactions to use the SHA256 hash function instead, + which provides about 128 bits of security (that is 281 trillion times as + much security as 80 bits and is equivalent to the maximum bits of security + believed to be provided by Bitcoin's choice of parameters for its Elliptic + Curve Digital Security Algorithm [ECDSA].) + +- **More efficient almost-full-node security** Satoshi Nakamoto's original + Bitcoin paper describes a method for allowing newly-started full nodes to + skip downloading and validating some data from historic blocks that are + protected by large amounts of proof of work. Unfortunately, Nakamoto's + method can't guarantee that a newly-started node using this method will + produce an accurate copy of Bitcoin's current ledger (called the UTXO set), + making the node vulnerable to falling out of consensus with other nodes. + Although the problems with Nakamoto's method can't be fixed in a soft fork, + Segwit accomplishes something similar to his original proposal: it makes it + possible for a node to optionally skip downloading some blockchain data + (specifically, the segregated witnesses) while still ensuring that the node + can build an accurate copy of the UTXO set for the block chain with the most + proof of work. Segwit enables this capability at the consensus layer, but + note that Bitcoin Core does not provide an option to use this capability as + of this 0.13.1 release. + +- **Script versioning:** Segwit makes it easy for future soft forks to allow + Bitcoin users to individually opt-in to almost any change in the Bitcoin + Script language when those users receive new transactions. Features + currently being researched by Bitcoin Core contributors that may use this + capability include support for Schnorr signatures, which can improve the + privacy and efficiency of multisig transactions (or transactions with + multiple inputs), and Merklized Abstract Syntax Trees (MAST), which can + improve the privacy and efficiency of scripts with two or more conditions. + Other Bitcoin community members are studying several other improvements + that can be made using script versioning. + +Activation for the segwit soft fork is being managed using BIP9 +versionbits. Segwit's version bit is bit 1, and nodes will begin +tracking which blocks signal support for segwit at the beginning of the +first retarget period after segwit's start date of 15 November 2016. If +95% of blocks within a 2,016-block retarget period (about two weeks) +signal support for segwit, the soft fork will be locked in. After +another 2,016 blocks, segwit will activate. + +For more information about segwit, please see the [segwit FAQ][], the +[segwit wallet developers guide][] or BIPs [141][BIP141], [143][BIP143], +[144][BIP144], and [145][BIP145]. If you're a miner or mining pool +operator, please see the [versionbits FAQ][] for information about +signaling support for a soft fork. + +[Segwit FAQ]: https://bitcoincore.org/en/2016/01/26/segwit-benefits/ +[segwit wallet developers guide]: https://bitcoincore.org/en/segwit_wallet_dev/ +[BIP141]: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki +[BIP143]: https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki +[BIP144]: https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki +[BIP145]: https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki +[versionbits FAQ]: https://bitcoincore.org/en/2016/06/08/version-bits-miners-faq/ + + +Null dummy soft fork +------------------- + +Combined with the segwit soft fork is an additional change that turns a +long-existing network relay policy into a consensus rule. The +`OP_CHECKMULTISIG` and `OP_CHECKMULTISIGVERIFY` opcodes consume an extra +stack element ("dummy element") after signature validation. The dummy +element is not inspected in any manner, and could be replaced by any +value without invalidating the script. + +Because any value can be used for this dummy element, it's possible for +a third-party to insert data into other people's transactions, changing +the transaction's txid (called transaction malleability) and possibly +causing other problems. + +Since Bitcoin Core 0.10.0, nodes have defaulted to only relaying and +mining transactions whose dummy element was a null value (0x00, also +called OP_0). The null dummy soft fork turns this relay rule into a +consensus rule both for non-segwit transactions and segwit transactions, +so that this method of mutating transactions is permanently eliminated +from the network. + +Signaling for the null dummy soft fork is done by signaling support +for segwit, and the null dummy soft fork will activate at the same time +as segwit. + +For more information, please see [BIP147][]. + +[BIP147]: https://github.com/bitcoin/bips/blob/master/bip-0147.mediawiki + +Low-level RPC changes +--------------------- + +- `importprunedfunds` only accepts two required arguments. Some versions accept + an optional third arg, which was always ignored. Make sure to never pass more + than two arguments. + + +Linux ARM builds +---------------- + +With the 0.13.0 release, pre-built Linux ARM binaries were added to the set of +uploaded executables. Additional detail on the ARM architecture targeted by each +is provided below. + +The following extra files can be found in the download directory or torrent: + +- `bitcoin-${VERSION}-arm-linux-gnueabihf.tar.gz`: Linux binaries targeting + the 32-bit ARMv7-A architecture. +- `bitcoin-${VERSION}-aarch64-linux-gnu.tar.gz`: Linux binaries targeting + the 64-bit ARMv8-A architecture. + +ARM builds are still experimental. If you have problems on a certain device or +Linux distribution combination please report them on the bug tracker, it may be +possible to resolve them. Note that the device you use must be (backward) +compatible with the architecture targeted by the binary that you use. +For example, a Raspberry Pi 2 Model B or Raspberry Pi 3 Model B (in its 32-bit +execution state) device, can run the 32-bit ARMv7-A targeted binary. However, +no model of Raspberry Pi 1 device can run either binary because they are all +ARMv6 architecture devices that are not compatible with ARMv7-A or ARMv8-A. + +Note that Android is not considered ARM Linux in this context. The executables +are not expected to work out of the box on Android. + + +0.13.1 Change log +================= + +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. + +### Consensus +- #8636 `9dfa0c8` Implement NULLDUMMY softfork (BIP147) (jl2012) +- #8848 `7a34a46` Add NULLDUMMY verify flag in bitcoinconsensus.h (jl2012) +- #8937 `8b66659` Define start and end time for segwit deployment (sipa) + +### RPC and other APIs +- #8581 `526d2b0` Drop misleading option in importprunedfunds (MarcoFalke) +- #8699 `a5ec248` Remove createwitnessaddress RPC command (jl2012) +- #8780 `794b007` Deprecate getinfo (MarcoFalke) +- #8832 `83ad563` Throw JSONRPCError when utxo set can not be read (MarcoFalke) +- #8884 `b987348` getblockchaininfo help: pruneheight is the lowest, not highest, block (luke-jr) +- #8858 `3f508ed` rpc: Generate auth cookie in hex instead of base64 (laanwj) +- #8951 `7c2bf4b` RPC/Mining: getblocktemplate: Update and fix formatting of help (luke-jr) + +### Block and transaction handling +- #8611 `a9429ca` Reduce default number of blocks to check at startup (sipa) +- #8634 `3e80ab7` Add policy: null signature for failed CHECK(MULTI)SIG (jl2012) +- #8525 `1672225` Do not store witness txn in rejection cache (sipa) +- #8499 `9777fe1` Add several policy limits and disable uncompressed keys for segwit scripts (jl2012) +- #8526 `0027672` Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (jl2012) +- #8524 `b8c79a0` Precompute sighashes (sipa) +- #8651 `b8c79a0` Predeclare PrecomputedTransactionData as struct (sipa) + +### P2P protocol and network code +- #8740 `42ea51a` No longer send local address in addrMe (laanwj) +- #8427 `69d1cd2` Ignore `notfound` P2P messages (laanwj) +- #8573 `4f84082` Set jonasschnellis dns-seeder filter flag (jonasschnelli) +- #8712 `23feab1` Remove maxuploadtargets recommended minimum (jonasschnelli) +- #8862 `7ae6242` Fix a few cases where messages were sent after requested disconnect (theuni) +- #8393 `fe1975a` Support for compact blocks together with segwit (sipa) +- #8282 `2611ad7` Feeler connections to increase online addrs in the tried table (EthanHeilman) +- #8612 `2215c22` Check for compatibility with download in FindNextBlocksToDownload (sipa) +- #8606 `bbf379b` Fix some locks (sipa) +- #8594 `ab295bb` Do not add random inbound peers to addrman (gmaxwell) +- #8940 `5b4192b` Add x9 service bit support to dnsseed.bluematt.me, seed.bitcoinstats.com (TheBlueMatt, cdecker) +- #8944 `685e4c7` Remove bogus assert on number of oubound connections. (TheBlueMatt) +- #8949 `0dbc48a` Be more agressive in getting connections to peers with relevant services (gmaxwell) + +### Build system +- #8293 `fa5b249` Allow building libbitcoinconsensus without any univalue (luke-jr) +- #8492 `8b0bdd3` Allow building bench_bitcoin by itself (luke-jr) +- #8563 `147003c` Add configure check for -latomic (ajtowns) +- #8626 `ea51b0f` Berkeley DB v6 compatibility fix (netsafe) +- #8520 `75f2065` Remove check for `openssl/ec.h` (laanwj) + +### GUI +- #8481 `d9f0d4e` Fix minimize and close bugs (adlawren) +- #8487 `a37cec5` Persist the datadir after option reset (achow101) +- #8697 `41fd852` Fix op order to append first alert (rodasmith) +- #8678 `8e03382` Fix UI bug that could result in paying unexpected fee (jonasschnelli) +- #8911 `7634d8e` Translate all files, even if wallet disabled (laanwj) +- #8540 `1db3352` Fix random segfault when closing "Choose data directory" dialog (laanwj) +- #7579 `f1c0d78` Show network/chain errors in the GUI (jonasschnelli) + +### Wallet +- #8443 `464dedd` Trivial cleanup of HD wallet changes (jonasschnelli) +- #8539 `cb07f19` CDB: fix debug output (crowning-) +- #8664 `091cdeb` Fix segwit-related wallet bug (sdaftuar) +- #8693 `c6a6291` Add witness address to address book (instagibbs) +- #8765 `6288659` Remove "unused" ThreadFlushWalletDB from removeprunedfunds (jonasschnelli) + +### Tests and QA +- #8713 `ae8c7df` create_cache: Delete temp dir when done (MarcoFalke) +- #8716 `e34374e` Check legacy wallet as well (MarcoFalke) +- #8750 `d6ebe13` Refactor RPCTestHandler to prevent TimeoutExpired (MarcoFalke) +- #8652 `63462c2` remove root test directory for RPC tests (yurizhykin) +- #8724 `da94272` walletbackup: Sync blocks inside the loop (MarcoFalke) +- #8400 `bea02dc` enable rpcbind_test (yurizhykin) +- #8417 `f70be14` Add walletdump RPC test (including HD- & encryption-tests) (jonasschnelli) +- #8419 `a7aa3cc` Enable size accounting in mining unit tests (sdaftuar) +- #8442 `8bb1efd` Rework hd wallet dump test (MarcoFalke) +- #8528 `3606b6b` Update p2p-segwit.py to reflect correct behavior (instagibbs) +- #8531 `a27cdd8` abandonconflict: Use assert_equal (MarcoFalke) +- #8667 `6b07362` Fix SIGHASH_SINGLE bug in test_framework SignatureHash (jl2012) +- #8673 `03b0196` Fix obvious assignment/equality error in test (JeremyRubin) +- #8739 `cef633c` Fix broken sendcmpct test in p2p-compactblocks.py (sdaftuar) +- #8418 `ff893aa` Add tests for compact blocks (sdaftuar) +- #8803 `375437c` Ping regularly in p2p-segwit.py to keep connection alive (jl2012) +- #8827 `9bbe66e` Split up slow RPC calls to avoid pruning test timeouts (sdaftuar) +- #8829 `2a8bca4` Add bitcoin-tx JSON tests (jnewbery) +- #8834 `1dd1783` blockstore: Switch to dumb dbm (MarcoFalke) +- #8835 `d87227d` nulldummy.py: Don't run unused code (MarcoFalke) +- #8836 `eb18cc1` bitcoin-util-test.py should fail if the output file is empty (jnewbery) +- #8839 `31ab2f8` Avoid ConnectionResetErrors during RPC tests (laanwj) +- #8840 `cbc3fe5` Explicitly set encoding to utf8 when opening text files (laanwj) +- #8841 `3e4abb5` Fix nulldummy test (jl2012) +- #8854 `624a007` Fix race condition in p2p-compactblocks test (sdaftuar) +- #8857 `1f60d45` mininode: Only allow named args in wait_until (MarcoFalke) +- #8860 `0bee740` util: Move wait_bitcoinds() into stop_nodes() (MarcoFalke) +- #8882 `b73f065` Fix race conditions in p2p-compactblocks.py and sendheaders.py (sdaftuar) +- #8904 `cc6f551` Fix compact block shortids for a test case (dagurval) + +### Documentation +- #8754 `0e2c6bd` Target protobuf 2.6 in OS X build notes. (fanquake) +- #8461 `b17a3f9` Document return value of networkhashps for getmininginfo RPC endpoint (jlopp) +- #8512 `156e305` Corrected JSON typo on setban of net.cpp (sevastos) +- #8683 `8a7d7ff` Fix incorrect file name bitcoin.qrc (bitcoinsSG) +- #8891 `5e0dd9e` Update bips.md for Segregated Witness (fanquake) +- #8545 `863ae74` Update git-subtree-check.sh README (MarcoFalke) +- #8607 `486650a` Fix doxygen off-by-one comments, fix typos (MarcoFalke) +- #8560 `c493f43` Fix two VarInt examples in serialize.h (cbarcenas) +- #8737 `084cae9` UndoReadFromDisk works on undo files (rev), not on block files (paveljanik) +- #8625 `0a35573` Clarify statement about parallel jobs in rpc-tests.py (isle2983) +- #8624 `0e6d753` build: Mention curl (MarcoFalke) +- #8604 `b09e13c` build,doc: Update for 0.13.0+ and OpenBSD 5.9 (laanwj) +- #8939 `06d15fb` Update implemented bips for 0.13.1 (sipa) + +### Miscellaneous +- #8742 `d31ac72` Specify Protobuf version 2 in paymentrequest.proto (fanquake) +- #8414,#8558,#8676,#8700,#8701,#8702 Add missing copyright headers (isle2983, kazcw) +- #8899 `4ed2627` Fix wake from sleep issue with Boost 1.59.0 (fanquake) +- #8817 `bcf3806` update bitcoin-tx to output witness data (jnewbery) +- #8513 `4e5fc31` Fix a type error that would not compile on OSX. (JeremyRubin) +- #8392 `30eac2d` Fix several node initialization issues (sipa) +- #8548 `305d8ac` Use `__func__` to get function name for output printing (MarcoFalke) +- #8291 `a987431` [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- adlawren +- Alexey Vesnin +- Anders Øyvind Urke-Sætre +- Andrew Chow +- Anthony Towns +- BtcDrak +- Chris Stewart +- Christian Barcenas +- Christian Decker +- Cory Fields +- crowning- +- Dagur Valberg Johannsson +- David A. Harding +- Eric Lombrozo +- Ethan Heilman +- fanquake +- Gaurav Rana +- Gregory Maxwell +- instagibbs +- isle2983 +- Jameson Lopp +- Jeremy Rubin +- jnewbery +- Johnson Lau +- Jonas Schnelli +- jonnynewbs +- Justin Camarena +- Kaz Wesley +- leijurv +- Luke Dashjr +- MarcoFalke +- Marty Jones +- Matt Corallo +- Micha +- Michael Ford +- mruddy +- Pavel Janík +- Pieter Wuille +- rodasmith +- Sev +- Suhas Daftuar +- whythat +- Wladimir J. van der Laan + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 82905069bfd763f16a63649eb51ed3a566bca2c5 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 26 Oct 2016 13:03:30 -0400 Subject: [PATCH 210/302] [qa] Test that invalid compactblocks don't result in ban --- qa/rpc-tests/p2p-compactblocks.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 131654c333d..9ecced0dd3c 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -708,6 +708,33 @@ def test_end_to_end_block_relay(self, node, listeners): l.last_cmpctblock.header_and_shortids.header.calc_sha256() assert_equal(l.last_cmpctblock.header_and_shortids.header.sha256, block.sha256) + # Test that we don't get disconnected if we relay a compact block with valid header, + # but invalid transactions. + def test_invalid_tx_in_compactblock(self, node, test_node, use_segwit): + assert(len(self.utxos)) + utxo = self.utxos[0] + + block = self.build_block_with_transactions(node, utxo, 5) + del block.vtx[3] + block.hashMerkleRoot = block.calc_merkle_root() + if use_segwit: + # If we're testing with segwit, also drop the coinbase witness, + # but include the witness commitment. + add_witness_commitment(block) + block.vtx[0].wit.vtxinwit = [] + block.solve() + + # Now send the compact block with all transactions prefilled, and + # verify that we don't get disconnected. + comp_block = HeaderAndShortIDs() + comp_block.initialize_from_block(block, prefill_list=[0, 1, 2, 3, 4], use_witness=use_segwit) + msg = msg_cmpctblock(comp_block.to_p2p()) + test_node.send_and_ping(msg) + + # Check that the tip didn't advance + assert(int(node.getbestblockhash(), 16) is not block.sha256) + test_node.sync_with_ping() + # Helper for enabling cb announcements # Send the sendcmpct request and sync headers def request_cb_announcements(self, peer, node, version): @@ -798,6 +825,11 @@ def run_test(self): self.test_end_to_end_block_relay(self.nodes[0], [self.segwit_node, self.test_node, self.old_node]) self.test_end_to_end_block_relay(self.nodes[1], [self.segwit_node, self.test_node, self.old_node]) + print("\tTesting handling of invalid compact blocks...") + self.test_invalid_tx_in_compactblock(self.nodes[0], self.test_node, False) + self.test_invalid_tx_in_compactblock(self.nodes[1], self.segwit_node, False) + self.test_invalid_tx_in_compactblock(self.nodes[1], self.old_node, False) + # Advance to segwit activation print ("\nAdvancing to segwit activation\n") self.activate_segwit(self.nodes[1]) @@ -844,6 +876,11 @@ def run_test(self): self.request_cb_announcements(self.segwit_node, self.nodes[1], 2) self.test_end_to_end_block_relay(self.nodes[1], [self.segwit_node, self.test_node, self.old_node]) + print("\tTesting handling of invalid compact blocks...") + self.test_invalid_tx_in_compactblock(self.nodes[0], self.test_node, False) + self.test_invalid_tx_in_compactblock(self.nodes[1], self.segwit_node, True) + self.test_invalid_tx_in_compactblock(self.nodes[1], self.old_node, True) + print("\tTesting invalid index in cmpctblock message...") self.test_invalid_cmpctblock_message() From 015865ee9e5dd450ceb6cece489f924aaa1137e3 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Mon, 31 Oct 2016 10:03:49 -0400 Subject: [PATCH 211/302] Fix compact block handling to not ban if block is invalid --- src/blockencodings.cpp | 2 +- src/blockencodings.h | 2 ++ src/main.cpp | 47 ++++++++++++++++++++++++++++++++--------------- src/main.h | 2 +- src/rpc/mining.cpp | 4 ++-- src/test/miner_tests.cpp | 2 +- src/test/test_bitcoin.cpp | 2 +- 7 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index 93d3fa372b3..737102f1680 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -167,7 +167,7 @@ ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector< // check its own merkle root and cache that check. if (state.CorruptionPossible()) return READ_STATUS_FAILED; // Possible Short ID collision - return READ_STATUS_INVALID; + return READ_STATUS_CHECKBLOCK_FAILED; } LogPrint("cmpctblock", "Successfully reconstructed block %s with %lu txn prefilled, %lu txn from mempool and %lu txn requested\n", header.GetHash().ToString(), prefilled_count, mempool_count, vtx_missing.size()); diff --git a/src/blockencodings.h b/src/blockencodings.h index 2f87c6d31de..cab847ee3af 100644 --- a/src/blockencodings.h +++ b/src/blockencodings.h @@ -124,6 +124,8 @@ typedef enum ReadStatus_t READ_STATUS_OK, READ_STATUS_INVALID, // Invalid object, peer is sending bogus crap READ_STATUS_FAILED, // Failed to process object + READ_STATUS_CHECKBLOCK_FAILED, // Used only by FillBlock to indicate a + // failure in CheckBlock. } ReadStatus; class CBlockHeaderAndShortTxIDs { diff --git a/src/main.cpp b/src/main.cpp index 61d0aaf0b9b..850380abba2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -178,8 +178,10 @@ namespace { * Sources of received blocks, saved to be able to send them reject * messages or ban them when processing happens afterwards. Protected by * cs_main. + * Set mapBlockSource[hash].second to false if the node should not be + * punished if the block is invalid. */ - map mapBlockSource; + map> mapBlockSource; /** * Filter for transactions that were recently rejected by @@ -1885,13 +1887,13 @@ void static InvalidChainFound(CBlockIndex* pindexNew) void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state) { int nDoS = 0; if (state.IsInvalid(nDoS)) { - std::map::iterator it = mapBlockSource.find(pindex->GetBlockHash()); - if (it != mapBlockSource.end() && State(it->second)) { + std::map>::iterator it = mapBlockSource.find(pindex->GetBlockHash()); + if (it != mapBlockSource.end() && State(it->second.first)) { assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes CBlockReject reject = {(unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), pindex->GetBlockHash()}; - State(it->second)->rejects.push_back(reject); - if (nDoS > 0) - Misbehaving(it->second, nDoS); + State(it->second.first)->rejects.push_back(reject); + if (nDoS > 0 && it->second.second) + Misbehaving(it->second.first, nDoS); } } if (!state.CorruptionPossible()) { @@ -3761,7 +3763,7 @@ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned } -bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp) +bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp, bool fMayBanPeerIfInvalid) { { LOCK(cs_main); @@ -3773,7 +3775,7 @@ bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, C bool fNewBlock = false; bool ret = AcceptBlock(*pblock, state, chainparams, &pindex, fRequested, dbp, &fNewBlock); if (pindex && pfrom) { - mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId(); + mapBlockSource[pindex->GetBlockHash()] = std::make_pair(pfrom->GetId(), fMayBanPeerIfInvalid); if (fNewBlock) pfrom->nLastBlockTime = GetTime(); } CheckBlockIndex(chainparams.GetConsensus()); @@ -4717,7 +4719,6 @@ std::string GetWarnings(const std::string& strFor) ////////////////////////////////////////////////////////////////////////////// -// // Messages // @@ -5791,17 +5792,33 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, invs.push_back(CInv(MSG_BLOCK | GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus()), resp.blockhash)); pfrom->PushMessage(NetMsgType::GETDATA, invs); } else { + // Block is either okay, or possibly we received + // READ_STATUS_CHECKBLOCK_FAILED. + // Note that CheckBlock can only fail for one of a few reasons: + // 1. bad-proof-of-work (impossible here, because we've already + // accepted the header) + // 2. merkleroot doesn't match the transactions given (already + // caught in FillBlock with READ_STATUS_FAILED, so + // impossible here) + // 3. the block is otherwise invalid (eg invalid coinbase, + // block is too big, too many legacy sigops, etc). + // So if CheckBlock failed, #3 is the only possibility. + // Under BIP 152, we don't DoS-ban unless proof of work is + // invalid (we don't require all the stateless checks to have + // been run). This is handled below, so just treat this as + // though the block was successfully read, and rely on the + // handling in ProcessNewBlock to ensure the block index is + // updated, reject messages go out, etc. CValidationState state; - ProcessNewBlock(state, chainparams, pfrom, &block, false, NULL); + // BIP 152 permits peers to relay compact blocks after validating + // the header only; we should not punish peers if the block turns + // out to be invalid. + ProcessNewBlock(state, chainparams, pfrom, &block, false, NULL, false); int nDoS; if (state.IsInvalid(nDoS)) { assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), block.GetHash()); - if (nDoS > 0) { - LOCK(cs_main); - Misbehaving(pfrom->GetId(), nDoS); - } } } } @@ -5968,7 +5985,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // Such an unrequested block may still be processed, subject to the // conditions in AcceptBlock(). bool forceProcessing = pfrom->fWhitelisted && !IsInitialBlockDownload(); - ProcessNewBlock(state, chainparams, pfrom, &block, forceProcessing, NULL); + ProcessNewBlock(state, chainparams, pfrom, &block, forceProcessing, NULL, true); int nDoS; if (state.IsInvalid(nDoS)) { assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes diff --git a/src/main.h b/src/main.h index 0ca13d82d63..daf884337d8 100644 --- a/src/main.h +++ b/src/main.h @@ -222,7 +222,7 @@ void UnregisterNodeSignals(CNodeSignals& nodeSignals); * @param[out] dbp The already known disk position of pblock, or NULL if not yet stored. * @return True if state.IsValid() */ -bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp); +bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp, bool fMayBanPeerIfInvalid); /** Check whether enough disk space is available for an incoming block */ bool CheckDiskSpace(uint64_t nAdditionalBytes = 0); /** Open a block file (blk?????.dat) */ diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 14a61a55dd8..e6901bc77e4 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -131,7 +131,7 @@ UniValue generateBlocks(boost::shared_ptr coinbaseScript, int nG continue; } CValidationState state; - if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL)) + if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL, false)) throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted"); ++nHeight; blockHashes.push_back(pblock->GetHash().GetHex()); @@ -760,7 +760,7 @@ UniValue submitblock(const UniValue& params, bool fHelp) CValidationState state; submitblock_StateCatcher sc(block.GetHash()); RegisterValidationInterface(&sc); - bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL); + bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL, false); UnregisterValidationInterface(&sc); if (fBlockPresent) { diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 15fceb963a5..70ba7077951 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -222,7 +222,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) pblock->hashMerkleRoot = BlockMerkleRoot(*pblock); pblock->nNonce = blockinfo[i].nonce; CValidationState state; - BOOST_CHECK(ProcessNewBlock(state, chainparams, NULL, pblock, true, NULL)); + BOOST_CHECK(ProcessNewBlock(state, chainparams, NULL, pblock, true, NULL, false)); BOOST_CHECK(state.IsValid()); pblock->hashPrevBlock = pblock->GetHash(); } diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index 056f2982cf1..09f9a362d02 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -118,7 +118,7 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector& while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce; CValidationState state; - ProcessNewBlock(state, chainparams, NULL, &block, true, NULL); + ProcessNewBlock(state, chainparams, NULL, &block, true, NULL, false); CBlock result = block; delete pblocktemplate; From e8ef50ba51968da67a36c9fae6938d868b434da2 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 1 Nov 2016 11:12:43 -0400 Subject: [PATCH 212/302] Bump the protocol version to distinguish new banning behavior. This allows future software that would relay compact blocks before full validation to announce only to peers that will not ban if the block turns out to be invalid. --- src/version.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/version.h b/src/version.h index 68ccd6d3783..497f82be235 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ * network protocol versioning */ -static const int PROTOCOL_VERSION = 70014; +static const int PROTOCOL_VERSION = 70015; //! initial proto version, to be increased after version/verack negotiation static const int INIT_PROTO_VERSION = 209; @@ -42,4 +42,7 @@ static const int FEEFILTER_VERSION = 70013; //! shord-id-based block download starts with this version static const int SHORT_IDS_BLOCKS_VERSION = 70014; +//! not banning for invalid compact blocks starts with this version +static const int INVALID_CB_NO_BAN_VERSION = 70015; + #endif // BITCOIN_VERSION_H From 3107280e14f7ca63c693937aac490794ae746a09 Mon Sep 17 00:00:00 2001 From: mrbandrews Date: Tue, 15 Nov 2016 15:37:46 -0500 Subject: [PATCH 213/302] [qa] add assert_raises_message to check specific error message Github-Pull: #9168 Rebased-From: 307acdd3df03082295ac0f7fe9eba7dd35973bc4 --- qa/rpc-tests/test_framework/util.py | 8 ++++++-- qa/rpc-tests/wallet.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 47cebf4f6e0..c5f270591e1 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -508,10 +508,14 @@ def assert_greater_than(thing1, thing2): raise AssertionError("%s <= %s"%(str(thing1),str(thing2))) def assert_raises(exc, fun, *args, **kwds): + assert_raises_message(exc, None, fun, *args, **kwds) + +def assert_raises_message(exc, message, fun, *args, **kwds): try: fun(*args, **kwds) - except exc: - pass + except exc as e: + if message is not None and message not in e.error['message']: + raise AssertionError("Expected substring not found:"+e.error['message']) except Exception as e: raise AssertionError("Unexpected exception raised: "+type(e).__name__) else: diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index e43f6ea5d22..3c0dc0f4ea1 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -71,7 +71,7 @@ def run_test (self): unspent_0 = self.nodes[2].listunspent()[0] unspent_0 = {"txid": unspent_0["txid"], "vout": unspent_0["vout"]} self.nodes[2].lockunspent(False, [unspent_0]) - assert_raises(JSONRPCException, self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20) + assert_raises_message(JSONRPCException, "Insufficient funds", self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20) assert_equal([unspent_0], self.nodes[2].listlockunspent()) self.nodes[2].lockunspent(True, [unspent_0]) assert_equal(len(self.nodes[2].listlockunspent()), 0) From 1d4c884cd325150c68b8b129e4dc18a933866509 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 2 Nov 2016 09:46:55 -0400 Subject: [PATCH 214/302] [qa] Increase wallet-dump RPC timeout Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a timeout error that seemed to happen regularly (around 50% of builds) on a particular jenkins server during the first getnewaddress RPC call made by the test. The failing stack trace looked like: Unexpected exception caught during testing: timeout('timed out',) File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main self.run_test() File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test addr = self.nodes[0].getnewaddress() File ".../bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 145, in __call__ response = self._request('POST', self.__url.path, postdata.encode('utf-8')) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request return self._get_response() File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response http_response = self.__conn.getresponse() File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse response.begin() File "/usr/lib/python3.4/http/client.py", line 351, in begin version, status, reason = self._read_status() File "/usr/lib/python3.4/http/client.py", line 313, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.4/socket.py", line 374, in readinto return self._sock.recv_into(b) Github-Pull: #9077 Rebased-From: 8463aaa63c5ac76421c4d2754ea9e17a31584c93 --- qa/rpc-tests/test_framework/util.py | 4 ++-- qa/rpc-tests/wallet-dump.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index c5f270591e1..bf3f2b2db16 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -327,7 +327,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary= return proxy -def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None): +def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, timewait=None, binary=None): """ Start multiple bitcoinds, return RPC connections to them """ @@ -336,7 +336,7 @@ def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None): rpcs = [] try: for i in range(num_nodes): - rpcs.append(start_node(i, dirname, extra_args[i], rpchost, binary=binary[i])) + rpcs.append(start_node(i, dirname, extra_args[i], rpchost, timewait=timewait, binary=binary[i])) except: # If one node failed to start, stop the others stop_nodes(rpcs) raise diff --git a/qa/rpc-tests/wallet-dump.py b/qa/rpc-tests/wallet-dump.py index a37096a40ce..c6dc2e3d107 100755 --- a/qa/rpc-tests/wallet-dump.py +++ b/qa/rpc-tests/wallet-dump.py @@ -61,7 +61,11 @@ def __init__(self): self.extra_args = [["-keypool=90"]] def setup_network(self, split=False): - self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args) + # Use 1 minute timeout because the initial getnewaddress RPC can take + # longer than the default 30 seconds due to an expensive + # CWallet::TopUpKeyPool call, and the encryptwallet RPC made later in + # the test often takes even longer. + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args, timewait=60) def run_test (self): tmpdir = self.options.tmpdir From da4926b1d28c600076d3eb35df60981298194697 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 2 Nov 2016 15:08:54 -0400 Subject: [PATCH 215/302] [qa] Add more helpful RPC timeout message Replace previous timeout('timed out',) exception with more detailed error. Github-Pull: #9077 Rebased-From: e89614b6abf28d7fe201c3db44a0df6e4db6de03 --- qa/rpc-tests/test_framework/authproxy.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py index 1a94bf5fe96..7b051545c85 100644 --- a/qa/rpc-tests/test_framework/authproxy.py +++ b/qa/rpc-tests/test_framework/authproxy.py @@ -42,6 +42,7 @@ import decimal import json import logging +import socket try: import urllib.parse as urlparse except ImportError: @@ -157,7 +158,15 @@ def _batch(self, rpc_call_list): return self._request('POST', self.__url.path, postdata.encode('utf-8')) def _get_response(self): - http_response = self.__conn.getresponse() + try: + http_response = self.__conn.getresponse() + except socket.timeout as e: + raise JSONRPCException({ + 'code': -344, + 'message': '%r RPC took longer than %f seconds. Consider ' + 'using larger timeout for calls that take ' + 'longer to return.' % (self._service_name, + self.__conn.timeout)}) if http_response is None: raise JSONRPCException({ 'code': -342, 'message': 'missing HTTP response from server'}) From dccdc3aa34218eecd4a37988857b5d4f3dd884ef Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 18 Nov 2016 13:08:30 +0100 Subject: [PATCH 216/302] test: Fix use-after-free in scheduler tests Make a copy of the boost time-point to wait for, otherwise the head of the queue may be deleted by another thread while this one is waiting, while the boost function still has a reference to it. Although this problem is in non-test code, this is not an actual problem outside of the tests because we use the thread scheduler with only one service thread, so there will never be threads fighting at the head of the queue. The old boost fallback escapes this problem because it passes a scalar value to wait_until instead of a const object reference. Found by running the tests in LLVM-4.0-master asan. Github-Pull: #9186 Rebased-From: 12519bf62b8c49b1c1744eca6ea5b3162a61f962 --- src/scheduler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 52777b61f96..27c03f154cb 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -54,9 +54,10 @@ void CScheduler::serviceQueue() #else // Some boost versions have a conflicting overload of wait_until that returns void. // Explicitly use a template here to avoid hitting that overload. - while (!shouldStop() && !taskQueue.empty() && - newTaskScheduled.wait_until<>(lock, taskQueue.begin()->first) != boost::cv_status::timeout) { - // Keep waiting until timeout + while (!shouldStop() && !taskQueue.empty()) { + boost::chrono::system_clock::time_point timeToWaitFor = taskQueue.begin()->first; + if (newTaskScheduled.wait_until<>(lock, timeToWaitFor) == boost::cv_status::timeout) + break; // Exit loop after timeout, it means we reached the time of the event } #endif // If there are multiple threads, the queue can empty while we're waiting (another From eca9b4653788570c25e646dcdfa9ba088e89f20e Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Mon, 14 Nov 2016 09:58:30 -0500 Subject: [PATCH 217/302] [qa] Wait for specific block announcement in p2p-compactblocks Change check_announcement_of_new_block() to wait specifically for the announcement of the newly created block, instead of waiting for any announcement at all. A difficult to reproduce failure in check_announcement_of_new_block() that happened in a travis build (https://travis-ci.org/bitcoin/bitcoin/jobs/175198367) might have happened because an older announcement was mistaken for the expected one. The error looked like: Assertion failed: Failed File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 145, in main self.run_test() File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 787, in run_test self.test_sendcmpct(self.nodes[1], self.segwit_node, 2, old_node=self.old_node) File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 201, in test_sendcmpct check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None) File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 194, in check_announcement_of_new_block assert(predicate(peer)) This commit also changes the assertion failed message above to include more detailed information for debug. Github-Pull: #9159 Rebased-From: dfa44d1b07a6d1022005dba63dd6372739eee8a0 --- qa/rpc-tests/p2p-compactblocks.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 9ecced0dd3c..c20cbede5dd 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -186,12 +186,15 @@ def received_sendcmpct(): def check_announcement_of_new_block(node, peer, predicate): peer.clear_block_announcement() - node.generate(1) - got_message = wait_until(lambda: peer.block_announced, timeout=30) + block_hash = int(node.generate(1)[0], 16) + peer.wait_for_block_announcement(block_hash, timeout=30) assert(peer.block_announced) assert(got_message) + with mininode_lock: - assert(predicate(peer)) + assert predicate(peer), ( + "block_hash={!r}, cmpctblock={!r}, inv={!r}".format( + block_hash, peer.last_cmpctblock, peer.last_inv)) # We shouldn't get any block announcements via cmpctblock yet. check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None) From 2ba5d784276783716bbf27b458514c4c3f44f4b6 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Mon, 24 Oct 2016 15:33:14 -0400 Subject: [PATCH 218/302] [qa] Fix bug in compactblocks v2 merge Bug caused the wait_for_block_announcement to be called on the wrong node, leading to nondeterminism and occasional test failures. Bug was introduced in merge commit: d075479 Merge #8882: [qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py Underlying commits which conflicted were: 27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 6976db2 [qa] Another attempt to fix race condition in p2p-compactblocks.py The first commit changed the test_compactblock_construction function signature and second commit added code which wasn't updated during the merge to use the new arguments. Suhas Daftuar noticed the bug and suggested the fix. Github-Pull: #9058 Rebased-From: 47e9659ecfbe07077a4564591095bd5510e0f917 --- qa/rpc-tests/p2p-compactblocks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index c20cbede5dd..0abb9f98697 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -303,8 +303,8 @@ def test_compactblock_construction(self, node, test_node, version, use_witness_a assert(segwit_tx_generated) # check that our test is not broken # Wait until we've seen the block announcement for the resulting tip - tip = int(self.nodes[0].getbestblockhash(), 16) - assert(self.test_node.wait_for_block_announcement(tip)) + tip = int(node.getbestblockhash(), 16) + assert(test_node.wait_for_block_announcement(tip)) # Now mine a block, and look at the resulting compact block. test_node.clear_block_announcement() From 286e548d87266f3b394d75182f04fb701b2263e8 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 26 Oct 2016 14:15:16 -0400 Subject: [PATCH 219/302] [qa] Fix stale data bug in test_compactblocks_not_at_tip Clear test_node.last_block before requesting blocks in the compactblocks_not_at_tip test so comparisons won't fail if a blocks were received before the test started. The bug doesn't currently cause any problems due to the order tests run, but this will change in the next commit. Github-Pull: #9058 Rebased-From: 55bfddcabbf9e8a3743f77167ba4a43aaba9f948 --- qa/rpc-tests/p2p-compactblocks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 0abb9f98697..249afec2b5e 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -651,6 +651,8 @@ def test_compactblocks_not_at_tip(self, node, test_node): node.generate(1) wait_until(test_node.received_block_announcement, timeout=30) test_node.clear_block_announcement() + with mininode_lock: + test_node.last_block = None test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) success = wait_until(lambda: test_node.last_block is not None, timeout=30) assert(success) From 36e3b951039b98508badaafa0bbec166c22900d3 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 21 Jun 2016 13:08:29 -0700 Subject: [PATCH 220/302] Dont remove a "preferred" cmpctblock peer if they provide a block Github-Pull: #8637 Rebased-From: 02a337defdd854efc78ecba6d1fb19cb1c075f16 --- src/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 96734b839ff..3436caaf106 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -495,9 +495,13 @@ void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pf return; } if (nodestate->fProvidesHeaderAndIDs) { - BOOST_FOREACH(const NodeId nodeid, lNodesAnnouncingHeaderAndIDs) - if (nodeid == pfrom->GetId()) + for (std::list::iterator it = lNodesAnnouncingHeaderAndIDs.begin(); it != lNodesAnnouncingHeaderAndIDs.end(); it++) { + if (*it == pfrom->GetId()) { + lNodesAnnouncingHeaderAndIDs.erase(it); + lNodesAnnouncingHeaderAndIDs.push_back(pfrom->GetId()); return; + } + } bool fAnnounceUsingCMPCTBLOCK = false; uint64_t nCMPCTBLOCKVersion = (nLocalServices & NODE_WITNESS) ? 2 : 1; if (lNodesAnnouncingHeaderAndIDs.size() >= 3) { @@ -5727,6 +5731,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, return true; } + if (!fAlreadyInFlight && mapBlocksInFlight.size() == 1 && pindex->pprev->IsValid(BLOCK_VALID_CHAIN)) { + // We seem to be rather well-synced, so it appears pfrom was the first to provide us + // with this block! Let's get them to announce using compact blocks in the future. + MaybeSetPeerAsAnnouncingHeaderAndIDs(nodestate, pfrom, connman); + } + BlockTransactionsRequest req; for (size_t i = 0; i < cmpctblock.BlockTxCount(); i++) { if (!partialBlock.IsTxAvailable(i)) From 76ba1c973948a33bbf87d13c4bd2f2b81fb466a2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 21 Jun 2016 16:28:38 -0700 Subject: [PATCH 221/302] More agressively filter compact block requests Unit test adaptations by Pieter Wuille. Github-Pull: #8637 Rebased-From: fe998e962dc015978f104b782afb7daec3c4d4df --- qa/rpc-tests/p2p-compactblocks.py | 4 ++-- src/main.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 249afec2b5e..4029669780e 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -594,7 +594,7 @@ def test_incorrect_blocktxn_response(self, node, test_node, version): def test_getblocktxn_handler(self, node, test_node, version): # bitcoind won't respond for blocks whose height is more than 15 blocks # deep. - MAX_GETBLOCKTXN_DEPTH = 15 + MAX_GETBLOCKTXN_DEPTH = 10 chain_height = node.getblockcount() current_height = chain_height while (current_height >= chain_height - MAX_GETBLOCKTXN_DEPTH): @@ -635,7 +635,7 @@ def test_getblocktxn_handler(self, node, test_node, version): def test_compactblocks_not_at_tip(self, node, test_node): # Test that requesting old compactblocks doesn't work. - MAX_CMPCTBLOCK_DEPTH = 11 + MAX_CMPCTBLOCK_DEPTH = 6 new_blocks = [] for i in range(MAX_CMPCTBLOCK_DEPTH): test_node.clear_block_announcement() diff --git a/src/main.cpp b/src/main.cpp index 3436caaf106..2e09b6cf753 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4855,7 +4855,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam // and we don't feel like constructing the object for them, so // instead we respond with the full, non-compact block. bool fPeerWantsWitness = State(pfrom->GetId())->fWantsCmpctWitness; - if (mi->second->nHeight >= chainActive.Height() - 10) { + if (CanDirectFetch(Params().GetConsensus()) && mi->second->nHeight >= chainActive.Height() - 5) { CBlockHeaderAndShortTxIDs cmpctblock(block, fPeerWantsWitness); pfrom->PushMessageWithFlag(fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock); } else @@ -5401,8 +5401,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, return true; } - if (it->second->nHeight < chainActive.Height() - 15) { - LogPrint("net", "Peer %d sent us a getblocktxn for a block > 15 deep", pfrom->id); + if (it->second->nHeight < chainActive.Height() - 10) { + LogPrint("net", "Peer %d sent us a getblocktxn for a block > 10 deep", pfrom->id); return true; } From 3d23a0eaa3cfa349833e42345daf954e9530bdfd Mon Sep 17 00:00:00 2001 From: instagibbs Date: Wed, 22 Jun 2016 08:18:22 -0400 Subject: [PATCH 222/302] Add cmpctblock to debug help list Github-Pull: #8637 Rebased-From: b2e93a343ec2dc7d255b970e6ee45e9c390f7ed0 --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index f2b13b627ae..eab8de8d029 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -412,7 +412,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-limitdescendantsize=", strprintf("Do not accept transactions if any ancestor would have more than kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT)); strUsage += HelpMessageOpt("-bip9params=deployment:start:end", "Use given start/end times for specified bip9 deployment (regtest-only)"); } - string debugCategories = "addrman, alert, bench, coindb, db, http, libevent, lock, mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins, tor, zmq"; // Don't translate these and qt below + string debugCategories = "addrman, alert, bench, cmpctblock, coindb, db, http, libevent, lock, mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins, tor, zmq"; // Don't translate these and qt below if (mode == HMM_BITCOIN_QT) debugCategories += ", qt"; strUsage += HelpMessageOpt("-debug=", strprintf(_("Output debugging information (default: %u, supplying is optional)"), 0) + ". " + From 2cad5db6f752ad8fa2d047b67a137de76eb9c982 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 31 Aug 2016 17:35:59 +0200 Subject: [PATCH 223/302] Align constant names for maximum compact block / blocktxn depth Github-Pull: #8637 Rebased-From: 3ac6de0a045cc9b2047ceb19af970e7ffbf905fa --- qa/rpc-tests/p2p-compactblocks.py | 4 ++-- src/main.cpp | 6 +++--- src/main.h | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 4029669780e..0c73032c9df 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -635,9 +635,9 @@ def test_getblocktxn_handler(self, node, test_node, version): def test_compactblocks_not_at_tip(self, node, test_node): # Test that requesting old compactblocks doesn't work. - MAX_CMPCTBLOCK_DEPTH = 6 + MAX_CMPCTBLOCK_DEPTH = 5 new_blocks = [] - for i in range(MAX_CMPCTBLOCK_DEPTH): + for i in range(MAX_CMPCTBLOCK_DEPTH + 1): test_node.clear_block_announcement() new_blocks.append(node.generate(1)[0]) wait_until(test_node.received_block_announcement, timeout=30) diff --git a/src/main.cpp b/src/main.cpp index 2e09b6cf753..db020a4495d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4855,7 +4855,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam // and we don't feel like constructing the object for them, so // instead we respond with the full, non-compact block. bool fPeerWantsWitness = State(pfrom->GetId())->fWantsCmpctWitness; - if (CanDirectFetch(Params().GetConsensus()) && mi->second->nHeight >= chainActive.Height() - 5) { + if (CanDirectFetch(consensusParams) && mi->second->nHeight >= chainActive.Height() - MAX_CMPCTBLOCK_DEPTH) { CBlockHeaderAndShortTxIDs cmpctblock(block, fPeerWantsWitness); pfrom->PushMessageWithFlag(fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock); } else @@ -5401,8 +5401,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, return true; } - if (it->second->nHeight < chainActive.Height() - 10) { - LogPrint("net", "Peer %d sent us a getblocktxn for a block > 10 deep", pfrom->id); + if (it->second->nHeight < chainActive.Height() - MAX_BLOCKTXN_DEPTH) { + LogPrint("net", "Peer %d sent us a getblocktxn for a block > %i deep", pfrom->id, MAX_BLOCKTXN_DEPTH); return true; } diff --git a/src/main.h b/src/main.h index daf884337d8..024f35cd399 100644 --- a/src/main.h +++ b/src/main.h @@ -89,6 +89,11 @@ static const unsigned int BLOCK_STALLING_TIMEOUT = 2; /** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends * less than this number, we reached its tip. Changing this value is a protocol upgrade. */ static const unsigned int MAX_HEADERS_RESULTS = 2000; +/** Maximum depth of blocks we're willing to serve as compact blocks to peers + * when requested. For older blocks, a regular BLOCK response will be sent. */ +static const int MAX_CMPCTBLOCK_DEPTH = 5; +/** Maximum depth of blocks we're willing to respond to GETBLOCKTXN requests for. */ +static const int MAX_BLOCKTXN_DEPTH = 10; /** Size of the "block download window": how far ahead of our current height do we fetch? * Larger windows tolerate larger download speed differences between peer, but increase the potential * degree of disordering of blocks on disk (which make reindexing and in the future perhaps pruning From e8461666ecd7f0f89fba92a377c0f8beffa233e9 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Wed, 26 Oct 2016 14:53:18 -0400 Subject: [PATCH 224/302] Modify getblocktxn handler not to drop requests for old blocks The current getblocktxn implementation drops and ignores requests for old blocks, which causes occasional sync_block timeouts during the p2p-compactblocks.py test as reported in https://github.com/bitcoin/bitcoin/issues/8842. The p2p-compactblocks.py test setup creates many new blocks in a short period of time, which can lead to getblocktxn requests for blocks below the hardcoded depth limit of 10 blocks. This commit changes the getblocktxn handler not to ignore these requests, so the peer nodes in the test setup will reliably be able to sync. The protocol change is documented in BIP-152 update "Allow block responses to getblocktxn requests" at https://github.com/bitcoin/bips/pull/469. The protocol change is not expected to affect nodes running outside the test environment, because there shouldn't normally be lots of new blocks being rapidly added that need to be synced. Github-Pull: #9058 Rebased-From: dac53b58b555183ccc0d5e64c428528267cd98b3 Github-Pull: #9160 Rebased-From: ec34648766c4052816e4072cc61ad429430bcfd9 --- qa/rpc-tests/p2p-compactblocks.py | 12 +++++++++--- src/main.cpp | 14 +++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 0c73032c9df..e0b72e68402 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -592,8 +592,8 @@ def test_incorrect_blocktxn_response(self, node, test_node, version): assert_equal(int(node.getbestblockhash(), 16), block.sha256) def test_getblocktxn_handler(self, node, test_node, version): - # bitcoind won't respond for blocks whose height is more than 15 blocks - # deep. + # bitcoind will not send blocktxn responses for blocks whose height is + # more than 10 blocks deep. MAX_GETBLOCKTXN_DEPTH = 10 chain_height = node.getblockcount() current_height = chain_height @@ -626,11 +626,17 @@ def test_getblocktxn_handler(self, node, test_node, version): test_node.last_blocktxn = None current_height -= 1 - # Next request should be ignored, as we're past the allowed depth. + # Next request should send a full block response, as we're past the + # allowed depth for a blocktxn response. block_hash = node.getblockhash(current_height) msg.block_txn_request = BlockTransactionsRequest(int(block_hash, 16), [0]) + with mininode_lock: + test_node.last_block = None + test_node.last_blocktxn = None test_node.send_and_ping(msg) with mininode_lock: + test_node.last_block.block.calc_sha256() + assert_equal(test_node.last_block.block.sha256, int(block_hash, 16)) assert_equal(test_node.last_blocktxn, None) def test_compactblocks_not_at_tip(self, node, test_node): diff --git a/src/main.cpp b/src/main.cpp index db020a4495d..191bcff4cc1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5402,7 +5402,19 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } if (it->second->nHeight < chainActive.Height() - MAX_BLOCKTXN_DEPTH) { + // If an older block is requested (should never happen in practice, + // but can happen in tests) send a block response instead of a + // blocktxn response. Sending a full block response instead of a + // small blocktxn response is preferable in the case where a peer + // might maliciously send lots of getblocktxn requests to trigger + // expensive disk reads, because it will require the peer to + // actually receive all the data read from disk over the network. LogPrint("net", "Peer %d sent us a getblocktxn for a block > %i deep", pfrom->id, MAX_BLOCKTXN_DEPTH); + CInv inv; + inv.type = State(pfrom->GetId())->fWantsCmpctWitness ? MSG_WITNESS_BLOCK : MSG_BLOCK; + inv.hash = req.blockhash; + pfrom->vRecvGetData.push_back(inv); + ProcessGetData(pfrom, chainparams.GetConsensus()); return true; } @@ -5734,7 +5746,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, if (!fAlreadyInFlight && mapBlocksInFlight.size() == 1 && pindex->pprev->IsValid(BLOCK_VALID_CHAIN)) { // We seem to be rather well-synced, so it appears pfrom was the first to provide us // with this block! Let's get them to announce using compact blocks in the future. - MaybeSetPeerAsAnnouncingHeaderAndIDs(nodestate, pfrom, connman); + MaybeSetPeerAsAnnouncingHeaderAndIDs(nodestate, pfrom); } BlockTransactionsRequest req; From 94531b53509470e01dcbd90275577cb37a794fa8 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 28 Nov 2016 17:13:51 +0100 Subject: [PATCH 225/302] torcontrol: Explicitly request RSA1024 private key When generating a new service key, explicitly request a RSA1024 one. The bitcoin P2P protocol has no support for the longer hidden service names that will come with ed25519 keys, until it does, we depend on the old hidden service type so make this explicit. See #9214. Rebased-From: 7d3b627395582ae7c9d54ebdbc68096d7042162b Github-Pull: #9234 --- src/torcontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index 0d6b655675d..261da728a64 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -469,7 +469,7 @@ void TorController::auth_cb(TorControlConnection& conn, const TorControlReply& r // Finally - now create the service if (private_key.empty()) // No private key, generate one - private_key = "NEW:BEST"; + private_key = "NEW:RSA1024"; // Explicitly request RSA1024 - see issue #9214 // Request hidden service, redirect port. // Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient // choice. TODO; refactor the shutdown sequence some day. From b172377857f9b5a0b2f43e0e57be9acf82a6c50a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 1 Dec 2016 14:31:38 -0800 Subject: [PATCH 226/302] Revert "Use async name resolving to improve net thread responsiveness" This reverts commit caf6150e9785da408f1e603ae70eae25b5202d98. getaddrinfo_a has a nasty tendency to segfault internally in its background thread, on every version of glibc I tested, especially under helgrind. See https://sourceware.org/bugzilla/show_bug.cgi?id=20874 Github-Pull: #9229 Rebased-From: 10ae7a7b2316f8052ec58ef237ce6dd987300900 --- configure.ac | 2 -- src/netbase.cpp | 48 +----------------------------------------------- 2 files changed, 1 insertion(+), 49 deletions(-) diff --git a/configure.ac b/configure.ac index 97b330449f1..b091c74b75d 100644 --- a/configure.ac +++ b/configure.ac @@ -527,8 +527,6 @@ if test x$TARGET_OS = xdarwin; then fi AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h]) -AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])]) -AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])]) AC_CHECK_DECLS([strnlen]) diff --git a/src/netbase.cpp b/src/netbase.cpp index e2a516986c1..ebf30d43e30 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -96,30 +96,9 @@ bool static LookupIntern(const char *pszName, std::vector& vIP, unsign } } -#ifdef HAVE_GETADDRINFO_A - struct in_addr ipv4_addr; -#ifdef HAVE_INET_PTON - if (inet_pton(AF_INET, pszName, &ipv4_addr) > 0) { - vIP.push_back(CNetAddr(ipv4_addr)); - return true; - } - - struct in6_addr ipv6_addr; - if (inet_pton(AF_INET6, pszName, &ipv6_addr) > 0) { - vIP.push_back(CNetAddr(ipv6_addr)); - return true; - } -#else - ipv4_addr.s_addr = inet_addr(pszName); - if (ipv4_addr.s_addr != INADDR_NONE) { - vIP.push_back(CNetAddr(ipv4_addr)); - return true; - } -#endif -#endif - struct addrinfo aiHint; memset(&aiHint, 0, sizeof(struct addrinfo)); + aiHint.ai_socktype = SOCK_STREAM; aiHint.ai_protocol = IPPROTO_TCP; aiHint.ai_family = AF_UNSPEC; @@ -128,33 +107,8 @@ bool static LookupIntern(const char *pszName, std::vector& vIP, unsign #else aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST; #endif - struct addrinfo *aiRes = NULL; -#ifdef HAVE_GETADDRINFO_A - struct gaicb gcb, *query = &gcb; - memset(query, 0, sizeof(struct gaicb)); - gcb.ar_name = pszName; - gcb.ar_request = &aiHint; - int nErr = getaddrinfo_a(GAI_NOWAIT, &query, 1, NULL); - if (nErr) - return false; - - do { - // Should set the timeout limit to a reasonable value to avoid - // generating unnecessary checking call during the polling loop, - // while it can still response to stop request quick enough. - // 2 seconds looks fine in our situation. - struct timespec ts = { 2, 0 }; - gai_suspend(&query, 1, &ts); - boost::this_thread::interruption_point(); - - nErr = gai_error(query); - if (0 == nErr) - aiRes = query->ar_result; - } while (nErr == EAI_INPROGRESS); -#else int nErr = getaddrinfo(pszName, NULL, &aiHint, &aiRes); -#endif if (nErr) return false; From d1b4da9259ded1776479ac97b30d8eaa6747ee71 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 15 Nov 2016 16:12:17 -0500 Subject: [PATCH 227/302] build: fix qt5.7 build under macOS OBJCXX's std flags don't get defined by our cxx macro. Rather than hard-coding to c++11, just force OBJCXX to be the same as CXX unless the user specified otherwise. Github-Pull: #9169 Rebased-From: 70266e98292bf9c8f019ca4b11d681b575f71448 --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b091c74b75d..41b42126e62 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,6 @@ else CXXFLAGS_overridden=no fi AC_PROG_CXX -m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX]) dnl By default, libtool for mingw refuses to link static libs into a dll for dnl fear of mixing pic/non-pic objects, and import/export complications. Since @@ -60,6 +59,15 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) dnl Check if -latomic is required for CHECK_ATOMIC +dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures +dnl that we get the same -std flags for both. +m4_ifdef([AC_PROG_OBJCXX],[ +if test "x${OBJCXX+set}" = "x"; then + OBJCXX="${CXX}" +fi +AC_PROG_OBJCXX +]) + dnl Libtool init checks. LT_INIT([pic-only]) From 094848baf01ae7f2ab8dbac4a625a8c956f2a760 Mon Sep 17 00:00:00 2001 From: jnewbery Date: Tue, 27 Sep 2016 13:40:16 -0400 Subject: [PATCH 228/302] log block size and weight correctly. Github-Pull: #8838 Rebased-From: 5f274a1749acfdf331bc2931e25ac80c346e5faa --- src/miner.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/miner.cpp b/src/miner.cpp index 9575858840d..6cb40dae8d9 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -168,7 +168,6 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) nLastBlockTx = nBlockTx; nLastBlockSize = nBlockSize; nLastBlockWeight = nBlockWeight; - LogPrintf("CreateNewBlock(): total size %u txs: %u fees: %ld sigops %d\n", nBlockSize, nBlockTx, nFees, nBlockSigOpsCost); // Create coinbase transaction. CMutableTransaction coinbaseTx; @@ -182,6 +181,9 @@ CBlockTemplate* BlockAssembler::CreateNewBlock(const CScript& scriptPubKeyIn) pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus()); pblocktemplate->vTxFees[0] = -nFees; + uint64_t nSerializeSize = GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION); + LogPrintf("CreateNewBlock(): total size: %u block weight: %u txs: %u fees: %ld sigops %d\n", nSerializeSize, GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost); + // Fill in header pblock->hashPrevBlock = pindexPrev->GetBlockHash(); UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev); From da5a16b11dca8f61d75f92bb08f1dd19a7800158 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Tue, 22 Nov 2016 02:50:24 +0000 Subject: [PATCH 229/302] Always drop the least preferred HB peer when adding a new one. When a BIP152 HB-mode peer is in the least preferred position and disconnects, they will not be by ForNode on the next loop. They will continue to sit in that position and prevent deactivating HB mode for peers that are still connected. There is no reason for them to stay in the list if already gone, so drop the first element unconditionally if there are too many. Fixes issue #9163. Github-Pull: #9199 Rebased-From: ca8549d2bd32f17f8b69d1edbe3f2976fba504b4 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 191bcff4cc1..6ad43042870 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -510,8 +510,8 @@ void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pf CNode* pnodeStop = FindNode(lNodesAnnouncingHeaderAndIDs.front()); if (pnodeStop) { pnodeStop->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); - lNodesAnnouncingHeaderAndIDs.pop_front(); } + lNodesAnnouncingHeaderAndIDs.pop_front(); } fAnnounceUsingCMPCTBLOCK = true; pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); From 99477c71c4cdb5127e0fd6e12f29507320432d9f Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 18 Nov 2016 12:15:01 -0800 Subject: [PATCH 230/302] Always add default_witness_commitment with GBT client support Github-Pull: #9189 Rebased-From: ad04d1cb35b9612d36078c62213bdbb13f56d73d --- src/main.cpp | 9 +-------- src/rpc/mining.cpp | 4 +++- src/test/miner_tests.cpp | 1 + 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6ad43042870..addc0f93a66 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3503,15 +3503,8 @@ std::vector GenerateCoinbaseCommitment(CBlock& block, const CBloc { std::vector commitment; int commitpos = GetWitnessCommitmentIndex(block); - bool fHaveWitness = false; - for (size_t t = 1; t < block.vtx.size(); t++) { - if (!block.vtx[t].wit.IsNull()) { - fHaveWitness = true; - break; - } - } std::vector ret(32, 0x00); - if (fHaveWitness && IsWitnessEnabled(pindexPrev, consensusParams)) { + if (consensusParams.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout != 0) { if (commitpos == -1) { uint256 witnessroot = BlockWitnessMerkleRoot(block, NULL); CHash256().Write(witnessroot.begin(), 32).Write(&ret[0], 32).Finalize(witnessroot.begin()); diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index e6901bc77e4..ba48079c055 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -683,7 +683,9 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) result.push_back(Pair("curtime", pblock->GetBlockTime())); result.push_back(Pair("bits", strprintf("%08x", pblock->nBits))); result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1))); - if (!pblocktemplate->vchCoinbaseCommitment.empty()) { + + const struct BIP9DeploymentInfo& segwit_info = VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_SEGWIT]; + if (!pblocktemplate->vchCoinbaseCommitment.empty() && setClientRules.find(segwit_info.name) != setClientRules.end()) { result.push_back(Pair("default_witness_commitment", HexStr(pblocktemplate->vchCoinbaseCommitment.begin(), pblocktemplate->vchCoinbaseCommitment.end()))); } diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 70ba7077951..f2bd082cba2 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -213,6 +213,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) txCoinbase.vin[0].scriptSig = CScript(); txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce); txCoinbase.vin[0].scriptSig.push_back(chainActive.Height()); + txCoinbase.vout.resize(1); // Ignore the (optional) segwit commitment added by CreateNewBlock (as the hardcoded nonces don't account for this) txCoinbase.vout[0].scriptPubKey = CScript(); pblock->vtx[0] = CTransaction(txCoinbase); if (txFirst.size() == 0) From b96a8f7df23956cc4c41c414a01964c9cad54699 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Sat, 19 Nov 2016 06:55:25 -0500 Subject: [PATCH 231/302] [qa] Test getblocktemplate default_witness_commitment Github-Pull: #9189 Rebased-From: 95f4a03777ec2ad82a94a3e2890192a93ad83509 --- qa/rpc-tests/p2p-segwit.py | 70 +++++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py index 7218ae83d88..fddd2627be3 100755 --- a/qa/rpc-tests/p2p-segwit.py +++ b/qa/rpc-tests/p2p-segwit.py @@ -182,11 +182,6 @@ class SegWitTest(BitcoinTestFramework): def setup_chain(self): initialize_chain_clean(self.options.tmpdir, 3) - def add_options(self, parser): - parser.add_option("--oldbinary", dest="oldbinary", - default=None, - help="pre-segwit bitcoind binary for upgrade testing") - def setup_network(self): self.nodes = [] self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-whitelist=127.0.0.1"])) @@ -194,12 +189,9 @@ def setup_network(self): self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-whitelist=127.0.0.1", "-acceptnonstdtxn=0"])) connect_nodes(self.nodes[0], 1) - # If an old bitcoind is given, do the upgrade-after-activation test. - self.test_upgrade = False - if (self.options.oldbinary != None): - self.nodes.append(start_node(2, self.options.tmpdir, ["-debug", "-whitelist=127.0.0.1"], binary=self.options.oldbinary)) - connect_nodes(self.nodes[0], 2) - self.test_upgrade = True + # Disable segwit's bip9 parameter to simulate upgrading after activation. + self.nodes.append(start_node(2, self.options.tmpdir, ["-debug", "-whitelist=127.0.0.1", "-bip9params=segwit:0:0"])) + connect_nodes(self.nodes[0], 2) ''' Helpers ''' # Build a block on top of node0's tip. @@ -1164,7 +1156,7 @@ def test_standardness_v0(self, segwit_activated): if segwit_activated: # tx and tx2 were both accepted. Don't bother trying to reclaim the # P2PKH output; just send tx's first output back to an anyone-can-spend. - sync_mempools(self.nodes) + sync_mempools([self.nodes[0], self.nodes[1]]) tx3.vin = [CTxIn(COutPoint(tx.sha256, 0), b"")] tx3.vout = [CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))] tx3.wit.vtxinwit.append(CTxInWitness()) @@ -1693,19 +1685,53 @@ def test_witness_sigops(self): def test_getblocktemplate_before_lockin(self): print("\tTesting getblocktemplate setting of segwit versionbit (before lockin)") - block_version = (self.nodes[0].getblocktemplate())['version'] - assert_equal(block_version & (1 << VB_WITNESS_BIT), 0) + # Node0 is segwit aware, node2 is not. + for node in [self.nodes[0], self.nodes[2]]: + gbt_results = node.getblocktemplate() + block_version = gbt_results['version'] + # If we're not indicating segwit support, we should not be signalling + # for segwit activation, nor should we get a witness commitment. + assert_equal(block_version & (1 << VB_WITNESS_BIT), 0) + assert('default_witness_commitment' not in gbt_results) # Workaround: # Can either change the tip, or change the mempool and wait 5 seconds # to trigger a recomputation of getblocktemplate. - self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1) + txid = int(self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1), 16) # Using mocktime lets us avoid sleep() + sync_mempools(self.nodes) self.nodes[0].setmocktime(int(time.time())+10) - - block_version = self.nodes[0].getblocktemplate({"rules" : ["segwit"]})['version'] - assert(block_version & (1 << VB_WITNESS_BIT) != 0) - self.nodes[0].setmocktime(0) # undo mocktime + self.nodes[2].setmocktime(int(time.time())+10) + + for node in [self.nodes[0], self.nodes[2]]: + gbt_results = node.getblocktemplate({"rules" : ["segwit"]}) + block_version = gbt_results['version'] + if node == self.nodes[2]: + # If this is a non-segwit node, we should still not get a witness + # commitment, nor a version bit signalling segwit. + assert_equal(block_version & (1 << VB_WITNESS_BIT), 0) + assert('default_witness_commitment' not in gbt_results) + else: + # For segwit-aware nodes, check the version bit and the witness + # commitment are correct. + assert(block_version & (1 << VB_WITNESS_BIT) != 0) + assert('default_witness_commitment' in gbt_results) + witness_commitment = gbt_results['default_witness_commitment'] + + # TODO: this duplicates some code from blocktools.py, would be nice + # to refactor. + # Check that default_witness_commitment is present. + block = CBlock() + witness_root = block.get_merkle_root([ser_uint256(0), ser_uint256(txid)]) + check_commitment = uint256_from_str(hash256(ser_uint256(witness_root)+ser_uint256(0))) + from test_framework.blocktools import WITNESS_COMMITMENT_HEADER + output_data = WITNESS_COMMITMENT_HEADER + ser_uint256(check_commitment) + script = CScript([OP_RETURN, output_data]) + assert_equal(witness_commitment, bytes_to_hex_str(script)) + + # undo mocktime + self.nodes[0].setmocktime(0) + self.nodes[2].setmocktime(0) # Uncompressed pubkeys are no longer supported in default relay policy, # but (for now) are still valid in blocks. @@ -1945,6 +1971,7 @@ def run_test(self): # Advance to segwit being 'started' self.advance_to_segwit_started() + sync_blocks(self.nodes) self.test_getblocktemplate_before_lockin() sync_blocks(self.nodes) @@ -1987,10 +2014,7 @@ def run_test(self): self.test_signature_version_1() self.test_non_standard_witness() sync_blocks(self.nodes) - if self.test_upgrade: - self.test_upgrade_after_activation(self.nodes[2], 2) - else: - print("\tSkipping upgrade-after-activation test (use --oldbinary to enable)") + self.test_upgrade_after_activation(self.nodes[2], 2) self.test_witness_sigops() From ca1fd7521e86b016f2aa92048a13a297bab3c074 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Fri, 18 Nov 2016 19:11:08 +0000 Subject: [PATCH 232/302] Make orphan parent fetching ask for witnesses. In 0.13 orphan transactions began being treated as implicit INVs for their parents. But the resulting getdata were not getting the witness flag. This fixes issue #9182 reported by chjj and roasbeef on IRC. Github-Pull: #9188 Rebased-From: 5b0150a060208faf436c09b0ca9463407a869c72 --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index addc0f93a66..962960a1505 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5586,10 +5586,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } } if (!fRejectedParents) { + uint32_t nFetchFlags = GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus()); BOOST_FOREACH(const CTxIn& txin, tx.vin) { - CInv inv(MSG_TX, txin.prevout.hash); - pfrom->AddInventoryKnown(inv); - if (!AlreadyHave(inv)) pfrom->AskFor(inv); + CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash); + pfrom->AddInventoryKnown(_inv); + if (!AlreadyHave(_inv)) pfrom->AskFor(_inv); } AddOrphanTx(tx, pfrom->GetId()); From 3a3bcbf775840be34b27523bba9e5ab6321b4ffb Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Tue, 1 Nov 2016 00:08:47 +0000 Subject: [PATCH 233/302] Use RelevantServices instead of node_network in AttemptToEvict. Use of node_network here is really meant to be a proxy of "likely to send us blocks in the future". RelevantServices is the right criteria now. Github-Pull: #9052 Rebased-From: d32036a47d9ccdc38628a7a75bb8b711af462e4f --- src/net.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index faa7b002813..7cb612ee965 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -877,7 +877,7 @@ struct NodeEvictionCandidate int64_t nMinPingUsecTime; int64_t nLastBlockTime; int64_t nLastTXTime; - bool fNetworkNode; + bool fRelevantServices; bool fRelayTxes; bool fBloomFilter; CAddress addr; @@ -902,7 +902,7 @@ static bool CompareNodeBlockTime(const NodeEvictionCandidate &a, const NodeEvict { // There is a fall-through here because it is common for a node to have many peers which have not yet relayed a block. if (a.nLastBlockTime != b.nLastBlockTime) return a.nLastBlockTime < b.nLastBlockTime; - if (a.fNetworkNode != b.fNetworkNode) return b.fNetworkNode; + if (a.fRelevantServices != b.fRelevantServices) return b.fRelevantServices; return a.nTimeConnected > b.nTimeConnected; } @@ -936,7 +936,8 @@ static bool AttemptToEvictConnection() { if (node->fDisconnect) continue; NodeEvictionCandidate candidate = {node->id, node->nTimeConnected, node->nMinPingUsecTime, - node->nLastBlockTime, node->nLastTXTime, node->fNetworkNode, + node->nLastBlockTime, node->nLastTXTime, + (node->nServices & nRelevantServices) == nRelevantServices, node->fRelayTxes, node->pfilter != NULL, node->addr, node->nKeyedNetGroup}; vEvictionCandidates.push_back(candidate); } From 975ab1254eec5a191f22ba1d63863c00c88bdfcf Mon Sep 17 00:00:00 2001 From: randy-waterhouse Date: Thu, 6 Oct 2016 12:27:23 +1300 Subject: [PATCH 234/302] Update INSTALL landing redirection notice for build instructions. Github-Pull: #8896 Rebased-From: 2920be2a6994cfbffd93e72c6cf4c1ed19ac4339 --- INSTALL | 5 ----- INSTALL.md | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 INSTALL create mode 100644 INSTALL.md diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 07ee48427cd..00000000000 --- a/INSTALL +++ /dev/null @@ -1,5 +0,0 @@ -Building Bitcoin - -See doc/build-*.md for instructions on building bitcoind, -the intended-for-services, no-graphical-interface, reference -implementation of Bitcoin. \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000000..520a47d9607 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,5 @@ +Building Bitcoin +================ + +See doc/build-*.md for instructions on building the various +elements of the Bitcoin Core reference implementation of Bitcoin. From 4a974b2837150097e20076e10edb24b65fb8e7f8 Mon Sep 17 00:00:00 2001 From: matthias Date: Mon, 17 Oct 2016 17:45:36 +0200 Subject: [PATCH 235/302] Simple Update to File 'bitcoin-qt.desktop' Github-Pull: #8908 Rebased-From: 164196b7c8aecb72dd20c8681bb24b81b18aecaa --- contrib/debian/bitcoin-qt.desktop | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/debian/bitcoin-qt.desktop b/contrib/debian/bitcoin-qt.desktop index 61e1aca6ad0..593d7584ab0 100644 --- a/contrib/debian/bitcoin-qt.desktop +++ b/contrib/debian/bitcoin-qt.desktop @@ -1,7 +1,8 @@ [Desktop Entry] Encoding=UTF-8 -Name=Bitcoin -Comment=Bitcoin P2P Cryptocurrency +Name=Bitcoin Core +Comment=Connect to the Bitcoin P2P Network +Comment[de]=Verbinde mit dem Bitcoin peer-to-peer Netzwerk Comment[fr]=Bitcoin, monnaie virtuelle cryptographique pair à pair Comment[tr]=Bitcoin, eşten eşe kriptografik sanal para birimi Exec=bitcoin-qt %u From c134d9206d2629b479f4e0071ecafd9ec517ec04 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 17 Oct 2016 11:43:24 +0800 Subject: [PATCH 236/302] [build-aux] Boost_Base serial 27 Github-Pull: #8920 Rebased-From: 282abd8358e254d976cad05d0eb48586db276bcd --- build-aux/m4/ax_boost_base.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-aux/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4 index 45d948933d1..650c94fa647 100644 --- a/build-aux/m4/ax_boost_base.m4 +++ b/build-aux/m4/ax_boost_base.m4 @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 26 +#serial 27 AC_DEFUN([AX_BOOST_BASE], [ @@ -96,7 +96,7 @@ if test "x$want_boost" = "xyes"; then libsubdirs="lib64 libx32 lib lib64" ;; ppc64|s390x|sparc64|aarch64|ppc64le) - libsubdirs="lib64 lib lib64 ppc64le" + libsubdirs="lib64 lib lib64" ;; esac From 40169dcda9f8e26090807a53b03d10ca22c6395c Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 17 Oct 2016 11:43:59 +0800 Subject: [PATCH 237/302] Set minimum required Boost to 1.47.0 Github-Pull: #8920 Rebased-From: 6dd37237222f7102e223ece948150cb5c5087e3c --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 41b42126e62..e76a3c7222d 100644 --- a/configure.ac +++ b/configure.ac @@ -615,8 +615,11 @@ fi if test x$use_boost = xyes; then +dnl Minimum required Boost version +define(MINIMUM_REQUIRED_BOOST, 1.47.0) + dnl Check for boost libs -AX_BOOST_BASE +AX_BOOST_BASE([MINIMUM_REQUIRED_BOOST]) AX_BOOST_SYSTEM AX_BOOST_FILESYSTEM AX_BOOST_PROGRAM_OPTIONS From 12428b4d8a3dff3c32c909964536ed69f043f9d3 Mon Sep 17 00:00:00 2001 From: Steven Date: Sat, 15 Oct 2016 13:57:19 -0400 Subject: [PATCH 238/302] add software-properties-common This allows using `add-apt-repository`. Github-Pull: #8929 Rebased-From: aa9d3c9a503952589b359624bbb0da11dd7a5e3f --- doc/build-unix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/build-unix.md b/doc/build-unix.md index 62e3e793e97..d607d2a5942 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -82,6 +82,7 @@ install necessary parts of boost: BerkeleyDB is required for the wallet. db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin). You can add the repository and install using the following commands: + sudo apt-get install software-properties-common sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install libdb4.8-dev libdb4.8++-dev From 106da691a5b935289dfecb25ee4fe2f085cee77f Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Fri, 26 Aug 2016 22:35:46 +0100 Subject: [PATCH 239/302] Sync bitcoin-tx with tx version policy Github-Pull: #8932 Rebased-From: b0aea8057921f0ed2288cf07048f652c7d6d9cf3 --- src/bitcoin-tx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 8e8ac47455c..b24f2955301 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -164,7 +164,7 @@ static void RegisterLoad(const string& strInput) static void MutateTxVersion(CMutableTransaction& tx, const string& cmdVal) { int64_t newVersion = atoi64(cmdVal); - if (newVersion < 1 || newVersion > CTransaction::CURRENT_VERSION) + if (newVersion < 1 || newVersion > CTransaction::MAX_STANDARD_VERSION) throw runtime_error("Invalid TX version requested"); tx.nVersion = (int) newVersion; From 6f86b5364345b238a812c9dffca13fe9f11a0073 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Mon, 30 Nov 2015 20:57:20 +0100 Subject: [PATCH 240/302] [Qt] make warnings label selectable Github-Pull: #8972 Rebased-From: ef0c9ee2960fda58b2fe5b0c3b4c672231b30322 --- src/qt/forms/overviewpage.ui | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui index 6d792d1475f..4a6ee92508d 100644 --- a/src/qt/forms/overviewpage.ui +++ b/src/qt/forms/overviewpage.ui @@ -20,7 +20,7 @@ false - background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #F0D0A0, stop:1 #F8D488); color:#000000; + QLabel { background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop:0 #F0D0A0, stop:1 #F8D488); color:#000000; } true @@ -28,6 +28,9 @@ 3 + + Qt::TextSelectableByMouse + From 973ca1e4912e7ad85e0d06e9490c5939232de6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= Date: Fri, 21 Oct 2016 23:42:37 +0200 Subject: [PATCH 241/302] Fix doxygen comment: the transaction is returned in txOut Github-Pull: #8993 Rebased-From: 1d8e12ba48154b2c59213e92efb50958d430a007 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 962960a1505..cf96efbe81f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1591,7 +1591,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa return res; } -/** Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock */ +/** Return transaction in txOut, and if it was found inside a block, its hash is placed in hashBlock */ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow) { CBlockIndex *pindexSlow = NULL; From 5bcb05d4e1304ac3582f1779a25693c0065c69e9 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 30 Oct 2016 16:58:13 +0100 Subject: [PATCH 242/302] [rpc] ParseHash: Fail when length is not 64 Github-Pull: #9042 Rebased-From: fa326193ad739d1f93da456b3fa73af0bbf9fdd1 --- src/rpc/server.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 23149baa6d9..102c776314a 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -146,6 +146,8 @@ uint256 ParseHashV(const UniValue& v, string strName) strHex = v.get_str(); if (!IsHex(strHex)) // Note: IsHex("") is false throw JSONRPCError(RPC_INVALID_PARAMETER, strName+" must be hexadecimal string (not '"+strHex+"')"); + if (64 != strHex.length()) + throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%s must be of length %d (not %d)", strName, 64, strHex.length())); uint256 result; result.SetHex(strHex); return result; From f85ee01303b3d5127a31285b2682fcae2f8df64d Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Wed, 2 Nov 2016 21:59:09 +0300 Subject: [PATCH 243/302] Fix exit codes: - `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error) - error reading config file should exit with `1` Slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1) Github-Pull: #9067 Rebased-From: bd0de1386e1c7f9b875d52290de0d561c8d56bc9 --- src/bitcoin-cli.cpp | 28 +++++++++++++++++++--------- src/bitcoin-tx.cpp | 20 +++++++++++++++----- src/bitcoind.cpp | 2 +- src/qt/bitcoin.cpp | 4 ++-- 4 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index a04101d3ed8..bf6f11a50d8 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -28,6 +28,7 @@ using namespace std; static const char DEFAULT_RPCCONNECT[] = "127.0.0.1"; static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900; +static const int CONTINUE_EXECUTION=-1; std::string HelpMessageCli() { @@ -67,7 +68,11 @@ class CConnectionFailed : public std::runtime_error }; -static bool AppInitRPC(int argc, char* argv[]) +// +// This function returns either one of EXIT_ codes when it's expected to stop the process or +// CONTINUE_EXECUTION when it's expected to continue further. +// +static int AppInitRPC(int argc, char* argv[]) { // // Parameters @@ -85,31 +90,35 @@ static bool AppInitRPC(int argc, char* argv[]) } fprintf(stdout, "%s", strUsage.c_str()); - return false; + if (argc < 2) { + fprintf(stderr, "Error: too few parameters\n"); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; } if (!boost::filesystem::is_directory(GetDataDir(false))) { fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str()); - return false; + return EXIT_FAILURE; } try { ReadConfigFile(mapArgs, mapMultiArgs); } catch (const std::exception& e) { fprintf(stderr,"Error reading configuration file: %s\n", e.what()); - return false; + return EXIT_FAILURE; } // Check for -testnet or -regtest parameter (BaseParams() calls are only valid after this clause) try { SelectBaseParams(ChainNameFromCommandLine()); } catch (const std::exception& e) { fprintf(stderr, "Error: %s\n", e.what()); - return false; + return EXIT_FAILURE; } if (GetBoolArg("-rpcssl", false)) { fprintf(stderr, "Error: SSL mode for RPC (-rpcssl) is no longer supported.\n"); - return false; + return EXIT_FAILURE; } - return true; + return CONTINUE_EXECUTION; } @@ -318,8 +327,9 @@ int main(int argc, char* argv[]) } try { - if(!AppInitRPC(argc, argv)) - return EXIT_FAILURE; + int ret = AppInitRPC(argc, argv); + if (ret != CONTINUE_EXECUTION) + return ret; } catch (const std::exception& e) { PrintExceptionContinue(&e, "AppInitRPC()"); diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index b24f2955301..384eae9632e 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -30,8 +30,13 @@ using namespace std; static bool fCreateBlank; static map registers; +static const int CONTINUE_EXECUTION=-1; -static bool AppInitRawTx(int argc, char* argv[]) +// +// This function returns either one of EXIT_ codes when it's expected to stop the process or +// CONTINUE_EXECUTION when it's expected to continue further. +// +static int AppInitRawTx(int argc, char* argv[]) { // // Parameters @@ -89,9 +94,13 @@ static bool AppInitRawTx(int argc, char* argv[]) strUsage += HelpMessageOpt("set=NAME:JSON-STRING", _("Set register NAME to given JSON-STRING")); fprintf(stdout, "%s", strUsage.c_str()); - return false; + if (argc < 2) { + fprintf(stderr, "Error: too few parameters\n"); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; } - return true; + return CONTINUE_EXECUTION; } static void RegisterSetJson(const string& key, const string& rawJson) @@ -680,8 +689,9 @@ int main(int argc, char* argv[]) SetupEnvironment(); try { - if(!AppInitRawTx(argc, argv)) - return EXIT_FAILURE; + int ret = AppInitRawTx(argc, argv); + if (ret != CONTINUE_EXECUTION) + return ret; } catch (const std::exception& e) { PrintExceptionContinue(&e, "AppInitRawTx()"); diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 28bc374acc7..b534caffac2 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -93,7 +93,7 @@ bool AppInit(int argc, char* argv[]) } fprintf(stdout, "%s", strUsage.c_str()); - return false; + return true; } try diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 430e6dd0e8d..595fa48253d 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -573,7 +573,7 @@ int main(int argc, char *argv[]) { HelpMessageDialog help(NULL, mapArgs.count("-version")); help.showOrPrint(); - return 1; + return 0; } /// 5. Now that settings and translations are available, ask user for data directory @@ -594,7 +594,7 @@ int main(int argc, char *argv[]) } catch (const std::exception& e) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); - return false; + return 1; } /// 7. Determine network (and switch to network specific options) From f27596a7ec3c625c3b0f25d66fc1bc804c250e7f Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 7 Nov 2016 21:31:38 +0300 Subject: [PATCH 244/302] Every main()/exit() should return/use one of EXIT_ codes instead of magic numbers Github-Pull: #9067 Rebased-From: 4441018d0860fce64ee74fa78da79bbb21114ca9 --- src/bitcoind.cpp | 4 ++-- src/qt/bitcoin.cpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index b534caffac2..823b9ce5817 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -127,7 +127,7 @@ bool AppInit(int argc, char* argv[]) if (fCommandLine) { fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n"); - exit(1); + exit(EXIT_FAILURE); } #ifndef WIN32 fDaemon = GetBoolArg("-daemon", false); @@ -187,5 +187,5 @@ int main(int argc, char* argv[]) // Connect bitcoind signal handlers noui_connect(); - return (AppInit(argc, argv) ? 0 : 1); + return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE); } diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 595fa48253d..d3d13423f77 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -496,7 +496,7 @@ void BitcoinApplication::shutdownResult(int retval) void BitcoinApplication::handleRunawayException(const QString &message) { QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + message); - ::exit(1); + ::exit(EXIT_FAILURE); } WId BitcoinApplication::getMainWinId() const @@ -573,13 +573,13 @@ int main(int argc, char *argv[]) { HelpMessageDialog help(NULL, mapArgs.count("-version")); help.showOrPrint(); - return 0; + return EXIT_SUCCESS; } /// 5. Now that settings and translations are available, ask user for data directory // User language is set up: pick a data directory if (!Intro::pickDataDirectory()) - return 0; + return EXIT_SUCCESS; /// 6. Determine availability of data directory and parse bitcoin.conf /// - Do not call GetDataDir(true) before this step finishes @@ -587,14 +587,14 @@ int main(int argc, char *argv[]) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"]))); - return 1; + return EXIT_FAILURE; } try { ReadConfigFile(mapArgs, mapMultiArgs); } catch (const std::exception& e) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what())); - return 1; + return EXIT_FAILURE; } /// 7. Determine network (and switch to network specific options) @@ -608,7 +608,7 @@ int main(int argc, char *argv[]) SelectParams(ChainNameFromCommandLine()); } catch(std::exception &e) { QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: %1").arg(e.what())); - return 1; + return EXIT_FAILURE; } #ifdef ENABLE_WALLET // Parse URIs on command line -- this can affect Params() @@ -630,7 +630,7 @@ int main(int argc, char *argv[]) // - Do this after creating app and setting up translations, so errors are // translated properly. if (PaymentServer::ipcSendCommandLine()) - exit(0); + exit(EXIT_SUCCESS); // Start up the payment server early, too, so impatient users that click on // bitcoin: links repeatedly have their payment requests routed to this process: From 08d1c90113efb51d4fb2fcea36171181a66aea36 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 10 Nov 2016 00:53:55 +0300 Subject: [PATCH 245/302] Missed one "return false" in recent refactoring in #9067 Github-Pull: #9120 Rebased-From: 45d372f88900bda74835a20a44246746c2ac94e6 --- src/bitcoin-tx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 384eae9632e..c5ae33da88a 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -48,7 +48,7 @@ static int AppInitRawTx(int argc, char* argv[]) SelectParams(ChainNameFromCommandLine()); } catch (const std::exception& e) { fprintf(stderr, "Error: %s\n", e.what()); - return false; + return EXIT_FAILURE; } fCreateBlank = GetBoolArg("-create", false); From 5f3a12c97c25f811083679cd3f284059cf7ea54f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 7 Nov 2016 12:11:59 +0100 Subject: [PATCH 246/302] qt: Use correct conversion function for boost::path datadir Fixes #9089. Github-Pull: #9094 Rebased-From: e760b307f6210bee293796d606bcca87f86be200 --- src/qt/clientmodel.cpp | 3 ++- src/qt/paymentserver.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 14661b857a5..9530b63a27f 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -6,6 +6,7 @@ #include "bantablemodel.h" #include "guiconstants.h" +#include "guiutil.h" #include "peertablemodel.h" #include "chainparams.h" @@ -186,7 +187,7 @@ QString ClientModel::formatClientStartupTime() const QString ClientModel::dataDir() const { - return QString::fromStdString(GetDataDir().string()); + return GUIUtil::boostPathToQString(GetDataDir()); } void ClientModel::updateBanlist() diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index c80aebb0098..96627710ee5 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -80,7 +80,7 @@ static QString ipcServerName() // Append a simple hash of the datadir // Note that GetDataDir(true) returns a different path // for -testnet versus main net - QString ddir(QString::fromStdString(GetDataDir(true).string())); + QString ddir(GUIUtil::boostPathToQString(GetDataDir(true))); name.append(QString::number(qHash(ddir))); return name; From 6fe3981ac8267f9f045b0d518399d943d3147268 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 9 Nov 2016 12:45:13 -0500 Subject: [PATCH 247/302] net: don't send feefilter messages before the version handshake is complete Github-Pull: #9117 Rebased-From: 46625538d674a5aaf1bcfa7c8be8a49e5a23fa9e --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index cf96efbe81f..083ea194abf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6856,7 +6856,7 @@ bool SendMessages(CNode* pto) // Message: feefilter // // We don't want white listed peers to filter txs to us if we have -whitelistforcerelay - if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) && + if (!pto->fDisconnect && pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) && !(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) { CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK(); int64_t timeNow = GetTimeMicros(); From f82c81b177dfb540c086ccccc39c030b8d9ca81f Mon Sep 17 00:00:00 2001 From: Masahiko Hyuga Date: Thu, 10 Nov 2016 18:18:52 +0900 Subject: [PATCH 248/302] fix getnettotals RPC description about timemillis. Github-Pull: #9122 Rebased-From: a79f864945d7abe05e777a942864c181311e5070 --- src/rpc/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 89035aaa848..51f9d1c3337 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -344,7 +344,7 @@ UniValue getnettotals(const UniValue& params, bool fHelp) "{\n" " \"totalbytesrecv\": n, (numeric) Total bytes received\n" " \"totalbytessent\": n, (numeric) Total bytes sent\n" - " \"timemillis\": t, (numeric) Total cpu time\n" + " \"timemillis\": t, (numeric) Current UNIX time in milliseconds\n" " \"uploadtarget\":\n" " {\n" " \"timeframe\": n, (numeric) Length of the measuring timeframe in seconds\n" From 3fffbf7ef0a224d10119551ed39cd3215001a46f Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 17 Nov 2016 14:41:18 +0100 Subject: [PATCH 249/302] Doxygen: Set PROJECT_NAME = "Bitcoin Core" Github-Pull: #9178 Rebased-From: fa63ee8e3eeef8379360c125eeb690a37f097da2 --- doc/Doxyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Doxyfile b/doc/Doxyfile index b088c7623f0..a5f0aa6c75b 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -28,7 +28,7 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = Bitcoin +PROJECT_NAME = "Bitcoin Core" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or From 6d70a73968695ee34e15e31a79d889db6f53b734 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Fri, 18 Nov 2016 10:26:38 +0100 Subject: [PATCH 250/302] [Qt] fix coincontrol sort issue Github-Pull: #9185 Rebased-From: 76af4eb876814a916dd4f26cf71faa20bdc54f2d --- src/qt/coincontroldialog.cpp | 21 +++++++++++++++------ src/qt/coincontroldialog.h | 12 ++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 837f8ba6c18..2a482baa6dc 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -35,6 +35,15 @@ QList CoinControlDialog::payAmounts; CCoinControl* CoinControlDialog::coinControl = new CCoinControl(); bool CoinControlDialog::fSubtractFeeFromAmount = false; +bool CCoinControlWidgetItem::operator<(const QTreeWidgetItem &other) const { + int column = treeWidget()->sortColumn(); + if (column == CoinControlDialog::COLUMN_AMOUNT_INT64 || column == CoinControlDialog::COLUMN_AMOUNT_INT64) + return data(CoinControlDialog::COLUMN_AMOUNT_INT64, Qt::DisplayRole).toULongLong() < other.data(CoinControlDialog::COLUMN_AMOUNT_INT64, Qt::DisplayRole).toULongLong(); + if (column == CoinControlDialog::COLUMN_DATE || column == CoinControlDialog::COLUMN_DATE_INT64) + return data(CoinControlDialog::COLUMN_DATE_INT64, Qt::DisplayRole).toULongLong() < other.data(CoinControlDialog::COLUMN_DATE_INT64, Qt::DisplayRole).toULongLong(); + return QTreeWidgetItem::operator<(other); +} + CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget *parent) : QDialog(parent), ui(new Ui::CoinControlDialog), @@ -708,7 +717,7 @@ void CoinControlDialog::updateView() model->listCoins(mapCoins); BOOST_FOREACH(const PAIRTYPE(QString, std::vector)& coins, mapCoins) { - QTreeWidgetItem *itemWalletAddress = new QTreeWidgetItem(); + CCoinControlWidgetItem *itemWalletAddress = new CCoinControlWidgetItem(); itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked); QString sWalletAddress = coins.first; QString sWalletLabel = model->getAddressTableModel()->labelForAddress(sWalletAddress); @@ -739,9 +748,9 @@ void CoinControlDialog::updateView() nSum += out.tx->vout[out.i].nValue; nChildren++; - QTreeWidgetItem *itemOutput; - if (treeMode) itemOutput = new QTreeWidgetItem(itemWalletAddress); - else itemOutput = new QTreeWidgetItem(ui->treeWidget); + CCoinControlWidgetItem *itemOutput; + if (treeMode) itemOutput = new CCoinControlWidgetItem(itemWalletAddress); + else itemOutput = new CCoinControlWidgetItem(ui->treeWidget); itemOutput->setFlags(flgCheckbox); itemOutput->setCheckState(COLUMN_CHECKBOX,Qt::Unchecked); @@ -779,11 +788,11 @@ void CoinControlDialog::updateView() // amount itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); - itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly + itemOutput->setData(COLUMN_AMOUNT_INT64, Qt::DisplayRole, QVariant((qlonglong)out.tx->vout[out.i].nValue)); // padding so that sorting works correctly // date itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime())); - itemOutput->setText(COLUMN_DATE_INT64, strPad(QString::number(out.tx->GetTxTime()), 20, " ")); + itemOutput->setData(COLUMN_DATE_INT64, Qt::DisplayRole, QVariant((qlonglong)out.tx->GetTxTime())); // confirmations itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " ")); diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h index 1a467eb2ffb..6229d21dab9 100644 --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -28,6 +28,17 @@ namespace Ui { #define ASYMP_UTF8 "\xE2\x89\x88" +class CCoinControlWidgetItem : public QTreeWidgetItem +{ +public: + CCoinControlWidgetItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type) {} + CCoinControlWidgetItem(int type = Type) : QTreeWidgetItem(type) {} + CCoinControlWidgetItem(QTreeWidgetItem *parent, int type = Type) : QTreeWidgetItem(parent, type) {} + + bool operator<(const QTreeWidgetItem &other) const; +}; + + class CoinControlDialog : public QDialog { Q_OBJECT @@ -79,6 +90,7 @@ class CoinControlDialog : public QDialog COLUMN_PRIORITY_INT64, COLUMN_DATE_INT64 }; + friend class CCoinControlWidgetItem; // some columns have a hidden column containing the value used for sorting int getMappedColumn(int column, bool fVisibleColumn = true) From ff423cc6b0323854b93810fa7a9a479a746f6d5d Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 18 Nov 2016 14:33:34 +0100 Subject: [PATCH 251/302] [Qt] Clean up and fix coincontrol tree widget handling - Do sorting for date, amount and confirmations column as longlong, not unsigned longlong. - Use `UserRole` to store our own data. This makes it treated as ancillary data prevents it from being displayed. - Get rid of `getMappedColumn` `strPad` - these are no longer necessary. - Get rid of hidden `_INT64` columns. - Start enumeration from 0 (otherwise values are undefined). Github-Pull: #9185 Rebased-From: 4231032bfcb9728f0f629b3d67884ba9de63e4ff --- src/qt/coincontroldialog.cpp | 39 ++++++++++++--------------------------- src/qt/coincontroldialog.h | 31 +------------------------------ 2 files changed, 13 insertions(+), 57 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 2a482baa6dc..81cd098bf9a 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -37,10 +37,8 @@ bool CoinControlDialog::fSubtractFeeFromAmount = false; bool CCoinControlWidgetItem::operator<(const QTreeWidgetItem &other) const { int column = treeWidget()->sortColumn(); - if (column == CoinControlDialog::COLUMN_AMOUNT_INT64 || column == CoinControlDialog::COLUMN_AMOUNT_INT64) - return data(CoinControlDialog::COLUMN_AMOUNT_INT64, Qt::DisplayRole).toULongLong() < other.data(CoinControlDialog::COLUMN_AMOUNT_INT64, Qt::DisplayRole).toULongLong(); - if (column == CoinControlDialog::COLUMN_DATE || column == CoinControlDialog::COLUMN_DATE_INT64) - return data(CoinControlDialog::COLUMN_DATE_INT64, Qt::DisplayRole).toULongLong() < other.data(CoinControlDialog::COLUMN_DATE_INT64, Qt::DisplayRole).toULongLong(); + if (column == CoinControlDialog::COLUMN_AMOUNT || column == CoinControlDialog::COLUMN_DATE || column == CoinControlDialog::COLUMN_CONFIRMATIONS) + return data(column, Qt::UserRole).toLongLong() < other.data(column, Qt::UserRole).toLongLong(); return QTreeWidgetItem::operator<(other); } @@ -141,12 +139,9 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100); ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transaction hash in this column, but don't show it ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but don't show it - ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but don't show it - ui->treeWidget->setColumnHidden(COLUMN_PRIORITY_INT64, true); // store priority int64 in this column, but don't show it - ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but don't show it // default view is sorted by amount desc - sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder); + sortView(COLUMN_AMOUNT, Qt::DescendingOrder); // restore list mode and sortorder as a convenience feature QSettings settings; @@ -178,15 +173,6 @@ void CoinControlDialog::setModel(WalletModel *model) } } -// helper function str_pad -QString CoinControlDialog::strPad(QString s, int nPadLength, QString sPadding) -{ - while (s.length() < nPadLength) - s = sPadding + s; - - return s; -} - // ok button void CoinControlDialog::buttonBoxClicked(QAbstractButton* button) { @@ -358,7 +344,7 @@ void CoinControlDialog::sortView(int column, Qt::SortOrder order) sortColumn = column; sortOrder = order; ui->treeWidget->sortItems(column, order); - ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder); + ui->treeWidget->header()->setSortIndicator(sortColumn, sortOrder); } // treeview: clicked on header @@ -366,12 +352,10 @@ void CoinControlDialog::headerSectionClicked(int logicalIndex) { if (logicalIndex == COLUMN_CHECKBOX) // click on most left column -> do nothing { - ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder); + ui->treeWidget->header()->setSortIndicator(sortColumn, sortOrder); } else { - logicalIndex = getMappedColumn(logicalIndex, false); - if (sortColumn == logicalIndex) sortOrder = ((sortOrder == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder); else @@ -788,19 +772,20 @@ void CoinControlDialog::updateView() // amount itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue)); - itemOutput->setData(COLUMN_AMOUNT_INT64, Qt::DisplayRole, QVariant((qlonglong)out.tx->vout[out.i].nValue)); // padding so that sorting works correctly + itemOutput->setData(COLUMN_AMOUNT, Qt::UserRole, QVariant((qlonglong)out.tx->vout[out.i].nValue)); // padding so that sorting works correctly // date itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime())); - itemOutput->setData(COLUMN_DATE_INT64, Qt::DisplayRole, QVariant((qlonglong)out.tx->GetTxTime())); + itemOutput->setData(COLUMN_DATE, Qt::UserRole, QVariant((qlonglong)out.tx->GetTxTime())); // confirmations - itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " ")); + itemOutput->setText(COLUMN_CONFIRMATIONS, QString::number(out.nDepth)); + itemOutput->setData(COLUMN_CONFIRMATIONS, Qt::UserRole, QVariant((qlonglong)out.nDepth)); // priority double dPriority = ((double)out.tx->vout[out.i].nValue / (nInputSize + 78)) * (out.nDepth+1); // 78 = 2 * 34 + 10 itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority)); - itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPriority), 20, " ")); + itemOutput->setData(COLUMN_PRIORITY, Qt::UserRole, QVariant((qlonglong)dPriority)); dPrioritySum += (double)out.tx->vout[out.i].nValue * (out.nDepth+1); nInputSum += nInputSize; @@ -831,9 +816,9 @@ void CoinControlDialog::updateView() dPrioritySum = dPrioritySum / (nInputSum + 78); itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")"); itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum)); - itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " ")); + itemWalletAddress->setData(COLUMN_AMOUNT, Qt::UserRole, QVariant((qlonglong)nSum)); itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority)); - itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " ")); + itemWalletAddress->setData(COLUMN_PRIORITY, Qt::UserRole, QVariant((qlonglong)dPrioritySum)); } } diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h index 6229d21dab9..785079b1adc 100644 --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -71,13 +71,12 @@ class CoinControlDialog : public QDialog const PlatformStyle *platformStyle; - QString strPad(QString, int, QString); void sortView(int, Qt::SortOrder); void updateView(); enum { - COLUMN_CHECKBOX, + COLUMN_CHECKBOX = 0, COLUMN_AMOUNT, COLUMN_LABEL, COLUMN_ADDRESS, @@ -86,37 +85,9 @@ class CoinControlDialog : public QDialog COLUMN_PRIORITY, COLUMN_TXHASH, COLUMN_VOUT_INDEX, - COLUMN_AMOUNT_INT64, - COLUMN_PRIORITY_INT64, - COLUMN_DATE_INT64 }; friend class CCoinControlWidgetItem; - // some columns have a hidden column containing the value used for sorting - int getMappedColumn(int column, bool fVisibleColumn = true) - { - if (fVisibleColumn) - { - if (column == COLUMN_AMOUNT_INT64) - return COLUMN_AMOUNT; - else if (column == COLUMN_PRIORITY_INT64) - return COLUMN_PRIORITY; - else if (column == COLUMN_DATE_INT64) - return COLUMN_DATE; - } - else - { - if (column == COLUMN_AMOUNT) - return COLUMN_AMOUNT_INT64; - else if (column == COLUMN_PRIORITY) - return COLUMN_PRIORITY_INT64; - else if (column == COLUMN_DATE) - return COLUMN_DATE_INT64; - } - - return column; - } - private Q_SLOTS: void showMenu(const QPoint &); void copyAmount(); From dc46b10a087921343bb5a05d08393ece061d6303 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 18 Nov 2016 15:47:20 +0100 Subject: [PATCH 252/302] qt: Plug many memory leaks None of these are very serious, and are leaks in objects that are created at most one time. In most cases this means properly using the QObject parent hierarchy, except for BanTablePriv/PeerTablePriv which are not QObject, so use a std::unique_ptr instead. Github-Pull: #9190 Rebased-From: 47db07537746940ee7dd0739a8c73e328837813f --- src/qt/addressbookpage.cpp | 2 +- src/qt/bantablemodel.cpp | 7 ++++++- src/qt/bantablemodel.h | 3 ++- src/qt/bitcoingui.cpp | 2 +- src/qt/coincontroldialog.cpp | 2 +- src/qt/guiutil.cpp | 3 ++- src/qt/guiutil.h | 2 +- src/qt/overviewpage.cpp | 11 +++++------ src/qt/overviewpage.h | 3 ++- src/qt/peertablemodel.cpp | 9 +++++++-- src/qt/peertablemodel.h | 3 ++- src/qt/receivecoinsdialog.cpp | 5 +++-- src/qt/receiverequestdialog.cpp | 2 +- src/qt/recentrequeststablemodel.cpp | 2 +- src/qt/rpcconsole.cpp | 4 ++-- src/qt/transactionview.cpp | 6 +++--- 16 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 135f15ffa85..727956c88dd 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -83,7 +83,7 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode mode, deleteAction = new QAction(ui->deleteAddress->text(), this); // Build context menu - contextMenu = new QMenu(); + contextMenu = new QMenu(this); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(editAction); diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp index d95106b5ac8..7707ce7b6be 100644 --- a/src/qt/bantablemodel.cpp +++ b/src/qt/bantablemodel.cpp @@ -86,7 +86,7 @@ BanTableModel::BanTableModel(ClientModel *parent) : clientModel(parent) { columns << tr("IP/Netmask") << tr("Banned Until"); - priv = new BanTablePriv(); + priv.reset(new BanTablePriv()); // default to unsorted priv->sortColumn = -1; @@ -94,6 +94,11 @@ BanTableModel::BanTableModel(ClientModel *parent) : refresh(); } +BanTableModel::~BanTableModel() +{ + // Intentionally left empty +} + int BanTableModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); diff --git a/src/qt/bantablemodel.h b/src/qt/bantablemodel.h index fe9600ac0bd..3c03d05c051 100644 --- a/src/qt/bantablemodel.h +++ b/src/qt/bantablemodel.h @@ -40,6 +40,7 @@ class BanTableModel : public QAbstractTableModel public: explicit BanTableModel(ClientModel *parent = 0); + ~BanTableModel(); void startAutoRefresh(); void stopAutoRefresh(); @@ -66,7 +67,7 @@ public Q_SLOTS: private: ClientModel *clientModel; QStringList columns; - BanTablePriv *priv; + std::unique_ptr priv; }; #endif // BITCOIN_QT_BANTABLEMODEL_H diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 2afefb733ed..169ca500878 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1147,7 +1147,7 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event) /** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */ void UnitDisplayStatusBarControl::createContextMenu() { - menu = new QMenu(); + menu = new QMenu(this); Q_FOREACH(BitcoinUnits::Unit u, BitcoinUnits::availableUnits()) { QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this); diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 81cd098bf9a..866d3872c6f 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -59,7 +59,7 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *platformStyle, QWidget unlockAction = new QAction(tr("Unlock unspent"), this); // we need to enable/disable this // context menu - contextMenu = new QMenu(); + contextMenu = new QMenu(this); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(copyAmountAction); diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 947a4c6821d..dec3e56ec5e 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -591,7 +591,8 @@ void TableViewLastColumnResizingFixer::on_geometriesChanged() * Initializes all internal variables and prepares the * the resize modes of the last 2 columns of the table and */ -TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth) : +TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent) : + QObject(parent), tableView(table), lastColumnMinimumWidth(lastColMinimumWidth), allColumnsMinimumWidth(allColsMinimumWidth) diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 9267e0a6c9d..83cd6b5d46e 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -150,7 +150,7 @@ namespace GUIUtil Q_OBJECT public: - TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth); + TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent); void stretchColumnWidth(int column); private: diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 6a0404cbf70..a010f010210 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -25,8 +25,8 @@ class TxViewDelegate : public QAbstractItemDelegate { Q_OBJECT public: - TxViewDelegate(const PlatformStyle *platformStyle): - QAbstractItemDelegate(), unit(BitcoinUnits::BTC), + TxViewDelegate(const PlatformStyle *platformStyle, QObject *parent=nullptr): + QAbstractItemDelegate(parent), unit(BitcoinUnits::BTC), platformStyle(platformStyle) { @@ -119,8 +119,7 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent) currentWatchOnlyBalance(-1), currentWatchUnconfBalance(-1), currentWatchImmatureBalance(-1), - txdelegate(new TxViewDelegate(platformStyle)), - filter(0) + txdelegate(new TxViewDelegate(platformStyle, this)) { ui->setupUi(this); @@ -213,7 +212,7 @@ void OverviewPage::setWalletModel(WalletModel *model) if(model && model->getOptionsModel()) { // Set up transaction list - filter = new TransactionFilterProxy(); + filter.reset(new TransactionFilterProxy()); filter->setSourceModel(model->getTransactionTableModel()); filter->setLimit(NUM_ITEMS); filter->setDynamicSortFilter(true); @@ -221,7 +220,7 @@ void OverviewPage::setWalletModel(WalletModel *model) filter->setShowInactive(false); filter->sort(TransactionTableModel::Date, Qt::DescendingOrder); - ui->listTransactions->setModel(filter); + ui->listTransactions->setModel(filter.get()); ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress); // Keep up to date with wallet diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h index 911443c76af..23746a6b48a 100644 --- a/src/qt/overviewpage.h +++ b/src/qt/overviewpage.h @@ -8,6 +8,7 @@ #include "amount.h" #include +#include class ClientModel; class TransactionFilterProxy; @@ -55,7 +56,7 @@ public Q_SLOTS: CAmount currentWatchImmatureBalance; TxViewDelegate *txdelegate; - TransactionFilterProxy *filter; + std::unique_ptr filter; private Q_SLOTS: void updateDisplayUnit(); diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index 84ad0052fdd..3829696e0e6 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -115,12 +115,12 @@ PeerTableModel::PeerTableModel(ClientModel *parent) : timer(0) { columns << tr("Node/Service") << tr("User Agent") << tr("Ping Time"); - priv = new PeerTablePriv(); + priv.reset(new PeerTablePriv()); // default to unsorted priv->sortColumn = -1; // set up timer for auto refresh - timer = new QTimer(); + timer = new QTimer(this); connect(timer, SIGNAL(timeout()), SLOT(refresh())); timer->setInterval(MODEL_UPDATE_DELAY); @@ -128,6 +128,11 @@ PeerTableModel::PeerTableModel(ClientModel *parent) : refresh(); } +PeerTableModel::~PeerTableModel() +{ + // Intentionally left empty +} + void PeerTableModel::startAutoRefresh() { timer->start(); diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h index a2aaaa5d24b..8227b5ec762 100644 --- a/src/qt/peertablemodel.h +++ b/src/qt/peertablemodel.h @@ -46,6 +46,7 @@ class PeerTableModel : public QAbstractTableModel public: explicit PeerTableModel(ClientModel *parent = 0); + ~PeerTableModel(); const CNodeCombinedStats *getNodeStats(int idx); int getRowByNodeId(NodeId nodeid); void startAutoRefresh(); @@ -74,7 +75,7 @@ public Q_SLOTS: private: ClientModel *clientModel; QStringList columns; - PeerTablePriv *priv; + std::unique_ptr priv; QTimer *timer; }; diff --git a/src/qt/receivecoinsdialog.cpp b/src/qt/receivecoinsdialog.cpp index 0b355837ab3..752a05a4096 100644 --- a/src/qt/receivecoinsdialog.cpp +++ b/src/qt/receivecoinsdialog.cpp @@ -25,6 +25,7 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent) : QDialog(parent), ui(new Ui::ReceiveCoinsDialog), + columnResizingFixer(0), model(0), platformStyle(platformStyle) { @@ -48,7 +49,7 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(const PlatformStyle *platformStyle, QWidg QAction *copyAmountAction = new QAction(tr("Copy amount"), this); // context menu - contextMenu = new QMenu(); + contextMenu = new QMenu(this); contextMenu->addAction(copyLabelAction); contextMenu->addAction(copyMessageAction); contextMenu->addAction(copyAmountAction); @@ -88,7 +89,7 @@ void ReceiveCoinsDialog::setModel(WalletModel *model) SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(recentRequestsView_selectionChanged(QItemSelection, QItemSelection))); // Last 2 columns are set by the columnResizingFixer, when the table geometry is ready. - columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH); + columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this); } } diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp index b13ea3df709..04cc2003c55 100644 --- a/src/qt/receiverequestdialog.cpp +++ b/src/qt/receiverequestdialog.cpp @@ -32,7 +32,7 @@ QRImageWidget::QRImageWidget(QWidget *parent): QLabel(parent), contextMenu(0) { - contextMenu = new QMenu(); + contextMenu = new QMenu(this); QAction *saveImageAction = new QAction(tr("&Save Image..."), this); connect(saveImageAction, SIGNAL(triggered()), this, SLOT(saveImage())); contextMenu->addAction(saveImageAction); diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp index 2335d6b282a..35d37bb22bb 100644 --- a/src/qt/recentrequeststablemodel.cpp +++ b/src/qt/recentrequeststablemodel.cpp @@ -14,7 +14,7 @@ #include RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent) : - walletModel(parent) + QAbstractTableModel(parent), walletModel(parent) { Q_UNUSED(wallet); nReceiveRequestsMaxId = 0; diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 650ff8b00db..751ce552dac 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -389,7 +389,7 @@ void RPCConsole::setClientModel(ClientModel *model) QAction* banAction365d = new QAction(tr("Ban Node for") + " " + tr("1 &year"), this); // create peer table context menu - peersTableContextMenu = new QMenu(); + peersTableContextMenu = new QMenu(this); peersTableContextMenu->addAction(disconnectAction); peersTableContextMenu->addAction(banAction1h); peersTableContextMenu->addAction(banAction24h); @@ -435,7 +435,7 @@ void RPCConsole::setClientModel(ClientModel *model) QAction* unbanAction = new QAction(tr("&Unban Node"), this); // create ban table context menu - banTableContextMenu = new QMenu(); + banTableContextMenu = new QMenu(this); banTableContextMenu->addAction(unbanAction); // ban table context menu signals diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp index 48cf9405029..79af4a1f9cd 100644 --- a/src/qt/transactionview.cpp +++ b/src/qt/transactionview.cpp @@ -37,7 +37,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *parent) : QWidget(parent), model(0), transactionProxyModel(0), - transactionView(0), abandonAction(0) + transactionView(0), abandonAction(0), columnResizingFixer(0) { // Build filter row setContentsMargins(0,0,0,0); @@ -147,7 +147,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa QAction *editLabelAction = new QAction(tr("Edit label"), this); QAction *showDetailsAction = new QAction(tr("Show transaction details"), this); - contextMenu = new QMenu(); + contextMenu = new QMenu(this); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(copyAmountAction); @@ -212,7 +212,7 @@ void TransactionView::setModel(WalletModel *model) transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH); transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH); - columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH); + columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH, this); if (model->getOptionsModel()) { From c12f4e93b9be01ba2d6e96f0a851562549049686 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 18 Nov 2016 16:35:14 +0100 Subject: [PATCH 253/302] qt: Prevent thread/memory leak on exiting RPCConsole Make ownership of the QThread object clear, so that the RPCConsole can wait for the executor thread to quit before shutdown is called. This increases overall thread safety, and prevents some objects from leaking on exit. Github-Pull: #9190 Rebased-From: 693384eedb1ac7f449e226edd53e2cb52a86e279 --- src/qt/bitcoin.cpp | 8 +++++--- src/qt/bitcoingui.cpp | 6 ++++++ src/qt/rpcconsole.cpp | 24 ++++++++++++++---------- src/qt/rpcconsole.h | 2 ++ 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index d3d13423f77..ca017b2f7b2 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -409,6 +409,11 @@ void BitcoinApplication::requestInitialize() void BitcoinApplication::requestShutdown() { + // Show a simple window indicating shutdown status + // Do this first as some of the steps may take some time below, + // for example the RPC console may still be executing a command. + ShutdownWindow::showShutdownWindow(window); + qDebug() << __func__ << ": Requesting shutdown"; startThread(); window->hide(); @@ -423,9 +428,6 @@ void BitcoinApplication::requestShutdown() delete clientModel; clientModel = 0; - // Show a simple window indicating shutdown status - ShutdownWindow::showShutdownWindow(window); - // Request shutdown from core thread Q_EMIT requestedShutdown(); } diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 169ca500878..1a5d27f6eb9 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -496,6 +496,12 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) // Disable context menu on tray icon trayIconMenu->clear(); } + // Propagate cleared model to child objects + rpcConsole->setClientModel(nullptr); +#ifdef ENABLE_WALLET + walletFrame->setClientModel(nullptr); +#endif // ENABLE_WALLET + unitDisplayControl->setOptionsModel(nullptr); } } diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 751ce552dac..167a3474c15 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -288,7 +288,6 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) : // based timer interface RPCSetTimerInterfaceIfUnset(rpcTimerInterface); - startExecutor(); setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS); ui->detailWidget->hide(); @@ -302,7 +301,6 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) : RPCConsole::~RPCConsole() { GUIUtil::saveWindowGeometry("nRPCConsoleWindow", this); - Q_EMIT stopExecutor(); RPCUnsetTimerInterface(rpcTimerInterface); delete rpcTimerInterface; delete ui; @@ -466,6 +464,14 @@ void RPCConsole::setClientModel(ClientModel *model) autoCompleter = new QCompleter(wordList, this); ui->lineEdit->setCompleter(autoCompleter); autoCompleter->popup()->installEventFilter(this); + // Start thread to execute RPC commands. + startExecutor(); + } + if (!model) { + // Client model is being set to 0, this means shutdown() is about to be called. + // Make sure we clean up the executor thread + Q_EMIT stopExecutor(); + thread.wait(); } } @@ -646,9 +652,8 @@ void RPCConsole::browseHistory(int offset) void RPCConsole::startExecutor() { - QThread *thread = new QThread; RPCExecutor *executor = new RPCExecutor(); - executor->moveToThread(thread); + executor->moveToThread(&thread); // Replies from executor object must go to this object connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString))); @@ -656,16 +661,15 @@ void RPCConsole::startExecutor() connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString))); // On stopExecutor signal - // - queue executor for deletion (in execution thread) // - quit the Qt event loop in the execution thread - connect(this, SIGNAL(stopExecutor()), executor, SLOT(deleteLater())); - connect(this, SIGNAL(stopExecutor()), thread, SLOT(quit())); - // Queue the thread for deletion (in this thread) when it is finished - connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); + connect(this, SIGNAL(stopExecutor()), &thread, SLOT(quit())); + // - queue executor for deletion (in execution thread) + connect(&thread, SIGNAL(finished()), executor, SLOT(deleteLater()), Qt::DirectConnection); + connect(&thread, SIGNAL(finished()), this, SLOT(test()), Qt::DirectConnection); // Default implementation of QThread::run() simply spins up an event loop in the thread, // which is what we want. - thread->start(); + thread.start(); } void RPCConsole::on_tabWidget_currentChanged(int index) diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 28affa954dc..c1efa95f8c3 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -12,6 +12,7 @@ #include #include +#include class ClientModel; class PlatformStyle; @@ -140,6 +141,7 @@ public Q_SLOTS: QMenu *banTableContextMenu; int consoleFontSize; QCompleter *autoCompleter; + QThread thread; }; #endif // BITCOIN_QT_RPCCONSOLE_H From e4bea4fb84dceab44f8a8de4f8b974ba8bb98529 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 19 Nov 2016 11:08:19 +0100 Subject: [PATCH 254/302] qt: Avoid splash-screen related memory leak Make splash screen queue its own deletion when it receives the finished command, instead of relying on WA_DeleteOnClose which doesn't work under these circumstances. Github-Pull: #9190 Rebased-From: e4f126a7ba66e7317718c30276dff6db92dc1986 --- src/qt/bitcoin.cpp | 5 ++--- src/qt/splashscreen.cpp | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index ca017b2f7b2..d708f4b1114 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -365,9 +365,8 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) { SplashScreen *splash = new SplashScreen(0, networkStyle); - // We don't hold a direct pointer to the splash screen after creation, so use - // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually. - splash->setAttribute(Qt::WA_DeleteOnClose); + // We don't hold a direct pointer to the splash screen after creation, but the splash + // screen will take care of deleting itself when slotFinish happens. splash->show(); connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*))); connect(this, SIGNAL(requestedShutdown()), splash, SLOT(close())); diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp index e36d86fddda..68e9ffeb949 100644 --- a/src/qt/splashscreen.cpp +++ b/src/qt/splashscreen.cpp @@ -147,6 +147,7 @@ void SplashScreen::slotFinish(QWidget *mainWin) if (isMinimized()) showNormal(); hide(); + deleteLater(); // No more need for this } static void InitMessage(SplashScreen *splash, const std::string &message) From e5ad693f91632219407b15137b8863223919849b Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 19 Nov 2016 14:28:55 +0100 Subject: [PATCH 255/302] qt: Avoid shutdownwindow-related memory leak Store a reference to the shutdown window on BitcoinApplication, so that it will be deleted when exiting the main loop. Github-Pull: #9190 Rebased-From: 5204598f8d07d7432d91e9b8781806d2f3d16415 --- src/qt/bitcoin.cpp | 3 ++- src/qt/utilitydialog.cpp | 8 +++----- src/qt/utilitydialog.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index d708f4b1114..dbf372b12fa 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -245,6 +245,7 @@ public Q_SLOTS: #endif int returnValue; const PlatformStyle *platformStyle; + std::unique_ptr shutdownWindow; void startThread(); }; @@ -411,7 +412,7 @@ void BitcoinApplication::requestShutdown() // Show a simple window indicating shutdown status // Do this first as some of the steps may take some time below, // for example the RPC console may still be executing a command. - ShutdownWindow::showShutdownWindow(window); + shutdownWindow.reset(ShutdownWindow::showShutdownWindow(window)); qDebug() << __func__ << ": Requesting shutdown"; startThread(); diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 947bcdb15ae..4ec022881c1 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -171,22 +171,20 @@ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f): setLayout(layout); } -void ShutdownWindow::showShutdownWindow(BitcoinGUI *window) +QWidget *ShutdownWindow::showShutdownWindow(BitcoinGUI *window) { if (!window) - return; + return nullptr; // Show a simple window indicating shutdown status QWidget *shutdownWindow = new ShutdownWindow(); - // We don't hold a direct pointer to the shutdown window after creation, so use - // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually. - shutdownWindow->setAttribute(Qt::WA_DeleteOnClose); shutdownWindow->setWindowTitle(window->windowTitle()); // Center shutdown window at where main window was const QPoint global = window->mapToGlobal(window->rect().center()); shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2); shutdownWindow->show(); + return shutdownWindow; } void ShutdownWindow::closeEvent(QCloseEvent *event) diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h index 843bd7f67bc..b930429578c 100644 --- a/src/qt/utilitydialog.h +++ b/src/qt/utilitydialog.h @@ -43,7 +43,7 @@ class ShutdownWindow : public QWidget public: ShutdownWindow(QWidget *parent=0, Qt::WindowFlags f=0); - static void showShutdownWindow(BitcoinGUI *window); + static QWidget *showShutdownWindow(BitcoinGUI *window); protected: void closeEvent(QCloseEvent *event); From 6f7841c4d490de01c2e458d45ba5cd1ac8ee97d5 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 19 Nov 2016 16:12:23 +0100 Subject: [PATCH 256/302] qt: Avoid OpenSSL certstore-related memory leak - Correctly manage the X509 and X509_STORE objects lifetime. Github-Pull: #9190 Rebased-From: ed998ea7a0ecf294211b06e9ef82f1548a621a1d --- src/qt/paymentserver.cpp | 43 ++++++++++++++++++++++++------------------- src/qt/paymentserver.h | 5 +---- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index 96627710ee5..1ef224b521a 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -58,14 +58,19 @@ const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest" // BIP70 max payment request size in bytes (DoS protection) const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000; -X509_STORE* PaymentServer::certStore = NULL; -void PaymentServer::freeCertStore() +struct X509StoreDeleter { + void operator()(X509_STORE* b) { + X509_STORE_free(b); + } +}; + +struct X509Deleter { + void operator()(X509* b) { X509_free(b); } +}; + +namespace // Anon namespace { - if (PaymentServer::certStore != NULL) - { - X509_STORE_free(PaymentServer::certStore); - PaymentServer::certStore = NULL; - } + std::unique_ptr certStore; } // @@ -107,20 +112,15 @@ static void ReportInvalidCertificate(const QSslCertificate& cert) // void PaymentServer::LoadRootCAs(X509_STORE* _store) { - if (PaymentServer::certStore == NULL) - atexit(PaymentServer::freeCertStore); - else - freeCertStore(); - // Unit tests mostly use this, to pass in fake root CAs: if (_store) { - PaymentServer::certStore = _store; + certStore.reset(_store); return; } // Normal execution, use either -rootcertificates or system certs: - PaymentServer::certStore = X509_STORE_new(); + certStore.reset(X509_STORE_new()); // Note: use "-system-" default here so that users can pass -rootcertificates="" // and get 'I don't like X.509 certificates, don't trust anybody' behavior: @@ -167,11 +167,11 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store) QByteArray certData = cert.toDer(); const unsigned char *data = (const unsigned char *)certData.data(); - X509* x509 = d2i_X509(0, &data, certData.size()); - if (x509 && X509_STORE_add_cert(PaymentServer::certStore, x509)) + std::unique_ptr x509(d2i_X509(0, &data, certData.size())); + if (x509 && X509_STORE_add_cert(certStore.get(), x509.get())) { - // Note: X509_STORE_free will free the X509* objects when - // the PaymentServer is destroyed + // Note: X509_STORE increases the reference count to the X509 object, + // we still have to release our reference to it. ++nRootCerts; } else @@ -550,7 +550,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen recipient.paymentRequest = request; recipient.message = GUIUtil::HtmlEscape(request.getDetails().memo()); - request.getMerchant(PaymentServer::certStore, recipient.authenticatedMerchant); + request.getMerchant(certStore.get(), recipient.authenticatedMerchant); QList > sendingTos = request.getPayTo(); QStringList addresses; @@ -807,3 +807,8 @@ bool PaymentServer::verifyAmount(const CAmount& requestAmount) } return fVerified; } + +X509_STORE* PaymentServer::getCertStore() +{ + return certStore.get(); +} diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index 2d27ed078b5..7202e7dada7 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -83,7 +83,7 @@ class PaymentServer : public QObject static void LoadRootCAs(X509_STORE* store = NULL); // Return certificate store - static X509_STORE* getCertStore() { return certStore; } + static X509_STORE* getCertStore(); // OptionsModel is used for getting proxy settings and display unit void setOptionsModel(OptionsModel *optionsModel); @@ -140,9 +140,6 @@ private Q_SLOTS: bool saveURIs; // true during startup QLocalServer* uriServer; - static X509_STORE* certStore; // Trusted root certificates - static void freeCertStore(); - QNetworkAccessManager* netManager; // Used to fetch payment requests OptionsModel *optionsModel; From 0c09d9f00e39c4b1aee0fcb091fba068845b8edd Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Tue, 25 Oct 2016 15:30:55 -0400 Subject: [PATCH 257/302] Send tip change notification from invalidateblock This change is needed to prevent sync_blocks timeouts in the mempool_reorg test after the sync_blocks update in the upcoming commit "[qa] Change sync_blocks to pick smarter maxheight". This change was initially suggested by Suhas Daftuar in https://github.com/bitcoin/bitcoin/pull/8680#r78209060 Github-Pull: #9196 Rebased-From: 67c6326abd1788e6f411feb4f44b69774e76aae2 --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index 083ea194abf..10e2fa983bf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3176,6 +3176,7 @@ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, C InvalidChainFound(pindex); mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS); + uiInterface.NotifyBlockTip(IsInitialBlockDownload(), pindex->pprev); return true; } From eebc699d3070c71365a0f3542e2f5f6eca3fd281 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 22 Nov 2016 09:59:50 +0100 Subject: [PATCH 258/302] bench: Fix subtle counting issue when rescaling iteration count Make sure that the count is a zero modulo the new mask before scaling, otherwise the next time until a measure triggers will take only 1/2 as long as accounted for. This caused the 'min time' to be potentially off by as much as 100%. Github-Pull: #9200 Rebased-From: e0a9cb25b0af87723d50cb8d8cffa10f1ebf7dcc --- src/bench/bench.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index 227546a7a78..8942da8c74a 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -64,8 +64,11 @@ bool State::KeepRunning() return true; } if (elapsed*16 < maxElapsed) { - countMask = ((countMask<<1)|1) & ((1LL<<60)-1); - countMaskInv = 1./(countMask+1); + uint64_t newCountMask = ((countMask<<1)|1) & ((1LL<<60)-1); + if ((count & newCountMask)==0) { + countMask = newCountMask; + countMaskInv = 1./(countMask+1); + } } } lastTime = now; From 396c405e7b4911eea3eceecd001840ffa8c38e95 Mon Sep 17 00:00:00 2001 From: Ivo van der Sangen Date: Sun, 27 Nov 2016 12:08:39 +0100 Subject: [PATCH 259/302] Include select.h when WIN32 is not defined Github-Pull: #9224 Rebased-From: 498a1d75e75649b02caeca7b1bc9bbc19e51a566 --- src/compat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compat.h b/src/compat.h index 79a297e5e40..2578d6d3445 100644 --- a/src/compat.h +++ b/src/compat.h @@ -34,6 +34,7 @@ #else #include #include +#include #include #include #include From 28d0f224fda3ec375c07aaa18f786ce18f674f29 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 17:49:08 -0800 Subject: [PATCH 260/302] Fix calculation of number of bound sockets to use Github-Pull: #9253 Rebased-From: 9e1f46821d5bb69e2cbf25738eefa7c6cb99c838 --- src/init.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index eab8de8d029..4a837018b1e 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -854,7 +854,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) } // Make sure enough file descriptors are available - int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1); + int nBind = std::max( + (mapMultiArgs.count("-bind") ? mapMultiArgs.at("-bind").size() : 0) + + (mapMultiArgs.count("-whitebind") ? mapMultiArgs.at("-whitebind").size() : 0), size_t(1)); int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS); nMaxConnections = std::max(nUserMaxConnections, 0); From ff55a2d22e3d93a9bfe7999277a7bffcf7f60f9d Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Tue, 18 Oct 2016 13:47:34 +0800 Subject: [PATCH 261/302] Update gitian signing key of jl2012 Github-Pull: #8950 Rebased-From: 9b0d8efe811058928a6ed3a55c0b6d58e13b22ba --- contrib/gitian-keys/jl2012-key.pgp | 374 +++++++++++++++++++++++++++---------- 1 file changed, 272 insertions(+), 102 deletions(-) diff --git a/contrib/gitian-keys/jl2012-key.pgp b/contrib/gitian-keys/jl2012-key.pgp index b8aad7fd88b..984f555cb72 100644 --- a/contrib/gitian-keys/jl2012-key.pgp +++ b/contrib/gitian-keys/jl2012-key.pgp @@ -1,105 +1,275 @@ -----BEGIN PGP PUBLIC KEY BLOCK----- -Comment: GPGTools - https://gpgtools.org +Version: SKS 1.1.5 +Comment: Hostname: pgp.mit.edu -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 -yj9YmZZSRRQ2dujg81sLQ9CrO7WB3IGpwh+4lHQ= -=1irw +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 +Ww8nn+QC38ITGK9hVF+eVkuR +=j8C/ -----END PGP PUBLIC KEY BLOCK----- From b1e978cfd6de4e61659e019c52d9c4953b9791c1 Mon Sep 17 00:00:00 2001 From: "S. Matthew English" Date: Thu, 27 Oct 2016 12:13:03 +0200 Subject: [PATCH 262/302] instance of 'mem pool' to 'mempool' there was only one instance of 'mem pool' and not 'mempool', so I changed it to conform to the others Github-Pull: #9029 Rebased-From: 1c3ecc70c8cd6c33cf3ff4e2099c8e7d8a8ca9d2 --- src/rpc/blockchain.cpp | 2 +- src/rpc/mining.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 6f97671f52a..a38b3fc6079 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -719,7 +719,7 @@ UniValue gettxout(const UniValue& params, bool fHelp) "\nArguments:\n" "1. \"txid\" (string, required) The transaction id\n" "2. n (numeric, required) vout number\n" - "3. includemempool (boolean, optional) Whether to include the mem pool\n" + "3. includemempool (boolean, optional) Whether to include the mempool\n" "\nResult:\n" "{\n" " \"bestblock\" : \"hash\", (string) the block hash\n" diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index ba48079c055..e5eb4b8c1e1 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -229,7 +229,7 @@ UniValue getmininginfo(const UniValue& params, bool fHelp) " \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n" " \"errors\": \"...\" (string) Current errors\n" " \"networkhashps\": nnn, (numeric) The network hashes per second\n" - " \"pooledtx\": n (numeric) The size of the mem pool\n" + " \"pooledtx\": n (numeric) The size of the mempool\n" " \"testnet\": true|false (boolean) If using testnet or not\n" " \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n" "}\n" From 87fbcede5ceb49fc24c3102c0f3cf81a68617ac6 Mon Sep 17 00:00:00 2001 From: matthias Date: Mon, 31 Oct 2016 01:11:46 +0100 Subject: [PATCH 263/302] Change all instance of 'GMT epoch' to 'Unix epoch' Github-Pull: #9041 Rebased-From: 7f61b49de82989dc692e7750860eb1ec4044db7a --- src/rpc/misc.cpp | 2 +- src/wallet/rpcwallet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 06489566ba3..11befb529f7 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -57,7 +57,7 @@ UniValue getinfo(const UniValue& params, bool fHelp) " \"proxy\": \"host:port\", (string, optional) the proxy used by the server\n" " \"difficulty\": xxxxxx, (numeric) the current difficulty\n" " \"testnet\": true|false, (boolean) if the server is using testnet or not\n" - " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" + " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n" " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n" " \"paytxfee\": x.xxxx, (numeric) the transaction fee set in " + CURRENCY_UNIT + "/kB\n" diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 2ad379e46bc..fdb7a53d3bb 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2274,7 +2274,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) " \"unconfirmed_balance\": xxx, (numeric) the total unconfirmed balance of the wallet in " + CURRENCY_UNIT + "\n" " \"immature_balance\": xxxxxx, (numeric) the total immature balance of the wallet in " + CURRENCY_UNIT + "\n" " \"txcount\": xxxxxxx, (numeric) the total number of transactions in the wallet\n" - " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" + " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool\n" " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n" " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n" From 387ec9d9635580fbbedc222126c5b1a68002d543 Mon Sep 17 00:00:00 2001 From: Johnson Lau Date: Sat, 15 Oct 2016 23:45:07 +0800 Subject: [PATCH 264/302] Add script tests for FindAndDelete in pre-segwit and segwit scripts Github-Pull: #8927 Rebased-From: acf853df910339412bafb1743f42af1774f5b910 --- src/script/interpreter.cpp | 4 ++-- src/test/data/tx_invalid.json | 26 ++++++++++++++++++++++++++ src/test/data/tx_valid.json | 23 +++++++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 836cf9ee352..0e17ddc130b 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -890,7 +890,7 @@ bool EvalScript(vector >& stack, const CScript& script, un // Subset of script starting at the most recent codeseparator CScript scriptCode(pbegincodehash, pend); - // Drop the signature, since there's no way for a signature to sign itself + // Drop the signature in pre-segwit scripts but not segwit scripts if (sigversion == SIGVERSION_BASE) { scriptCode.FindAndDelete(CScript(vchSig)); } @@ -951,7 +951,7 @@ bool EvalScript(vector >& stack, const CScript& script, un // Subset of script starting at the most recent codeseparator CScript scriptCode(pbegincodehash, pend); - // Drop the signatures, since there's no way for a signature to sign itself + // Drop the signature in pre-segwit scripts but not segwit scripts for (int k = 0; k < nSigsCount; k++) { valtype& vchSig = stacktop(-isig-k); diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json index f8baee05779..f7d9e1847ff 100644 --- a/src/test/data/tx_invalid.json +++ b/src/test/data/tx_invalid.json @@ -314,5 +314,31 @@ [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x60 0x21 0xff25429251b5a84f452230a3c75fd886b7fc5a7865ce4a7bb7a9d7c5be6da3dbff", 1000]], "010000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff01e803000000000000015100000000", "P2SH,WITNESS,DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"], +["FindAndDelete tests"], +["This is a test of FindAndDelete. The first tx is a spend of normal scriptPubKey and the second tx is a spend of bare P2WSH."], +["The redeemScript/witnessScript is CHECKSIGVERIFY <0x30450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e01>."], +["The signature is <0x30450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e01> ,"], +["where the pubkey is obtained through key recovery with sig and the wrong sighash."], +["This is to show that FindAndDelete is applied only to non-segwit scripts"], +["To show that the tests are 'correctly wrong', they should pass by modifying OP_CHECKSIG under interpreter.cpp"], +["by replacing (sigversion == SIGVERSION_BASE) with (sigversion != SIGVERSION_BASE)"], +["Non-segwit: wrong sighash (without FindAndDelete) = 1ba1fe3bc90c5d1265460e684ce6774e324f0fabdf67619eda729e64e8b6bc08"], +[[["f18783ace138abac5d3a7a5cf08e88fe6912f267ef936452e0c27d090621c169", 7000, "HASH160 0x14 0x0c746489e2d83cdbb5b90b432773342ba809c134 EQUAL", 200000]], +"010000000169c12106097dc2e0526493ef67f21269fe888ef05c7a3a5dacab38e1ac8387f1581b0000b64830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e012103b12a1ec8428fc74166926318c15e17408fea82dbb157575e16a8c365f546248f4aad4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e01ffffffff0101000000000000000000000000", "P2SH,WITNESS"], +["BIP143: wrong sighash (with FindAndDelete) = 71c9cd9b2869b9c70b01b1f0360c148f42dee72297db312638df136f43311f23"], +[[["f18783ace138abac5d3a7a5cf08e88fe6912f267ef936452e0c27d090621c169", 7500, "0x00 0x20 0x9e1be07558ea5cc8e02ed1d80c0911048afad949affa36d5c3951e3159dbea19", 200000]], +"0100000000010169c12106097dc2e0526493ef67f21269fe888ef05c7a3a5dacab38e1ac8387f14c1d000000ffffffff01010000000000000000034830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e012102a9d7ed6e161f0e255c10bbfcca0128a9e2035c2c8da58899c54d22d3a31afdef4aad4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0100000000", "P2SH,WITNESS"], +["This is multisig version of the FindAndDelete tests"], +["Script is 2 CHECKMULTISIGVERIFY DROP"], +["52af4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c0395960175"], +["Signature is 0 2 "], +["Should pass by replacing (sigversion == SIGVERSION_BASE) with (sigversion != SIGVERSION_BASE) under OP_CHECKMULTISIG"], +["Non-segwit: wrong sighash (without FindAndDelete) = 4bc6a53e8e16ef508c19e38bba08831daba85228b0211f323d4cb0999cf2a5e8"], +[[["9628667ad48219a169b41b020800162287d2c0f713c04157e95c484a8dcb7592", 7000, "HASH160 0x14 0x5748407f5ca5cdca53ba30b79040260770c9ee1b EQUAL", 200000]], +"01000000019275cb8d4a485ce95741c013f7c0d28722160008021bb469a11982d47a662896581b0000fd6f01004830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c039596015221023fd5dd42b44769c5653cbc5947ff30ab8871f240ad0c0e7432aefe84b5b4ff3421039d52178dbde360b83f19cf348deb04fa8360e1bf5634577be8e50fafc2b0e4ef4c9552af4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c0395960175ffffffff0101000000000000000000000000", "P2SH,WITNESS"], +["BIP143: wrong sighash (with FindAndDelete) = 17c50ec2181ecdfdc85ca081174b248199ba81fff730794d4f69b8ec031f2dce"], +[[["9628667ad48219a169b41b020800162287d2c0f713c04157e95c484a8dcb7592", 7500, "0x00 0x20 0x9b66c15b4e0b4eb49fa877982cafded24859fe5b0e2dbfbe4f0df1de7743fd52", 200000]], +"010000000001019275cb8d4a485ce95741c013f7c0d28722160008021bb469a11982d47a6628964c1d000000ffffffff0101000000000000000007004830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c03959601010221023cb6055f4b57a1580c5a753e19610cafaedf7e0ff377731c77837fd666eae1712102c1b1db303ac232ffa8e5e7cc2cf5f96c6e40d3e6914061204c0541cb2043a0969552af4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c039596017500000000", "P2SH,WITNESS"], + ["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 1ea70135b43..2f299aa5fea 100644 --- a/src/test/data/tx_valid.json +++ b/src/test/data/tx_valid.json @@ -487,5 +487,28 @@ [[["6eb98797a21c6c10aa74edf29d618be109f48a8e94c694f3701e08ca69186436", 1, "HASH160 0x14 0x9993a429037b5d912407a71c252019287b8d27a5 EQUAL", 987654321]], "0100000000010136641869ca081e70f394c6948e8af409e18b619df2ed74aa106c1ca29787b96e0100000023220020a16b5755f7f6f96dbd65f5f0d6ab9418b89af4b1f14a1bb8a09062c35f0dcb54ffffffff0200e9a435000000001976a914389ffce9cd9ae88dcc0631e88a821ffdbe9bfe2688acc0832f05000000001976a9147480a33f950689af511e6e84c138dbbd3c3ee41588ac080047304402206ac44d672dac41f9b00e28f4df20c52eeb087207e8d758d76d92c6fab3b73e2b0220367750dbbe19290069cba53d096f44530e4f98acaa594810388cf7409a1870ce01473044022068c7946a43232757cbdf9176f009a928e1cd9a1a8c212f15c1e11ac9f2925d9002205b75f937ff2f9f3c1246e547e54f62e027f64eefa2695578cc6432cdabce271502473044022059ebf56d98010a932cf8ecfec54c48e6139ed6adb0728c09cbe1e4fa0915302e022007cd986c8fa870ff5d2b3a89139c9fe7e499259875357e20fcbb15571c76795403483045022100fbefd94bd0a488d50b79102b5dad4ab6ced30c4069f1eaa69a4b5a763414067e02203156c6a5c9cf88f91265f5a942e96213afae16d83321c8b31bb342142a14d16381483045022100a5263ea0553ba89221984bd7f0b13613db16e7a70c549a86de0cc0444141a407022005c360ef0ae5a5d4f9f2f87a56c1546cc8268cab08c73501d6b3be2e1e1a8a08824730440220525406a1482936d5a21888260dc165497a90a15669636d8edca6b9fe490d309c022032af0c646a34a44d1f4576bf6a4a74b67940f8faa84c7df9abe12a01a11e2b4783cf56210307b8ae49ac90a048e9b53357a2354b3334e9c8bee813ecb98e99a7e07e8c3ba32103b28f0c28bfab54554ae8c658ac5c3e0ce6e79ad336331f78c428dd43eea8449b21034b8113d703413d57761b8b9781957b8c0ac1dfe69f492580ca4195f50376ba4a21033400f6afecb833092a9a21cfdf1ed1376e58c5d1f47de74683123987e967a8f42103a6d48b1131e94ba04d9737d61acdaa1322008af9602b3b14862c07a1789aac162102d8b661b0b3302ee2f162b09e07a55ad5dfbe673a9f01d9f0c19617681024306b56ae00000000", "P2SH,WITNESS"], +["FindAndDelete tests"], +["This is a test of FindAndDelete. The first tx is a spend of normal P2SH and the second tx is a spend of bare P2WSH."], +["The redeemScript/witnessScript is CHECKSIGVERIFY <0x30450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e01>."], +["The signature is <0x30450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e01> ,"], +["where the pubkey is obtained through key recovery with sig and correct sighash."], +["This is to show that FindAndDelete is applied only to non-segwit scripts"], +["Non-segwit: correct sighash (with FindAndDelete) = 1ba1fe3bc90c5d1265460e684ce6774e324f0fabdf67619eda729e64e8b6bc08"], +[[["f18783ace138abac5d3a7a5cf08e88fe6912f267ef936452e0c27d090621c169", 7000, "HASH160 0x14 0x0c746489e2d83cdbb5b90b432773342ba809c134 EQUAL", 200000]], +"010000000169c12106097dc2e0526493ef67f21269fe888ef05c7a3a5dacab38e1ac8387f1581b0000b64830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0121037a3fb04bcdb09eba90f69961ba1692a3528e45e67c85b200df820212d7594d334aad4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e01ffffffff0101000000000000000000000000", "P2SH,WITNESS"], +["BIP143: correct sighash (without FindAndDelete) = 71c9cd9b2869b9c70b01b1f0360c148f42dee72297db312638df136f43311f23"], +[[["f18783ace138abac5d3a7a5cf08e88fe6912f267ef936452e0c27d090621c169", 7500, "0x00 0x20 0x9e1be07558ea5cc8e02ed1d80c0911048afad949affa36d5c3951e3159dbea19", 200000]], +"0100000000010169c12106097dc2e0526493ef67f21269fe888ef05c7a3a5dacab38e1ac8387f14c1d000000ffffffff01010000000000000000034830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e012102a9781d66b61fb5a7ef00ac5ad5bc6ffc78be7b44a566e3c87870e1079368df4c4aad4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0100000000", "P2SH,WITNESS"], +["This is multisig version of the FindAndDelete tests"], +["Script is 2 CHECKMULTISIGVERIFY DROP"], +["52af4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c0395960175"], +["Signature is 0 2 "], +["Non-segwit: correct sighash (with FindAndDelete) = 1d50f00ba4db2917b903b0ec5002e017343bb38876398c9510570f5dce099295"], +[[["9628667ad48219a169b41b020800162287d2c0f713c04157e95c484a8dcb7592", 7000, "HASH160 0x14 0x5748407f5ca5cdca53ba30b79040260770c9ee1b EQUAL", 200000]], +"01000000019275cb8d4a485ce95741c013f7c0d28722160008021bb469a11982d47a662896581b0000fd6f01004830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c03959601522102cd74a2809ffeeed0092bc124fd79836706e41f048db3f6ae9df8708cefb83a1c2102e615999372426e46fd107b76eaf007156a507584aa2cc21de9eee3bdbd26d36c4c9552af4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c0395960175ffffffff0101000000000000000000000000", "P2SH,WITNESS"], +["BIP143: correct sighash (without FindAndDelete) = c1628a1e7c67f14ca0c27c06e4fdeec2e6d1a73c7a91d7c046ff83e835aebb72"], +[[["9628667ad48219a169b41b020800162287d2c0f713c04157e95c484a8dcb7592", 7500, "0x00 0x20 0x9b66c15b4e0b4eb49fa877982cafded24859fe5b0e2dbfbe4f0df1de7743fd52", 200000]], +"010000000001019275cb8d4a485ce95741c013f7c0d28722160008021bb469a11982d47a6628964c1d000000ffffffff0101000000000000000007004830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c0395960101022102966f109c54e85d3aee8321301136cedeb9fc710fdef58a9de8a73942f8e567c021034ffc99dd9a79dd3cb31e2ab3e0b09e0e67db41ac068c625cd1f491576016c84e9552af4830450220487fb382c4974de3f7d834c1b617fe15860828c7f96454490edd6d891556dcc9022100baf95feb48f845d5bfc9882eb6aeefa1bc3790e39f59eaa46ff7f15ae626c53e0148304502205286f726690b2e9b0207f0345711e63fa7012045b9eb0f19c2458ce1db90cf43022100e89f17f86abc5b149eba4115d4f128bcf45d77fb3ecdd34f594091340c039596017500000000", "P2SH,WITNESS"], + ["Make diffs cleaner by leaving a comment here without comma at the end"] ] From ecd7db57672d4f2dbc85ac03e571b795b0259298 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 7 Nov 2016 23:00:54 +0100 Subject: [PATCH 265/302] [qa] test_framework: Exit when tmpdir exists Github-Pull: #9098 Rebased-From: fae19aa1da0858678874815b344de83e1ee3a1bd --- qa/rpc-tests/test_framework/test_framework.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index 9d15d874565..bb624301cfb 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -137,16 +137,11 @@ def main(self): success = False try: - if not os.path.isdir(self.options.tmpdir): - os.makedirs(self.options.tmpdir) + os.makedirs(self.options.tmpdir, exist_ok=False) self.setup_chain() - self.setup_network() - self.run_test() - success = True - except JSONRPCException as e: print("JSONRPC error: "+e.error['message']) traceback.print_tb(sys.exc_info()[2]) From 58eab244fb9514b74e157b5dde9060cc8f3b77a8 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 7 Nov 2016 22:33:22 +0100 Subject: [PATCH 266/302] [qa] rpc-tests: Apply random offset to portseed This helps to skip over resources, which are blocked by regtest bitcoind zombie nodes Github-Pull: #9098 Rebased-From: fab0f07dec8d6e21ab70843fdce101f1703588fd --- qa/pull-tester/rpc-tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index dbd6de5599d..887644c51b9 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -243,6 +243,10 @@ def __init__(self, num_tests_parallel, test_list=None, flags=None): self.test_list = test_list self.flags = flags self.num_running = 0 + # In case there is a graveyard of zombie bitcoinds, we can apply a + # pseudorandom offset to hopefully jump over them. + # (625 is PORT_RANGE/MAX_NODES) + self.portseed_offset = int(time.time() * 1000) % 625 self.jobs = [] def get_next(self): @@ -250,7 +254,7 @@ def get_next(self): # Add tests self.num_running += 1 t = self.test_list.pop(0) - port_seed = ["--portseed=%s" % len(self.test_list)] + port_seed = ["--portseed={}".format(len(self.test_list) + self.portseed_offset)] log_stdout = tempfile.SpooledTemporaryFile(max_size=2**16) log_stderr = tempfile.SpooledTemporaryFile(max_size=2**16) self.jobs.append((t, From 3688866880decdbe9c2b551a1b701c752f8013d2 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Tue, 29 Nov 2016 12:18:44 -0500 Subject: [PATCH 267/302] Disable fee estimates for a confirm target of 1 block Backport of #9239 without GUI changes and fixing conflicts in tests. --- src/policy/fees.cpp | 7 ++++++- src/rpc/mining.cpp | 2 ++ src/test/policyestimator_tests.cpp | 30 ++++++++++++++++++++++-------- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 7b0e8b7d08c..453b4a57d95 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -495,7 +495,8 @@ void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight, CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget) { // Return failure if trying to analyze a target we're not tracking - if (confTarget <= 0 || (unsigned int)confTarget > feeStats.GetMaxConfirms()) + // It's not possible to get reasonable estimates for confTarget of 1 + if (confTarget <= 1 || (unsigned int)confTarget > feeStats.GetMaxConfirms()) return CFeeRate(0); double median = feeStats.EstimateMedianVal(confTarget, SUFFICIENT_FEETXS, MIN_SUCCESS_PCT, true, nBestSeenHeight); @@ -514,6 +515,10 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoun if (confTarget <= 0 || (unsigned int)confTarget > feeStats.GetMaxConfirms()) return CFeeRate(0); + // It's not possible to get reasonable estimates for confTarget of 1 + if (confTarget == 1) + confTarget = 2; + double median = -1; while (median < 0 && (unsigned int)confTarget <= feeStats.GetMaxConfirms()) { median = feeStats.EstimateMedianVal(confTarget++, SUFFICIENT_FEETXS, MIN_SUCCESS_PCT, true, nBestSeenHeight); diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index e6901bc77e4..a574709d97c 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -791,6 +791,8 @@ UniValue estimatefee(const UniValue& params, bool fHelp) "\n" "A negative value is returned if not enough transactions and blocks\n" "have been observed to make an estimate.\n" + "-1 is always returned for nblocks == 1 as it is impossible to calculate\n" + "a fee that is high enough to get reliably included in the next block.\n" "\nExample:\n" + HelpExampleCli("estimatefee", "6") ); diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp index 5c902387f12..fa00a1c465f 100644 --- a/src/test/policyestimator_tests.cpp +++ b/src/test/policyestimator_tests.cpp @@ -105,19 +105,26 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) // Highest feerate is 10*baseRate and gets in all blocks, // second highest feerate is 9*baseRate and gets in 9/10 blocks = 90%, // third highest feerate is 8*base rate, and gets in 8/10 blocks = 80%, - // so estimateFee(1) should return 10*baseRate. + // so estimateFee(1) would return 10*baseRate but is hardcoded to return failure // Second highest feerate has 100% chance of being included by 2 blocks, // so estimateFee(2) should return 9*baseRate etc... for (int i = 1; i < 10;i++) { origFeeEst.push_back(mpool.estimateFee(i).GetFeePerK()); origPriEst.push_back(mpool.estimatePriority(i)); if (i > 1) { // Fee estimates should be monotonically decreasing - BOOST_CHECK(origFeeEst[i-1] <= origFeeEst[i-2]); + if (i > 2) { + BOOST_CHECK(origFeeEst[i-1] <= origFeeEst[i-2]); + } BOOST_CHECK(origPriEst[i-1] <= origPriEst[i-2]); } int mult = 11-i; - BOOST_CHECK(origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee); - BOOST_CHECK(origFeeEst[i-1] > mult*baseRate.GetFeePerK() - deltaFee); + if (i > 1) { + BOOST_CHECK(origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee); + BOOST_CHECK(origFeeEst[i-1] > mult*baseRate.GetFeePerK() - deltaFee); + } + else { + BOOST_CHECK(origFeeEst[i-1] == CFeeRate(0).GetFeePerK()); + } BOOST_CHECK(origPriEst[i-1] < pow(10,mult) * basepri + deltaPri); BOOST_CHECK(origPriEst[i-1] > pow(10,mult) * basepri - deltaPri); } @@ -127,9 +134,12 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) while (blocknum < 250) mpool.removeForBlock(block, ++blocknum, dummyConflicted); + BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0)); for (int i = 1; i < 10;i++) { - BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] + deltaFee); - BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee); + if (i > 1) { + BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] + deltaFee); + BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee); + } BOOST_CHECK(mpool.estimatePriority(i) < origPriEst[i-1] + deltaPri); BOOST_CHECK(mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri); } @@ -169,8 +179,10 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) } mpool.removeForBlock(block, 265, dummyConflicted); block.clear(); + BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0)); for (int i = 1; i < 10;i++) { - BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee); + if (i > 1) + BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee); BOOST_CHECK(mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri); } @@ -190,8 +202,10 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) mpool.removeForBlock(block, ++blocknum, dummyConflicted); block.clear(); } + BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0)); for (int i = 1; i < 10; i++) { - BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] - deltaFee); + if (i > 1) + BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] - deltaFee); BOOST_CHECK(mpool.estimatePriority(i) < origPriEst[i-1] - deltaPri); } From a710a4304033eea581e463a5fb0502bdb8991aa1 Mon Sep 17 00:00:00 2001 From: wodry Date: Wed, 30 Nov 2016 17:19:08 +0100 Subject: [PATCH 268/302] Improvement of documentation of command line parameter 'whitelist' Github-Pull: #9251 Rebased-From: 8a70a9da3da0df5c376042b18b87f0a63e88d2e3 --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 4a837018b1e..bbdab14ee07 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -376,7 +376,7 @@ std::string HelpMessage(HelpMessageMode mode) #endif #endif strUsage += HelpMessageOpt("-whitebind=", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6")); - strUsage += HelpMessageOpt("-whitelist=", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") + + strUsage += HelpMessageOpt("-whitelist=", _("Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.") + " " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway")); strUsage += HelpMessageOpt("-whitelistrelay", strprintf(_("Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)"), DEFAULT_WHITELISTRELAY)); strUsage += HelpMessageOpt("-whitelistforcerelay", strprintf(_("Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)"), DEFAULT_WHITELISTFORCERELAY)); From 21ccb9f2530af996fc0a58df418837a08b75781f Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Sun, 20 Nov 2016 09:54:51 -0500 Subject: [PATCH 269/302] Add option to return non-segwit serialization via rpc Github-Pull: #9194 Rebased-From: 835c75acaac004c3315395dcd7d1f193dfb9e5da --- qa/rpc-tests/segwit.py | 20 +++++++++++++++++--- src/core_io.h | 2 +- src/core_write.cpp | 4 ++-- src/init.cpp | 4 ++++ src/rpc/blockchain.cpp | 2 +- src/rpc/rawtransaction.cpp | 2 +- src/rpc/server.cpp | 8 ++++++++ src/rpc/server.h | 5 +++++ src/wallet/rpcwallet.cpp | 2 +- 9 files changed, 40 insertions(+), 9 deletions(-) diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py index 493ad2e67c8..4b4fdf8b11d 100755 --- a/qa/rpc-tests/segwit.py +++ b/qa/rpc-tests/segwit.py @@ -13,6 +13,7 @@ from test_framework.address import script_to_p2sh, key_to_p2pkh from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG from io import BytesIO +from test_framework.mininode import FromHex NODE_0 = 0 NODE_1 = 1 @@ -83,8 +84,8 @@ def setup_chain(self): def setup_network(self): self.nodes = [] - self.nodes.append(start_node(0, self.options.tmpdir, ["-logtimemicros", "-debug", "-walletprematurewitness"])) - self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"])) + self.nodes.append(start_node(0, self.options.tmpdir, ["-logtimemicros", "-debug", "-walletprematurewitness", "-rpcserialversion=0"])) + self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness", "-rpcserialversion=2"])) self.nodes.append(start_node(2, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=536870915", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"])) connect_nodes(self.nodes[1], 0) connect_nodes(self.nodes[2], 1) @@ -210,7 +211,20 @@ def run_test(self): block = self.nodes[2].generate(1) #block 432 (first block with new rules; 432 = 144 * 3) sync_blocks(self.nodes) assert_equal(len(self.nodes[2].getrawmempool()), 0) - assert_equal(len(self.nodes[2].getblock(block[0])["tx"]), 5) + segwit_tx_list = self.nodes[2].getblock(block[0])["tx"] + assert_equal(len(segwit_tx_list), 5) + + print("Verify block and transaction serialization rpcs return differing serializations depending on rpc serialization flag") + # Note: node1 has version 2, which is simply >0 and will catch future upgrades in tests + assert(self.nodes[2].getblock(block[0], False) != self.nodes[0].getblock(block[0], False)) + assert(self.nodes[1].getblock(block[0], False) == self.nodes[2].getblock(block[0], False)) + for i in range(len(segwit_tx_list)): + tx = FromHex(CTransaction(), self.nodes[2].gettransaction(segwit_tx_list[i])["hex"]) + assert(self.nodes[2].getrawtransaction(segwit_tx_list[i]) != self.nodes[0].getrawtransaction(segwit_tx_list[i])) + assert(self.nodes[1].getrawtransaction(segwit_tx_list[i], 0) == self.nodes[2].getrawtransaction(segwit_tx_list[i])) + assert(self.nodes[0].getrawtransaction(segwit_tx_list[i]) != self.nodes[2].gettransaction(segwit_tx_list[i])["hex"]) + assert(self.nodes[1].getrawtransaction(segwit_tx_list[i]) == self.nodes[2].gettransaction(segwit_tx_list[i])["hex"]) + assert(self.nodes[0].getrawtransaction(segwit_tx_list[i]) == bytes_to_hex_str(tx.serialize_without_witness())) print("Verify witness txs without witness data are invalid after the fork") self.fail_mine(self.nodes[2], wit_ids[NODE_2][WIT_V0][2], False) diff --git a/src/core_io.h b/src/core_io.h index b559d44bf5a..44a732b6970 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -25,7 +25,7 @@ extern std::vector ParseHexUV(const UniValue& v, const std::strin // core_write.cpp extern std::string FormatScript(const CScript& script); -extern std::string EncodeHexTx(const CTransaction& tx); +extern std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0); extern void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex); extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry); diff --git a/src/core_write.cpp b/src/core_write.cpp index ea01ddc10d8..9f859ba9e12 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -116,9 +116,9 @@ string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode) return str; } -string EncodeHexTx(const CTransaction& tx) +string EncodeHexTx(const CTransaction& tx, const int serialFlags) { - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | serialFlags); ssTx << tx; return HexStr(ssTx.begin(), ssTx.end()); } diff --git a/src/init.cpp b/src/init.cpp index bbdab14ee07..8e40c4388d1 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -364,6 +364,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), Params(CBaseChainParams::MAIN).GetDefaultPort(), Params(CBaseChainParams::TESTNET).GetDefaultPort())); strUsage += HelpMessageOpt("-proxy=", _("Connect through SOCKS5 proxy")); strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), DEFAULT_PROXYRANDOMIZE)); + strUsage += HelpMessageOpt("-rpcserialversion", strprintf(_("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(>0) (default: %d)"), DEFAULT_RPC_SERIALIZE_VERSION)); strUsage += HelpMessageOpt("-seednode=", _("Connect to a node to retrieve peer addresses, and disconnect")); strUsage += HelpMessageOpt("-timeout=", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT)); strUsage += HelpMessageOpt("-torcontrol=:", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL)); @@ -982,6 +983,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS)) nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM); + if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) < 0) + return InitError("rpcserialversion must be non-negative."); + nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); fEnableReplacement = GetBoolArg("-mempoolreplacement", DEFAULT_ENABLE_REPLACEMENT); diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index a38b3fc6079..b4d53a9f3d9 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -607,7 +607,7 @@ UniValue getblock(const UniValue& params, bool fHelp) if (!fVerbose) { - CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); ssBlock << block; std::string strHex = HexStr(ssBlock.begin(), ssBlock.end()); return strHex; diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index b2bbb8b3edc..2719829e65e 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -209,7 +209,7 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp) if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true)) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction"); - string strHex = EncodeHexTx(tx); + string strHex = EncodeHexTx(tx, RPCSerializationFlags()); if (!fVerbose) return strHex; diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 102c776314a..deeabcb8d7b 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -495,4 +495,12 @@ void RPCRunLater(const std::string& name, boost::function func, int6 deadlineTimers.insert(std::make_pair(name, boost::shared_ptr(timerInterface->NewTimer(func, nSeconds*1000)))); } +int RPCSerializationFlags() +{ + int flag = 0; + if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) == 0) + flag |= SERIALIZE_TRANSACTION_NO_WITNESS; + return flag; +} + CRPCTable tableRPC; diff --git a/src/rpc/server.h b/src/rpc/server.h index b5ccc153d07..1ed8f2466d5 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -19,6 +19,8 @@ #include +static const unsigned int DEFAULT_RPC_SERIALIZE_VERSION = 1; + class CRPCCommand; namespace RPCServer @@ -195,4 +197,7 @@ void InterruptRPC(); void StopRPC(); std::string JSONRPCExecBatch(const UniValue& vReq); +// Retrieves any serialization flags requested in command line argument +int RPCSerializationFlags(); + #endif // BITCOIN_RPCSERVER_H diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index fdb7a53d3bb..17bda050c35 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1780,7 +1780,7 @@ UniValue gettransaction(const UniValue& params, bool fHelp) ListTransactions(wtx, "*", 0, false, details, filter); entry.push_back(Pair("details", details)); - string strHex = EncodeHexTx(static_cast(wtx)); + string strHex = EncodeHexTx(static_cast(wtx), RPCSerializationFlags()); entry.push_back(Pair("hex", strHex)); return entry; From f26dab7e90cfb1733736c1dd63c507254de84a34 Mon Sep 17 00:00:00 2001 From: instagibbs Date: Tue, 22 Nov 2016 15:47:07 -0500 Subject: [PATCH 270/302] Adapt ZMQ/rest serialization to take rpcserialversion arg Github-Pull: #9194 Rebased-From: ad5c4c93cae53a2a6f74880ca11b4d788677a378 --- src/rest.cpp | 4 ++-- src/zmq/zmqpublishnotifier.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rest.cpp b/src/rest.cpp index 2dff8d7dadd..57cd9baeb7a 100644 --- a/src/rest.cpp +++ b/src/rest.cpp @@ -228,7 +228,7 @@ static bool rest_block(HTTPRequest* req, return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); } - CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); ssBlock << block; switch (rf) { @@ -367,7 +367,7 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart) if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true)) return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); - CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); ssTx << tx; switch (rf) { diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp index b6c907980f0..cdef17e08c8 100644 --- a/src/zmq/zmqpublishnotifier.cpp +++ b/src/zmq/zmqpublishnotifier.cpp @@ -6,6 +6,7 @@ #include "zmqpublishnotifier.h" #include "main.h" #include "util.h" +#include "rpc/server.h" static std::multimap mapPublishNotifiers; @@ -165,7 +166,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex) LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex()); const Consensus::Params& consensusParams = Params().GetConsensus(); - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); { LOCK(cs_main); CBlock block; @@ -185,7 +186,7 @@ bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr { uint256 hash = transaction.GetHash(); LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex()); - CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); + CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags()); ss << transaction; return SendMessage(MSG_RAWTX, &(*ss.begin()), ss.size()); } From 4c71fc42fbf32d8994f4d2488ac4bafad93226a1 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 30 Sep 2016 18:19:57 -0400 Subject: [PATCH 271/302] Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) Github-Pull: #8865 Rebased-From: 0278fb5f48ae9e42ec0772f85e201051077f633c --- src/main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 191bcff4cc1..cfc616201dd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3110,13 +3110,10 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, } } // Relay inventory, but don't relay old inventory during initial block download. - int nBlockEstimate = 0; - if (fCheckpointsEnabled) - nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints()); { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { - if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) { + if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) { BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) { pnode->PushBlockHash(hash); } From ad20cddce2097c6561202777fccd257deb1a9810 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sat, 22 Oct 2016 05:33:25 +0000 Subject: [PATCH 272/302] IBD check uses minimumchain work instead of checkpoints. This introduces a 'minimum chain work' chainparam which is intended to be the known amount of work in the chain for the network at the time of software release. If you don't have this much work, you're not yet caught up. This is used instead of the count of blocks test from checkpoints. This criteria is trivial to keep updated as there is no element of subjectivity, trust, or position dependence to it. It is also a more reliable metric of sync status than a block count. Github-Pull: #9053 Rebased-From: fd46136dfaf68a7046cf7b8693824d73ac6b1caf --- doc/release-process.md | 1 + src/chainparams.cpp | 10 ++++++++++ src/consensus/params.h | 1 + src/main.cpp | 6 ++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 41c1ac8556b..ccc4bcd2308 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -10,6 +10,7 @@ Before every minor and major release: * Update [bips.md](bips.md) to account for changes since the last release. * Update version in sources (see below) * Write release notes (see below) +* Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc. Before every major release: diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 3ad9f4d2d34..69514617b6c 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -97,6 +97,9 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1479168000; // November 15th, 2016. consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017. + // The best chain should have at least this much work. + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000002cb971dd56d1c583c20f90"); + /** * The message start string is designed to be unlikely to occur in normal data. * The characters are rarely used upper ASCII, not valid as UTF-8, and produce @@ -194,6 +197,9 @@ class CTestNetParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 1462060800; // May 1st 2016 consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017 + // The best chain should have at least this much work. + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000198b4def2baa9338d6"); + pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; pchMessageStart[2] = 0x09; @@ -228,6 +234,7 @@ class CTestNetParams : public CChainParams { fMineBlocksOnDemand = false; fTestnetToBeDeprecatedFieldRPC = true; + checkpointData = (CCheckpointData) { boost::assign::map_list_of ( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")), @@ -270,6 +277,9 @@ class CRegTestParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0; consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 999999999999ULL; + // The best chain should have at least this much work. + consensus.nMinimumChainWork = uint256S("0x00"); + pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0xbf; pchMessageStart[2] = 0xb5; diff --git a/src/consensus/params.h b/src/consensus/params.h index d97017d0c46..7aa876d6501 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -61,6 +61,7 @@ struct Params { int64_t nPowTargetSpacing; int64_t nPowTargetTimespan; int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; } + uint256 nMinimumChainWork; }; } // namespace Consensus diff --git a/src/main.cpp b/src/main.cpp index cfc616201dd..54eff56f418 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1747,7 +1747,9 @@ bool IsInitialBlockDownload() return false; if (fImporting || fReindex) return true; - if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints())) + if (chainActive.Tip() == NULL) + return true; + if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork)) return true; bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 || std::max(chainActive.Tip()->GetBlockTime(), pindexBestHeader->GetBlockTime()) < GetTime() - nMaxTipAge); @@ -1781,7 +1783,7 @@ void CheckForkWarningConditions() { AssertLockHeld(cs_main); // Before we get past initial download, we cannot reliably alert about forks - // (we assume we don't get stuck on a fork before the last checkpoint) + // (we assume we don't get stuck on a fork before finishing our initial sync) if (IsInitialBlockDownload()) return; From 5b93eeebb4f7fce10a12f2e83f771bc23002c224 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Wed, 2 Nov 2016 01:49:45 +0000 Subject: [PATCH 273/302] Remove GetTotalBlocksEstimate and checkpoint tests that test nothing. GetTotalBlocksEstimate is no longer used and it was the only thing the checkpoint tests were testing. Since checkpoints are on their way out it makes more sense to remove the test file than to cook up a new pointless test. Github-Pull: #9053 Rebased-From: 2082b5574cec783f4ff99941492d92e05680b293 --- src/Makefile.test.include | 1 - src/checkpoints.cpp | 10 ---------- src/checkpoints.h | 3 --- src/test/Checkpoints_tests.cpp | 27 --------------------------- 4 files changed, 41 deletions(-) delete mode 100644 src/test/Checkpoints_tests.cpp diff --git a/src/Makefile.test.include b/src/Makefile.test.include index ef30eeb4ae2..0878d8234c1 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -50,7 +50,6 @@ BITCOIN_TESTS =\ test/bip32_tests.cpp \ test/blockencodings_tests.cpp \ test/bloom_tests.cpp \ - test/Checkpoints_tests.cpp \ test/coins_tests.cpp \ test/compress_tests.cpp \ test/crypto_tests.cpp \ diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index aefddce4641..d22c188c16e 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -55,16 +55,6 @@ namespace Checkpoints { return fWorkBefore / (fWorkBefore + fWorkAfter); } - int GetTotalBlocksEstimate(const CCheckpointData& data) - { - const MapCheckpoints& checkpoints = data.mapCheckpoints; - - if (checkpoints.empty()) - return 0; - - return checkpoints.rbegin()->first; - } - CBlockIndex* GetLastCheckpoint(const CCheckpointData& data) { const MapCheckpoints& checkpoints = data.mapCheckpoints; diff --git a/src/checkpoints.h b/src/checkpoints.h index cd25ea5379d..04346f35ffa 100644 --- a/src/checkpoints.h +++ b/src/checkpoints.h @@ -19,9 +19,6 @@ struct CCheckpointData; namespace Checkpoints { -//! Return conservative estimate of total number of blocks, 0 if unknown -int GetTotalBlocksEstimate(const CCheckpointData& data); - //! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint CBlockIndex* GetLastCheckpoint(const CCheckpointData& data); diff --git a/src/test/Checkpoints_tests.cpp b/src/test/Checkpoints_tests.cpp deleted file mode 100644 index 1b7d368e13e..00000000000 --- a/src/test/Checkpoints_tests.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2011-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. - -// -// Unit tests for block-chain checkpoints -// - -#include "checkpoints.h" - -#include "uint256.h" -#include "test/test_bitcoin.h" -#include "chainparams.h" - -#include - -using namespace std; - -BOOST_FIXTURE_TEST_SUITE(Checkpoints_tests, BasicTestingSetup) - -BOOST_AUTO_TEST_CASE(sanity) -{ - const CCheckpointData& checkpoints = Params(CBaseChainParams::MAIN).Checkpoints(); - BOOST_CHECK(Checkpoints::GetTotalBlocksEstimate(checkpoints) >= 134444); -} - -BOOST_AUTO_TEST_SUITE_END() From 5998a09546b033e8d55f2a45d35a6161b2cdc288 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Tue, 1 Nov 2016 00:37:54 +0000 Subject: [PATCH 274/302] IsInitialBlockDownload no longer uses header-only timestamps. This avoids a corner case (mostly visible on testnet) where bogus headers can keep nodes in IsInitialBlockDownload. Github-Pull: #9053 Rebased-From: e141beb6a9816b7e1e680fb0a8bae16d42a3e557 --- src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 54eff56f418..5f04c191622 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1751,11 +1751,10 @@ bool IsInitialBlockDownload() return true; if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork)) return true; - bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 || - std::max(chainActive.Tip()->GetBlockTime(), pindexBestHeader->GetBlockTime()) < GetTime() - nMaxTipAge); - if (!state) - latchToFalse.store(true, std::memory_order_relaxed); - return state; + if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge)) + return true; + latchToFalse.store(true, std::memory_order_relaxed); + return false; } bool fLargeWorkForkFound = false; From 57aec3b0b5993568571c352643abb6f3d79ffdd7 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Sun, 11 Dec 2016 21:17:20 +0000 Subject: [PATCH 275/302] Add release notes for wallet/mempool rejections. (PR #9302 and #9290) --- doc/release-notes.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index e54f9ac0216..0830e0a123b 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -42,8 +42,23 @@ but severe issues with the libc++ version on 10.7.x keep it from running reliabl Notable changes =============== -Example item ---------------- +Change to wallet handling of mempool rejection +----------------------------------------------- + +When a newly created transaction failed to enter the mempool due to +the limits on chains of unconfirmed transactions the sending RPC +calls would return an error. The transaction would still be queued +in the wallet and, once some of the parent transactions were +confirmed, broadcast after the software was restarted. + +This behavior has been changed to return success and to reattempt +mempool insertion at the same time transaction rebroadcast is +attempted, avoiding a need for a restart. + +Transactions in the wallet which cannot be accepted into the mempool +can be abandoned with the previously existing abandontransaction RPC +(or in the GUI via a context menu on the transaction). + 0.13.x Change log ================= From 64dfdde0aa7f7ef24e6cbf3c57e6d24efc55367e Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 13 Dec 2016 12:37:40 +0100 Subject: [PATCH 276/302] Squashed 'src/secp256k1/' changes from 6c527ec..8225239 8225239 Merge #433: Make the libcrypto detection fail the newer API. 12de863 Make the libcrypto detection fail the newer API. 2928420 Merge #427: Remove Schnorr from travis as well 8eecc4a Remove Schnorr from travis as well a8abae7 Merge #310: Add exhaustive test for group functions on a low-order subgroup b4ceedf Add exhaustive test for verification 83836a9 Add exhaustive tests for group arithmetic, signing, and ecmult on a small group 20b8877 Add exhaustive test for group functions on a low-order subgroup 80773a6 Merge #425: Remove Schnorr experiment e06e878 Remove Schnorr experiment 04c8ef3 Merge #407: Modify parameter order of internal functions to match API parameter order 6e06696 Merge #411: Remove guarantees about memcmp-ability 40c8d7e Merge #421: Update scalar_4x64_impl.h a922365 Merge #422: Restructure nonce clearing 3769783 Restructure nonce clearing 0f9e69d Restructure nonce clearing 9d67afa Update scalar_4x64_impl.h 7d15cd7 Merge #413: fix auto-enabled static precompuatation 00c5d2e fix auto-enabled static precompuatation 91219a1 Remove guarantees about memcmp-ability 7a49cac Merge #410: Add string.h include to ecmult_impl 0bbd5d4 Add string.h include to ecmult_impl 353c1bf Fix secp256k1_ge_set_table_gej_var parameter order 541b783 Fix secp256k1_ge_set_all_gej_var parameter order 7d893f4 Fix secp256k1_fe_inv_all_var parameter order c5b32e1 Merge #405: Make secp256k1_fe_sqrt constant time 926836a Make secp256k1_fe_sqrt constant time e2a8e92 Merge #404: Replace 3M + 4S doubling formula with 2M + 5S one 8ec49d8 Add note about 2M + 5S doubling formula 5a91bd7 Merge #400: A couple minor cleanups ac01378 build: add -DSECP256K1_BUILD to benchmark_internal build flags a6c6f99 Remove a bunch of unused stdlib #includes 65285a6 Merge #403: configure: add flag to disable OpenSSL tests a9b2a5d configure: add flag to disable OpenSSL tests b340123 Merge #402: Add support for testing quadratic residues e6e9805 Add function for testing quadratic residue field/group elements. efd953a Add Jacobi symbol test via GMP fa36a0d Merge #401: ecmult_const: unify endomorphism and non-endomorphism skew cases c6191fd ecmult_const: unify endomorphism and non-endomorphism skew cases 0b3e618 Merge #378: .gitignore build-aux cleanup 6042217 Merge #384: JNI: align shared files copyright/comments to bitcoinj's 24ad20f Merge #399: build: verify that the native compiler works for static precomp b3be852 Merge #398: Test whether ECDH and Schnorr are enabled for JNI aa0b1fd build: verify that the native compiler works for static precomp eee808d Test whether ECDH and Schnorr are enabled for JNI 7b0fb18 Merge #366: ARM assembly implementation of field_10x26 inner (rebase of #173) 001f176 ARM assembly implementation of field_10x26 inner 0172be9 Merge #397: Small fixes for sha256 3f8b78e Fix undefs in hash_impl.h 2ab4695 Fix state size in sha256 struct 6875b01 Merge #386: Add some missing `VERIFY_CHECK(ctx != NULL)` 2c52b5d Merge #389: Cast pointers through uintptr_t under JNI 43097a4 Merge #390: Update bitcoin-core GitHub links 31c9c12 Merge #391: JNI: Only call ecdsa_verify if its inputs parsed correctly 1cb2302 Merge #392: Add testcase which hits additional branch in secp256k1_scalar_sqr d2ee340 Merge #388: bench_ecdh: fix call to secp256k1_context_create 093a497 Add testcase which hits additional branch in secp256k1_scalar_sqr a40c701 JNI: Only call ecdsa_verify if its inputs parsed correctly faa2a11 Update bitcoin-core GitHub links 47b9e78 Cast pointers through uintptr_t under JNI f36f9c6 bench_ecdh: fix call to secp256k1_context_create bcc4881 Add some missing `VERIFY_CHECK(ctx != NULL)` for functions that use `ARG_CHECK` 6ceea2c align shared files copyright/comments to bitcoinj's 70141a8 Update .gitignore 7b549b1 Merge #373: build: fix x86_64 asm detection for some compilers bc7c93c Merge #374: Add note about y=0 being possible on one of the sextic twists e457018 Merge #364: JNI rebased 86e2d07 JNI library: cleanup, removed unimplemented code 3093576a JNI library bd2895f Merge pull request #371 e72e93a Add note about y=0 being possible on one of the sextic twists 3f8fdfb build: fix x86_64 asm detection for some compilers e5a9047 [Trivial] Remove double semicolons c18b869 Merge pull request #360 3026daa Merge pull request #302 03d4611 Add sage verification script for the group laws a965937 Merge pull request #361 83221ec Add experimental features to configure 5d4c5a3 Prevent damage_array in the signature test from going out of bounds. 419bf7f Merge pull request #356 03d84a4 Benchmark against OpenSSL verification git-subtree-dir: src/secp256k1 git-subtree-split: 8225239f490f79842a5a3b82ad6cc8aa11d5208e --- .gitignore | 20 +- .travis.yml | 18 +- Makefile.am | 90 ++- README.md | 2 +- build-aux/m4/ax_jni_include_dir.m4 | 140 ++++ build-aux/m4/bitcoin_secp.m4 | 8 +- configure.ac | 158 ++++- include/secp256k1.h | 14 +- include/secp256k1_schnorr.h | 173 ----- libsecp256k1.pc.in | 2 +- sage/group_prover.sage | 322 +++++++++ sage/secp256k1.sage | 306 +++++++++ sage/weierstrass_prover.sage | 264 ++++++++ src/asm/field_10x26_arm.s | 919 ++++++++++++++++++++++++++ src/bench_ecdh.c | 3 +- src/bench_internal.c | 34 +- src/bench_verify.c | 44 ++ src/ecdsa_impl.h | 18 + src/ecmult_const_impl.h | 69 +- src/ecmult_gen_impl.h | 2 +- src/ecmult_impl.h | 21 +- src/field.h | 15 +- src/field_10x26_impl.h | 12 +- src/field_5x52_impl.h | 1 - src/field_5x52_int128_impl.h | 4 +- src/field_impl.h | 38 +- src/group.h | 9 +- src/group_impl.h | 112 +++- src/hash.h | 2 +- src/hash_impl.h | 10 +- src/java/org/bitcoin/NativeSecp256k1.java | 440 +++++++++++- src/java/org/bitcoin/NativeSecp256k1Test.java | 226 +++++++ src/java/org/bitcoin/NativeSecp256k1Util.java | 45 ++ src/java/org/bitcoin/Secp256k1Context.java | 51 ++ src/java/org_bitcoin_NativeSecp256k1.c | 378 ++++++++++- src/java/org_bitcoin_NativeSecp256k1.h | 104 ++- src/java/org_bitcoin_Secp256k1Context.c | 15 + src/java/org_bitcoin_Secp256k1Context.h | 22 + src/modules/ecdh/Makefile.am.include | 2 +- src/modules/recovery/Makefile.am.include | 2 +- src/modules/recovery/main_impl.h | 4 +- src/modules/schnorr/Makefile.am.include | 10 - src/modules/schnorr/main_impl.h | 164 ----- src/modules/schnorr/schnorr.h | 20 - src/modules/schnorr/schnorr_impl.h | 207 ------ src/modules/schnorr/tests_impl.h | 175 ----- src/num.h | 6 + src/num_gmp_impl.h | 26 + src/scalar.h | 4 +- src/scalar_4x64_impl.h | 26 +- src/scalar_impl.h | 41 +- src/scalar_low.h | 15 + src/scalar_low_impl.h | 114 ++++ src/secp256k1.c | 19 +- src/tests.c | 202 +++++- src/tests_exhaustive.c | 329 +++++++++ 56 files changed, 4463 insertions(+), 1014 deletions(-) create mode 100644 build-aux/m4/ax_jni_include_dir.m4 delete mode 100644 include/secp256k1_schnorr.h create mode 100644 sage/group_prover.sage create mode 100644 sage/secp256k1.sage create mode 100644 sage/weierstrass_prover.sage create mode 100644 src/asm/field_10x26_arm.s create mode 100644 src/java/org/bitcoin/NativeSecp256k1Test.java create mode 100644 src/java/org/bitcoin/NativeSecp256k1Util.java create mode 100644 src/java/org/bitcoin/Secp256k1Context.java create mode 100644 src/java/org_bitcoin_Secp256k1Context.c create mode 100644 src/java/org_bitcoin_Secp256k1Context.h mode change 100644 => 100755 src/modules/recovery/main_impl.h delete mode 100644 src/modules/schnorr/Makefile.am.include delete mode 100644 src/modules/schnorr/main_impl.h delete mode 100644 src/modules/schnorr/schnorr.h delete mode 100644 src/modules/schnorr/schnorr_impl.h delete mode 100644 src/modules/schnorr/tests_impl.h create mode 100644 src/scalar_low.h create mode 100644 src/scalar_low_impl.h mode change 100644 => 100755 src/secp256k1.c create mode 100644 src/tests_exhaustive.c diff --git a/.gitignore b/.gitignore index e0b7b7a48a3..87fea161ba5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ bench_schnorr_verify bench_recover bench_internal tests +exhaustive_tests gen_context *.exe *.so @@ -25,17 +26,24 @@ config.status libtool .deps/ .dirstamp -build-aux/ *.lo *.o *~ src/libsecp256k1-config.h src/libsecp256k1-config.h.in src/ecmult_static_context.h -m4/libtool.m4 -m4/ltoptions.m4 -m4/ltsugar.m4 -m4/ltversion.m4 -m4/lt~obsolete.m4 +build-aux/config.guess +build-aux/config.sub +build-aux/depcomp +build-aux/install-sh +build-aux/ltmain.sh +build-aux/m4/libtool.m4 +build-aux/m4/lt~obsolete.m4 +build-aux/m4/ltoptions.m4 +build-aux/m4/ltsugar.m4 +build-aux/m4/ltversion.m4 +build-aux/missing +build-aux/compile +build-aux/test-driver src/stamp-h1 libsecp256k1.pc diff --git a/.travis.yml b/.travis.yml index 4e1e73c39f5..24395292426 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,26 +6,30 @@ addons: compiler: - clang - gcc +cache: + directories: + - src/java/guava/ env: global: - - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no schnorr=no RECOVERY=no + - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no + - GUAVA_URL=https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar GUAVA_JAR=src/java/guava/guava-18.0.jar matrix: - SCALAR=32bit RECOVERY=yes - - SCALAR=32bit FIELD=32bit ECDH=yes + - SCALAR=32bit FIELD=32bit ECDH=yes EXPERIMENTAL=yes - SCALAR=64bit - FIELD=64bit RECOVERY=yes - FIELD=64bit ENDOMORPHISM=yes - - FIELD=64bit ENDOMORPHISM=yes ECDH=yes + - FIELD=64bit ENDOMORPHISM=yes ECDH=yes EXPERIMENTAL=yes - FIELD=64bit ASM=x86_64 - FIELD=64bit ENDOMORPHISM=yes ASM=x86_64 - - FIELD=32bit SCHNORR=yes - FIELD=32bit ENDOMORPHISM=yes - BIGNUM=no - - BIGNUM=no ENDOMORPHISM=yes SCHNORR=yes RECOVERY=yes + - BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes - BIGNUM=no STATICPRECOMPUTATION=no - BUILD=distcheck - EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC - EXTRAFLAGS=CFLAGS=-O0 + - BUILD=check-java ECDH=yes EXPERIMENTAL=yes matrix: fast_finish: true include: @@ -55,9 +59,11 @@ matrix: packages: - gcc-multilib - libgmp-dev:i386 +before_install: mkdir -p `dirname $GUAVA_JAR` +install: if [ ! -f $GUAVA_JAR ]; then wget $GUAVA_URL -O $GUAVA_JAR; fi before_script: ./autogen.sh script: - if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi - if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi - - ./configure --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-schnorr=$SCHNORR --enable-module-recovery=$RECOVERY $EXTRAFLAGS $USE_HOST && make -j2 $BUILD + - ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-recovery=$RECOVERY $EXTRAFLAGS $USE_HOST && make -j2 $BUILD os: linux diff --git a/Makefile.am b/Makefile.am index 7772a4e9d28..e5657f7f313 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,14 +1,22 @@ ACLOCAL_AMFLAGS = -I build-aux/m4 lib_LTLIBRARIES = libsecp256k1.la +if USE_JNI +JNI_LIB = libsecp256k1_jni.la +noinst_LTLIBRARIES = $(JNI_LIB) +else +JNI_LIB = +endif include_HEADERS = include/secp256k1.h noinst_HEADERS = noinst_HEADERS += src/scalar.h noinst_HEADERS += src/scalar_4x64.h noinst_HEADERS += src/scalar_8x32.h +noinst_HEADERS += src/scalar_low.h noinst_HEADERS += src/scalar_impl.h noinst_HEADERS += src/scalar_4x64_impl.h noinst_HEADERS += src/scalar_8x32_impl.h +noinst_HEADERS += src/scalar_low_impl.h noinst_HEADERS += src/group.h noinst_HEADERS += src/group_impl.h noinst_HEADERS += src/num_gmp.h @@ -32,6 +40,7 @@ noinst_HEADERS += src/field_5x52_impl.h noinst_HEADERS += src/field_5x52_int128_impl.h noinst_HEADERS += src/field_5x52_asm_impl.h noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h +noinst_HEADERS += src/java/org_bitcoin_Secp256k1Context.h noinst_HEADERS += src/util.h noinst_HEADERS += src/testrand.h noinst_HEADERS += src/testrand_impl.h @@ -45,33 +54,88 @@ noinst_HEADERS += contrib/lax_der_parsing.c noinst_HEADERS += contrib/lax_der_privatekey_parsing.h noinst_HEADERS += contrib/lax_der_privatekey_parsing.c +if USE_EXTERNAL_ASM +COMMON_LIB = libsecp256k1_common.la +noinst_LTLIBRARIES = $(COMMON_LIB) +else +COMMON_LIB = +endif + pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libsecp256k1.pc +if USE_EXTERNAL_ASM +if USE_ASM_ARM +libsecp256k1_common_la_SOURCES = src/asm/field_10x26_arm.s +endif +endif + libsecp256k1_la_SOURCES = src/secp256k1.c -libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) -libsecp256k1_la_LIBADD = $(SECP_LIBS) +libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES) +libsecp256k1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB) +libsecp256k1_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c +libsecp256k1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES) noinst_PROGRAMS = if USE_BENCHMARK noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_verify_SOURCES = src/bench_verify.c -bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) bench_sign_SOURCES = src/bench_sign.c -bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) bench_internal_SOURCES = src/bench_internal.c -bench_internal_LDADD = $(SECP_LIBS) -bench_internal_CPPFLAGS = $(SECP_INCLUDES) +bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB) +bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES) endif +TESTS = if USE_TESTS noinst_PROGRAMS += tests tests_SOURCES = src/tests.c -tests_CPPFLAGS = -DVERIFY -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) -tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) +tests_CPPFLAGS = -DSECP256K1_BUILD -DVERIFY -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) +tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) tests_LDFLAGS = -static -TESTS = tests +TESTS += tests +endif + +if USE_EXHAUSTIVE_TESTS +noinst_PROGRAMS += exhaustive_tests +exhaustive_tests_SOURCES = src/tests_exhaustive.c +exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -DVERIFY -I$(top_srcdir)/src $(SECP_INCLUDES) +exhaustive_tests_LDADD = $(SECP_LIBS) +exhaustive_tests_LDFLAGS = -static +TESTS += exhaustive_tests +endif + +JAVAROOT=src/java +JAVAORG=org/bitcoin +JAVA_GUAVA=$(srcdir)/$(JAVAROOT)/guava/guava-18.0.jar +CLASSPATH_ENV=CLASSPATH=$(JAVA_GUAVA) +JAVA_FILES= \ + $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1.java \ + $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Test.java \ + $(JAVAROOT)/$(JAVAORG)/NativeSecp256k1Util.java \ + $(JAVAROOT)/$(JAVAORG)/Secp256k1Context.java + +if USE_JNI + +$(JAVA_GUAVA): + @echo Guava is missing. Fetch it via: \ + wget https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar -O $(@) + @false + +.stamp-java: $(JAVA_FILES) + @echo Compiling $^ + $(AM_V_at)$(CLASSPATH_ENV) javac $^ + @touch $@ + +if USE_TESTS + +check-java: libsecp256k1.la $(JAVA_GUAVA) .stamp-java + $(AM_V_at)java -Djava.library.path="./:./src:./src/.libs:.libs/" -cp "$(JAVA_GUAVA):$(JAVAROOT)" $(JAVAORG)/NativeSecp256k1Test + +endif endif if USE_ECMULT_STATIC_PRECOMPUTATION @@ -93,19 +157,15 @@ $(bench_internal_OBJECTS): src/ecmult_static_context.h src/ecmult_static_context.h: $(gen_context_BIN) ./$(gen_context_BIN) -CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h +CLEANFILES = $(gen_context_BIN) src/ecmult_static_context.h $(JAVAROOT)/$(JAVAORG)/*.class .stamp-java endif -EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h +EXTRA_DIST = autogen.sh src/gen_context.c src/basic-config.h $(JAVA_FILES) if ENABLE_MODULE_ECDH include src/modules/ecdh/Makefile.am.include endif -if ENABLE_MODULE_SCHNORR -include src/modules/schnorr/Makefile.am.include -endif - if ENABLE_MODULE_RECOVERY include src/modules/recovery/Makefile.am.include endif diff --git a/README.md b/README.md index 6095db42205..8cd344ea812 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ libsecp256k1 ============ -[![Build Status](https://travis-ci.org/bitcoin/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin/secp256k1) +[![Build Status](https://travis-ci.org/bitcoin-core/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin-core/secp256k1) Optimized C library for EC operations on curve secp256k1. diff --git a/build-aux/m4/ax_jni_include_dir.m4 b/build-aux/m4/ax_jni_include_dir.m4 new file mode 100644 index 00000000000..1fc36276144 --- /dev/null +++ b/build-aux/m4/ax_jni_include_dir.m4 @@ -0,0 +1,140 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_JNI_INCLUDE_DIR +# +# DESCRIPTION +# +# AX_JNI_INCLUDE_DIR finds include directories needed for compiling +# programs using the JNI interface. +# +# JNI include directories are usually in the Java distribution. This is +# deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in +# that order. When this macro completes, a list of directories is left in +# the variable JNI_INCLUDE_DIRS. +# +# Example usage follows: +# +# AX_JNI_INCLUDE_DIR +# +# for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS +# do +# CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR" +# done +# +# If you want to force a specific compiler: +# +# - at the configure.in level, set JAVAC=yourcompiler before calling +# AX_JNI_INCLUDE_DIR +# +# - at the configure level, setenv JAVAC +# +# Note: This macro can work with the autoconf M4 macros for Java programs. +# This particular macro is not part of the original set of macros. +# +# LICENSE +# +# Copyright (c) 2008 Don Anderson +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 10 + +AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR]) +AC_DEFUN([AX_JNI_INCLUDE_DIR],[ + +JNI_INCLUDE_DIRS="" + +if test "x$JAVA_HOME" != x; then + _JTOPDIR="$JAVA_HOME" +else + if test "x$JAVAC" = x; then + JAVAC=javac + fi + AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no]) + if test "x$_ACJNI_JAVAC" = xno; then + AC_MSG_WARN([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME]) + fi + _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC") + _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'` +fi + +case "$host_os" in + darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` + _JINC="$_JTOPDIR/Headers";; + *) _JINC="$_JTOPDIR/include";; +esac +_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR]) +_AS_ECHO_LOG([_JINC=$_JINC]) + +# On Mac OS X 10.6.4, jni.h is a symlink: +# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h +# -> ../../CurrentJDK/Headers/jni.h. + +AC_CACHE_CHECK(jni headers, ac_cv_jni_header_path, +[ +if test -f "$_JINC/jni.h"; then + ac_cv_jni_header_path="$_JINC" + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $ac_cv_jni_header_path" +else + _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'` + if test -f "$_JTOPDIR/include/jni.h"; then + ac_cv_jni_header_path="$_JTOPDIR/include" + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $ac_cv_jni_header_path" + else + ac_cv_jni_header_path=none + fi +fi +]) + + + +# get the likely subdirectories for system specific java includes +case "$host_os" in +bsdi*) _JNI_INC_SUBDIRS="bsdos";; +darwin*) _JNI_INC_SUBDIRS="darwin";; +freebsd*) _JNI_INC_SUBDIRS="freebsd";; +linux*) _JNI_INC_SUBDIRS="linux genunix";; +osf*) _JNI_INC_SUBDIRS="alpha";; +solaris*) _JNI_INC_SUBDIRS="solaris";; +mingw*) _JNI_INC_SUBDIRS="win32";; +cygwin*) _JNI_INC_SUBDIRS="win32";; +*) _JNI_INC_SUBDIRS="genunix";; +esac + +if test "x$ac_cv_jni_header_path" != "xnone"; then + # add any subdirectories that are present + for JINCSUBDIR in $_JNI_INC_SUBDIRS + do + if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then + JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR" + fi + done +fi +]) + +# _ACJNI_FOLLOW_SYMLINKS +# Follows symbolic links on , +# finally setting variable _ACJNI_FOLLOWED +# ---------------------------------------- +AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[ +# find the include directory relative to the javac executable +_cur="$1" +while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do + AC_MSG_CHECKING([symlink for $_cur]) + _slink=`ls -ld "$_cur" | sed 's/.* -> //'` + case "$_slink" in + /*) _cur="$_slink";; + # 'X' avoids triggering unwanted echo options. + *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";; + esac + AC_MSG_RESULT([$_cur]) +done +_ACJNI_FOLLOWED="$_cur" +])# _ACJNI diff --git a/build-aux/m4/bitcoin_secp.m4 b/build-aux/m4/bitcoin_secp.m4 index d41bbb64870..b74acb8c138 100644 --- a/build-aux/m4/bitcoin_secp.m4 +++ b/build-aux/m4/bitcoin_secp.m4 @@ -3,13 +3,13 @@ AC_DEFUN([SECP_INT128_CHECK],[ has_int128=$ac_cv_type___int128 ]) -dnl +dnl escape "$0x" below using the m4 quadrigaph @S|@, and escape it again with a \ for the shell. AC_DEFUN([SECP_64BIT_ASM_CHECK],[ AC_MSG_CHECKING(for x86_64 assembly availability) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]],[[ uint64_t a = 11, tmp; - __asm__ __volatile__("movq $0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx"); + __asm__ __volatile__("movq \@S|@0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx"); ]])],[has_64bit_asm=yes],[has_64bit_asm=no]) AC_MSG_RESULT([$has_64bit_asm]) ]) @@ -46,6 +46,10 @@ if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then ECDSA_sign(0, NULL, 0, NULL, NULL, eckey); ECDSA_verify(0, NULL, 0, NULL, 0, eckey); EC_KEY_free(eckey); + ECDSA_SIG *sig_openssl; + sig_openssl = ECDSA_SIG_new(); + (void)sig_openssl->r; + ECDSA_SIG_free(sig_openssl); ]])],[has_openssl_ec=yes],[has_openssl_ec=no]) AC_MSG_RESULT([$has_openssl_ec]) fi diff --git a/configure.ac b/configure.ac index 786d8dcfb99..ec50ffe3a25 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,7 @@ AC_PROG_CC_C89 if test x"$ac_cv_prog_cc_c89" = x"no"; then AC_MSG_ERROR([c89 compiler support required]) fi +AM_PROG_AS case $host_os in *darwin*) @@ -93,31 +94,46 @@ AC_ARG_ENABLE(tests, [use_tests=$enableval], [use_tests=yes]) +AC_ARG_ENABLE(openssl_tests, + AS_HELP_STRING([--enable-openssl-tests],[enable OpenSSL tests, if OpenSSL is available (default is auto)]), + [enable_openssl_tests=$enableval], + [enable_openssl_tests=auto]) + +AC_ARG_ENABLE(experimental, + AS_HELP_STRING([--enable-experimental],[allow experimental configure options (default is no)]), + [use_experimental=$enableval], + [use_experimental=no]) + +AC_ARG_ENABLE(exhaustive_tests, + AS_HELP_STRING([--enable-exhaustive-tests],[compile exhaustive tests (default is yes)]), + [use_exhaustive_tests=$enableval], + [use_exhaustive_tests=yes]) + AC_ARG_ENABLE(endomorphism, AS_HELP_STRING([--enable-endomorphism],[enable endomorphism (default is no)]), [use_endomorphism=$enableval], [use_endomorphism=no]) - + AC_ARG_ENABLE(ecmult_static_precomputation, AS_HELP_STRING([--enable-ecmult-static-precomputation],[enable precomputed ecmult table for signing (default is yes)]), [use_ecmult_static_precomputation=$enableval], - [use_ecmult_static_precomputation=yes]) + [use_ecmult_static_precomputation=auto]) AC_ARG_ENABLE(module_ecdh, - AS_HELP_STRING([--enable-module-ecdh],[enable ECDH shared secret computation (default is no)]), + AS_HELP_STRING([--enable-module-ecdh],[enable ECDH shared secret computation (experimental)]), [enable_module_ecdh=$enableval], [enable_module_ecdh=no]) -AC_ARG_ENABLE(module_schnorr, - AS_HELP_STRING([--enable-module-schnorr],[enable Schnorr signature module (default is no)]), - [enable_module_schnorr=$enableval], - [enable_module_schnorr=no]) - AC_ARG_ENABLE(module_recovery, AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module (default is no)]), [enable_module_recovery=$enableval], [enable_module_recovery=no]) +AC_ARG_ENABLE(jni, + AS_HELP_STRING([--enable-jni],[enable libsecp256k1_jni (default is auto)]), + [use_jni=$enableval], + [use_jni=auto]) + AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=64bit|32bit|auto], [Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto]) @@ -127,8 +143,8 @@ AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto], AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto], [Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto]) -AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|no|auto] -[Specify assembly optimizations to use. Default is auto])],[req_asm=$withval], [req_asm=auto]) +AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm|no|auto] +[Specify assembly optimizations to use. Default is auto (experimental: arm)])],[req_asm=$withval], [req_asm=auto]) AC_CHECK_TYPES([__int128]) @@ -138,6 +154,34 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_expect(0,0);}]])], [ AC_MSG_RESULT([no]) ]) +if test x"$use_ecmult_static_precomputation" != x"no"; then + save_cross_compiling=$cross_compiling + cross_compiling=no + TEMP_CC="$CC" + CC="$CC_FOR_BUILD" + AC_MSG_CHECKING([native compiler: ${CC_FOR_BUILD}]) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([], [return 0])], + [working_native_cc=yes], + [working_native_cc=no],[dnl]) + CC="$TEMP_CC" + cross_compiling=$save_cross_compiling + + if test x"$working_native_cc" = x"no"; then + set_precomp=no + if test x"$use_ecmult_static_precomputation" = x"yes"; then + AC_MSG_ERROR([${CC_FOR_BUILD} does not produce working binaries. Please set CC_FOR_BUILD]) + else + AC_MSG_RESULT([${CC_FOR_BUILD} does not produce working binaries. Please set CC_FOR_BUILD]) + fi + else + AC_MSG_RESULT([ok]) + set_precomp=yes + fi +else + set_precomp=no +fi + if test x"$req_asm" = x"auto"; then SECP_64BIT_ASM_CHECK if test x"$has_64bit_asm" = x"yes"; then @@ -155,6 +199,8 @@ else AC_MSG_ERROR([x86_64 assembly optimization requested but not available]) fi ;; + arm) + ;; no) ;; *) @@ -247,10 +293,15 @@ else fi # select assembly optimization +use_external_asm=no + case $set_asm in x86_64) AC_DEFINE(USE_ASM_X86_64, 1, [Define this symbol to enable x86_64 assembly optimizations]) ;; +arm) + use_external_asm=yes + ;; no) ;; *) @@ -305,16 +356,48 @@ esac if test x"$use_tests" = x"yes"; then SECP_OPENSSL_CHECK if test x"$has_openssl_ec" = x"yes"; then - AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) - SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" - SECP_TEST_LIBS="$CRYPTO_LIBS" - - case $host in - *mingw*) - SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32" - ;; - esac + if test x"$enable_openssl_tests" != x"no"; then + AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) + SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" + SECP_TEST_LIBS="$CRYPTO_LIBS" + + case $host in + *mingw*) + SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32" + ;; + esac + fi + else + if test x"$enable_openssl_tests" = x"yes"; then + AC_MSG_ERROR([OpenSSL tests requested but OpenSSL with EC support is not available]) + fi + fi +else + if test x"$enable_openssl_tests" = x"yes"; then + AC_MSG_ERROR([OpenSSL tests requested but tests are not enabled]) + fi +fi +if test x"$use_jni" != x"no"; then + AX_JNI_INCLUDE_DIR + have_jni_dependencies=yes + if test x"$enable_module_ecdh" = x"no"; then + have_jni_dependencies=no + fi + if test "x$JNI_INCLUDE_DIRS" = "x"; then + have_jni_dependencies=no + fi + if test "x$have_jni_dependencies" = "xno"; then + if test x"$use_jni" = x"yes"; then + AC_MSG_ERROR([jni support explicitly requested but headers/dependencies were not found. Enable ECDH and try again.]) + fi + AC_MSG_WARN([jni headers/dependencies not found. jni support disabled]) + use_jni=no + else + use_jni=yes + for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS; do + JNI_INCLUDES="$JNI_INCLUDES -I$JNI_INCLUDE_DIR" + done fi fi @@ -327,7 +410,7 @@ if test x"$use_endomorphism" = x"yes"; then AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization]) fi -if test x"$use_ecmult_static_precomputation" = x"yes"; then +if test x"$set_precomp" = x"yes"; then AC_DEFINE(USE_ECMULT_STATIC_PRECOMPUTATION, 1, [Define this symbol to use a statically generated ecmult table]) fi @@ -335,38 +418,57 @@ if test x"$enable_module_ecdh" = x"yes"; then AC_DEFINE(ENABLE_MODULE_ECDH, 1, [Define this symbol to enable the ECDH module]) fi -if test x"$enable_module_schnorr" = x"yes"; then - AC_DEFINE(ENABLE_MODULE_SCHNORR, 1, [Define this symbol to enable the Schnorr signature module]) -fi - if test x"$enable_module_recovery" = x"yes"; then AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module]) fi AC_C_BIGENDIAN() +if test x"$use_external_asm" = x"yes"; then + AC_DEFINE(USE_EXTERNAL_ASM, 1, [Define this symbol if an external (non-inline) assembly implementation is used]) +fi + +AC_MSG_NOTICE([Using static precomputation: $set_precomp]) AC_MSG_NOTICE([Using assembly optimizations: $set_asm]) AC_MSG_NOTICE([Using field implementation: $set_field]) AC_MSG_NOTICE([Using bignum implementation: $set_bignum]) AC_MSG_NOTICE([Using scalar implementation: $set_scalar]) AC_MSG_NOTICE([Using endomorphism optimizations: $use_endomorphism]) AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh]) - -AC_MSG_NOTICE([Building Schnorr signatures module: $enable_module_schnorr]) AC_MSG_NOTICE([Building ECDSA pubkey recovery module: $enable_module_recovery]) +AC_MSG_NOTICE([Using jni: $use_jni]) + +if test x"$enable_experimental" = x"yes"; then + AC_MSG_NOTICE([******]) + AC_MSG_NOTICE([WARNING: experimental build]) + AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.]) + AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh]) + AC_MSG_NOTICE([******]) +else + if test x"$enable_module_ecdh" = x"yes"; then + AC_MSG_ERROR([ECDH module is experimental. Use --enable-experimental to allow.]) + fi + if test x"$set_asm" = x"arm"; then + AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.]) + fi +fi AC_CONFIG_HEADERS([src/libsecp256k1-config.h]) AC_CONFIG_FILES([Makefile libsecp256k1.pc]) +AC_SUBST(JNI_INCLUDES) AC_SUBST(SECP_INCLUDES) AC_SUBST(SECP_LIBS) AC_SUBST(SECP_TEST_LIBS) AC_SUBST(SECP_TEST_INCLUDES) AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"]) +AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$use_exhaustive_tests" != x"no"]) AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"]) -AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$use_ecmult_static_precomputation" = x"yes"]) +AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"]) AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"]) -AM_CONDITIONAL([ENABLE_MODULE_SCHNORR], [test x"$enable_module_schnorr" = x"yes"]) AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"]) +AM_CONDITIONAL([USE_JNI], [test x"$use_jni" == x"yes"]) +AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"]) +AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"]) dnl make sure nothing new is exported so that we don't break the cache PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH" diff --git a/include/secp256k1.h b/include/secp256k1.h index 7145dbcc54a..f268e309d0b 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -47,11 +47,8 @@ typedef struct secp256k1_context_struct secp256k1_context; * The exact representation of data inside is implementation defined and not * guaranteed to be portable between different platforms or versions. It is * however guaranteed to be 64 bytes in size, and can be safely copied/moved. - * If you need to convert to a format suitable for storage or transmission, use - * secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. - * - * Furthermore, it is guaranteed that identical public keys (ignoring - * compression) will have identical representation, so they can be memcmp'ed. + * If you need to convert to a format suitable for storage, transmission, or + * comparison, use secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. */ typedef struct { unsigned char data[64]; @@ -62,12 +59,9 @@ typedef struct { * The exact representation of data inside is implementation defined and not * guaranteed to be portable between different platforms or versions. It is * however guaranteed to be 64 bytes in size, and can be safely copied/moved. - * If you need to convert to a format suitable for storage or transmission, use - * the secp256k1_ecdsa_signature_serialize_* and + * If you need to convert to a format suitable for storage, transmission, or + * comparison, use the secp256k1_ecdsa_signature_serialize_* and * secp256k1_ecdsa_signature_serialize_* functions. - * - * Furthermore, it is guaranteed to identical signatures will have identical - * representation, so they can be memcmp'ed. */ typedef struct { unsigned char data[64]; diff --git a/include/secp256k1_schnorr.h b/include/secp256k1_schnorr.h deleted file mode 100644 index dc32fec1eac..00000000000 --- a/include/secp256k1_schnorr.h +++ /dev/null @@ -1,173 +0,0 @@ -#ifndef _SECP256K1_SCHNORR_ -# define _SECP256K1_SCHNORR_ - -# include "secp256k1.h" - -# ifdef __cplusplus -extern "C" { -# endif - -/** Create a signature using a custom EC-Schnorr-SHA256 construction. It - * produces non-malleable 64-byte signatures which support public key recovery - * batch validation, and multiparty signing. - * Returns: 1: signature created - * 0: the nonce generation function failed, or the private key was - * invalid. - * Args: ctx: pointer to a context object, initialized for signing - * (cannot be NULL) - * Out: sig64: pointer to a 64-byte array where the signature will be - * placed (cannot be NULL) - * In: msg32: the 32-byte message hash being signed (cannot be NULL) - * seckey: pointer to a 32-byte secret key (cannot be NULL) - * noncefp:pointer to a nonce generation function. If NULL, - * secp256k1_nonce_function_default is used - * ndata: pointer to arbitrary data used by the nonce generation - * function (can be NULL) - */ -SECP256K1_API int secp256k1_schnorr_sign( - const secp256k1_context* ctx, - unsigned char *sig64, - const unsigned char *msg32, - const unsigned char *seckey, - secp256k1_nonce_function noncefp, - const void *ndata -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); - -/** Verify a signature created by secp256k1_schnorr_sign. - * Returns: 1: correct signature - * 0: incorrect signature - * Args: ctx: a secp256k1 context object, initialized for verification. - * In: sig64: the 64-byte signature being verified (cannot be NULL) - * msg32: the 32-byte message hash being verified (cannot be NULL) - * pubkey: the public key to verify with (cannot be NULL) - */ -SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_verify( - const secp256k1_context* ctx, - const unsigned char *sig64, - const unsigned char *msg32, - const secp256k1_pubkey *pubkey -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); - -/** Recover an EC public key from a Schnorr signature created using - * secp256k1_schnorr_sign. - * Returns: 1: public key successfully recovered (which guarantees a correct - * signature). - * 0: otherwise. - * Args: ctx: pointer to a context object, initialized for - * verification (cannot be NULL) - * Out: pubkey: pointer to a pubkey to set to the recovered public key - * (cannot be NULL). - * In: sig64: signature as 64 byte array (cannot be NULL) - * msg32: the 32-byte message hash assumed to be signed (cannot - * be NULL) - */ -SECP256K1_API int secp256k1_schnorr_recover( - const secp256k1_context* ctx, - secp256k1_pubkey *pubkey, - const unsigned char *sig64, - const unsigned char *msg32 -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); - -/** Generate a nonce pair deterministically for use with - * secp256k1_schnorr_partial_sign. - * Returns: 1: valid nonce pair was generated. - * 0: otherwise (nonce generation function failed) - * Args: ctx: pointer to a context object, initialized for signing - * (cannot be NULL) - * Out: pubnonce: public side of the nonce (cannot be NULL) - * privnonce32: private side of the nonce (32 byte) (cannot be NULL) - * In: msg32: the 32-byte message hash assumed to be signed (cannot - * be NULL) - * sec32: the 32-byte private key (cannot be NULL) - * noncefp: pointer to a nonce generation function. If NULL, - * secp256k1_nonce_function_default is used - * noncedata: pointer to arbitrary data used by the nonce generation - * function (can be NULL) - * - * Do not use the output as a private/public key pair for signing/validation. - */ -SECP256K1_API int secp256k1_schnorr_generate_nonce_pair( - const secp256k1_context* ctx, - secp256k1_pubkey *pubnonce, - unsigned char *privnonce32, - const unsigned char *msg32, - const unsigned char *sec32, - secp256k1_nonce_function noncefp, - const void* noncedata -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); - -/** Produce a partial Schnorr signature, which can be combined using - * secp256k1_schnorr_partial_combine, to end up with a full signature that is - * verifiable using secp256k1_schnorr_verify. - * Returns: 1: signature created successfully. - * 0: no valid signature exists with this combination of keys, nonces - * and message (chance around 1 in 2^128) - * -1: invalid private key, nonce, or public nonces. - * Args: ctx: pointer to context object, initialized for signing (cannot - * be NULL) - * Out: sig64: pointer to 64-byte array to put partial signature in - * In: msg32: pointer to 32-byte message to sign - * sec32: pointer to 32-byte private key - * pubnonce_others: pointer to pubkey containing the sum of the other's - * nonces (see secp256k1_ec_pubkey_combine) - * secnonce32: pointer to 32-byte array containing our nonce - * - * The intended procedure for creating a multiparty signature is: - * - Each signer S[i] with private key x[i] and public key Q[i] runs - * secp256k1_schnorr_generate_nonce_pair to produce a pair (k[i],R[i]) of - * private/public nonces. - * - All signers communicate their public nonces to each other (revealing your - * private nonce can lead to discovery of your private key, so it should be - * considered secret). - * - All signers combine all the public nonces they received (excluding their - * own) using secp256k1_ec_pubkey_combine to obtain an - * Rall[i] = sum(R[0..i-1,i+1..n]). - * - All signers produce a partial signature using - * secp256k1_schnorr_partial_sign, passing in their own private key x[i], - * their own private nonce k[i], and the sum of the others' public nonces - * Rall[i]. - * - All signers communicate their partial signatures to each other. - * - Someone combines all partial signatures using - * secp256k1_schnorr_partial_combine, to obtain a full signature. - * - The resulting signature is validatable using secp256k1_schnorr_verify, with - * public key equal to the result of secp256k1_ec_pubkey_combine of the - * signers' public keys (sum(Q[0..n])). - * - * Note that secp256k1_schnorr_partial_combine and secp256k1_ec_pubkey_combine - * function take their arguments in any order, and it is possible to - * pre-combine several inputs already with one call, and add more inputs later - * by calling the function again (they are commutative and associative). - */ -SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_sign( - const secp256k1_context* ctx, - unsigned char *sig64, - const unsigned char *msg32, - const unsigned char *sec32, - const secp256k1_pubkey *pubnonce_others, - const unsigned char *secnonce32 -) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6); - -/** Combine multiple Schnorr partial signatures. - * Returns: 1: the passed signatures were successfully combined. - * 0: the resulting signature is not valid (chance of 1 in 2^256) - * -1: some inputs were invalid, or the signatures were not created - * using the same set of nonces - * Args: ctx: pointer to a context object - * Out: sig64: pointer to a 64-byte array to place the combined signature - * (cannot be NULL) - * In: sig64sin: pointer to an array of n pointers to 64-byte input - * signatures - * n: the number of signatures to combine (at least 1) - */ -SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_combine( - const secp256k1_context* ctx, - unsigned char *sig64, - const unsigned char * const * sig64sin, - size_t n -) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3); - -# ifdef __cplusplus -} -# endif - -#endif diff --git a/libsecp256k1.pc.in b/libsecp256k1.pc.in index 1c72dd00037..a0d006f1131 100644 --- a/libsecp256k1.pc.in +++ b/libsecp256k1.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: libsecp256k1 Description: Optimized C library for EC operations on curve secp256k1 -URL: https://github.com/bitcoin/secp256k1 +URL: https://github.com/bitcoin-core/secp256k1 Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs.private: @SECP_LIBS@ diff --git a/sage/group_prover.sage b/sage/group_prover.sage new file mode 100644 index 00000000000..ab580c5b23b --- /dev/null +++ b/sage/group_prover.sage @@ -0,0 +1,322 @@ +# This code supports verifying group implementations which have branches +# or conditional statements (like cmovs), by allowing each execution path +# to independently set assumptions on input or intermediary variables. +# +# The general approach is: +# * A constraint is a tuple of two sets of of symbolic expressions: +# the first of which are required to evaluate to zero, the second of which +# are required to evaluate to nonzero. +# - A constraint is said to be conflicting if any of its nonzero expressions +# is in the ideal with basis the zero expressions (in other words: when the +# zero expressions imply that one of the nonzero expressions are zero). +# * There is a list of laws that describe the intended behaviour, including +# laws for addition and doubling. Each law is called with the symbolic point +# coordinates as arguments, and returns: +# - A constraint describing the assumptions under which it is applicable, +# called "assumeLaw" +# - A constraint describing the requirements of the law, called "require" +# * Implementations are transliterated into functions that operate as well on +# algebraic input points, and are called once per combination of branches +# exectured. Each execution returns: +# - A constraint describing the assumptions this implementation requires +# (such as Z1=1), called "assumeFormula" +# - A constraint describing the assumptions this specific branch requires, +# but which is by construction guaranteed to cover the entire space by +# merging the results from all branches, called "assumeBranch" +# - The result of the computation +# * All combinations of laws with implementation branches are tried, and: +# - If the combination of assumeLaw, assumeFormula, and assumeBranch results +# in a conflict, it means this law does not apply to this branch, and it is +# skipped. +# - For others, we try to prove the require constraints hold, assuming the +# information in assumeLaw + assumeFormula + assumeBranch, and if this does +# not succeed, we fail. +# + To prove an expression is zero, we check whether it belongs to the +# ideal with the assumed zero expressions as basis. This test is exact. +# + To prove an expression is nonzero, we check whether each of its +# factors is contained in the set of nonzero assumptions' factors. +# This test is not exact, so various combinations of original and +# reduced expressions' factors are tried. +# - If we succeed, we print out the assumptions from assumeFormula that +# weren't implied by assumeLaw already. Those from assumeBranch are skipped, +# as we assume that all constraints in it are complementary with each other. +# +# Based on the sage verification scripts used in the Explicit-Formulas Database +# by Tanja Lange and others, see http://hyperelliptic.org/EFD + +class fastfrac: + """Fractions over rings.""" + + def __init__(self,R,top,bot=1): + """Construct a fractional, given a ring, a numerator, and denominator.""" + self.R = R + if parent(top) == ZZ or parent(top) == R: + self.top = R(top) + self.bot = R(bot) + elif top.__class__ == fastfrac: + self.top = top.top + self.bot = top.bot * bot + else: + self.top = R(numerator(top)) + self.bot = R(denominator(top)) * bot + + def iszero(self,I): + """Return whether this fraction is zero given an ideal.""" + return self.top in I and self.bot not in I + + def reduce(self,assumeZero): + zero = self.R.ideal(map(numerator, assumeZero)) + return fastfrac(self.R, zero.reduce(self.top)) / fastfrac(self.R, zero.reduce(self.bot)) + + def __add__(self,other): + """Add two fractions.""" + if parent(other) == ZZ: + return fastfrac(self.R,self.top + self.bot * other,self.bot) + if other.__class__ == fastfrac: + return fastfrac(self.R,self.top * other.bot + self.bot * other.top,self.bot * other.bot) + return NotImplemented + + def __sub__(self,other): + """Subtract two fractions.""" + if parent(other) == ZZ: + return fastfrac(self.R,self.top - self.bot * other,self.bot) + if other.__class__ == fastfrac: + return fastfrac(self.R,self.top * other.bot - self.bot * other.top,self.bot * other.bot) + return NotImplemented + + def __neg__(self): + """Return the negation of a fraction.""" + return fastfrac(self.R,-self.top,self.bot) + + def __mul__(self,other): + """Multiply two fractions.""" + if parent(other) == ZZ: + return fastfrac(self.R,self.top * other,self.bot) + if other.__class__ == fastfrac: + return fastfrac(self.R,self.top * other.top,self.bot * other.bot) + return NotImplemented + + def __rmul__(self,other): + """Multiply something else with a fraction.""" + return self.__mul__(other) + + def __div__(self,other): + """Divide two fractions.""" + if parent(other) == ZZ: + return fastfrac(self.R,self.top,self.bot * other) + if other.__class__ == fastfrac: + return fastfrac(self.R,self.top * other.bot,self.bot * other.top) + return NotImplemented + + def __pow__(self,other): + """Compute a power of a fraction.""" + if parent(other) == ZZ: + if other < 0: + # Negative powers require flipping top and bottom + return fastfrac(self.R,self.bot ^ (-other),self.top ^ (-other)) + else: + return fastfrac(self.R,self.top ^ other,self.bot ^ other) + return NotImplemented + + def __str__(self): + return "fastfrac((" + str(self.top) + ") / (" + str(self.bot) + "))" + def __repr__(self): + return "%s" % self + + def numerator(self): + return self.top + +class constraints: + """A set of constraints, consisting of zero and nonzero expressions. + + Constraints can either be used to express knowledge or a requirement. + + Both the fields zero and nonzero are maps from expressions to description + strings. The expressions that are the keys in zero are required to be zero, + and the expressions that are the keys in nonzero are required to be nonzero. + + Note that (a != 0) and (b != 0) is the same as (a*b != 0), so all keys in + nonzero could be multiplied into a single key. This is often much less + efficient to work with though, so we keep them separate inside the + constraints. This allows higher-level code to do fast checks on the individual + nonzero elements, or combine them if needed for stronger checks. + + We can't multiply the different zero elements, as it would suffice for one of + the factors to be zero, instead of all of them. Instead, the zero elements are + typically combined into an ideal first. + """ + + def __init__(self, **kwargs): + if 'zero' in kwargs: + self.zero = dict(kwargs['zero']) + else: + self.zero = dict() + if 'nonzero' in kwargs: + self.nonzero = dict(kwargs['nonzero']) + else: + self.nonzero = dict() + + def negate(self): + return constraints(zero=self.nonzero, nonzero=self.zero) + + def __add__(self, other): + zero = self.zero.copy() + zero.update(other.zero) + nonzero = self.nonzero.copy() + nonzero.update(other.nonzero) + return constraints(zero=zero, nonzero=nonzero) + + def __str__(self): + return "constraints(zero=%s,nonzero=%s)" % (self.zero, self.nonzero) + + def __repr__(self): + return "%s" % self + + +def conflicts(R, con): + """Check whether any of the passed non-zero assumptions is implied by the zero assumptions""" + zero = R.ideal(map(numerator, con.zero)) + if 1 in zero: + return True + # First a cheap check whether any of the individual nonzero terms conflict on + # their own. + for nonzero in con.nonzero: + if nonzero.iszero(zero): + return True + # It can be the case that entries in the nonzero set do not individually + # conflict with the zero set, but their combination does. For example, knowing + # that either x or y is zero is equivalent to having x*y in the zero set. + # Having x or y individually in the nonzero set is not a conflict, but both + # simultaneously is, so that is the right thing to check for. + if reduce(lambda a,b: a * b, con.nonzero, fastfrac(R, 1)).iszero(zero): + return True + return False + + +def get_nonzero_set(R, assume): + """Calculate a simple set of nonzero expressions""" + zero = R.ideal(map(numerator, assume.zero)) + nonzero = set() + for nz in map(numerator, assume.nonzero): + for (f,n) in nz.factor(): + nonzero.add(f) + rnz = zero.reduce(nz) + for (f,n) in rnz.factor(): + nonzero.add(f) + return nonzero + + +def prove_nonzero(R, exprs, assume): + """Check whether an expression is provably nonzero, given assumptions""" + zero = R.ideal(map(numerator, assume.zero)) + nonzero = get_nonzero_set(R, assume) + expl = set() + ok = True + for expr in exprs: + if numerator(expr) in zero: + return (False, [exprs[expr]]) + allexprs = reduce(lambda a,b: numerator(a)*numerator(b), exprs, 1) + for (f, n) in allexprs.factor(): + if f not in nonzero: + ok = False + if ok: + return (True, None) + ok = True + for (f, n) in zero.reduce(numerator(allexprs)).factor(): + if f not in nonzero: + ok = False + if ok: + return (True, None) + ok = True + for expr in exprs: + for (f,n) in numerator(expr).factor(): + if f not in nonzero: + ok = False + if ok: + return (True, None) + ok = True + for expr in exprs: + for (f,n) in zero.reduce(numerator(expr)).factor(): + if f not in nonzero: + expl.add(exprs[expr]) + if expl: + return (False, list(expl)) + else: + return (True, None) + + +def prove_zero(R, exprs, assume): + """Check whether all of the passed expressions are provably zero, given assumptions""" + r, e = prove_nonzero(R, dict(map(lambda x: (fastfrac(R, x.bot, 1), exprs[x]), exprs)), assume) + if not r: + return (False, map(lambda x: "Possibly zero denominator: %s" % x, e)) + zero = R.ideal(map(numerator, assume.zero)) + nonzero = prod(x for x in assume.nonzero) + expl = [] + for expr in exprs: + if not expr.iszero(zero): + expl.append(exprs[expr]) + if not expl: + return (True, None) + return (False, expl) + + +def describe_extra(R, assume, assumeExtra): + """Describe what assumptions are added, given existing assumptions""" + zerox = assume.zero.copy() + zerox.update(assumeExtra.zero) + zero = R.ideal(map(numerator, assume.zero)) + zeroextra = R.ideal(map(numerator, zerox)) + nonzero = get_nonzero_set(R, assume) + ret = set() + # Iterate over the extra zero expressions + for base in assumeExtra.zero: + if base not in zero: + add = [] + for (f, n) in numerator(base).factor(): + if f not in nonzero: + add += ["%s" % f] + if add: + ret.add((" * ".join(add)) + " = 0 [%s]" % assumeExtra.zero[base]) + # Iterate over the extra nonzero expressions + for nz in assumeExtra.nonzero: + nzr = zeroextra.reduce(numerator(nz)) + if nzr not in zeroextra: + for (f,n) in nzr.factor(): + if zeroextra.reduce(f) not in nonzero: + ret.add("%s != 0" % zeroextra.reduce(f)) + return ", ".join(x for x in ret) + + +def check_symbolic(R, assumeLaw, assumeAssert, assumeBranch, require): + """Check a set of zero and nonzero requirements, given a set of zero and nonzero assumptions""" + assume = assumeLaw + assumeAssert + assumeBranch + + if conflicts(R, assume): + # This formula does not apply + return None + + describe = describe_extra(R, assumeLaw + assumeBranch, assumeAssert) + + ok, msg = prove_zero(R, require.zero, assume) + if not ok: + return "FAIL, %s fails (assuming %s)" % (str(msg), describe) + + res, expl = prove_nonzero(R, require.nonzero, assume) + if not res: + return "FAIL, %s fails (assuming %s)" % (str(expl), describe) + + if describe != "": + return "OK (assuming %s)" % describe + else: + return "OK" + + +def concrete_verify(c): + for k in c.zero: + if k != 0: + return (False, c.zero[k]) + for k in c.nonzero: + if k == 0: + return (False, c.nonzero[k]) + return (True, None) diff --git a/sage/secp256k1.sage b/sage/secp256k1.sage new file mode 100644 index 00000000000..a97e732f7fa --- /dev/null +++ b/sage/secp256k1.sage @@ -0,0 +1,306 @@ +# Test libsecp256k1' group operation implementations using prover.sage + +import sys + +load("group_prover.sage") +load("weierstrass_prover.sage") + +def formula_secp256k1_gej_double_var(a): + """libsecp256k1's secp256k1_gej_double_var, used by various addition functions""" + rz = a.Z * a.Y + rz = rz * 2 + t1 = a.X^2 + t1 = t1 * 3 + t2 = t1^2 + t3 = a.Y^2 + t3 = t3 * 2 + t4 = t3^2 + t4 = t4 * 2 + t3 = t3 * a.X + rx = t3 + rx = rx * 4 + rx = -rx + rx = rx + t2 + t2 = -t2 + t3 = t3 * 6 + t3 = t3 + t2 + ry = t1 * t3 + t2 = -t4 + ry = ry + t2 + return jacobianpoint(rx, ry, rz) + +def formula_secp256k1_gej_add_var(branch, a, b): + """libsecp256k1's secp256k1_gej_add_var""" + if branch == 0: + return (constraints(), constraints(nonzero={a.Infinity : 'a_infinite'}), b) + if branch == 1: + return (constraints(), constraints(zero={a.Infinity : 'a_finite'}, nonzero={b.Infinity : 'b_infinite'}), a) + z22 = b.Z^2 + z12 = a.Z^2 + u1 = a.X * z22 + u2 = b.X * z12 + s1 = a.Y * z22 + s1 = s1 * b.Z + s2 = b.Y * z12 + s2 = s2 * a.Z + h = -u1 + h = h + u2 + i = -s1 + i = i + s2 + if branch == 2: + r = formula_secp256k1_gej_double_var(a) + return (constraints(), constraints(zero={h : 'h=0', i : 'i=0', a.Infinity : 'a_finite', b.Infinity : 'b_finite'}), r) + if branch == 3: + return (constraints(), constraints(zero={h : 'h=0', a.Infinity : 'a_finite', b.Infinity : 'b_finite'}, nonzero={i : 'i!=0'}), point_at_infinity()) + i2 = i^2 + h2 = h^2 + h3 = h2 * h + h = h * b.Z + rz = a.Z * h + t = u1 * h2 + rx = t + rx = rx * 2 + rx = rx + h3 + rx = -rx + rx = rx + i2 + ry = -rx + ry = ry + t + ry = ry * i + h3 = h3 * s1 + h3 = -h3 + ry = ry + h3 + return (constraints(), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite'}, nonzero={h : 'h!=0'}), jacobianpoint(rx, ry, rz)) + +def formula_secp256k1_gej_add_ge_var(branch, a, b): + """libsecp256k1's secp256k1_gej_add_ge_var, which assume bz==1""" + if branch == 0: + return (constraints(zero={b.Z - 1 : 'b.z=1'}), constraints(nonzero={a.Infinity : 'a_infinite'}), b) + if branch == 1: + return (constraints(zero={b.Z - 1 : 'b.z=1'}), constraints(zero={a.Infinity : 'a_finite'}, nonzero={b.Infinity : 'b_infinite'}), a) + z12 = a.Z^2 + u1 = a.X + u2 = b.X * z12 + s1 = a.Y + s2 = b.Y * z12 + s2 = s2 * a.Z + h = -u1 + h = h + u2 + i = -s1 + i = i + s2 + if (branch == 2): + r = formula_secp256k1_gej_double_var(a) + return (constraints(zero={b.Z - 1 : 'b.z=1'}), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite', h : 'h=0', i : 'i=0'}), r) + if (branch == 3): + return (constraints(zero={b.Z - 1 : 'b.z=1'}), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite', h : 'h=0'}, nonzero={i : 'i!=0'}), point_at_infinity()) + i2 = i^2 + h2 = h^2 + h3 = h * h2 + rz = a.Z * h + t = u1 * h2 + rx = t + rx = rx * 2 + rx = rx + h3 + rx = -rx + rx = rx + i2 + ry = -rx + ry = ry + t + ry = ry * i + h3 = h3 * s1 + h3 = -h3 + ry = ry + h3 + return (constraints(zero={b.Z - 1 : 'b.z=1'}), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite'}, nonzero={h : 'h!=0'}), jacobianpoint(rx, ry, rz)) + +def formula_secp256k1_gej_add_zinv_var(branch, a, b): + """libsecp256k1's secp256k1_gej_add_zinv_var""" + bzinv = b.Z^(-1) + if branch == 0: + return (constraints(), constraints(nonzero={b.Infinity : 'b_infinite'}), a) + if branch == 1: + bzinv2 = bzinv^2 + bzinv3 = bzinv2 * bzinv + rx = b.X * bzinv2 + ry = b.Y * bzinv3 + rz = 1 + return (constraints(), constraints(zero={b.Infinity : 'b_finite'}, nonzero={a.Infinity : 'a_infinite'}), jacobianpoint(rx, ry, rz)) + azz = a.Z * bzinv + z12 = azz^2 + u1 = a.X + u2 = b.X * z12 + s1 = a.Y + s2 = b.Y * z12 + s2 = s2 * azz + h = -u1 + h = h + u2 + i = -s1 + i = i + s2 + if branch == 2: + r = formula_secp256k1_gej_double_var(a) + return (constraints(), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite', h : 'h=0', i : 'i=0'}), r) + if branch == 3: + return (constraints(), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite', h : 'h=0'}, nonzero={i : 'i!=0'}), point_at_infinity()) + i2 = i^2 + h2 = h^2 + h3 = h * h2 + rz = a.Z + rz = rz * h + t = u1 * h2 + rx = t + rx = rx * 2 + rx = rx + h3 + rx = -rx + rx = rx + i2 + ry = -rx + ry = ry + t + ry = ry * i + h3 = h3 * s1 + h3 = -h3 + ry = ry + h3 + return (constraints(), constraints(zero={a.Infinity : 'a_finite', b.Infinity : 'b_finite'}, nonzero={h : 'h!=0'}), jacobianpoint(rx, ry, rz)) + +def formula_secp256k1_gej_add_ge(branch, a, b): + """libsecp256k1's secp256k1_gej_add_ge""" + zeroes = {} + nonzeroes = {} + a_infinity = False + if (branch & 4) != 0: + nonzeroes.update({a.Infinity : 'a_infinite'}) + a_infinity = True + else: + zeroes.update({a.Infinity : 'a_finite'}) + zz = a.Z^2 + u1 = a.X + u2 = b.X * zz + s1 = a.Y + s2 = b.Y * zz + s2 = s2 * a.Z + t = u1 + t = t + u2 + m = s1 + m = m + s2 + rr = t^2 + m_alt = -u2 + tt = u1 * m_alt + rr = rr + tt + degenerate = (branch & 3) == 3 + if (branch & 1) != 0: + zeroes.update({m : 'm_zero'}) + else: + nonzeroes.update({m : 'm_nonzero'}) + if (branch & 2) != 0: + zeroes.update({rr : 'rr_zero'}) + else: + nonzeroes.update({rr : 'rr_nonzero'}) + rr_alt = s1 + rr_alt = rr_alt * 2 + m_alt = m_alt + u1 + if not degenerate: + rr_alt = rr + m_alt = m + n = m_alt^2 + q = n * t + n = n^2 + if degenerate: + n = m + t = rr_alt^2 + rz = a.Z * m_alt + infinity = False + if (branch & 8) != 0: + if not a_infinity: + infinity = True + zeroes.update({rz : 'r.z=0'}) + else: + nonzeroes.update({rz : 'r.z!=0'}) + rz = rz * 2 + q = -q + t = t + q + rx = t + t = t * 2 + t = t + q + t = t * rr_alt + t = t + n + ry = -t + rx = rx * 4 + ry = ry * 4 + if a_infinity: + rx = b.X + ry = b.Y + rz = 1 + if infinity: + return (constraints(zero={b.Z - 1 : 'b.z=1', b.Infinity : 'b_finite'}), constraints(zero=zeroes, nonzero=nonzeroes), point_at_infinity()) + return (constraints(zero={b.Z - 1 : 'b.z=1', b.Infinity : 'b_finite'}), constraints(zero=zeroes, nonzero=nonzeroes), jacobianpoint(rx, ry, rz)) + +def formula_secp256k1_gej_add_ge_old(branch, a, b): + """libsecp256k1's old secp256k1_gej_add_ge, which fails when ay+by=0 but ax!=bx""" + a_infinity = (branch & 1) != 0 + zero = {} + nonzero = {} + if a_infinity: + nonzero.update({a.Infinity : 'a_infinite'}) + else: + zero.update({a.Infinity : 'a_finite'}) + zz = a.Z^2 + u1 = a.X + u2 = b.X * zz + s1 = a.Y + s2 = b.Y * zz + s2 = s2 * a.Z + z = a.Z + t = u1 + t = t + u2 + m = s1 + m = m + s2 + n = m^2 + q = n * t + n = n^2 + rr = t^2 + t = u1 * u2 + t = -t + rr = rr + t + t = rr^2 + rz = m * z + infinity = False + if (branch & 2) != 0: + if not a_infinity: + infinity = True + else: + return (constraints(zero={b.Z - 1 : 'b.z=1', b.Infinity : 'b_finite'}), constraints(nonzero={z : 'conflict_a'}, zero={z : 'conflict_b'}), point_at_infinity()) + zero.update({rz : 'r.z=0'}) + else: + nonzero.update({rz : 'r.z!=0'}) + rz = rz * (0 if a_infinity else 2) + rx = t + q = -q + rx = rx + q + q = q * 3 + t = t * 2 + t = t + q + t = t * rr + t = t + n + ry = -t + rx = rx * (0 if a_infinity else 4) + ry = ry * (0 if a_infinity else 4) + t = b.X + t = t * (1 if a_infinity else 0) + rx = rx + t + t = b.Y + t = t * (1 if a_infinity else 0) + ry = ry + t + t = (1 if a_infinity else 0) + rz = rz + t + if infinity: + return (constraints(zero={b.Z - 1 : 'b.z=1', b.Infinity : 'b_finite'}), constraints(zero=zero, nonzero=nonzero), point_at_infinity()) + return (constraints(zero={b.Z - 1 : 'b.z=1', b.Infinity : 'b_finite'}), constraints(zero=zero, nonzero=nonzero), jacobianpoint(rx, ry, rz)) + +if __name__ == "__main__": + check_symbolic_jacobian_weierstrass("secp256k1_gej_add_var", 0, 7, 5, formula_secp256k1_gej_add_var) + check_symbolic_jacobian_weierstrass("secp256k1_gej_add_ge_var", 0, 7, 5, formula_secp256k1_gej_add_ge_var) + check_symbolic_jacobian_weierstrass("secp256k1_gej_add_zinv_var", 0, 7, 5, formula_secp256k1_gej_add_zinv_var) + check_symbolic_jacobian_weierstrass("secp256k1_gej_add_ge", 0, 7, 16, formula_secp256k1_gej_add_ge) + check_symbolic_jacobian_weierstrass("secp256k1_gej_add_ge_old [should fail]", 0, 7, 4, formula_secp256k1_gej_add_ge_old) + + if len(sys.argv) >= 2 and sys.argv[1] == "--exhaustive": + check_exhaustive_jacobian_weierstrass("secp256k1_gej_add_var", 0, 7, 5, formula_secp256k1_gej_add_var, 43) + check_exhaustive_jacobian_weierstrass("secp256k1_gej_add_ge_var", 0, 7, 5, formula_secp256k1_gej_add_ge_var, 43) + check_exhaustive_jacobian_weierstrass("secp256k1_gej_add_zinv_var", 0, 7, 5, formula_secp256k1_gej_add_zinv_var, 43) + check_exhaustive_jacobian_weierstrass("secp256k1_gej_add_ge", 0, 7, 16, formula_secp256k1_gej_add_ge, 43) + check_exhaustive_jacobian_weierstrass("secp256k1_gej_add_ge_old [should fail]", 0, 7, 4, formula_secp256k1_gej_add_ge_old, 43) diff --git a/sage/weierstrass_prover.sage b/sage/weierstrass_prover.sage new file mode 100644 index 00000000000..03ef2ec901e --- /dev/null +++ b/sage/weierstrass_prover.sage @@ -0,0 +1,264 @@ +# Prover implementation for Weierstrass curves of the form +# y^2 = x^3 + A * x + B, specifically with a = 0 and b = 7, with group laws +# operating on affine and Jacobian coordinates, including the point at infinity +# represented by a 4th variable in coordinates. + +load("group_prover.sage") + + +class affinepoint: + def __init__(self, x, y, infinity=0): + self.x = x + self.y = y + self.infinity = infinity + def __str__(self): + return "affinepoint(x=%s,y=%s,inf=%s)" % (self.x, self.y, self.infinity) + + +class jacobianpoint: + def __init__(self, x, y, z, infinity=0): + self.X = x + self.Y = y + self.Z = z + self.Infinity = infinity + def __str__(self): + return "jacobianpoint(X=%s,Y=%s,Z=%s,inf=%s)" % (self.X, self.Y, self.Z, self.Infinity) + + +def point_at_infinity(): + return jacobianpoint(1, 1, 1, 1) + + +def negate(p): + if p.__class__ == affinepoint: + return affinepoint(p.x, -p.y) + if p.__class__ == jacobianpoint: + return jacobianpoint(p.X, -p.Y, p.Z) + assert(False) + + +def on_weierstrass_curve(A, B, p): + """Return a set of zero-expressions for an affine point to be on the curve""" + return constraints(zero={p.x^3 + A*p.x + B - p.y^2: 'on_curve'}) + + +def tangential_to_weierstrass_curve(A, B, p12, p3): + """Return a set of zero-expressions for ((x12,y12),(x3,y3)) to be a line that is tangential to the curve at (x12,y12)""" + return constraints(zero={ + (p12.y - p3.y) * (p12.y * 2) - (p12.x^2 * 3 + A) * (p12.x - p3.x): 'tangential_to_curve' + }) + + +def colinear(p1, p2, p3): + """Return a set of zero-expressions for ((x1,y1),(x2,y2),(x3,y3)) to be collinear""" + return constraints(zero={ + (p1.y - p2.y) * (p1.x - p3.x) - (p1.y - p3.y) * (p1.x - p2.x): 'colinear_1', + (p2.y - p3.y) * (p2.x - p1.x) - (p2.y - p1.y) * (p2.x - p3.x): 'colinear_2', + (p3.y - p1.y) * (p3.x - p2.x) - (p3.y - p2.y) * (p3.x - p1.x): 'colinear_3' + }) + + +def good_affine_point(p): + return constraints(nonzero={p.x : 'nonzero_x', p.y : 'nonzero_y'}) + + +def good_jacobian_point(p): + return constraints(nonzero={p.X : 'nonzero_X', p.Y : 'nonzero_Y', p.Z^6 : 'nonzero_Z'}) + + +def good_point(p): + return constraints(nonzero={p.Z^6 : 'nonzero_X'}) + + +def finite(p, *affine_fns): + con = good_point(p) + constraints(zero={p.Infinity : 'finite_point'}) + if p.Z != 0: + return con + reduce(lambda a, b: a + b, (f(affinepoint(p.X / p.Z^2, p.Y / p.Z^3)) for f in affine_fns), con) + else: + return con + +def infinite(p): + return constraints(nonzero={p.Infinity : 'infinite_point'}) + + +def law_jacobian_weierstrass_add(A, B, pa, pb, pA, pB, pC): + """Check whether the passed set of coordinates is a valid Jacobian add, given assumptions""" + assumeLaw = (good_affine_point(pa) + + good_affine_point(pb) + + good_jacobian_point(pA) + + good_jacobian_point(pB) + + on_weierstrass_curve(A, B, pa) + + on_weierstrass_curve(A, B, pb) + + finite(pA) + + finite(pB) + + constraints(nonzero={pa.x - pb.x : 'different_x'})) + require = (finite(pC, lambda pc: on_weierstrass_curve(A, B, pc) + + colinear(pa, pb, negate(pc)))) + return (assumeLaw, require) + + +def law_jacobian_weierstrass_double(A, B, pa, pb, pA, pB, pC): + """Check whether the passed set of coordinates is a valid Jacobian doubling, given assumptions""" + assumeLaw = (good_affine_point(pa) + + good_affine_point(pb) + + good_jacobian_point(pA) + + good_jacobian_point(pB) + + on_weierstrass_curve(A, B, pa) + + on_weierstrass_curve(A, B, pb) + + finite(pA) + + finite(pB) + + constraints(zero={pa.x - pb.x : 'equal_x', pa.y - pb.y : 'equal_y'})) + require = (finite(pC, lambda pc: on_weierstrass_curve(A, B, pc) + + tangential_to_weierstrass_curve(A, B, pa, negate(pc)))) + return (assumeLaw, require) + + +def law_jacobian_weierstrass_add_opposites(A, B, pa, pb, pA, pB, pC): + assumeLaw = (good_affine_point(pa) + + good_affine_point(pb) + + good_jacobian_point(pA) + + good_jacobian_point(pB) + + on_weierstrass_curve(A, B, pa) + + on_weierstrass_curve(A, B, pb) + + finite(pA) + + finite(pB) + + constraints(zero={pa.x - pb.x : 'equal_x', pa.y + pb.y : 'opposite_y'})) + require = infinite(pC) + return (assumeLaw, require) + + +def law_jacobian_weierstrass_add_infinite_a(A, B, pa, pb, pA, pB, pC): + assumeLaw = (good_affine_point(pa) + + good_affine_point(pb) + + good_jacobian_point(pA) + + good_jacobian_point(pB) + + on_weierstrass_curve(A, B, pb) + + infinite(pA) + + finite(pB)) + require = finite(pC, lambda pc: constraints(zero={pc.x - pb.x : 'c.x=b.x', pc.y - pb.y : 'c.y=b.y'})) + return (assumeLaw, require) + + +def law_jacobian_weierstrass_add_infinite_b(A, B, pa, pb, pA, pB, pC): + assumeLaw = (good_affine_point(pa) + + good_affine_point(pb) + + good_jacobian_point(pA) + + good_jacobian_point(pB) + + on_weierstrass_curve(A, B, pa) + + infinite(pB) + + finite(pA)) + require = finite(pC, lambda pc: constraints(zero={pc.x - pa.x : 'c.x=a.x', pc.y - pa.y : 'c.y=a.y'})) + return (assumeLaw, require) + + +def law_jacobian_weierstrass_add_infinite_ab(A, B, pa, pb, pA, pB, pC): + assumeLaw = (good_affine_point(pa) + + good_affine_point(pb) + + good_jacobian_point(pA) + + good_jacobian_point(pB) + + infinite(pA) + + infinite(pB)) + require = infinite(pC) + return (assumeLaw, require) + + +laws_jacobian_weierstrass = { + 'add': law_jacobian_weierstrass_add, + 'double': law_jacobian_weierstrass_double, + 'add_opposite': law_jacobian_weierstrass_add_opposites, + 'add_infinite_a': law_jacobian_weierstrass_add_infinite_a, + 'add_infinite_b': law_jacobian_weierstrass_add_infinite_b, + 'add_infinite_ab': law_jacobian_weierstrass_add_infinite_ab +} + + +def check_exhaustive_jacobian_weierstrass(name, A, B, branches, formula, p): + """Verify an implementation of addition of Jacobian points on a Weierstrass curve, by executing and validating the result for every possible addition in a prime field""" + F = Integers(p) + print "Formula %s on Z%i:" % (name, p) + points = [] + for x in xrange(0, p): + for y in xrange(0, p): + point = affinepoint(F(x), F(y)) + r, e = concrete_verify(on_weierstrass_curve(A, B, point)) + if r: + points.append(point) + + for za in xrange(1, p): + for zb in xrange(1, p): + for pa in points: + for pb in points: + for ia in xrange(2): + for ib in xrange(2): + pA = jacobianpoint(pa.x * F(za)^2, pa.y * F(za)^3, F(za), ia) + pB = jacobianpoint(pb.x * F(zb)^2, pb.y * F(zb)^3, F(zb), ib) + for branch in xrange(0, branches): + assumeAssert, assumeBranch, pC = formula(branch, pA, pB) + pC.X = F(pC.X) + pC.Y = F(pC.Y) + pC.Z = F(pC.Z) + pC.Infinity = F(pC.Infinity) + r, e = concrete_verify(assumeAssert + assumeBranch) + if r: + match = False + for key in laws_jacobian_weierstrass: + assumeLaw, require = laws_jacobian_weierstrass[key](A, B, pa, pb, pA, pB, pC) + r, e = concrete_verify(assumeLaw) + if r: + if match: + print " multiple branches for (%s,%s,%s,%s) + (%s,%s,%s,%s)" % (pA.X, pA.Y, pA.Z, pA.Infinity, pB.X, pB.Y, pB.Z, pB.Infinity) + else: + match = True + r, e = concrete_verify(require) + if not r: + print " failure in branch %i for (%s,%s,%s,%s) + (%s,%s,%s,%s) = (%s,%s,%s,%s): %s" % (branch, pA.X, pA.Y, pA.Z, pA.Infinity, pB.X, pB.Y, pB.Z, pB.Infinity, pC.X, pC.Y, pC.Z, pC.Infinity, e) + print + + +def check_symbolic_function(R, assumeAssert, assumeBranch, f, A, B, pa, pb, pA, pB, pC): + assumeLaw, require = f(A, B, pa, pb, pA, pB, pC) + return check_symbolic(R, assumeLaw, assumeAssert, assumeBranch, require) + +def check_symbolic_jacobian_weierstrass(name, A, B, branches, formula): + """Verify an implementation of addition of Jacobian points on a Weierstrass curve symbolically""" + R. = PolynomialRing(QQ,8,order='invlex') + lift = lambda x: fastfrac(R,x) + ax = lift(ax) + ay = lift(ay) + Az = lift(Az) + bx = lift(bx) + by = lift(by) + Bz = lift(Bz) + Ai = lift(Ai) + Bi = lift(Bi) + + pa = affinepoint(ax, ay, Ai) + pb = affinepoint(bx, by, Bi) + pA = jacobianpoint(ax * Az^2, ay * Az^3, Az, Ai) + pB = jacobianpoint(bx * Bz^2, by * Bz^3, Bz, Bi) + + res = {} + + for key in laws_jacobian_weierstrass: + res[key] = [] + + print ("Formula " + name + ":") + count = 0 + for branch in xrange(branches): + assumeFormula, assumeBranch, pC = formula(branch, pA, pB) + pC.X = lift(pC.X) + pC.Y = lift(pC.Y) + pC.Z = lift(pC.Z) + pC.Infinity = lift(pC.Infinity) + + for key in laws_jacobian_weierstrass: + res[key].append((check_symbolic_function(R, assumeFormula, assumeBranch, laws_jacobian_weierstrass[key], A, B, pa, pb, pA, pB, pC), branch)) + + for key in res: + print " %s:" % key + val = res[key] + for x in val: + if x[0] is not None: + print " branch %i: %s" % (x[1], x[0]) + + print diff --git a/src/asm/field_10x26_arm.s b/src/asm/field_10x26_arm.s new file mode 100644 index 00000000000..5df561f2fc9 --- /dev/null +++ b/src/asm/field_10x26_arm.s @@ -0,0 +1,919 @@ +@ vim: set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab syntax=armasm: +/********************************************************************** + * Copyright (c) 2014 Wladimir J. van der Laan * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ +/* +ARM implementation of field_10x26 inner loops. + +Note: + +- To avoid unnecessary loads and make use of available registers, two + 'passes' have every time been interleaved, with the odd passes accumulating c' and d' + which will be added to c and d respectively in the the even passes + +*/ + + .syntax unified + .arch armv7-a + @ eabi attributes - see readelf -A + .eabi_attribute 8, 1 @ Tag_ARM_ISA_use = yes + .eabi_attribute 9, 0 @ Tag_Thumb_ISA_use = no + .eabi_attribute 10, 0 @ Tag_FP_arch = none + .eabi_attribute 24, 1 @ Tag_ABI_align_needed = 8-byte + .eabi_attribute 25, 1 @ Tag_ABI_align_preserved = 8-byte, except leaf SP + .eabi_attribute 30, 2 @ Tag_ABI_optimization_goals = Agressive Speed + .eabi_attribute 34, 1 @ Tag_CPU_unaligned_access = v6 + .text + + @ Field constants + .set field_R0, 0x3d10 + .set field_R1, 0x400 + .set field_not_M, 0xfc000000 @ ~M = ~0x3ffffff + + .align 2 + .global secp256k1_fe_mul_inner + .type secp256k1_fe_mul_inner, %function + @ Arguments: + @ r0 r Restrict: can overlap with a, not with b + @ r1 a + @ r2 b + @ Stack (total 4+10*4 = 44) + @ sp + #0 saved 'r' pointer + @ sp + #4 + 4*X t0,t1,t2,t3,t4,t5,t6,t7,u8,t9 +secp256k1_fe_mul_inner: + stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, r14} + sub sp, sp, #48 @ frame=44 + alignment + str r0, [sp, #0] @ save result address, we need it only at the end + + /****************************************** + * Main computation code. + ****************************************** + + Allocation: + r0,r14,r7,r8 scratch + r1 a (pointer) + r2 b (pointer) + r3:r4 c + r5:r6 d + r11:r12 c' + r9:r10 d' + + Note: do not write to r[] here, it may overlap with a[] + */ + + /* A - interleaved with B */ + ldr r7, [r1, #0*4] @ a[0] + ldr r8, [r2, #9*4] @ b[9] + ldr r0, [r1, #1*4] @ a[1] + umull r5, r6, r7, r8 @ d = a[0] * b[9] + ldr r14, [r2, #8*4] @ b[8] + umull r9, r10, r0, r8 @ d' = a[1] * b[9] + ldr r7, [r1, #2*4] @ a[2] + umlal r5, r6, r0, r14 @ d += a[1] * b[8] + ldr r8, [r2, #7*4] @ b[7] + umlal r9, r10, r7, r14 @ d' += a[2] * b[8] + ldr r0, [r1, #3*4] @ a[3] + umlal r5, r6, r7, r8 @ d += a[2] * b[7] + ldr r14, [r2, #6*4] @ b[6] + umlal r9, r10, r0, r8 @ d' += a[3] * b[7] + ldr r7, [r1, #4*4] @ a[4] + umlal r5, r6, r0, r14 @ d += a[3] * b[6] + ldr r8, [r2, #5*4] @ b[5] + umlal r9, r10, r7, r14 @ d' += a[4] * b[6] + ldr r0, [r1, #5*4] @ a[5] + umlal r5, r6, r7, r8 @ d += a[4] * b[5] + ldr r14, [r2, #4*4] @ b[4] + umlal r9, r10, r0, r8 @ d' += a[5] * b[5] + ldr r7, [r1, #6*4] @ a[6] + umlal r5, r6, r0, r14 @ d += a[5] * b[4] + ldr r8, [r2, #3*4] @ b[3] + umlal r9, r10, r7, r14 @ d' += a[6] * b[4] + ldr r0, [r1, #7*4] @ a[7] + umlal r5, r6, r7, r8 @ d += a[6] * b[3] + ldr r14, [r2, #2*4] @ b[2] + umlal r9, r10, r0, r8 @ d' += a[7] * b[3] + ldr r7, [r1, #8*4] @ a[8] + umlal r5, r6, r0, r14 @ d += a[7] * b[2] + ldr r8, [r2, #1*4] @ b[1] + umlal r9, r10, r7, r14 @ d' += a[8] * b[2] + ldr r0, [r1, #9*4] @ a[9] + umlal r5, r6, r7, r8 @ d += a[8] * b[1] + ldr r14, [r2, #0*4] @ b[0] + umlal r9, r10, r0, r8 @ d' += a[9] * b[1] + ldr r7, [r1, #0*4] @ a[0] + umlal r5, r6, r0, r14 @ d += a[9] * b[0] + @ r7,r14 used in B + + bic r0, r5, field_not_M @ t9 = d & M + str r0, [sp, #4 + 4*9] + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + + /* B */ + umull r3, r4, r7, r14 @ c = a[0] * b[0] + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u0 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u0 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t0 = c & M + str r14, [sp, #4 + 0*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u0 * R1 + umlal r3, r4, r0, r14 + + /* C - interleaved with D */ + ldr r7, [r1, #0*4] @ a[0] + ldr r8, [r2, #2*4] @ b[2] + ldr r14, [r2, #1*4] @ b[1] + umull r11, r12, r7, r8 @ c' = a[0] * b[2] + ldr r0, [r1, #1*4] @ a[1] + umlal r3, r4, r7, r14 @ c += a[0] * b[1] + ldr r8, [r2, #0*4] @ b[0] + umlal r11, r12, r0, r14 @ c' += a[1] * b[1] + ldr r7, [r1, #2*4] @ a[2] + umlal r3, r4, r0, r8 @ c += a[1] * b[0] + ldr r14, [r2, #9*4] @ b[9] + umlal r11, r12, r7, r8 @ c' += a[2] * b[0] + ldr r0, [r1, #3*4] @ a[3] + umlal r5, r6, r7, r14 @ d += a[2] * b[9] + ldr r8, [r2, #8*4] @ b[8] + umull r9, r10, r0, r14 @ d' = a[3] * b[9] + ldr r7, [r1, #4*4] @ a[4] + umlal r5, r6, r0, r8 @ d += a[3] * b[8] + ldr r14, [r2, #7*4] @ b[7] + umlal r9, r10, r7, r8 @ d' += a[4] * b[8] + ldr r0, [r1, #5*4] @ a[5] + umlal r5, r6, r7, r14 @ d += a[4] * b[7] + ldr r8, [r2, #6*4] @ b[6] + umlal r9, r10, r0, r14 @ d' += a[5] * b[7] + ldr r7, [r1, #6*4] @ a[6] + umlal r5, r6, r0, r8 @ d += a[5] * b[6] + ldr r14, [r2, #5*4] @ b[5] + umlal r9, r10, r7, r8 @ d' += a[6] * b[6] + ldr r0, [r1, #7*4] @ a[7] + umlal r5, r6, r7, r14 @ d += a[6] * b[5] + ldr r8, [r2, #4*4] @ b[4] + umlal r9, r10, r0, r14 @ d' += a[7] * b[5] + ldr r7, [r1, #8*4] @ a[8] + umlal r5, r6, r0, r8 @ d += a[7] * b[4] + ldr r14, [r2, #3*4] @ b[3] + umlal r9, r10, r7, r8 @ d' += a[8] * b[4] + ldr r0, [r1, #9*4] @ a[9] + umlal r5, r6, r7, r14 @ d += a[8] * b[3] + ldr r8, [r2, #2*4] @ b[2] + umlal r9, r10, r0, r14 @ d' += a[9] * b[3] + umlal r5, r6, r0, r8 @ d += a[9] * b[2] + + bic r0, r5, field_not_M @ u1 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u1 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t1 = c & M + str r14, [sp, #4 + 1*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u1 * R1 + umlal r3, r4, r0, r14 + + /* D */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u2 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u2 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t2 = c & M + str r14, [sp, #4 + 2*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u2 * R1 + umlal r3, r4, r0, r14 + + /* E - interleaved with F */ + ldr r7, [r1, #0*4] @ a[0] + ldr r8, [r2, #4*4] @ b[4] + umull r11, r12, r7, r8 @ c' = a[0] * b[4] + ldr r8, [r2, #3*4] @ b[3] + umlal r3, r4, r7, r8 @ c += a[0] * b[3] + ldr r7, [r1, #1*4] @ a[1] + umlal r11, r12, r7, r8 @ c' += a[1] * b[3] + ldr r8, [r2, #2*4] @ b[2] + umlal r3, r4, r7, r8 @ c += a[1] * b[2] + ldr r7, [r1, #2*4] @ a[2] + umlal r11, r12, r7, r8 @ c' += a[2] * b[2] + ldr r8, [r2, #1*4] @ b[1] + umlal r3, r4, r7, r8 @ c += a[2] * b[1] + ldr r7, [r1, #3*4] @ a[3] + umlal r11, r12, r7, r8 @ c' += a[3] * b[1] + ldr r8, [r2, #0*4] @ b[0] + umlal r3, r4, r7, r8 @ c += a[3] * b[0] + ldr r7, [r1, #4*4] @ a[4] + umlal r11, r12, r7, r8 @ c' += a[4] * b[0] + ldr r8, [r2, #9*4] @ b[9] + umlal r5, r6, r7, r8 @ d += a[4] * b[9] + ldr r7, [r1, #5*4] @ a[5] + umull r9, r10, r7, r8 @ d' = a[5] * b[9] + ldr r8, [r2, #8*4] @ b[8] + umlal r5, r6, r7, r8 @ d += a[5] * b[8] + ldr r7, [r1, #6*4] @ a[6] + umlal r9, r10, r7, r8 @ d' += a[6] * b[8] + ldr r8, [r2, #7*4] @ b[7] + umlal r5, r6, r7, r8 @ d += a[6] * b[7] + ldr r7, [r1, #7*4] @ a[7] + umlal r9, r10, r7, r8 @ d' += a[7] * b[7] + ldr r8, [r2, #6*4] @ b[6] + umlal r5, r6, r7, r8 @ d += a[7] * b[6] + ldr r7, [r1, #8*4] @ a[8] + umlal r9, r10, r7, r8 @ d' += a[8] * b[6] + ldr r8, [r2, #5*4] @ b[5] + umlal r5, r6, r7, r8 @ d += a[8] * b[5] + ldr r7, [r1, #9*4] @ a[9] + umlal r9, r10, r7, r8 @ d' += a[9] * b[5] + ldr r8, [r2, #4*4] @ b[4] + umlal r5, r6, r7, r8 @ d += a[9] * b[4] + + bic r0, r5, field_not_M @ u3 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u3 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t3 = c & M + str r14, [sp, #4 + 3*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u3 * R1 + umlal r3, r4, r0, r14 + + /* F */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u4 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u4 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t4 = c & M + str r14, [sp, #4 + 4*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u4 * R1 + umlal r3, r4, r0, r14 + + /* G - interleaved with H */ + ldr r7, [r1, #0*4] @ a[0] + ldr r8, [r2, #6*4] @ b[6] + ldr r14, [r2, #5*4] @ b[5] + umull r11, r12, r7, r8 @ c' = a[0] * b[6] + ldr r0, [r1, #1*4] @ a[1] + umlal r3, r4, r7, r14 @ c += a[0] * b[5] + ldr r8, [r2, #4*4] @ b[4] + umlal r11, r12, r0, r14 @ c' += a[1] * b[5] + ldr r7, [r1, #2*4] @ a[2] + umlal r3, r4, r0, r8 @ c += a[1] * b[4] + ldr r14, [r2, #3*4] @ b[3] + umlal r11, r12, r7, r8 @ c' += a[2] * b[4] + ldr r0, [r1, #3*4] @ a[3] + umlal r3, r4, r7, r14 @ c += a[2] * b[3] + ldr r8, [r2, #2*4] @ b[2] + umlal r11, r12, r0, r14 @ c' += a[3] * b[3] + ldr r7, [r1, #4*4] @ a[4] + umlal r3, r4, r0, r8 @ c += a[3] * b[2] + ldr r14, [r2, #1*4] @ b[1] + umlal r11, r12, r7, r8 @ c' += a[4] * b[2] + ldr r0, [r1, #5*4] @ a[5] + umlal r3, r4, r7, r14 @ c += a[4] * b[1] + ldr r8, [r2, #0*4] @ b[0] + umlal r11, r12, r0, r14 @ c' += a[5] * b[1] + ldr r7, [r1, #6*4] @ a[6] + umlal r3, r4, r0, r8 @ c += a[5] * b[0] + ldr r14, [r2, #9*4] @ b[9] + umlal r11, r12, r7, r8 @ c' += a[6] * b[0] + ldr r0, [r1, #7*4] @ a[7] + umlal r5, r6, r7, r14 @ d += a[6] * b[9] + ldr r8, [r2, #8*4] @ b[8] + umull r9, r10, r0, r14 @ d' = a[7] * b[9] + ldr r7, [r1, #8*4] @ a[8] + umlal r5, r6, r0, r8 @ d += a[7] * b[8] + ldr r14, [r2, #7*4] @ b[7] + umlal r9, r10, r7, r8 @ d' += a[8] * b[8] + ldr r0, [r1, #9*4] @ a[9] + umlal r5, r6, r7, r14 @ d += a[8] * b[7] + ldr r8, [r2, #6*4] @ b[6] + umlal r9, r10, r0, r14 @ d' += a[9] * b[7] + umlal r5, r6, r0, r8 @ d += a[9] * b[6] + + bic r0, r5, field_not_M @ u5 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u5 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t5 = c & M + str r14, [sp, #4 + 5*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u5 * R1 + umlal r3, r4, r0, r14 + + /* H */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u6 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u6 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t6 = c & M + str r14, [sp, #4 + 6*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u6 * R1 + umlal r3, r4, r0, r14 + + /* I - interleaved with J */ + ldr r8, [r2, #8*4] @ b[8] + ldr r7, [r1, #0*4] @ a[0] + ldr r14, [r2, #7*4] @ b[7] + umull r11, r12, r7, r8 @ c' = a[0] * b[8] + ldr r0, [r1, #1*4] @ a[1] + umlal r3, r4, r7, r14 @ c += a[0] * b[7] + ldr r8, [r2, #6*4] @ b[6] + umlal r11, r12, r0, r14 @ c' += a[1] * b[7] + ldr r7, [r1, #2*4] @ a[2] + umlal r3, r4, r0, r8 @ c += a[1] * b[6] + ldr r14, [r2, #5*4] @ b[5] + umlal r11, r12, r7, r8 @ c' += a[2] * b[6] + ldr r0, [r1, #3*4] @ a[3] + umlal r3, r4, r7, r14 @ c += a[2] * b[5] + ldr r8, [r2, #4*4] @ b[4] + umlal r11, r12, r0, r14 @ c' += a[3] * b[5] + ldr r7, [r1, #4*4] @ a[4] + umlal r3, r4, r0, r8 @ c += a[3] * b[4] + ldr r14, [r2, #3*4] @ b[3] + umlal r11, r12, r7, r8 @ c' += a[4] * b[4] + ldr r0, [r1, #5*4] @ a[5] + umlal r3, r4, r7, r14 @ c += a[4] * b[3] + ldr r8, [r2, #2*4] @ b[2] + umlal r11, r12, r0, r14 @ c' += a[5] * b[3] + ldr r7, [r1, #6*4] @ a[6] + umlal r3, r4, r0, r8 @ c += a[5] * b[2] + ldr r14, [r2, #1*4] @ b[1] + umlal r11, r12, r7, r8 @ c' += a[6] * b[2] + ldr r0, [r1, #7*4] @ a[7] + umlal r3, r4, r7, r14 @ c += a[6] * b[1] + ldr r8, [r2, #0*4] @ b[0] + umlal r11, r12, r0, r14 @ c' += a[7] * b[1] + ldr r7, [r1, #8*4] @ a[8] + umlal r3, r4, r0, r8 @ c += a[7] * b[0] + ldr r14, [r2, #9*4] @ b[9] + umlal r11, r12, r7, r8 @ c' += a[8] * b[0] + ldr r0, [r1, #9*4] @ a[9] + umlal r5, r6, r7, r14 @ d += a[8] * b[9] + ldr r8, [r2, #8*4] @ b[8] + umull r9, r10, r0, r14 @ d' = a[9] * b[9] + umlal r5, r6, r0, r8 @ d += a[9] * b[8] + + bic r0, r5, field_not_M @ u7 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u7 * R0 + umlal r3, r4, r0, r14 + + bic r14, r3, field_not_M @ t7 = c & M + str r14, [sp, #4 + 7*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u7 * R1 + umlal r3, r4, r0, r14 + + /* J */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u8 = d & M + str r0, [sp, #4 + 8*4] + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u8 * R0 + umlal r3, r4, r0, r14 + + /****************************************** + * compute and write back result + ****************************************** + Allocation: + r0 r + r3:r4 c + r5:r6 d + r7 t0 + r8 t1 + r9 t2 + r11 u8 + r12 t9 + r1,r2,r10,r14 scratch + + Note: do not read from a[] after here, it may overlap with r[] + */ + ldr r0, [sp, #0] + add r1, sp, #4 + 3*4 @ r[3..7] = t3..7, r11=u8, r12=t9 + ldmia r1, {r2,r7,r8,r9,r10,r11,r12} + add r1, r0, #3*4 + stmia r1, {r2,r7,r8,r9,r10} + + bic r2, r3, field_not_M @ r[8] = c & M + str r2, [r0, #8*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u8 * R1 + umlal r3, r4, r11, r14 + movw r14, field_R0 @ c += d * R0 + umlal r3, r4, r5, r14 + adds r3, r3, r12 @ c += t9 + adc r4, r4, #0 + + add r1, sp, #4 + 0*4 @ r7,r8,r9 = t0,t1,t2 + ldmia r1, {r7,r8,r9} + + ubfx r2, r3, #0, #22 @ r[9] = c & (M >> 4) + str r2, [r0, #9*4] + mov r3, r3, lsr #22 @ c >>= 22 + orr r3, r3, r4, asl #10 + mov r4, r4, lsr #22 + movw r14, field_R1 << 4 @ c += d * (R1 << 4) + umlal r3, r4, r5, r14 + + movw r14, field_R0 >> 4 @ d = c * (R0 >> 4) + t0 (64x64 multiply+add) + umull r5, r6, r3, r14 @ d = c.lo * (R0 >> 4) + adds r5, r5, r7 @ d.lo += t0 + mla r6, r14, r4, r6 @ d.hi += c.hi * (R0 >> 4) + adc r6, r6, 0 @ d.hi += carry + + bic r2, r5, field_not_M @ r[0] = d & M + str r2, [r0, #0*4] + + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + + movw r14, field_R1 >> 4 @ d += c * (R1 >> 4) + t1 (64x64 multiply+add) + umull r1, r2, r3, r14 @ tmp = c.lo * (R1 >> 4) + adds r5, r5, r8 @ d.lo += t1 + adc r6, r6, #0 @ d.hi += carry + adds r5, r5, r1 @ d.lo += tmp.lo + mla r2, r14, r4, r2 @ tmp.hi += c.hi * (R1 >> 4) + adc r6, r6, r2 @ d.hi += carry + tmp.hi + + bic r2, r5, field_not_M @ r[1] = d & M + str r2, [r0, #1*4] + mov r5, r5, lsr #26 @ d >>= 26 (ignore hi) + orr r5, r5, r6, asl #6 + + add r5, r5, r9 @ d += t2 + str r5, [r0, #2*4] @ r[2] = d + + add sp, sp, #48 + ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, pc} + .size secp256k1_fe_mul_inner, .-secp256k1_fe_mul_inner + + .align 2 + .global secp256k1_fe_sqr_inner + .type secp256k1_fe_sqr_inner, %function + @ Arguments: + @ r0 r Can overlap with a + @ r1 a + @ Stack (total 4+10*4 = 44) + @ sp + #0 saved 'r' pointer + @ sp + #4 + 4*X t0,t1,t2,t3,t4,t5,t6,t7,u8,t9 +secp256k1_fe_sqr_inner: + stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, r14} + sub sp, sp, #48 @ frame=44 + alignment + str r0, [sp, #0] @ save result address, we need it only at the end + /****************************************** + * Main computation code. + ****************************************** + + Allocation: + r0,r14,r2,r7,r8 scratch + r1 a (pointer) + r3:r4 c + r5:r6 d + r11:r12 c' + r9:r10 d' + + Note: do not write to r[] here, it may overlap with a[] + */ + /* A interleaved with B */ + ldr r0, [r1, #1*4] @ a[1]*2 + ldr r7, [r1, #0*4] @ a[0] + mov r0, r0, asl #1 + ldr r14, [r1, #9*4] @ a[9] + umull r3, r4, r7, r7 @ c = a[0] * a[0] + ldr r8, [r1, #8*4] @ a[8] + mov r7, r7, asl #1 + umull r5, r6, r7, r14 @ d = a[0]*2 * a[9] + ldr r7, [r1, #2*4] @ a[2]*2 + umull r9, r10, r0, r14 @ d' = a[1]*2 * a[9] + ldr r14, [r1, #7*4] @ a[7] + umlal r5, r6, r0, r8 @ d += a[1]*2 * a[8] + mov r7, r7, asl #1 + ldr r0, [r1, #3*4] @ a[3]*2 + umlal r9, r10, r7, r8 @ d' += a[2]*2 * a[8] + ldr r8, [r1, #6*4] @ a[6] + umlal r5, r6, r7, r14 @ d += a[2]*2 * a[7] + mov r0, r0, asl #1 + ldr r7, [r1, #4*4] @ a[4]*2 + umlal r9, r10, r0, r14 @ d' += a[3]*2 * a[7] + ldr r14, [r1, #5*4] @ a[5] + mov r7, r7, asl #1 + umlal r5, r6, r0, r8 @ d += a[3]*2 * a[6] + umlal r9, r10, r7, r8 @ d' += a[4]*2 * a[6] + umlal r5, r6, r7, r14 @ d += a[4]*2 * a[5] + umlal r9, r10, r14, r14 @ d' += a[5] * a[5] + + bic r0, r5, field_not_M @ t9 = d & M + str r0, [sp, #4 + 9*4] + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + + /* B */ + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u0 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u0 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t0 = c & M + str r14, [sp, #4 + 0*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u0 * R1 + umlal r3, r4, r0, r14 + + /* C interleaved with D */ + ldr r0, [r1, #0*4] @ a[0]*2 + ldr r14, [r1, #1*4] @ a[1] + mov r0, r0, asl #1 + ldr r8, [r1, #2*4] @ a[2] + umlal r3, r4, r0, r14 @ c += a[0]*2 * a[1] + mov r7, r8, asl #1 @ a[2]*2 + umull r11, r12, r14, r14 @ c' = a[1] * a[1] + ldr r14, [r1, #9*4] @ a[9] + umlal r11, r12, r0, r8 @ c' += a[0]*2 * a[2] + ldr r0, [r1, #3*4] @ a[3]*2 + ldr r8, [r1, #8*4] @ a[8] + umlal r5, r6, r7, r14 @ d += a[2]*2 * a[9] + mov r0, r0, asl #1 + ldr r7, [r1, #4*4] @ a[4]*2 + umull r9, r10, r0, r14 @ d' = a[3]*2 * a[9] + ldr r14, [r1, #7*4] @ a[7] + umlal r5, r6, r0, r8 @ d += a[3]*2 * a[8] + mov r7, r7, asl #1 + ldr r0, [r1, #5*4] @ a[5]*2 + umlal r9, r10, r7, r8 @ d' += a[4]*2 * a[8] + ldr r8, [r1, #6*4] @ a[6] + mov r0, r0, asl #1 + umlal r5, r6, r7, r14 @ d += a[4]*2 * a[7] + umlal r9, r10, r0, r14 @ d' += a[5]*2 * a[7] + umlal r5, r6, r0, r8 @ d += a[5]*2 * a[6] + umlal r9, r10, r8, r8 @ d' += a[6] * a[6] + + bic r0, r5, field_not_M @ u1 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u1 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t1 = c & M + str r14, [sp, #4 + 1*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u1 * R1 + umlal r3, r4, r0, r14 + + /* D */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u2 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u2 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t2 = c & M + str r14, [sp, #4 + 2*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u2 * R1 + umlal r3, r4, r0, r14 + + /* E interleaved with F */ + ldr r7, [r1, #0*4] @ a[0]*2 + ldr r0, [r1, #1*4] @ a[1]*2 + ldr r14, [r1, #2*4] @ a[2] + mov r7, r7, asl #1 + ldr r8, [r1, #3*4] @ a[3] + ldr r2, [r1, #4*4] + umlal r3, r4, r7, r8 @ c += a[0]*2 * a[3] + mov r0, r0, asl #1 + umull r11, r12, r7, r2 @ c' = a[0]*2 * a[4] + mov r2, r2, asl #1 @ a[4]*2 + umlal r11, r12, r0, r8 @ c' += a[1]*2 * a[3] + ldr r8, [r1, #9*4] @ a[9] + umlal r3, r4, r0, r14 @ c += a[1]*2 * a[2] + ldr r0, [r1, #5*4] @ a[5]*2 + umlal r11, r12, r14, r14 @ c' += a[2] * a[2] + ldr r14, [r1, #8*4] @ a[8] + mov r0, r0, asl #1 + umlal r5, r6, r2, r8 @ d += a[4]*2 * a[9] + ldr r7, [r1, #6*4] @ a[6]*2 + umull r9, r10, r0, r8 @ d' = a[5]*2 * a[9] + mov r7, r7, asl #1 + ldr r8, [r1, #7*4] @ a[7] + umlal r5, r6, r0, r14 @ d += a[5]*2 * a[8] + umlal r9, r10, r7, r14 @ d' += a[6]*2 * a[8] + umlal r5, r6, r7, r8 @ d += a[6]*2 * a[7] + umlal r9, r10, r8, r8 @ d' += a[7] * a[7] + + bic r0, r5, field_not_M @ u3 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u3 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t3 = c & M + str r14, [sp, #4 + 3*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u3 * R1 + umlal r3, r4, r0, r14 + + /* F */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u4 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u4 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t4 = c & M + str r14, [sp, #4 + 4*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u4 * R1 + umlal r3, r4, r0, r14 + + /* G interleaved with H */ + ldr r7, [r1, #0*4] @ a[0]*2 + ldr r0, [r1, #1*4] @ a[1]*2 + mov r7, r7, asl #1 + ldr r8, [r1, #5*4] @ a[5] + ldr r2, [r1, #6*4] @ a[6] + umlal r3, r4, r7, r8 @ c += a[0]*2 * a[5] + ldr r14, [r1, #4*4] @ a[4] + mov r0, r0, asl #1 + umull r11, r12, r7, r2 @ c' = a[0]*2 * a[6] + ldr r7, [r1, #2*4] @ a[2]*2 + umlal r11, r12, r0, r8 @ c' += a[1]*2 * a[5] + mov r7, r7, asl #1 + ldr r8, [r1, #3*4] @ a[3] + umlal r3, r4, r0, r14 @ c += a[1]*2 * a[4] + mov r0, r2, asl #1 @ a[6]*2 + umlal r11, r12, r7, r14 @ c' += a[2]*2 * a[4] + ldr r14, [r1, #9*4] @ a[9] + umlal r3, r4, r7, r8 @ c += a[2]*2 * a[3] + ldr r7, [r1, #7*4] @ a[7]*2 + umlal r11, r12, r8, r8 @ c' += a[3] * a[3] + mov r7, r7, asl #1 + ldr r8, [r1, #8*4] @ a[8] + umlal r5, r6, r0, r14 @ d += a[6]*2 * a[9] + umull r9, r10, r7, r14 @ d' = a[7]*2 * a[9] + umlal r5, r6, r7, r8 @ d += a[7]*2 * a[8] + umlal r9, r10, r8, r8 @ d' += a[8] * a[8] + + bic r0, r5, field_not_M @ u5 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u5 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t5 = c & M + str r14, [sp, #4 + 5*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u5 * R1 + umlal r3, r4, r0, r14 + + /* H */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + adds r5, r5, r9 @ d += d' + adc r6, r6, r10 + + bic r0, r5, field_not_M @ u6 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u6 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t6 = c & M + str r14, [sp, #4 + 6*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u6 * R1 + umlal r3, r4, r0, r14 + + /* I interleaved with J */ + ldr r7, [r1, #0*4] @ a[0]*2 + ldr r0, [r1, #1*4] @ a[1]*2 + mov r7, r7, asl #1 + ldr r8, [r1, #7*4] @ a[7] + ldr r2, [r1, #8*4] @ a[8] + umlal r3, r4, r7, r8 @ c += a[0]*2 * a[7] + ldr r14, [r1, #6*4] @ a[6] + mov r0, r0, asl #1 + umull r11, r12, r7, r2 @ c' = a[0]*2 * a[8] + ldr r7, [r1, #2*4] @ a[2]*2 + umlal r11, r12, r0, r8 @ c' += a[1]*2 * a[7] + ldr r8, [r1, #5*4] @ a[5] + umlal r3, r4, r0, r14 @ c += a[1]*2 * a[6] + ldr r0, [r1, #3*4] @ a[3]*2 + mov r7, r7, asl #1 + umlal r11, r12, r7, r14 @ c' += a[2]*2 * a[6] + ldr r14, [r1, #4*4] @ a[4] + mov r0, r0, asl #1 + umlal r3, r4, r7, r8 @ c += a[2]*2 * a[5] + mov r2, r2, asl #1 @ a[8]*2 + umlal r11, r12, r0, r8 @ c' += a[3]*2 * a[5] + umlal r3, r4, r0, r14 @ c += a[3]*2 * a[4] + umlal r11, r12, r14, r14 @ c' += a[4] * a[4] + ldr r8, [r1, #9*4] @ a[9] + umlal r5, r6, r2, r8 @ d += a[8]*2 * a[9] + @ r8 will be used in J + + bic r0, r5, field_not_M @ u7 = d & M + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u7 * R0 + umlal r3, r4, r0, r14 + bic r14, r3, field_not_M @ t7 = c & M + str r14, [sp, #4 + 7*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u7 * R1 + umlal r3, r4, r0, r14 + + /* J */ + adds r3, r3, r11 @ c += c' + adc r4, r4, r12 + umlal r5, r6, r8, r8 @ d += a[9] * a[9] + + bic r0, r5, field_not_M @ u8 = d & M + str r0, [sp, #4 + 8*4] + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + movw r14, field_R0 @ c += u8 * R0 + umlal r3, r4, r0, r14 + + /****************************************** + * compute and write back result + ****************************************** + Allocation: + r0 r + r3:r4 c + r5:r6 d + r7 t0 + r8 t1 + r9 t2 + r11 u8 + r12 t9 + r1,r2,r10,r14 scratch + + Note: do not read from a[] after here, it may overlap with r[] + */ + ldr r0, [sp, #0] + add r1, sp, #4 + 3*4 @ r[3..7] = t3..7, r11=u8, r12=t9 + ldmia r1, {r2,r7,r8,r9,r10,r11,r12} + add r1, r0, #3*4 + stmia r1, {r2,r7,r8,r9,r10} + + bic r2, r3, field_not_M @ r[8] = c & M + str r2, [r0, #8*4] + mov r3, r3, lsr #26 @ c >>= 26 + orr r3, r3, r4, asl #6 + mov r4, r4, lsr #26 + mov r14, field_R1 @ c += u8 * R1 + umlal r3, r4, r11, r14 + movw r14, field_R0 @ c += d * R0 + umlal r3, r4, r5, r14 + adds r3, r3, r12 @ c += t9 + adc r4, r4, #0 + + add r1, sp, #4 + 0*4 @ r7,r8,r9 = t0,t1,t2 + ldmia r1, {r7,r8,r9} + + ubfx r2, r3, #0, #22 @ r[9] = c & (M >> 4) + str r2, [r0, #9*4] + mov r3, r3, lsr #22 @ c >>= 22 + orr r3, r3, r4, asl #10 + mov r4, r4, lsr #22 + movw r14, field_R1 << 4 @ c += d * (R1 << 4) + umlal r3, r4, r5, r14 + + movw r14, field_R0 >> 4 @ d = c * (R0 >> 4) + t0 (64x64 multiply+add) + umull r5, r6, r3, r14 @ d = c.lo * (R0 >> 4) + adds r5, r5, r7 @ d.lo += t0 + mla r6, r14, r4, r6 @ d.hi += c.hi * (R0 >> 4) + adc r6, r6, 0 @ d.hi += carry + + bic r2, r5, field_not_M @ r[0] = d & M + str r2, [r0, #0*4] + + mov r5, r5, lsr #26 @ d >>= 26 + orr r5, r5, r6, asl #6 + mov r6, r6, lsr #26 + + movw r14, field_R1 >> 4 @ d += c * (R1 >> 4) + t1 (64x64 multiply+add) + umull r1, r2, r3, r14 @ tmp = c.lo * (R1 >> 4) + adds r5, r5, r8 @ d.lo += t1 + adc r6, r6, #0 @ d.hi += carry + adds r5, r5, r1 @ d.lo += tmp.lo + mla r2, r14, r4, r2 @ tmp.hi += c.hi * (R1 >> 4) + adc r6, r6, r2 @ d.hi += carry + tmp.hi + + bic r2, r5, field_not_M @ r[1] = d & M + str r2, [r0, #1*4] + mov r5, r5, lsr #26 @ d >>= 26 (ignore hi) + orr r5, r5, r6, asl #6 + + add r5, r5, r9 @ d += t2 + str r5, [r0, #2*4] @ r[2] = d + + add sp, sp, #48 + ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, r11, pc} + .size secp256k1_fe_sqr_inner, .-secp256k1_fe_sqr_inner + diff --git a/src/bench_ecdh.c b/src/bench_ecdh.c index 5a7c6376e08..cde5e2dbb4e 100644 --- a/src/bench_ecdh.c +++ b/src/bench_ecdh.c @@ -28,7 +28,8 @@ static void bench_ecdh_setup(void* arg) { 0xa2, 0xba, 0xd1, 0x84, 0xf8, 0x83, 0xc6, 0x9f }; - data->ctx = secp256k1_context_create(0); + /* create a context with no capabilities */ + data->ctx = secp256k1_context_create(SECP256K1_FLAGS_TYPE_CONTEXT); for (i = 0; i < 32; i++) { data->scalar[i] = i + 1; } diff --git a/src/bench_internal.c b/src/bench_internal.c index 7809f5f8cfe..0809f77bda1 100644 --- a/src/bench_internal.c +++ b/src/bench_internal.c @@ -181,12 +181,12 @@ void bench_field_inverse_var(void* arg) { } } -void bench_field_sqrt_var(void* arg) { +void bench_field_sqrt(void* arg) { int i; bench_inv_t *data = (bench_inv_t*)arg; for (i = 0; i < 20000; i++) { - secp256k1_fe_sqrt_var(&data->fe_x, &data->fe_x); + secp256k1_fe_sqrt(&data->fe_x, &data->fe_x); secp256k1_fe_add(&data->fe_x, &data->fe_y); } } @@ -227,6 +227,15 @@ void bench_group_add_affine_var(void* arg) { } } +void bench_group_jacobi_var(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + + for (i = 0; i < 20000; i++) { + secp256k1_gej_has_quad_y_var(&data->gej_x); + } +} + void bench_ecmult_wnaf(void* arg) { int i; bench_inv_t *data = (bench_inv_t*)arg; @@ -299,6 +308,21 @@ void bench_context_sign(void* arg) { } } +#ifndef USE_NUM_NONE +void bench_num_jacobi(void* arg) { + int i; + bench_inv_t *data = (bench_inv_t*)arg; + secp256k1_num nx, norder; + + secp256k1_scalar_get_num(&nx, &data->scalar_x); + secp256k1_scalar_order_get_num(&norder); + secp256k1_scalar_get_num(&norder, &data->scalar_y); + + for (i = 0; i < 200000; i++) { + secp256k1_num_jacobi(&nx, &norder); + } +} +#endif int have_flag(int argc, char** argv, char *flag) { char** argm = argv + argc; @@ -333,12 +357,13 @@ int main(int argc, char **argv) { if (have_flag(argc, argv, "field") || have_flag(argc, argv, "mul")) run_benchmark("field_mul", bench_field_mul, bench_setup, NULL, &data, 10, 200000); if (have_flag(argc, argv, "field") || have_flag(argc, argv, "inverse")) run_benchmark("field_inverse", bench_field_inverse, bench_setup, NULL, &data, 10, 20000); if (have_flag(argc, argv, "field") || have_flag(argc, argv, "inverse")) run_benchmark("field_inverse_var", bench_field_inverse_var, bench_setup, NULL, &data, 10, 20000); - if (have_flag(argc, argv, "field") || have_flag(argc, argv, "sqrt")) run_benchmark("field_sqrt_var", bench_field_sqrt_var, bench_setup, NULL, &data, 10, 20000); + if (have_flag(argc, argv, "field") || have_flag(argc, argv, "sqrt")) run_benchmark("field_sqrt", bench_field_sqrt, bench_setup, NULL, &data, 10, 20000); if (have_flag(argc, argv, "group") || have_flag(argc, argv, "double")) run_benchmark("group_double_var", bench_group_double_var, bench_setup, NULL, &data, 10, 200000); if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_var", bench_group_add_var, bench_setup, NULL, &data, 10, 200000); if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine", bench_group_add_affine, bench_setup, NULL, &data, 10, 200000); if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine_var", bench_group_add_affine_var, bench_setup, NULL, &data, 10, 200000); + if (have_flag(argc, argv, "group") || have_flag(argc, argv, "jacobi")) run_benchmark("group_jacobi_var", bench_group_jacobi_var, bench_setup, NULL, &data, 10, 20000); if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("wnaf_const", bench_wnaf_const, bench_setup, NULL, &data, 10, 20000); if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("ecmult_wnaf", bench_ecmult_wnaf, bench_setup, NULL, &data, 10, 20000); @@ -350,5 +375,8 @@ int main(int argc, char **argv) { if (have_flag(argc, argv, "context") || have_flag(argc, argv, "verify")) run_benchmark("context_verify", bench_context_verify, bench_setup, NULL, &data, 10, 20); if (have_flag(argc, argv, "context") || have_flag(argc, argv, "sign")) run_benchmark("context_sign", bench_context_sign, bench_setup, NULL, &data, 10, 200); +#ifndef USE_NUM_NONE + if (have_flag(argc, argv, "num") || have_flag(argc, argv, "jacobi")) run_benchmark("num_jacobi", bench_num_jacobi, bench_setup, NULL, &data, 10, 200000); +#endif return 0; } diff --git a/src/bench_verify.c b/src/bench_verify.c index 5718320cda2..418defa0aa2 100644 --- a/src/bench_verify.c +++ b/src/bench_verify.c @@ -11,6 +11,12 @@ #include "util.h" #include "bench.h" +#ifdef ENABLE_OPENSSL_TESTS +#include +#include +#include +#endif + typedef struct { secp256k1_context *ctx; unsigned char msg[32]; @@ -19,6 +25,9 @@ typedef struct { size_t siglen; unsigned char pubkey[33]; size_t pubkeylen; +#ifdef ENABLE_OPENSSL_TESTS + EC_GROUP* ec_group; +#endif } benchmark_verify_t; static void benchmark_verify(void* arg) { @@ -40,6 +49,36 @@ static void benchmark_verify(void* arg) { } } +#ifdef ENABLE_OPENSSL_TESTS +static void benchmark_verify_openssl(void* arg) { + int i; + benchmark_verify_t* data = (benchmark_verify_t*)arg; + + for (i = 0; i < 20000; i++) { + data->sig[data->siglen - 1] ^= (i & 0xFF); + data->sig[data->siglen - 2] ^= ((i >> 8) & 0xFF); + data->sig[data->siglen - 3] ^= ((i >> 16) & 0xFF); + { + EC_KEY *pkey = EC_KEY_new(); + const unsigned char *pubkey = &data->pubkey[0]; + int result; + + CHECK(pkey != NULL); + result = EC_KEY_set_group(pkey, data->ec_group); + CHECK(result); + result = (o2i_ECPublicKey(&pkey, &pubkey, data->pubkeylen)) != NULL; + CHECK(result); + result = ECDSA_verify(0, &data->msg[0], sizeof(data->msg), &data->sig[0], data->siglen, pkey) == (i == 0); + CHECK(result); + EC_KEY_free(pkey); + } + data->sig[data->siglen - 1] ^= (i & 0xFF); + data->sig[data->siglen - 2] ^= ((i >> 8) & 0xFF); + data->sig[data->siglen - 3] ^= ((i >> 16) & 0xFF); + } +} +#endif + int main(void) { int i; secp256k1_pubkey pubkey; @@ -62,6 +101,11 @@ int main(void) { CHECK(secp256k1_ec_pubkey_serialize(data.ctx, data.pubkey, &data.pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED) == 1); run_benchmark("ecdsa_verify", benchmark_verify, NULL, NULL, &data, 10, 20000); +#ifdef ENABLE_OPENSSL_TESTS + data.ec_group = EC_GROUP_new_by_curve_name(NID_secp256k1); + run_benchmark("ecdsa_verify_openssl", benchmark_verify_openssl, NULL, NULL, &data, 10, 20000); + EC_GROUP_free(data.ec_group); +#endif secp256k1_context_destroy(data.ctx); return 0; diff --git a/src/ecdsa_impl.h b/src/ecdsa_impl.h index d110b4bb1dc..9a42e519bd5 100644 --- a/src/ecdsa_impl.h +++ b/src/ecdsa_impl.h @@ -203,7 +203,9 @@ static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const secp256k1_scalar *sigr, const secp256k1_scalar *sigs, const secp256k1_ge *pubkey, const secp256k1_scalar *message) { unsigned char c[32]; secp256k1_scalar sn, u1, u2; +#if !defined(EXHAUSTIVE_TEST_ORDER) secp256k1_fe xr; +#endif secp256k1_gej pubkeyj; secp256k1_gej pr; @@ -219,6 +221,21 @@ static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const if (secp256k1_gej_is_infinity(&pr)) { return 0; } + +#if defined(EXHAUSTIVE_TEST_ORDER) +{ + secp256k1_scalar computed_r; + int overflow = 0; + secp256k1_ge pr_ge; + secp256k1_ge_set_gej(&pr_ge, &pr); + secp256k1_fe_normalize(&pr_ge.x); + + secp256k1_fe_get_b32(c, &pr_ge.x); + secp256k1_scalar_set_b32(&computed_r, c, &overflow); + /* we fully expect overflow */ + return secp256k1_scalar_eq(sigr, &computed_r); +} +#else secp256k1_scalar_get_b32(c, sigr); secp256k1_fe_set_b32(&xr, c); @@ -252,6 +269,7 @@ static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const return 1; } return 0; +#endif } static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid) { diff --git a/src/ecmult_const_impl.h b/src/ecmult_const_impl.h index 90ac94770ea..0db314c48e0 100644 --- a/src/ecmult_const_impl.h +++ b/src/ecmult_const_impl.h @@ -58,25 +58,27 @@ static int secp256k1_wnaf_const(int *wnaf, secp256k1_scalar s, int w) { int global_sign; int skew = 0; int word = 0; + /* 1 2 3 */ int u_last; int u; -#ifdef USE_ENDOMORPHISM int flip; int bit; secp256k1_scalar neg_s; int not_neg_one; - /* If we are using the endomorphism, we cannot handle even numbers by negating - * them, since we are working with 128-bit numbers whose negations would be 256 - * bits, eliminating the performance advantage. Instead we use a technique from + /* Note that we cannot handle even numbers by negating them to be odd, as is + * done in other implementations, since if our scalars were specified to have + * width < 256 for performance reasons, their negations would have width 256 + * and we'd lose any performance benefit. Instead, we use a technique from * Section 4.2 of the Okeya/Tagaki paper, which is to add either 1 (for even) - * or 2 (for odd) to the number we are encoding, then compensating after the - * multiplication. */ - /* Negative 128-bit numbers will be negated, since otherwise they are 256-bit */ + * or 2 (for odd) to the number we are encoding, returning a skew value indicating + * this, and having the caller compensate after doing the multiplication. */ + + /* Negative numbers will be negated to keep their bit representation below the maximum width */ flip = secp256k1_scalar_is_high(&s); /* We add 1 to even numbers, 2 to odd ones, noting that negation flips parity */ - bit = flip ^ (s.d[0] & 1); + bit = flip ^ !secp256k1_scalar_is_even(&s); /* We check for negative one, since adding 2 to it will cause an overflow */ secp256k1_scalar_negate(&neg_s, &s); not_neg_one = !secp256k1_scalar_is_one(&neg_s); @@ -89,11 +91,6 @@ static int secp256k1_wnaf_const(int *wnaf, secp256k1_scalar s, int w) { global_sign = secp256k1_scalar_cond_negate(&s, flip); global_sign *= not_neg_one * 2 - 1; skew = 1 << bit; -#else - /* Otherwise, we just negate to force oddness */ - int is_even = secp256k1_scalar_is_even(&s); - global_sign = secp256k1_scalar_cond_negate(&s, is_even); -#endif /* 4 */ u_last = secp256k1_scalar_shr_int(&s, w); @@ -127,15 +124,13 @@ static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, cons secp256k1_ge tmpa; secp256k1_fe Z; + int skew_1; + int wnaf_1[1 + WNAF_SIZE(WINDOW_A - 1)]; #ifdef USE_ENDOMORPHISM secp256k1_ge pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)]; - int wnaf_1[1 + WNAF_SIZE(WINDOW_A - 1)]; int wnaf_lam[1 + WNAF_SIZE(WINDOW_A - 1)]; - int skew_1; int skew_lam; secp256k1_scalar q_1, q_lam; -#else - int wnaf[1 + WNAF_SIZE(WINDOW_A - 1)]; #endif int i; @@ -145,18 +140,10 @@ static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, cons #ifdef USE_ENDOMORPHISM /* split q into q_1 and q_lam (where q = q_1 + q_lam*lambda, and q_1 and q_lam are ~128 bit) */ secp256k1_scalar_split_lambda(&q_1, &q_lam, &sc); - /* no need for zero correction when using endomorphism since even - * numbers have one added to them anyway */ skew_1 = secp256k1_wnaf_const(wnaf_1, q_1, WINDOW_A - 1); skew_lam = secp256k1_wnaf_const(wnaf_lam, q_lam, WINDOW_A - 1); #else - int is_zero = secp256k1_scalar_is_zero(scalar); - /* the wNAF ladder cannot handle zero, so bump this to one .. we will - * correct the result after the fact */ - sc.d[0] += is_zero; - VERIFY_CHECK(!secp256k1_scalar_is_zero(&sc)); - - secp256k1_wnaf_const(wnaf, sc, WINDOW_A - 1); + skew_1 = secp256k1_wnaf_const(wnaf_1, sc, WINDOW_A - 1); #endif /* Calculate odd multiples of a. @@ -179,21 +166,15 @@ static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, cons /* first loop iteration (separated out so we can directly set r, rather * than having it start at infinity, get doubled several times, then have * its new value added to it) */ -#ifdef USE_ENDOMORPHISM i = wnaf_1[WNAF_SIZE(WINDOW_A - 1)]; VERIFY_CHECK(i != 0); ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, i, WINDOW_A); secp256k1_gej_set_ge(r, &tmpa); - +#ifdef USE_ENDOMORPHISM i = wnaf_lam[WNAF_SIZE(WINDOW_A - 1)]; VERIFY_CHECK(i != 0); ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a_lam, i, WINDOW_A); secp256k1_gej_add_ge(r, r, &tmpa); -#else - i = wnaf[WNAF_SIZE(WINDOW_A - 1)]; - VERIFY_CHECK(i != 0); - ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, i, WINDOW_A); - secp256k1_gej_set_ge(r, &tmpa); #endif /* remaining loop iterations */ for (i = WNAF_SIZE(WINDOW_A - 1) - 1; i >= 0; i--) { @@ -202,59 +183,57 @@ static void secp256k1_ecmult_const(secp256k1_gej *r, const secp256k1_ge *a, cons for (j = 0; j < WINDOW_A - 1; ++j) { secp256k1_gej_double_nonzero(r, r, NULL); } -#ifdef USE_ENDOMORPHISM + n = wnaf_1[i]; ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); VERIFY_CHECK(n != 0); secp256k1_gej_add_ge(r, r, &tmpa); - +#ifdef USE_ENDOMORPHISM n = wnaf_lam[i]; ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a_lam, n, WINDOW_A); VERIFY_CHECK(n != 0); secp256k1_gej_add_ge(r, r, &tmpa); -#else - n = wnaf[i]; - VERIFY_CHECK(n != 0); - ECMULT_CONST_TABLE_GET_GE(&tmpa, pre_a, n, WINDOW_A); - secp256k1_gej_add_ge(r, r, &tmpa); #endif } secp256k1_fe_mul(&r->z, &r->z, &Z); -#ifdef USE_ENDOMORPHISM { /* Correct for wNAF skew */ secp256k1_ge correction = *a; secp256k1_ge_storage correction_1_stor; +#ifdef USE_ENDOMORPHISM secp256k1_ge_storage correction_lam_stor; +#endif secp256k1_ge_storage a2_stor; secp256k1_gej tmpj; secp256k1_gej_set_ge(&tmpj, &correction); secp256k1_gej_double_var(&tmpj, &tmpj, NULL); secp256k1_ge_set_gej(&correction, &tmpj); secp256k1_ge_to_storage(&correction_1_stor, a); +#ifdef USE_ENDOMORPHISM secp256k1_ge_to_storage(&correction_lam_stor, a); +#endif secp256k1_ge_to_storage(&a2_stor, &correction); /* For odd numbers this is 2a (so replace it), for even ones a (so no-op) */ secp256k1_ge_storage_cmov(&correction_1_stor, &a2_stor, skew_1 == 2); +#ifdef USE_ENDOMORPHISM secp256k1_ge_storage_cmov(&correction_lam_stor, &a2_stor, skew_lam == 2); +#endif /* Apply the correction */ secp256k1_ge_from_storage(&correction, &correction_1_stor); secp256k1_ge_neg(&correction, &correction); secp256k1_gej_add_ge(r, r, &correction); +#ifdef USE_ENDOMORPHISM secp256k1_ge_from_storage(&correction, &correction_lam_stor); secp256k1_ge_neg(&correction, &correction); secp256k1_ge_mul_lambda(&correction, &correction); secp256k1_gej_add_ge(r, r, &correction); - } -#else - /* correct for zero */ - r->infinity |= is_zero; #endif + } } #endif diff --git a/src/ecmult_gen_impl.h b/src/ecmult_gen_impl.h index b63c4d8662c..35f25460773 100644 --- a/src/ecmult_gen_impl.h +++ b/src/ecmult_gen_impl.h @@ -77,7 +77,7 @@ static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context *ctx secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej, NULL); } } - secp256k1_ge_set_all_gej_var(1024, prec, precj, cb); + secp256k1_ge_set_all_gej_var(prec, precj, 1024, cb); } for (j = 0; j < 64; j++) { for (i = 0; i < 16; i++) { diff --git a/src/ecmult_impl.h b/src/ecmult_impl.h index e6e5f471880..4e40104ad43 100644 --- a/src/ecmult_impl.h +++ b/src/ecmult_impl.h @@ -7,13 +7,29 @@ #ifndef _SECP256K1_ECMULT_IMPL_H_ #define _SECP256K1_ECMULT_IMPL_H_ +#include + #include "group.h" #include "scalar.h" #include "ecmult.h" +#if defined(EXHAUSTIVE_TEST_ORDER) +/* We need to lower these values for exhaustive tests because + * the tables cannot have infinities in them (this breaks the + * affine-isomorphism stuff which tracks z-ratios) */ +# if EXHAUSTIVE_TEST_ORDER > 128 +# define WINDOW_A 5 +# define WINDOW_G 8 +# elif EXHAUSTIVE_TEST_ORDER > 8 +# define WINDOW_A 4 +# define WINDOW_G 4 +# else +# define WINDOW_A 2 +# define WINDOW_G 2 +# endif +#else /* optimal for 128-bit and 256-bit exponents. */ #define WINDOW_A 5 - /** larger numbers may result in slightly better performance, at the cost of exponentially larger precomputed tables. */ #ifdef USE_ENDOMORPHISM @@ -23,6 +39,7 @@ /** One table for window size 16: 1.375 MiB. */ #define WINDOW_G 16 #endif +#endif /** The number of entries a table with precomputed multiples needs to have. */ #define ECMULT_TABLE_SIZE(w) (1 << ((w)-2)) @@ -101,7 +118,7 @@ static void secp256k1_ecmult_odd_multiples_table_storage_var(int n, secp256k1_ge /* Compute the odd multiples in Jacobian form. */ secp256k1_ecmult_odd_multiples_table(n, prej, zr, a); /* Convert them in batch to affine coordinates. */ - secp256k1_ge_set_table_gej_var(n, prea, prej, zr); + secp256k1_ge_set_table_gej_var(prea, prej, zr, n); /* Convert them to compact storage form. */ for (i = 0; i < n; i++) { secp256k1_ge_to_storage(&pre[i], &prea[i]); diff --git a/src/field.h b/src/field.h index 2d52af5e366..bbb1ee866cc 100644 --- a/src/field.h +++ b/src/field.h @@ -30,6 +30,8 @@ #error "Please select field implementation" #endif +#include "util.h" + /** Normalize a field element. */ static void secp256k1_fe_normalize(secp256k1_fe *r); @@ -50,6 +52,9 @@ static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r); /** Set a field element equal to a small integer. Resulting field element is normalized. */ static void secp256k1_fe_set_int(secp256k1_fe *r, int a); +/** Sets a field element equal to zero, initializing all fields. */ +static void secp256k1_fe_clear(secp256k1_fe *a); + /** Verify whether a field element is zero. Requires the input to be normalized. */ static int secp256k1_fe_is_zero(const secp256k1_fe *a); @@ -57,6 +62,9 @@ static int secp256k1_fe_is_zero(const secp256k1_fe *a); static int secp256k1_fe_is_odd(const secp256k1_fe *a); /** Compare two field elements. Requires magnitude-1 inputs. */ +static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b); + +/** Same as secp256k1_fe_equal, but may be variable time. */ static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b); /** Compare two field elements. Requires both inputs to be normalized */ @@ -92,7 +100,10 @@ static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a); * The input's magnitude can be at most 8. The output magnitude is 1 (but not * guaranteed to be normalized). The result in r will always be a square * itself. */ -static int secp256k1_fe_sqrt_var(secp256k1_fe *r, const secp256k1_fe *a); +static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a); + +/** Checks whether a field element is a quadratic residue. */ +static int secp256k1_fe_is_quad_var(const secp256k1_fe *a); /** Sets a field element to be the (modular) inverse of another. Requires the input's magnitude to be * at most 8. The output magnitude is 1 (but not guaranteed to be normalized). */ @@ -104,7 +115,7 @@ static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a); /** Calculate the (modular) inverses of a batch of field elements. Requires the inputs' magnitudes to be * at most 8. The output magnitudes are 1 (but not guaranteed to be normalized). The inputs and * outputs must not overlap in memory. */ -static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k1_fe *a); +static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len); /** Convert a field element to the storage type. */ static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a); diff --git a/src/field_10x26_impl.h b/src/field_10x26_impl.h index 212cc5396af..7b8c0796084 100644 --- a/src/field_10x26_impl.h +++ b/src/field_10x26_impl.h @@ -7,8 +7,6 @@ #ifndef _SECP256K1_FIELD_REPR_IMPL_H_ #define _SECP256K1_FIELD_REPR_IMPL_H_ -#include -#include #include "util.h" #include "num.h" #include "field.h" @@ -429,6 +427,14 @@ SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_f #endif } +#if defined(USE_EXTERNAL_ASM) + +/* External assembler implementation */ +void secp256k1_fe_mul_inner(uint32_t *r, const uint32_t *a, const uint32_t * SECP256K1_RESTRICT b); +void secp256k1_fe_sqr_inner(uint32_t *r, const uint32_t *a); + +#else + #ifdef VERIFY #define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0) #else @@ -1037,7 +1043,7 @@ SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint32_t *r, const uint32_t VERIFY_BITS(r[2], 27); /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */ } - +#endif static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe * SECP256K1_RESTRICT b) { #ifdef VERIFY diff --git a/src/field_5x52_impl.h b/src/field_5x52_impl.h index b31e24ab811..7a99eb21ecc 100644 --- a/src/field_5x52_impl.h +++ b/src/field_5x52_impl.h @@ -11,7 +11,6 @@ #include "libsecp256k1-config.h" #endif -#include #include "util.h" #include "num.h" #include "field.h" diff --git a/src/field_5x52_int128_impl.h b/src/field_5x52_int128_impl.h index 9280bb5ea22..0bf22bdd3ec 100644 --- a/src/field_5x52_int128_impl.h +++ b/src/field_5x52_int128_impl.h @@ -137,7 +137,7 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t VERIFY_BITS(r[2], 52); VERIFY_BITS(c, 63); /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += d * R + t3;; + c += d * R + t3; VERIFY_BITS(c, 100); /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ r[3] = c & M; c >>= 52; @@ -259,7 +259,7 @@ SECP256K1_INLINE static void secp256k1_fe_sqr_inner(uint64_t *r, const uint64_t VERIFY_BITS(c, 63); /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ - c += d * R + t3;; + c += d * R + t3; VERIFY_BITS(c, 100); /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */ r[3] = c & M; c >>= 52; diff --git a/src/field_impl.h b/src/field_impl.h index 77f4aae2f97..5127b279bc7 100644 --- a/src/field_impl.h +++ b/src/field_impl.h @@ -21,6 +21,13 @@ #error "Please select field implementation" #endif +SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b) { + secp256k1_fe na; + secp256k1_fe_negate(&na, a, 1); + secp256k1_fe_add(&na, b); + return secp256k1_fe_normalizes_to_zero(&na); +} + SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b) { secp256k1_fe na; secp256k1_fe_negate(&na, a, 1); @@ -28,7 +35,7 @@ SECP256K1_INLINE static int secp256k1_fe_equal_var(const secp256k1_fe *a, const return secp256k1_fe_normalizes_to_zero_var(&na); } -static int secp256k1_fe_sqrt_var(secp256k1_fe *r, const secp256k1_fe *a) { +static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a) { /** Given that p is congruent to 3 mod 4, we can compute the square root of * a mod p as the (p+1)/4'th power of a. * @@ -123,7 +130,7 @@ static int secp256k1_fe_sqrt_var(secp256k1_fe *r, const secp256k1_fe *a) { /* Check that a square root was actually calculated */ secp256k1_fe_sqr(&t1, r); - return secp256k1_fe_equal_var(&t1, a); + return secp256k1_fe_equal(&t1, a); } static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a) { @@ -253,7 +260,7 @@ static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a) { #endif } -static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k1_fe *a) { +static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len) { secp256k1_fe u; size_t i; if (len < 1) { @@ -280,4 +287,29 @@ static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k r[0] = u; } +static int secp256k1_fe_is_quad_var(const secp256k1_fe *a) { +#ifndef USE_NUM_NONE + unsigned char b[32]; + secp256k1_num n; + secp256k1_num m; + /* secp256k1 field prime, value p defined in "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ + static const unsigned char prime[32] = { + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F + }; + + secp256k1_fe c = *a; + secp256k1_fe_normalize_var(&c); + secp256k1_fe_get_b32(b, &c); + secp256k1_num_set_bin(&n, b, 32); + secp256k1_num_set_bin(&m, prime, 32); + return secp256k1_num_jacobi(&n, &m) >= 0; +#else + secp256k1_fe r; + return secp256k1_fe_sqrt(&r, a); +#endif +} + #endif diff --git a/src/group.h b/src/group.h index ebfe1ca70cc..4957b248fe6 100644 --- a/src/group.h +++ b/src/group.h @@ -47,7 +47,7 @@ static void secp256k1_ge_set_xy(secp256k1_ge *r, const secp256k1_fe *x, const se * and a Y coordinate that is a quadratic residue modulo p. The return value * is true iff a coordinate with the given X coordinate exists. */ -static int secp256k1_ge_set_xquad_var(secp256k1_ge *r, const secp256k1_fe *x); +static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x); /** Set a group element (affine) equal to the point with the given X coordinate, and given oddness * for Y. Return value indicates whether the result is valid. */ @@ -65,12 +65,12 @@ static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a); static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a); /** Set a batch of group elements equal to the inputs given in jacobian coordinates */ -static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_callback *cb); +static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp256k1_callback *cb); /** Set a batch of group elements equal to the inputs given in jacobian * coordinates (with known z-ratios). zr must contain the known z-ratios such * that mul(a[i].z, zr[i+1]) == a[i+1].z. zr[0] is ignored. */ -static void secp256k1_ge_set_table_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr); +static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr, size_t len); /** Bring a batch inputs given in jacobian coordinates (with known z-ratios) to * the same global z "denominator". zr must contain the known z-ratios such @@ -94,6 +94,9 @@ static void secp256k1_gej_neg(secp256k1_gej *r, const secp256k1_gej *a); /** Check whether a group element is the point at infinity. */ static int secp256k1_gej_is_infinity(const secp256k1_gej *a); +/** Check whether a group element's y coordinate is a quadratic residue. */ +static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a); + /** Set r equal to the double of a. If rzr is not-NULL, r->z = a->z * *rzr (where infinity means an implicit z = 0). * a may not be zero. Constant time. */ static void secp256k1_gej_double_nonzero(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr); diff --git a/src/group_impl.h b/src/group_impl.h index 42e2f6e6ebf..2e192b62fd2 100644 --- a/src/group_impl.h +++ b/src/group_impl.h @@ -7,12 +7,57 @@ #ifndef _SECP256K1_GROUP_IMPL_H_ #define _SECP256K1_GROUP_IMPL_H_ -#include - #include "num.h" #include "field.h" #include "group.h" +/* These points can be generated in sage as follows: + * + * 0. Setup a worksheet with the following parameters. + * b = 4 # whatever CURVE_B will be set to + * F = FiniteField (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) + * C = EllipticCurve ([F (0), F (b)]) + * + * 1. Determine all the small orders available to you. (If there are + * no satisfactory ones, go back and change b.) + * print C.order().factor(limit=1000) + * + * 2. Choose an order as one of the prime factors listed in the above step. + * (You can also multiply some to get a composite order, though the + * tests will crash trying to invert scalars during signing.) We take a + * random point and scale it to drop its order to the desired value. + * There is some probability this won't work; just try again. + * order = 199 + * P = C.random_point() + * P = (int(P.order()) / int(order)) * P + * assert(P.order() == order) + * + * 3. Print the values. You'll need to use a vim macro or something to + * split the hex output into 4-byte chunks. + * print "%x %x" % P.xy() + */ +#if defined(EXHAUSTIVE_TEST_ORDER) +# if EXHAUSTIVE_TEST_ORDER == 199 +const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( + 0xFA7CC9A7, 0x0737F2DB, 0xA749DD39, 0x2B4FB069, + 0x3B017A7D, 0xA808C2F1, 0xFB12940C, 0x9EA66C18, + 0x78AC123A, 0x5ED8AEF3, 0x8732BC91, 0x1F3A2868, + 0x48DF246C, 0x808DAE72, 0xCFE52572, 0x7F0501ED +); + +const int CURVE_B = 4; +# elif EXHAUSTIVE_TEST_ORDER == 13 +const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( + 0xedc60018, 0xa51a786b, 0x2ea91f4d, 0x4c9416c0, + 0x9de54c3b, 0xa1316554, 0x6cf4345c, 0x7277ef15, + 0x54cb1b6b, 0xdc8c1273, 0x087844ea, 0x43f4603e, + 0x0eaf9a43, 0xf6effe55, 0x939f806d, 0x37adf8ac +); +const int CURVE_B = 2; +# else +# error No known generator for the specified exhaustive test group order. +# endif +#else /** Generator for secp256k1, value 'g' defined in * "Standards for Efficient Cryptography" (SEC2) 2.7.1. */ @@ -23,8 +68,11 @@ static const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST( 0xFD17B448UL, 0xA6855419UL, 0x9C47D08FUL, 0xFB10D4B8UL ); +const int CURVE_B = 7; +#endif + static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) { - secp256k1_fe zi2; + secp256k1_fe zi2; secp256k1_fe zi3; secp256k1_fe_sqr(&zi2, zi); secp256k1_fe_mul(&zi3, &zi2, zi); @@ -78,7 +126,7 @@ static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) { r->y = a->y; } -static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_callback *cb) { +static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp256k1_callback *cb) { secp256k1_fe *az; secp256k1_fe *azi; size_t i; @@ -91,7 +139,7 @@ static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp } azi = (secp256k1_fe *)checked_malloc(cb, sizeof(secp256k1_fe) * count); - secp256k1_fe_inv_all_var(count, azi, az); + secp256k1_fe_inv_all_var(azi, az, count); free(az); count = 0; @@ -104,7 +152,7 @@ static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp free(azi); } -static void secp256k1_ge_set_table_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr) { +static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr, size_t len) { size_t i = len - 1; secp256k1_fe zi; @@ -147,9 +195,15 @@ static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp static void secp256k1_gej_set_infinity(secp256k1_gej *r) { r->infinity = 1; - secp256k1_fe_set_int(&r->x, 0); - secp256k1_fe_set_int(&r->y, 0); - secp256k1_fe_set_int(&r->z, 0); + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); + secp256k1_fe_clear(&r->z); +} + +static void secp256k1_ge_set_infinity(secp256k1_ge *r) { + r->infinity = 1; + secp256k1_fe_clear(&r->x); + secp256k1_fe_clear(&r->y); } static void secp256k1_gej_clear(secp256k1_gej *r) { @@ -165,19 +219,19 @@ static void secp256k1_ge_clear(secp256k1_ge *r) { secp256k1_fe_clear(&r->y); } -static int secp256k1_ge_set_xquad_var(secp256k1_ge *r, const secp256k1_fe *x) { +static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x) { secp256k1_fe x2, x3, c; r->x = *x; secp256k1_fe_sqr(&x2, x); secp256k1_fe_mul(&x3, x, &x2); r->infinity = 0; - secp256k1_fe_set_int(&c, 7); + secp256k1_fe_set_int(&c, CURVE_B); secp256k1_fe_add(&c, &x3); - return secp256k1_fe_sqrt_var(&r->y, &c); + return secp256k1_fe_sqrt(&r->y, &c); } static int secp256k1_ge_set_xo_var(secp256k1_ge *r, const secp256k1_fe *x, int odd) { - if (!secp256k1_ge_set_xquad_var(r, x)) { + if (!secp256k1_ge_set_xquad(r, x)) { return 0; } secp256k1_fe_normalize_var(&r->y); @@ -230,7 +284,7 @@ static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) { secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); secp256k1_fe_sqr(&z2, &a->z); secp256k1_fe_sqr(&z6, &z2); secp256k1_fe_mul(&z6, &z6, &z2); - secp256k1_fe_mul_int(&z6, 7); + secp256k1_fe_mul_int(&z6, CURVE_B); secp256k1_fe_add(&x3, &z6); secp256k1_fe_normalize_weak(&x3); return secp256k1_fe_equal_var(&y2, &x3); @@ -244,18 +298,30 @@ static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) { /* y^2 = x^3 + 7 */ secp256k1_fe_sqr(&y2, &a->y); secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x); - secp256k1_fe_set_int(&c, 7); + secp256k1_fe_set_int(&c, CURVE_B); secp256k1_fe_add(&x3, &c); secp256k1_fe_normalize_weak(&x3); return secp256k1_fe_equal_var(&y2, &x3); } static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, secp256k1_fe *rzr) { - /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate */ + /* Operations: 3 mul, 4 sqr, 0 normalize, 12 mul_int/add/negate. + * + * Note that there is an implementation described at + * https://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l + * which trades a multiply for a square, but in practice this is actually slower, + * mainly because it requires more normalizations. + */ secp256k1_fe t1,t2,t3,t4; /** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity, * Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have * y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p. + * + * Having said this, if this function receives a point on a sextic twist, e.g. by + * a fault attack, it is possible for y to be 0. This happens for y^2 = x^3 + 6, + * since -6 does have a cube root mod p. For this point, this function will not set + * the infinity flag even though the point doubles to infinity, and the result + * point will be gibberish (z = 0 but infinity = 0). */ r->infinity = a->infinity; if (r->infinity) { @@ -623,4 +689,18 @@ static void secp256k1_ge_mul_lambda(secp256k1_ge *r, const secp256k1_ge *a) { } #endif +static int secp256k1_gej_has_quad_y_var(const secp256k1_gej *a) { + secp256k1_fe yz; + + if (a->infinity) { + return 0; + } + + /* We rely on the fact that the Jacobi symbol of 1 / a->z^3 is the same as + * that of a->z. Thus a->y / a->z^3 is a quadratic residue iff a->y * a->z + is */ + secp256k1_fe_mul(&yz, &a->y, &a->z); + return secp256k1_fe_is_quad_var(&yz); +} + #endif diff --git a/src/hash.h b/src/hash.h index 0ff01e63fa7..fca98cab9f8 100644 --- a/src/hash.h +++ b/src/hash.h @@ -11,7 +11,7 @@ #include typedef struct { - uint32_t s[32]; + uint32_t s[8]; uint32_t buf[16]; /* In big endian */ size_t bytes; } secp256k1_sha256_t; diff --git a/src/hash_impl.h b/src/hash_impl.h index ae55df6d8a2..b47e65f830a 100644 --- a/src/hash_impl.h +++ b/src/hash_impl.h @@ -269,15 +269,13 @@ static void secp256k1_rfc6979_hmac_sha256_finalize(secp256k1_rfc6979_hmac_sha256 rng->retry = 0; } - +#undef BE32 #undef Round -#undef sigma0 #undef sigma1 -#undef Sigma0 +#undef sigma0 #undef Sigma1 -#undef Ch +#undef Sigma0 #undef Maj -#undef ReadBE32 -#undef WriteBE32 +#undef Ch #endif diff --git a/src/java/org/bitcoin/NativeSecp256k1.java b/src/java/org/bitcoin/NativeSecp256k1.java index 90a498eaa2c..1c67802fba8 100644 --- a/src/java/org/bitcoin/NativeSecp256k1.java +++ b/src/java/org/bitcoin/NativeSecp256k1.java @@ -1,60 +1,446 @@ +/* + * Copyright 2013 Google Inc. + * Copyright 2014-2016 the libsecp256k1 contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.bitcoin; import java.nio.ByteBuffer; import java.nio.ByteOrder; +import java.math.BigInteger; import com.google.common.base.Preconditions; - +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import static org.bitcoin.NativeSecp256k1Util.*; /** - * This class holds native methods to handle ECDSA verification. - * You can find an example library that can be used for this at - * https://github.com/sipa/secp256k1 + *

This class holds native methods to handle ECDSA verification.

+ * + *

You can find an example library that can be used for this at https://github.com/bitcoin/secp256k1

+ * + *

To build secp256k1 for use with bitcoinj, run + * `./configure --enable-jni --enable-experimental --enable-module-ecdh` + * and `make` then copy `.libs/libsecp256k1.so` to your system library path + * or point the JVM to the folder containing it with -Djava.library.path + *

*/ public class NativeSecp256k1 { - public static final boolean enabled; - static { - boolean isEnabled = true; - try { - System.loadLibrary("javasecp256k1"); - } catch (UnsatisfiedLinkError e) { - isEnabled = false; - } - enabled = isEnabled; - } - + + private static final ReentrantReadWriteLock rwl = new ReentrantReadWriteLock(); + private static final Lock r = rwl.readLock(); + private static final Lock w = rwl.writeLock(); private static ThreadLocal nativeECDSABuffer = new ThreadLocal(); /** * Verifies the given secp256k1 signature in native code. * Calling when enabled == false is undefined (probably library not loaded) - * + * * @param data The data which was signed, must be exactly 32 bytes * @param signature The signature * @param pub The public key which did the signing */ - public static boolean verify(byte[] data, byte[] signature, byte[] pub) { + public static boolean verify(byte[] data, byte[] signature, byte[] pub) throws AssertFailException{ Preconditions.checkArgument(data.length == 32 && signature.length <= 520 && pub.length <= 520); ByteBuffer byteBuff = nativeECDSABuffer.get(); - if (byteBuff == null) { - byteBuff = ByteBuffer.allocateDirect(32 + 8 + 520 + 520); + if (byteBuff == null || byteBuff.capacity() < 520) { + byteBuff = ByteBuffer.allocateDirect(520); byteBuff.order(ByteOrder.nativeOrder()); nativeECDSABuffer.set(byteBuff); } byteBuff.rewind(); byteBuff.put(data); - byteBuff.putInt(signature.length); - byteBuff.putInt(pub.length); byteBuff.put(signature); byteBuff.put(pub); - return secp256k1_ecdsa_verify(byteBuff) == 1; + + byte[][] retByteArray; + + r.lock(); + try { + return secp256k1_ecdsa_verify(byteBuff, Secp256k1Context.getContext(), signature.length, pub.length) == 1; + } finally { + r.unlock(); + } + } + + /** + * libsecp256k1 Create an ECDSA signature. + * + * @param data Message hash, 32 bytes + * @param key Secret key, 32 bytes + * + * Return values + * @param sig byte array of signature + */ + public static byte[] sign(byte[] data, byte[] sec) throws AssertFailException{ + Preconditions.checkArgument(data.length == 32 && sec.length <= 32); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < 32 + 32) { + byteBuff = ByteBuffer.allocateDirect(32 + 32); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(data); + byteBuff.put(sec); + + byte[][] retByteArray; + + r.lock(); + try { + retByteArray = secp256k1_ecdsa_sign(byteBuff, Secp256k1Context.getContext()); + } finally { + r.unlock(); + } + + byte[] sigArr = retByteArray[0]; + int sigLen = new BigInteger(new byte[] { retByteArray[1][0] }).intValue(); + int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue(); + + assertEquals(sigArr.length, sigLen, "Got bad signature length."); + + return retVal == 0 ? new byte[0] : sigArr; + } + + /** + * libsecp256k1 Seckey Verify - returns 1 if valid, 0 if invalid + * + * @param seckey ECDSA Secret key, 32 bytes + */ + public static boolean secKeyVerify(byte[] seckey) { + Preconditions.checkArgument(seckey.length == 32); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < seckey.length) { + byteBuff = ByteBuffer.allocateDirect(seckey.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(seckey); + + r.lock(); + try { + return secp256k1_ec_seckey_verify(byteBuff,Secp256k1Context.getContext()) == 1; + } finally { + r.unlock(); + } + } + + + /** + * libsecp256k1 Compute Pubkey - computes public key from secret key + * + * @param seckey ECDSA Secret key, 32 bytes + * + * Return values + * @param pubkey ECDSA Public key, 33 or 65 bytes + */ + //TODO add a 'compressed' arg + public static byte[] computePubkey(byte[] seckey) throws AssertFailException{ + Preconditions.checkArgument(seckey.length == 32); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < seckey.length) { + byteBuff = ByteBuffer.allocateDirect(seckey.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(seckey); + + byte[][] retByteArray; + + r.lock(); + try { + retByteArray = secp256k1_ec_pubkey_create(byteBuff, Secp256k1Context.getContext()); + } finally { + r.unlock(); + } + + byte[] pubArr = retByteArray[0]; + int pubLen = new BigInteger(new byte[] { retByteArray[1][0] }).intValue(); + int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue(); + + assertEquals(pubArr.length, pubLen, "Got bad pubkey length."); + + return retVal == 0 ? new byte[0]: pubArr; + } + + /** + * libsecp256k1 Cleanup - This destroys the secp256k1 context object + * This should be called at the end of the program for proper cleanup of the context. + */ + public static synchronized void cleanup() { + w.lock(); + try { + secp256k1_destroy_context(Secp256k1Context.getContext()); + } finally { + w.unlock(); + } + } + + public static long cloneContext() { + r.lock(); + try { + return secp256k1_ctx_clone(Secp256k1Context.getContext()); + } finally { r.unlock(); } + } + + /** + * libsecp256k1 PrivKey Tweak-Mul - Tweak privkey by multiplying to it + * + * @param tweak some bytes to tweak with + * @param seckey 32-byte seckey + */ + public static byte[] privKeyTweakMul(byte[] privkey, byte[] tweak) throws AssertFailException{ + Preconditions.checkArgument(privkey.length == 32); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < privkey.length + tweak.length) { + byteBuff = ByteBuffer.allocateDirect(privkey.length + tweak.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(privkey); + byteBuff.put(tweak); + + byte[][] retByteArray; + r.lock(); + try { + retByteArray = secp256k1_privkey_tweak_mul(byteBuff,Secp256k1Context.getContext()); + } finally { + r.unlock(); + } + + byte[] privArr = retByteArray[0]; + + int privLen = (byte) new BigInteger(new byte[] { retByteArray[1][0] }).intValue() & 0xFF; + int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue(); + + assertEquals(privArr.length, privLen, "Got bad pubkey length."); + + assertEquals(retVal, 1, "Failed return value check."); + + return privArr; + } + + /** + * libsecp256k1 PrivKey Tweak-Add - Tweak privkey by adding to it + * + * @param tweak some bytes to tweak with + * @param seckey 32-byte seckey + */ + public static byte[] privKeyTweakAdd(byte[] privkey, byte[] tweak) throws AssertFailException{ + Preconditions.checkArgument(privkey.length == 32); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < privkey.length + tweak.length) { + byteBuff = ByteBuffer.allocateDirect(privkey.length + tweak.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(privkey); + byteBuff.put(tweak); + + byte[][] retByteArray; + r.lock(); + try { + retByteArray = secp256k1_privkey_tweak_add(byteBuff,Secp256k1Context.getContext()); + } finally { + r.unlock(); + } + + byte[] privArr = retByteArray[0]; + + int privLen = (byte) new BigInteger(new byte[] { retByteArray[1][0] }).intValue() & 0xFF; + int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue(); + + assertEquals(privArr.length, privLen, "Got bad pubkey length."); + + assertEquals(retVal, 1, "Failed return value check."); + + return privArr; + } + + /** + * libsecp256k1 PubKey Tweak-Add - Tweak pubkey by adding to it + * + * @param tweak some bytes to tweak with + * @param pubkey 32-byte seckey + */ + public static byte[] pubKeyTweakAdd(byte[] pubkey, byte[] tweak) throws AssertFailException{ + Preconditions.checkArgument(pubkey.length == 33 || pubkey.length == 65); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < pubkey.length + tweak.length) { + byteBuff = ByteBuffer.allocateDirect(pubkey.length + tweak.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(pubkey); + byteBuff.put(tweak); + + byte[][] retByteArray; + r.lock(); + try { + retByteArray = secp256k1_pubkey_tweak_add(byteBuff,Secp256k1Context.getContext(), pubkey.length); + } finally { + r.unlock(); + } + + byte[] pubArr = retByteArray[0]; + + int pubLen = (byte) new BigInteger(new byte[] { retByteArray[1][0] }).intValue() & 0xFF; + int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue(); + + assertEquals(pubArr.length, pubLen, "Got bad pubkey length."); + + assertEquals(retVal, 1, "Failed return value check."); + + return pubArr; + } + + /** + * libsecp256k1 PubKey Tweak-Mul - Tweak pubkey by multiplying to it + * + * @param tweak some bytes to tweak with + * @param pubkey 32-byte seckey + */ + public static byte[] pubKeyTweakMul(byte[] pubkey, byte[] tweak) throws AssertFailException{ + Preconditions.checkArgument(pubkey.length == 33 || pubkey.length == 65); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < pubkey.length + tweak.length) { + byteBuff = ByteBuffer.allocateDirect(pubkey.length + tweak.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(pubkey); + byteBuff.put(tweak); + + byte[][] retByteArray; + r.lock(); + try { + retByteArray = secp256k1_pubkey_tweak_mul(byteBuff,Secp256k1Context.getContext(), pubkey.length); + } finally { + r.unlock(); + } + + byte[] pubArr = retByteArray[0]; + + int pubLen = (byte) new BigInteger(new byte[] { retByteArray[1][0] }).intValue() & 0xFF; + int retVal = new BigInteger(new byte[] { retByteArray[1][1] }).intValue(); + + assertEquals(pubArr.length, pubLen, "Got bad pubkey length."); + + assertEquals(retVal, 1, "Failed return value check."); + + return pubArr; } /** - * @param byteBuff signature format is byte[32] data, - * native-endian int signatureLength, native-endian int pubkeyLength, - * byte[signatureLength] signature, byte[pubkeyLength] pub - * @returns 1 for valid signature, anything else for invalid + * libsecp256k1 create ECDH secret - constant time ECDH calculation + * + * @param seckey byte array of secret key used in exponentiaion + * @param pubkey byte array of public key used in exponentiaion */ - private static native int secp256k1_ecdsa_verify(ByteBuffer byteBuff); + public static byte[] createECDHSecret(byte[] seckey, byte[] pubkey) throws AssertFailException{ + Preconditions.checkArgument(seckey.length <= 32 && pubkey.length <= 65); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < 32 + pubkey.length) { + byteBuff = ByteBuffer.allocateDirect(32 + pubkey.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(seckey); + byteBuff.put(pubkey); + + byte[][] retByteArray; + r.lock(); + try { + retByteArray = secp256k1_ecdh(byteBuff, Secp256k1Context.getContext(), pubkey.length); + } finally { + r.unlock(); + } + + byte[] resArr = retByteArray[0]; + int retVal = new BigInteger(new byte[] { retByteArray[1][0] }).intValue(); + + assertEquals(resArr.length, 32, "Got bad result length."); + assertEquals(retVal, 1, "Failed return value check."); + + return resArr; + } + + /** + * libsecp256k1 randomize - updates the context randomization + * + * @param seed 32-byte random seed + */ + public static synchronized boolean randomize(byte[] seed) throws AssertFailException{ + Preconditions.checkArgument(seed.length == 32 || seed == null); + + ByteBuffer byteBuff = nativeECDSABuffer.get(); + if (byteBuff == null || byteBuff.capacity() < seed.length) { + byteBuff = ByteBuffer.allocateDirect(seed.length); + byteBuff.order(ByteOrder.nativeOrder()); + nativeECDSABuffer.set(byteBuff); + } + byteBuff.rewind(); + byteBuff.put(seed); + + w.lock(); + try { + return secp256k1_context_randomize(byteBuff, Secp256k1Context.getContext()) == 1; + } finally { + w.unlock(); + } + } + + private static native long secp256k1_ctx_clone(long context); + + private static native int secp256k1_context_randomize(ByteBuffer byteBuff, long context); + + private static native byte[][] secp256k1_privkey_tweak_add(ByteBuffer byteBuff, long context); + + private static native byte[][] secp256k1_privkey_tweak_mul(ByteBuffer byteBuff, long context); + + private static native byte[][] secp256k1_pubkey_tweak_add(ByteBuffer byteBuff, long context, int pubLen); + + private static native byte[][] secp256k1_pubkey_tweak_mul(ByteBuffer byteBuff, long context, int pubLen); + + private static native void secp256k1_destroy_context(long context); + + private static native int secp256k1_ecdsa_verify(ByteBuffer byteBuff, long context, int sigLen, int pubLen); + + private static native byte[][] secp256k1_ecdsa_sign(ByteBuffer byteBuff, long context); + + private static native int secp256k1_ec_seckey_verify(ByteBuffer byteBuff, long context); + + private static native byte[][] secp256k1_ec_pubkey_create(ByteBuffer byteBuff, long context); + + private static native byte[][] secp256k1_ec_pubkey_parse(ByteBuffer byteBuff, long context, int inputLen); + + private static native byte[][] secp256k1_ecdh(ByteBuffer byteBuff, long context, int inputLen); + } diff --git a/src/java/org/bitcoin/NativeSecp256k1Test.java b/src/java/org/bitcoin/NativeSecp256k1Test.java new file mode 100644 index 00000000000..c00d08899b9 --- /dev/null +++ b/src/java/org/bitcoin/NativeSecp256k1Test.java @@ -0,0 +1,226 @@ +package org.bitcoin; + +import com.google.common.io.BaseEncoding; +import java.util.Arrays; +import java.math.BigInteger; +import javax.xml.bind.DatatypeConverter; +import static org.bitcoin.NativeSecp256k1Util.*; + +/** + * This class holds test cases defined for testing this library. + */ +public class NativeSecp256k1Test { + + //TODO improve comments/add more tests + /** + * This tests verify() for a valid signature + */ + public static void testVerifyPos() throws AssertFailException{ + boolean result = false; + byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A90".toLowerCase()); //sha256hash of "testing" + byte[] sig = BaseEncoding.base16().lowerCase().decode("3044022079BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817980220294F14E883B3F525B5367756C2A11EF6CF84B730B36C17CB0C56F0AAB2C98589".toLowerCase()); + byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase()); + + result = NativeSecp256k1.verify( data, sig, pub); + assertEquals( result, true , "testVerifyPos"); + } + + /** + * This tests verify() for a non-valid signature + */ + public static void testVerifyNeg() throws AssertFailException{ + boolean result = false; + byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A91".toLowerCase()); //sha256hash of "testing" + byte[] sig = BaseEncoding.base16().lowerCase().decode("3044022079BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F817980220294F14E883B3F525B5367756C2A11EF6CF84B730B36C17CB0C56F0AAB2C98589".toLowerCase()); + byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase()); + + result = NativeSecp256k1.verify( data, sig, pub); + //System.out.println(" TEST " + new BigInteger(1, resultbytes).toString(16)); + assertEquals( result, false , "testVerifyNeg"); + } + + /** + * This tests secret key verify() for a valid secretkey + */ + public static void testSecKeyVerifyPos() throws AssertFailException{ + boolean result = false; + byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase()); + + result = NativeSecp256k1.secKeyVerify( sec ); + //System.out.println(" TEST " + new BigInteger(1, resultbytes).toString(16)); + assertEquals( result, true , "testSecKeyVerifyPos"); + } + + /** + * This tests secret key verify() for a invalid secretkey + */ + public static void testSecKeyVerifyNeg() throws AssertFailException{ + boolean result = false; + byte[] sec = BaseEncoding.base16().lowerCase().decode("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF".toLowerCase()); + + result = NativeSecp256k1.secKeyVerify( sec ); + //System.out.println(" TEST " + new BigInteger(1, resultbytes).toString(16)); + assertEquals( result, false , "testSecKeyVerifyNeg"); + } + + /** + * This tests public key create() for a valid secretkey + */ + public static void testPubKeyCreatePos() throws AssertFailException{ + byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase()); + + byte[] resultArr = NativeSecp256k1.computePubkey( sec); + String pubkeyString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( pubkeyString , "04C591A8FF19AC9C4E4E5793673B83123437E975285E7B442F4EE2654DFFCA5E2D2103ED494718C697AC9AEBCFD19612E224DB46661011863ED2FC54E71861E2A6" , "testPubKeyCreatePos"); + } + + /** + * This tests public key create() for a invalid secretkey + */ + public static void testPubKeyCreateNeg() throws AssertFailException{ + byte[] sec = BaseEncoding.base16().lowerCase().decode("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF".toLowerCase()); + + byte[] resultArr = NativeSecp256k1.computePubkey( sec); + String pubkeyString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( pubkeyString, "" , "testPubKeyCreateNeg"); + } + + /** + * This tests sign() for a valid secretkey + */ + public static void testSignPos() throws AssertFailException{ + + byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A90".toLowerCase()); //sha256hash of "testing" + byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase()); + + byte[] resultArr = NativeSecp256k1.sign(data, sec); + String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( sigString, "30440220182A108E1448DC8F1FB467D06A0F3BB8EA0533584CB954EF8DA112F1D60E39A202201C66F36DA211C087F3AF88B50EDF4F9BDAA6CF5FD6817E74DCA34DB12390C6E9" , "testSignPos"); + } + + /** + * This tests sign() for a invalid secretkey + */ + public static void testSignNeg() throws AssertFailException{ + byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A90".toLowerCase()); //sha256hash of "testing" + byte[] sec = BaseEncoding.base16().lowerCase().decode("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF".toLowerCase()); + + byte[] resultArr = NativeSecp256k1.sign(data, sec); + String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( sigString, "" , "testSignNeg"); + } + + /** + * This tests private key tweak-add + */ + public static void testPrivKeyTweakAdd_1() throws AssertFailException { + byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase()); + byte[] data = BaseEncoding.base16().lowerCase().decode("3982F19BEF1615BCCFBB05E321C10E1D4CBA3DF0E841C2E41EEB6016347653C3".toLowerCase()); //sha256hash of "tweak" + + byte[] resultArr = NativeSecp256k1.privKeyTweakAdd( sec , data ); + String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( sigString , "A168571E189E6F9A7E2D657A4B53AE99B909F7E712D1C23CED28093CD57C88F3" , "testPrivKeyAdd_1"); + } + + /** + * This tests private key tweak-mul + */ + public static void testPrivKeyTweakMul_1() throws AssertFailException { + byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase()); + byte[] data = BaseEncoding.base16().lowerCase().decode("3982F19BEF1615BCCFBB05E321C10E1D4CBA3DF0E841C2E41EEB6016347653C3".toLowerCase()); //sha256hash of "tweak" + + byte[] resultArr = NativeSecp256k1.privKeyTweakMul( sec , data ); + String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( sigString , "97F8184235F101550F3C71C927507651BD3F1CDB4A5A33B8986ACF0DEE20FFFC" , "testPrivKeyMul_1"); + } + + /** + * This tests private key tweak-add uncompressed + */ + public static void testPrivKeyTweakAdd_2() throws AssertFailException { + byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase()); + byte[] data = BaseEncoding.base16().lowerCase().decode("3982F19BEF1615BCCFBB05E321C10E1D4CBA3DF0E841C2E41EEB6016347653C3".toLowerCase()); //sha256hash of "tweak" + + byte[] resultArr = NativeSecp256k1.pubKeyTweakAdd( pub , data ); + String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( sigString , "0411C6790F4B663CCE607BAAE08C43557EDC1A4D11D88DFCB3D841D0C6A941AF525A268E2A863C148555C48FB5FBA368E88718A46E205FABC3DBA2CCFFAB0796EF" , "testPrivKeyAdd_2"); + } + + /** + * This tests private key tweak-mul uncompressed + */ + public static void testPrivKeyTweakMul_2() throws AssertFailException { + byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase()); + byte[] data = BaseEncoding.base16().lowerCase().decode("3982F19BEF1615BCCFBB05E321C10E1D4CBA3DF0E841C2E41EEB6016347653C3".toLowerCase()); //sha256hash of "tweak" + + byte[] resultArr = NativeSecp256k1.pubKeyTweakMul( pub , data ); + String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( sigString , "04E0FE6FE55EBCA626B98A807F6CAF654139E14E5E3698F01A9A658E21DC1D2791EC060D4F412A794D5370F672BC94B722640B5F76914151CFCA6E712CA48CC589" , "testPrivKeyMul_2"); + } + + /** + * This tests seed randomization + */ + public static void testRandomize() throws AssertFailException { + byte[] seed = BaseEncoding.base16().lowerCase().decode("A441B15FE9A3CF56661190A0B93B9DEC7D04127288CC87250967CF3B52894D11".toLowerCase()); //sha256hash of "random" + boolean result = NativeSecp256k1.randomize(seed); + assertEquals( result, true, "testRandomize"); + } + + public static void testCreateECDHSecret() throws AssertFailException{ + + byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase()); + byte[] pub = BaseEncoding.base16().lowerCase().decode("040A629506E1B65CD9D2E0BA9C75DF9C4FED0DB16DC9625ED14397F0AFC836FAE595DC53F8B0EFE61E703075BD9B143BAC75EC0E19F82A2208CAEB32BE53414C40".toLowerCase()); + + byte[] resultArr = NativeSecp256k1.createECDHSecret(sec, pub); + String ecdhString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr); + assertEquals( ecdhString, "2A2A67007A926E6594AF3EB564FC74005B37A9C8AEF2033C4552051B5C87F043" , "testCreateECDHSecret"); + } + + public static void main(String[] args) throws AssertFailException{ + + + System.out.println("\n libsecp256k1 enabled: " + Secp256k1Context.isEnabled() + "\n"); + + assertEquals( Secp256k1Context.isEnabled(), true, "isEnabled" ); + + //Test verify() success/fail + testVerifyPos(); + testVerifyNeg(); + + //Test secKeyVerify() success/fail + testSecKeyVerifyPos(); + testSecKeyVerifyNeg(); + + //Test computePubkey() success/fail + testPubKeyCreatePos(); + testPubKeyCreateNeg(); + + //Test sign() success/fail + testSignPos(); + testSignNeg(); + + //Test privKeyTweakAdd() 1 + testPrivKeyTweakAdd_1(); + + //Test privKeyTweakMul() 2 + testPrivKeyTweakMul_1(); + + //Test privKeyTweakAdd() 3 + testPrivKeyTweakAdd_2(); + + //Test privKeyTweakMul() 4 + testPrivKeyTweakMul_2(); + + //Test randomize() + testRandomize(); + + //Test ECDH + testCreateECDHSecret(); + + NativeSecp256k1.cleanup(); + + System.out.println(" All tests passed." ); + + } +} diff --git a/src/java/org/bitcoin/NativeSecp256k1Util.java b/src/java/org/bitcoin/NativeSecp256k1Util.java new file mode 100644 index 00000000000..04732ba0443 --- /dev/null +++ b/src/java/org/bitcoin/NativeSecp256k1Util.java @@ -0,0 +1,45 @@ +/* + * Copyright 2014-2016 the libsecp256k1 contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.bitcoin; + +public class NativeSecp256k1Util{ + + public static void assertEquals( int val, int val2, String message ) throws AssertFailException{ + if( val != val2 ) + throw new AssertFailException("FAIL: " + message); + } + + public static void assertEquals( boolean val, boolean val2, String message ) throws AssertFailException{ + if( val != val2 ) + throw new AssertFailException("FAIL: " + message); + else + System.out.println("PASS: " + message); + } + + public static void assertEquals( String val, String val2, String message ) throws AssertFailException{ + if( !val.equals(val2) ) + throw new AssertFailException("FAIL: " + message); + else + System.out.println("PASS: " + message); + } + + public static class AssertFailException extends Exception { + public AssertFailException(String message) { + super( message ); + } + } +} diff --git a/src/java/org/bitcoin/Secp256k1Context.java b/src/java/org/bitcoin/Secp256k1Context.java new file mode 100644 index 00000000000..216c986a8b5 --- /dev/null +++ b/src/java/org/bitcoin/Secp256k1Context.java @@ -0,0 +1,51 @@ +/* + * Copyright 2014-2016 the libsecp256k1 contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.bitcoin; + +/** + * This class holds the context reference used in native methods + * to handle ECDSA operations. + */ +public class Secp256k1Context { + private static final boolean enabled; //true if the library is loaded + private static final long context; //ref to pointer to context obj + + static { //static initializer + boolean isEnabled = true; + long contextRef = -1; + try { + System.loadLibrary("secp256k1"); + contextRef = secp256k1_init_context(); + } catch (UnsatisfiedLinkError e) { + System.out.println("UnsatisfiedLinkError: " + e.toString()); + isEnabled = false; + } + enabled = isEnabled; + context = contextRef; + } + + public static boolean isEnabled() { + return enabled; + } + + public static long getContext() { + if(!enabled) return -1; //sanity check + return context; + } + + private static native long secp256k1_init_context(); +} diff --git a/src/java/org_bitcoin_NativeSecp256k1.c b/src/java/org_bitcoin_NativeSecp256k1.c index bb4cd707280..bcef7b32ce3 100644 --- a/src/java/org_bitcoin_NativeSecp256k1.c +++ b/src/java/org_bitcoin_NativeSecp256k1.c @@ -1,23 +1,377 @@ +#include +#include +#include #include "org_bitcoin_NativeSecp256k1.h" #include "include/secp256k1.h" +#include "include/secp256k1_ecdh.h" +#include "include/secp256k1_recovery.h" -JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify - (JNIEnv* env, jclass classObject, jobject byteBufferObject) + +SECP256K1_API jlong JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ctx_1clone + (JNIEnv* env, jclass classObject, jlong ctx_l) +{ + const secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + + jlong ctx_clone_l = (uintptr_t) secp256k1_context_clone(ctx); + + (void)classObject;(void)env; + + return ctx_clone_l; + +} + +SECP256K1_API jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1context_1randomize + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l) { - unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); - int sigLen = *((int*)(data + 32)); - int pubLen = *((int*)(data + 32 + 4)); + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + + const unsigned char* seed = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + + (void)classObject; + + return secp256k1_context_randomize(ctx, seed); - return secp256k1_ecdsa_verify(data, 32, data+32+8, sigLen, data+32+8+sigLen, pubLen); } -static void __javasecp256k1_attach(void) __attribute__((constructor)); -static void __javasecp256k1_detach(void) __attribute__((destructor)); +SECP256K1_API void JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1destroy_1context + (JNIEnv* env, jclass classObject, jlong ctx_l) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + + secp256k1_context_destroy(ctx); -static void __javasecp256k1_attach(void) { - secp256k1_start(SECP256K1_START_VERIFY); + (void)classObject;(void)env; } -static void __javasecp256k1_detach(void) { - secp256k1_stop(); +SECP256K1_API jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint siglen, jint publen) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + + unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + const unsigned char* sigdata = { (unsigned char*) (data + 32) }; + const unsigned char* pubdata = { (unsigned char*) (data + siglen + 32) }; + + secp256k1_ecdsa_signature sig; + secp256k1_pubkey pubkey; + + int ret = secp256k1_ecdsa_signature_parse_der(ctx, &sig, sigdata, siglen); + + if( ret ) { + ret = secp256k1_ec_pubkey_parse(ctx, &pubkey, pubdata, publen); + + if( ret ) { + ret = secp256k1_ecdsa_verify(ctx, &sig, data, &pubkey); + } + } + + (void)classObject; + + return ret; +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1sign + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + unsigned char* secKey = (unsigned char*) (data + 32); + + jobjectArray retArray; + jbyteArray sigArray, intsByteArray; + unsigned char intsarray[2]; + + secp256k1_ecdsa_signature sig[72]; + + int ret = secp256k1_ecdsa_sign(ctx, sig, data, secKey, NULL, NULL ); + + unsigned char outputSer[72]; + size_t outputLen = 72; + + if( ret ) { + int ret2 = secp256k1_ecdsa_signature_serialize_der(ctx,outputSer, &outputLen, sig ); (void)ret2; + } + + intsarray[0] = outputLen; + intsarray[1] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + sigArray = (*env)->NewByteArray(env, outputLen); + (*env)->SetByteArrayRegion(env, sigArray, 0, outputLen, (jbyte*)outputSer); + (*env)->SetObjectArrayElement(env, retArray, 0, sigArray); + + intsByteArray = (*env)->NewByteArray(env, 2); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 2, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; +} + +SECP256K1_API jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ec_1seckey_1verify + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + unsigned char* secKey = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + + (void)classObject; + + return secp256k1_ec_seckey_verify(ctx, secKey); +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ec_1pubkey_1create + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + const unsigned char* secKey = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + + secp256k1_pubkey pubkey; + + jobjectArray retArray; + jbyteArray pubkeyArray, intsByteArray; + unsigned char intsarray[2]; + + int ret = secp256k1_ec_pubkey_create(ctx, &pubkey, secKey); + + unsigned char outputSer[65]; + size_t outputLen = 65; + + if( ret ) { + int ret2 = secp256k1_ec_pubkey_serialize(ctx,outputSer, &outputLen, &pubkey,SECP256K1_EC_UNCOMPRESSED );(void)ret2; + } + + intsarray[0] = outputLen; + intsarray[1] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + pubkeyArray = (*env)->NewByteArray(env, outputLen); + (*env)->SetByteArrayRegion(env, pubkeyArray, 0, outputLen, (jbyte*)outputSer); + (*env)->SetObjectArrayElement(env, retArray, 0, pubkeyArray); + + intsByteArray = (*env)->NewByteArray(env, 2); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 2, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; + +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1privkey_1tweak_1add + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + unsigned char* privkey = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + const unsigned char* tweak = (unsigned char*) (privkey + 32); + + jobjectArray retArray; + jbyteArray privArray, intsByteArray; + unsigned char intsarray[2]; + + int privkeylen = 32; + + int ret = secp256k1_ec_privkey_tweak_add(ctx, privkey, tweak); + + intsarray[0] = privkeylen; + intsarray[1] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + privArray = (*env)->NewByteArray(env, privkeylen); + (*env)->SetByteArrayRegion(env, privArray, 0, privkeylen, (jbyte*)privkey); + (*env)->SetObjectArrayElement(env, retArray, 0, privArray); + + intsByteArray = (*env)->NewByteArray(env, 2); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 2, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1privkey_1tweak_1mul + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + unsigned char* privkey = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject); + const unsigned char* tweak = (unsigned char*) (privkey + 32); + + jobjectArray retArray; + jbyteArray privArray, intsByteArray; + unsigned char intsarray[2]; + + int privkeylen = 32; + + int ret = secp256k1_ec_privkey_tweak_mul(ctx, privkey, tweak); + + intsarray[0] = privkeylen; + intsarray[1] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + privArray = (*env)->NewByteArray(env, privkeylen); + (*env)->SetByteArrayRegion(env, privArray, 0, privkeylen, (jbyte*)privkey); + (*env)->SetObjectArrayElement(env, retArray, 0, privArray); + + intsByteArray = (*env)->NewByteArray(env, 2); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 2, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1pubkey_1tweak_1add + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint publen) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; +/* secp256k1_pubkey* pubkey = (secp256k1_pubkey*) (*env)->GetDirectBufferAddress(env, byteBufferObject);*/ + unsigned char* pkey = (*env)->GetDirectBufferAddress(env, byteBufferObject); + const unsigned char* tweak = (unsigned char*) (pkey + publen); + + jobjectArray retArray; + jbyteArray pubArray, intsByteArray; + unsigned char intsarray[2]; + unsigned char outputSer[65]; + size_t outputLen = 65; + + secp256k1_pubkey pubkey; + int ret = secp256k1_ec_pubkey_parse(ctx, &pubkey, pkey, publen); + + if( ret ) { + ret = secp256k1_ec_pubkey_tweak_add(ctx, &pubkey, tweak); + } + + if( ret ) { + int ret2 = secp256k1_ec_pubkey_serialize(ctx,outputSer, &outputLen, &pubkey,SECP256K1_EC_UNCOMPRESSED );(void)ret2; + } + + intsarray[0] = outputLen; + intsarray[1] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + pubArray = (*env)->NewByteArray(env, outputLen); + (*env)->SetByteArrayRegion(env, pubArray, 0, outputLen, (jbyte*)outputSer); + (*env)->SetObjectArrayElement(env, retArray, 0, pubArray); + + intsByteArray = (*env)->NewByteArray(env, 2); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 2, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1pubkey_1tweak_1mul + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint publen) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + unsigned char* pkey = (*env)->GetDirectBufferAddress(env, byteBufferObject); + const unsigned char* tweak = (unsigned char*) (pkey + publen); + + jobjectArray retArray; + jbyteArray pubArray, intsByteArray; + unsigned char intsarray[2]; + unsigned char outputSer[65]; + size_t outputLen = 65; + + secp256k1_pubkey pubkey; + int ret = secp256k1_ec_pubkey_parse(ctx, &pubkey, pkey, publen); + + if ( ret ) { + ret = secp256k1_ec_pubkey_tweak_mul(ctx, &pubkey, tweak); + } + + if( ret ) { + int ret2 = secp256k1_ec_pubkey_serialize(ctx,outputSer, &outputLen, &pubkey,SECP256K1_EC_UNCOMPRESSED );(void)ret2; + } + + intsarray[0] = outputLen; + intsarray[1] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + pubArray = (*env)->NewByteArray(env, outputLen); + (*env)->SetByteArrayRegion(env, pubArray, 0, outputLen, (jbyte*)outputSer); + (*env)->SetObjectArrayElement(env, retArray, 0, pubArray); + + intsByteArray = (*env)->NewByteArray(env, 2); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 2, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; +} + +SECP256K1_API jlong JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1pubkey_1combine + (JNIEnv * env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint numkeys) +{ + (void)classObject;(void)env;(void)byteBufferObject;(void)ctx_l;(void)numkeys; + + return 0; +} + +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdh + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint publen) +{ + secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l; + const unsigned char* secdata = (*env)->GetDirectBufferAddress(env, byteBufferObject); + const unsigned char* pubdata = (const unsigned char*) (secdata + 32); + + jobjectArray retArray; + jbyteArray outArray, intsByteArray; + unsigned char intsarray[1]; + secp256k1_pubkey pubkey; + unsigned char nonce_res[32]; + size_t outputLen = 32; + + int ret = secp256k1_ec_pubkey_parse(ctx, &pubkey, pubdata, publen); + + if (ret) { + ret = secp256k1_ecdh( + ctx, + nonce_res, + &pubkey, + secdata + ); + } + + intsarray[0] = ret; + + retArray = (*env)->NewObjectArray(env, 2, + (*env)->FindClass(env, "[B"), + (*env)->NewByteArray(env, 1)); + + outArray = (*env)->NewByteArray(env, outputLen); + (*env)->SetByteArrayRegion(env, outArray, 0, 32, (jbyte*)nonce_res); + (*env)->SetObjectArrayElement(env, retArray, 0, outArray); + + intsByteArray = (*env)->NewByteArray(env, 1); + (*env)->SetByteArrayRegion(env, intsByteArray, 0, 1, (jbyte*)intsarray); + (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray); + + (void)classObject; + + return retArray; } diff --git a/src/java/org_bitcoin_NativeSecp256k1.h b/src/java/org_bitcoin_NativeSecp256k1.h index d7fb004fa84..fe613c9e9e7 100644 --- a/src/java/org_bitcoin_NativeSecp256k1.h +++ b/src/java/org_bitcoin_NativeSecp256k1.h @@ -1,5 +1,6 @@ /* DO NOT EDIT THIS FILE - it is machine generated */ #include +#include "include/secp256k1.h" /* Header for class org_bitcoin_NativeSecp256k1 */ #ifndef _Included_org_bitcoin_NativeSecp256k1 @@ -9,11 +10,108 @@ extern "C" { #endif /* * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ctx_clone + * Signature: (J)J + */ +SECP256K1_API jlong JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ctx_1clone + (JNIEnv *, jclass, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_context_randomize + * Signature: (Ljava/nio/ByteBuffer;J)I + */ +SECP256K1_API jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1context_1randomize + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_privkey_tweak_add + * Signature: (Ljava/nio/ByteBuffer;J)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1privkey_1tweak_1add + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_privkey_tweak_mul + * Signature: (Ljava/nio/ByteBuffer;J)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1privkey_1tweak_1mul + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_pubkey_tweak_add + * Signature: (Ljava/nio/ByteBuffer;JI)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1pubkey_1tweak_1add + (JNIEnv *, jclass, jobject, jlong, jint); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_pubkey_tweak_mul + * Signature: (Ljava/nio/ByteBuffer;JI)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1pubkey_1tweak_1mul + (JNIEnv *, jclass, jobject, jlong, jint); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_destroy_context + * Signature: (J)V + */ +SECP256K1_API void JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1destroy_1context + (JNIEnv *, jclass, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 * Method: secp256k1_ecdsa_verify - * Signature: (Ljava/nio/ByteBuffer;)I + * Signature: (Ljava/nio/ByteBuffer;JII)I + */ +SECP256K1_API jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify + (JNIEnv *, jclass, jobject, jlong, jint, jint); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ecdsa_sign + * Signature: (Ljava/nio/ByteBuffer;J)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1sign + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ec_seckey_verify + * Signature: (Ljava/nio/ByteBuffer;J)I + */ +SECP256K1_API jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ec_1seckey_1verify + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ec_pubkey_create + * Signature: (Ljava/nio/ByteBuffer;J)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ec_1pubkey_1create + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ec_pubkey_parse + * Signature: (Ljava/nio/ByteBuffer;JI)[[B + */ +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ec_1pubkey_1parse + (JNIEnv *, jclass, jobject, jlong, jint); + +/* + * Class: org_bitcoin_NativeSecp256k1 + * Method: secp256k1_ecdh + * Signature: (Ljava/nio/ByteBuffer;JI)[[B */ -JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify - (JNIEnv *, jclass, jobject); +SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdh + (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint publen); + #ifdef __cplusplus } diff --git a/src/java/org_bitcoin_Secp256k1Context.c b/src/java/org_bitcoin_Secp256k1Context.c new file mode 100644 index 00000000000..a52939e7e7d --- /dev/null +++ b/src/java/org_bitcoin_Secp256k1Context.c @@ -0,0 +1,15 @@ +#include +#include +#include "org_bitcoin_Secp256k1Context.h" +#include "include/secp256k1.h" + +SECP256K1_API jlong JNICALL Java_org_bitcoin_Secp256k1Context_secp256k1_1init_1context + (JNIEnv* env, jclass classObject) +{ + secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + + (void)classObject;(void)env; + + return (uintptr_t)ctx; +} + diff --git a/src/java/org_bitcoin_Secp256k1Context.h b/src/java/org_bitcoin_Secp256k1Context.h new file mode 100644 index 00000000000..0d2bc84b7f3 --- /dev/null +++ b/src/java/org_bitcoin_Secp256k1Context.h @@ -0,0 +1,22 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +#include "include/secp256k1.h" +/* Header for class org_bitcoin_Secp256k1Context */ + +#ifndef _Included_org_bitcoin_Secp256k1Context +#define _Included_org_bitcoin_Secp256k1Context +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_bitcoin_Secp256k1Context + * Method: secp256k1_init_context + * Signature: ()J + */ +SECP256K1_API jlong JNICALL Java_org_bitcoin_Secp256k1Context_secp256k1_1init_1context + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/src/modules/ecdh/Makefile.am.include b/src/modules/ecdh/Makefile.am.include index 670b9c1152e..e3088b46979 100644 --- a/src/modules/ecdh/Makefile.am.include +++ b/src/modules/ecdh/Makefile.am.include @@ -4,5 +4,5 @@ noinst_HEADERS += src/modules/ecdh/tests_impl.h if USE_BENCHMARK noinst_PROGRAMS += bench_ecdh bench_ecdh_SOURCES = src/bench_ecdh.c -bench_ecdh_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_ecdh_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB) endif diff --git a/src/modules/recovery/Makefile.am.include b/src/modules/recovery/Makefile.am.include index 5de3ea33ea5..bf23c26e71c 100644 --- a/src/modules/recovery/Makefile.am.include +++ b/src/modules/recovery/Makefile.am.include @@ -4,5 +4,5 @@ noinst_HEADERS += src/modules/recovery/tests_impl.h if USE_BENCHMARK noinst_PROGRAMS += bench_recover bench_recover_SOURCES = src/bench_recover.c -bench_recover_LDADD = libsecp256k1.la $(SECP_LIBS) +bench_recover_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB) endif diff --git a/src/modules/recovery/main_impl.h b/src/modules/recovery/main_impl.h old mode 100644 new mode 100755 index ec42f4bb6cd..86f2f0cb2b5 --- a/src/modules/recovery/main_impl.h +++ b/src/modules/recovery/main_impl.h @@ -138,16 +138,15 @@ int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecd secp256k1_scalar_set_b32(&sec, seckey, &overflow); /* Fail if the secret key is invalid. */ if (!overflow && !secp256k1_scalar_is_zero(&sec)) { + unsigned char nonce32[32]; unsigned int count = 0; secp256k1_scalar_set_b32(&msg, msg32, NULL); while (1) { - unsigned char nonce32[32]; ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count); if (!ret) { break; } secp256k1_scalar_set_b32(&non, nonce32, &overflow); - memset(nonce32, 0, 32); if (!secp256k1_scalar_is_zero(&non) && !overflow) { if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid)) { break; @@ -155,6 +154,7 @@ int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecd } count++; } + memset(nonce32, 0, 32); secp256k1_scalar_clear(&msg); secp256k1_scalar_clear(&non); secp256k1_scalar_clear(&sec); diff --git a/src/modules/schnorr/Makefile.am.include b/src/modules/schnorr/Makefile.am.include deleted file mode 100644 index b3bfa7d5cc4..00000000000 --- a/src/modules/schnorr/Makefile.am.include +++ /dev/null @@ -1,10 +0,0 @@ -include_HEADERS += include/secp256k1_schnorr.h -noinst_HEADERS += src/modules/schnorr/main_impl.h -noinst_HEADERS += src/modules/schnorr/schnorr.h -noinst_HEADERS += src/modules/schnorr/schnorr_impl.h -noinst_HEADERS += src/modules/schnorr/tests_impl.h -if USE_BENCHMARK -noinst_PROGRAMS += bench_schnorr_verify -bench_schnorr_verify_SOURCES = src/bench_schnorr_verify.c -bench_schnorr_verify_LDADD = libsecp256k1.la $(SECP_LIBS) -endif diff --git a/src/modules/schnorr/main_impl.h b/src/modules/schnorr/main_impl.h deleted file mode 100644 index fa176a1767f..00000000000 --- a/src/modules/schnorr/main_impl.h +++ /dev/null @@ -1,164 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014-2015 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef SECP256K1_MODULE_SCHNORR_MAIN -#define SECP256K1_MODULE_SCHNORR_MAIN - -#include "include/secp256k1_schnorr.h" -#include "modules/schnorr/schnorr_impl.h" - -static void secp256k1_schnorr_msghash_sha256(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) { - secp256k1_sha256_t sha; - secp256k1_sha256_initialize(&sha); - secp256k1_sha256_write(&sha, r32, 32); - secp256k1_sha256_write(&sha, msg32, 32); - secp256k1_sha256_finalize(&sha, h32); -} - -static const unsigned char secp256k1_schnorr_algo16[17] = "Schnorr+SHA256 "; - -int secp256k1_schnorr_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) { - secp256k1_scalar sec, non; - int ret = 0; - int overflow = 0; - unsigned int count = 0; - VERIFY_CHECK(ctx != NULL); - ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); - ARG_CHECK(msg32 != NULL); - ARG_CHECK(sig64 != NULL); - ARG_CHECK(seckey != NULL); - if (noncefp == NULL) { - noncefp = secp256k1_nonce_function_default; - } - - secp256k1_scalar_set_b32(&sec, seckey, NULL); - while (1) { - unsigned char nonce32[32]; - ret = noncefp(nonce32, msg32, seckey, secp256k1_schnorr_algo16, (void*)noncedata, count); - if (!ret) { - break; - } - secp256k1_scalar_set_b32(&non, nonce32, &overflow); - memset(nonce32, 0, 32); - if (!secp256k1_scalar_is_zero(&non) && !overflow) { - if (secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64, &sec, &non, NULL, secp256k1_schnorr_msghash_sha256, msg32)) { - break; - } - } - count++; - } - if (!ret) { - memset(sig64, 0, 64); - } - secp256k1_scalar_clear(&non); - secp256k1_scalar_clear(&sec); - return ret; -} - -int secp256k1_schnorr_verify(const secp256k1_context* ctx, const unsigned char *sig64, const unsigned char *msg32, const secp256k1_pubkey *pubkey) { - secp256k1_ge q; - VERIFY_CHECK(ctx != NULL); - ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); - ARG_CHECK(msg32 != NULL); - ARG_CHECK(sig64 != NULL); - ARG_CHECK(pubkey != NULL); - - secp256k1_pubkey_load(ctx, &q, pubkey); - return secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64, &q, secp256k1_schnorr_msghash_sha256, msg32); -} - -int secp256k1_schnorr_recover(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *sig64, const unsigned char *msg32) { - secp256k1_ge q; - - VERIFY_CHECK(ctx != NULL); - ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx)); - ARG_CHECK(msg32 != NULL); - ARG_CHECK(sig64 != NULL); - ARG_CHECK(pubkey != NULL); - - if (secp256k1_schnorr_sig_recover(&ctx->ecmult_ctx, sig64, &q, secp256k1_schnorr_msghash_sha256, msg32)) { - secp256k1_pubkey_save(pubkey, &q); - return 1; - } else { - memset(pubkey, 0, sizeof(*pubkey)); - return 0; - } -} - -int secp256k1_schnorr_generate_nonce_pair(const secp256k1_context* ctx, secp256k1_pubkey *pubnonce, unsigned char *privnonce32, const unsigned char *sec32, const unsigned char *msg32, secp256k1_nonce_function noncefp, const void* noncedata) { - int count = 0; - int ret = 1; - secp256k1_gej Qj; - secp256k1_ge Q; - secp256k1_scalar sec; - - VERIFY_CHECK(ctx != NULL); - ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); - ARG_CHECK(msg32 != NULL); - ARG_CHECK(sec32 != NULL); - ARG_CHECK(pubnonce != NULL); - ARG_CHECK(privnonce32 != NULL); - - if (noncefp == NULL) { - noncefp = secp256k1_nonce_function_default; - } - - do { - int overflow; - ret = noncefp(privnonce32, sec32, msg32, secp256k1_schnorr_algo16, (void*)noncedata, count++); - if (!ret) { - break; - } - secp256k1_scalar_set_b32(&sec, privnonce32, &overflow); - if (overflow || secp256k1_scalar_is_zero(&sec)) { - continue; - } - secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &Qj, &sec); - secp256k1_ge_set_gej(&Q, &Qj); - - secp256k1_pubkey_save(pubnonce, &Q); - break; - } while(1); - - secp256k1_scalar_clear(&sec); - if (!ret) { - memset(pubnonce, 0, sizeof(*pubnonce)); - } - return ret; -} - -int secp256k1_schnorr_partial_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const unsigned char *sec32, const secp256k1_pubkey *pubnonce_others, const unsigned char *secnonce32) { - int overflow = 0; - secp256k1_scalar sec, non; - secp256k1_ge pubnon; - VERIFY_CHECK(ctx != NULL); - ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx)); - ARG_CHECK(msg32 != NULL); - ARG_CHECK(sig64 != NULL); - ARG_CHECK(sec32 != NULL); - ARG_CHECK(secnonce32 != NULL); - ARG_CHECK(pubnonce_others != NULL); - - secp256k1_scalar_set_b32(&sec, sec32, &overflow); - if (overflow || secp256k1_scalar_is_zero(&sec)) { - return -1; - } - secp256k1_scalar_set_b32(&non, secnonce32, &overflow); - if (overflow || secp256k1_scalar_is_zero(&non)) { - return -1; - } - secp256k1_pubkey_load(ctx, &pubnon, pubnonce_others); - return secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64, &sec, &non, &pubnon, secp256k1_schnorr_msghash_sha256, msg32); -} - -int secp256k1_schnorr_partial_combine(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char * const *sig64sin, size_t n) { - ARG_CHECK(sig64 != NULL); - ARG_CHECK(n >= 1); - ARG_CHECK(sig64sin != NULL); - return secp256k1_schnorr_sig_combine(sig64, n, sig64sin); -} - -#endif diff --git a/src/modules/schnorr/schnorr.h b/src/modules/schnorr/schnorr.h deleted file mode 100644 index de18147bd52..00000000000 --- a/src/modules/schnorr/schnorr.h +++ /dev/null @@ -1,20 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2014-2015 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php. * - ***********************************************************************/ - -#ifndef _SECP256K1_MODULE_SCHNORR_H_ -#define _SECP256K1_MODULE_SCHNORR_H_ - -#include "scalar.h" -#include "group.h" - -typedef void (*secp256k1_schnorr_msghash)(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32); - -static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32); -static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32); -static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32); -static int secp256k1_schnorr_sig_combine(unsigned char *sig64, size_t n, const unsigned char * const *sig64ins); - -#endif diff --git a/src/modules/schnorr/schnorr_impl.h b/src/modules/schnorr/schnorr_impl.h deleted file mode 100644 index e13ab6db7cc..00000000000 --- a/src/modules/schnorr/schnorr_impl.h +++ /dev/null @@ -1,207 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2014-2015 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php. * - ***********************************************************************/ - -#ifndef _SECP256K1_SCHNORR_IMPL_H_ -#define _SECP256K1_SCHNORR_IMPL_H_ - -#include - -#include "schnorr.h" -#include "num.h" -#include "field.h" -#include "group.h" -#include "ecmult.h" -#include "ecmult_gen.h" - -/** - * Custom Schnorr-based signature scheme. They support multiparty signing, public key - * recovery and batch validation. - * - * Rationale for verifying R's y coordinate: - * In order to support batch validation and public key recovery, the full R point must - * be known to verifiers, rather than just its x coordinate. In order to not risk - * being more strict in batch validation than normal validation, validators must be - * required to reject signatures with incorrect y coordinate. This is only possible - * by including a (relatively slow) field inverse, or a field square root. However, - * batch validation offers potentially much higher benefits than this cost. - * - * Rationale for having an implicit y coordinate oddness: - * If we commit to having the full R point known to verifiers, there are two mechanism. - * Either include its oddness in the signature, or give it an implicit fixed value. - * As the R y coordinate can be flipped by a simple negation of the nonce, we choose the - * latter, as it comes with nearly zero impact on signing or validation performance, and - * saves a byte in the signature. - * - * Signing: - * Inputs: 32-byte message m, 32-byte scalar key x (!=0), 32-byte scalar nonce k (!=0) - * - * Compute point R = k * G. Reject nonce if R's y coordinate is odd (or negate nonce). - * Compute 32-byte r, the serialization of R's x coordinate. - * Compute scalar h = Hash(r || m). Reject nonce if h == 0 or h >= order. - * Compute scalar s = k - h * x. - * The signature is (r, s). - * - * - * Verification: - * Inputs: 32-byte message m, public key point Q, signature: (32-byte r, scalar s) - * - * Signature is invalid if s >= order. - * Signature is invalid if r >= p. - * Compute scalar h = Hash(r || m). Signature is invalid if h == 0 or h >= order. - * Option 1 (faster for single verification): - * Compute point R = h * Q + s * G. Signature is invalid if R is infinity or R's y coordinate is odd. - * Signature is valid if the serialization of R's x coordinate equals r. - * Option 2 (allows batch validation and pubkey recovery): - * Decompress x coordinate r into point R, with odd y coordinate. Fail if R is not on the curve. - * Signature is valid if R + h * Q + s * G == 0. - */ - -static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32) { - secp256k1_gej Rj; - secp256k1_ge Ra; - unsigned char h32[32]; - secp256k1_scalar h, s; - int overflow; - secp256k1_scalar n; - - if (secp256k1_scalar_is_zero(key) || secp256k1_scalar_is_zero(nonce)) { - return 0; - } - n = *nonce; - - secp256k1_ecmult_gen(ctx, &Rj, &n); - if (pubnonce != NULL) { - secp256k1_gej_add_ge(&Rj, &Rj, pubnonce); - } - secp256k1_ge_set_gej(&Ra, &Rj); - secp256k1_fe_normalize(&Ra.y); - if (secp256k1_fe_is_odd(&Ra.y)) { - /* R's y coordinate is odd, which is not allowed (see rationale above). - Force it to be even by negating the nonce. Note that this even works - for multiparty signing, as the R point is known to all participants, - which can all decide to flip the sign in unison, resulting in the - overall R point to be negated too. */ - secp256k1_scalar_negate(&n, &n); - } - secp256k1_fe_normalize(&Ra.x); - secp256k1_fe_get_b32(sig64, &Ra.x); - hash(h32, sig64, msg32); - overflow = 0; - secp256k1_scalar_set_b32(&h, h32, &overflow); - if (overflow || secp256k1_scalar_is_zero(&h)) { - secp256k1_scalar_clear(&n); - return 0; - } - secp256k1_scalar_mul(&s, &h, key); - secp256k1_scalar_negate(&s, &s); - secp256k1_scalar_add(&s, &s, &n); - secp256k1_scalar_clear(&n); - secp256k1_scalar_get_b32(sig64 + 32, &s); - return 1; -} - -static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32) { - secp256k1_gej Qj, Rj; - secp256k1_ge Ra; - secp256k1_fe Rx; - secp256k1_scalar h, s; - unsigned char hh[32]; - int overflow; - - if (secp256k1_ge_is_infinity(pubkey)) { - return 0; - } - hash(hh, sig64, msg32); - overflow = 0; - secp256k1_scalar_set_b32(&h, hh, &overflow); - if (overflow || secp256k1_scalar_is_zero(&h)) { - return 0; - } - overflow = 0; - secp256k1_scalar_set_b32(&s, sig64 + 32, &overflow); - if (overflow) { - return 0; - } - if (!secp256k1_fe_set_b32(&Rx, sig64)) { - return 0; - } - secp256k1_gej_set_ge(&Qj, pubkey); - secp256k1_ecmult(ctx, &Rj, &Qj, &h, &s); - if (secp256k1_gej_is_infinity(&Rj)) { - return 0; - } - secp256k1_ge_set_gej_var(&Ra, &Rj); - secp256k1_fe_normalize_var(&Ra.y); - if (secp256k1_fe_is_odd(&Ra.y)) { - return 0; - } - return secp256k1_fe_equal_var(&Rx, &Ra.x); -} - -static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32) { - secp256k1_gej Qj, Rj; - secp256k1_ge Ra; - secp256k1_fe Rx; - secp256k1_scalar h, s; - unsigned char hh[32]; - int overflow; - - hash(hh, sig64, msg32); - overflow = 0; - secp256k1_scalar_set_b32(&h, hh, &overflow); - if (overflow || secp256k1_scalar_is_zero(&h)) { - return 0; - } - overflow = 0; - secp256k1_scalar_set_b32(&s, sig64 + 32, &overflow); - if (overflow) { - return 0; - } - if (!secp256k1_fe_set_b32(&Rx, sig64)) { - return 0; - } - if (!secp256k1_ge_set_xo_var(&Ra, &Rx, 0)) { - return 0; - } - secp256k1_gej_set_ge(&Rj, &Ra); - secp256k1_scalar_inverse_var(&h, &h); - secp256k1_scalar_negate(&s, &s); - secp256k1_scalar_mul(&s, &s, &h); - secp256k1_ecmult(ctx, &Qj, &Rj, &h, &s); - if (secp256k1_gej_is_infinity(&Qj)) { - return 0; - } - secp256k1_ge_set_gej(pubkey, &Qj); - return 1; -} - -static int secp256k1_schnorr_sig_combine(unsigned char *sig64, size_t n, const unsigned char * const *sig64ins) { - secp256k1_scalar s = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0); - size_t i; - for (i = 0; i < n; i++) { - secp256k1_scalar si; - int overflow; - secp256k1_scalar_set_b32(&si, sig64ins[i] + 32, &overflow); - if (overflow) { - return -1; - } - if (i) { - if (memcmp(sig64ins[i - 1], sig64ins[i], 32) != 0) { - return -1; - } - } - secp256k1_scalar_add(&s, &s, &si); - } - if (secp256k1_scalar_is_zero(&s)) { - return 0; - } - memcpy(sig64, sig64ins[0], 32); - secp256k1_scalar_get_b32(sig64 + 32, &s); - secp256k1_scalar_clear(&s); - return 1; -} - -#endif diff --git a/src/modules/schnorr/tests_impl.h b/src/modules/schnorr/tests_impl.h deleted file mode 100644 index 5bd14a03e3c..00000000000 --- a/src/modules/schnorr/tests_impl.h +++ /dev/null @@ -1,175 +0,0 @@ -/********************************************************************** - * Copyright (c) 2014-2015 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef SECP256K1_MODULE_SCHNORR_TESTS -#define SECP256K1_MODULE_SCHNORR_TESTS - -#include "include/secp256k1_schnorr.h" - -void test_schnorr_end_to_end(void) { - unsigned char privkey[32]; - unsigned char message[32]; - unsigned char schnorr_signature[64]; - secp256k1_pubkey pubkey, recpubkey; - - /* Generate a random key and message. */ - { - secp256k1_scalar key; - random_scalar_order_test(&key); - secp256k1_scalar_get_b32(privkey, &key); - secp256k1_rand256_test(message); - } - - /* Construct and verify corresponding public key. */ - CHECK(secp256k1_ec_seckey_verify(ctx, privkey) == 1); - CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey, privkey) == 1); - - /* Schnorr sign. */ - CHECK(secp256k1_schnorr_sign(ctx, schnorr_signature, message, privkey, NULL, NULL) == 1); - CHECK(secp256k1_schnorr_verify(ctx, schnorr_signature, message, &pubkey) == 1); - CHECK(secp256k1_schnorr_recover(ctx, &recpubkey, schnorr_signature, message) == 1); - CHECK(memcmp(&pubkey, &recpubkey, sizeof(pubkey)) == 0); - /* Destroy signature and verify again. */ - schnorr_signature[secp256k1_rand_bits(6)] += 1 + secp256k1_rand_int(255); - CHECK(secp256k1_schnorr_verify(ctx, schnorr_signature, message, &pubkey) == 0); - CHECK(secp256k1_schnorr_recover(ctx, &recpubkey, schnorr_signature, message) != 1 || - memcmp(&pubkey, &recpubkey, sizeof(pubkey)) != 0); -} - -/** Horribly broken hash function. Do not use for anything but tests. */ -void test_schnorr_hash(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) { - int i; - for (i = 0; i < 32; i++) { - h32[i] = r32[i] ^ msg32[i]; - } -} - -void test_schnorr_sign_verify(void) { - unsigned char msg32[32]; - unsigned char sig64[3][64]; - secp256k1_gej pubkeyj[3]; - secp256k1_ge pubkey[3]; - secp256k1_scalar nonce[3], key[3]; - int i = 0; - int k; - - secp256k1_rand256_test(msg32); - - for (k = 0; k < 3; k++) { - random_scalar_order_test(&key[k]); - - do { - random_scalar_order_test(&nonce[k]); - if (secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64[k], &key[k], &nonce[k], NULL, &test_schnorr_hash, msg32)) { - break; - } - } while(1); - - secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pubkeyj[k], &key[k]); - secp256k1_ge_set_gej_var(&pubkey[k], &pubkeyj[k]); - CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64[k], &pubkey[k], &test_schnorr_hash, msg32)); - - for (i = 0; i < 4; i++) { - int pos = secp256k1_rand_bits(6); - int mod = 1 + secp256k1_rand_int(255); - sig64[k][pos] ^= mod; - CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64[k], &pubkey[k], &test_schnorr_hash, msg32) == 0); - sig64[k][pos] ^= mod; - } - } -} - -void test_schnorr_threshold(void) { - unsigned char msg[32]; - unsigned char sec[5][32]; - secp256k1_pubkey pub[5]; - unsigned char nonce[5][32]; - secp256k1_pubkey pubnonce[5]; - unsigned char sig[5][64]; - const unsigned char* sigs[5]; - unsigned char allsig[64]; - const secp256k1_pubkey* pubs[5]; - secp256k1_pubkey allpub; - int n, i; - int damage; - int ret = 0; - - damage = secp256k1_rand_bits(1) ? (1 + secp256k1_rand_int(4)) : 0; - secp256k1_rand256_test(msg); - n = 2 + secp256k1_rand_int(4); - for (i = 0; i < n; i++) { - do { - secp256k1_rand256_test(sec[i]); - } while (!secp256k1_ec_seckey_verify(ctx, sec[i])); - CHECK(secp256k1_ec_pubkey_create(ctx, &pub[i], sec[i])); - CHECK(secp256k1_schnorr_generate_nonce_pair(ctx, &pubnonce[i], nonce[i], msg, sec[i], NULL, NULL)); - pubs[i] = &pub[i]; - } - if (damage == 1) { - nonce[secp256k1_rand_int(n)][secp256k1_rand_int(32)] ^= 1 + secp256k1_rand_int(255); - } else if (damage == 2) { - sec[secp256k1_rand_int(n)][secp256k1_rand_int(32)] ^= 1 + secp256k1_rand_int(255); - } - for (i = 0; i < n; i++) { - secp256k1_pubkey allpubnonce; - const secp256k1_pubkey *pubnonces[4]; - int j; - for (j = 0; j < i; j++) { - pubnonces[j] = &pubnonce[j]; - } - for (j = i + 1; j < n; j++) { - pubnonces[j - 1] = &pubnonce[j]; - } - CHECK(secp256k1_ec_pubkey_combine(ctx, &allpubnonce, pubnonces, n - 1)); - ret |= (secp256k1_schnorr_partial_sign(ctx, sig[i], msg, sec[i], &allpubnonce, nonce[i]) != 1) * 1; - sigs[i] = sig[i]; - } - if (damage == 3) { - sig[secp256k1_rand_int(n)][secp256k1_rand_bits(6)] ^= 1 + secp256k1_rand_int(255); - } - ret |= (secp256k1_ec_pubkey_combine(ctx, &allpub, pubs, n) != 1) * 2; - if ((ret & 1) == 0) { - ret |= (secp256k1_schnorr_partial_combine(ctx, allsig, sigs, n) != 1) * 4; - } - if (damage == 4) { - allsig[secp256k1_rand_int(32)] ^= 1 + secp256k1_rand_int(255); - } - if ((ret & 7) == 0) { - ret |= (secp256k1_schnorr_verify(ctx, allsig, msg, &allpub) != 1) * 8; - } - CHECK((ret == 0) == (damage == 0)); -} - -void test_schnorr_recovery(void) { - unsigned char msg32[32]; - unsigned char sig64[64]; - secp256k1_ge Q; - - secp256k1_rand256_test(msg32); - secp256k1_rand256_test(sig64); - secp256k1_rand256_test(sig64 + 32); - if (secp256k1_schnorr_sig_recover(&ctx->ecmult_ctx, sig64, &Q, &test_schnorr_hash, msg32) == 1) { - CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64, &Q, &test_schnorr_hash, msg32) == 1); - } -} - -void run_schnorr_tests(void) { - int i; - for (i = 0; i < 32*count; i++) { - test_schnorr_end_to_end(); - } - for (i = 0; i < 32 * count; i++) { - test_schnorr_sign_verify(); - } - for (i = 0; i < 16 * count; i++) { - test_schnorr_recovery(); - } - for (i = 0; i < 10 * count; i++) { - test_schnorr_threshold(); - } -} - -#endif diff --git a/src/num.h b/src/num.h index ebfa71eb44b..7bb9c5be8cf 100644 --- a/src/num.h +++ b/src/num.h @@ -32,6 +32,9 @@ static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsi /** Compute a modular inverse. The input must be less than the modulus. */ static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m); +/** Compute the jacobi symbol (a|b). b must be positive and odd. */ +static int secp256k1_num_jacobi(const secp256k1_num *a, const secp256k1_num *b); + /** Compare the absolute value of two numbers. */ static int secp256k1_num_cmp(const secp256k1_num *a, const secp256k1_num *b); @@ -57,6 +60,9 @@ static void secp256k1_num_shift(secp256k1_num *r, int bits); /** Check whether a number is zero. */ static int secp256k1_num_is_zero(const secp256k1_num *a); +/** Check whether a number is one. */ +static int secp256k1_num_is_one(const secp256k1_num *a); + /** Check whether a number is strictly negative. */ static int secp256k1_num_is_neg(const secp256k1_num *a); diff --git a/src/num_gmp_impl.h b/src/num_gmp_impl.h index 7b6a89719ab..3a46495eeac 100644 --- a/src/num_gmp_impl.h +++ b/src/num_gmp_impl.h @@ -144,6 +144,32 @@ static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, memset(v, 0, sizeof(v)); } +static int secp256k1_num_jacobi(const secp256k1_num *a, const secp256k1_num *b) { + int ret; + mpz_t ga, gb; + secp256k1_num_sanity(a); + secp256k1_num_sanity(b); + VERIFY_CHECK(!b->neg && (b->limbs > 0) && (b->data[0] & 1)); + + mpz_inits(ga, gb, NULL); + + mpz_import(gb, b->limbs, -1, sizeof(mp_limb_t), 0, 0, b->data); + mpz_import(ga, a->limbs, -1, sizeof(mp_limb_t), 0, 0, a->data); + if (a->neg) { + mpz_neg(ga, ga); + } + + ret = mpz_jacobi(ga, gb); + + mpz_clears(ga, gb, NULL); + + return ret; +} + +static int secp256k1_num_is_one(const secp256k1_num *a) { + return (a->limbs == 1 && a->data[0] == 1); +} + static int secp256k1_num_is_zero(const secp256k1_num *a) { return (a->limbs == 1 && a->data[0] == 0); } diff --git a/src/scalar.h b/src/scalar.h index b590ccd6dde..27e9d8375e8 100644 --- a/src/scalar.h +++ b/src/scalar.h @@ -13,7 +13,9 @@ #include "libsecp256k1-config.h" #endif -#if defined(USE_SCALAR_4X64) +#if defined(EXHAUSTIVE_TEST_ORDER) +#include "scalar_low.h" +#elif defined(USE_SCALAR_4X64) #include "scalar_4x64.h" #elif defined(USE_SCALAR_8X32) #include "scalar_8x32.h" diff --git a/src/scalar_4x64_impl.h b/src/scalar_4x64_impl.h index aa2703dd23e..56e7bd82afd 100644 --- a/src/scalar_4x64_impl.h +++ b/src/scalar_4x64_impl.h @@ -282,8 +282,8 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "movq 56(%%rsi), %%r14\n" /* Initialize r8,r9,r10 */ "movq 0(%%rsi), %%r8\n" - "movq $0, %%r9\n" - "movq $0, %%r10\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" /* (r8,r9) += n0 * c0 */ "movq %8, %%rax\n" "mulq %%r11\n" @@ -291,7 +291,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq %%rdx, %%r9\n" /* extract m0 */ "movq %%r8, %q0\n" - "movq $0, %%r8\n" + "xorq %%r8, %%r8\n" /* (r9,r10) += l1 */ "addq 8(%%rsi), %%r9\n" "adcq $0, %%r10\n" @@ -309,7 +309,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq $0, %%r8\n" /* extract m1 */ "movq %%r9, %q1\n" - "movq $0, %%r9\n" + "xorq %%r9, %%r9\n" /* (r10,r8,r9) += l2 */ "addq 16(%%rsi), %%r10\n" "adcq $0, %%r8\n" @@ -332,7 +332,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq $0, %%r9\n" /* extract m2 */ "movq %%r10, %q2\n" - "movq $0, %%r10\n" + "xorq %%r10, %%r10\n" /* (r8,r9,r10) += l3 */ "addq 24(%%rsi), %%r8\n" "adcq $0, %%r9\n" @@ -355,7 +355,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq $0, %%r10\n" /* extract m3 */ "movq %%r8, %q3\n" - "movq $0, %%r8\n" + "xorq %%r8, %%r8\n" /* (r9,r10,r8) += n3 * c1 */ "movq %9, %%rax\n" "mulq %%r14\n" @@ -387,8 +387,8 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "movq %q11, %%r13\n" /* Initialize (r8,r9,r10) */ "movq %q5, %%r8\n" - "movq $0, %%r9\n" - "movq $0, %%r10\n" + "xorq %%r9, %%r9\n" + "xorq %%r10, %%r10\n" /* (r8,r9) += m4 * c0 */ "movq %12, %%rax\n" "mulq %%r11\n" @@ -396,7 +396,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq %%rdx, %%r9\n" /* extract p0 */ "movq %%r8, %q0\n" - "movq $0, %%r8\n" + "xorq %%r8, %%r8\n" /* (r9,r10) += m1 */ "addq %q6, %%r9\n" "adcq $0, %%r10\n" @@ -414,7 +414,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq $0, %%r8\n" /* extract p1 */ "movq %%r9, %q1\n" - "movq $0, %%r9\n" + "xorq %%r9, %%r9\n" /* (r10,r8,r9) += m2 */ "addq %q7, %%r10\n" "adcq $0, %%r8\n" @@ -472,7 +472,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "movq %%rax, 0(%q6)\n" /* Move to (r8,r9) */ "movq %%rdx, %%r8\n" - "movq $0, %%r9\n" + "xorq %%r9, %%r9\n" /* (r8,r9) += p1 */ "addq %q2, %%r8\n" "adcq $0, %%r9\n" @@ -483,7 +483,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq %%rdx, %%r9\n" /* Extract r1 */ "movq %%r8, 8(%q6)\n" - "movq $0, %%r8\n" + "xorq %%r8, %%r8\n" /* (r9,r8) += p4 */ "addq %%r10, %%r9\n" "adcq $0, %%r8\n" @@ -492,7 +492,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l) "adcq $0, %%r8\n" /* Extract r2 */ "movq %%r9, 16(%q6)\n" - "movq $0, %%r9\n" + "xorq %%r9, %%r9\n" /* (r8,r9) += p3 */ "addq %q4, %%r8\n" "adcq $0, %%r9\n" diff --git a/src/scalar_impl.h b/src/scalar_impl.h index 88ea97de863..f5b2376407b 100644 --- a/src/scalar_impl.h +++ b/src/scalar_impl.h @@ -7,8 +7,6 @@ #ifndef _SECP256K1_SCALAR_IMPL_H_ #define _SECP256K1_SCALAR_IMPL_H_ -#include - #include "group.h" #include "scalar.h" @@ -16,7 +14,9 @@ #include "libsecp256k1-config.h" #endif -#if defined(USE_SCALAR_4X64) +#if defined(EXHAUSTIVE_TEST_ORDER) +#include "scalar_low_impl.h" +#elif defined(USE_SCALAR_4X64) #include "scalar_4x64_impl.h" #elif defined(USE_SCALAR_8X32) #include "scalar_8x32_impl.h" @@ -33,17 +33,37 @@ static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a /** secp256k1 curve order, see secp256k1_ecdsa_const_order_as_fe in ecdsa_impl.h */ static void secp256k1_scalar_order_get_num(secp256k1_num *r) { +#if defined(EXHAUSTIVE_TEST_ORDER) + static const unsigned char order[32] = { + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,EXHAUSTIVE_TEST_ORDER + }; +#else static const unsigned char order[32] = { 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE, 0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B, 0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41 }; +#endif secp256k1_num_set_bin(r, order, 32); } #endif static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *x) { +#if defined(EXHAUSTIVE_TEST_ORDER) + int i; + *r = 0; + for (i = 0; i < EXHAUSTIVE_TEST_ORDER; i++) + if ((i * *x) % EXHAUSTIVE_TEST_ORDER == 1) + *r = i; + /* If this VERIFY_CHECK triggers we were given a noninvertible scalar (and thus + * have a composite group order; fix it in exhaustive_tests.c). */ + VERIFY_CHECK(*r != 0); +} +#else secp256k1_scalar *t; int i; /* First compute x ^ (2^N - 1) for some values of N. */ @@ -235,9 +255,9 @@ static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar } SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) { - /* d[0] is present and is the lowest word for all representations */ return !(a->d[0] & 1); } +#endif static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) { #if defined(USE_SCALAR_INV_BUILTIN) @@ -261,6 +281,18 @@ static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_sc } #ifdef USE_ENDOMORPHISM +#if defined(EXHAUSTIVE_TEST_ORDER) +/** + * Find k1 and k2 given k, such that k1 + k2 * lambda == k mod n; unlike in the + * full case we don't bother making k1 and k2 be small, we just want them to be + * nontrivial to get full test coverage for the exhaustive tests. We therefore + * (arbitrarily) set k2 = k + 5 and k1 = k - k2 * lambda. + */ +static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + *r2 = (*a + 5) % EXHAUSTIVE_TEST_ORDER; + *r1 = (*a + (EXHAUSTIVE_TEST_ORDER - *r2) * EXHAUSTIVE_TEST_LAMBDA) % EXHAUSTIVE_TEST_ORDER; +} +#else /** * The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where * lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a, @@ -333,5 +365,6 @@ static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar secp256k1_scalar_add(r1, r1, a); } #endif +#endif #endif diff --git a/src/scalar_low.h b/src/scalar_low.h new file mode 100644 index 00000000000..5574c44c7ae --- /dev/null +++ b/src/scalar_low.h @@ -0,0 +1,15 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_REPR_ +#define _SECP256K1_SCALAR_REPR_ + +#include + +/** A scalar modulo the group order of the secp256k1 curve. */ +typedef uint32_t secp256k1_scalar; + +#endif diff --git a/src/scalar_low_impl.h b/src/scalar_low_impl.h new file mode 100644 index 00000000000..4f94441f492 --- /dev/null +++ b/src/scalar_low_impl.h @@ -0,0 +1,114 @@ +/********************************************************************** + * Copyright (c) 2015 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_ +#define _SECP256K1_SCALAR_REPR_IMPL_H_ + +#include "scalar.h" + +#include + +SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) { + return !(*a & 1); +} + +SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { *r = 0; } +SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { *r = v; } + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + if (offset < 32) + return ((*a >> offset) & ((((uint32_t)1) << count) - 1)); + else + return 0; +} + +SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) { + return secp256k1_scalar_get_bits(a, offset, count); +} + +SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { return *a >= EXHAUSTIVE_TEST_ORDER; } + +static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + *r = (*a + *b) % EXHAUSTIVE_TEST_ORDER; + return *r < *b; +} + +static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) { + if (flag && bit < 32) + *r += (1 << bit); +#ifdef VERIFY + VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0); +#endif +} + +static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) { + const int base = 0x100 % EXHAUSTIVE_TEST_ORDER; + int i; + *r = 0; + for (i = 0; i < 32; i++) { + *r = ((*r * base) + b32[i]) % EXHAUSTIVE_TEST_ORDER; + } + /* just deny overflow, it basically always happens */ + if (overflow) *overflow = 0; +} + +static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) { + memset(bin, 0, 32); + bin[28] = *a >> 24; bin[29] = *a >> 16; bin[30] = *a >> 8; bin[31] = *a; +} + +SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) { + return *a == 0; +} + +static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) { + if (*a == 0) { + *r = 0; + } else { + *r = EXHAUSTIVE_TEST_ORDER - *a; + } +} + +SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) { + return *a == 1; +} + +static int secp256k1_scalar_is_high(const secp256k1_scalar *a) { + return *a > EXHAUSTIVE_TEST_ORDER / 2; +} + +static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) { + if (flag) secp256k1_scalar_negate(r, r); + return flag ? -1 : 1; +} + +static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) { + *r = (*a * *b) % EXHAUSTIVE_TEST_ORDER; +} + +static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) { + int ret; + VERIFY_CHECK(n > 0); + VERIFY_CHECK(n < 16); + ret = *r & ((1 << n) - 1); + *r >>= n; + return ret; +} + +static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) { + *r = (*a * *a) % EXHAUSTIVE_TEST_ORDER; +} + +static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) { + *r1 = *a; + *r2 = 0; +} + +SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) { + return *a == *b; +} + +#endif diff --git a/src/secp256k1.c b/src/secp256k1.c old mode 100644 new mode 100755 index 62d192baeb3..fb8b882faaf --- a/src/secp256k1.c +++ b/src/secp256k1.c @@ -4,8 +4,6 @@ * file COPYING or http://www.opensource.org/licenses/mit-license.php.* **********************************************************************/ -#define SECP256K1_BUILD (1) - #include "include/secp256k1.h" #include "util.h" @@ -152,7 +150,6 @@ static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) { int secp256k1_ec_pubkey_parse(const secp256k1_context* ctx, secp256k1_pubkey* pubkey, const unsigned char *input, size_t inputlen) { secp256k1_ge Q; - (void)ctx; VERIFY_CHECK(ctx != NULL); ARG_CHECK(pubkey != NULL); memset(pubkey, 0, sizeof(*pubkey)); @@ -170,7 +167,6 @@ int secp256k1_ec_pubkey_serialize(const secp256k1_context* ctx, unsigned char *o size_t len; int ret = 0; - (void)ctx; VERIFY_CHECK(ctx != NULL); ARG_CHECK(outputlen != NULL); ARG_CHECK(*outputlen >= ((flags & SECP256K1_FLAGS_BIT_COMPRESSION) ? 33 : 65)); @@ -216,7 +212,7 @@ static void secp256k1_ecdsa_signature_save(secp256k1_ecdsa_signature* sig, const int secp256k1_ecdsa_signature_parse_der(const secp256k1_context* ctx, secp256k1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) { secp256k1_scalar r, s; - (void)ctx; + VERIFY_CHECK(ctx != NULL); ARG_CHECK(sig != NULL); ARG_CHECK(input != NULL); @@ -234,7 +230,7 @@ int secp256k1_ecdsa_signature_parse_compact(const secp256k1_context* ctx, secp25 int ret = 1; int overflow = 0; - (void)ctx; + VERIFY_CHECK(ctx != NULL); ARG_CHECK(sig != NULL); ARG_CHECK(input64 != NULL); @@ -253,7 +249,7 @@ int secp256k1_ecdsa_signature_parse_compact(const secp256k1_context* ctx, secp25 int secp256k1_ecdsa_signature_serialize_der(const secp256k1_context* ctx, unsigned char *output, size_t *outputlen, const secp256k1_ecdsa_signature* sig) { secp256k1_scalar r, s; - (void)ctx; + VERIFY_CHECK(ctx != NULL); ARG_CHECK(output != NULL); ARG_CHECK(outputlen != NULL); ARG_CHECK(sig != NULL); @@ -265,7 +261,7 @@ int secp256k1_ecdsa_signature_serialize_der(const secp256k1_context* ctx, unsign int secp256k1_ecdsa_signature_serialize_compact(const secp256k1_context* ctx, unsigned char *output64, const secp256k1_ecdsa_signature* sig) { secp256k1_scalar r, s; - (void)ctx; + VERIFY_CHECK(ctx != NULL); ARG_CHECK(output64 != NULL); ARG_CHECK(sig != NULL); @@ -363,16 +359,15 @@ int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature secp256k1_scalar_set_b32(&sec, seckey, &overflow); /* Fail if the secret key is invalid. */ if (!overflow && !secp256k1_scalar_is_zero(&sec)) { + unsigned char nonce32[32]; unsigned int count = 0; secp256k1_scalar_set_b32(&msg, msg32, NULL); while (1) { - unsigned char nonce32[32]; ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count); if (!ret) { break; } secp256k1_scalar_set_b32(&non, nonce32, &overflow); - memset(nonce32, 0, 32); if (!overflow && !secp256k1_scalar_is_zero(&non)) { if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, NULL)) { break; @@ -380,6 +375,7 @@ int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature } count++; } + memset(nonce32, 0, 32); secp256k1_scalar_clear(&msg); secp256k1_scalar_clear(&non); secp256k1_scalar_clear(&sec); @@ -398,7 +394,6 @@ int secp256k1_ec_seckey_verify(const secp256k1_context* ctx, const unsigned char int overflow; VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); - (void)ctx; secp256k1_scalar_set_b32(&sec, seckey, &overflow); ret = !overflow && !secp256k1_scalar_is_zero(&sec); @@ -437,7 +432,6 @@ int secp256k1_ec_privkey_tweak_add(const secp256k1_context* ctx, unsigned char * VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); ARG_CHECK(tweak != NULL); - (void)ctx; secp256k1_scalar_set_b32(&term, tweak, &overflow); secp256k1_scalar_set_b32(&sec, seckey, NULL); @@ -485,7 +479,6 @@ int secp256k1_ec_privkey_tweak_mul(const secp256k1_context* ctx, unsigned char * VERIFY_CHECK(ctx != NULL); ARG_CHECK(seckey != NULL); ARG_CHECK(tweak != NULL); - (void)ctx; secp256k1_scalar_set_b32(&factor, tweak, &overflow); secp256k1_scalar_set_b32(&sec, seckey, NULL); diff --git a/src/tests.c b/src/tests.c index 687a5f2fdd8..9ae7d302813 100644 --- a/src/tests.c +++ b/src/tests.c @@ -473,6 +473,8 @@ void test_num_negate(void) { } void test_num_add_sub(void) { + int i; + secp256k1_scalar s; secp256k1_num n1; secp256k1_num n2; secp256k1_num n1p2, n2p1, n1m2, n2m1; @@ -498,6 +500,110 @@ void test_num_add_sub(void) { CHECK(!secp256k1_num_eq(&n2p1, &n1)); secp256k1_num_sub(&n2p1, &n2p1, &n2); /* n2p1 = R2 + R1 - R2 = R1 */ CHECK(secp256k1_num_eq(&n2p1, &n1)); + + /* check is_one */ + secp256k1_scalar_set_int(&s, 1); + secp256k1_scalar_get_num(&n1, &s); + CHECK(secp256k1_num_is_one(&n1)); + /* check that 2^n + 1 is never 1 */ + secp256k1_scalar_get_num(&n2, &s); + for (i = 0; i < 250; ++i) { + secp256k1_num_add(&n1, &n1, &n1); /* n1 *= 2 */ + secp256k1_num_add(&n1p2, &n1, &n2); /* n1p2 = n1 + 1 */ + CHECK(!secp256k1_num_is_one(&n1p2)); + } +} + +void test_num_mod(void) { + int i; + secp256k1_scalar s; + secp256k1_num order, n; + + /* check that 0 mod anything is 0 */ + random_scalar_order_test(&s); + secp256k1_scalar_get_num(&order, &s); + secp256k1_scalar_set_int(&s, 0); + secp256k1_scalar_get_num(&n, &s); + secp256k1_num_mod(&n, &order); + CHECK(secp256k1_num_is_zero(&n)); + + /* check that anything mod 1 is 0 */ + secp256k1_scalar_set_int(&s, 1); + secp256k1_scalar_get_num(&order, &s); + secp256k1_scalar_get_num(&n, &s); + secp256k1_num_mod(&n, &order); + CHECK(secp256k1_num_is_zero(&n)); + + /* check that increasing the number past 2^256 does not break this */ + random_scalar_order_test(&s); + secp256k1_scalar_get_num(&n, &s); + /* multiply by 2^8, which'll test this case with high probability */ + for (i = 0; i < 8; ++i) { + secp256k1_num_add(&n, &n, &n); + } + secp256k1_num_mod(&n, &order); + CHECK(secp256k1_num_is_zero(&n)); +} + +void test_num_jacobi(void) { + secp256k1_scalar sqr; + secp256k1_scalar small; + secp256k1_scalar five; /* five is not a quadratic residue */ + secp256k1_num order, n; + int i; + /* squares mod 5 are 1, 4 */ + const int jacobi5[10] = { 0, 1, -1, -1, 1, 0, 1, -1, -1, 1 }; + + /* check some small values with 5 as the order */ + secp256k1_scalar_set_int(&five, 5); + secp256k1_scalar_get_num(&order, &five); + for (i = 0; i < 10; ++i) { + secp256k1_scalar_set_int(&small, i); + secp256k1_scalar_get_num(&n, &small); + CHECK(secp256k1_num_jacobi(&n, &order) == jacobi5[i]); + } + + /** test large values with 5 as group order */ + secp256k1_scalar_get_num(&order, &five); + /* we first need a scalar which is not a multiple of 5 */ + do { + secp256k1_num fiven; + random_scalar_order_test(&sqr); + secp256k1_scalar_get_num(&fiven, &five); + secp256k1_scalar_get_num(&n, &sqr); + secp256k1_num_mod(&n, &fiven); + } while (secp256k1_num_is_zero(&n)); + /* next force it to be a residue. 2 is a nonresidue mod 5 so we can + * just multiply by two, i.e. add the number to itself */ + if (secp256k1_num_jacobi(&n, &order) == -1) { + secp256k1_num_add(&n, &n, &n); + } + + /* test residue */ + CHECK(secp256k1_num_jacobi(&n, &order) == 1); + /* test nonresidue */ + secp256k1_num_add(&n, &n, &n); + CHECK(secp256k1_num_jacobi(&n, &order) == -1); + + /** test with secp group order as order */ + secp256k1_scalar_order_get_num(&order); + random_scalar_order_test(&sqr); + secp256k1_scalar_sqr(&sqr, &sqr); + /* test residue */ + secp256k1_scalar_get_num(&n, &sqr); + CHECK(secp256k1_num_jacobi(&n, &order) == 1); + /* test nonresidue */ + secp256k1_scalar_mul(&sqr, &sqr, &five); + secp256k1_scalar_get_num(&n, &sqr); + CHECK(secp256k1_num_jacobi(&n, &order) == -1); + /* test multiple of the order*/ + CHECK(secp256k1_num_jacobi(&order, &order) == 0); + + /* check one less than the order */ + secp256k1_scalar_set_int(&small, 1); + secp256k1_scalar_get_num(&n, &small); + secp256k1_num_sub(&n, &order, &n); + CHECK(secp256k1_num_jacobi(&n, &order) == 1); /* sage confirms this is 1 */ } void run_num_smalltests(void) { @@ -505,6 +611,8 @@ void run_num_smalltests(void) { for (i = 0; i < 100*count; i++) { test_num_negate(); test_num_add_sub(); + test_num_mod(); + test_num_jacobi(); } } #endif @@ -689,6 +797,10 @@ void scalar_test(void) { secp256k1_scalar_inverse(&inv, &inv); /* Inverting one must result in one. */ CHECK(secp256k1_scalar_is_one(&inv)); +#ifndef USE_NUM_NONE + secp256k1_scalar_get_num(&invnum, &inv); + CHECK(secp256k1_num_is_one(&invnum)); +#endif } } @@ -855,7 +967,7 @@ void run_scalar_tests(void) { secp256k1_scalar zzv; #endif int overflow; - unsigned char chal[32][2][32] = { + unsigned char chal[33][2][32] = { {{0xff, 0xff, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, @@ -1111,9 +1223,17 @@ void run_scalar_tests(void) { {0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xc7, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff}} + 0xff, 0xc7, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff}}, + {{0x82, 0xc9, 0xfa, 0xb0, 0x68, 0x04, 0xa0, 0x00, + 0x82, 0xc9, 0xfa, 0xb0, 0x68, 0x04, 0xa0, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x6f, 0x03, 0xfb, + 0xfa, 0x8a, 0x7d, 0xdf, 0x13, 0x86, 0xe2, 0x03}, + {0x82, 0xc9, 0xfa, 0xb0, 0x68, 0x04, 0xa0, 0x00, + 0x82, 0xc9, 0xfa, 0xb0, 0x68, 0x04, 0xa0, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x6f, 0x03, 0xfb, + 0xfa, 0x8a, 0x7d, 0xdf, 0x13, 0x86, 0xe2, 0x03}} }; - unsigned char res[32][2][32] = { + unsigned char res[33][2][32] = { {{0x0c, 0x3b, 0x0a, 0xca, 0x8d, 0x1a, 0x2f, 0xb9, 0x8a, 0x7b, 0x53, 0x5a, 0x1f, 0xc5, 0x22, 0xa1, 0x07, 0x2a, 0x48, 0xea, 0x02, 0xeb, 0xb3, 0xd6, @@ -1369,10 +1489,18 @@ void run_scalar_tests(void) { {0xe4, 0xf1, 0x23, 0x84, 0xe1, 0xb5, 0x9d, 0xf2, 0xb8, 0x73, 0x8b, 0x45, 0x2b, 0x35, 0x46, 0x38, 0x10, 0x2b, 0x50, 0xf8, 0x8b, 0x35, 0xcd, 0x34, - 0xc8, 0x0e, 0xf6, 0xdb, 0x09, 0x35, 0xf0, 0xda}} + 0xc8, 0x0e, 0xf6, 0xdb, 0x09, 0x35, 0xf0, 0xda}}, + {{0xdb, 0x21, 0x5c, 0x8d, 0x83, 0x1d, 0xb3, 0x34, + 0xc7, 0x0e, 0x43, 0xa1, 0x58, 0x79, 0x67, 0x13, + 0x1e, 0x86, 0x5d, 0x89, 0x63, 0xe6, 0x0a, 0x46, + 0x5c, 0x02, 0x97, 0x1b, 0x62, 0x43, 0x86, 0xf5}, + {0xdb, 0x21, 0x5c, 0x8d, 0x83, 0x1d, 0xb3, 0x34, + 0xc7, 0x0e, 0x43, 0xa1, 0x58, 0x79, 0x67, 0x13, + 0x1e, 0x86, 0x5d, 0x89, 0x63, 0xe6, 0x0a, 0x46, + 0x5c, 0x02, 0x97, 0x1b, 0x62, 0x43, 0x86, 0xf5}} }; secp256k1_scalar_set_int(&one, 1); - for (i = 0; i < 32; i++) { + for (i = 0; i < 33; i++) { secp256k1_scalar_set_b32(&x, chal[i][0], &overflow); CHECK(!overflow); secp256k1_scalar_set_b32(&y, chal[i][1], &overflow); @@ -1446,7 +1574,7 @@ void random_fe_non_zero(secp256k1_fe *nz) { void random_fe_non_square(secp256k1_fe *ns) { secp256k1_fe r; random_fe_non_zero(ns); - if (secp256k1_fe_sqrt_var(&r, ns)) { + if (secp256k1_fe_sqrt(&r, ns)) { secp256k1_fe_negate(ns, ns, 1); } } @@ -1605,18 +1733,18 @@ void run_field_inv_all_var(void) { secp256k1_fe x[16], xi[16], xii[16]; int i; /* Check it's safe to call for 0 elements */ - secp256k1_fe_inv_all_var(0, xi, x); + secp256k1_fe_inv_all_var(xi, x, 0); for (i = 0; i < count; i++) { size_t j; size_t len = secp256k1_rand_int(15) + 1; for (j = 0; j < len; j++) { random_fe_non_zero(&x[j]); } - secp256k1_fe_inv_all_var(len, xi, x); + secp256k1_fe_inv_all_var(xi, x, len); for (j = 0; j < len; j++) { CHECK(check_fe_inverse(&x[j], &xi[j])); } - secp256k1_fe_inv_all_var(len, xii, xi); + secp256k1_fe_inv_all_var(xii, xi, len); for (j = 0; j < len; j++) { CHECK(check_fe_equal(&x[j], &xii[j])); } @@ -1641,7 +1769,7 @@ void run_sqr(void) { void test_sqrt(const secp256k1_fe *a, const secp256k1_fe *k) { secp256k1_fe r1, r2; - int v = secp256k1_fe_sqrt_var(&r1, a); + int v = secp256k1_fe_sqrt(&r1, a); CHECK((v == 0) == (k == NULL)); if (k != NULL) { @@ -1802,7 +1930,7 @@ void test_ge(void) { zs[i] = gej[i].z; } } - secp256k1_fe_inv_all_var(4 * runs + 1, zinv, zs); + secp256k1_fe_inv_all_var(zinv, zs, 4 * runs + 1); free(zs); } @@ -1922,8 +2050,8 @@ void test_ge(void) { secp256k1_fe_mul(&zr[i + 1], &zinv[i], &gej[i + 1].z); } } - secp256k1_ge_set_table_gej_var(4 * runs + 1, ge_set_table, gej, zr); - secp256k1_ge_set_all_gej_var(4 * runs + 1, ge_set_all, gej, &ctx->error_callback); + secp256k1_ge_set_table_gej_var(ge_set_table, gej, zr, 4 * runs + 1); + secp256k1_ge_set_all_gej_var(ge_set_all, gej, 4 * runs + 1, &ctx->error_callback); for (i = 0; i < 4 * runs + 1; i++) { secp256k1_fe s; random_fe_non_zero(&s); @@ -1951,8 +2079,8 @@ void test_add_neg_y_diff_x(void) { * of the sum to be wrong (since infinity has no xy coordinates). * HOWEVER, if the x-coordinates are different, infinity is the * wrong answer, and such degeneracies are exposed. This is the - * root of https://github.com/bitcoin/secp256k1/issues/257 which - * this test is a regression test for. + * root of https://github.com/bitcoin-core/secp256k1/issues/257 + * which this test is a regression test for. * * These points were generated in sage as * # secp256k1 params @@ -2051,15 +2179,16 @@ void run_ec_combine(void) { void test_group_decompress(const secp256k1_fe* x) { /* The input itself, normalized. */ secp256k1_fe fex = *x; - secp256k1_fe tmp; + secp256k1_fe fez; /* Results of set_xquad_var, set_xo_var(..., 0), set_xo_var(..., 1). */ secp256k1_ge ge_quad, ge_even, ge_odd; + secp256k1_gej gej_quad; /* Return values of the above calls. */ int res_quad, res_even, res_odd; secp256k1_fe_normalize_var(&fex); - res_quad = secp256k1_ge_set_xquad_var(&ge_quad, &fex); + res_quad = secp256k1_ge_set_xquad(&ge_quad, &fex); res_even = secp256k1_ge_set_xo_var(&ge_even, &fex, 0); res_odd = secp256k1_ge_set_xo_var(&ge_odd, &fex, 1); @@ -2085,13 +2214,29 @@ void test_group_decompress(const secp256k1_fe* x) { CHECK(secp256k1_fe_equal_var(&ge_odd.x, x)); /* Check that the Y coordinate result in ge_quad is a square. */ - CHECK(secp256k1_fe_sqrt_var(&tmp, &ge_quad.y)); - secp256k1_fe_sqr(&tmp, &tmp); - CHECK(secp256k1_fe_equal_var(&tmp, &ge_quad.y)); + CHECK(secp256k1_fe_is_quad_var(&ge_quad.y)); /* Check odd/even Y in ge_odd, ge_even. */ CHECK(secp256k1_fe_is_odd(&ge_odd.y)); CHECK(!secp256k1_fe_is_odd(&ge_even.y)); + + /* Check secp256k1_gej_has_quad_y_var. */ + secp256k1_gej_set_ge(&gej_quad, &ge_quad); + CHECK(secp256k1_gej_has_quad_y_var(&gej_quad)); + do { + random_fe_test(&fez); + } while (secp256k1_fe_is_zero(&fez)); + secp256k1_gej_rescale(&gej_quad, &fez); + CHECK(secp256k1_gej_has_quad_y_var(&gej_quad)); + secp256k1_gej_neg(&gej_quad, &gej_quad); + CHECK(!secp256k1_gej_has_quad_y_var(&gej_quad)); + do { + random_fe_test(&fez); + } while (secp256k1_fe_is_zero(&fez)); + secp256k1_gej_rescale(&gej_quad, &fez); + CHECK(!secp256k1_gej_has_quad_y_var(&gej_quad)); + secp256k1_gej_neg(&gej_quad, &gej_quad); + CHECK(secp256k1_gej_has_quad_y_var(&gej_quad)); } } @@ -2383,9 +2528,7 @@ void test_constant_wnaf(const secp256k1_scalar *number, int w) { secp256k1_scalar x, shift; int wnaf[256] = {0}; int i; -#ifdef USE_ENDOMORPHISM int skew; -#endif secp256k1_scalar num = *number; secp256k1_scalar_set_int(&x, 0); @@ -2395,10 +2538,8 @@ void test_constant_wnaf(const secp256k1_scalar *number, int w) { for (i = 0; i < 16; ++i) { secp256k1_scalar_shr_int(&num, 8); } - skew = secp256k1_wnaf_const(wnaf, num, w); -#else - secp256k1_wnaf_const(wnaf, num, w); #endif + skew = secp256k1_wnaf_const(wnaf, num, w); for (i = WNAF_SIZE(w); i >= 0; --i) { secp256k1_scalar t; @@ -2417,10 +2558,8 @@ void test_constant_wnaf(const secp256k1_scalar *number, int w) { } secp256k1_scalar_add(&x, &x, &t); } -#ifdef USE_ENDOMORPHISM - /* Skew num because when encoding 128-bit numbers as odd we use an offset */ + /* Skew num because when encoding numbers as odd we use an offset */ secp256k1_scalar_cadd_bit(&num, skew == 2, 1); -#endif CHECK(secp256k1_scalar_eq(&x, &num)); } @@ -3484,12 +3623,14 @@ void run_ecdsa_end_to_end(void) { int test_ecdsa_der_parse(const unsigned char *sig, size_t siglen, int certainly_der, int certainly_not_der) { static const unsigned char zeroes[32] = {0}; +#ifdef ENABLE_OPENSSL_TESTS static const unsigned char max_scalar[32] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xba, 0xae, 0xdc, 0xe6, 0xaf, 0x48, 0xa0, 0x3b, 0xbf, 0xd2, 0x5e, 0x8c, 0xd0, 0x36, 0x41, 0x40 }; +#endif int ret = 0; @@ -3607,13 +3748,13 @@ static void assign_big_endian(unsigned char *ptr, size_t ptrlen, uint32_t val) { static void damage_array(unsigned char *sig, size_t *len) { int pos; int action = secp256k1_rand_bits(3); - if (action < 1) { + if (action < 1 && *len > 3) { /* Delete a byte. */ pos = secp256k1_rand_int(*len); memmove(sig + pos, sig + pos + 1, *len - pos - 1); (*len)--; return; - } else if (action < 2) { + } else if (action < 2 && *len < 2048) { /* Insert a byte. */ pos = secp256k1_rand_int(1 + *len); memmove(sig + pos + 1, sig + pos, *len - pos); @@ -3785,6 +3926,7 @@ void run_ecdsa_der_parse(void) { int certainly_der = 0; int certainly_not_der = 0; random_ber_signature(buffer, &buflen, &certainly_der, &certainly_not_der); + CHECK(buflen <= 2048); for (j = 0; j < 16; j++) { int ret = 0; if (j > 0) { diff --git a/src/tests_exhaustive.c b/src/tests_exhaustive.c new file mode 100644 index 00000000000..bda6ee475c9 --- /dev/null +++ b/src/tests_exhaustive.c @@ -0,0 +1,329 @@ +/*********************************************************************** + * Copyright (c) 2016 Andrew Poelstra * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#if defined HAVE_CONFIG_H +#include "libsecp256k1-config.h" +#endif + +#include +#include + +#include + +#undef USE_ECMULT_STATIC_PRECOMPUTATION + +#ifndef EXHAUSTIVE_TEST_ORDER +/* see group_impl.h for allowable values */ +#define EXHAUSTIVE_TEST_ORDER 13 +#define EXHAUSTIVE_TEST_LAMBDA 9 /* cube root of 1 mod 13 */ +#endif + +#include "include/secp256k1.h" +#include "group.h" +#include "secp256k1.c" +#include "testrand_impl.h" + +/** stolen from tests.c */ +void ge_equals_ge(const secp256k1_ge *a, const secp256k1_ge *b) { + CHECK(a->infinity == b->infinity); + if (a->infinity) { + return; + } + CHECK(secp256k1_fe_equal_var(&a->x, &b->x)); + CHECK(secp256k1_fe_equal_var(&a->y, &b->y)); +} + +void ge_equals_gej(const secp256k1_ge *a, const secp256k1_gej *b) { + secp256k1_fe z2s; + secp256k1_fe u1, u2, s1, s2; + CHECK(a->infinity == b->infinity); + if (a->infinity) { + return; + } + /* Check a.x * b.z^2 == b.x && a.y * b.z^3 == b.y, to avoid inverses. */ + secp256k1_fe_sqr(&z2s, &b->z); + secp256k1_fe_mul(&u1, &a->x, &z2s); + u2 = b->x; secp256k1_fe_normalize_weak(&u2); + secp256k1_fe_mul(&s1, &a->y, &z2s); secp256k1_fe_mul(&s1, &s1, &b->z); + s2 = b->y; secp256k1_fe_normalize_weak(&s2); + CHECK(secp256k1_fe_equal_var(&u1, &u2)); + CHECK(secp256k1_fe_equal_var(&s1, &s2)); +} + +void random_fe(secp256k1_fe *x) { + unsigned char bin[32]; + do { + secp256k1_rand256(bin); + if (secp256k1_fe_set_b32(x, bin)) { + return; + } + } while(1); +} +/** END stolen from tests.c */ + +int secp256k1_nonce_function_smallint(unsigned char *nonce32, const unsigned char *msg32, + const unsigned char *key32, const unsigned char *algo16, + void *data, unsigned int attempt) { + secp256k1_scalar s; + int *idata = data; + (void)msg32; + (void)key32; + (void)algo16; + /* Some nonces cannot be used because they'd cause s and/or r to be zero. + * The signing function has retry logic here that just re-calls the nonce + * function with an increased `attempt`. So if attempt > 0 this means we + * need to change the nonce to avoid an infinite loop. */ + if (attempt > 0) { + (*idata)++; + } + secp256k1_scalar_set_int(&s, *idata); + secp256k1_scalar_get_b32(nonce32, &s); + return 1; +} + +#ifdef USE_ENDOMORPHISM +void test_exhaustive_endomorphism(const secp256k1_ge *group, int order) { + int i; + for (i = 0; i < order; i++) { + secp256k1_ge res; + secp256k1_ge_mul_lambda(&res, &group[i]); + ge_equals_ge(&group[i * EXHAUSTIVE_TEST_LAMBDA % EXHAUSTIVE_TEST_ORDER], &res); + } +} +#endif + +void test_exhaustive_addition(const secp256k1_ge *group, const secp256k1_gej *groupj, int order) { + int i, j; + + /* Sanity-check (and check infinity functions) */ + CHECK(secp256k1_ge_is_infinity(&group[0])); + CHECK(secp256k1_gej_is_infinity(&groupj[0])); + for (i = 1; i < order; i++) { + CHECK(!secp256k1_ge_is_infinity(&group[i])); + CHECK(!secp256k1_gej_is_infinity(&groupj[i])); + } + + /* Check all addition formulae */ + for (j = 0; j < order; j++) { + secp256k1_fe fe_inv; + secp256k1_fe_inv(&fe_inv, &groupj[j].z); + for (i = 0; i < order; i++) { + secp256k1_ge zless_gej; + secp256k1_gej tmp; + /* add_var */ + secp256k1_gej_add_var(&tmp, &groupj[i], &groupj[j], NULL); + ge_equals_gej(&group[(i + j) % order], &tmp); + /* add_ge */ + if (j > 0) { + secp256k1_gej_add_ge(&tmp, &groupj[i], &group[j]); + ge_equals_gej(&group[(i + j) % order], &tmp); + } + /* add_ge_var */ + secp256k1_gej_add_ge_var(&tmp, &groupj[i], &group[j], NULL); + ge_equals_gej(&group[(i + j) % order], &tmp); + /* add_zinv_var */ + zless_gej.infinity = groupj[j].infinity; + zless_gej.x = groupj[j].x; + zless_gej.y = groupj[j].y; + secp256k1_gej_add_zinv_var(&tmp, &groupj[i], &zless_gej, &fe_inv); + ge_equals_gej(&group[(i + j) % order], &tmp); + } + } + + /* Check doubling */ + for (i = 0; i < order; i++) { + secp256k1_gej tmp; + if (i > 0) { + secp256k1_gej_double_nonzero(&tmp, &groupj[i], NULL); + ge_equals_gej(&group[(2 * i) % order], &tmp); + } + secp256k1_gej_double_var(&tmp, &groupj[i], NULL); + ge_equals_gej(&group[(2 * i) % order], &tmp); + } + + /* Check negation */ + for (i = 1; i < order; i++) { + secp256k1_ge tmp; + secp256k1_gej tmpj; + secp256k1_ge_neg(&tmp, &group[i]); + ge_equals_ge(&group[order - i], &tmp); + secp256k1_gej_neg(&tmpj, &groupj[i]); + ge_equals_gej(&group[order - i], &tmpj); + } +} + +void test_exhaustive_ecmult(const secp256k1_context *ctx, const secp256k1_ge *group, const secp256k1_gej *groupj, int order) { + int i, j, r_log; + for (r_log = 1; r_log < order; r_log++) { + for (j = 0; j < order; j++) { + for (i = 0; i < order; i++) { + secp256k1_gej tmp; + secp256k1_scalar na, ng; + secp256k1_scalar_set_int(&na, i); + secp256k1_scalar_set_int(&ng, j); + + secp256k1_ecmult(&ctx->ecmult_ctx, &tmp, &groupj[r_log], &na, &ng); + ge_equals_gej(&group[(i * r_log + j) % order], &tmp); + + if (i > 0) { + secp256k1_ecmult_const(&tmp, &group[i], &ng); + ge_equals_gej(&group[(i * j) % order], &tmp); + } + } + } + } +} + +void r_from_k(secp256k1_scalar *r, const secp256k1_ge *group, int k) { + secp256k1_fe x; + unsigned char x_bin[32]; + k %= EXHAUSTIVE_TEST_ORDER; + x = group[k].x; + secp256k1_fe_normalize(&x); + secp256k1_fe_get_b32(x_bin, &x); + secp256k1_scalar_set_b32(r, x_bin, NULL); +} + +void test_exhaustive_verify(const secp256k1_context *ctx, const secp256k1_ge *group, int order) { + int s, r, msg, key; + for (s = 1; s < order; s++) { + for (r = 1; r < order; r++) { + for (msg = 1; msg < order; msg++) { + for (key = 1; key < order; key++) { + secp256k1_ge nonconst_ge; + secp256k1_ecdsa_signature sig; + secp256k1_pubkey pk; + secp256k1_scalar sk_s, msg_s, r_s, s_s; + secp256k1_scalar s_times_k_s, msg_plus_r_times_sk_s; + int k, should_verify; + unsigned char msg32[32]; + + secp256k1_scalar_set_int(&s_s, s); + secp256k1_scalar_set_int(&r_s, r); + secp256k1_scalar_set_int(&msg_s, msg); + secp256k1_scalar_set_int(&sk_s, key); + + /* Verify by hand */ + /* Run through every k value that gives us this r and check that *one* works. + * Note there could be none, there could be multiple, ECDSA is weird. */ + should_verify = 0; + for (k = 0; k < order; k++) { + secp256k1_scalar check_x_s; + r_from_k(&check_x_s, group, k); + if (r_s == check_x_s) { + secp256k1_scalar_set_int(&s_times_k_s, k); + secp256k1_scalar_mul(&s_times_k_s, &s_times_k_s, &s_s); + secp256k1_scalar_mul(&msg_plus_r_times_sk_s, &r_s, &sk_s); + secp256k1_scalar_add(&msg_plus_r_times_sk_s, &msg_plus_r_times_sk_s, &msg_s); + should_verify |= secp256k1_scalar_eq(&s_times_k_s, &msg_plus_r_times_sk_s); + } + } + /* nb we have a "high s" rule */ + should_verify &= !secp256k1_scalar_is_high(&s_s); + + /* Verify by calling verify */ + secp256k1_ecdsa_signature_save(&sig, &r_s, &s_s); + memcpy(&nonconst_ge, &group[sk_s], sizeof(nonconst_ge)); + secp256k1_pubkey_save(&pk, &nonconst_ge); + secp256k1_scalar_get_b32(msg32, &msg_s); + CHECK(should_verify == + secp256k1_ecdsa_verify(ctx, &sig, msg32, &pk)); + } + } + } + } +} + +void test_exhaustive_sign(const secp256k1_context *ctx, const secp256k1_ge *group, int order) { + int i, j, k; + + /* Loop */ + for (i = 1; i < order; i++) { /* message */ + for (j = 1; j < order; j++) { /* key */ + for (k = 1; k < order; k++) { /* nonce */ + secp256k1_ecdsa_signature sig; + secp256k1_scalar sk, msg, r, s, expected_r; + unsigned char sk32[32], msg32[32]; + secp256k1_scalar_set_int(&msg, i); + secp256k1_scalar_set_int(&sk, j); + secp256k1_scalar_get_b32(sk32, &sk); + secp256k1_scalar_get_b32(msg32, &msg); + + secp256k1_ecdsa_sign(ctx, &sig, msg32, sk32, secp256k1_nonce_function_smallint, &k); + + secp256k1_ecdsa_signature_load(ctx, &r, &s, &sig); + /* Note that we compute expected_r *after* signing -- this is important + * because our nonce-computing function function might change k during + * signing. */ + r_from_k(&expected_r, group, k); + CHECK(r == expected_r); + CHECK((k * s) % order == (i + r * j) % order || + (k * (EXHAUSTIVE_TEST_ORDER - s)) % order == (i + r * j) % order); + } + } + } + + /* We would like to verify zero-knowledge here by counting how often every + * possible (s, r) tuple appears, but because the group order is larger + * than the field order, when coercing the x-values to scalar values, some + * appear more often than others, so we are actually not zero-knowledge. + * (This effect also appears in the real code, but the difference is on the + * order of 1/2^128th the field order, so the deviation is not useful to a + * computationally bounded attacker.) + */ +} + +int main(void) { + int i; + secp256k1_gej groupj[EXHAUSTIVE_TEST_ORDER]; + secp256k1_ge group[EXHAUSTIVE_TEST_ORDER]; + + /* Build context */ + secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); + + /* TODO set z = 1, then do num_tests runs with random z values */ + + /* Generate the entire group */ + secp256k1_gej_set_infinity(&groupj[0]); + secp256k1_ge_set_gej(&group[0], &groupj[0]); + for (i = 1; i < EXHAUSTIVE_TEST_ORDER; i++) { + /* Set a different random z-value for each Jacobian point */ + secp256k1_fe z; + random_fe(&z); + + secp256k1_gej_add_ge(&groupj[i], &groupj[i - 1], &secp256k1_ge_const_g); + secp256k1_ge_set_gej(&group[i], &groupj[i]); + secp256k1_gej_rescale(&groupj[i], &z); + + /* Verify against ecmult_gen */ + { + secp256k1_scalar scalar_i; + secp256k1_gej generatedj; + secp256k1_ge generated; + + secp256k1_scalar_set_int(&scalar_i, i); + secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &generatedj, &scalar_i); + secp256k1_ge_set_gej(&generated, &generatedj); + + CHECK(group[i].infinity == 0); + CHECK(generated.infinity == 0); + CHECK(secp256k1_fe_equal_var(&generated.x, &group[i].x)); + CHECK(secp256k1_fe_equal_var(&generated.y, &group[i].y)); + } + } + + /* Run the tests */ +#ifdef USE_ENDOMORPHISM + test_exhaustive_endomorphism(group, EXHAUSTIVE_TEST_ORDER); +#endif + test_exhaustive_addition(group, groupj, EXHAUSTIVE_TEST_ORDER); + test_exhaustive_ecmult(ctx, group, groupj, EXHAUSTIVE_TEST_ORDER); + test_exhaustive_sign(ctx, group, EXHAUSTIVE_TEST_ORDER); + test_exhaustive_verify(ctx, group, EXHAUSTIVE_TEST_ORDER); + + return 0; +} + From 0cc07f82f0d4043e93d8cea49356cd2bc5ffcb27 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Wed, 7 Dec 2016 15:20:40 +0100 Subject: [PATCH 277/302] [QA] add fundrawtransaction test on a locked wallet with empty keypool Github-Pull: #9295 Rebased-From: 1a6eacbf3b7e3d5941fec1154079bbc4678ce861 --- qa/rpc-tests/fundrawtransaction.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/qa/rpc-tests/fundrawtransaction.py b/qa/rpc-tests/fundrawtransaction.py index 8c45578fcfb..0dcca4cb570 100755 --- a/qa/rpc-tests/fundrawtransaction.py +++ b/qa/rpc-tests/fundrawtransaction.py @@ -484,6 +484,23 @@ def run_test(self): self.is_network_split=False self.sync_all() + # drain the keypool + self.nodes[1].getnewaddress() + inputs = [] + outputs = {self.nodes[0].getnewaddress():1.1} + rawTx = self.nodes[1].createrawtransaction(inputs, outputs) + # fund a transaction that requires a new key for the change output + # creating the key must be impossible because the wallet is locked + try: + fundedTx = self.nodes[1].fundrawtransaction(rawTx) + raise AssertionError("Wallet unlocked without passphrase") + except JSONRPCException as e: + assert('Keypool ran out' in e.error['message']) + + #refill the keypool + self.nodes[1].walletpassphrase("test", 100) + self.nodes[1].walletlock() + try: self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1.2) raise AssertionError("Wallet unlocked without passphrase") From 43bcfca48970b65d4eb215f20047bb99495f3727 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 6 Dec 2016 13:45:56 +0100 Subject: [PATCH 278/302] [Wallet] Bugfix: FRT: don't terminate when keypool is empty Github-Pull: #9295 Rebased-From: c24a4f5981d47d55aa9e4eb40294832a4d38fb80 --- src/wallet/wallet.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 6ce8d19bfbb..5b35e49a0f2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2290,7 +2290,11 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt CPubKey vchPubKey; bool ret; ret = reservekey.GetReservedKey(vchPubKey); - assert(ret); // should never fail, as we just unlocked + if (!ret) + { + strFailReason = _("Keypool ran out, please call keypoolrefill first"); + return false; + } scriptChange = GetScriptForDestination(vchPubKey.GetID()); } From a0f7ececfd096df398fc5e4aad07f1a43760afb4 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Mon, 12 Dec 2016 08:10:27 +0000 Subject: [PATCH 279/302] Update for OpenSSL 1.1 API Github-Pull: #9326 Rebased-From: bae1eef752dcecfd85fa482881e1dbe4d7e9f74c b05b1af10b9a5298bd90bea439f0fd6c636e0cfa --- src/qt/paymentrequestplus.cpp | 20 +++++++++++++++----- src/wallet/test/crypto_tests.cpp | 32 ++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp index 20e1f79ffa2..82be4d831f6 100644 --- a/src/qt/paymentrequestplus.cpp +++ b/src/qt/paymentrequestplus.cpp @@ -159,14 +159,24 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c std::string data_to_verify; // Everything but the signature rcopy.SerializeToString(&data_to_verify); - EVP_MD_CTX ctx; +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + EVP_MD_CTX *ctx = EVP_MD_CTX_new(); + if (!ctx) throw SSLVerifyError("Error allocating OpenSSL context."); +#else + EVP_MD_CTX _ctx; + EVP_MD_CTX *ctx; + ctx = &_ctx; +#endif EVP_PKEY *pubkey = X509_get_pubkey(signing_cert); - EVP_MD_CTX_init(&ctx); - if (!EVP_VerifyInit_ex(&ctx, digestAlgorithm, NULL) || - !EVP_VerifyUpdate(&ctx, data_to_verify.data(), data_to_verify.size()) || - !EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) { + EVP_MD_CTX_init(ctx); + if (!EVP_VerifyInit_ex(ctx, digestAlgorithm, NULL) || + !EVP_VerifyUpdate(ctx, data_to_verify.data(), data_to_verify.size()) || + !EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) { throw SSLVerifyError("Bad signature, invalid payment request."); } +#if OPENSSL_VERSION_NUMBER >= 0x10100000L + EVP_MD_CTX_free(ctx); +#endif // OpenSSL API for getting human printable strings from certs is baroque. int textlen = X509_NAME_get_text_by_NID(certname, NID_commonName, NULL, 0); diff --git a/src/wallet/test/crypto_tests.cpp b/src/wallet/test/crypto_tests.cpp index 05387f5f2b5..b235b96095c 100644 --- a/src/wallet/test/crypto_tests.cpp +++ b/src/wallet/test/crypto_tests.cpp @@ -42,15 +42,19 @@ bool OldEncrypt(const CKeyingMaterial& vchPlaintext, std::vector int nCLen = nLen + AES_BLOCK_SIZE, nFLen = 0; vchCiphertext = std::vector (nCLen); - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); + + if (!ctx) return false; bool fOk = true; - EVP_CIPHER_CTX_init(&ctx); - if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0; - if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0; - if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0; - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_init(ctx); + if (fOk) fOk = EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0; + if (fOk) fOk = EVP_EncryptUpdate(ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0; + if (fOk) fOk = EVP_EncryptFinal_ex(ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0; + EVP_CIPHER_CTX_cleanup(ctx); + + EVP_CIPHER_CTX_free(ctx); if (!fOk) return false; @@ -66,15 +70,19 @@ bool OldDecrypt(const std::vector& vchCiphertext, CKeyingMaterial vchPlaintext = CKeyingMaterial(nPLen); - EVP_CIPHER_CTX ctx; + EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); + + if (!ctx) return false; bool fOk = true; - EVP_CIPHER_CTX_init(&ctx); - if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0; - if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0; - if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0; - EVP_CIPHER_CTX_cleanup(&ctx); + EVP_CIPHER_CTX_init(ctx); + if (fOk) fOk = EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0; + if (fOk) fOk = EVP_DecryptUpdate(ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0; + if (fOk) fOk = EVP_DecryptFinal_ex(ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0; + EVP_CIPHER_CTX_cleanup(ctx); + + EVP_CIPHER_CTX_free(ctx); if (!fOk) return false; From 35174a0280845e9583a3af1fcf57ee1f98238539 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell Date: Tue, 6 Dec 2016 06:39:14 +0000 Subject: [PATCH 280/302] Make RelayWalletTransaction attempt to AcceptToMemoryPool. This resolves an issue where a wallet transaction which failed to relay previously because it couldn't make it into the mempool will not try again until restart, even though mempool conditions may have changed. Abandoned and known-conflicted transactions are skipped. Some concern was expressed that there may be users with many unknown conflicts would waste a lot of CPU time trying to add them to their memory pools over and over again. But I am doubtful these users exist in any number, if they do exist they have worse problems, and they can mitigate any performance issue this might have by abandoning the transactions in question. Github-Pull: #9290 Rebased-From: f692fce8a49e05e25f1c767aae1e50db419caebe --- src/wallet/wallet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 5b35e49a0f2..0403b355853 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1449,9 +1449,10 @@ void CWallet::ReacceptWalletTransactions() bool CWalletTx::RelayWalletTransaction() { assert(pwallet->GetBroadcastTransactions()); - if (!IsCoinBase()) + if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0) { - if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) { + /* GetDepthInMainChain already catches known conflicts. */ + if (InMempool() || AcceptToMemoryPool(false, maxTxFee)) { LogPrintf("Relaying wtx %s\n", GetHash().ToString()); RelayTransaction((CTransaction)*this); return true; From f5d606e5ab0b20881cc0d58d63e6db065c59b411 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 8 Dec 2016 11:49:28 -0800 Subject: [PATCH 281/302] Return txid even if ATMP fails for new transaction Github-Pull: #9302 Rebased-From: b3a74100b86423c553ac327f3ea6fdbc2c50890a --- src/wallet/wallet.cpp | 21 +++++++++++---------- src/wallet/wallet.h | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0403b355853..7f62402625e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1442,7 +1442,8 @@ void CWallet::ReacceptWalletTransactions() CWalletTx& wtx = *(item.second); LOCK(mempool.cs); - wtx.AcceptToMemoryPool(false, maxTxFee); + CValidationState state; + wtx.AcceptToMemoryPool(false, maxTxFee, state); } } @@ -1451,8 +1452,9 @@ bool CWalletTx::RelayWalletTransaction() assert(pwallet->GetBroadcastTransactions()); if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0) { + CValidationState state; /* GetDepthInMainChain already catches known conflicts. */ - if (InMempool() || AcceptToMemoryPool(false, maxTxFee)) { + if (InMempool() || AcceptToMemoryPool(false, maxTxFee, state)) { LogPrintf("Relaying wtx %s\n", GetHash().ToString()); RelayTransaction((CTransaction)*this); return true; @@ -2482,14 +2484,14 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) if (fBroadcastTransactions) { + CValidationState state; // Broadcast - if (!wtxNew.AcceptToMemoryPool(false, maxTxFee)) - { - // This must not fail. The transaction has already been signed and recorded. - LogPrintf("CommitTransaction(): Error: Transaction not valid\n"); - return false; + if (!wtxNew.AcceptToMemoryPool(false, maxTxFee, state)) { + LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", state.GetRejectReason()); + // TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure. + } else { + wtxNew.RelayWalletTransaction(); } - wtxNew.RelayWalletTransaction(); } } return true; @@ -3595,8 +3597,7 @@ int CMerkleTx::GetBlocksToMaturity() const } -bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, CAmount nAbsurdFee) +bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, CAmount nAbsurdFee, CValidationState& state) { - CValidationState state; return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, false, nAbsurdFee); } diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 0c95fdf4b04..056dcc5dafa 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -213,7 +213,7 @@ class CMerkleTx : public CTransaction bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet) > 0; } int GetBlocksToMaturity() const; /** Pass this transaction to the mempool. Fails if absolute fee exceeds absurd fee. */ - bool AcceptToMemoryPool(bool fLimitFree, const CAmount nAbsurdFee); + bool AcceptToMemoryPool(bool fLimitFree, const CAmount nAbsurdFee, CValidationState& state); bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); } bool isAbandoned() const { return (hashBlock == ABANDON_HASH); } void setAbandoned() { hashBlock = ABANDON_HASH; } From 4ced31325699dc308571010ce004376d2915cd7e Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 14 Dec 2016 17:00:06 -0500 Subject: [PATCH 282/302] Allow compactblock reconstruction when block is in flight --- src/main.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 191bcff4cc1..976e130f1a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5657,6 +5657,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, CBlockHeaderAndShortTxIDs cmpctblock; vRecv >> cmpctblock; + // Keep a CBlock for "optimistic" compactblock reconstructions (see + // below) + CBlock block; + bool fBlockReconstructed = false; + LOCK(cs_main); if (mapBlockIndex.find(cmpctblock.header.hashPrevBlock) == mapBlockIndex.end()) { @@ -5765,6 +5770,23 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, req.blockhash = pindex->GetBlockHash(); pfrom->PushMessage(NetMsgType::GETBLOCKTXN, req); } + } else { + // This block is either already in flight from a different + // peer, or this peer has too many blocks outstanding to + // download from. + // Optimistically try to reconstruct anyway since we might be + // able to without any round trips. + PartiallyDownloadedBlock tempBlock(&mempool); + ReadStatus status = tempBlock.InitData(cmpctblock); + if (status != READ_STATUS_OK) { + // TODO: don't ignore failures + return true; + } + std::vector dummy; + status = tempBlock.FillBlock(block, dummy); + if (status == READ_STATUS_OK) { + fBlockReconstructed = true; + } } } else { if (fAlreadyInFlight) { @@ -5785,6 +5807,33 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } } + if (fBlockReconstructed) { + // If we got here, we were able to optimistically reconstruct a + // block that is in flight from some other peer. However, this + // cmpctblock may be invalid. In particular, while we've checked + // that the block merkle root commits to the transaction ids, we + // haven't yet checked that tx witnesses are properly committed to + // in the coinbase witness commitment. + // + // ProcessNewBlock will call MarkBlockAsReceived(), which will + // clear any in-flight compact block state that might be present + // from some other peer. We don't want a malleated compact block + // request to interfere with block relay, so we don't want to call + // ProcessNewBlock until we've already checked that the witness + // commitment is correct. + { + LOCK(cs_main); + CValidationState dummy; + if (!ContextualCheckBlock(block, dummy, pindex->pprev)) { + // TODO: could send reject message to peer? + return true; + } + } + CValidationState state; + ProcessNewBlock(state, chainparams, pfrom, &block, true, NULL, false); + // TODO: could send reject message if block is invalid? + } + CheckBlockIndex(chainparams.GetConsensus()); } From 53b656f3558fe960d9328079ca18eb53418f2652 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 1 Dec 2016 12:59:10 -0500 Subject: [PATCH 283/302] [qa] Update compactblocks test for multi-peer reconstruction --- qa/rpc-tests/p2p-compactblocks.py | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index e0b72e68402..156a559b10a 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -757,6 +757,54 @@ def request_cb_announcements(self, peer, node, version): msg.announce = True peer.send_and_ping(msg) + def test_compactblock_reconstruction_multiple_peers(self, node, stalling_peer, delivery_peer): + assert(len(self.utxos)) + + def announce_cmpct_block(node, peer): + utxo = self.utxos.pop(0) + block = self.build_block_with_transactions(node, utxo, 5) + + cmpct_block = HeaderAndShortIDs() + cmpct_block.initialize_from_block(block) + msg = msg_cmpctblock(cmpct_block.to_p2p()) + peer.send_and_ping(msg) + with mininode_lock: + assert(peer.last_getblocktxn is not None) + return block, cmpct_block + + block, cmpct_block = announce_cmpct_block(node, stalling_peer) + + for tx in block.vtx[1:]: + delivery_peer.send_message(msg_tx(tx)) + delivery_peer.sync_with_ping() + mempool = node.getrawmempool() + for tx in block.vtx[1:]: + assert(tx.hash in mempool) + + delivery_peer.send_and_ping(msg_cmpctblock(cmpct_block.to_p2p())) + assert_equal(int(node.getbestblockhash(), 16), block.sha256) + + self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue]) + + # Now test that delivering an invalid compact block won't break relay + + block, cmpct_block = announce_cmpct_block(node, stalling_peer) + for tx in block.vtx[1:]: + delivery_peer.send_message(msg_tx(tx)) + delivery_peer.sync_with_ping() + + cmpct_block.prefilled_txn[0].tx.wit.vtxinwit = [ CTxInWitness() ] + cmpct_block.prefilled_txn[0].tx.wit.vtxinwit[0].scriptWitness.stack = [ser_uint256(0)] + + cmpct_block.use_witness = True + delivery_peer.send_and_ping(msg_cmpctblock(cmpct_block.to_p2p())) + assert(int(node.getbestblockhash(), 16) != block.sha256) + + msg = msg_blocktxn() + msg.block_transactions.blockhash = block.sha256 + msg.block_transactions.transactions = block.vtx[1:] + stalling_peer.send_and_ping(msg) + assert_equal(int(node.getbestblockhash(), 16), block.sha256) def run_test(self): # Setup the p2p connections and start up the network thread. @@ -841,6 +889,10 @@ def run_test(self): self.test_invalid_tx_in_compactblock(self.nodes[1], self.segwit_node, False) self.test_invalid_tx_in_compactblock(self.nodes[1], self.old_node, False) + print("\tTesting reconstructing compact blocks from all peers...") + self.test_compactblock_reconstruction_multiple_peers(self.nodes[1], self.segwit_node, self.old_node) + sync_blocks(self.nodes) + # Advance to segwit activation print ("\nAdvancing to segwit activation\n") self.activate_segwit(self.nodes[1]) From c365556185d89122a04344d2dc640cffc67f155c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 5 Dec 2016 23:26:32 -0800 Subject: [PATCH 284/302] Complain when unknown rpcserialversion is specified Github-Pull: #9292 Rebased-From: 80d073c9bca4521d512ea14ff7919d4609647b6d --- src/init.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 8e40c4388d1..f2dbf575192 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -364,7 +364,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), Params(CBaseChainParams::MAIN).GetDefaultPort(), Params(CBaseChainParams::TESTNET).GetDefaultPort())); strUsage += HelpMessageOpt("-proxy=", _("Connect through SOCKS5 proxy")); strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), DEFAULT_PROXYRANDOMIZE)); - strUsage += HelpMessageOpt("-rpcserialversion", strprintf(_("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(>0) (default: %d)"), DEFAULT_RPC_SERIALIZE_VERSION)); + strUsage += HelpMessageOpt("-rpcserialversion", strprintf(_("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)"), DEFAULT_RPC_SERIALIZE_VERSION)); strUsage += HelpMessageOpt("-seednode=", _("Connect to a node to retrieve peer addresses, and disconnect")); strUsage += HelpMessageOpt("-timeout=", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT)); strUsage += HelpMessageOpt("-torcontrol=:", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL)); @@ -986,6 +986,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) < 0) return InitError("rpcserialversion must be non-negative."); + if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) > 1) + return InitError("unknown rpcserialversion requested."); + nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); fEnableReplacement = GetBoolArg("-mempoolreplacement", DEFAULT_ENABLE_REPLACEMENT); From 49a612f347be150b03eb6ef8fa438d2b06e26993 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 11 Dec 2016 14:12:47 +0100 Subject: [PATCH 285/302] [qa] Don't set unknown rpcserialversion Github-Pull: #9322 Rebased-From: fa615d39b53a9309ef480c41ec073354c4371f40 --- qa/rpc-tests/segwit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py index 4b4fdf8b11d..31a48955e5c 100755 --- a/qa/rpc-tests/segwit.py +++ b/qa/rpc-tests/segwit.py @@ -85,7 +85,7 @@ def setup_chain(self): def setup_network(self): self.nodes = [] self.nodes.append(start_node(0, self.options.tmpdir, ["-logtimemicros", "-debug", "-walletprematurewitness", "-rpcserialversion=0"])) - self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness", "-rpcserialversion=2"])) + self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness", "-rpcserialversion=1"])) self.nodes.append(start_node(2, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=536870915", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"])) connect_nodes(self.nodes[1], 0) connect_nodes(self.nodes[2], 1) @@ -215,7 +215,6 @@ def run_test(self): assert_equal(len(segwit_tx_list), 5) print("Verify block and transaction serialization rpcs return differing serializations depending on rpc serialization flag") - # Note: node1 has version 2, which is simply >0 and will catch future upgrades in tests assert(self.nodes[2].getblock(block[0], False) != self.nodes[0].getblock(block[0], False)) assert(self.nodes[1].getblock(block[0], False) == self.nodes[2].getblock(block[0], False)) for i in range(len(segwit_tx_list)): From 2c5fc0dba32a6ede1d611554a04a996183aa8ee9 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 19 Dec 2016 13:09:56 +0100 Subject: [PATCH 286/302] doc: Add initial pulls + authors list for 0.13.2 --- doc/release-notes.md | 107 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 102 insertions(+), 5 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 0830e0a123b..acfb45ae2a9 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,6 +1,6 @@ -Bitcoin Core version 0.13.x is now available from: +Bitcoin Core version 0.13.2 is now available from: - + This is a new minor version release, including ..., various bugfixes and performance improvements, as well as updated translations. @@ -60,7 +60,7 @@ can be abandoned with the previously existing abandontransaction RPC (or in the GUI via a context menu on the transaction). -0.13.x Change log +0.13.2 Change log ================= Detailed release notes follow. This overview includes changes that affect @@ -68,13 +68,110 @@ behavior, not code moves, refactors and string updates. For convenience in locat the code changes and accompanying discussion, both the pull request and git merge commit are mentioned. -(to be filled in at release time) +### Consensus +- #9293 `e591c10` [0.13 Backport #9053] IBD using chainwork instead of height and not using header timestamp (gmaxwell) +- #9053 `5b93eee` IBD using chainwork instead of height and not using header timestamps (gmaxwell) + +### RPC and other APIs +- #8845 `1d048b9` Don't return the address of a P2SH of a P2SH (jnewbery) +- #9041 `87fbced` keypoololdest denote Unix epoch, not GMT (s-matthew-english) +- #9122 `f82c81b` fix getnettotals RPC description about timemillis (visvirial) +- #9042 `5bcb05d` [rpc] ParseHash: Fail when length is not 64 (MarcoFalke) +- #9194 `f26dab7` Add option to return non-segwit serialization via rpc (instagibbs) +- #9347 `b711390` [0.13.2] wallet/rpc backports (MarcoFalke) +- #9292 `c365556` Complain when unknown rpcserialversion is specified (sipa) +- #9322 `49a612f` [qa] Don't set unknown rpcserialversion (MarcoFalke) + +### Block and transaction handling +- #8357 `ce0d817` [mempool] Fix relaypriority calculation error (maiiz) +- #9267 `0a4aa87` [0.13 backport #9239] Disable fee estimates for a confirm target of 1 block (morcos) +- #9196 `0c09d9f` Send tip change notification from invalidateblock (ryanofsky) + +### P2P protocol and network code +- #8995 `9ef3875` Add missing cs_main lock to ::GETBLOCKTXN processing (TheBlueMatt) +- #9234 `94531b5` torcontrol: Explicitly request RSA1024 private key (laanwj) +- #8637 `2cad5db` Compact Block Tweaks (rebase of #8235) (sipa) +- #9058 `286e548` Fixes for p2p-compactblocks.py test timeouts on travis (#8842) (ryanofsky) +- #8865 `4c71fc4` Decouple peer-processing-logic from block-connection-logic (TheBlueMatt) +- #9117 `6fe3981` net: don't send feefilter messages before the version handshake is complete (theuni) +- #9188 `ca1fd75` Make orphan parent fetching ask for witnesses (gmaxwell) +- #9052 `3a3bcbf` Use RelevantServices instead of node_network in AttemptToEvict (gmaxwell) +- #9048 `9460771` [0.13 backport #9026] Fix handling of invalid compact blocks (sdaftuar) +- #9357 `03b6f62` [0.13 backport #9352] Attempt reconstruction from all compact block announcements (sdaftuar) +- #9189 `b96a8f7` Always add default_witness_commitment with GBT client support (sipa) +- #9253 `28d0f22` Fix calculation of number of bound sockets to use (TheBlueMatt) +- #9199 `da5a16b` Always drop the least preferred HB peer when adding a new one (gmaxwell) + +### Build system +- #9169 `d1b4da9` build: fix qt5.7 build under macOS (theuni) +- #9326 `a0f7ece` Update for OpenSSL 1.1 API (gmaxwell) +- #9224 `396c405` Prevent FD_SETSIZE error building on OpenBSD (ivdsangen) + +### GUI +- #8972 `6f86b53` Make warnings label selectable (jonasschnelli) (MarcoFalke) +- #9185 `6d70a73` Fix coincontrol sort issue (jonasschnelli) +- #9094 `5f3a12c` Use correct conversion function for boost::path datadir (laanwj) +- #8908 `4a974b2` Update bitcoin-qt.desktop (s-matthew-english) +- #9190 `dc46b10` Plug many memory leaks (laanwj) + +### Wallet +- #9290 `35174a0` Make RelayWalletTransaction attempt to AcceptToMemoryPool (gmaxwell) +- #9295 `43bcfca` Bugfix: Fundrawtransaction: don't terminate when keypool is empty (jonasschnelli) +- #9302 `f5d606e` Return txid even if ATMP fails for new transaction (sipa) + +### Tests and QA +- #9159 `eca9b46` Wait for specific block announcement in p2p-compactblocks (ryanofsky) +- #9186 `dccdc3a` Fix use-after-free in scheduler tests (laanwj) +- #9168 `3107280` Add assert_raises_message to check specific error message (mrbandrews) +- #9191 `29435db` 0.13.2 Backports (MarcoFalke) +- #9077 `1d4c884` Increase wallet-dump RPC timeout (ryanofsky) +- #9098 `ecd7db5` Handle zombies and cluttered tmpdirs (MarcoFalke) +- #8927 `387ec9d` Add script tests for FindAndDelete in pre-segwit and segwit scripts (jl2012) +- #9200 `eebc699` bench: Fix subtle counting issue when rescaling iteration count (laanwj) + +### Miscellaneous +- #8838 `094848b` Calculate size and weight of block correctly in CreateNewBlock() (jnewbery) +- #8920 `40169dc` Set minimum required Boost to 1.47.0 (fanquake) +- #9251 `a710a43` Improvement of documentation of command line parameter 'whitelist' (wodry) +- #8932 `106da69` Allow bitcoin-tx to create v2 transactions (btcdrak) +- #8929 `12428b4` add software-properties-common (sigwo) +- #9120 `08d1c90` bug: Missed one "return false" in recent refactoring in #9067 (UdjinM6) +- #9067 `f85ee01` Fix exit codes (UdjinM6) +- #9340 `fb987b3` [0.13] Update secp256k1 subtree (MarcoFalke) +- #9229 `b172377` Remove calls to getaddrinfo_a (TheBlueMatt) Credits ======= Thanks to everyone who directly contributed to this release: -(to be filled in at release time) +- Alex Morcos +- BtcDrak +- Cory Fields +- fanquake +- Gregory Maxwell +- Gregory Sanders +- instagibbs +- Ivo van der Sangen +- jnewbery +- Johnson Lau +- Jonas Schnelli +- Luke Dashjr +- maiiz +- MarcoFalke +- Masahiko Hyuga +- Matt Corallo +- matthias +- mrbandrews +- Pavel Janík +- Pieter Wuille +- randy-waterhouse +- Russell Yanofsky +- S. Matthew English +- Steven +- Suhas Daftuar +- UdjinM6 +- Wladimir J. van der Laan +- wodry As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 7201dd7732fa69b498b1d647c66c2460af9bed7b Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 19 Dec 2016 13:14:01 +0000 Subject: [PATCH 287/302] qt: Pre-rc1 translations update --- src/qt/bitcoinstrings.cpp | 8 +- src/qt/locale/bitcoin_ca.ts | 768 +++++++- src/qt/locale/bitcoin_ca_ES.ts | 774 ++++++++- src/qt/locale/bitcoin_cs.ts | 1406 ++++++++++++++- src/qt/locale/bitcoin_de.ts | 390 ++++- src/qt/locale/bitcoin_en.ts | 116 +- src/qt/locale/bitcoin_en_GB.ts | 112 +- src/qt/locale/bitcoin_es.ts | 1050 ++++++++++- src/qt/locale/bitcoin_es_ES.ts | 3773 ++++++++++++++++++++++++++++++++++++++-- src/qt/locale/bitcoin_et.ts | 886 +++++++++- src/qt/locale/bitcoin_fa.ts | 322 +++- src/qt/locale/bitcoin_fr.ts | 1176 ++++++++++++- src/qt/locale/bitcoin_it_IT.ts | 10 +- src/qt/locale/bitcoin_ko_KR.ts | 28 + src/qt/locale/bitcoin_ku_IQ.ts | 72 + src/qt/locale/bitcoin_pl.ts | 262 ++- src/qt/locale/bitcoin_pt_BR.ts | 1276 +++++++++++++- src/qt/locale/bitcoin_pt_PT.ts | 8 + src/qt/locale/bitcoin_sk.ts | 28 +- src/qt/locale/bitcoin_sv.ts | 219 ++- src/qt/locale/bitcoin_ta.ts | 20 + src/qt/locale/bitcoin_vi_VN.ts | 262 ++- src/qt/locale/bitcoin_zh_CN.ts | 853 ++++++++- 23 files changed, 13347 insertions(+), 472 deletions(-) diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index b64ae5c70d7..7f90a51c562 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -145,6 +145,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "Set the number of script verification threads (%u to %d, 0 = auto, <0 = " "leave that many cores free, default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "" +"Sets the serialization of raw transaction or block hex returned in non-" +"verbose mode, non-segwit(0) or segwit(1) (default: %d)"), +QT_TRANSLATE_NOOP("bitcoin-core", "" "Support filtering of blocks and transaction with bloom filters (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "" "The block database contains a block which appears to be from the future. " @@ -201,8 +204,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "Warning: We do not appear to fully agree with our peers! You may need to " "upgrade, or other nodes may need to upgrade."), QT_TRANSLATE_NOOP("bitcoin-core", "" -"Whitelist peers connecting from the given netmask or IP address. Can be " -"specified multiple times."), +"Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR " +"notated network (e.g. 1.2.3.0/24). Can be specified multiple times."), QT_TRANSLATE_NOOP("bitcoin-core", "" "Whitelisted peers cannot be DoS banned and their transactions are always " "relayed, even if they are already in the mempool, useful e.g. for a gateway"), @@ -275,6 +278,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=: '%s' ( QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most unconnectable transactions in memory (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Keep the transaction memory pool below megabytes (default: %u)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Keypool ran out, please call keypoolrefill first"), QT_TRANSLATE_NOOP("bitcoin-core", "Listen for JSON-RPC connections on (default: %u or testnet: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on (default: %u or testnet: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."), diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts index 355cd4418e7..c4cb86d82b1 100644 --- a/src/qt/locale/bitcoin_ca.ts +++ b/src/qt/locale/bitcoin_ca.ts @@ -41,10 +41,78 @@ &Delete &Elimina -
+ + Choose the address to send coins to + Trieu l'adreça on enviar les monedes + + + Choose the address to receive coins with + Trieu l'adreça on rebre les monedes + + + C&hoose + &Tria + + + Sending addresses + Adreces d'enviament + + + Receiving addresses + Adreces de recepció + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Aquestes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Aquestes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció. + + + &Copy Address + &Copia l'adreça + + + Copy &Label + Copia l'eti&queta + + + &Edit + &Edita + + + Export Address List + Exporta la llista d'adreces + + + Comma separated file (*.csv) + Fitxer separat per comes (*.csv) + + + Exporting Failed + L'exportació ha fallat + + + There was an error trying to save the address list to %1. Please try again. + S'ha produït un error en desar la llista d'adreces a %1. Torneu-ho a provar. + + AddressTableModel - + + Label + Etiqueta + + + Address + Adreça + + + (no label) + (sense etiqueta) + + AskPassphraseDialog @@ -63,7 +131,95 @@ Repeat new passphrase Repetiu la nova contrasenya - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Introduïu la contrasenya nova al moneder.<br/>Utilitzeu una contrasenya de <b>deu o més caràcters aleatoris</b>, o <b>vuit o més paraules</b>. + + + Encrypt wallet + Encripta el moneder + + + This operation needs your wallet passphrase to unlock the wallet. + Aquesta operació requereix la contrasenya del moneder per a desbloquejar-lo. + + + Unlock wallet + Desbloqueja el moneder + + + This operation needs your wallet passphrase to decrypt the wallet. + Aquesta operació requereix la contrasenya del moneder per desencriptar-lo. + + + Decrypt wallet + Desencripta el moneder + + + Change passphrase + Canvia la contrasenya + + + Enter the old passphrase and new passphrase to the wallet. + Introduïu la contrasenya antiga i la contrasenya nova al moneder. + + + Confirm wallet encryption + Confirma l'encriptació del moneder + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Avís: si encripteu el vostre moneder i perdeu la contrasenya, <b>PERDREU TOTS ELS VOSTRES BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + Esteu segur que voleu encriptar el vostre moneder? + + + Wallet encrypted + Moneder encriptat + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + Ara es tancarà el %1 per finalitzar el procés d'encriptació. Recordeu que encriptar el vostre moneder no garanteix que les vostres bitcoins no puguin ser robades per programari maliciós que infecti l'ordinador. + + + 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. + IMPORTANT: Tota copia de seguretat que hàgiu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder. Per motius de seguretat, les còpies de seguretat anteriors del fitxer de moneder no encriptat esdevindran inusables tan aviat com començar a utilitzar el nou moneder encriptat. + + + Wallet encryption failed + L'encriptació del moneder ha fallat + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat. + + + The supplied passphrases do not match. + Les contrasenyes introduïdes no coincideixen. + + + Wallet unlock failed + El desbloqueig del moneder ha fallat + + + The passphrase entered for the wallet decryption was incorrect. + La contrasenya introduïda per a desencriptar el moneder és incorrecta. + + + Wallet decryption failed + La desencriptació del moneder ha fallat + + + Wallet passphrase was successfully changed. + La contrasenya del moneder ha estat modificada correctament. + + + Warning: The Caps Lock key is on! + Avís: Les lletres majúscules estan activades! + + BanTableModel @@ -114,6 +270,14 @@ Surt de l'aplicació + &About %1 + Qu&ant al %1 + + + Show information about %1 + Mosta informació sobre el %1 + + About &Qt Quant a &Qt @@ -126,6 +290,10 @@ &Opcions... + Modify configuration options for %1 + Modifica les opcions de configuració de %1 + + &Encrypt Wallet... &Encripta el moneder... @@ -143,7 +311,7 @@ &Receiving addresses... - Adreces de &recepció + Adreces de &recepció... Open &URI... @@ -254,6 +422,14 @@ %n connexió activa a la xarxa Bitcoin%n connexions actives a la xarxa Bitcoin + Indexing blocks on disk... + S'estan indexant els blocs al disc... + + + Processing blocks on disk... + S'estan processant els blocs al disc... + + No block source available... No hi ha cap font de bloc disponible... @@ -310,6 +486,14 @@ Al dia + Show the %1 help message to get a list with possible Bitcoin command-line options + Mostra el missatge d'ajuda del %1 per obtenir una llista amb les possibles opcions de línia d'ordres de Bitcoin + + + %1 client + Client de %1 + + Catching up... S'està posant al dia ... @@ -438,7 +622,143 @@ Priority Prioritat - + + Copy address + Copia l'adreça + + + Copy label + Copia l'etiqueta + + + Copy amount + Copia l'import + + + Copy transaction ID + Copia l'ID de transacció + + + Copy quantity + Copia la quantitat + + + Copy fee + Copia la comissió + + + Copy after fee + Copia la comissió posterior + + + Copy bytes + Copia els bytes + + + Copy priority + Copia la prioritat + + + Copy dust + Copia el polsim + + + Copy change + Copia el canvi + + + highest + el més alt + + + higher + més alt + + + high + alt + + + medium-high + mig-alt + + + medium + mig + + + low-medium + baix-mig + + + low + baix + + + lower + més baix + + + lowest + el més baix + + + (%1 locked) + (%1 bloquejada) + + + none + cap + + + yes + + + + no + no + + + This label turns red if the transaction size is greater than 1000 bytes. + Aquesta etiqueta es torna en vermell si la transacció és superior a 1000 bytes. + + + This means a fee of at least %1 per kB is required. + Això comporta que cal una comissió d'almenys %1 per kB. + + + Can vary +/- 1 byte per input. + Pot variar +/- 1 byte per entrada. + + + Transactions with higher priority are more likely to get included into a block. + Les transaccions amb una major prioritat són més propenses a ser incloses en un bloc. + + + This label turns red if the priority is smaller than "medium". + Aquesta etiqueta es torna en vermell si la propietat és inferior que la «mitjana». + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Aquesta etiqueta es torna vermella si cap recipient rep un import inferior al llindar de polsim actual. + + + Can vary +/- %1 satoshi(s) per input. + Pot variar en +/- %1 satoshi(s) per entrada. + + + (no label) + (sense etiqueta) + + + change from %1 (%2) + canvia de %1 (%2) + + + (change) + (canvia) + + EditAddressDialog @@ -461,7 +781,39 @@ &Address &Adreça - + + New receiving address + Nova adreça de recepció + + + New sending address + Nova adreça d'enviament + + + Edit receiving address + Edita l'adreça de recepció + + + Edit sending address + Edita l'adreça d'enviament + + + The entered address "%1" is not a valid Bitcoin address. + L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida. + + + The entered address "%1" is already in the address book. + L'adreça introduïda «%1» ja és present a la llibreta d'adreces. + + + Could not unlock wallet. + No s'ha pogut desbloquejar el moneder. + + + New key generation failed. + Ha fallat la generació d'una clau nova. + + FreespaceChecker @@ -496,6 +848,10 @@ (%1-bit) + About %1 + Quant al %1 + + Command-line options Opcions de línia d'ordres @@ -531,12 +887,28 @@ Show splash screen on startup (default: %u) Mostra la pantalla de benvinguda a l'inici (per defecte: %u) - + + Reset all settings changed in the GUI + Reinicialitza tots els canvis de configuració fets des de la interfície gràfica + + Intro Welcome - Us donem la benviguda + Us donem la benvinguda + + + Welcome to %1. + Us donem la benvinguda a %1. + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Com és la primera vegada que s'executa el programa, podeu triar on %1 emmagatzemarà les dades. + + + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 baixarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim %2GB de dades s'emmagatzemaran en aquest directori, i augmentarà al llarg del temps. El moneder també s'emmagatzemarà en aquest directori. Use the default data directory @@ -581,7 +953,11 @@ Select payment request file Selecciona un fitxer de sol·licitud de pagament - + + Select payment request file to open + Seleccioneu el fitxer de sol·licitud de pagament per obrir + + OptionsDialog @@ -593,6 +969,14 @@ &Principal + Automatically start %1 after logging in to the system. + Inicieu %1 automàticament després d'entrar en el sistema. + + + &Start %1 on system login + &Inicia %1 en l'entrada al sistema + + Size of &database cache Mida de la memòria cau de la base de &dades @@ -729,6 +1113,14 @@ &Finestra + &Hide the icon from the system tray. + Ama&ga la icona de la safata del sistema. + + + Hide tray icon + Amaga la icona de la safata + + Show only a tray icon after minimizing the window. Mostra només la icona de la barra en minimitzar la finestra. @@ -749,6 +1141,10 @@ &Llengua de la interfície d'usuari: + The user interface language can be set here. This setting will take effect after restarting %1. + Aquí es pot definir la llengua de la interfície d'usuari. Aquest paràmetre tindrà efecte en reiniciar el %1. + + &Unit to show amounts in: &Unitats per mostrar els imports en: @@ -874,7 +1270,27 @@ PaymentServer - + + Payment request error + Error de la sol·licitud de pagament + + + Cannot start bitcoin: click-to-pay handler + No es pot iniciar bitcoin: controlador click-to-pay + + + URI handling + Gestió d'URI + + + Network request error + Error en la sol·licitud de xarxa + + + Payment acknowledged + Pagament reconegut + + PeerTableModel @@ -931,7 +1347,23 @@ QRImageWidget - + + &Save Image... + De&sa la imatge... + + + &Copy Image + &Copia la imatge + + + Save QR Code + Desa el codi QR + + + PNG Image (*.png) + Imatge PNG (*.png) + + RPCConsole @@ -959,6 +1391,10 @@ Utilitzant BerkeleyDB versió + Datadir + Datadir + + Startup time &Temps d'inici @@ -1273,7 +1709,15 @@ Remove Esborra - + + Copy label + Copia l'etiqueta + + + Copy amount + Copia l'import + + ReceiveRequestDialog @@ -1292,10 +1736,66 @@ &Save Image... De&sa la imatge... + + Request payment to %1 + Sol·licita un pagament a %1 + + + Payment information + Informació de pagament + + + URI + URI + + + Address + Adreça + + + Amount + Import + + + Label + Etiqueta + + + Message + Missatge + RecentRequestsTableModel - + + Date + Data + + + Label + Etiqueta + + + Message + Missatge + + + (no label) + (sense etiqueta) + + + (no message) + (sense missatge) + + + (no amount requested) + (no s'ha sol·licitat import) + + + Requested + Sol·licitat + + SendCoinsDialog @@ -1446,7 +1946,79 @@ S&end E&nvia - + + Copy quantity + Copia la quantitat + + + Copy amount + Copia l'import + + + Copy fee + Copia la comissió + + + Copy after fee + Copia la comissió posterior + + + Copy bytes + Copia els bytes + + + Copy priority + Copia la prioritat + + + Copy dust + Copia el polsim + + + Copy change + Copia el canvi + + + Total Amount %1 + Import total %1 + + + or + o + + + Confirm send coins + Confirma l'enviament de monedes + + + The recipient address is not valid. Please recheck. + L'adreça del destinatari no és vàlida. Torneu-la a comprovar. + + + The amount to pay must be larger than 0. + L'import a pagar ha de ser major que 0. + + + The amount exceeds your balance. + L'import supera el vostre balanç. + + + The total exceeds your balance when the %1 transaction fee is included. + El total excedeix el vostre balanç quan s'afegeix la comissió a la transacció %1. + + + Duplicate address found: addresses should only be used once each. + S'ha trobat una adreça duplicada: les adreces només s'haurien d'utilitzar una vegada cada una. + + + Transaction creation failed! + La creació de la transacció ha fallat! + + + (no label) + (sense etiqueta) + + SendCoinsEntry @@ -1639,6 +2211,74 @@ TransactionDesc + + Status + Estat + + + Date + Data + + + Source + Font + + + Generated + Generada + + + From + De + + + unknown + desconegut + + + To + A + + + own address + adreça pròpia + + + Debit + Dèbit + + + Total debit + Dèbit total + + + Total credit + Crèdit total + + + Transaction fee + Comissió de transacció + + + Net amount + Import net + + + Message + Missatge + + + Comment + Comentari + + + Transaction ID + ID de la transacció + + + Amount + Import + TransactionDescDialog @@ -1649,9 +2289,109 @@ TransactionTableModel + + Date + Data + + + Type + Tipus + + + Label + Etiqueta + + + Offline + Fora de línia + + + Unconfirmed + Sense confirmar + + + Abandoned + Abandonada + + + Received with + Rebuda amb + + + Received from + Rebuda de + + + Sent to + Enviada a + + + Payment to yourself + Pagament a un mateix + + + Mined + Minada + + + (no label) + (sense etiqueta) + TransactionView + + Received with + Rebuda amb + + + Sent to + Enviada a + + + Mined + Minada + + + Copy address + Copia l'adreça + + + Copy label + Copia l'etiqueta + + + Copy amount + Copia l'import + + + Copy transaction ID + Copia l'ID de transacció + + + Comma separated file (*.csv) + Fitxer separat per comes (*.csv) + + + Date + Data + + + Type + Tipus + + + Label + Etiqueta + + + Address + Adreça + + + Exporting Failed + L'exportació ha fallat + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts index 976881531bc..410b6e616ed 100644 --- a/src/qt/locale/bitcoin_ca_ES.ts +++ b/src/qt/locale/bitcoin_ca_ES.ts @@ -41,10 +41,78 @@ &Delete &Elimina - + + Choose the address to send coins to + Trieu l'adreça on enviar les monedes + + + Choose the address to receive coins with + Trieu l'adreça on rebre les monedes + + + C&hoose + &Tria + + + Sending addresses + Adreces d'enviament + + + Receiving addresses + Adreces de recepció + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Aquestes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Aquestes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció. + + + &Copy Address + &Copia l'adreça + + + Copy &Label + Copia l'eti&queta + + + &Edit + &Edita + + + Export Address List + Exporta la llista d'adreces + + + Comma separated file (*.csv) + Fitxer separat per comes (*.csv) + + + Exporting Failed + L'exportació ha fallat + + + There was an error trying to save the address list to %1. Please try again. + S'ha produït un error en desar la llista d'adreces a %1. Torneu-ho a provar. + + AddressTableModel - + + Label + Etiqueta + + + Address + Adreça + + + (no label) + (sense etiqueta) + + AskPassphraseDialog @@ -63,7 +131,95 @@ Repeat new passphrase Repetiu la nova contrasenya - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Introduïu la contrasenya nova al moneder.<br/>Utilitzeu una contrasenya de <b>deu o més caràcters aleatoris</b>, o <b>vuit o més paraules</b>. + + + Encrypt wallet + Encripta el moneder + + + This operation needs your wallet passphrase to unlock the wallet. + Aquesta operació requereix la contrasenya del moneder per a desbloquejar-lo. + + + Unlock wallet + Desbloqueja el moneder + + + This operation needs your wallet passphrase to decrypt the wallet. + Aquesta operació requereix la contrasenya del moneder per desencriptar-lo. + + + Decrypt wallet + Desencripta el moneder + + + Change passphrase + Canvia la contrasenya + + + Enter the old passphrase and new passphrase to the wallet. + Introduïu la contrasenya antiga i la contrasenya nova al moneder. + + + Confirm wallet encryption + Confirma l'encriptació del moneder + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Avís: si encripteu el vostre moneder i perdeu la contrasenya, <b>PERDREU TOTS ELS VOSTRES BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + Esteu segur que voleu encriptar el vostre moneder? + + + Wallet encrypted + Moneder encriptat + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + Ara es tancarà el %1 per finalitzar el procés d'encriptació. Recordeu que encriptar el vostre moneder no garanteix que les vostres bitcoins no puguin ser robades per programari maliciós que infecti l'ordinador. + + + 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. + IMPORTANT: Tota copia de seguretat que hàgiu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder. Per motius de seguretat, les còpies de seguretat anteriors del fitxer de moneder no encriptat esdevindran inusables tan aviat com començar a utilitzar el nou moneder encriptat. + + + Wallet encryption failed + L'encriptació del moneder ha fallat + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat. + + + The supplied passphrases do not match. + Les contrasenyes introduïdes no coincideixen. + + + Wallet unlock failed + El desbloqueig del moneder ha fallat + + + The passphrase entered for the wallet decryption was incorrect. + La contrasenya introduïda per a desencriptar el moneder és incorrecta. + + + Wallet decryption failed + La desencriptació del moneder ha fallat + + + Wallet passphrase was successfully changed. + La contrasenya del moneder ha estat modificada correctament. + + + Warning: The Caps Lock key is on! + Avís: Les lletres majúscules estan activades! + + BanTableModel @@ -114,6 +270,14 @@ Surt de l'aplicació + &About %1 + Qu&ant al %1 + + + Show information about %1 + Mosta informació sobre el %1 + + About &Qt Quant a &Qt @@ -126,6 +290,10 @@ &Opcions... + Modify configuration options for %1 + Modifica les opcions de configuració de %1 + + &Encrypt Wallet... &Encripta el moneder... @@ -143,7 +311,7 @@ &Receiving addresses... - Adreces de &recepció + Adreces de &recepció... Open &URI... @@ -254,6 +422,14 @@ %n connexió activa a la xarxa Bitcoin%n connexions actives a la xarxa Bitcoin + Indexing blocks on disk... + S'estan indexant els blocs al disc... + + + Processing blocks on disk... + S'estan processant els blocs al disc... + + No block source available... No hi ha cap font de bloc disponible... @@ -310,6 +486,14 @@ Al dia + Show the %1 help message to get a list with possible Bitcoin command-line options + Mostra el missatge d'ajuda del %1 per obtenir una llista amb les possibles opcions de línia d'ordres de Bitcoin + + + %1 client + Client de %1 + + Catching up... S'està posant al dia ... @@ -438,7 +622,143 @@ Priority Prioritat - + + Copy address + Copia l'adreça + + + Copy label + Copia l'etiqueta + + + Copy amount + Copia l'import + + + Copy transaction ID + Copia l'ID de transacció + + + Copy quantity + Copia la quantitat + + + Copy fee + Copia la comissió + + + Copy after fee + Copia la comissió posterior + + + Copy bytes + Copia els bytes + + + Copy priority + Copia la prioritat + + + Copy dust + Copia el polsim + + + Copy change + Copia el canvi + + + highest + el més alt + + + higher + més alt + + + high + alt + + + medium-high + mig-alt + + + medium + mig + + + low-medium + baix-mig + + + low + baix + + + lower + més baix + + + lowest + el més baix + + + (%1 locked) + (%1 bloquejada) + + + none + cap + + + yes + + + + no + no + + + This label turns red if the transaction size is greater than 1000 bytes. + Aquesta etiqueta es torna en vermell si la transacció és superior a 1000 bytes. + + + This means a fee of at least %1 per kB is required. + Això comporta que cal una comissió d'almenys %1 per kB. + + + Can vary +/- 1 byte per input. + Pot variar +/- 1 byte per entrada. + + + Transactions with higher priority are more likely to get included into a block. + Les transaccions amb una major prioritat són més propenses a ser incloses en un bloc. + + + This label turns red if the priority is smaller than "medium". + Aquesta etiqueta es torna en vermell si la propietat és inferior que la «mitjana». + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Aquesta etiqueta es torna vermella si cap recipient rep un import inferior al llindar de polsim actual. + + + Can vary +/- %1 satoshi(s) per input. + Pot variar en +/- %1 satoshi(s) per entrada. + + + (no label) + (sense etiqueta) + + + change from %1 (%2) + canvia de %1 (%2) + + + (change) + (canvia) + + EditAddressDialog @@ -461,7 +781,39 @@ &Address &Adreça - + + New receiving address + Nova adreça de recepció + + + New sending address + Nova adreça d'enviament + + + Edit receiving address + Edita l'adreça de recepció + + + Edit sending address + Edita l'adreça d'enviament + + + The entered address "%1" is not a valid Bitcoin address. + L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida. + + + The entered address "%1" is already in the address book. + L'adreça introduïda «%1» ja és present a la llibreta d'adreces. + + + Could not unlock wallet. + No s'ha pogut desbloquejar el moneder. + + + New key generation failed. + Ha fallat la generació d'una clau nova. + + FreespaceChecker @@ -496,6 +848,10 @@ (%1-bit) + About %1 + Quant al %1 + + Command-line options Opcions de línia d'ordres @@ -531,12 +887,28 @@ Show splash screen on startup (default: %u) Mostra la pantalla de benvinguda a l'inici (per defecte: %u) - + + Reset all settings changed in the GUI + Reinicialitza tots els canvis de configuració fets des de la interfície gràfica + + Intro Welcome - Us donem la benviguda + Us donem la benvinguda + + + Welcome to %1. + Us donem la benvinguda a %1. + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Com és la primera vegada que s'executa el programa, podeu triar on %1 emmagatzemarà les dades. + + + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 baixarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim %2GB de dades s'emmagatzemaran en aquest directori, i augmentarà al llarg del temps. El moneder també s'emmagatzemarà en aquest directori. Use the default data directory @@ -581,7 +953,11 @@ Select payment request file Selecciona un fitxer de sol·licitud de pagament - + + Select payment request file to open + Seleccioneu el fitxer de sol·licitud de pagament per obrir + + OptionsDialog @@ -593,6 +969,14 @@ &Principal + Automatically start %1 after logging in to the system. + Inicieu %1 automàticament després d'entrar en el sistema. + + + &Start %1 on system login + &Inicia %1 en l'entrada al sistema + + Size of &database cache Mida de la memòria cau de la base de &dades @@ -729,6 +1113,14 @@ &Finestra + &Hide the icon from the system tray. + Ama&ga la icona de la safata del sistema. + + + Hide tray icon + Amaga la icona de la safata + + Show only a tray icon after minimizing the window. Mostra només la icona de la barra en minimitzar la finestra. @@ -749,6 +1141,10 @@ &Llengua de la interfície d'usuari: + The user interface language can be set here. This setting will take effect after restarting %1. + Aquí es pot definir la llengua de la interfície d'usuari. Aquest paràmetre tindrà efecte en reiniciar el %1. + + &Unit to show amounts in: &Unitats per mostrar els imports en: @@ -874,7 +1270,27 @@ PaymentServer - + + Payment request error + Error de la sol·licitud de pagament + + + Cannot start bitcoin: click-to-pay handler + No es pot iniciar bitcoin: controlador click-to-pay + + + URI handling + Gestió d'URI + + + Network request error + Error en la sol·licitud de xarxa + + + Payment acknowledged + Pagament reconegut + + PeerTableModel @@ -931,7 +1347,23 @@ QRImageWidget - + + &Save Image... + De&sa la imatge... + + + &Copy Image + &Copia la imatge + + + Save QR Code + Desa el codi QR + + + PNG Image (*.png) + Imatge PNG (*.png) + + RPCConsole @@ -959,6 +1391,10 @@ Utilitzant BerkeleyDB versió + Datadir + Datadir + + Startup time &Temps d'inici @@ -1273,7 +1709,15 @@ Remove Esborra - + + Copy label + Copia l'etiqueta + + + Copy amount + Copia l'import + + ReceiveRequestDialog @@ -1292,10 +1736,66 @@ &Save Image... De&sa la imatge... + + Request payment to %1 + Sol·licita un pagament a %1 + + + Payment information + Informació de pagament + + + URI + URI + + + Address + Adreça + + + Amount + Import + + + Label + Etiqueta + + + Message + Missatge + RecentRequestsTableModel - + + Date + Data + + + Label + Etiqueta + + + Message + Missatge + + + (no label) + (sense etiqueta) + + + (no message) + (sense missatge) + + + (no amount requested) + (no s'ha sol·licitat import) + + + Requested + Sol·licitat + + SendCoinsDialog @@ -1446,7 +1946,79 @@ S&end E&nvia - + + Copy quantity + Copia la quantitat + + + Copy amount + Copia l'import + + + Copy fee + Copia la comissió + + + Copy after fee + Copia la comissió posterior + + + Copy bytes + Copia els bytes + + + Copy priority + Copia la prioritat + + + Copy dust + Copia el polsim + + + Copy change + Copia el canvi + + + Total Amount %1 + Import total %1 + + + or + o + + + Confirm send coins + Confirma l'enviament de monedes + + + The recipient address is not valid. Please recheck. + L'adreça del destinatari no és vàlida. Torneu-la a comprovar. + + + The amount to pay must be larger than 0. + L'import a pagar ha de ser major que 0. + + + The amount exceeds your balance. + L'import supera el vostre balanç. + + + The total exceeds your balance when the %1 transaction fee is included. + El total excedeix el vostre balanç quan s'afegeix la comissió a la transacció %1. + + + Duplicate address found: addresses should only be used once each. + S'ha trobat una adreça duplicada: les adreces només s'haurien d'utilitzar una vegada cada una. + + + Transaction creation failed! + La creació de la transacció ha fallat! + + + (no label) + (sense etiqueta) + + SendCoinsEntry @@ -1639,6 +2211,74 @@ TransactionDesc + + Status + Estat + + + Date + Data + + + Source + Font + + + Generated + Generada + + + From + De + + + unknown + desconegut + + + To + A + + + own address + adreça pròpia + + + Debit + Dèbit + + + Total debit + Dèbit total + + + Total credit + Crèdit total + + + Transaction fee + Comissió de transacció + + + Net amount + Import net + + + Message + Missatge + + + Comment + Comentari + + + Transaction ID + ID de la transacció + + + Amount + Import + TransactionDescDialog @@ -1649,9 +2289,109 @@ TransactionTableModel + + Date + Data + + + Type + Tipus + + + Label + Etiqueta + + + Offline + Fora de línia + + + Unconfirmed + Sense confirmar + + + Abandoned + Abandonada + + + Received with + Rebuda amb + + + Received from + Rebuda de + + + Sent to + Enviada a + + + Payment to yourself + Pagament a un mateix + + + Mined + Minada + + + (no label) + (sense etiqueta) + TransactionView + + Received with + Rebuda amb + + + Sent to + Enviada a + + + Mined + Minada + + + Copy address + Copia l'adreça + + + Copy label + Copia l'etiqueta + + + Copy amount + Copia l'import + + + Copy transaction ID + Copia l'ID de transacció + + + Comma separated file (*.csv) + Fitxer separat per comes (*.csv) + + + Date + Data + + + Type + Tipus + + + Label + Etiqueta + + + Address + Adreça + + + Exporting Failed + L'exportació ha fallat + UnitDisplayStatusBarControl @@ -1737,7 +2477,11 @@ Bitcoin Core - Nucli de Bitcoin + Bitcoin Core + + + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. + -fallbackfee és molt elevat. Aquesta és la comissió de transacció que podeu pagar quan les estimacions de comissions no estan disponibles. Bind to given address and always listen on it. Use [host]:port notation for IPv6 diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index 449e67dd3ee..02e959d0182 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -15,7 +15,7 @@ Copy the currently selected address to the system clipboard - Zkopíruj aktuálně vybranou adresu do systémové schránky + Zkopíruj tuto adresu do systémové schránky &Copy @@ -27,7 +27,7 @@ Delete the currently selected address from the list - Smaž zvolenou adresu ze seznamu + Smaž tuto adresu ze seznamu Export the data in the current tab to a file @@ -41,10 +41,78 @@ &Delete S&maž - + + Choose the address to send coins to + Zvol adresu, na kterou pošleš mince + + + Choose the address to receive coins with + Zvol adres na příjem mincí + + + C&hoose + &Zvol + + + Sending addresses + Odesílací adresy + + + Receiving addresses + Přijímací adresy + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Tohle jsou tvé Bitcoinové adresy pro posílání plateb. Před odesláním mincí si vždy zkontroluj částku a cílovou adresu. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Tohle jsou tvé Bitcoinové adresy pro příjem plateb. Nezapomeň si pro každou transakci vždy vygenerovat novou adresu. + + + &Copy Address + &Kopíruj adresu + + + Copy &Label + Kopíruj &označení + + + &Edit + &Uprav + + + Export Address List + Export seznamu adres + + + Comma separated file (*.csv) + Formát CSV (*.csv) + + + Exporting Failed + Exportování selhalo + + + There was an error trying to save the address list to %1. Please try again. + Při ukládání seznamu adres do %1 se přihodila nějaká chyba. Zkus to prosím znovu. + + AddressTableModel - + + Label + Označení + + + Address + Adresa + + + (no label) + (bez označení) + + AskPassphraseDialog @@ -63,10 +131,106 @@ Repeat new passphrase Totéž heslo ještě jednou - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Zadej nové heslo k peněžence.<br/>Použij <b>alespoň deset náhodných znaků</b> nebo <b>alespoň osm slov</b>. + + + Encrypt wallet + Zašifruj peněženku + + + This operation needs your wallet passphrase to unlock the wallet. + K provedení této operace musíš zadat heslo k peněžence, aby se mohla odemknout. + + + Unlock wallet + Odemkni peněženku + + + This operation needs your wallet passphrase to decrypt the wallet. + K provedení této operace musíš zadat heslo k peněžence, aby se mohla dešifrovat. + + + Decrypt wallet + Dešifruj peněženku + + + Change passphrase + Změň heslo + + + Enter the old passphrase and new passphrase to the wallet. + Zadej staré a nové heslo k peněžence. + + + Confirm wallet encryption + Potvrď zašifrování peněženky + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Upozornění: Pokud si zašifruješ peněženku a ztratíš či zapomeneš heslo, <b>PŘIJDEŠ O VŠECHNY BITCOINY</b>! + + + Are you sure you wish to encrypt your wallet? + Jsi si jistý, že chceš peněženku zašifrovat? + + + Wallet encrypted + Peněženka je zašifrována + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 se teď ukončí, aby dokončil zašifrování. Pamatuj však, že pouhé zašifrování peněženky nemůže zabránit krádeži tvých bitcoinů malwarem, kterým se může počítač nakazit. + + + 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. + DŮLEŽITÉ: Všechny předchozí zálohy peněženky by měly být nahrazeny nově vygenerovanou, zašifrovanou peněženkou. Z bezpečnostních důvodů budou předchozí zálohy nešifrované peněženky nepoužitelné, jakmile začneš používat novou zašifrovanou peněženku. + + + Wallet encryption failed + Zašifrování peněženky selhalo + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Zašifrování peněženky selhalo kvůli vnitřní chybě. Tvá peněženka tedy nebyla zašifrována. + + + The supplied passphrases do not match. + Zadaná hesla nejsou shodná. + + + Wallet unlock failed + Nepodařilo se odemknout peněženku + + + The passphrase entered for the wallet decryption was incorrect. + Nezadal jsi správné heslo pro dešifrování peněženky. + + + Wallet decryption failed + Nepodařilo se dešifrovat peněženku + + + Wallet passphrase was successfully changed. + Heslo k peněžence bylo v pořádku změněno. + + + Warning: The Caps Lock key is on! + Upozornění: Caps Lock je zapnutý! + + BanTableModel - + + IP/Netmask + IP/Maska + + + Banned Until + Blokován do + + BitcoinGUI @@ -106,6 +270,14 @@ Ukonči aplikaci + &About %1 + O &%1 + + + Show information about %1 + Zobraz informace o %1 + + About &Qt O &Qt @@ -118,6 +290,10 @@ &Možnosti... + Modify configuration options for %1 + Uprav nastavení %1 + + &Encrypt Wallet... Zaši&fruj peněženku... @@ -246,6 +422,14 @@ %n aktivní spojení do Bitcoinové sítě%n aktivní spojení do Bitcoinové sítě%n aktivních spojení do Bitcoinové sítě + Indexing blocks on disk... + Vytvářím index bloků na disku... + + + Processing blocks on disk... + Zpracovávám bloky na disku... + + No block source available... Není dostupný žádný zdroj bloků... @@ -283,7 +467,7 @@ Transactions after this will not yet be visible. - Novější transakce zatím nejsou vidět. + Následné transakce ještě nebudou vidět. Error @@ -302,6 +486,14 @@ Aktuální + Show the %1 help message to get a list with possible Bitcoin command-line options + Seznam argumentů Bitcoinu pro příkazovou řádku získáš v nápovědě %1 + + + %1 client + %1 klient + + Catching up... Stahuji... @@ -430,7 +622,87 @@ Priority Priorita - + + Copy address + Kopíruj adresu + + + Copy label + Kopíruj její označení + + + Copy amount + Kopíruj částku + + + Copy transaction ID + Kopíruj ID transakce + + + Lock unspent + Zamkni neutracené + + + Unlock unspent + Odemkni k utracení + + + Copy quantity + Kopíruj počet + + + Copy fee + Kopíruj poplatek + + + Copy after fee + Kopíruj čistou částku + + + Copy bytes + Kopíruj bajty + + + Copy dust + Kopíruj prach + + + Copy change + Kopíruj drobné + + + (%1 locked) + (%1 zamčeno) + + + yes + ano + + + no + ne + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Popisek zčervená, pokud má některý příjemce obdržet částku menší, než je aktuální práh pro prach. + + + Can vary +/- %1 satoshi(s) per input. + Může se lišit o +/– %1 satoshi na každý vstup. + + + (no label) + (bez označení) + + + change from %1 (%2) + drobné z %1 (%2) + + + (change) + (drobné) + + EditAddressDialog @@ -453,7 +725,39 @@ &Address &Adresa - + + New receiving address + Nová přijímací adresa + + + New sending address + Nová odesílací adresa + + + Edit receiving address + Uprav přijímací adresu + + + Edit sending address + Uprav odesílací adresu + + + The entered address "%1" is not a valid Bitcoin address. + Zadaná adresa „%1“ není platná Bitcoinová adresa. + + + The entered address "%1" is already in the address book. + Zadaná adresa „%1“ už v adresáři je. + + + Could not unlock wallet. + Nemohu odemknout peněženku. + + + New key generation failed. + Nepodařilo se mi vygenerovat nový klíč. + + FreespaceChecker @@ -488,6 +792,10 @@ (%1-bit) + About %1 + O %1 + + Command-line options Argumenty příkazové řádky @@ -523,7 +831,11 @@ Show splash screen on startup (default: %u) Zobrazit startovací obrazovku (výchozí: %u) - + + Reset all settings changed in the GUI + Vrátit všechny volby měněné v GUI na výchozí hodnoty + + Intro @@ -531,6 +843,18 @@ Vítej + Welcome to %1. + Vítej v %1. + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Tohle je poprvé, co spouštíš %1, takže si můžeš zvolit, kam bude ukládat svá data. + + + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 bude stahovat kopii řetězce bloků. Proto bude potřeba do tohoto adresáře uložit nejméně %2 GB dat – toto číslo bude navíc v průběhu času růst. Tvá peněženka bude rovněž uložena v tomto adresáři. + + Use the default data directory Použij výchozí adresář pro data @@ -573,7 +897,11 @@ Select payment request file Vyber soubor platebního požadavku - + + Select payment request file to open + Vyber soubor platebního požadavku k načtení + + OptionsDialog @@ -585,6 +913,14 @@ &Hlavní + Automatically start %1 after logging in to the system. + Automaticky spustí %1 po přihlášení do systému. + + + &Start %1 on system login + S&pustit %1 po přihlášení do systému + + Size of &database cache Velikost &databázové cache @@ -622,7 +958,7 @@ Active command-line options that override above options: - Aktivní argumenty z příkazové řádky, které mají přednost před nastavením výše: + Aktivní argumenty z příkazové řádky, které přetloukly tato nastavení: Reset all client options to default. @@ -690,7 +1026,7 @@ Used for reaching peers via: - Použije se k připojování k protějškům přes: + Použije se k připojování k protějskům přes: Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type. @@ -721,6 +1057,14 @@ O&kno + &Hide the icon from the system tray. + Skryje ikonu, která se zobrazuje v panelu. + + + Hide tray icon + Skrýt &ikonu z panelu + + Show only a tray icon after minimizing the window. Po minimalizaci okna zobrazí pouze ikonu v panelu. @@ -741,6 +1085,10 @@ &Jazyk uživatelského rozhraní: + The user interface language can be set here. This setting will take effect after restarting %1. + Tady lze nastavit jazyk uživatelského rozhraní. Nastavení se projeví až po restartování %1. + + &Unit to show amounts in: Je&dnotka pro částky: @@ -754,7 +1102,7 @@ &OK - &Použít + &Budiž &Cancel @@ -782,7 +1130,7 @@ This change would require a client restart. - Tato změna vyžaduje restart aplikace. + Tahle změna bude chtít restartovat klienta. The supplied proxy address is invalid. @@ -829,7 +1177,7 @@ Balances - Stav účtů + Stavy účtů Total: @@ -866,7 +1214,95 @@ PaymentServer - + + Payment request error + Chyba platebního požadavku + + + Cannot start bitcoin: click-to-pay handler + Nemůžu spustit bitcoin: obsluha click-to-pay + + + URI handling + Zpracování URI + + + Payment request fetch URL is invalid: %1 + Zdrojová URL platebního požadavku není platná: %1 + + + Invalid payment address %1 + Neplatná platební adresa %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + Nepodařilo se analyzovat URI! Důvodem může být neplatná Bitcoinová adresa nebo poškozené parametry URI. + + + Payment request file handling + Zpracování souboru platebního požadavku + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Soubor platebního požadavku nejde přečíst nebo zpracovat! Příčinou může být špatný soubor platebního požadavku. + + + Payment request rejected + Platební požadavek byl odmítnut + + + Payment request network doesn't match client network. + Síť platebního požadavku neodpovídá síti klienta. + + + Payment request expired. + Platební požadavek vypršel. + + + Payment request is not initialized. + Platební požadavek není zahájený. + + + Unverified payment requests to custom payment scripts are unsupported. + Neověřené platební požadavky k uživatelským platebním skriptům nejsou podporované. + + + Invalid payment request. + Neplatný platební požadavek. + + + Requested payment amount of %1 is too small (considered dust). + Požadovaná platební částka %1 je příliš malá (je považována za prach). + + + Refund from %1 + Vrácení peněz od %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Platební požadavek %1 je moc velký (%2 bajtů, povoleno %3 bajtů). + + + Error communicating with %1: %2 + Chyba při komunikaci s %1: %2 + + + Payment request cannot be parsed! + Platební požadavek je nečitelný! + + + Bad response from server %1 + Chybná odpověď ze serveru %1 + + + Network request error + Chyba síťového požadavku + + + Payment acknowledged + Platba potvrzena + + PeerTableModel @@ -923,12 +1359,28 @@ QRImageWidget - + + &Save Image... + &Ulož obrázek... + + + &Copy Image + &Kopíruj obrázek + + + Save QR Code + Ulož QR kód + + + PNG Image (*.png) + PNG obrázek (*.png) + + RPCConsole N/A - N/A + nedostupná informace Client version @@ -951,6 +1403,10 @@ Používaná verze BerkeleyDB + Datadir + Adresář s daty + + Startup time Čas spuštění @@ -975,8 +1431,16 @@ Aktuální počet bloků + Memory Pool + Transakční zásobník + + + Current number of transactions + Aktuální množství transakcí + + Memory usage - Využití paměti + Obsazenost paměti Received @@ -991,10 +1455,18 @@ &Protějšky + Banned peers + Protějšky pod klatbou (blokované) + + Select a peer to view detailed information. Vyber protějšek a uvidíš jeho detailní informace. + Whitelisted + Vždy vítán + + Direction Směr @@ -1003,19 +1475,43 @@ Verze - User Agent - Typ klienta + Starting Block + Počáteční blok - Services - Služby + Synced Headers + Aktuálně hlaviček - Ban Score - Skóre pro klatbu + Synced Blocks + Aktuálně bloků - Connection Time + User Agent + Typ klienta + + + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. + Otevři soubor s ladicími záznamy %1 z aktuálního datového adresáře. U velkých žurnálů to může pár vteřin zabrat. + + + Decrease font size + Zmenšit písmo + + + Increase font size + Zvětšit písmo + + + Services + Služby + + + Ban Score + Skóre pro klatbu + + + Connection Time Doba spojení @@ -1031,6 +1527,14 @@ Odezva + The duration of a currently outstanding ping. + Jak dlouho už čekám na pong. + + + Ping Wait + Doba čekání na odezvu + + Time Offset Časový posun @@ -1103,6 +1607,10 @@ &Zbavit uzel klatby + Welcome to the %1 RPC console. + Vítej v RPC konzoli %1. + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. V historii se pohybuješ šipkami nahoru a dolů a pomocí <b>Ctrl-L</b> čistíš obrazovku. @@ -1229,7 +1737,19 @@ Remove Smazat - + + Copy label + Kopíruj její označení + + + Copy message + Kopíruj zprávu + + + Copy amount + Kopíruj částku + + ReceiveRequestDialog @@ -1248,10 +1768,74 @@ &Save Image... &Ulož obrázek... - + + Request payment to %1 + Platební požadavek: %1 + + + Payment information + Informace o platbě + + + URI + URI + + + Address + Adresa + + + Amount + Částka + + + Label + Označení + + + Message + Zpráva + + + Resulting URI too long, try to reduce the text for label / message. + Výsledná URI je příliš dlouhá, zkus zkrátit text označení/zprávy. + + + Error encoding URI into QR Code. + Chyba při kódování URI do QR kódu. + + RecentRequestsTableModel - + + Date + Datum + + + Label + Označení + + + Message + Zpráva + + + (no label) + (bez označení) + + + (no message) + (bez zprávy) + + + (no amount requested) + (bez požadované částky) + + + Requested + Požádáno + + SendCoinsDialog @@ -1402,7 +1986,111 @@ S&end Pošl&i - + + Copy quantity + Kopíruj počet + + + Copy amount + Kopíruj částku + + + Copy fee + Kopíruj poplatek + + + Copy after fee + Kopíruj čistou částku + + + Copy bytes + Kopíruj bajty + + + Copy dust + Kopíruj prach + + + Copy change + Kopíruj drobné + + + %1 to %2 + %1 pro %2 + + + Are you sure you want to send? + Jsi si jistý, že to chceš poslat? + + + added as transaction fee + přidán jako transakční poplatek + + + Total Amount %1 + Celková částka %1 + + + or + nebo + + + Confirm send coins + Potvrď odeslání mincí + + + The recipient address is not valid. Please recheck. + Adresa příjemce je neplatná – překontroluj ji prosím. + + + The amount to pay must be larger than 0. + Odesílaná částka musí být větší než 0. + + + The amount exceeds your balance. + Částka překračuje stav účtu. + + + The total exceeds your balance when the %1 transaction fee is included. + Celková částka při připočítání poplatku %1 překročí stav účtu. + + + Duplicate address found: addresses should only be used once each. + Zaznamenána duplicitní adresa: každá adresa by ale měla být použita vždy jen jednou. + + + Transaction creation failed! + Vytvoření transakce selhalo! + + + A fee higher than %1 is considered an absurdly high fee. + Poplatek vyšší než %1 je považován za absurdně vysoký. + + + Payment request expired. + Platební požadavek vypršel. + + + Pay only the required fee of %1 + Zaplatit pouze vyžadovaný poplatek %1 + + + Estimated to begin confirmation within %n block(s). + Potvrzování by podle odhadu mělo začít během %n bloku.Potvrzování by podle odhadu mělo začít během %n bloků.Potvrzování by podle odhadu mělo začít během %n bloků. + + + Warning: Invalid Bitcoin address + Upozornění: Neplatná Bitcoinová adresa + + + Warning: Unknown change address + Upozornění: Neznámá adresa pro drobné + + + (no label) + (bez označení) + + SendCoinsEntry @@ -1481,13 +2169,25 @@ Memo: Poznámka: - + + Enter a label for this address to add it to your address book + Zadej označení této adresy; obojí se ti pak uloží do adresáře + + SendConfirmationDialog - + + Yes + Ano + + ShutdownWindow + %1 is shutting down... + %1 se ukončuje... + + Do not shut down the computer until this window disappears. Nevypínej počítač, dokud toto okno nezmizí. @@ -1578,7 +2278,59 @@ Reset all verify message fields Vymaž všechna pole formuláře pro ověření zrávy - + + Click "Sign Message" to generate signature + Kliknutím na „Podepiš zprávu“ vygeneruješ podpis + + + The entered address is invalid. + Zadaná adresa je neplatná. + + + Please check the address and try again. + Zkontroluj ji prosím a zkus to pak znovu. + + + The entered address does not refer to a key. + Zadaná adresa nepasuje ke klíči. + + + Wallet unlock was cancelled. + Odemčení peněženky bylo zrušeno. + + + Private key for the entered address is not available. + Soukromý klíč pro zadanou adresu není dostupný. + + + Message signing failed. + Nepodařilo se podepsat zprávu. + + + Message signed. + Zpráva podepsána. + + + The signature could not be decoded. + Podpis nejde dekódovat. + + + Please check the signature and try again. + Zkontroluj ho prosím a zkus to pak znovu. + + + The signature did not match the message digest. + Podpis se neshoduje s hašem zprávy. + + + Message verification failed. + Nepodařilo se ověřit zprávu. + + + Message verified. + Zpráva ověřena. + + SplashScreen @@ -1595,20 +2347,456 @@ TransactionDesc - + + Open for %n more block(s) + Otevřeno pro %n další blokOtevřeno pro %n další blokyOtevřeno pro %n dalších bloků + + + Open until %1 + Otřevřeno dokud %1 + + + conflicted with a transaction with %1 confirmations + koliduje s transakcí o %1 konfirmacích + + + %1/offline + %1/offline + + + 0/unconfirmed, %1 + 0/nepotvrzeno, %1 + + + in memory pool + v transakčním zásobníku + + + not in memory pool + není ani v transakčním zásobníku + + + abandoned + zanechaná + + + %1/unconfirmed + %1/nepotvrzeno + + + %1 confirmations + %1 potvrzení + + + Status + Stav + + + , has not been successfully broadcast yet + , ještě nebylo rozesláno + + + , broadcast through %n node(s) + , rozesláno přes %n uzel, rozesláno přes %n uzly, rozesláno přes %n uzlů + + + Date + Datum + + + Source + Zdroj + + + Generated + Vygenerováno + + + From + Od + + + unknown + neznámo + + + To + Pro + + + own address + vlastní adresa + + + watch-only + sledovaná + + + label + označení + + + Credit + Příjem + + + matures in %n more block(s) + dozraje po %n blokudozraje po %n blocíchdozraje po %n blocích + + + not accepted + neakceptováno + + + Debit + Výdaj + + + Total debit + Celkové výdaje + + + Total credit + Celkové příjmy + + + Transaction fee + Transakční poplatek + + + Net amount + Čistá částka + + + Message + Zpráva + + + Comment + Komentář + + + Transaction ID + ID transakce + + + Output index + Pořadí výstupu + + + Merchant + Obchodník + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Vygenerované mince musí čekat %1 bloků, než mohou být utraceny. Když jsi vygeneroval tenhle blok, tak byl rozposlán do sítě, aby byl přidán do řetězce bloků. Pokud se mu nepodaří dostat se do řetězce, změní se na „neakceptovaný“ a nepůjde utratit. To se občas může stát, pokud jiný uzel vygeneruje blok zhruba ve stejném okamžiku jako ty. + + + Debug information + Ladicí informace + + + Transaction + Transakce + + + Inputs + Vstupy + + + Amount + Částka + + + true + true + + + false + false + + TransactionDescDialog This pane shows a detailed description of the transaction Toto okno zobrazuje detailní popis transakce - + + Details for %1 + Podrobnosti o %1 + + TransactionTableModel - + + Date + Datum + + + Type + Typ + + + Label + Označení + + + Open for %n more block(s) + Otevřeno pro %n další blokOtevřeno pro %n další blokyOtevřeno pro %n dalších bloků + + + Open until %1 + Otřevřeno dokud %1 + + + Offline + Offline + + + Unconfirmed + Nepotvrzeno + + + Abandoned + Zanechaná + + + Confirming (%1 of %2 recommended confirmations) + Potvrzuje se (%1 z %2 doporučených potvrzení) + + + Confirmed (%1 confirmations) + Potvrzeno (%1 potvrzení) + + + Conflicted + V kolizi + + + Immature (%1 confirmations, will be available after %2) + Nedozráno (%1 potvrzení, dozraje při %2 potvrzeních) + + + This block was not received by any other nodes and will probably not be accepted! + Tento blok nedostal žádný jiný uzel a pravděpodobně nebude akceptován! + + + Generated but not accepted + Vygenerováno, ale neakceptováno + + + Received with + Přijato do + + + Received from + Přijato od + + + Sent to + Posláno na + + + Payment to yourself + Platba sama sobě + + + Mined + Vytěženo + + + watch-only + sledovací + + + (n/a) + (n/a) + + + (no label) + (bez označení) + + + Transaction status. Hover over this field to show number of confirmations. + Stav transakce. Najetím myši na toto políčko si zobrazíš počet potvrzení. + + + Date and time that the transaction was received. + Datum a čas přijetí transakce. + + + Type of transaction. + Druh transakce. + + + Whether or not a watch-only address is involved in this transaction. + Zda tato transakce zahrnuje i některou sledovanou adresu. + + + User-defined intent/purpose of the transaction. + Uživatelsky určený účel transakce. + + + Amount removed from or added to balance. + Částka odečtená z nebo přičtená k účtu. + + TransactionView - + + All + Vše + + + Today + Dnes + + + This week + Tento týden + + + This month + Tento měsíc + + + Last month + Minulý měsíc + + + This year + Letos + + + Range... + Rozsah... + + + Received with + Přijato + + + Sent to + Posláno + + + To yourself + Sám sobě + + + Mined + Vytěženo + + + Other + Ostatní + + + Enter address or label to search + Zadej adresu nebo označení pro její vyhledání + + + Min amount + Minimální částka + + + Abandon transaction + Zapomenout transakci + + + Copy address + Kopíruj adresu + + + Copy label + Kopíruj její označení + + + Copy amount + Kopíruj částku + + + Copy transaction ID + Kopíruj ID transakce + + + Copy raw transaction + Kopíruj surovou transakci + + + Copy full transaction details + Kopíruj kompletní podrobnosti o transakci + + + Edit label + Uprav označení + + + Show transaction details + Zobraz detaily transakce + + + Export Transaction History + Exportuj transakční historii + + + Comma separated file (*.csv) + Formát CSV (*.csv) + + + Confirmed + Potvrzeno + + + Watch-only + Sledovaná + + + Date + Datum + + + Type + Typ + + + Label + Označení + + + Address + Adresa + + + ID + ID + + + Exporting Failed + Exportování selhalo + + + There was an error trying to save the transaction history to %1. + Při ukládání transakční historie do %1 se přihodila nějaká chyba. + + + Exporting Successful + Úspěšně vyexportováno + + + The transaction history was successfully saved to %1. + Transakční historie byla v pořádku uložena do %1. + + + Range: + Rozsah: + + + to + + + UnitDisplayStatusBarControl @@ -1618,13 +2806,53 @@ WalletFrame - + + No wallet has been loaded. + Žádná peněženka se nenačetla. + + WalletModel - + + Send Coins + Pošli mince + + WalletView - + + &Export + &Export + + + Export the data in the current tab to a file + Exportuj data z tohoto panelu do souboru + + + Backup Wallet + Záloha peněženky + + + Wallet Data (*.dat) + Data peněženky (*.dat) + + + Backup Failed + Zálohování selhalo + + + There was an error trying to save the wallet data to %1. + Při ukládání peněženky do %1 se přihodila nějaká chyba. + + + Backup Successful + Úspěšně zazálohováno + + + The wallet data was successfully saved to %1. + Data z peněženky byla v pořádku uložena do %1. + + bitcoin-core @@ -1712,6 +2940,10 @@ Poslouchat na zadané adrese. Pro zápis IPv6 adresy použij notaci [adresa]:port + Cannot obtain a lock on data directory %s. %s is probably already running. + Nedaří se mi získat zámek na datový adresář %s. %s pravděpodobně už jednou běží. + + Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup Smazat všechny transakce peněženky a při startu obnovit pouze relevantní části řetězce bloků pomocí -rescan @@ -1724,6 +2956,18 @@ Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID) + Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) + Horní hranice pro celkový poplatek (v %s) za jednu transakci z peněženky nebo jednu surovou transakci; příliš nízká hodnota může zmařit velké transakce (výchozí: %s) + + + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. + Zkontroluj, že máš v počítači správně nastavený datum a čas! Pokud jsou nastaveny špatně, %s nebude fungovat správně. + + + Please contribute if you find %s useful. Visit %s for further information about the software. + Prosíme, zapoj se nebo přispěj, pokud ti %s přijde užitečný. Více informací o programu je na %s. + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Nastavení počtu vláken pro verifikaci skriptů (%u až %d, 0 = automaticky, <0 = nechat daný počet jader volný, výchozí: %d) @@ -1752,6 +2996,14 @@ Vždy vítat protějšky připojující se z dané podsítě či IP adresy. Lze zadat i vícekrát. + You need to rebuild the database using -reindex-chainstate to change -txindex + Je třeba přestavět databázi použitím -reindex-chainstate, aby bylo možné změnit -txindex + + + %s corrupt, salvage failed + %s je poškozen, jeho záchrana se nezdařila + + -maxmempool must be at least %d MB -maxmempool musí být alespoň %d MB @@ -1764,10 +3016,18 @@ Připojit komentář k typu klienta + Attempt to recover private keys from a corrupt wallet on startup + Pokusit se při startu zachránit soukromé klíče z poškozeného souboru s klíči + + Block creation options: Možnosti vytváření bloku: + Cannot resolve -%s address: '%s' + Nemohu přeložit -%s adresu: '%s' + + Connect only to the specified node(s) Připojit se pouze k zadanému uzlu (příp. zadaným uzlům) @@ -1776,6 +3036,10 @@ Možnosti připojení: + Copyright (C) %i-%i + Copyright (C) %i–%i + + Corrupted block database detected Bylo zjištěno poškození databáze bloků @@ -1792,6 +3056,10 @@ Chceš přestavět databázi bloků hned teď? + Enable transaction replacement in the memory pool (default: %u) + Povolit výměnu transakcí v transakčním zásobníku (výchozí: %u) + + Error initializing block database Chyba při zakládání databáze bloků @@ -1800,6 +3068,18 @@ Chyba při vytváření databázového prostředí %s pro peněženku! + Error loading %s + Chyba při načítání %s + + + Error loading %s: Wallet corrupted + Chyba při načítání %s: peněženka je poškozená + + + Error loading %s: Wallet requires newer version of %s + Chyba při načítání %s: peněženka vyžaduje novější verzi %s + + Error loading block database Chyba při načítání databáze bloků @@ -1824,10 +3104,18 @@ Nemám žádný nebo jen špatný genesis blok. Není špatně nastavený datadir? + Initialization sanity check failed. %s is shutting down. + Selhala úvodní zevrubná prověrka. %s se ukončuje. + + Invalid -onion address: '%s' Neplatná -onion adresa: '%s' + Invalid amount for -%s=<amount>: '%s' + Neplatná částka pro -%s=<částka>: '%s' + + Invalid amount for -fallbackfee=<amount>: '%s' Neplatná částka pro -fallbackfee=<částka>: '%s' @@ -1836,6 +3124,10 @@ Udržovat zasobník transakcí menší než <n> megabajtů (výchozí: %u) + Loading banlist... + Načítám seznam klateb... + + Location of the auth cookie (default: data dir) Místo pro autentizační cookie (výchozí: adresář pro data) @@ -1848,6 +3140,10 @@ Připojovat se pouze k uzlům v <net> síti (ipv4, ipv6 nebo onion) + Print this help message and exit + Vypsat tuto nápovědu a skončit + + Print version and exit Vypsat verzi a skončit @@ -1860,6 +3156,10 @@ Prořezávací režim není kompatibilní s -txindex. + Rebuild chain state and block index from the blk*.dat files on disk + Při startu znovu vytvořit index řetězce bloků z aktuálních blk*.dat souborů + + Set database cache size in megabytes (%d to %d, default: %d) Nastavit velikost databázové vyrovnávací paměti v megabajtech (%d až %d, výchozí: %d) @@ -1872,6 +3172,10 @@ Udej název souboru s peněženkou (v rámci datového adresáře) + Unable to bind to %s on this computer. %s is probably already running. + Nedaří se mi připojit na %s na tomhle počítači. %s už pravděpodobně jednou běží. + + Unsupported argument -benchmark ignored, use -debug=bench. Nepodporovaný argument -benchmark se ignoruje, použij -debug=bench. @@ -1904,6 +3208,14 @@ Peněženka %s se nachází mimo datový adresář %s + Wallet debugging/testing options: + Možnosti ladění/testování peněženky: + + + Wallet needed to be rewritten: restart %s to complete + Soubor s peněženkou potřeboval přepsat: restartuj %s, aby se operace dokončila + + Wallet options: Možnosti peněženky: @@ -1940,6 +3252,10 @@ Poplatky (v %s/kB) menší než tato hodnota jsou považovány za nulové pro účely přeposílání, těžení a vytváření transakcí (výchozí: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Vynutit přeposílání transakcí od vždy vítaných protějšků (tj. těch na bílé listině), i když porušují místní zásady pro přeposílání (výchozí: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Pokud paytxfee není nastaveno, platit dostatečný poplatek na to, aby začaly být transakce potvrzovány v průměru během n bloků (výchozí: %u) @@ -2108,6 +3424,10 @@ Upozornění + Warning: unknown new rules activated (versionbit %i) + Upozornění: aktivována neznámá nová pravidla (verzový bit %i) + + Whether to operate in a blocks only mode (default: %u) Zda fungovat v čistě blokovém režimu (výchozí: %u) @@ -2200,6 +3520,10 @@ Uživatelské jméno a zahašované heslo pro JSON-RPC spojení. Pole <userpw> má formát: <UŽIVATELSKÉ_JMÉNO>:<SŮL>$<HAŠ>. Pomocný pythonní skript je přiložen v share/rpcuser. Tuto volbu lze použít i vícekrát + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + Upozornění: soubor s peněženkou je poškozený, data jsou však zachráněna! Původní soubor %s je uložený jako %s v %s. Pokud nejsou stav tvého účtu nebo transakce v pořádku, zřejmě bys měl obnovit zálohu. + + (default: %s) (výchozí: %s) diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 0e99b8df055..939dfe6c0ef 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -183,7 +183,43 @@ %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. %1 wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Wallet-Verschlüsselung nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadprogramme schützt, die Ihren Computer befällt. - + + 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. + WICHTIG: Alle vorherigen Wallet-Sicherungen sollten durch die neu erzeugte, verschlüsselte Wallet ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Wallet nutzlos, sobald Sie die neue, verschlüsselte Wallet verwenden. + + + Wallet encryption failed + Wallet-Verschlüsselung fehlgeschlagen + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Die Wallet-Verschlüsselung ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Wallet wurde nicht verschlüsselt. + + + The supplied passphrases do not match. + Die eingegebenen Passphrasen stimmen nicht überein. + + + Wallet unlock failed + Wallet-Entsperrung fehlgeschlagen + + + The passphrase entered for the wallet decryption was incorrect. + Die eingegebene Passphrase zur Wallet-Entschlüsselung war nicht korrekt. + + + Wallet decryption failed + Wallet-Entschlüsselung fehlgeschlagen + + + Wallet passphrase was successfully changed. + Die Wallet-Passphrase wurde erfolgreich geändert. + + + Warning: The Caps Lock key is on! + Warnung: Die Feststelltaste ist aktiviert! + + BanTableModel @@ -603,6 +639,18 @@ Transaktionskennung kopieren + Lock unspent + Nicht ausgegebenen Betrag sperren + + + Unlock unspent + Nicht ausgegebenen Betrag entsperren + + + Copy quantity + Anzahl kopieren + + Copy fee Gebühr kopieren @@ -619,6 +667,10 @@ Priorität kopieren + Copy dust + "Staub" kopieren + + Copy change Wechselgeld kopieren @@ -675,10 +727,42 @@ nein + This label turns red if the transaction size is greater than 1000 bytes. + Diese Bezeichnung wird rot, wenn die Transaktion größer als 1000 Byte ist. + + + This means a fee of at least %1 per kB is required. + Das bedeutet, dass eine Gebühr von mindestens %1 pro kB erforderlich ist. + + + Can vary +/- 1 byte per input. + Kann um +/- 1 Byte pro Eingabe variieren. + + + Transactions with higher priority are more likely to get included into a block. + Transaktionen mit höherer Priorität haben eine größere Chance in einen Block aufgenommen zu werden. + + + This label turns red if the priority is smaller than "medium". + Diese Bezeichnung wird rot, wenn die Priorität niedriger als "mittel" ist. + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Diese Bezeichnung wird rot, wenn irgendein Empfänger einen Betrag kleiner als die derzeitige "Staubgrenze" erhält. + + + Can vary +/- %1 satoshi(s) per input. + Kann pro Eingabe um +/- %1 Satoshi(s) abweichen. + + (no label) (keine Bezeichnung) + change from %1 (%2) + Wechselgeld von %1 (%2) + + (change) (Wechselgeld) @@ -705,7 +789,39 @@ &Address &Adresse - + + New receiving address + Neue Empfangsadresse + + + New sending address + Neue Zahlungsadresse + + + Edit receiving address + Empfangsadresse bearbeiten + + + Edit sending address + Zahlungsadresse bearbeiten + + + The entered address "%1" is not a valid Bitcoin address. + Die eingegebene Adresse "%1" ist keine gültige Bitcoin-Adresse. + + + The entered address "%1" is already in the address book. + Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch. + + + Could not unlock wallet. + Wallet konnte nicht entsperrt werden. + + + New key generation failed. + Erzeugung eines neuen Schlüssels fehlgeschlagen. + + FreespaceChecker @@ -845,7 +961,11 @@ Select payment request file Zahlungsanforderungsdatei auswählen - + + Select payment request file to open + Zu öffnende Zahlungsanforderungsdatei auswählen + + OptionsDialog @@ -1158,7 +1278,95 @@ PaymentServer - + + Payment request error + fehlerhafte Zahlungsanforderung + + + Cannot start bitcoin: click-to-pay handler + "bitcoin: Klicken-zum-Bezahlen"-Handler konnte nicht gestartet werden + + + URI handling + URI-Verarbeitung + + + Payment request fetch URL is invalid: %1 + Abruf-URL der Zahlungsanforderung ist ungültig: %1 + + + Invalid payment address %1 + Ungültige Zahlungsadresse %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI kann nicht analysiert werden! Dies kann durch eine ungültige Bitcoin-Adresse oder fehlerhafte URI-Parameter verursacht werden. + + + Payment request file handling + Zahlungsanforderungsdatei-Verarbeitung + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Zahlungsanforderungsdatei kann nicht gelesen werden! Dies kann durch eine ungültige Zahlungsanforderungsdatei verursacht werden. + + + Payment request rejected + Zahlungsanforderung abgelehnt + + + Payment request network doesn't match client network. + Netzwerk der Zahlungsanforderung stimmt nicht mit dem Client-Netzwerk überein. + + + Payment request expired. + Zahlungsanforderung abgelaufen. + + + Payment request is not initialized. + Zahlungsanforderung ist nicht initialisiert. + + + Unverified payment requests to custom payment scripts are unsupported. + Unverifizierte Zahlungsanforderungen an benutzerdefinierte Zahlungsskripte werden nicht unterstützt. + + + Invalid payment request. + Ungültige Zahlungsanforderung. + + + Requested payment amount of %1 is too small (considered dust). + Angeforderter Zahlungsbetrag in Höhe von %1 ist zu niedrig und wurde als "Staub" eingestuft. + + + Refund from %1 + Rücküberweisung von %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Zahlungsanforderung %1 ist zu groß (%2 Byte, erlaubt sind %3 Byte). + + + Error communicating with %1: %2 + Kommunikationsfehler mit %1: %2 + + + Payment request cannot be parsed! + Zahlungsanforderung kann nicht verarbeitet werden! + + + Bad response from server %1 + Fehlerhafte Antwort vom Server: %1 + + + Network request error + fehlerhafte Netzwerkanfrage + + + Payment acknowledged + Zahlung bestätigt + + PeerTableModel @@ -1215,7 +1423,23 @@ QRImageWidget - + + &Save Image... + Grafik &speichern... + + + &Copy Image + Grafik &kopieren + + + Save QR Code + QR-Code speichern + + + PNG Image (*.png) + PNG-Grafik (*.png) + + RPCConsole @@ -1582,6 +1806,10 @@ Bezeichnung kopieren + Copy message + Nachricht kopieren + + Copy amount Betrag kopieren @@ -1605,25 +1833,73 @@ Grafik &speichern... + Request payment to %1 + Zahlung anfordern an %1 + + + Payment information + Zahlungsinformationen + + + URI + URI + + Address Adresse + Amount + Betrag + + Label Bezeichnung - + + Message + Nachricht + + + Resulting URI too long, try to reduce the text for label / message. + Resultierende URI ist zu lang, bitte den Text für Bezeichnung/Nachricht kürzen. + + + Error encoding URI into QR Code. + Beim Enkodieren der URI in den QR-Code ist ein Fehler aufgetreten. + + RecentRequestsTableModel + Date + Datum + + Label Bezeichnung + Message + Nachricht + + (no label) (keine Bezeichnung) - + + (no message) + (keine Nachricht) + + + (no amount requested) + (kein Betrag angefordert) + + + Requested + Angefordert + + SendCoinsDialog @@ -1775,6 +2051,10 @@ &Überweisen + Copy quantity + Anzahl kopieren + + Copy amount Betrag kopieren @@ -1795,10 +2075,86 @@ Priorität kopieren + Copy dust + "Staub" kopieren + + Copy change Wechselgeld kopieren + %1 to %2 + %1 an %2 + + + Are you sure you want to send? + Wollen Sie die Überweisung ausführen? + + + added as transaction fee + als Transaktionsgebühr hinzugefügt + + + Total Amount %1 + Gesamtbetrag %1 + + + or + oder + + + Confirm send coins + Überweisung bestätigen + + + The recipient address is not valid. Please recheck. + Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen. + + + The amount to pay must be larger than 0. + Der zu zahlende Betrag muss größer als 0 sein. + + + The amount exceeds your balance. + Der angegebene Betrag übersteigt Ihren Kontostand. + + + The total exceeds your balance when the %1 transaction fee is included. + Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand. + + + Duplicate address found: addresses should only be used once each. + Doppelte Adresse entdeckt: Adressen dürfen jeweils nur einmal vorkommen. + + + Transaction creation failed! + Transaktionserstellung fehlgeschlagen! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus Ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist. + + + A fee higher than %1 is considered an absurdly high fee. + Eine höhere Gebühr als %1 wird als unsinnig hohe Gebühr angesehen. + + + Payment request expired. + Zahlungsanforderung abgelaufen. + + + Pay only the required fee of %1 + Nur die notwendige Gebühr in Höhe von %1 zahlen + + + Estimated to begin confirmation within %n block(s). + Voraussichtlicher Beginn der Bestätigung innerhalb von %n Blöcken.Voraussichtlicher Beginn der Bestätigung innerhalb von %n Blöcken. + + + Warning: Invalid Bitcoin address + Warnung: Ungültige Bitcoin-Adresse + + (no label) (keine Bezeichnung) @@ -1999,6 +2355,18 @@ TransactionDesc + + Date + Datum + + + Message + Nachricht + + + Amount + Betrag + TransactionDescDialog @@ -2010,6 +2378,10 @@ TransactionTableModel + Date + Datum + + Label Bezeichnung @@ -2041,6 +2413,10 @@ Kommagetrennte-Datei (*.csv) + Date + Datum + + Label Bezeichnung diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 7631a666c8e..69fe102327b 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -304,12 +304,12 @@ Sign &message... - + Synchronizing with network... Synchronizing with network... - + &Overview &Overview @@ -404,12 +404,12 @@ - + Reindexing blocks on disk... Reindexing blocks on disk... - + Send coins to a Bitcoin address Send coins to a Bitcoin address @@ -439,12 +439,12 @@ &Verify message... - + Bitcoin Bitcoin - + Wallet Wallet @@ -529,7 +529,7 @@ - + %n active connection(s) to Bitcoin network %n active connection to Bitcoin network @@ -633,12 +633,12 @@ Up to date - + Show the %1 help message to get a list with possible Bitcoin command-line options - + %1 client @@ -796,7 +796,7 @@ - + Copy address @@ -862,7 +862,7 @@ - + highest @@ -1540,7 +1540,7 @@ Form - + 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. 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. @@ -1783,7 +1783,7 @@ - + %1 d @@ -1975,8 +1975,8 @@ - - + + Select a peer to view detailed information. @@ -2107,7 +2107,7 @@ - + In: @@ -2127,7 +2127,7 @@ Clear console - + &Disconnect Node @@ -2165,7 +2165,7 @@ - + Welcome to the %1 RPC console. @@ -2180,7 +2180,7 @@ Type <b>help</b> for an overview of available commands. - + %1 B @@ -2333,7 +2333,7 @@ - + Copy label @@ -3779,7 +3779,7 @@ bitcoin-core - + Options: Options: @@ -3789,22 +3789,22 @@ Specify data directory - + Connect to a node to retrieve peer addresses, and disconnect Connect to a node to retrieve peer addresses, and disconnect - + Specify your own public address Specify your own public address - + Accept command line and JSON-RPC commands Accept command line and JSON-RPC commands - + If <category> is not supplied or if <category> = 1, output all debugging information. @@ -3829,7 +3829,7 @@ - + Error: A fatal internal error occurred, see debug.log for details @@ -3839,7 +3839,7 @@ - + Pruning blockstore... @@ -3854,12 +3854,12 @@ - + Accept connections from outside (default: 1 if no -proxy or -connect) Accept connections from outside (default: 1 if no -proxy or -connect) - + Bitcoin Core Bitcoin Core @@ -3949,7 +3949,7 @@ - + The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct @@ -3979,12 +3979,7 @@ Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. - - Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. - - - - + You need to rebuild the database using -reindex-chainstate to change -txindex @@ -4174,6 +4169,11 @@ + + Keypool ran out, please call keypoolrefill first + + + Loading banlist... @@ -4319,7 +4319,7 @@ - + Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times @@ -4394,7 +4394,12 @@ - + + Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d) + + + + The transaction amount is too small to send after the fee has been deducted @@ -4409,7 +4414,12 @@ - + + Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times. + + + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway @@ -4469,7 +4479,7 @@ - + Need to specify a port with -whitebind: '%s' @@ -4604,22 +4614,22 @@ Password for JSON-RPC connections - + Execute command when the best block changes (%s in cmd is replaced by block hash) Execute command when the best block changes (%s in cmd is replaced by block hash) - + Allow DNS lookups for -addnode, -seednode and -connect Allow DNS lookups for -addnode, -seednode and -connect - + Loading addresses... Loading addresses... - + (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) @@ -4664,7 +4674,7 @@ - + Support filtering of blocks and transaction with bloom filters (default: %u) @@ -4734,7 +4744,7 @@ Invalid -proxy address: '%s' - + Listen for JSON-RPC connections on <port> (default: %u or testnet: %u) @@ -4819,27 +4829,27 @@ Unknown network specified in -onlynet: '%s' - + Insufficient funds Insufficient funds - + Loading block index... Loading block index... - + Add a node to connect to and attempt to keep the connection open Add a node to connect to and attempt to keep the connection open - + Loading wallet... Loading wallet... - + Cannot downgrade wallet Cannot downgrade wallet @@ -4849,12 +4859,12 @@ Cannot write default address - + Rescanning... Rescanning... - + Done loading Done loading diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts index f308f6d4d38..4dbd5ee9c56 100644 --- a/src/qt/locale/bitcoin_en_GB.ts +++ b/src/qt/locale/bitcoin_en_GB.ts @@ -41,10 +41,66 @@ &Delete &Delete + + Choose the address to send coins to + Choose the address to send coins to + + + Choose the address to receive coins with + Choose the address to receive coins with + + + C&hoose + C&hoose + + + Sending addresses + Sending addresses + + + Receiving addresses + Receiving addresses + + + &Copy Address + &Copy Address + + + Copy &Label + Copy &Label + + + &Edit + &Edit + + + Export Address List + Export Address List + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + Exporting Failed + Exporting Failed + AddressTableModel - + + Label + Label + + + Address + Address + + + (no label) + (no label) + + AskPassphraseDialog @@ -63,6 +119,10 @@ Repeat new passphrase Repeat new passphrase + + Encrypt wallet + Encrypt wallet + BanTableModel @@ -466,6 +526,10 @@ Priority Priority + + (no label) + (no label) + EditAddressDialog @@ -1380,9 +1444,25 @@ &Save Image... &Save Image... + + Address + Address + + + Label + Label + RecentRequestsTableModel + + Label + Label + + + (no label) + (no label) + SendCoinsDialog @@ -1534,7 +1614,11 @@ S&end S&end - + + (no label) + (no label) + + SendCoinsEntry @@ -1741,9 +1825,33 @@ TransactionTableModel + + Label + Label + + + (no label) + (no label) + TransactionView + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + Label + Label + + + Address + Address + + + Exporting Failed + Exporting Failed + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index a0b188e5b7d..1fbbf74b785 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -50,6 +50,10 @@ Seleccione la dirección de la que recibir monedas + C&hoose + E&scoger + + Sending addresses Enviando direcciones @@ -195,7 +199,27 @@ The supplied passphrases do not match. La frase clave introducida no coincide. - + + Wallet unlock failed + Fracasó el desbloqueo del monedero + + + The passphrase entered for the wallet decryption was incorrect. + La frase clave introducida para la encriptación del monedero es incorrecta. + + + Wallet decryption failed + Fracasó la encriptación del monedero + + + Wallet passphrase was successfully changed. + La frase clave del monedero se ha cambiado con éxito. + + + Warning: The Caps Lock key is on! + Alerta: ¡La clave de bloqueo Caps está activa! + + BanTableModel @@ -599,10 +623,150 @@ Prioridad + Copy address + Copiar ubicación + + + Copy label + Copiar etiqueta + + + Copy amount + Copiar cantidad + + + Copy transaction ID + Copiar ID de transacción + + + Lock unspent + Bloquear lo no gastado + + + Unlock unspent + Desbloquear lo no gastado + + + Copy quantity + Copiar cantidad + + + Copy fee + Copiar cuota + + + Copy after fee + Copiar después de couta + + + Copy bytes + Copiar bytes + + + Copy priority + Copiar prioridad + + + Copy dust + Copiar polvo + + + Copy change + Copiar cambio + + + highest + el más alto + + + higher + más alto + + + high + alto + + + medium-high + media altura + + + medium + medio + + + low-medium + medio bajo + + + low + bajo + + + lower + más bajo + + + lowest + el más bajo + + + (%1 locked) + (%1 bloqueado) + + + none + ninguno + + + yes + + + + no + no + + + This label turns red if the transaction size is greater than 1000 bytes. + Esta etiqueta se vuelve roja sí el tamaño de transacción es mayor de 1000 bytes. + + + This means a fee of at least %1 per kB is required. + Esto significa que se requiere una couta de al menos %1 por kB. + + + Can vary +/- 1 byte per input. + Puede variar +/- 1 byte por entrada. + + + Transactions with higher priority are more likely to get included into a block. + Las transacciones con mayor prioridad son más probablemente incluídas en un bloque. + + + This label turns red if the priority is smaller than "medium". + Esta etiqueta se vuelve roja si la priodidad es inferior a "medio". + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Esta etiqueta se vuelve roja si algún destinatario recibe una cantidad inferior a la actual puerta polvorienta. + + + Can vary +/- %1 satoshi(s) per input. + Puede variar +/- %1 satoshi(s) por entrada. + + (no label) (sin etiqueta) - + + change from %1 (%2) + cambia desde %1 (%2) + + + (change) + (cambio) + + EditAddressDialog @@ -625,7 +789,39 @@ &Address &Dirección - + + New receiving address + Nueva dirección de recivimiento + + + New sending address + Nueva dirección de envío + + + Edit receiving address + Editar dirección de recivimiento + + + Edit sending address + Editar dirección de envío + + + The entered address "%1" is not a valid Bitcoin address. + La dirección introducida "%1" no es una dirección Bitcoin válida. + + + The entered address "%1" is already in the address book. + La dirección introducida "%1" está ya en la agenda. + + + Could not unlock wallet. + Podría no desbloquear el monedero. + + + New key generation failed. + Falló la generación de la nueva clave. + + FreespaceChecker @@ -761,7 +957,11 @@ Select payment request file Seleccionar archivo de sulicitud de pago - + + Select payment request file to open + Seleccionar el archivo de solicitud de pago para abrir + + OptionsDialog @@ -1074,7 +1274,95 @@ PaymentServer - + + Payment request error + Fallo en la solicitud de pago + + + Cannot start bitcoin: click-to-pay handler + No se puede iniciar bitcoin: encargado click-para-pagar + + + URI handling + Manejo de URI + + + Payment request fetch URL is invalid: %1 + La búsqueda de solicitud de pago URL es válida: %1 + + + Invalid payment address %1 + Dirección de pago inválida %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI no puede ser analizado! Esto puede ser causado por una dirección Bitcoin inválida o parametros URI mal formados. + + + Payment request file handling + Manejo del archivo de solicitud de pago + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + ¡El archivo de solicitud de pago no puede ser leído! Esto puede ser causado por un archivo de solicitud de pago inválido. + + + Payment request rejected + Solicitud de pago rechazada + + + Payment request network doesn't match client network. + La red de solicitud de pago no cimbina la red cliente. + + + Payment request expired. + Solicitud de pago caducada. + + + Payment request is not initialized. + La solicitud de pago no se ha iniciado. + + + Unverified payment requests to custom payment scripts are unsupported. + Solicitudes de pago sin verificar a scripts de pago habitual no se soportan. + + + Invalid payment request. + Solicitud de pago inválida. + + + Requested payment amount of %1 is too small (considered dust). + Cantidad de pago solicitada de %1 es demasiado pequeña (considerado polvo). + + + Refund from %1 + Reembolsar desde %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Solicitud de pago de %1 es demasiado grande (%2 bytes, permitidos %3 bytes). + + + Error communicating with %1: %2 + Fallo al comunicar con %1: %2 + + + Payment request cannot be parsed! + ¡La solicitud de pago no puede ser analizada! + + + Bad response from server %1 + Mala respuesta desde el servidor %1 + + + Network request error + Fallo de solicitud de red + + + Payment acknowledged + Pago declarado + + PeerTableModel @@ -1131,7 +1419,23 @@ QRImageWidget - + + &Save Image... + &Guardar imagen... + + + &Copy Image + &Copiar imagen + + + Save QR Code + Guardar código QR + + + PNG Image (*.png) + Imagen PNG (*.png) + + RPCConsole @@ -1493,7 +1797,19 @@ Remove Eliminar - + + Copy label + Copiar capa + + + Copy message + Copiar imagen + + + Copy amount + Copiar cantidad + + ReceiveRequestDialog @@ -1513,25 +1829,73 @@ Guardar Imagen... + Request payment to %1 + Solicitar pago a %1 + + + Payment information + Información de pago + + + URI + URI + + Address Dirección + Amount + Cantidad + + Label Etiqueta - + + Message + Mensaje + + + Resulting URI too long, try to reduce the text for label / message. + URI resultante demasiado grande, trate de reducir el texto de etiqueta / mensaje. + + + Error encoding URI into QR Code. + Fallo al codificar URI en código QR. + + RecentRequestsTableModel + Date + Fecha + + Label Etiqueta + Message + Mensaje + + (no label) (sin etiqueta) - + + (no message) + (no hay mensaje) + + + (no amount requested) + (no hay solicitud de cantidad) + + + Requested + Solicitado + + SendCoinsDialog @@ -1683,6 +2047,114 @@ &Enviar + Copy quantity + Copiar cantidad + + + Copy amount + Copiar cantidad + + + Copy fee + Copiar cuota + + + Copy after fee + Copiar después de couta + + + Copy bytes + Copiar bytes + + + Copy priority + Copiar prioridad + + + Copy dust + Copiar polvo + + + Copy change + Copiar cambio + + + %1 to %2 + %1 a %2 + + + Are you sure you want to send? + ¿Seguro que quiere enviar? + + + added as transaction fee + añadido como transacción de cuota + + + Total Amount %1 + Cantidad total %1 + + + or + o + + + Confirm send coins + Confirmar enviar monedas + + + The recipient address is not valid. Please recheck. + La dirección de destinatario no es válida. Por favor revísela. + + + The amount to pay must be larger than 0. + La cantidad a pagar debe de ser mayor que 0. + + + The amount exceeds your balance. + La cantidad excede su saldo. + + + The total exceeds your balance when the %1 transaction fee is included. + El total excede su saldo cuando la cuota de transacción de %1 es incluida. + + + Duplicate address found: addresses should only be used once each. + Dirección duplicada encontrada: la dirección sólo debería ser utilizada una vez por cada uso. + + + Transaction creation failed! + ¡Falló la creación de transacción! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + ¡La transacción fue rechazada! Esto podría pasar si algunas de las monedas de su monedero fueron ya gastadas, así como si ha utilizado una copia del wallet.dat y las monedas fueron gastadas en la copia pero no marcadas como gastadas aquí. + + + A fee higher than %1 is considered an absurdly high fee. + Una couta mayor que %1 se considera una cuota irracionalmente alta. + + + Payment request expired. + Solicitud de pago caducada. + + + Pay only the required fee of %1 + Pagar únicamente la cuota solicitada de %1 + + + Estimated to begin confirmation within %n block(s). + Se estima que sea confirmado dentro del %n bloque(s).Se estima que sea confirmado dentro del %n bloque(s). + + + Warning: Invalid Bitcoin address + Alerta: dirección Bitcoin inválida + + + Warning: Unknown change address + Alerta: dirección cambiada desconocida + + (no label) (sin etiqueta) @@ -1765,12 +2237,20 @@ Memo: Memo: - + + Enter a label for this address to add it to your address book + Introduzca una etiqueta para esta dirección para añadirla a su agenda + + SendConfirmationDialog - - - ShutdownWindow + + Yes + + + + + ShutdownWindow %1 is shutting down... %1 se esta cerrando... @@ -1866,7 +2346,59 @@ Reset all verify message fields Vaciar todos los campos de la verificación de mensaje - + + Click "Sign Message" to generate signature + Click en "Fírmar mensaje" para generar una firma + + + The entered address is invalid. + La dirección introducida no es válida. + + + Please check the address and try again. + Por favor revise la dirección e inténtelo de nuevo. + + + The entered address does not refer to a key. + La dirección introducida no remite a una clave. + + + Wallet unlock was cancelled. + El desbloqueo del monedero fue cancelado. + + + Private key for the entered address is not available. + La clave privada de la dirección introducida no está disponible. + + + Message signing failed. + Falló la firma del mensaje. + + + Message signed. + Mensaje firmado. + + + The signature could not be decoded. + La firma no pudo descodificarse. + + + Please check the signature and try again. + Por favor compruebe la firma y pruebe de nuevo. + + + The signature did not match the message digest. + La firma no se combinó con el mensaje. + + + Message verification failed. + Falló la verificación del mensaje. + + + Message verified. + Mensaje verificado. + + SplashScreen @@ -1883,32 +2415,420 @@ TransactionDesc - + + Open for %n more block(s) + Abrir para %n más bloque(s)Abrir para %n más bloque(s) + + + Open until %1 + Abierto hasta %1 + + + conflicted with a transaction with %1 confirmations + Hay un conflicto con la traducción de las confirmaciones %1 + + + %1/offline + %1/sin conexión + + + 0/unconfirmed, %1 + 0/no confirmado, %1 + + + in memory pool + en el equipo de memoria + + + not in memory pool + no en el equipo de memoria + + + abandoned + abandonado + + + %1/unconfirmed + %1/no confirmado + + + %1 confirmations + confirmaciones %1 + + + Status + Estado + + + , has not been successfully broadcast yet + , no ha sido emitido con éxito aún + + + , broadcast through %n node(s) + , emisión a través de %n nodo(s), emisión a través de %n nodo(s) + + + Date + Fecha + + + Source + Fuente + + + Generated + Generado + + + From + Desde + + + unknown + desconocido + + + To + Para + + + own address + dirección propia + + + watch-only + de observación + + + label + etiqueta + + + Credit + Credito + + + matures in %n more block(s) + disponible en %n bloque(s) másdisponible en %n bloque(s) más + + + not accepted + no aceptada + + + Debit + Enviado + + + Total debit + Total enviado + + + Total credit + Total recibido + + + Transaction fee + Comisión de transacción + + + Net amount + Cantidad neta + + + Message + Mensaje + + + Comment + Comentario + + + Transaction ID + Identificador de transacción (ID) + + + Output index + Indice de salida + + + Merchant + Vendedor + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Los bitcoins generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a "no aceptado" y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo. + + + Debug information + Información de depuración + + + Transaction + Transacción + + + Inputs + entradas + + + Amount + Cantidad + + + true + verdadero + + + false + falso + + TransactionDescDialog This pane shows a detailed description of the transaction Esta ventana muestra información detallada sobre la transacción - + + Details for %1 + Detalles para %1 + + TransactionTableModel + Date + Fecha + + + Type + Tipo + + Label Etiqueta + + Open for %n more block(s) + Abrir para %n bloque(s) másAbrir para %n bloque(s) más + + + Open until %1 + Abierto hasta %1 + + + Offline + Sin conexion + + + Unconfirmed + Sin confirmar + + + Abandoned + Abandonado + + + Confirming (%1 of %2 recommended confirmations) + Confirmando (%1 de %2 confirmaciones recomendadas) + + + Confirmed (%1 confirmations) + Confirmado (%1 confirmaciones) + + + Conflicted + En conflicto + + + Immature (%1 confirmations, will be available after %2) + No disponible (%1 confirmaciones. Estarán disponibles al cabo de %2) + + + This block was not received by any other nodes and will probably not be accepted! + Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado! + + + Generated but not accepted + Generado pero no aceptado + + + Received with + Recibido con + + + Received from + Recibidos de + + + Sent to + Enviado a + + + Payment to yourself + Pago proprio + + + Mined + Minado + + + watch-only + de observación + + + (n/a) + (nd) + (no label) (sin etiqueta) - + + Transaction status. Hover over this field to show number of confirmations. + Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones. + + + Date and time that the transaction was received. + Fecha y hora en que se recibió la transacción. + + + Type of transaction. + Tipo de transacción. + + + Whether or not a watch-only address is involved in this transaction. + Si una dirección watch-only está involucrada en esta transacción o no. + + + User-defined intent/purpose of the transaction. + Descripción de la transacción definido por el usuario. + + + Amount removed from or added to balance. + Cantidad retirada o añadida al saldo. + + TransactionView + All + Todo + + + Today + Hoy + + + This week + Esta semana + + + This month + Este mes + + + Last month + Mes pasado + + + This year + Este año + + + Range... + Rango... + + + Received with + Recibido con + + + Sent to + Enviado a + + + To yourself + A usted mismo + + + Mined + Minado + + + Other + Otra + + + Enter address or label to search + Introduzca una dirección o etiqueta que buscar + + + Min amount + Cantidad mínima + + + Abandon transaction + Transacción abandonada + + + Copy address + Copiar ubicación + + + Copy label + Copiar capa + + + Copy amount + Copiar cantidad + + + Copy transaction ID + Copiar ID de transacción + + + Copy raw transaction + Copiar transacción raw + + + Copy full transaction details + Copiar todos los detalles de la transacción + + + Edit label + Editar etiqueta + + + Show transaction details + Mostrar detalles de la transacción + + + Export Transaction History + Exportar historial de transacciones + + Comma separated file (*.csv) Archivo separado de coma (*.csv) + Confirmed + Confirmado + + + Watch-only + De observación + + + Date + Fecha + + + Type + Tipo + + Label Etiqueta @@ -1917,10 +2837,34 @@ Dirección + ID + ID + + Exporting Failed Falló la exportación - + + There was an error trying to save the transaction history to %1. + Ha habido un error al intentar guardar la transacción con %1. + + + Exporting Successful + Exportación finalizada + + + The transaction history was successfully saved to %1. + La transacción ha sido guardada en %1. + + + Range: + Rango: + + + to + para + + UnitDisplayStatusBarControl @@ -1930,13 +2874,53 @@ WalletFrame - + + No wallet has been loaded. + No se ha cargado ningún monedero + + WalletModel - + + Send Coins + Enviar + + WalletView - + + &Export + &Exportar + + + Export the data in the current tab to a file + Exportar a un archivo los datos de esta pestaña + + + Backup Wallet + Copia de seguridad del monedero + + + Wallet Data (*.dat) + Datos de monedero (*.dat) + + + Backup Failed + La copia de seguridad ha fallado + + + There was an error trying to save the wallet data to %1. + Ha habido un error al intentar guardar los datos del monedero en %1. + + + Backup Successful + Se ha completado con éxito la copia de respaldo + + + The wallet data was successfully saved to %1. + Los datos del monedero se han guardado con éxito en %1. + + bitcoin-core @@ -2319,6 +3303,10 @@ Especificar archivo de monedero (dentro del directorio de datos) + Starting network threads... + Iniciando funciones de red... + + The source code is available from %s. El código fuente esta disponible desde %s. @@ -2403,6 +3391,10 @@ Las comisiones (en %s/kB) mas pequeñas que esto se consideran como cero comisión para la retransmisión, minería y creación de la transacción (predeterminado: %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Fuerza la retransmisión de transacciones desde nodos en la lista blanca incluso si violan la política de retransmisiones local (predeterminado: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Si el pago de comisión no está establecido, incluir la cuota suficiente para que las transacciones comiencen la confirmación en una media de n bloques ( por defecto :%u) @@ -2556,7 +3548,7 @@ Transaction too large - Transacción demasiado grande + Transacción demasiado grande, intenta dividirla en varias. Unable to bind to %s on this computer (bind returned error %s) @@ -2564,7 +3556,7 @@ Upgrade wallet to latest format on startup - Actualizar el monedero al último formato + Actualizar el monedero al último formato al inicio Username for JSON-RPC connections @@ -2610,15 +3602,15 @@ (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) - (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) + (1 = mantener los meta datos de transacción, por ejemplo: propietario e información de pago, 2 = omitir los metadatos) -maxtxfee is set very high! Fees this large could be paid on a single transaction. - -maxtxfee tiene un ajuste muy elevado! Las comisiones así de grandes podrían ser pagadas en una única transaccion. + -maxtxfee tiene un ajuste muy elevado! Comisiones muy grandes podrían ser pagadas en una única transaccion. -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - -paytxfee tiene un ajuste muy elevado! Esta es la comisión de transacción que pagaras si envías una transaccion. + -paytxfee tiene un valor muy elevado! La comisión de transacción que pagaras si envías una transaccion es alta. Do not keep transactions in the mempool longer than <n> hours (default: %u) @@ -2646,7 +3638,7 @@ Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. - Error: Unsupported argumento -socks encontrados. SOCKS versión ajuste ya no es posible, sólo SOCKS5 proxies son compatibles. + Error: argumento -socks encontrado. El ajuste de la versión SOCKS ya no es posible, sólo proxies SOCKS5 son compatibles. Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. @@ -2746,7 +3738,7 @@ Spend unconfirmed change when sending transactions (default: %u) - Gastar cambio no confirmado al enviar transacciones (predeterminado: %u) + Usar cambio aún no confirmado al enviar transacciones (predeterminado: %u) Threshold for disconnecting misbehaving peers (default: %u) @@ -2774,7 +3766,7 @@ Cannot downgrade wallet - No se puede rebajar el monedero + No se puede cambiar a una versión mas antigua el monedero Cannot write default address diff --git a/src/qt/locale/bitcoin_es_ES.ts b/src/qt/locale/bitcoin_es_ES.ts index 40b6bb7df04..8725cff5825 100644 --- a/src/qt/locale/bitcoin_es_ES.ts +++ b/src/qt/locale/bitcoin_es_ES.ts @@ -3,11 +3,11 @@ AddressBookPage Right-click to edit address or label - Haz clic derecho para editar la dirección o la etiqueta + Haz clic derecho para editar la dirección o etiqueta Create a new address - Crea una nueva direccióon + Crear una nueva dirección &New @@ -15,7 +15,7 @@ Copy the currently selected address to the system clipboard - Copia la direccón seleccionada al portapapeles del sistema + Copiar la dirección seleccionada al portapapeles del sistema &Copy @@ -27,11 +27,11 @@ Delete the currently selected address from the list - Elimina la dirección seleccionada de la lista + Eliminar la dirección seleccionada de la lista Export the data in the current tab to a file - Exporta los datos de la pestaña actual a un archivo + Exportar los datos en la ficha actual a un archivo &Export @@ -41,19 +41,87 @@ &Delete &Eliminar - + + Choose the address to send coins to + Seleccione la dirección a la que enviar monedas + + + Choose the address to receive coins with + Seleccione la dirección de la que recibir monedas + + + C&hoose + E&scoger + + + Sending addresses + Enviando direcciones + + + Receiving addresses + Recibiendo direcciones + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estas son sus direcciones Bitcoin para enviar pagos. Verifique siempre la cantidad y la dirección de recibimiento antes de enviar monedas. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Estas son sus direcciones Bitcoin para recibir pagos. Se recomienda utilizar una nueva dirección de recibimiento para cada transacción + + + &Copy Address + &Copiar Dirección + + + Copy &Label + Copiar &Etiqueta + + + &Edit + &Editar + + + Export Address List + Exportar lista de direcciones + + + Comma separated file (*.csv) + Archivo separado de coma (*.csv) + + + Exporting Failed + Falló la exportación + + + There was an error trying to save the address list to %1. Please try again. + Había un error intentando guardar la lista de direcciones en %1. Por favor inténtelo de nuevo. + + AddressTableModel - + + Label + Etiqueta + + + Address + Dirección + + + (no label) + (sin etiqueta) + + AskPassphraseDialog Passphrase Dialog - Dialogo de Contraseña + Diálogo de contraseña Enter passphrase - Introduzca la contraseña + Introducir contraseña New passphrase @@ -61,12 +129,108 @@ Repeat new passphrase - Repite la nueva contraseña + Repita la nueva contraseña + + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Introduzca la nueva frase clave del monedero. <br/>Por favor utilice una frase clave de <b>diez o más carácteres aleatorios</b>, o <b>ocho o más palabras</b>. + + + Encrypt wallet + Monedero encriptado + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operación necesita su frase clave de monedero para desbloquear el monedero. + + + Unlock wallet + Desbloquear monedero + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operación necesita su frase clave de cartera para desencriptar el monedero. + + + Decrypt wallet + Desencriptar monedero + + + Change passphrase + Cambiar frase clave + + + Enter the old passphrase and new passphrase to the wallet. + Introduzca la vieja frase clave y la nueva flase clave para el monedero. + + + Confirm wallet encryption + Confirmar encriptación del monedero + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Advertencia: Si encripta su monedero y pierde su frase clave <b>PERDERÁ TODOS SUS BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + ¿Seguro que desea encriptar su monedero? + + + Wallet encrypted + Monedero encriptado + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 se cerrará ahora para terminar el proceso de encriptación. Recuerde que encriptar su monedero no puede proteger completamente su monedero de ser robado por malware que infecte su ordenador. + + + 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. + IMPORTANTE: Cualquier copia de seguridad anterior que haya hecho en su archivo de monedero debería ser reemplazada con el archivo de monedero encriptado generado recientemente. Por razones de seguridad, las copias de seguridad anteriores del archivo de monedero desencriptado serán inútiles en cuanto empiece a utilizar el nuevo monedero encriptado. - + + Wallet encryption failed + Fracasó la encriptación de monedero + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Falló la encriptación del monedero debido a un error interno. Su monedero no fue encriptado. + + + The supplied passphrases do not match. + La frase clave introducida no coincide. + + + Wallet unlock failed + Fracasó el desbloqueo del monedero + + + The passphrase entered for the wallet decryption was incorrect. + La frase clave introducida para la encriptación del monedero es incorrecta. + + + Wallet decryption failed + Fracasó la encriptación del monedero + + + Wallet passphrase was successfully changed. + La frase clave del monedero se ha cambiado con éxito. + + + Warning: The Caps Lock key is on! + Alerta: ¡La clave de bloqueo Caps está activa! + + BanTableModel - + + IP/Netmask + IP/Máscara + + + Banned Until + Bloqueado Hasta + + BitcoinGUI @@ -75,7 +239,7 @@ Synchronizing with network... - Sincronizando con la red... + Sincronizando con la red… &Overview @@ -87,7 +251,7 @@ Show general overview of wallet - Mostrar vista general de la cartera + Mostrar vista general del monedero &Transactions @@ -95,7 +259,7 @@ Browse transaction history - Navegar historial de transacciones + Examinar el historial de transacciones E&xit @@ -106,36 +270,48 @@ Salir de la aplicación + &About %1 + &Acerca de %1 + + + Show information about %1 + Mostrar información acerca de %1 + + About &Qt Acerca de &Qt Show information about Qt - Muestra información acerca de Qt + Mostrar información acerca de Qt &Options... &Opciones... + Modify configuration options for %1 + Modificar las opciones de configuración para %1 + + &Encrypt Wallet... - &Encriptar Cartera... + &Cifrar monedero… &Backup Wallet... - &Hacer copia de seguridad de la cartera... + &Guardar copia del monedero... &Change Passphrase... - &Cambiar contraseña... + &Cambiar la contraseña… &Sending addresses... - &Enviando direcciones... + Direcciones de &envío... &Receiving addresses... - &Recibiendo direcciones.. + Direcciones de &recepción... Open &URI... @@ -143,123 +319,3470 @@ Reindexing blocks on disk... - Reindexando bloques en el disco... + Reindexando bloques en disco... Send coins to a Bitcoin address - Envia monedas a una dirección Bitcoin + Enviar bitcoins a una dirección Bitcoin Backup wallet to another location - Crea una copia de seguridad de tu cartera en otra ubicación + Copia de seguridad del monedero en otra ubicación + + + Change the passphrase used for wallet encryption + Cambiar la contraseña utilizada para el cifrado del monedero + + + &Debug window + &Ventana de depuración + + + Open debugging and diagnostic console + Abrir la consola de depuración y diagnóstico + + + &Verify message... + &Verificar mensaje... + + + Bitcoin + Bitcoin + + + Wallet + Monedero + + + &Send + &Enviar + + + &Receive + &Recibir + + + &Show / Hide + &Mostrar / Ocultar + + + Show or hide the main Window + Mostrar u ocultar la ventana principal + + + Encrypt the private keys that belong to your wallet + Cifrar las claves privadas de su monedero + + + Sign messages with your Bitcoin addresses to prove you own them + Firmar mensajes con sus direcciones Bitcoin para demostrar la propiedad + + + Verify messages to ensure they were signed with specified Bitcoin addresses + Verificar mensajes comprobando que están firmados con direcciones Bitcoin concretas + + + &File + &Archivo + + + &Settings + &Configuración + + + &Help + &Ayuda + + + Tabs toolbar + Barra de pestañas + + + Request payments (generates QR codes and bitcoin: URIs) + Solicitar pagos (generando códigos QR e identificadores URI "bitcoin:") + + + Show the list of used sending addresses and labels + Mostrar la lista de direcciones de envío y etiquetas - + + Show the list of used receiving addresses and labels + Muestra la lista de direcciones de recepción y etiquetas + + + Open a bitcoin: URI or payment request + Abrir un identificador URI "bitcoin:" o una petición de pago + + + &Command-line options + &Opciones de consola de comandos + + + %n active connection(s) to Bitcoin network + %n conexión activa hacia la red Bitcoin%n conexiones activas hacia la red Bitcoin + + + Indexing blocks on disk... + Indexando bloques en disco... + + + Processing blocks on disk... + Procesando bloques en disco... + + + No block source available... + Ninguna fuente de bloques disponible ... + + + Processed %n block(s) of transaction history. + %n bloque procesado del historial de transacciones.%n bloques procesados del historial de transacciones. + + + %n hour(s) + %n hora%n horas + + + %n day(s) + %n día%n días + + + %n week(s) + %n semana%n semanas + + + %1 and %2 + %1 y %2 + + + %n year(s) + %n año%n años + + + %1 behind + %1 atrás + + + Last received block was generated %1 ago. + El último bloque recibido fue generado hace %1. + + + Transactions after this will not yet be visible. + Las transacciones posteriores aún no están visibles. + + + Error + Error + + + Warning + Aviso + + + Information + Información + + + Up to date + Actualizado + + + Show the %1 help message to get a list with possible Bitcoin command-line options + Mostrar el mensaje de ayuda %1 para obtener una lista de los posibles comandos de linea de comandos de Bitcoin + + + %1 client + %1 cliente + + + Catching up... + Actualizando... + + + Date: %1 + + Fecha: %1 + + + + Amount: %1 + + Amount: %1 + + + + Type: %1 + + Tipo: %1 + + + + Label: %1 + + Etiqueta: %1 + + + + Address: %1 + + Dirección: %1 + + + + Sent transaction + Transacción enviada + + + Incoming transaction + Transacción entrante + + + Wallet is <b>encrypted</b> and currently <b>unlocked</b> + El monedero está <b>cifrado</b> y actualmente <b>desbloqueado</b> + + + Wallet is <b>encrypted</b> and currently <b>locked</b> + El monedero está <b>cifrado</b> y actualmente <b>bloqueado</b> + + CoinControlDialog - - - EditAddressDialog - &Label - Etiqueta + Coin Selection + Selección de la moneda - &Address - Dirección + Quantity: + Cantidad: - - - FreespaceChecker - - - HelpMessageDialog - - - Intro - - - OpenURIDialog - - - OptionsDialog - - - OverviewPage - - - PaymentServer - - - PeerTableModel - - - QObject - - - QRImageWidget - - - RPCConsole - - - ReceiveCoinsDialog - - - ReceiveRequestDialog - Copy &Address - &Copiar Direccón + Bytes: + Bytes: - - - RecentRequestsTableModel - - - SendCoinsDialog - - - SendCoinsEntry - - - SendConfirmationDialog - - - ShutdownWindow - - - SignVerifyMessageDialog - - - SplashScreen - - - TrafficGraphWidget - - - TransactionDesc - - - TransactionDescDialog - - - TransactionTableModel - - - TransactionView - - - UnitDisplayStatusBarControl - - - WalletFrame - - - WalletModel - - - WalletView - - - bitcoin-core - + + Amount: + Cuantía: + + + Priority: + Prioridad: + + + Fee: + Tasa: + + + Dust: + Polvo: + + + After Fee: + Después de aplicar la comisión: + + + Change: + Cambio: + + + (un)select all + (des)marcar todos + + + Tree mode + Modo árbol + + + List mode + Modo lista + + + Amount + Cantidad + + + Received with label + Recibido con etiqueta + + + Received with address + Recibido con dirección + + + Date + Fecha + + + Confirmations + Confirmaciones + + + Confirmed + Confirmado + + + Priority + Prioridad + + + Copy address + Copiar ubicación + + + Copy label + Copiar etiqueta + + + Copy amount + Copiar cantidad + + + Copy transaction ID + Copiar ID de transacción + + + Lock unspent + Bloquear lo no gastado + + + Unlock unspent + Desbloquear lo no gastado + + + Copy quantity + Copiar cantidad + + + Copy fee + Copiar cuota + + + Copy after fee + Copiar después de couta + + + Copy bytes + Copiar bytes + + + Copy priority + Copiar prioridad + + + Copy dust + Copiar polvo + + + Copy change + Copiar cambio + + + highest + el más alto + + + higher + más alto + + + high + alto + + + medium-high + media altura + + + medium + medio + + + low-medium + medio bajo + + + low + bajo + + + lower + más bajo + + + lowest + el más bajo + + + (%1 locked) + (%1 bloqueado) + + + none + ninguno + + + yes + + + + no + no + + + This label turns red if the transaction size is greater than 1000 bytes. + Esta etiqueta se vuelve roja sí el tamaño de transacción es mayor de 1000 bytes. + + + This means a fee of at least %1 per kB is required. + Esto significa que se requiere una couta de al menos %1 por kB. + + + Can vary +/- 1 byte per input. + Puede variar +/- 1 byte por entrada. + + + Transactions with higher priority are more likely to get included into a block. + Las transacciones con mayor prioridad son más probablemente incluídas en un bloque. + + + This label turns red if the priority is smaller than "medium". + Esta etiqueta se vuelve roja si la priodidad es inferior a "medio". + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Esta etiqueta se vuelve roja si algún destinatario recibe una cantidad inferior a la actual puerta polvorienta. + + + Can vary +/- %1 satoshi(s) per input. + Puede variar +/- %1 satoshi(s) por entrada. + + + (no label) + (sin etiqueta) + + + change from %1 (%2) + cambia desde %1 (%2) + + + (change) + (cambio) + + + + EditAddressDialog + + Edit Address + Editar Dirección + + + &Label + &Etiqueta + + + The label associated with this address list entry + La etiqueta asociada con esta entrada de la lista de direcciones + + + The address associated with this address list entry. This can only be modified for sending addresses. + La dirección asociada con esta entrada de la lista de direcciones. Solo puede ser modificada para direcciones de envío. + + + &Address + &Dirección + + + New receiving address + Nueva dirección de recivimiento + + + New sending address + Nueva dirección de envío + + + Edit receiving address + Editar dirección de recivimiento + + + Edit sending address + Editar dirección de envío + + + The entered address "%1" is not a valid Bitcoin address. + La dirección introducida "%1" no es una dirección Bitcoin válida. + + + The entered address "%1" is already in the address book. + La dirección introducida "%1" está ya en la agenda. + + + Could not unlock wallet. + Podría no desbloquear el monedero. + + + New key generation failed. + Falló la generación de la nueva clave. + + + + FreespaceChecker + + A new data directory will be created. + Se creará un nuevo directorio de datos. + + + name + nombre + + + Directory already exists. Add %1 if you intend to create a new directory here. + El directorio ya existe. Añada %1 si pretende crear aquí un directorio nuevo. + + + Path already exists, and is not a directory. + La ruta ya existe y no es un directorio. + + + Cannot create data directory here. + No se puede crear un directorio de datos aquí. + + + + HelpMessageDialog + + version + versión + + + (%1-bit) + (%1-bit) + + + About %1 + Acerda de %1 + + + Command-line options + Opciones de la línea de órdenes + + + Usage: + Uso: + + + command-line options + opciones de la consola de comandos + + + UI Options: + Opciones de interfaz de usuario: + + + Choose data directory on startup (default: %u) + Elegir directorio de datos al iniciar (predeterminado: %u) + + + Set language, for example "de_DE" (default: system locale) + Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema) + + + Start minimized + Arrancar minimizado + + + Set SSL root certificates for payment request (default: -system-) + Establecer los certificados raíz SSL para solicitudes de pago (predeterminado: -system-) + + + Reset all settings changed in the GUI + Reiniciar todos los ajustes modificados en el GUI + + + + Intro + + Welcome + Bienvenido + + + Welcome to %1. + Bienvenido a %1 + + + As this is the first time the program is launched, you can choose where %1 will store its data. + Al ser la primera vez que se ejecuta el programa, puede elegir donde %1 almacenara sus datos + + + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 va a descargar y almacenar una copia de la cadena de bloques de Bitcoin. Al menos %2GB de datos seran almacenados en este directorio, que ira creciendo con el tiempo. El monedero se guardara tambien en ese directorio. + + + Use the default data directory + Utilizar el directorio de datos predeterminado + + + Use a custom data directory: + Utilizar un directorio de datos personalizado: + + + Error: Specified data directory "%1" cannot be created. + Error: no ha podido crearse el directorio de datos especificado "%1". + + + Error + Error + + + %n GB of free space available + %n GB de espacio libre%n GB de espacio disponible + + + (of %n GB needed) + (de %n GB necesitados)(de %n GB requeridos) + + + + OpenURIDialog + + Open URI + Abrir URI... + + + Open payment request from URI or file + Abrir solicitud de pago a partir de un identificador URI o de un archivo + + + URI: + URI: + + + Select payment request file + Seleccionar archivo de sulicitud de pago + + + Select payment request file to open + Seleccionar el archivo de solicitud de pago para abrir + + + + OptionsDialog + + Options + Opciones + + + &Main + &Principal + + + Automatically start %1 after logging in to the system. + Iniciar automaticamente %1 al encender el sistema. + + + &Start %1 on system login + &Iniciar %1 al iniciar el sistema + + + Size of &database cache + Tamaño de cache de la &base de datos + + + MB + MB + + + Number of script &verification threads + Número de hilos de &verificación de scripts + + + Accept connections from outside + Aceptar conexiones desde el exterior + + + Allow incoming connections + Aceptar conexiones entrantes + + + IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) + Dirección IP del proxy (p. ej. IPv4: 127.0.0.1 / IPv6: ::1) + + + Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu. + Minimizar en lugar de salir de la aplicación cuando la ventana está cerrada. Cuando se activa esta opción, la aplicación sólo se cerrará después de seleccionar Salir en el menú. + + + Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |. + Identificadores URL de terceros (por ejemplo, un explorador de bloques) que aparecen en la pestaña de transacciones como elementos del menú contextual. El %s en la URL es reemplazado por el valor hash de la transacción. Se pueden separar URL múltiples por una barra vertical |. + + + Third party transaction URLs + Identificadores URL de transacciones de terceros + + + Active command-line options that override above options: + Opciones activas de consola de comandos que tienen preferencia sobre las opciones anteriores: + + + Reset all client options to default. + Restablecer todas las opciones predeterminadas del cliente. + + + &Reset Options + &Restablecer opciones + + + &Network + &Red + + + (0 = auto, <0 = leave that many cores free) + (0 = automático, <0 = dejar libres ese número de núcleos) + + + W&allet + &Monedero + + + Expert + Experto + + + Enable coin &control features + Habilitar funcionalidad de &coin control + + + If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed. + Si desactiva el gasto del cambio no confirmado, no se podrá usar el cambio de una transacción hasta que se alcance al menos una confirmación. Esto afecta también a cómo se calcula su saldo. + + + &Spend unconfirmed change + &Gastar cambio no confirmado + + + Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled. + Abrir automáticamente el puerto del cliente Bitcoin en el router. Esta opción solo funciona si el router admite UPnP y está activado. + + + Map port using &UPnP + Mapear el puerto mediante &UPnP + + + Connect to the Bitcoin network through a SOCKS5 proxy. + Conectarse a la red Bitcoin a través de un proxy SOCKS5. + + + &Connect through SOCKS5 proxy (default proxy): + &Conectarse a través de proxy SOCKS5 (proxy predeterminado): + + + Proxy &IP: + Dirección &IP del proxy: + + + &Port: + &Puerto: + + + Port of the proxy (e.g. 9050) + Puerto del servidor proxy (ej. 9050) + + + Used for reaching peers via: + Usado para alcanzar compañeros via: + + + Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type. + Muestra si el proxy SOCKS5 predeterminado es utilizado para llegar a los pares a traves de este tipo de red. + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services. + Conectar a la red Bitcoin mediante un proxy SOCKS5 por separado para los servicios ocultos de Tor. + + + Use separate SOCKS5 proxy to reach peers via Tor hidden services: + Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima: + + + &Window + &Ventana + + + &Hide the icon from the system tray. + &Ocultar el icono de la barra de tareas + + + Hide tray icon + Ocultar barra de tareas + + + Show only a tray icon after minimizing the window. + Minimizar la ventana a la bandeja de iconos del sistema. + + + &Minimize to the tray instead of the taskbar + &Minimizar a la bandeja en vez de a la barra de tareas + + + M&inimize on close + M&inimizar al cerrar + + + &Display + &Interfaz + + + User Interface &language: + I&dioma de la interfaz de usuario + + + The user interface language can be set here. This setting will take effect after restarting %1. + El idioma de la interfaz de usuario puede establecerse aquí. Esta configuración tendrá efecto tras reiniciar %1. + + + &Unit to show amounts in: + Mostrar las cantidades en la &unidad: + + + Choose the default subdivision unit to show in the interface and when sending coins. + Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían bitcoins. + + + Whether to show coin control features or not. + Mostrar o no funcionalidad de Coin Control + + + &OK + &Aceptar + + + &Cancel + &Cancelar + + + default + predeterminado + + + none + ninguna + + + Confirm options reset + Confirme el restablecimiento de las opciones + + + Client restart required to activate changes. + Se necesita reiniciar el cliente para activar los cambios. + + + Client will be shut down. Do you want to proceed? + El cliente se cerrará. ¿Desea continuar? + + + This change would require a client restart. + Este cambio exige el reinicio del cliente. + + + The supplied proxy address is invalid. + La dirección proxy indicada es inválida. + + + + OverviewPage + + Form + Formulario + + + 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. + La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red Bitcoin después de que se haya establecido una conexión, pero este proceso aún no se ha completado. + + + Watch-only: + De observación: + + + Available: + Disponible: + + + Your current spendable balance + Su saldo disponible actual + + + Pending: + Pendiente: + + + Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance + Total de transacciones pendientes de confirmar y que aún no contribuye al saldo disponible + + + Immature: + No madurado: + + + Mined balance that has not yet matured + Saldo recién minado que aún no ha madurado. + + + Balances + Saldos + + + Total: + Total: + + + Your current total balance + Su saldo actual total + + + Your current balance in watch-only addresses + Su saldo actual en direcciones watch-only + + + Spendable: + Gastable: + + + Recent transactions + Transacciones recientes + + + Unconfirmed transactions to watch-only addresses + Transacciones sin confirmar en direcciones watch-only + + + Mined balance in watch-only addresses that has not yet matured + Saldo minado en direcciones watch-only que aún no ha madurado + + + Current total balance in watch-only addresses + Saldo total en las direcciones watch-only + + + + PaymentServer + + Payment request error + Fallo en la solicitud de pago + + + Cannot start bitcoin: click-to-pay handler + No se puede iniciar bitcoin: encargado click-para-pagar + + + URI handling + Manejo de URI + + + Payment request fetch URL is invalid: %1 + La búsqueda de solicitud de pago URL es válida: %1 + + + Invalid payment address %1 + Dirección de pago inválida %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + URI no puede ser analizado! Esto puede ser causado por una dirección Bitcoin inválida o parametros URI mal formados. + + + Payment request file handling + Manejo del archivo de solicitud de pago + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + ¡El archivo de solicitud de pago no puede ser leído! Esto puede ser causado por un archivo de solicitud de pago inválido. + + + Payment request rejected + Solicitud de pago rechazada + + + Payment request network doesn't match client network. + La red de solicitud de pago no cimbina la red cliente. + + + Payment request expired. + Solicitud de pago caducada. + + + Payment request is not initialized. + La solicitud de pago no se ha iniciado. + + + Unverified payment requests to custom payment scripts are unsupported. + Solicitudes de pago sin verificar a scripts de pago habitual no se soportan. + + + Invalid payment request. + Solicitud de pago inválida. + + + Requested payment amount of %1 is too small (considered dust). + Cantidad de pago solicitada de %1 es demasiado pequeña (considerado polvo). + + + Refund from %1 + Reembolsar desde %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Solicitud de pago de %1 es demasiado grande (%2 bytes, permitidos %3 bytes). + + + Error communicating with %1: %2 + Fallo al comunicar con %1: %2 + + + Payment request cannot be parsed! + ¡La solicitud de pago no puede ser analizada! + + + Bad response from server %1 + Mala respuesta desde el servidor %1 + + + Network request error + Fallo de solicitud de red + + + Payment acknowledged + Pago declarado + + + + PeerTableModel + + User Agent + User Agent + + + Node/Service + Nodo/Servicio + + + Ping Time + Ping + + + + QObject + + Amount + Cantidad + + + Enter a Bitcoin address (e.g. %1) + Introducir una dirección Bitcoin (p. ej. %1) + + + %1 d + %1 d + + + %1 h + %1 h + + + %1 m + %1 m + + + %1 s + %1 s + + + None + Ninguno + + + N/A + N/D + + + %1 ms + %1 ms + + + + QRImageWidget + + &Save Image... + &Guardar imagen... + + + &Copy Image + &Copiar imagen + + + Save QR Code + Guardar código QR + + + PNG Image (*.png) + Imagen PNG (*.png) + + + + RPCConsole + + N/A + N/D + + + Client version + Versión del cliente + + + &Information + &Información + + + Debug window + Ventana de depuración + + + General + General + + + Using BerkeleyDB version + Utilizando la versión de BerkeleyDB + + + Datadir + Datadir + + + Startup time + Hora de inicio + + + Network + Red + + + Name + Nombre + + + Number of connections + Número de conexiones + + + Block chain + Cadena de bloques + + + Current number of blocks + Número actual de bloques + + + Memory Pool + Piscina de Memoria + + + Current number of transactions + Número actual de transacciones + + + Memory usage + Uso de memoria + + + Received + Recibido + + + Sent + Enviado + + + &Peers + &Pares + + + Banned peers + Peers Bloqueados + + + Select a peer to view detailed information. + Seleccionar un par para ver su información detallada. + + + Whitelisted + En la lista blanca + + + Direction + Dirección + + + Version + Versión + + + Starting Block + Importando bloques... + + + Synced Headers + Sincronizar Cabeceras + + + Synced Blocks + Bloques Sincronizados + + + User Agent + User Agent + + + Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. + Abrir el archivo de depuración %1 desde el directorio de datos actual. Puede tardar unos segundos para ficheros de gran tamaño. + + + Decrease font size + Disminuir tamaño de letra + + + Increase font size + Aumentar tamaño de letra + + + Services + Servicios + + + Ban Score + Puntuación de bloqueo + + + Connection Time + Duración de la conexión + + + Last Send + Ultimo envío + + + Last Receive + Ultima recepción + + + Ping Time + Ping + + + The duration of a currently outstanding ping. + La duración de un ping actualmente en proceso. + + + Ping Wait + Espera de Ping + + + Time Offset + Desplazamiento de tiempo + + + Last block time + Hora del último bloque + + + &Open + &Abrir + + + &Console + &Consola + + + &Network Traffic + &Tráfico de Red + + + &Clear + &Vaciar + + + Totals + Total: + + + In: + Entrante: + + + Out: + Saliente: + + + Debug log file + Archivo de registro de depuración + + + Clear console + Borrar consola + + + &Disconnect Node + Nodo &Desconectado + + + Ban Node for + Prohibir Nodo para + + + 1 &hour + 1 &hora + + + 1 &day + 1 &día + + + 1 &week + 1 &semana + + + 1 &year + 1 &año + + + &Unban Node + &Desbanear Nodo + + + Welcome to the %1 RPC console. + Bienvenido a la consola RPC %1. + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Use las flechas arriba y abajo para navegar por el historial y <b>Control+L</b> para vaciar la pantalla. + + + Type <b>help</b> for an overview of available commands. + Escriba <b>help</b> para ver un resumen de los comandos disponibles. + + + %1 B + %1 B + + + %1 KB + %1 KB + + + %1 MB + %1 MB + + + %1 GB + %1 GB + + + (node id: %1) + (nodo: %1) + + + via %1 + via %1 + + + never + nunca + + + Inbound + Entrante + + + Outbound + Saliente + + + Yes + + + + No + No + + + Unknown + Desconocido + + + + ReceiveCoinsDialog + + &Amount: + Cantidad + + + &Label: + &Etiqueta: + + + &Message: + Mensaje: + + + Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before. + Reutilizar una de las direcciones previamente usadas para recibir. Reutilizar direcciones tiene problemas de seguridad y privacidad. No lo uses a menos que antes regeneres una solicitud de pago. + + + R&euse an existing receiving address (not recommended) + R&eutilizar una dirección existente para recibir (no recomendado) + + + An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network. + Un mensaje opcional para adjuntar a la solicitud de pago, que se muestra cuando se abre la solicitud. Nota: El mensaje no se enviará con el pago por la red Bitcoin. + + + An optional label to associate with the new receiving address. + Etiqueta opcional para asociar con la nueva dirección de recepción. + + + Use this form to request payments. All fields are <b>optional</b>. + Utilice este formulario para solicitar pagos. Todos los campos son <b>opcionales</b>. + + + An optional amount to request. Leave this empty or zero to not request a specific amount. + Para solicitar una cantidad opcional. Deje este vacío o cero para no solicitar una cantidad específica. + + + Clear all fields of the form. + Vaciar todos los campos del formulario. + + + Clear + Vaciar + + + Requested payments history + Historial de pagos solicitados + + + &Request payment + &Solicitar pago + + + Show the selected request (does the same as double clicking an entry) + Muestra la petición seleccionada (También doble clic) + + + Show + Mostrar + + + Remove the selected entries from the list + Borrar de la lista las direcciónes actualmente seleccionadas + + + Remove + Eliminar + + + Copy label + Copiar capa + + + Copy message + Copiar imagen + + + Copy amount + Copiar cantidad + + + + ReceiveRequestDialog + + QR Code + Código QR + + + Copy &URI + Copiar &URI + + + Copy &Address + Copiar &Dirección + + + &Save Image... + Guardar Imagen... + + + Request payment to %1 + Solicitar pago a %1 + + + Payment information + Información de pago + + + URI + URI + + + Address + Dirección + + + Amount + Cantidad + + + Label + Etiqueta + + + Message + Mensaje + + + Resulting URI too long, try to reduce the text for label / message. + URI resultante demasiado grande, trate de reducir el texto de etiqueta / mensaje. + + + Error encoding URI into QR Code. + Fallo al codificar URI en código QR. + + + + RecentRequestsTableModel + + Date + Fecha + + + Label + Etiqueta + + + Message + Mensaje + + + (no label) + (sin etiqueta) + + + (no message) + (no hay mensaje) + + + (no amount requested) + (no hay solicitud de cantidad) + + + Requested + Solicitado + + + + SendCoinsDialog + + Send Coins + Enviar bitcoins + + + Coin Control Features + Características de Coin Control + + + Inputs... + Entradas... + + + automatically selected + Seleccionado automáticamente + + + Insufficient funds! + Fondos insuficientes! + + + Quantity: + Cantidad: + + + Bytes: + Bytes: + + + Amount: + Cuantía: + + + Priority: + Prioridad: + + + Fee: + Tasa: + + + After Fee: + Después de tasas: + + + Change: + Cambio: + + + If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address. + Si se marca esta opción pero la dirección de cambio está vacía o es inválida, el cambio se enviará a una nueva dirección recién generada. + + + Custom change address + Dirección propia + + + Transaction Fee: + Comisión de Transacción: + + + Choose... + Elija... + + + collapse fee-settings + Colapsar ajustes de cuota + + + per kilobyte + por kilobyte + + + If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte. + Si la tarifa de aduana se establece en 1000 satoshis y la transacción está a sólo 250 bytes, entonces "por kilobyte" sólo paga 250 satoshis de cuota, mientras que "el mínimo total" pagaría 1.000 satoshis. Para las transacciones más grandes que un kilobyte ambos pagan por kilobyte + + + Hide + Ocultar + + + total at least + total por lo menos + + + Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process. + Pagando solamente la cuota mínima es correcto, siempre y cuando haya menos volumen de transacciones que el espacio en los bloques. Pero tenga en cuenta que esto puede terminar en una transacción nunca confirmada, una vez que haya más demanda para transacciones Bitcoin que la red pueda procesar. + + + (read the tooltip) + (leer la sugerencia) + + + Recommended: + Recomendado: + + + Custom: + Personalizado: + + + (Smart fee not initialized yet. This usually takes a few blocks...) + (Tarifa inteligente no inicializado aún. Esto generalmente lleva a pocos bloques...) + + + Confirmation time: + Tiempo de confirmación: + + + normal + normal + + + fast + rápido + + + Send to multiple recipients at once + Enviar a múltiples destinatarios de una vez + + + Add &Recipient + Añadir &destinatario + + + Clear all fields of the form. + Vaciar todos los campos del formulario + + + Dust: + Polvo: + + + Clear &All + Vaciar &todo + + + Balance: + Saldo: + + + Confirm the send action + Confirmar el envío + + + S&end + &Enviar + + + Copy quantity + Copiar cantidad + + + Copy amount + Copiar cantidad + + + Copy fee + Copiar cuota + + + Copy after fee + Copiar después de couta + + + Copy bytes + Copiar bytes + + + Copy priority + Copiar prioridad + + + Copy dust + Copiar polvo + + + Copy change + Copiar cambio + + + %1 to %2 + %1 a %2 + + + Are you sure you want to send? + ¿Seguro que quiere enviar? + + + added as transaction fee + añadido como transacción de cuota + + + Total Amount %1 + Cantidad total %1 + + + or + o + + + Confirm send coins + Confirmar enviar monedas + + + The recipient address is not valid. Please recheck. + La dirección de destinatario no es válida. Por favor revísela. + + + The amount to pay must be larger than 0. + La cantidad a pagar debe de ser mayor que 0. + + + The amount exceeds your balance. + La cantidad excede su saldo. + + + The total exceeds your balance when the %1 transaction fee is included. + El total excede su saldo cuando la cuota de transacción de %1 es incluida. + + + Duplicate address found: addresses should only be used once each. + Dirección duplicada encontrada: la dirección sólo debería ser utilizada una vez por cada uso. + + + Transaction creation failed! + ¡Falló la creación de transacción! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + ¡La transacción fue rechazada! Esto podría pasar si algunas de las monedas de su monedero fueron ya gastadas, así como si ha utilizado una copia del wallet.dat y las monedas fueron gastadas en la copia pero no marcadas como gastadas aquí. + + + A fee higher than %1 is considered an absurdly high fee. + Una couta mayor que %1 se considera una cuota irracionalmente alta. + + + Payment request expired. + Solicitud de pago caducada. + + + Pay only the required fee of %1 + Pagar únicamente la cuota solicitada de %1 + + + Estimated to begin confirmation within %n block(s). + Se estima que sea confirmado dentro del %n bloque(s).Se estima que sea confirmado dentro del %n bloque(s). + + + Warning: Invalid Bitcoin address + Alerta: dirección Bitcoin inválida + + + Warning: Unknown change address + Alerta: dirección cambiada desconocida + + + (no label) + (sin etiqueta) + + + + SendCoinsEntry + + A&mount: + Ca&ntidad: + + + Pay &To: + &Pagar a: + + + &Label: + &Etiqueta: + + + Choose previously used address + Escoger direcciones previamente usadas + + + This is a normal payment. + Esto es un pago ordinario. + + + The Bitcoin address to send the payment to + Dirección Bitcoin a la que enviar el pago + + + Alt+A + Alt+A + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + Alt+P + Alt+P + + + Remove this entry + Eliminar esta transacción + + + The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. + La cuota será deducida de la cantidad que sea mandada. El destinatario recibirá menos bitcoins de los que entres en el + + + S&ubtract fee from amount + Restar comisiones a la cantidad + + + Message: + Mensaje: + + + This is an unauthenticated payment request. + Esta es una petición de pago no autentificada. + + + This is an authenticated payment request. + Esta es una petición de pago autentificada. + + + Enter a label for this address to add it to the list of used addresses + Introduce una etiqueta para esta dirección para añadirla a la lista de direcciones utilizadas + + + A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. + Un mensaje que se adjuntó a la bitcoin: URL que será almacenada con la transacción para su referencia. Nota: Este mensaje no se envía a través de la red Bitcoin. + + + Pay To: + Paga a: + + + Memo: + Memo: + + + Enter a label for this address to add it to your address book + Introduzca una etiqueta para esta dirección para añadirla a su agenda + + + + SendConfirmationDialog + + Yes + + + + + ShutdownWindow + + %1 is shutting down... + %1 se esta cerrando... + + + Do not shut down the computer until this window disappears. + No apague el equipo hasta que desaparezca esta ventana. + + + + SignVerifyMessageDialog + + Signatures - Sign / Verify a Message + Firmas - Firmar / verificar un mensaje + + + &Sign Message + &Firmar mensaje + + + You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. + Puede firmar los mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa de manera vaga o aleatoria, pues los ataques de phishing pueden tratar de engañarle firmando su identidad a través de ellos. Sólo firme declaraciones totalmente detalladas con las que usted esté de acuerdo. + + + The Bitcoin address to sign the message with + Dirección Bitcoin con la que firmar el mensaje + + + Choose previously used address + Escoger dirección previamente usada + + + Alt+A + Alt+A + + + Paste address from clipboard + Pegar dirección desde portapapeles + + + Alt+P + Alt+P + + + Enter the message you want to sign here + Introduzca el mensaje que desea firmar aquí + + + Signature + Firma + + + Copy the current signature to the system clipboard + Copiar la firma actual al portapapeles del sistema + + + Sign the message to prove you own this Bitcoin address + Firmar el mensaje para demostrar que se posee esta dirección Bitcoin + + + Sign &Message + Firmar &mensaje + + + Reset all sign message fields + Vaciar todos los campos de la firma de mensaje + + + Clear &All + Vaciar &todo + + + &Verify Message + &Verificar mensaje + + + Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction! + Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle. + + + The Bitcoin address the message was signed with + La dirección Bitcoin con la que se firmó el mensaje + + + Verify the message to ensure it was signed with the specified Bitcoin address + Verificar el mensaje para comprobar que fue firmado con la dirección Bitcoin indicada + + + Verify &Message + Verificar &mensaje + + + Reset all verify message fields + Vaciar todos los campos de la verificación de mensaje + + + Click "Sign Message" to generate signature + Click en "Fírmar mensaje" para generar una firma + + + The entered address is invalid. + La dirección introducida no es válida. + + + Please check the address and try again. + Por favor revise la dirección e inténtelo de nuevo. + + + The entered address does not refer to a key. + La dirección introducida no remite a una clave. + + + Wallet unlock was cancelled. + El desbloqueo del monedero fue cancelado. + + + Private key for the entered address is not available. + La clave privada de la dirección introducida no está disponible. + + + Message signing failed. + Falló la firma del mensaje. + + + Message signed. + Mensaje firmado. + + + The signature could not be decoded. + La firma no pudo descodificarse. + + + Please check the signature and try again. + Por favor compruebe la firma y pruebe de nuevo. + + + The signature did not match the message digest. + La firma no se combinó con el mensaje. + + + Message verification failed. + Falló la verificación del mensaje. + + + Message verified. + Mensaje verificado. + + + + SplashScreen + + [testnet] + [testnet] + + + + TrafficGraphWidget + + KB/s + KB/s + + + + TransactionDesc + + Open for %n more block(s) + Abrir para %n más bloque(s)Abrir para %n más bloque(s) + + + Open until %1 + Abierto hasta %1 + + + conflicted with a transaction with %1 confirmations + Hay un conflicto con la traducción de las confirmaciones %1 + + + %1/offline + %1/sin conexión + + + 0/unconfirmed, %1 + 0/no confirmado, %1 + + + in memory pool + en el equipo de memoria + + + not in memory pool + no en el equipo de memoria + + + abandoned + abandonado + + + %1/unconfirmed + %1/no confirmado + + + %1 confirmations + confirmaciones %1 + + + Status + Estado + + + , has not been successfully broadcast yet + , no ha sido emitido con éxito aún + + + , broadcast through %n node(s) + , emisión a través de %n nodo(s), emisión a través de %n nodo(s) + + + Date + Fecha + + + Source + Fuente + + + Generated + Generado + + + From + Desde + + + unknown + desconocido + + + To + Para + + + own address + dirección propia + + + watch-only + de observación + + + label + etiqueta + + + Credit + Credito + + + matures in %n more block(s) + disponible en %n bloque(s) másdisponible en %n bloque(s) más + + + not accepted + no aceptada + + + Debit + Enviado + + + Total debit + Total enviado + + + Total credit + Total recibido + + + Transaction fee + Comisión de transacción + + + Net amount + Cantidad neta + + + Message + Mensaje + + + Comment + Comentario + + + Transaction ID + Identificador de transacción (ID) + + + Output index + Indice de salida + + + Merchant + Vendedor + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Los bitcoins generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a "no aceptado" y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo. + + + Debug information + Información de depuración + + + Transaction + Transacción + + + Inputs + entradas + + + Amount + Cantidad + + + true + verdadero + + + false + falso + + + + TransactionDescDialog + + This pane shows a detailed description of the transaction + Esta ventana muestra información detallada sobre la transacción + + + Details for %1 + Detalles para %1 + + + + TransactionTableModel + + Date + Fecha + + + Type + Tipo + + + Label + Etiqueta + + + Open for %n more block(s) + Abrir para %n bloque(s) másAbrir para %n bloque(s) más + + + Open until %1 + Abierto hasta %1 + + + Offline + Sin conexion + + + Unconfirmed + Sin confirmar + + + Abandoned + Abandonado + + + Confirming (%1 of %2 recommended confirmations) + Confirmando (%1 de %2 confirmaciones recomendadas) + + + Confirmed (%1 confirmations) + Confirmado (%1 confirmaciones) + + + Conflicted + En conflicto + + + Immature (%1 confirmations, will be available after %2) + No disponible (%1 confirmaciones. Estarán disponibles al cabo de %2) + + + This block was not received by any other nodes and will probably not be accepted! + Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado! + + + Generated but not accepted + Generado pero no aceptado + + + Received with + Recibido con + + + Received from + Recibidos de + + + Sent to + Enviado a + + + Payment to yourself + Pago proprio + + + Mined + Minado + + + watch-only + de observación + + + (n/a) + (nd) + + + (no label) + (sin etiqueta) + + + Transaction status. Hover over this field to show number of confirmations. + Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones. + + + Date and time that the transaction was received. + Fecha y hora en que se recibió la transacción. + + + Type of transaction. + Tipo de transacción. + + + Whether or not a watch-only address is involved in this transaction. + Si una dirección watch-only está involucrada en esta transacción o no. + + + User-defined intent/purpose of the transaction. + Descripción de la transacción definido por el usuario. + + + Amount removed from or added to balance. + Cantidad retirada o añadida al saldo. + + + + TransactionView + + All + Todo + + + Today + Hoy + + + This week + Esta semana + + + This month + Este mes + + + Last month + Mes pasado + + + This year + Este año + + + Range... + Rango... + + + Received with + Recibido con + + + Sent to + Enviado a + + + To yourself + A usted mismo + + + Mined + Minado + + + Other + Otra + + + Enter address or label to search + Introduzca una dirección o etiqueta que buscar + + + Min amount + Cantidad mínima + + + Abandon transaction + Transacción abandonada + + + Copy address + Copiar ubicación + + + Copy label + Copiar capa + + + Copy amount + Copiar cantidad + + + Copy transaction ID + Copiar ID de transacción + + + Copy raw transaction + Copiar transacción raw + + + Copy full transaction details + Copiar todos los detalles de la transacción + + + Edit label + Editar etiqueta + + + Show transaction details + Mostrar detalles de la transacción + + + Export Transaction History + Exportar historial de transacciones + + + Comma separated file (*.csv) + Archivo separado de coma (*.csv) + + + Confirmed + Confirmado + + + Watch-only + De observación + + + Date + Fecha + + + Type + Tipo + + + Label + Etiqueta + + + Address + Dirección + + + ID + ID + + + Exporting Failed + Falló la exportación + + + There was an error trying to save the transaction history to %1. + Ha habido un error al intentar guardar la transacción con %1. + + + Exporting Successful + Exportación finalizada + + + The transaction history was successfully saved to %1. + La transacción ha sido guardada en %1. + + + Range: + Rango: + + + to + para + + + + UnitDisplayStatusBarControl + + Unit to show amounts in. Click to select another unit. + Unidad en la que se muestran las cantidades. Haga clic para seleccionar otra unidad. + + + + WalletFrame + + No wallet has been loaded. + No se ha cargado ningún monedero + + + + WalletModel + + Send Coins + Enviar + + + + WalletView + + &Export + &Exportar + + + Export the data in the current tab to a file + Exportar a un archivo los datos de esta pestaña + + + Backup Wallet + Copia de seguridad del monedero + + + Wallet Data (*.dat) + Datos de monedero (*.dat) + + + Backup Failed + La copia de seguridad ha fallado + + + There was an error trying to save the wallet data to %1. + Ha habido un error al intentar guardar los datos del monedero en %1. + + + Backup Successful + Se ha completado con éxito la copia de respaldo + + + The wallet data was successfully saved to %1. + Los datos del monedero se han guardado con éxito en %1. + + + + bitcoin-core + + Options: + Opciones: + + + + Specify data directory + Especificar directorio para los datos + + + Connect to a node to retrieve peer addresses, and disconnect + Conectar a un nodo para obtener direcciones de pares y desconectar + + + Specify your own public address + Especifique su propia dirección pública + + + Accept command line and JSON-RPC commands + Aceptar comandos consola y JSON-RPC + + + + If <category> is not supplied or if <category> = 1, output all debugging information. + Si <category> no es proporcionado o si <category> =1, muestra toda la información de depuración. + + + Prune configured below the minimum of %d MiB. Please use a higher number. + La Poda se ha configurado por debajo del minimo de %d MiB. Por favor utiliza un valor mas alto. + + + Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node) + Poda: la ultima sincronizacion de la cartera sobrepasa los datos podados. Necesitas reindexar con -reindex (o descargar la cadena de bloques de nuevo en el caso de un nodo podado) + + + Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files) + Reduce los requisitos de almacenaje podando (eliminando) los bloques viejos. Este modo es incompatible con -txindex y -rescan. Advertencia: Revertir este ajuste requiere volver a descargar la cadena de bloques al completo. (predeterminado: 0 = deshabilitar la poda de bloques, >%u = objetivo de tamaño en MiB para usar para los archivos de bloques) + + + Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. + Nos es posible re-escanear en modo podado.Necesitas utilizar -reindex el cual descargara la cadena de bloques al completo de nuevo. + + + Error: A fatal internal error occurred, see debug.log for details + Un error interno fatal ocurrió, ver debug.log para detalles + + + Fee (in %s/kB) to add to transactions you send (default: %s) + Comisión (en %s/KB) para agregar a las transacciones que envíe (por defecto: %s) + + + Pruning blockstore... + Poda blockstore ... + + + Run in the background as a daemon and accept commands + Ejecutar en segundo plano como daemon y aceptar comandos + + + + Unable to start HTTP server. See debug log for details. + No se ha podido comenzar el servidor HTTP. Ver debug log para detalles. + + + Accept connections from outside (default: 1 if no -proxy or -connect) + Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect) + + + Bitcoin Core + Bitcoin Core + + + The %s developers + Los %s desarrolladores + + + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. + -fallbackfee tiene un ajuste muy alto! Esta es la comisión de transacción que pagarás cuando las estimaciones de comisiones no estén disponibles. + + + A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s) + Una comision (en %s/kB) que sera usada cuando las estimacion de comision no disponga de suficientes datos (predeterminado: %s) + + + Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d) + Aceptar transacciones retransmitidas recibidas desde nodos en la lista blanca incluso cuando no estés retransmitiendo transacciones (predeterminado: %d) + + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 + Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6 + + + Cannot obtain a lock on data directory %s. %s is probably already running. + No se puede bloquear el directorio %s. %s ya se está ejecutando. + + + Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup + Borrar todas las transacciones del monedero y sólo recuperar aquellas partes de la cadena de bloques por medio de -rescan on startup. + + + Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>. + Distribuido bajo la licencia de software MIT, vea la copia del archivo adjunto o <http://www.opensource.org/licenses/mit-license.php>. + + + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Bytes equivalentes por sigop en transacciones para retrasmisión y minado (predeterminado: %u) + + + Error loading %s: You can't enable HD on a already existing non-HD wallet + Error cargando %s: No puede habilitar HD en un monedero existente que no es HD + + + Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Error leyendo %s!. Todas las claves se han leido correctamente, pero los datos de transacciones o la libreta de direcciones pueden faltar o ser incorrectos. + + + Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) + Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID) + + + Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds) + Ajuste máximo permitido del tiempo offset medio de pares. La perspectiva local de tiempo se verá influenciada por los pares anteriores y posteriores a esta cantidad. (Por defecto: %u segundos) + + + Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s) + Máximas comisiones totales (en %s) para utilizar en una sola transacción de la cartera; establecer esto demasiado bajo puede abortar grandes transacciones (predeterminado: %s) + + + Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly. + Por favor, compruebe si la fecha y hora en su computadora son correctas! Si su reloj esta mal, %s no trabajara correctamente. + + + Please contribute if you find %s useful. Visit %s for further information about the software. + Contribuya si encuentra %s de utilidad. Visite %s para mas información acerca del programa. + + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) + Establecer el número de hilos (threads) de verificación de scripts (entre %u y %d, 0 = automático, <0 = dejar libres ese número de núcleos; predeterminado: %d) + + + The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct + La base de datos de bloques contiene un bloque que parece ser del futuro. Esto puede ser porque la fecha y hora de tu ordenador están mal ajustados. Reconstruye la base de datos de bloques solo si estas seguro de que la fecha y hora de tu ordenador estan ajustados correctamente. + + + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications + Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería. + + + Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain + No es posible reconstruir la base de datos a un estado anterior. Debe descargar de nuevo la cadena de bloques. + + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) + Utiliza UPnP para asignar el puerto de escucha (predeterminado: 1 cuando esta escuchando sin -proxy) + + + Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. + Atención: ¡Parece que la red no está totalmente de acuerdo! Algunos mineros están presentando inconvenientes. + + + Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. + Atención: ¡Parece que no estamos completamente de acuerdo con nuestros pares! Podría necesitar una actualización, u otros nodos podrían necesitarla. + + + Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. + Poner en lista blanca a los equipos que se conecten desde la máscara de subred o dirección IP especificada. Se puede especificar múltiples veces. + + + You need to rebuild the database using -reindex-chainstate to change -txindex + Necesita reconstruir la base de datos usando -reindex-chainstate para cambiar -txindex + + + %s corrupt, salvage failed + %s corrupto. Fracasó la recuperacion + + + -maxmempool must be at least %d MB + -maxmempool debe ser por lo menos de %d MB + + + <category> can be: + <category> puede ser: + + + Append comment to the user agent string + Adjunta un comentario a la linea de agente de usuario + + + Attempt to recover private keys from a corrupt wallet on startup + Intento de recuperar claves privadas de un monedero corrupto en arranque + + + Block creation options: + Opciones de creación de bloques: + + + Cannot resolve -%s address: '%s' + No se puede resolver -%s direccion: '%s' + + + Change index out of range + Cambio de indice fuera de rango + + + Connect only to the specified node(s) + Conectar sólo a los nodos (o nodo) especificados + + + Connection options: + Opciones de conexión: + + + Copyright (C) %i-%i + Copyright (C) %i-%i + + + Corrupted block database detected + Corrupción de base de datos de bloques detectada. + + + Debugging/Testing options: + Opciones de depuración/pruebas: + + + Do not load the wallet and disable wallet RPC calls + No cargar el monedero y desactivar las llamadas RPC del monedero + + + Do you want to rebuild the block database now? + ¿Quieres reconstruir la base de datos de bloques ahora? + + + Enable publish hash block in <address> + Activar publicar bloque .hash en <.Address> + + + Enable publish hash transaction in <address> + Activar publicar transacción .hash en <.Address> + + + Enable publish raw block in <address> + Habilita la publicacion de bloques en bruto en <direccion> + + + Enable publish raw transaction in <address> + Habilitar publicar transacción en rama en <dirección> + + + Enable transaction replacement in the memory pool (default: %u) + Habilita el reemplazamiento de transacciones en la piscina de memoria (predeterminado: %u) + + + Error initializing block database + Error al inicializar la base de datos de bloques + + + Error initializing wallet database environment %s! + Error al inicializar el entorno de la base de datos del monedero %s + + + Error loading %s + Error cargando %s + + + Error loading %s: Wallet corrupted + Error cargando %s: Monedero dañado + + + Error loading %s: Wallet requires newer version of %s + Error cargando %s: Monedero requiere un versión mas reciente de %s + + + Error loading %s: You can't disable HD on a already existing HD wallet + Error cargando %s: No puede deshabilitar HD en un monedero existente que ya es HD + + + Error loading block database + Error cargando base de datos de bloques + + + Error opening block database + Error al abrir base de datos de bloques. + + + Error: Disk space is low! + Error: ¡Espacio en disco bajo! + + + Failed to listen on any port. Use -listen=0 if you want this. + Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto. + + + Importing... + Importando... + + + Incorrect or no genesis block found. Wrong datadir for network? + Incorrecto o bloque de génesis no encontrado. Datadir equivocada para la red? + + + Initialization sanity check failed. %s is shutting down. + La inicialización de la verificación de validez falló. Se está apagando %s. + + + Invalid -onion address: '%s' + Dirección -onion inválida: '%s' + + + Invalid amount for -%s=<amount>: '%s' + Cantidad no valida para -%s=<amount>: '%s' + + + Invalid amount for -fallbackfee=<amount>: '%s' + Cantidad inválida para -fallbackfee=<amount>: '%s' + + + Keep the transaction memory pool below <n> megabytes (default: %u) + Mantener la memoria de transacciones por debajo de <n> megabytes (predeterminado: %u) + + + Loading banlist... + Cargando banlist... + + + Location of the auth cookie (default: data dir) + Ubicación de la cookie de autenticación (default: data dir) + + + Not enough file descriptors available. + No hay suficientes descriptores de archivo disponibles. + + + Only connect to nodes in network <net> (ipv4, ipv6 or onion) + Sólo conectar a nodos en redes <net> (ipv4, ipv6 o onion) + + + Print this help message and exit + Imprimir este mensaje de ayuda y salir + + + Print version and exit + Imprimir versión y salir + + + Prune cannot be configured with a negative value. + Pode no se puede configurar con un valor negativo. + + + Prune mode is incompatible with -txindex. + El modo recorte es incompatible con -txindex. + + + Rebuild chain state and block index from the blk*.dat files on disk + Reconstruir el estado de la cadena e indice de bloques a partir de los ficheros blk*.dat en disco + + + Rebuild chain state from the currently indexed blocks + Reconstruir el estado de la cadena a partir de los bloques indexados + + + Rewinding blocks... + Verificando bloques... + + + Set database cache size in megabytes (%d to %d, default: %d) + Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d) + + + Set maximum BIP141 block weight (default: %d) + Establecer peso máximo bloque BIP141 (predeterminado: %d) + + + Set maximum block size in bytes (default: %d) + Establecer tamaño máximo de bloque en bytes (predeterminado: %d) + + + Specify wallet file (within data directory) + Especificar archivo de monedero (dentro del directorio de datos) + + + Starting network threads... + Iniciando funciones de red... + + + The source code is available from %s. + El código fuente esta disponible desde %s. + + + Unable to bind to %s on this computer. %s is probably already running. + No se ha podido conectar con %s en este equipo. %s es posible que este todavia en ejecución. + + + Unsupported argument -benchmark ignored, use -debug=bench. + El argumento -benchmark no es soportado y ha sido ignorado, utiliza -debug=bench + + + Unsupported argument -debugnet ignored, use -debug=net. + Parámetros no compatibles -debugnet ignorados , use -debug = red. + + + Unsupported argument -tor found, use -onion. + Parámetros no compatibles -tor encontrados, use -onion . + + + Use UPnP to map the listening port (default: %u) + Usar UPnP para asignar el puerto de escucha (predeterminado:: %u) + + + User Agent comment (%s) contains unsafe characters. + El comentario del Agente de Usuario (%s) contiene caracteres inseguros. + + + Verifying blocks... + Verificando bloques... + + + Verifying wallet... + Verificando monedero... + + + Wallet %s resides outside data directory %s + El monedero %s se encuentra fuera del directorio de datos %s + + + Wallet debugging/testing options: + Opciones de depuración/pruebas de monedero: + + + Wallet needed to be rewritten: restart %s to complete + Es necesario reescribir el monedero: reiniciar %s para completar + + + Wallet options: + Opciones de monedero: + + + Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times + Permitir conexiones JSON-RPC de origen especificado. Válido para son una sola IP (por ejemplo 1.2.3.4), una red/máscara de red (por ejemplo 1.2.3.4/255.255.255.0) o una red/CIDR (e.g. 1.2.3.4/24). Esta opción se puede especificar varias veces + + + Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 + Ligar a las direcciones especificadas y poner en lista blanca a los equipos conectados a ellas. Usar la notación para IPv6 [host]:puerto. + + + Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces) + Ligar a las direcciones especificadas para escuchar por conexiones JSON-RPC. Usar la notación para IPv6 [host]:puerto. Esta opción se puede especificar múltiples veces (por defecto: ligar a todas las interfaces) + + + Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) + Crear nuevos archivos con permisos por defecto del sistema, en lugar de umask 077 (sólo efectivo con la funcionalidad de monedero desactivada) + + + Discover own IP addresses (default: 1 when listening and no -externalip or -proxy) + Descubra direcciones IP propias (por defecto: 1 cuando se escucha y nadie -externalip o -proxy) + + + Error: Listening for incoming connections failed (listen returned error %s) + Error: la escucha para conexiones entrantes falló (la escucha regresó el error %s) + + + Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) + Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje) + + + Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s) + Las comisiones (en %s/kB) mas pequeñas que esto se consideran como cero comisión para la retransmisión, minería y creación de la transacción (predeterminado: %s) + + + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Fuerza la retransmisión de transacciones desde nodos en la lista blanca incluso si violan la política de retransmisiones local (predeterminado: %d) + + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) + Si el pago de comisión no está establecido, incluir la cuota suficiente para que las transacciones comiencen la confirmación en una media de n bloques ( por defecto :%u) + + + Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions) + Cantidad no válida para -maxtxfee=<amount>: '%s' (debe ser por lo menos la cuota de comisión mínima de %s para prevenir transacciones atascadas) + + + Maximum size of data in data carrier transactions we relay and mine (default: %u) + El tamaño máximo de los datos en las operaciones de transporte de datos que transmitimos y el mio (default: %u) + + + Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect) + Consulta de direcciones pares mediante búsqueda de DNS, si bajo en direcciones (por defecto: 1 a menos que - conectar) + + + Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u) + Aleatorizar las credenciales para cada conexión proxy. Esto habilita la Tor stream isolation (por defecto: %u) + + + Set maximum size of high-priority/low-fee transactions in bytes (default: %d) + Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d) + + + The transaction amount is too small to send after the fee has been deducted + Monto de transacción muy pequeña luego de la deducción por comisión + + + This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard. + Este producto incluye software desarrollado por el OpenSSL Project para su uso en OpenSSL Toolkit <https://www.openssl.org/>, software de cifrado escrito por Eric Young y software UPnP escrito por Thomas Bernard. + + + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + Usar tras BIP32 la generación de llave determinística jerárquica (HD) . Solo tiene efecto durante el primer inicio/generación del monedero + + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway + A los equipos en lista blanca no se les pueden prohibir los ataques DoS y sus transacciones siempre son retransmitidas, incluso si ya están en el mempool, es útil por ejemplo para un gateway. + + + You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain + Necesitas reconstruir la base de datos utilizando -reindex para volver al modo sin recorte. Esto volverá a descargar toda la cadena de bloques + + + (default: %u) + (por defecto: %u) + + + Accept public REST requests (default: %u) + Aceptar solicitudes públicas en FERIADOS (por defecto: %u) + + + Automatically create Tor hidden service (default: %d) + Automáticamente crea el servicio Tor oculto (por defecto: %d) + + + Connect through SOCKS5 proxy + Conectar usando SOCKS5 proxy + + + Error reading from database, shutting down. + Error al leer la base de datos, cerrando. + + + Imports blocks from external blk000??.dat file on startup + Importa los bloques desde un archivo externo blk000?.dat + + + Information + Información + + + Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s) + Cantidad inválida para -paytxfee=<amount>: '%s' (debe ser por lo menos %s) + + + Invalid netmask specified in -whitelist: '%s' + Máscara de red inválida especificada en -whitelist: '%s' + + + Keep at most <n> unconnectable transactions in memory (default: %u) + Mantener como máximo <n> transacciones no conectables en memoria (por defecto: %u) + + + Need to specify a port with -whitebind: '%s' + Necesita especificar un puerto con -whitebind: '%s' + + + Node relay options: + Opciones de nodos de retransmisión: + + + RPC server options: + Opciones de servidor RPC: + + + Reducing -maxconnections from %d to %d, because of system limitations. + Reduciendo -maxconnections de %d a %d, debido a limitaciones del sistema. + + + Rescan the block chain for missing wallet transactions on startup + Rescanea la cadena de bloques para transacciones perdidas de la cartera + + + Send trace/debug info to console instead of debug.log file + Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log + + + Send transactions as zero-fee transactions if possible (default: %u) + Mandar transacciones como comisión-cero si es posible (por defecto: %u) + + + Show all debugging options (usage: --help -help-debug) + Muestra todas las opciones de depuración (uso: --help -help-debug) + + + Shrink debug.log file on client startup (default: 1 when no -debug) + Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug) + + + Signing transaction failed + Transacción falló + + + The transaction amount is too small to pay the fee + Cantidad de la transacción demasiado pequeña para pagar la comisión + + + This is experimental software. + Este software es experimental. + + + Tor control port password (default: empty) + Contraseña del puerto de control de Tor (predeterminado: vacio) + + + Tor control port to use if onion listening enabled (default: %s) + Puerto de control de Tor a utilizar si la escucha de onion esta activada (predeterminado: %s) + + + Transaction amount too small + Cantidad de la transacción demasiado pequeña + + + Transaction amounts must be positive + Las cantidades en las transacciones deben ser positivas + + + Transaction too large for fee policy + Operación demasiado grande para la política de tasas + + + Transaction too large + Transacción demasiado grande, intenta dividirla en varias. + + + Unable to bind to %s on this computer (bind returned error %s) + No es posible conectar con %s en este sistema (bind ha dado el error %s) + + + Upgrade wallet to latest format on startup + Actualizar el monedero al último formato al inicio + + + Username for JSON-RPC connections + Nombre de usuario para las conexiones JSON-RPC + + + + Warning + Aviso + + + Warning: unknown new rules activated (versionbit %i) + Advertencia: nuevas reglas desconocidas activadas (versionbit %i) + + + Whether to operate in a blocks only mode (default: %u) + Si se debe o no operar en un modo de solo bloques (predeterminado: %u) + + + Zapping all transactions from wallet... + Eliminando todas las transacciones del monedero... + + + ZeroMQ notification options: + Opciones de notificación ZeroQM: + + + Password for JSON-RPC connections + Contraseña para las conexiones JSON-RPC + + + + Execute command when the best block changes (%s in cmd is replaced by block hash) + Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque) + + + Allow DNS lookups for -addnode, -seednode and -connect + Permitir búsquedas DNS para -addnode, -seednode y -connect + + + Loading addresses... + Cargando direcciones... + + + (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) + (1 = mantener los meta datos de transacción, por ejemplo: propietario e información de pago, 2 = omitir los metadatos) + + + -maxtxfee is set very high! Fees this large could be paid on a single transaction. + -maxtxfee tiene un ajuste muy elevado! Comisiones muy grandes podrían ser pagadas en una única transaccion. + + + -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + -paytxfee tiene un valor muy elevado! La comisión de transacción que pagaras si envías una transaccion es alta. + + + Do not keep transactions in the mempool longer than <n> hours (default: %u) + No mantener transacciones en la memoria mas de <n> horas (predeterminado: %u) + + + Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s) + Las comisiones (en %s/kB) menores que esto son consideradas de cero comision para la creacion de transacciones (predeterminado: %s) + + + How thorough the block verification of -checkblocks is (0-4, default: %u) + Nivel de rigor en la verificación de bloques de -checkblocks (0-4; predeterminado: %u) + + + Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u) + Mantener el índice completo de transacciones, usado por la llamada rpc de getrawtransaction (por defecto: %u) + + + Number of seconds to keep misbehaving peers from reconnecting (default: %u) + Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: %u) + + + Output debugging information (default: %u, supplying <category> is optional) + Mostrar depuración (por defecto: %u, proporcionar <category> es opcional) + + + Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. + Error: argumento -socks encontrado. El ajuste de la versión SOCKS ya no es posible, sólo proxies SOCKS5 son compatibles. + + + Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. + El argumento no soportado -whitelistalwaysrelay ha sido ignorado, utiliza -whitelistrelay y/o -whitelistforcerelay. + + + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) + Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima (Por defecto: %s) + + + Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times + Nombre de usuario y hash de la contraseña para las conexiones JSON-RPC. El campo <userpw> tiene el formato: <USERNAME>:<SALT>$<HASH>. Se incluye un script python convencional en share/rpcuser. Esta opción puede ser especificada multiples veces + + + Warning: Unknown block versions being mined! It's possible unknown rules are in effect + Advertencia: Se están minando versiones de bloques desconocidas! Es posible que normas desconocidas estén activas + + + Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup. + Aviso: fichero de monedero corrupto, datos recuperados! Original %s guardado como %s en %s; si su balance de transacciones es incorrecto, debe restaurar desde una copia de seguridad. + + + (default: %s) + (predeterminado: %s) + + + Always query for peer addresses via DNS lookup (default: %u) + Siempre consultar direcciones de otros equipos por medio de DNS lookup (por defecto: %u) + + + How many blocks to check at startup (default: %u, 0 = all) + Cuántos bloques comprobar al iniciar (predeterminado: %u, 0 = todos) + + + Include IP addresses in debug output (default: %u) + Incluir direcciones IP en la salida de depuración (por defecto: %u) + + + Invalid -proxy address: '%s' + Dirección -proxy inválida: '%s' + + + Listen for JSON-RPC connections on <port> (default: %u or testnet: %u) + Escuchar conexiones JSON-RPC en <puerto> (predeterminado: %u o testnet: %u) + + + Listen for connections on <port> (default: %u or testnet: %u) + Escuchar conexiones en <puerto> (predeterminado: %u o testnet: %u) + + + Maintain at most <n> connections to peers (default: %u) + Mantener como máximo <n> conexiones a pares (predeterminado: %u) + + + Make the wallet broadcast transactions + Realiza las operaciones de difusión del monedero + + + Maximum per-connection receive buffer, <n>*1000 bytes (default: %u) + Búfer de recepción máximo por conexión, <n>*1000 bytes (por defecto: %u) + + + Maximum per-connection send buffer, <n>*1000 bytes (default: %u) + Búfer de recepción máximo por conexión, , <n>*1000 bytes (por defecto: %u) + + + Prepend debug output with timestamp (default: %u) + Anteponer marca temporal a la información de depuración (por defecto: %u) + + + Relay and mine data carrier transactions (default: %u) + Retransmitir y minar transacciones de transporte de datos (por defecto: %u) + + + Relay non-P2SH multisig (default: %u) + Relay non-P2SH multisig (default: %u) + + + Set key pool size to <n> (default: %u) + Ajustar el número de claves en reserva <n> (predeterminado: %u) + + + Set the number of threads to service RPC calls (default: %d) + Establecer el número de procesos para llamadas del servicio RPC (por defecto: %d) + + + Specify configuration file (default: %s) + Especificar archivo de configuración (por defecto: %s) + + + Specify connection timeout in milliseconds (minimum: 1, default: %d) + Especificar tiempo de espera de la conexión (mínimo: 1, por defecto: %d) + + + Specify pid file (default: %s) + Especificar archivo pid (predeterminado: %s) + + + Spend unconfirmed change when sending transactions (default: %u) + Usar cambio aún no confirmado al enviar transacciones (predeterminado: %u) + + + Threshold for disconnecting misbehaving peers (default: %u) + Umbral para la desconexión de pares con mal comportamiento (predeterminado: %u) + + + Unknown network specified in -onlynet: '%s' + La red especificada en -onlynet '%s' es desconocida + + + Insufficient funds + Fondos insuficientes + + + Loading block index... + Cargando el índice de bloques... + + + Add a node to connect to and attempt to keep the connection open + Añadir un nodo al que conectarse y tratar de mantener la conexión abierta + + + Loading wallet... + Cargando monedero... + + + Cannot downgrade wallet + No se puede cambiar a una versión mas antigua el monedero + + + Cannot write default address + No se puede escribir la dirección predeterminada + + + Rescanning... + Reexplorando... + + + Done loading + Se terminó de cargar + + + Error + Error + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts index 5d2423eef11..e65d4e6e474 100644 --- a/src/qt/locale/bitcoin_et.ts +++ b/src/qt/locale/bitcoin_et.ts @@ -41,10 +41,78 @@ &Delete &Kustuta - + + Choose the address to send coins to + Vali aadress millele mündid saata + + + Choose the address to receive coins with + Vali aadress müntide vastuvõtmiseks + + + C&hoose + V&ali + + + Sending addresses + Saatvad aadressid + + + Receiving addresses + Vastuvõtvad aadressid + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Need on sinu Bitcoin aadressid maksete saatmiseks. Ennem müntide saatmist kontrolli alati summat ja makse saaja aadressi. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Need on sinu Bitcoin aadressid sisenevate maksete vastu võtmiseks. Soovitav on iga tehingu tarbeks kasutada uut aadressi. + + + &Copy Address + &Kopeeri Aadress + + + Copy &Label + Kopeeri &Silt + + + &Edit + &Muuda + + + Export Address List + Ekspordi Aadresside Nimekiri + + + Comma separated file (*.csv) + Komadega eraldatud väärtuste fail (*.csv) + + + Exporting Failed + Eksport ebaõnnestus. + + + There was an error trying to save the address list to %1. Please try again. + Tõrge aadressi nimekirja salvestamisel %1. Palun proovi uuesti. + + AddressTableModel - + + Label + Märge + + + Address + Aadress + + + (no label) + (märge puudub) + + AskPassphraseDialog @@ -63,7 +131,87 @@ Repeat new passphrase Korda salafraasi - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Sisesta uus salafraas rahakotti.<br/>Kasuta salafraasi millles on<b>kümme või rohkem juhuslikku sümbolit<b>,või<b>kaheksa või rohkem sõna<b/>. + + + Encrypt wallet + Krüpteeri rahakott + + + This operation needs your wallet passphrase to unlock the wallet. + Antud operatsioon vajab rahakoti lahtilukustamiseks salafraasi. + + + Unlock wallet + Ava rahakoti lukk + + + This operation needs your wallet passphrase to decrypt the wallet. + Antud operatsioon vajab rahakoti dekrüpteerimiseks salafraasi. + + + Decrypt wallet + Dekrüpteeri rahakott + + + Change passphrase + Vaheta salafraasi + + + Enter the old passphrase and new passphrase to the wallet. + Sisesta vana salafraas ja uus salafraas rahakotti. + + + Confirm wallet encryption + Kinnita rahakoti krüpteerimine. + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Hoiatus:Kui sa krüpteerid oma rahakoti ja kaotad salafraasi, siis sa<b>KAOTAD OMA BITCOINID</b>! + + + Are you sure you wish to encrypt your wallet? + Kas oled kindel, et soovid rahakoti krüpteerida? + + + Wallet encrypted + Rahakott krüpteeritud + + + Wallet encryption failed + Rahakoti krüpteerimine ebaõnnestus + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Rahakoti krüpteerimine ebaõnnestus sisemise tõrke tõttu. Sinu rahakott ei ole krüpteeritud. + + + The supplied passphrases do not match. + Sisestatud salafraasid ei kattu. + + + Wallet unlock failed + Rahakoti lahtilukustamine ebaõnnestus + + + The passphrase entered for the wallet decryption was incorrect. + Rahakoti dekrüpteerimiseks sisestatud salafraas ei ole õige. + + + Wallet decryption failed + Rahakoti dekrüpteerimine ebaõnnestus + + + Wallet passphrase was successfully changed. + Rahakoti salafraas on edukalt vahetatud. + + + Warning: The Caps Lock key is on! + Hoiatus:Klaviatuuri suurtähelukk on peal. + + BanTableModel @@ -102,6 +250,10 @@ Väljumine + &About %1 + &Teave %1 + + About &Qt Teave &Qt kohta @@ -147,7 +299,7 @@ &Debug window - &Debugimise aken + &Silumise aken Open debugging and diagnostic console @@ -171,7 +323,7 @@ &Receive - &Saama + &Võta vastu &Show / Hide @@ -210,10 +362,38 @@ Vahelehe tööriistariba + Request payments (generates QR codes and bitcoin: URIs) + Loo maksepäring (genereerib QR koodid ja bitcoini: URId) + + + Open a bitcoin: URI or payment request + Ava bitcoini: URI või maksepäring + + &Command-line options Käsurea valikud + %n active connection(s) to Bitcoin network + %n aktiivne ühendus Bitcoini võrku%n aktiivset ühendust Bitcoini võrku + + + Indexing blocks on disk... + Kõvakettal olevate plokkide indekseerimine... + + + Processing blocks on disk... + Kõvakettal olevate plokkide töötlemine... + + + No block source available... + Plokkide allikas pole saadaval... + + + Processed %n block(s) of transaction history. + Töödeldud %n plokk transaktsioonide ajaloost.Töödeldud %n plokki transaktsioonide ajaloost. + + %n hour(s) %n tund%n tundi @@ -262,8 +442,12 @@ Ajakohane + %1 client + %1 klient + + Catching up... - Jõuan... + Jõuan järgi... Date: %1 @@ -319,26 +503,182 @@ Kogus: + Bytes: + Baiti: + + Amount: Summa: + Priority: + Prioriteet + + Fee: Tasu: + Dust: + Puru: + + + After Fee: + Peale tehingutasu: + + + Change: + Vahetusraha: + + + Tree mode + Puu režiim + + + List mode + Loetelu režiim + + Amount Kogus + Received with label + Vastuvõetud märgisega + + + Received with address + Vastuvõetud aadressiga + + Date Kuupäev + Confirmations + Kinnitused + + Confirmed Kinnitatud - + + Priority + Prioriteet + + + Copy address + Kopeeri aadress + + + Copy label + Kopeeri märgis + + + Copy amount + Kopeeri summa + + + Copy transaction ID + Kopeeri tehingu ID + + + Copy quantity + Kopeeri kogus + + + Copy fee + Kopeeri tehingutasu + + + Copy bytes + Kopeeri baidid + + + Copy priority + Kopeeri prioriteet + + + Copy dust + Kopeeri puru + + + Copy change + Kopeeri vahetusraha + + + highest + kõrgeim + + + higher + kõrgem + + + high + kõrge + + + medium-high + keskmiselt kõrge + + + medium + keskmine + + + low-medium + keskmiselt madal + + + low + madal + + + lower + madalam + + + lowest + madalaim + + + (%1 locked) + (%1 lukustatud) + + + none + puudub + + + yes + jah + + + no + ei + + + This label turns red if the transaction size is greater than 1000 bytes. + Märgis muutub punaseks kui transaktsiooni suurus ületab 1000 baiti. + + + This means a fee of at least %1 per kB is required. + See tähendab, et vajalik tehingutasu on vähemalt %1 kB kohta + + + This label turns red if the priority is smaller than "medium". + See märgis muutud punaseks kui prioriteet on madalam kui "keskmine". + + + (no label) + (märgis puudub) + + + (change) + (vahetusraha) + + EditAddressDialog @@ -353,7 +693,39 @@ &Address &Aadress - + + New receiving address + Uus vastu võttev aadress + + + New sending address + Uus saatev aadress + + + Edit receiving address + Muuda vastuvõtvat aadressi + + + Edit sending address + Muuda saatvat aadressi + + + The entered address "%1" is not a valid Bitcoin address. + Sisestatud aadress "%1" ei ole korrektne Bitcoin aadress. + + + The entered address "%1" is already in the address book. + Sisestatud aadress "%1" on juba aadressi raamatus. + + + Could not unlock wallet. + Rahakoti lahtilukustamine ebaõnnestus. + + + New key generation failed. + Uue võtme genereerimine ebaõnnestus. + + FreespaceChecker @@ -379,6 +751,14 @@ command-line options käsurea valikud + + UI Options: + Kasutajaliidese Suvandid: + + + Show splash screen on startup (default: %u) + Käivitamisel kuva laadimisekraani (vaikimisi %u) + Intro @@ -401,7 +781,15 @@ URI: URI: - + + Select payment request file + Vali maksepäringu fail + + + Select payment request file to open + Vali maksepäringu fail mida avada + + OptionsDialog @@ -501,6 +889,10 @@ vaikeväärtus + none + puudub + + Confirm options reset Kinnita valikute algseadistamine @@ -520,6 +912,10 @@ Kuvatav info ei pruugi olla ajakohane. Ühenduse loomisel süngitakse sinu rahakott automaatselt Bitconi võrgustikuga, kuid see toiming on hetkel lõpetamata. + Pending: + Ootel: + + Immature: Ebaküps: @@ -528,12 +924,32 @@ Mitte aegunud mine'itud jääk + Total: + Kokku: + + Recent transactions Hiljutised tehingud PaymentServer + + Payment request error + Maksepäringu tõrge + + + Payment request rejected + Maksepäring tagasi lükatud + + + Payment request expired. + Maksepäring aegunud. + + + Unverified payment requests to custom payment scripts are unsupported. + Kinnitamata maksepäringud kohandatud makse scriptidele ei ole toetatud. + PeerTableModel @@ -551,6 +967,10 @@ QRImageWidget + + Save QR Code + Salvesta QR Kood + RPCConsole @@ -575,6 +995,10 @@ Üldine + Using BerkeleyDB version + Kasutab BerkeleyDB versiooni + + Startup time Käivitamise hetk @@ -599,6 +1023,10 @@ Plokkide hetkearv + Memory usage + Mälu kasutus + + Received Vastuvõetud @@ -615,6 +1043,14 @@ Versioon + Synced Headers + Sünkroniseeritud Päised + + + Synced Blocks + Sünkroniseeritud Plokid + + Services Teenused @@ -632,7 +1068,7 @@ Debug log file - Debugimise logifail + Silumise logifail Clear console @@ -662,7 +1098,27 @@ %1 GB %1 GB - + + Inbound + Sisenev + + + Outbound + Väljuv + + + Yes + Jah + + + No + Ei + + + Unknown + Teadmata + + ReceiveCoinsDialog @@ -678,6 +1134,10 @@ &Sõnum: + Clear all fields of the form. + Puhasta kõik vormi väljad. + + Show Näita @@ -685,16 +1145,76 @@ Remove Eemalda - + + Copy label + Kopeeri märgis + + + Copy message + Kopeeri sõnum + + + Copy amount + Kopeeri summa + + ReceiveRequestDialog + QR Code + QR Kood + + Copy &Address &Kopeeri Aadress + + Payment information + Makse Informatsioon + + + Address + Aadress + + + Amount + Summa + + + Label + Silt + + + Message + Sõnum + + + Resulting URI too long, try to reduce the text for label / message. + URI liiga pikk, proovi vähendada märke / sõnumi pikkust. + RecentRequestsTableModel + + Date + Kuupäev + + + Label + Silt + + + Message + Sõnum + + + (no label) + (märge puudub) + + + (no message) + (sõnum puudub) + SendCoinsDialog @@ -703,6 +1223,14 @@ Müntide saatmine + Inputs... + Sisendid... + + + automatically selected + automaatselt valitud + + Insufficient funds! Liiga suur summa @@ -711,14 +1239,30 @@ Kogus: + Bytes: + Baiti: + + Amount: Summa: + Priority: + Prioriteet + + Fee: Tasu: + After Fee: + Peale tehingutasu: + + + Change: + Vahetusraha: + + Transaction Fee: Tehingu tasu: @@ -727,6 +1271,10 @@ Vali... + per kilobyte + kilobaidi kohta + + Hide Peida @@ -735,6 +1283,10 @@ Soovitatud: + Confirmation time: + Kinnitamise aeg: + + normal normaalne @@ -751,6 +1303,14 @@ Lisa &Saaja + Clear all fields of the form. + Puhasta kõik vormi väljad. + + + Dust: + Puru: + + Clear &All Puhasta &Kõik @@ -766,7 +1326,63 @@ S&end S&aada - + + Copy quantity + Kopeeri kogus + + + Copy amount + Kopeeri summa + + + Copy fee + Kopeeri tehingutasu + + + Copy bytes + Kopeeri baidid + + + Copy priority + Kopeeri prioriteet + + + Copy dust + Kopeeri puru + + + Copy change + Kopeeri vahetusraha + + + Are you sure you want to send? + Oled kindel, et soovid saata? + + + added as transaction fee + lisatud kui tehingutasu + + + or + või + + + The recipient address is not valid. Please recheck. + Saaja aadress ei ole korrektne. Palun kontrolli üle. + + + Payment request expired. + Maksepäring aegunud. + + + Warning: Invalid Bitcoin address + Hoiatus: Ebakorrektne Bitcoin aadress + + + (no label) + (märgis puudub) + + SendCoinsEntry @@ -782,6 +1398,10 @@ &Märgis + Choose previously used address + Vali eelnevalt kasutatud aadress + + Alt+A Alt+A @@ -794,6 +1414,10 @@ Alt+P + S&ubtract fee from amount + L&ahuta tehingutasu summast + + Message: Sõnum: @@ -804,10 +1428,22 @@ SendConfirmationDialog - + + Yes + Jah + + ShutdownWindow - + + %1 is shutting down... + %1 lülitub välja... + + + Do not shut down the computer until this window disappears. + Ära lülita arvutit välja ennem kui see aken on kadunud. + + SignVerifyMessageDialog @@ -819,6 +1455,14 @@ &Allkirjastamise teade + The Bitcoin address to sign the message with + Bitcoin aadress millega sõnum allkirjastada + + + Choose previously used address + Vali eelnevalt kasutatud aadress + + Alt+A Alt+A @@ -863,6 +1507,10 @@ &Kinnita Sõnum + The Bitcoin address the message was signed with + Bitcoin aadress millega sõnum on allkirjastatud + + Verify the message to ensure it was signed with the specified Bitcoin address Kinnita sõnum tõestamaks selle allkirjastatust määratud Bitcoini aadressiga. @@ -874,7 +1522,55 @@ Reset all verify message fields Tühjenda kõik sõnumi kinnitamise väljad - + + Click "Sign Message" to generate signature + Allkirja loomiseks vajuta "Allkirjasta Sõnum" + + + The entered address is invalid. + Sisestatud aadress ei ole korrektne + + + Please check the address and try again. + Palun kontrolli aadressi ja proovi uuesti. + + + Wallet unlock was cancelled. + Rahakoti lahtilukustamine on katkestatud. + + + Private key for the entered address is not available. + Sisestatud aadressi privaatvõti pole saadaval. + + + Message signing failed. + Sõnumi allkirjastamine ebaõnnestus. + + + Message signed. + Sõnum allkirjastatud + + + The signature could not be decoded. + Allkirja polnud võimalik dekodeerida. + + + Please check the signature and try again. + Palun kontrolli allkirja ja proovi uuesti. + + + The signature did not match the message digest. + Allkiri ei vastanud sõnumi krüptoräsile. + + + Message verification failed. + Sõnumi verifitseerimine ebaõnnestus. + + + Message verified. + Sõnum verifitseeritud. + + SplashScreen @@ -891,7 +1587,67 @@ TransactionDesc - + + %1/unconfirmed + %1/kinnitamata + + + %1 confirmations + %1 kinnitust + + + Status + Olek + + + Date + Kuupäev + + + Generated + Genereeritud + + + label + märgis + + + not accepted + pole vastu võetud + + + Transaction fee + Tehingutasu + + + Message + Sõnum + + + Comment + Kommentaar + + + Merchant + Kaupleja + + + Inputs + Sisendid + + + Amount + Summa + + + true + tõene + + + false + väär + + TransactionDescDialog @@ -901,9 +1657,105 @@ TransactionTableModel + + Date + Kuupäev + + + Type + Tüüp + + + Label + Silt + + + Unconfirmed + Kinnitamata + + + (no label) + (silt puudub) + TransactionView + + All + Kõik + + + Today + Täna + + + This week + Käesolev nädal + + + This month + Käesolev kuu + + + Last month + Eelmine kuu + + + This year + Käesolev aasta + + + Range... + Vahemik... + + + Min amount + Minimaalne summa + + + Copy address + Kopeeri aadress + + + Copy label + Kopeeri märgis + + + Copy amount + Kopeeri summa + + + Copy transaction ID + Kopeeri tehingu ID + + + Comma separated file (*.csv) + Komadega eraldatud väärtuste fail (*.csv) + + + Date + Kuupäev + + + Type + Tüüp + + + Label + Silt + + + Address + Aadress + + + ID + ID + + + Exporting Failed + Eksport ebaõnnestus. + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts index a02c2dd9a93..5a31ff591a7 100644 --- a/src/qt/locale/bitcoin_fa.ts +++ b/src/qt/locale/bitcoin_fa.ts @@ -41,10 +41,50 @@ &Delete &حذف + + Choose the address to send coins to + آدرس مورد نظر برای ارسال کوین ها را انتخاب کنید + + + Choose the address to receive coins with + آدرس موردنظر برای دریافت کوین ها را انتخاب کنید. + + + C&hoose + انتخاب + + + Sending addresses + آدرس های فرستنده + + + Receiving addresses + آدرس های گیرنده + + + Copy &Label + کپی و برچسب‌&گذاری + + + &Edit + &ویرایش + AddressTableModel - + + Label + برچسب + + + Address + آدرس + + + (no label) + (بدون برچسب) + + AskPassphraseDialog @@ -63,7 +103,55 @@ Repeat new passphrase تکرار گذرواژهٔ جدید - + + Encrypt wallet + رمزنگاری کیف پول + + + Unlock wallet + باز کردن قفل کیف پول + + + Decrypt wallet + رمزگشایی کیف پول + + + Confirm wallet encryption + تأیید رمزنگاری کیف پول + + + Are you sure you wish to encrypt your wallet? + آیا مطمئن هستید که می‌خواهید کیف پول خود را رمزنگاری کنید؟ + + + Wallet encrypted + کیف پول رمزنگاری شد + + + Wallet encryption failed + رمزنگاری کیف پول با شکست مواجه شد + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + رمزنگاری کیف پول بنا به یک خطای داخلی با شکست مواجه شد. کیف پول شما رمزنگاری نشد. + + + Wallet unlock failed + بازگشایی قفل کیف‌پول با شکست مواجه شد + + + Wallet decryption failed + رمزگشایی کیف پول با شکست مواجه شد + + + Wallet passphrase was successfully changed. + گذرواژهٔ کیف پول با موفقیت عوض شد. + + + Warning: The Caps Lock key is on! + هشدار: کلید Caps Lock روشن است! + + BanTableModel @@ -134,6 +222,10 @@ &تنظیمات... + Modify configuration options for %1 + تغییر تنظیمات %1 + + &Encrypt Wallet... &رمزنگاری کیف پول... @@ -238,6 +330,10 @@ نوارابزار برگه‌ها + Request payments (generates QR codes and bitcoin: URIs) + درخواست پرداخت ( تولید کد کیوار و ادرس بیت کوین) + + Show the list of used sending addresses and labels نمایش لیست آدرس های ارسال و لیبل ها @@ -258,10 +354,18 @@ %n ارتباط فعال با شبکهٔ بیت‌کوین + Processing blocks on disk... + پردازش بلوک‌ها روی دیسک... + + No block source available... منبعی برای دریافت بلاک در دسترس نیست... + Processed %n block(s) of transaction history. + پردازش %n بلاک از تاریخچه ی تراکنش ها + + %n hour(s) %n ساعت @@ -434,7 +538,99 @@ Priority اولویت - + + Copy label + کپی برچسب + + + Copy amount + کپی مقدار + + + Copy transaction ID + کپی شناسهٔ تراکنش + + + Lock unspent + قفل کردن خرج نشده ها + + + Unlock unspent + بازکردن قفل خرج نشده ها + + + Copy quantity + کپی تعداد + + + highest + بیشترین + + + higher + بیشتر + + + high + زیاد + + + medium-high + متوسط رو به بالا + + + medium + متوسط + + + low-medium + متوسط متمایل به کم + + + low + کم + + + lower + کمتر + + + lowest + کمترین + + + (%1 locked) + (%1 قفل شده) + + + none + هیچکدام + + + yes + بله + + + no + خیر + + + This label turns red if the transaction size is greater than 1000 bytes. + اگر حجم تراکنش از 1000 بایت بیشتر شود برچسب قرمز می شود. + + + Can vary +/- 1 byte per input. + ممکن است +/- 1 بایت در ورودی تفاوت داشته باشد. + + + (no label) + (بدون برچسب) + + + (change) + (تغییر) + + EditAddressDialog @@ -449,6 +645,34 @@ &Address &نشانی + + New receiving address + نشانی گیرنده جدید + + + New sending address + نشانی فرستنده جدید + + + Edit receiving address + ویرایش آدرس گیرنده + + + Edit sending address + ویرایش آدرس قرستنده + + + The entered address "%1" is not a valid Bitcoin address. + نشانی وارد شده "%1" یک نشانی معتبر بیت‌کوین نیست. + + + The entered address "%1" is already in the address book. + نشانی وارد شده «%1» در حال حاضر در دفترچه وجود دارد. + + + Could not unlock wallet. + نمی‌توان کیف پول را رمزگشایی کرد. + FreespaceChecker @@ -500,6 +724,18 @@ گزینه‌های رابط کاربری: + Set language, for example "de_DE" (default: system locale) + زبان را تنظیم کنید؛ برای مثال «de_DE» (پیشفرض: زبان سیستم) + + + Start minimized + شروع برنامه به صورت کوچک‌شده + + + Set SSL root certificates for payment request (default: -system-) + تنظیم گواهی ریشه SSl برای درخواست پرداخت (پیشفرض: -system-) + + Show splash screen on startup (default: %u) نمایش پنجرهٔ خوشامدگویی در ابتدای اجرای برنامه (پیش‌فرض: %u) @@ -538,6 +774,14 @@ بازکردن آدرس + Open payment request from URI or file + بازکردن درخواست پرداخت از آدرس یا فایل + + + URI: + آدرس اینترنتی: + + Select payment request file انتخاب فایل درخواست پرداخت @@ -553,6 +797,10 @@ &عمومی + Automatically start %1 after logging in to the system. + اجرای خودکار %1 بعد زمان ورود به سیستم. + + MB مگابایت @@ -981,7 +1229,15 @@ Remove حذف کردن - + + Copy label + کپی برچسب + + + Copy amount + کپی مقدار + + ReceiveRequestDialog @@ -996,9 +1252,25 @@ &Save Image... &ذخیره عکس... + + Address + آدرس + + + Label + برچسب + RecentRequestsTableModel + + Label + برچسب + + + (no label) + (بدون برچسب) + SendCoinsDialog @@ -1114,7 +1386,19 @@ S&end &ارسال - + + Copy quantity + کپی تعداد + + + Copy amount + کپی مقدار + + + (no label) + (بدون برچسب) + + SendCoinsEntry @@ -1285,9 +1569,37 @@ TransactionTableModel + + Label + برچسب + + + (no label) + (بدون برچسب) + TransactionView + + Copy label + کپی برچسب + + + Copy amount + کپی مقدار + + + Copy transaction ID + کپی شناسهٔ تراکنش + + + Label + برچسب + + + Address + آدرس + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index 4d33a58bf1e..30a9fa3c0c5 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -91,7 +91,7 @@ Exporting Failed - L'exportation a échoué + Échec d'exportation There was an error trying to save the address list to %1. Please try again. @@ -133,7 +133,7 @@ Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. - Saisissez une nouvelle phrase de passe pour le portefeuille.<br/>Veuillez utiliser une phrase composée de <b>dix caractères aléatoires ou plus</b>, ou bien de <b>huit mots ou plus</b>. + Saisissez la nouvelle phrase de passe du porte-monnaie.<br/>Veuillez utiliser une phrase de passe composée de <b>dix caractères aléatoires ou plus</b>, ou de <b>huit mots ou plus</b>. Encrypt wallet @@ -159,7 +159,67 @@ Change passphrase Changer la phrase de passe - + + Enter the old passphrase and new passphrase to the wallet. + Saisir l'ancienne puis la nouvelle phrase de passe du porte-monnaie. + + + Confirm wallet encryption + Confirmer le chiffrement du porte-monnaie + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Avertissement : si vous chiffrez votre porte-monnaie et perdez votre phrase de passe, vous <b>PERDREZ TOUS VOS BITCOINS</b> ! + + + Are you sure you wish to encrypt your wallet? + Voulez-vous vraiment chiffrer votre porte-monnaie ? + + + Wallet encrypted + Le porte-monnaie est chiffré + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 va maintenant se fermer pour terminer le processus de chiffrement. Souvenez-vous que le chiffrement de votre porte-monnaie ne peut pas protéger entièrement vos bitcoins contre le vol par des logiciels malveillants qui infecteraient votre ordinateur. + + + 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. + IMPORTANT : toutes les sauvegardes précédentes du fichier de votre porte-monnaie devraient être remplacées par le fichier du porte-monnaie chiffré nouvellement généré. Pour des raisons de sécurité, les sauvegardes précédentes de votre fichier de porte-monnaie non chiffré deviendront inutilisables dès que vous commencerez à utiliser le nouveau porte-monnaie chiffré. + + + Wallet encryption failed + Échec de chiffrement du porte-monnaie + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Le chiffrement du porte-monnaie a échoué en raison d'une erreur interne. Votre porte-monnaie n'a pas été chiffré. + + + The supplied passphrases do not match. + Les phrases de passe saisies ne correspondent pas. + + + Wallet unlock failed + Échec de déverrouillage du porte-monnaie + + + The passphrase entered for the wallet decryption was incorrect. + La phrase de passe saisie pour déchiffrer le porte-monnaie était erronée. + + + Wallet decryption failed + Échec de déchiffrement du porte-monnaie + + + Wallet passphrase was successfully changed. + La phrase de passe du porte-monnaie a été modifiée avec succès. + + + Warning: The Caps Lock key is on! + Avertissement : la touche Verr. Maj. est activée ! + + BanTableModel @@ -175,7 +235,7 @@ BitcoinGUI Sign &message... - &Signer le message... + Signer un &message... Synchronizing with network... @@ -199,7 +259,7 @@ Browse transaction history - Parcourir l'historique des transactions + Parcourir l'historique transactionnel E&xit @@ -303,15 +363,15 @@ &Show / Hide - &Afficher / Masquer + &Afficher / cacher Show or hide the main Window - Afficher ou masquer la fenêtre principale + Afficher ou cacher la fenêtre principale Encrypt the private keys that belong to your wallet - Chiffrer les clefs privées de votre porte-monnaie + Chiffrer les clés privées qui appartiennent à votre porte-monnaie Sign messages with your Bitcoin addresses to prove you own them @@ -351,7 +411,7 @@ Open a bitcoin: URI or payment request - Ouvrir un URI bitcoin: ou une demande de paiement + Ouvrir une URI bitcoin: ou une demande de paiement &Command-line options @@ -399,7 +459,7 @@ %1 behind - en retard d'%1 + en retard de %1 Last received block was generated %1 ago. @@ -563,10 +623,150 @@ Priorité + Copy address + Copier l’adresse + + + Copy label + Copier l’étiquette + + + Copy amount + Copier le montant + + + Copy transaction ID + Copier l'ID de la transaction + + + Lock unspent + Verrouiller les transactions non dépensées + + + Unlock unspent + Déverrouiller les transactions non dépensées + + + Copy quantity + Copier la quantité + + + Copy fee + Copier les frais + + + Copy after fee + Copier après les frais + + + Copy bytes + Copier les octets + + + Copy priority + Copier la priorité + + + Copy dust + Copier la poussière + + + Copy change + Copier la monnaie + + + highest + la plus élevée + + + higher + plus élevée + + + high + élevée + + + medium-high + moyenne-élevée + + + medium + moyenne + + + low-medium + faible-moyenne + + + low + faible + + + lower + plus faible + + + lowest + la plus faible + + + (%1 locked) + (%1 verrouillée) + + + none + aucune + + + yes + oui + + + no + non + + + This label turns red if the transaction size is greater than 1000 bytes. + Cette étiquette devient rouge si la taille de la transaction dépasse 1 000 octets. + + + This means a fee of at least %1 per kB is required. + Cela signifie que des frais d'au moins %1 sont exigés par Ko. + + + Can vary +/- 1 byte per input. + Peut varier +/- 1 octet par entrée. + + + Transactions with higher priority are more likely to get included into a block. + Les transactions à priorité élevée on plus de chance d'être incluses dans un bloc. + + + This label turns red if the priority is smaller than "medium". + Cette étiquette devient rouge si la priorité est plus basse que « moyenne ». + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Cette étiquette devient rouge si un destinataire reçoit un montant inférieur au seuil actuel de poussière. + + + Can vary +/- %1 satoshi(s) per input. + Peut varier +/- %1 satoshi(s) par entrée. + + (no label) (aucune étiquette) - + + change from %1 (%2) + monnaie de %1 (%2) + + + (change) + (monnaie) + + EditAddressDialog @@ -589,7 +789,39 @@ &Address &Adresse - + + New receiving address + Nouvelle adresse de réception + + + New sending address + Nouvelle adresse d’envoi + + + Edit receiving address + Modifier l’adresse de réception + + + Edit sending address + Modifier l’adresse d'envoi + + + The entered address "%1" is not a valid Bitcoin address. + L'adresse saisie « %1 » n'est pas une adresse Bitcoin valide. + + + The entered address "%1" is already in the address book. + L’adresse saisie « %1 » est déjà présente dans le carnet d'adresses. + + + Could not unlock wallet. + Impossible de déverrouiller le porte-monnaie. + + + New key generation failed. + Échec de génération de la nouvelle clé. + + FreespaceChecker @@ -729,7 +961,11 @@ Select payment request file Choisir le fichier de demande de paiement - + + Select payment request file to open + Choisir le fichier de demande de paiement à ouvrir + + OptionsDialog @@ -1042,7 +1278,95 @@ PaymentServer - + + Payment request error + Erreur de demande de paiement + + + Cannot start bitcoin: click-to-pay handler + Impossible de démarrer le gestionnaire de cliquer-pour-payer bitcoin: + + + URI handling + Gestion des URI + + + Payment request fetch URL is invalid: %1 + L'URL de récupération de la demande de paiement est invalide : %1 + + + Invalid payment address %1 + Adresse de paiement invalide %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + L'URI ne peut pas être analysée ! Cela peut être causé par une adresse Bitcoin invalide ou par des paramètres d'URI mal formés. + + + Payment request file handling + Gestion des fichiers de demande de paiement + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + Le fichier de demande de paiement ne peut pas être lu ! Cela peut être causé par un fichier de demande de paiement invalide. + + + Payment request rejected + Demande de paiement rejetée + + + Payment request network doesn't match client network. + Le réseau de la demande de paiement ne correspond pas au réseau du client. + + + Payment request expired. + La demande de paiement a expiré + + + Payment request is not initialized. + La demande de paiement n'est pas initialisée. + + + Unverified payment requests to custom payment scripts are unsupported. + Les demandes de paiements non vérifiées vers des scripts de paiement personnalisés ne sont pas prises en charge. + + + Invalid payment request. + Demande de paiement invalide. + + + Requested payment amount of %1 is too small (considered dust). + Le paiement demandé d'un montant de %1 est trop faible (considéré comme de la poussière). + + + Refund from %1 + Remboursement de %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + La demande de paiement %1 est trop grande (%2 octets, %3 octets permis). + + + Error communicating with %1: %2 + Erreur de communication avec %1 : %2 + + + Payment request cannot be parsed! + La demande de paiement ne peut pas être analysée ! + + + Bad response from server %1 + Mauvaise réponse du serveur %1 + + + Network request error + Erreur de demande réseau + + + Payment acknowledged + Le paiement a été confirmé + + PeerTableModel @@ -1099,7 +1423,23 @@ QRImageWidget - + + &Save Image... + &Enregistrer l'image... + + + &Copy Image + &Copier l'image + + + Save QR Code + Enregistrer le code QR + + + PNG Image (*.png) + Image PNG (*.png) + + RPCConsole @@ -1216,7 +1556,7 @@ Open the %1 debug log file from the current data directory. This can take a few seconds for large log files. - Ouvrir le journal de débogage de %1 depuis le répertoire de données actuel. Ceci peut prendre quelques secondes pour les journaux de grande taille. + Ouvrir le fichier journal de débogage de %1 à partir du répertoire de données actuel. Cela peut prendre quelques secondes pour les fichiers journaux de grande taille. Decrease font size @@ -1461,7 +1801,19 @@ Remove Retirer - + + Copy label + Copier l’étiquette + + + Copy message + Copier le message + + + Copy amount + Copier le montant + + ReceiveRequestDialog @@ -1481,25 +1833,73 @@ &Enregistrer l'image... + Request payment to %1 + Demande de paiement à %1 + + + Payment information + Informations de paiement + + + URI + URI + + Address Adresse + Amount + Montant + + Label Étiquette - + + Message + Message + + + Resulting URI too long, try to reduce the text for label / message. + L'URI résultante est trop longue. Essayez de réduire le texte de l'étiquette ou du message. + + + Error encoding URI into QR Code. + Erreur d'encodage de l'URI en code QR. + + RecentRequestsTableModel + Date + Date + + Label Étiquette + Message + Message + + (no label) (aucune étiquette) - + + (no message) + (aucun message) + + + (no amount requested) + (aucun montant demandé) + + + Requested + Demandée + + SendCoinsDialog @@ -1651,79 +2051,183 @@ E&nvoyer - (no label) - (aucune étiquette) + Copy quantity + Copier la quantité - - - SendCoinsEntry - A&mount: - &Montant : + Copy amount + Copier le montant - Pay &To: - &Payer à : + Copy fee + Copier les frais - &Label: - É&tiquette : + Copy after fee + Copier après les frais - Choose previously used address - Choisir une adresse déjà utilisée + Copy bytes + Copier les octets - This is a normal payment. - Ceci est un paiement normal. + Copy priority + Copier la priorité - The Bitcoin address to send the payment to - L'adresse Bitcoin à laquelle envoyer le paiement + Copy dust + Copier la poussière - Alt+A - Alt+A + Copy change + Copier la monnaie - Paste address from clipboard - Coller l'adresse du presse-papiers + %1 to %2 + %1 à %2 - Alt+P - Alt+P + Are you sure you want to send? + Voulez-vous vraiment envoyer ? - Remove this entry - Retirer cette entrée + added as transaction fee + ajoutés comme frais de transaction - The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. - Les frais seront déduits du montant envoyé. Le destinataire recevra moins de bitcoins que le montant saisi dans le champ de montant. Si plusieurs destinataires sont sélectionnés, les frais seront partagés également.. + Total Amount %1 + Montant total %1 - S&ubtract fee from amount - S&oustraire les frais du montant + or + ou - Message: - Message : + Confirm send coins + Confirmer l’envoi de pièces - This is an unauthenticated payment request. - Cette demande de paiement n'est pas authentifiée. + The recipient address is not valid. Please recheck. + L'adresse du destinataire est invalide. Veuillez la revérifier. - This is an authenticated payment request. - Cette demande de paiement est authentifiée. + The amount to pay must be larger than 0. + Le montant à payer doit être supérieur à 0. - Enter a label for this address to add it to the list of used addresses - Saisir une étiquette pour cette adresse afin de l'ajouter à la liste d'adresses utilisées + The amount exceeds your balance. + Le montant dépasse votre solde. - A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. - Un message qui était joint à l'URI bitcoin: et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin. + The total exceeds your balance when the %1 transaction fee is included. + Le montant dépasse votre solde lorsque les frais de transaction de %1 sont inclus. + + + Duplicate address found: addresses should only be used once each. + Adresse identique trouvée : chaque adresse ne devrait être utilisée qu'une fois. + + + Transaction creation failed! + Échec de création de la transaction ! + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + La transaction a été rejetée ! Cela peut arriver si certaines pièces de votre porte-monnaie étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et que des pièces ont été dépensées dans la copie sans être marquées comme telles ici. + + + A fee higher than %1 is considered an absurdly high fee. + Des frais supérieurs à %1 sont considérés comme ridiculement élevés. + + + Payment request expired. + La demande de paiement a expiré + + + Pay only the required fee of %1 + Payer seulement les frais exigés de %1 + + + Warning: Invalid Bitcoin address + Avertissement : adresse Bitcoin invalide + + + Warning: Unknown change address + Avertissement : adresse de monnaie rendue inconnue + + + (no label) + (aucune étiquette) + + + + SendCoinsEntry + + A&mount: + &Montant : + + + Pay &To: + &Payer à : + + + &Label: + É&tiquette : + + + Choose previously used address + Choisir une adresse déjà utilisée + + + This is a normal payment. + Ceci est un paiement normal. + + + The Bitcoin address to send the payment to + L'adresse Bitcoin à laquelle envoyer le paiement + + + Alt+A + Alt+A + + + Paste address from clipboard + Coller l'adresse du presse-papiers + + + Alt+P + Alt+P + + + Remove this entry + Retirer cette entrée + + + The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally. + Les frais seront déduits du montant envoyé. Le destinataire recevra moins de bitcoins que le montant saisi dans le champ de montant. Si plusieurs destinataires sont sélectionnés, les frais seront partagés également.. + + + S&ubtract fee from amount + S&oustraire les frais du montant + + + Message: + Message : + + + This is an unauthenticated payment request. + Cette demande de paiement n'est pas authentifiée. + + + This is an authenticated payment request. + Cette demande de paiement est authentifiée. + + + Enter a label for this address to add it to the list of used addresses + Saisir une étiquette pour cette adresse afin de l'ajouter à la liste d'adresses utilisées + + + A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network. + Un message qui était joint à l'URI bitcoin: et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin. Pay To: @@ -1733,10 +2237,18 @@ Memo: Mémo : - + + Enter a label for this address to add it to your address book + Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses + + SendConfirmationDialog - + + Yes + Oui + + ShutdownWindow @@ -1760,7 +2272,7 @@ You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to. - Vous pouvez signer des messages/accords avec vos adresses pour prouver que vous pouvez recevoir des bitcoins à ces dernières. Faites attention de ne rien signer de vague ou au hasard, car des attaques d'hameçonnage pourraient essayer de vous faire signer avec votre identité afin de l'usurper. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous êtes d'accord. + Vous pouvez signer des messages ou des accords avec vos adresses pour prouver que vous pouvez recevoir des bitcoins à ces dernières. Faites attention de ne rien signer de vague ou au hasard, car des attaques d'hameçonnage pourraient essayer de vous faire signer avec votre identité afin de l'usurper. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous êtes d'accord. The Bitcoin address to sign the message with @@ -1834,7 +2346,59 @@ Reset all verify message fields Réinitialiser tous les champs de vérification de message - + + Click "Sign Message" to generate signature + Cliquez sur « Signer le message » pour générer la signature + + + The entered address is invalid. + L'adresse saisie est invalide. + + + Please check the address and try again. + Veuillez vérifier l'adresse et ressayer. + + + The entered address does not refer to a key. + L'adresse saisie ne fait pas référence à une clé. + + + Wallet unlock was cancelled. + Le déverrouillage du porte-monnaie a été annulé. + + + Private key for the entered address is not available. + La clé privée n'est pas disponible pour l'adresse saisie. + + + Message signing failed. + Échec de signature du message. + + + Message signed. + Le message a été signé. + + + The signature could not be decoded. + La signature n'a pu être décodée. + + + Please check the signature and try again. + Veuillez vérifier la signature et ressayer. + + + The signature did not match the message digest. + La signature ne correspond pas au condensé du message. + + + Message verification failed. + Échec de vérification du message. + + + Message verified. + Le message a été vérifié. + + SplashScreen @@ -1851,32 +2415,420 @@ TransactionDesc - + + Open for %n more block(s) + Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + + + Open until %1 + Ouvert jusqu'à %1 + + + conflicted with a transaction with %1 confirmations + est en conflit avec une transaction ayant %1 confirmations + + + %1/offline + %1/hors ligne + + + 0/unconfirmed, %1 + 0/non confirmées, %1 + + + in memory pool + dans la réserve de mémoire + + + not in memory pool + pas dans la réserve de mémoire + + + abandoned + abandonnée + + + %1/unconfirmed + %1/non confirmée + + + %1 confirmations + %1 confirmations + + + Status + État + + + , has not been successfully broadcast yet + , n’a pas encore été diffusée avec succès + + + , broadcast through %n node(s) + , diffusée à travers %n nœud, diffusée à travers %n nœuds + + + Date + Date + + + Source + Source + + + Generated + Générée + + + From + De + + + unknown + inconnue + + + To + À + + + own address + votre adresse + + + watch-only + juste-regarder + + + label + étiquette + + + Credit + Crédit + + + matures in %n more block(s) + arrive à maturité dans %n bloc de plusarrive à maturité dans %n blocs de plus + + + not accepted + refusée + + + Debit + Débit + + + Total debit + Débit total + + + Total credit + Crédit total + + + Transaction fee + Frais de transaction + + + Net amount + Montant net + + + Message + Message + + + Comment + Commentaire + + + Transaction ID + ID de la transaction + + + Output index + Index de sorties + + + Merchant + Marchand + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Les pièces générées doivent mûrir pendant %1 blocs avant de pouvoir être dépensées. Lorsque ce bloc a été généré, il a été diffusé sur le réseau pour être ajouté à la chaîne de blocs. Si son intégration à la chaîne échoue, son état sera modifié en « refusée » et il ne sera pas possible de le dépenser. Cela peut arriver occasionnellement si un autre nœud génère un bloc à quelques secondes du vôtre. + + + Debug information + Informations de débogage + + + Transaction + Transaction + + + Inputs + Entrées + + + Amount + Montant + + + true + vrai + + + false + faux + + TransactionDescDialog This pane shows a detailed description of the transaction Ce panneau affiche une description détaillée de la transaction - + + Details for %1 + Détails de %1 + + TransactionTableModel + Date + Date + + + Type + Type + + Label Étiquette + + Open for %n more block(s) + Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + + + Open until %1 + Ouvert jusqu'à %1 + + + Offline + Hors ligne + + + Unconfirmed + Non confirmée + + + Abandoned + Abandonnée + + + Confirming (%1 of %2 recommended confirmations) + Confirmation (%1 sur %2 confirmations recommandées) + + + Confirmed (%1 confirmations) + Confirmée (%1 confirmations) + + + Conflicted + En conflit + + + Immature (%1 confirmations, will be available after %2) + Immature (%1 confirmations, sera disponible après %2) + + + This block was not received by any other nodes and will probably not be accepted! + Ce bloc n’a été reçu par aucun autre nœud et ne sera probablement pas accepté ! + + + Generated but not accepted + Générée mais refusée + + + Received with + Reçue avec + + + Received from + Reçue de + + + Sent to + Envoyée à + + + Payment to yourself + Paiement à vous-même + + + Mined + Miné + + + watch-only + juste-regarder + + + (n/a) + (n.d) + (no label) (aucune étiquette) - + + Transaction status. Hover over this field to show number of confirmations. + État de la transaction. Survoler ce champ avec la souris pour afficher le nombre de confirmations. + + + Date and time that the transaction was received. + Date et heure de réception de la transaction. + + + Type of transaction. + Type de transaction. + + + Whether or not a watch-only address is involved in this transaction. + Une adresse juste-regarder est-elle ou non impliquée dans cette transaction. + + + User-defined intent/purpose of the transaction. + Intention/but de la transaction défini par l'utilisateur. + + + Amount removed from or added to balance. + Le montant a été ajouté ou soustrait du solde. + + TransactionView + All + Toutes + + + Today + Aujourd’hui + + + This week + Cette semaine + + + This month + Ce mois + + + Last month + Le mois dernier + + + This year + Cette année + + + Range... + Plage… + + + Received with + Reçue avec + + + Sent to + Envoyée à + + + To yourself + À vous-même + + + Mined + Miné + + + Other + Autres + + + Enter address or label to search + Saisir une adresse ou une étiquette à rechercher + + + Min amount + Montant min. + + + Abandon transaction + Abandonner la transaction + + + Copy address + Copier l’adresse + + + Copy label + Copier l’étiquette + + + Copy amount + Copier le montant + + + Copy transaction ID + Copier l'ID de la transaction + + + Copy raw transaction + Copier la transaction brute + + + Copy full transaction details + Copier tous les détails de la transaction + + + Edit label + Modifier l’étiquette + + + Show transaction details + Afficher les détails de la transaction + + + Export Transaction History + Exporter l'historique transactionnel + + Comma separated file (*.csv) Valeurs séparées par des virgules (*.csv) + Confirmed + Confirmée + + + Watch-only + Juste-regarder + + + Date + Date + + + Type + Type + + Label Étiquette @@ -1885,10 +2837,34 @@ Adresse + ID + ID + + Exporting Failed - L'exportation a échoué + Échec d'exportation + + + There was an error trying to save the transaction history to %1. + Une erreur est survenue lors de l'enregistrement de l'historique transactionnel vers %1. + + + Exporting Successful + L'exportation est réussie + + + The transaction history was successfully saved to %1. + L'historique transactionnel a été enregistré avec succès vers %1. + + + Range: + Plage : + + + to + à - + UnitDisplayStatusBarControl @@ -1898,13 +2874,53 @@ WalletFrame - + + No wallet has been loaded. + Aucun porte-monnaie n'a été chargé. + + WalletModel - + + Send Coins + Envoyer des pièces + + WalletView - + + &Export + &Exporter + + + Export the data in the current tab to a file + Exporter les données de l'onglet actuel vers un fichier + + + Backup Wallet + Sauvegarder le porte-monnaie + + + Wallet Data (*.dat) + Données du porte-monnaie (*.dat) + + + Backup Failed + Échec de la sauvegarde + + + There was an error trying to save the wallet data to %1. + Une erreur est survenue lors de l'enregistrement des données du porte-monnaie vers %1. + + + Backup Successful + La sauvegarde est réussie + + + The wallet data was successfully saved to %1. + Les données du porte-monnaie ont été enregistrées avec succès vers %1 + + bitcoin-core @@ -2077,7 +3093,7 @@ Attempt to recover private keys from a corrupt wallet on startup - Tenter de récupérer les clefs privées d'un porte-monnaie corrompu lors du démarrage + Tenter de récupérer les clés privées d'un porte-monnaie corrompu lors du démarrage Block creation options: @@ -2260,6 +3276,10 @@ Spécifiez le fichier de porte-monnaie (dans le répertoire de données) + Starting network threads... + Démarrage des processus réseau... + + The source code is available from %s. Le code source est disponible sur %s. @@ -2285,7 +3305,7 @@ Verifying blocks... - Vérification des blocs... + Vérification des blocs... Verifying wallet... @@ -2357,7 +3377,7 @@ Set maximum size of high-priority/low-fee transactions in bytes (default: %d) - Définir la taille maximale en octets des transactions prioritaires/à frais modiques (par défaut : %d) + Définir la taille maximale en octets des transactions à priorité élevée et frais modiques (par défaut : %d) The transaction amount is too small to send after the fee has been deducted @@ -2369,7 +3389,7 @@ Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start - Utiliser une génération de clef hiérarchique déterministe (HD) après BIP32. N'a d'effet que lors de la création/premier lancement du porte-monnaie + Utiliser une génération de clé hiérarchique déterministe (HD) après BIP32. N'a d'effet que lors de la création ou du lancement intitial du porte-monnaie Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway @@ -2401,7 +3421,7 @@ Imports blocks from external blk000??.dat file on startup - Importe des blocs depuis un fichier blk000??.dat externe lors du démarrage + Importe des blocs à partir d'un fichier blk000??.dat externe lors du démarrage Information @@ -2545,11 +3565,11 @@ -maxtxfee is set very high! Fees this large could be paid on a single transaction. - -maxtxfee est défini très haut ! Des frais aussi élevés pourraient être payés en une seule transaction. + La valeur -maxtxfee est très élevée ! Des frais aussi élevés pourraient être payés en une seule transaction. -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. - -paytxfee est réglé sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction. + La valeur -paytxfee est très élevée ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction. Do not keep transactions in the mempool longer than <n> hours (default: %u) @@ -2669,7 +3689,7 @@ Set key pool size to <n> (default: %u) - Définir la taille de la réserve de clefs à <n> (par défaut : %u) + Définir la taille de la réserve de clés à <n> (par défaut : %u) Set the number of threads to service RPC calls (default: %d) diff --git a/src/qt/locale/bitcoin_it_IT.ts b/src/qt/locale/bitcoin_it_IT.ts index 10216a71f06..c36ae2e488e 100644 --- a/src/qt/locale/bitcoin_it_IT.ts +++ b/src/qt/locale/bitcoin_it_IT.ts @@ -59,10 +59,18 @@ Repeat new passphrase Ripeti nuova passphrase - + + Warning: The Caps Lock key is on! + Attenzione: Il tasto blocco delle maiuscole è attivo! + + BanTableModel + IP/Netmask + IP/Netmask + + Banned Until bannato fino diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts index 3fc93b7e275..399322d4516 100644 --- a/src/qt/locale/bitcoin_ko_KR.ts +++ b/src/qt/locale/bitcoin_ko_KR.ts @@ -41,9 +41,21 @@ &Delete 삭제(&D) + + C&hoose + 선택 (&H) + + + &Edit + 편집 (&E) + AddressTableModel + + Address + 주소 + AskPassphraseDialog @@ -466,6 +478,10 @@ Priority 우선순위 + + Copy address + 주소 복사 + EditAddressDialog @@ -1380,6 +1396,10 @@ &Save Image... 이미지 저장(&S)... + + Address + 주소 + RecentRequestsTableModel @@ -1744,6 +1764,14 @@ TransactionView + + Copy address + 주소 복사 + + + Address + 주소 + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_ku_IQ.ts b/src/qt/locale/bitcoin_ku_IQ.ts index 9e52770aa1d..80fa68289b2 100644 --- a/src/qt/locale/bitcoin_ku_IQ.ts +++ b/src/qt/locale/bitcoin_ku_IQ.ts @@ -28,6 +28,10 @@ AddressTableModel + + Address + ناوونیشان + AskPassphraseDialog @@ -92,6 +96,22 @@ Priority لەپێشی + + high + بەرز + + + low + نزم + + + yes + بەڵێ + + + no + نەخێر + EditAddressDialog @@ -161,14 +181,30 @@ &زانیاری + General + گشتی + + + Network + تۆڕ + + Name ناو + Sent + نێدرا + + Version وەشان + Services + خزمەتگوزاریەکان + + &Open &کردنەوە @@ -181,6 +217,34 @@ گشتییەکان + In: + لە ناو + + + Out: + لەدەرەوە + + + 1 &hour + 1&سات + + + 1 &day + 1&ڕۆژ + + + 1 &week + 1&هەفتە + + + 1 &year + 1&ساڵ + + + never + هەرگیز + + Yes بەڵێ @@ -214,6 +278,10 @@ ReceiveRequestDialog + + Address + ناوونیشان + RecentRequestsTableModel @@ -270,6 +338,10 @@ TransactionView + + Address + ناوونیشان + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts index 57c336c852e..deb6c37c7dd 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/bitcoin_pl.ts @@ -41,9 +41,57 @@ &Delete &Usuń + + Sending addresses + Adresy wysyłania + + + Receiving addresses + Adresy odbioru + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Tutaj znajdują się adresy Bitcoin na które wysyłasz płatności. Zawsze sprawdzaj ilość i adres odbiorcy przed wysyłką monet. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + To są twoje adresy Bitcoin do odbierania płatności. Zaleca się używanie nowych adresów odbiorczych dla każdej transakcji. + + + &Copy Address + &Kopiuj adres + + + Copy &Label + Kopiuj &Etykietę + + + &Edit + &Edytuj + + + Export Address List + Eksportuj listę adresów + + + Comma separated file (*.csv) + Plik *.CSV (dane rozdzielane przecinkami) + + + Exporting Failed + Eksportowanie nie powiodło się + AddressTableModel + + Label + Etykieta + + + Address + Adres + AskPassphraseDialog @@ -63,6 +111,50 @@ Repeat new passphrase Powtórz nowe hasło + + Encrypt wallet + Zaszyfruj portfel + + + Unlock wallet + Odblokuj portfel + + + Decrypt wallet + Odszyfruj portfel + + + Change passphrase + Zmień hasło + + + Enter the old passphrase and new passphrase to the wallet. + Podaj stare i nowe hasło do portfela. + + + Confirm wallet encryption + Potwierdź szyfrowanie portfela + + + Wallet encrypted + Portfel zaszyfrowany + + + Wallet encryption failed + Szyfrowanie portfela nie powiodło się + + + Wallet unlock failed + Odblokowanie portfela nie powiodło się + + + The passphrase entered for the wallet decryption was incorrect. + Wprowadzone hasło do odszyfrowania portfela jest niepoprawne. + + + Wallet decryption failed + Odszyfrowanie portfela nie powiodło się + BanTableModel @@ -466,6 +558,86 @@ Priority Priorytet + + Copy address + Kopiuj adres + + + Copy label + Kopiuj etykietę + + + Copy amount + Kopiuj kwotę + + + Copy transaction ID + Skopiuj ID transakcji + + + Lock unspent + Zablokuj niewydane + + + Unlock unspent + Odblokuj niewydane + + + Copy quantity + Skopiuj ilość + + + Copy fee + Skopiuj prowizję + + + Copy after fee + Skopiuj ilość po opłacie + + + highest + najwyższy + + + higher + wyższy + + + high + wysoki + + + medium-high + średnio wysoki + + + medium + średni + + + low-medium + średnio niski + + + low + niski + + + lower + niższy + + + lowest + najniższy + + + yes + tak + + + no + nie + EditAddressDialog @@ -1361,7 +1533,15 @@ Remove Usuń - + + Copy label + Kopiuj etykietę + + + Copy amount + Kopiuj kwotę + + ReceiveRequestDialog @@ -1380,9 +1560,21 @@ &Save Image... &Zapisz obraz... + + Address + Adres + + + Label + Etykieta + RecentRequestsTableModel + + Label + Etykieta + SendCoinsDialog @@ -1534,6 +1726,22 @@ S&end Wy&syłka + + Copy quantity + Skopiuj ilość + + + Copy amount + Kopiuj kwotę + + + Copy fee + Skopiuj prowizję + + + Copy after fee + Skopiuj ilość po opłacie + SendCoinsEntry @@ -1742,9 +1950,45 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw TransactionTableModel + + Label + Etykieta + TransactionView + + Copy address + Kopiuj adres + + + Copy label + Kopiuj etykietę + + + Copy amount + Kopiuj kwotę + + + Copy transaction ID + Skopiuj ID transakcji + + + Comma separated file (*.csv) + Plik *.CSV (dane rozdzielane przecinkami) + + + Label + Etykieta + + + Address + Adres + + + Exporting Failed + Eksportowanie nie powiodło się + UnitDisplayStatusBarControl @@ -1797,6 +2041,14 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw Prune: ostatnia synchronizacja portfela jest za danymi. Muszisz -reindexować (pobrać cały ciąg bloków ponownie w przypadku przyciętego węzła) + Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files) + Zredukuj wymaganą ilość miejsca na dysku poprzez usuwanie starych bloków. Ten tryb jest niekompatybilny z -txindex oraz -rescan. Ostrzeżenie: Wycofanie tego ustawienia wymaga ponownego pobrania całego łańcucha bloków. (domyślnie: 0 = wyłącz usuwanie bloków, >%u = docelowy rozmiar w MiB jaki wykorzystać na pliki z blokami) + + + Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. + Ponowne skanowanie nie jest możliwe w trybie przycinania. Będzie trzeba użyć -reindex, co pobierze ponownie cały łańcuch bloków. + + Error: A fatal internal error occurred, see debug.log for details Błąd: Wystąpił fatalny błąd wewnętrzny, sprawdź szczegóły w debug.log @@ -1833,6 +2085,14 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw -fallbackfee ma ustawioną bardzo dużą wartość! Jest to prowizja za transakcje, którą możesz zapłacić gdy oszacowanie opłaty jest niemożliwe. + A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s) + Stawka prowizji (w %s/kB), która będzie użyta, gdy oszacowane dane o prowizjach nie będą wystarczające (domyślnie: %s) + + + Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d) + Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d) + + Bind to given address and always listen on it. Use [host]:port notation for IPv6 Skojarz z podanym adresem i nasłuchuj na nim. Użyj formatu [host]:port dla IPv6 diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index 2dbd28dc610..aeaf99f5073 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -41,10 +41,78 @@ &Delete &Excluir - + + Choose the address to send coins to + Escoha o endereço para enviar moedas + + + Choose the address to receive coins with + Escolha o enereço para receber moedas + + + C&hoose + Escol&ha + + + Sending addresses + Endereços de envio + + + Receiving addresses + Endereços de recebimento + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estes são os seus endereços para enviar pagamentos. Sempre cheque a quantia e o endereço do destinatário antes de enviar moedas. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Estes são os seus endereços para receber pagamentos. É recomendado usar um novo para cada transação. + + + &Copy Address + &Copiar endereço + + + Copy &Label + Copiar rótu&lo + + + &Edit + &Editar + + + Export Address List + Exportar lista de endereços + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + Exporting Failed + Falha na exportação + + + There was an error trying to save the address list to %1. Please try again. + Erro ao salvar a lista de endereço para %1. Tente novamente. + + AddressTableModel - + + Label + Rótuo + + + Address + Endereço + + + (no label) + (sem rótuo) + + AskPassphraseDialog @@ -63,7 +131,91 @@ Repeat new passphrase Repita a nova frase de segurança - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Insira a nova senha para a carteira.<br/>Favor usar uma senha com <b>dez ou mais caracteres aleatórios</b>, ou <b>oito ou mais palavras</b>. + + + Encrypt wallet + Criptografar carteira + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operação precisa da sua senha para desbloquear a carteira. + + + Unlock wallet + Desbloquear carteira + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operação precisa da sua senha para descriptografar a carteira + + + Decrypt wallet + Descriptografar carteira + + + Change passphrase + Alterar senha + + + Enter the old passphrase and new passphrase to the wallet. + Insira a senha antiga e a nova para a carteira. + + + Confirm wallet encryption + Confirmar criptografia da carteira + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Aviso: Se você criptografar sua carteira e perder sua senha, você vai <b>PERDER TODOS OS SEUS BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + Tem certeza que deseja criptografar a carteira? + + + Wallet encrypted + Carteira criptografada + + + 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. + IMPORTANTE: Qualquer backup prévio que você tenha feito da sua carteira deve ser substituído pelo novo e encriptado arquivo gerado. Por razões de segurança, qualquer backup do arquivo não criptografado se tornará inútil assim que você começar a usar uma nova carteira criptografada. + + + Wallet encryption failed + Falha ao criptografar carteira + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Falha na criptografia devido a um erro inerno. Sua carteira não foi criptografada. + + + The supplied passphrases do not match. + As senhas não conferem. + + + Wallet unlock failed + Falha ao desbloquear carteira + + + The passphrase entered for the wallet decryption was incorrect. + A senha inserida para descriptografar a carteira está incorreta. + + + Wallet decryption failed + Falha ao descriptografar a carteira + + + Wallet passphrase was successfully changed. + A senha da carteira foi alterada com êxito. + + + Warning: The Caps Lock key is on! + Aviso: Tecla Caps Lock ativa! + + BanTableModel @@ -179,7 +331,7 @@ &Debug window - Janela de &Depuração + Janela de &depuração Open debugging and diagnostic console @@ -466,7 +618,151 @@ Priority Prioridade - + + Copy address + Copiar endereço + + + Copy label + Copiar rótulo + + + Copy amount + Copiar quantia + + + Copy transaction ID + Copiar ID da transação + + + Lock unspent + Boquear saída + + + Unlock unspent + Desboquear saída + + + Copy quantity + Copiar quantia + + + Copy fee + Copiar taxa + + + Copy after fee + Copiar pós taxa + + + Copy bytes + Copiar bytes + + + Copy priority + Copiar prioridade + + + Copy dust + Copiar poeira + + + Copy change + Copiar troco + + + highest + mega alta + + + higher + super alta + + + high + alta + + + medium-high + média alta + + + medium + média + + + low-medium + média baixa + + + low + baixa + + + lower + super baixa + + + lowest + mega baixa + + + (%1 locked) + (%1 bloqueada) + + + none + nenhum + + + yes + sim + + + no + não + + + This label turns red if the transaction size is greater than 1000 bytes. + Este texto fica vermeho se o tamanho da transação for maior que 1 KiB. + + + This means a fee of at least %1 per kB is required. + Isso quer dizer que uma taxa de pelo menos %1 per KiB será necessária. + + + Can vary +/- 1 byte per input. + Pode variar +/- 1 byte por entrada + + + Transactions with higher priority are more likely to get included into a block. + Transações de alta prioridade são mais propensas a serem incluídas em um bloco. + + + This label turns red if the priority is smaller than "medium". + Este texto fica vermelho se a prioridade é menor que "medio". + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + Este texto fica vermelho se qualquer destinatário receber uma quantidade menor que que o dust. + + + Can vary +/- %1 satoshi(s) per input. + Pode variar +/- %1 satoshi(s) por entrada + + + (no label) + (sem rótuo) + + + change from %1 (%2) + troco de %1 (%2) + + + (change) + (troco) + + EditAddressDialog @@ -489,7 +785,39 @@ &Address &Endereço - + + New receiving address + Novo endereço de recebimento + + + New sending address + Novo endereço de envio + + + Edit receiving address + Editar endereço de recebimento + + + Edit sending address + Editar endereço de envio + + + The entered address "%1" is not a valid Bitcoin address. + O endereço digitado "%1" não é um endereço válido. + + + The entered address "%1" is already in the address book. + O endereço digitado "%1" já se encontra no catálogo de endereços. + + + Could not unlock wallet. + Não foi possível desbloquear a carteira + + + New key generation failed. + Falha ao gerar chave + + FreespaceChecker @@ -629,7 +957,11 @@ Select payment request file Selecione o arquivo de cobrança - + + Select payment request file to open + Selecione o arquivo de cobrança para ser aberto + + OptionsDialog @@ -942,7 +1274,95 @@ PaymentServer - + + Payment request error + Erro no pedido de pagamento + + + Cannot start bitcoin: click-to-pay handler + Não foi possível iniciar bitcoin: manipulador click-to-pay + + + URI handling + Manipulação de URI + + + Payment request fetch URL is invalid: %1 + URL de cobrança é inválida: %1 + + + Invalid payment address %1 + Endereço de pagamento %1 inválido + + + 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 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. + + + Payment request rejected + Pedido de pagamento rejeitado + + + Payment request network doesn't match client network. + Rede do pedido de pagamento não corresponde rede do cliente. + + + Payment request expired. + Pedido de pagamento expirado + + + Payment request is not initialized. + Pedido de pagamento não inicializado + + + Unverified payment requests to custom payment scripts are unsupported. + Pedidos de pagamento não verificados para scripts de pagamento personalizados não são suportados. + + + Invalid payment request. + Pedido de pagamento inválido + + + Requested payment amount of %1 is too small (considered dust). + Valor do pagamento solicitado de %1 é muito pequeno (Considerado poeira). + + + Refund from %1 + Reembolso de %1 + + + Payment request %1 is too large (%2 bytes, allowed %3 bytes). + Pedido de pagamento %1 é muito grande (%2 bytes, permitido %3 bytes). + + + Error communicating with %1: %2 + Erro na comunicação com %1: %2 + + + Payment request cannot be parsed! + Pedido de pagamento não pode ser analisado! + + + Bad response from server %1 + Erro na resposta do servidor: %1 + + + Network request error + Erro de solicitação de rede + + + Payment acknowledged + Pagamento reconhecido + + PeerTableModel @@ -999,7 +1419,23 @@ QRImageWidget - + + &Save Image... + &Savar imagem + + + &Copy Image + &Copiar imagem + + + Save QR Code + Salvar código QR + + + PNG Image (*.png) + Imagem PNG (*.png) + + RPCConsole @@ -1196,7 +1632,7 @@ Debug log file - Arquivo de log de Depuração + Arquivo de log de depuração Clear console @@ -1361,7 +1797,19 @@ Remove Remover - + + Copy label + Copiar rótulo + + + Copy message + Copiar mensagem + + + Copy amount + Copiar quantia + + ReceiveRequestDialog @@ -1380,43 +1828,107 @@ &Save Image... &Salvar Imagem... - - - RecentRequestsTableModel - - - SendCoinsDialog - Send Coins - Enviar moedas + Request payment to %1 + Pedido de pagamento para %1 - Coin Control Features - Opções de controle de moeda + Payment information + Informação do pagamento - Inputs... - Entradas... + URI + URI - automatically selected - automaticamente selecionado + Address + Endereço - Insufficient funds! - Saldo insuficiente! + Amount + Quantia - Quantity: - Quantidade: + Label + Rótuo - Bytes: - Bytes: + Message + Mensagem - Amount: - Quantia: + Resulting URI too long, try to reduce the text for label / message. + URI resultante muito longa. Tente reduzir o texto do rótulo ou da mensagem. + + + Error encoding URI into QR Code. + Erro ao codigicar o URI em código QR + + + + RecentRequestsTableModel + + Date + Data + + + Label + Rótuo + + + Message + Mensagem + + + (no label) + (sem rótuo) + + + (no message) + (sem mensagem) + + + (no amount requested) + (nenhuma quantia solicitada) + + + Requested + Solicitado + + + + SendCoinsDialog + + Send Coins + Enviar moedas + + + Coin Control Features + Opções de controle de moeda + + + Inputs... + Entradas... + + + automatically selected + automaticamente selecionado + + + Insufficient funds! + Saldo insuficiente! + + + Quantity: + Quantidade: + + + Bytes: + Bytes: + + + Amount: + Quantia: Priority: @@ -1534,7 +2046,119 @@ S&end Enviar - + + Copy quantity + Copiar quantia + + + Copy amount + Copiar quantia + + + Copy fee + Copiar taxa + + + Copy after fee + Copiar pós taxa + + + Copy bytes + Copiar bytes + + + Copy priority + Copiar prioridade + + + Copy dust + Copiar poeira + + + Copy change + Copiar troco + + + %1 to %2 + %1 a %2 + + + Are you sure you want to send? + Tem certeza que deseja enviar? + + + added as transaction fee + adicionado como taxa da transação + + + Total Amount %1 + Quantia tota %1 + + + or + ou + + + Confirm send coins + Confirme o envio de moedas + + + The recipient address is not valid. Please recheck. + Endereço de envio inváido. Favor checar. + + + The amount to pay must be larger than 0. + A quantia à pagar deve ser maior que 0 + + + The amount exceeds your balance. + A quantia excede o seu saldo + + + The total exceeds your balance when the %1 transaction fee is included. + O total excede o seu saldo quando a taxa da transação %1 é incluída + + + Duplicate address found: addresses should only be used once each. + Endereço duplicado encontrado: Endereços devem ser usados somente uma vez cada. + + + Transaction creation failed! + Falha na criação da transação + + + The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here. + A transação foi rejeitada! Isso pode acontecer se algumas moedas na sua carteira já foram gastas em outro local, por exemplo se você tiver uma cópia da carteira e as moedas tiverem sido gastas na cópia mas não marcados como gastas aqui ainda. + + + A fee higher than %1 is considered an absurdly high fee. + Uma taxa maior que %1 é considerada uma taxa absurdamente alta. + + + Payment request expired. + Pedido de pagamento expirado + + + Pay only the required fee of %1 + Pagar somente a taxa requerida de %1 + + + Estimated to begin confirmation within %n block(s). + Estimado a começar confirmação em %n bloco(s).Estimado começar confirmação em %n bloco(s). + + + Warning: Invalid Bitcoin address + Aviso: Endereço inválido + + + Warning: Unknown change address + Aviso: Endereço de troco inválido + + + (no label) + (sem rótuo) + + SendCoinsEntry @@ -1613,10 +2237,18 @@ Memo: Memorizar: - + + Enter a label for this address to add it to your address book + Digite um rótulo para este endereço para adicioná-lo ao catálogo de endereços + + SendConfirmationDialog - + + Yes + Sim + + ShutdownWindow @@ -1710,7 +2342,59 @@ Reset all verify message fields Limpar todos os campos de assinatura da mensagem - + + Click "Sign Message" to generate signature + Clique em "Assinar mensagem" para gerar a assinatura + + + The entered address is invalid. + O endereço digitado é inválido + + + Please check the address and try again. + Favor checar o endereço e tente novamente + + + The entered address does not refer to a key. + O endereço fornecido não se refere a uma chave. + + + Wallet unlock was cancelled. + O desbloqueio da carteira foi cancelado + + + Private key for the entered address is not available. + A chave privada do endereço inserido não está disponível + + + Message signing failed. + Falha ao assinar mensagem + + + Message signed. + Mensagem assinada + + + The signature could not be decoded. + A assinatura não pode ser descodificada + + + Please check the signature and try again. + Favor checar a assinatura e tente novamente + + + The signature did not match the message digest. + A assinatura não corresponde a mensagem + + + Message verification failed. + Falha na verificação da mensagem + + + Message verified. + Mensagem verificada + + SplashScreen @@ -1727,20 +2411,456 @@ TransactionDesc - + + Open for %n more block(s) + Aberto para mais %n bloco(s)Aberto para mais %n bloco(s) + + + Open until %1 + Aberto até %1 + + + conflicted with a transaction with %1 confirmations + conflitado com uma transação com %1 confirmações + + + %1/offline + %1/offline + + + 0/unconfirmed, %1 + 0/não confirmado, %1 + + + in memory pool + na memória + + + not in memory pool + não na memóra + + + abandoned + abandonado + + + %1/unconfirmed + %1/não confirmado + + + %1 confirmations + %1 confirmações + + + Status + Status + + + , has not been successfully broadcast yet + , ainda não foi propagada na rede com êxito. + + + , broadcast through %n node(s) + , propagada por %n nó(s), propagada por %n nó(s) + + + Date + Data + + + Source + Fonte + + + Generated + Gerado + + + From + De + + + unknown + desconhecido + + + To + Para + + + own address + próprio endereço + + + watch-only + monitorado + + + label + rótulo + + + Credit + Crédito + + + matures in %n more block(s) + amadurece em mais %n bloco(s)amadurece em mais %n bloco(s) + + + not accepted + não aceito + + + Debit + Débito + + + Total debit + Débito total + + + Total credit + Crédito total + + + Transaction fee + Taxa da transação + + + Net amount + Valor líquido + + + Message + Mensagem + + + Comment + Comentário + + + Transaction ID + ID da transação + + + Output index + Index da saída + + + Merchant + Mercador + + + Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours. + Moedas recém minerados precisam aguardar %1 blocos antes de serem gastos. Quando o bloco foi gerado, ele foi disseminado pela rede para ser adicionado à blockchain. Se ele falhar em ser inserido na cadeia, seu estado será modificado para "não aceito" e ele não poderá ser gasto. Isso pode acontecer eventualmente quando blocos são gerados quase que simultaneamente. + + + Debug information + Depurar informação + + + Transaction + Transação + + + Inputs + Entradas + + + Amount + Quantia + + + true + verdadeiro + + + false + falso + + TransactionDescDialog This pane shows a detailed description of the transaction Este painel mostra uma descrição detalhada da transação - + + Details for %1 + Detalhes para %1 + + TransactionTableModel - + + Date + Data + + + Type + Tipo + + + Label + Rótuo + + + Open for %n more block(s) + Aberto por mais %n bloco(s)Aberto por mais %n bloco(s) + + + Open until %1 + Aberto até %1 + + + Offline + Offline + + + Unconfirmed + Não confirmado + + + Abandoned + Abandonado + + + Confirming (%1 of %2 recommended confirmations) + Confirmando (%1 de %2 confirmações recomendadas) + + + Confirmed (%1 confirmations) + Confirmado (%1 confirmações) + + + Conflicted + Conflitado + + + Immature (%1 confirmations, will be available after %2) + Recém-criado (%1 confirmações, disponível somente após %2) + + + This block was not received by any other nodes and will probably not be accepted! + Este bloco não foi recebido por nenhum outro participante da rede e provavelmente não será aceito! + + + Generated but not accepted + Gerado mas não aceito + + + Received with + Recebido em + + + Received from + Recebido de + + + Sent to + Enviado para + + + Payment to yourself + Pagamento para você mesmo + + + Mined + Minerado + + + watch-only + monitorado + + + (n/a) + (n/a) + + + (no label) + (sem rótuo) + + + Transaction status. Hover over this field to show number of confirmations. + Status da transação. Passe o mouse sobre este campo para mostrar o número de confirmações. + + + Date and time that the transaction was received. + Data e hora em que a transação foi recebida. + + + Type of transaction. + Tipo de transação + + + Whether or not a watch-only address is involved in this transaction. + Mostrar ou não endereços monitorados na lista de transações. + + + User-defined intent/purpose of the transaction. + Intenção/Propósito definido pelo usuário para a transação + + + Amount removed from or added to balance. + Quantidade debitada ou creditada ao saldo. + + TransactionView - + + All + Todos + + + Today + Hoje + + + This week + Essa semana + + + This month + Esse mês + + + Last month + Último mês + + + This year + Este ano + + + Range... + Intervalo... + + + Received with + Recebido em + + + Sent to + Enviado para + + + To yourself + Para você mesmo + + + Mined + Minerado + + + Other + Outro + + + Enter address or label to search + Procure um endereço ou rótulo + + + Min amount + Quantia mínima + + + Abandon transaction + Transação abandonada + + + Copy address + Copiar endereço + + + Copy label + Copiar rótulo + + + Copy amount + Copiar quantia + + + Copy transaction ID + Copiar ID da transação + + + Copy raw transaction + Copiar o raw da transação + + + Copy full transaction details + Copiar dados completos da transação + + + Edit label + Editar rótulo + + + Show transaction details + Mostrar detalhes da transação + + + Export Transaction History + Exportar histórico de transações + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + Confirmed + Confirmado + + + Watch-only + Monitorado + + + Date + Data + + + Type + Tipo + + + Label + Rótuo + + + Address + Endereço + + + ID + ID + + + Exporting Failed + Falha na exportação + + + There was an error trying to save the transaction history to %1. + Ocorreu um erro ao tentar salvar o histórico de transações em %1. + + + Exporting Successful + Exportação feita com êxito + + + The transaction history was successfully saved to %1. + O histórico de transação foi gravado com êxito em %1. + + + Range: + Intervalo: + + + to + para + + UnitDisplayStatusBarControl @@ -1750,13 +2870,53 @@ WalletFrame - + + No wallet has been loaded. + Nenhuma carteira carregada + + WalletModel - + + Send Coins + Enviar moedas + + WalletView - + + &Export + &Exportar + + + Export the data in the current tab to a file + Exportar os dados da guia atual para um arquivo + + + Backup Wallet + Backup da carteira + + + Wallet Data (*.dat) + Dados da carteira (*.dat) + + + Backup Failed + Falha no backup + + + There was an error trying to save the wallet data to %1. + Ocorreu um erro ao tentar salvar os dados da carteira em %1. + + + Backup Successful + Êxito no backup + + + The wallet data was successfully saved to %1. + Os dados da carteira foram salvos com êxito em %1. + + bitcoin-core @@ -1793,7 +2953,7 @@ Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files) - Reduza os requerimentos de armazenamento de dados (cortando) deletando blocos mais antigos. Esse modo é incompatível com -txindex e -rescan. Cuidado: Reverter essa configuração requer um novo download de toda a blockchain. (Padrão: 0 = desabilita o corte de blocos, >%u = tamanho alvo em MiB para o uso de blocos cortados) + Reduza o armazenamento de dados apagando os blocos mais antigos. Esse modo é incompatível com -txindex e -rescan. Cuidado: Reverter essa configuração requer um novo download de toda a blockchain. (Padrão: 0 = desabilitado, >%u = tamanho em MiB para o uso de blocos cortados) Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. @@ -1856,6 +3016,10 @@ Distribuido sob a licença MIT software license. Veja os termos em <http://www.opensource.org/licenses/mit-license.php>. + Equivalent bytes per sigop in transactions for relay and mining (default: %u) + Número mínimo de bytes por assinatura em transações que transmitimos e mineramos (default: %u) + + Error loading %s: You can't enable HD on a already existing non-HD wallet Erro ao carregar %s. Não é permitido habilitar HD em carteiras não-HD pre existentes. @@ -2100,6 +3264,14 @@ O modo prune é incompatível com -txindex. + Rebuild chain state and block index from the blk*.dat files on disk + Reconstruir índice de cadeia de bloco a partir dos arquivos blk*.dat no disco + + + Rebuild chain state from the currently indexed blocks + Reconstruir estado a partir dos blocos indexados + + Rewinding blocks... Reanalizando blocos... @@ -2120,6 +3292,10 @@ Especifique o arquivo da carteira (dentro do diretório de dados) + Starting network threads... + Iniciando análise da rede... + + The source code is available from %s. O código fonte está disponível pelo %s @@ -2200,12 +3376,16 @@ Comissões (em %s/kB) menores serão consideradas como zero para relaying, mineração e criação de transação (padrão %s) + Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d) + Força a retransmissão de transações de pares da lista branca, mesmo quando violam a política local de retransmissão (default: %d) + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) Se paytxfee não estiver definida, incluir comissão suficiente para que as transações comecem a ter confirmações em média dentro de N blocos (padrão %u) Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions) - Valor inválido para -maxtxfee = <valor>: '%s'( precisa ser pelo menos a comissão mínima de %s para prevenir travamento de transações) + Valor inválido para -maxtxfee=<valor>: '%s' (precisa ser pelo menos a taxa mínima de %s para prevenir que a transação nunca seja confirmada) Maximum size of data in data carrier transactions we relay and mine (default: %u) @@ -2232,6 +3412,10 @@ Esse produto inclui software desenvolvido pelo Open SSL Project para uso na OpenSSL Toolkit <https://www.openssl.org> e software criptográfico escrito por Eric Young e software UPnP escrito por Thomas Bernard. + Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start + Usar carteira HD. Somente tem efeito na criação de uma nova carteira + + Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway Peers permitidos não podem ser banidos do DoS e suas transações sempre são transmitidas, até mesmo se eles já estão no pool de memória, útil, por exemplo, para um gateway diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts index cbecf905855..e4c5bef16dd 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/bitcoin_pt_PT.ts @@ -41,6 +41,14 @@ &Delete &Eliminar + + Choose the address to send coins to + Escolhe qual o endereço para o qual enviar moedas + + + Choose the address to receive coins with + Escolhe qual o endereço para receber moedas + AddressTableModel diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts index ee0568ed50d..7e46f251d03 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/bitcoin_sk.ts @@ -44,7 +44,11 @@ AddressTableModel - + + (no label) + (bez popisu) + + AskPassphraseDialog @@ -466,6 +470,10 @@ Priority Priorita + + (no label) + (bez popisu) + EditAddressDialog @@ -1384,6 +1392,10 @@ RecentRequestsTableModel + + (no label) + (bez popisu) + SendCoinsDialog @@ -1535,7 +1547,15 @@ S&end &Odoslať - + + or + alebo + + + (no label) + (bez popisu) + + SendCoinsEntry @@ -1734,6 +1754,10 @@ TransactionTableModel + + (no label) + (bez popisu) + TransactionView diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index 5b122f76c25..7e30b263a2c 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -73,10 +73,47 @@ &Copy Address &Kopiera adress - + + Copy &Label + Kopiera &etikett + + + &Edit + &Redigera + + + Export Address List + Exportera adresslista + + + Comma separated file (*.csv) + Kommaseparerad fil (*.csv) + + + Exporting Failed + Export misslyckades + + + There was an error trying to save the address list to %1. Please try again. + Det inträffade ett fel när adresslistan skulle sparas till %1. +Var vänlig och försök igen. + + AddressTableModel - + + Label + Etikett + + + Address + Adress + + + (no label) + (Ingen etikett) + + AskPassphraseDialog @@ -95,7 +132,95 @@ Repeat new passphrase Upprepa nytt lösenord - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + Ange plånbokens nya lösenord. <br/> Använd ett lösenord på <b>tio eller fler slumpmässiga tecken,</b> eller <b>åtta eller fler ord.</b>. + + + Encrypt wallet + Kryptera plånbok + + + This operation needs your wallet passphrase to unlock the wallet. + Denna operation behöver din plånboks lösenord för att låsa upp plånboken. + + + Unlock wallet + Lås upp plånbok + + + This operation needs your wallet passphrase to decrypt the wallet. + Denna operation behöver din plånboks lösenord för att dekryptera plånboken. + + + Decrypt wallet + Dekryptera plånbok + + + Change passphrase + Ändra lösenord + + + Enter the old passphrase and new passphrase to the wallet. + Ge det gamla lösenordet och det nya lösenordet för plånboken. + + + Confirm wallet encryption + Bekräfta kryptering av plånbok + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + VARNING: Om du krypterar din plånbok och glömmer ditt lösenord, kommer du att <b>FÖRLORA ALLA DINA BITCOIN</b>! + + + Are you sure you wish to encrypt your wallet? + Är du säker på att du vill kryptera din plånbok? + + + Wallet encrypted + Plånbok krypterad + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 kommer nu att stänga ner för att färdigställa krypteringen. Tänk på att en krypterad plånbok inte skyddar mot stöld om din dator är infekterad med en keylogger. + + + 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. + VIKTIGT: Alla tidigare säkerhetskopior du har gjort av plånboksfilen ska ersättas med den nya genererade, krypterade plånboksfilen. Av säkerhetsskäl kommer tidigare säkerhetskopior av den okrypterade plånboksfilen blir oanvändbara när du börjar använda en ny, krypterad plånbok. + + + Wallet encryption failed + Kryptering av plånbok misslyckades + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Kryptering av plånbok misslyckades på grund av ett internt fel. Din plånbok blev inte krypterad. + + + The supplied passphrases do not match. + De angivna lösenorden överensstämmer inte. + + + Wallet unlock failed + Misslyckades låsa upp plånboken + + + The passphrase entered for the wallet decryption was incorrect. + Lösenordet för dekryptering av plånboken var felaktig. + + + Wallet decryption failed + Dekryptering av plånbok misslyckades + + + Wallet passphrase was successfully changed. + Plånbokens lösenord har ändrats. + + + Warning: The Caps Lock key is on! + Varning: Caps Lock är påslaget! + + BanTableModel @@ -498,6 +623,22 @@ Priority Prioritet + + Copy address + Kopiera adress + + + Copy label + Kopiera etikett + + + Copy amount + Kopiera belopp + + + (no label) + (Ingen etikett) + EditAddressDialog @@ -1393,7 +1534,15 @@ Remove Ta bort - + + Copy label + Kopiera etikett + + + Copy amount + Kopiera belopp + + ReceiveRequestDialog @@ -1412,9 +1561,25 @@ &Save Image... &Spara Bild... + + Address + Adress + + + Label + Etikett + RecentRequestsTableModel + + Label + Etikett + + + (no label) + (Ingen etikett) + SendCoinsDialog @@ -1566,7 +1731,15 @@ S&end &Skicka - + + Copy amount + Kopiera belopp + + + (no label) + (Ingen etikett) + + SendCoinsEntry @@ -1773,9 +1946,45 @@ TransactionTableModel + + Label + Etikett + + + (no label) + (Ingen etikett) + TransactionView + + Copy address + Kopiera adress + + + Copy label + Kopiera etikett + + + Copy amount + Kopiera belopp + + + Comma separated file (*.csv) + Kommaseparerad fil (*.csv) + + + Label + Etikett + + + Address + Adress + + + Exporting Failed + Export misslyckades + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_ta.ts b/src/qt/locale/bitcoin_ta.ts index 699ded2c67c..1ce2c4df8f6 100644 --- a/src/qt/locale/bitcoin_ta.ts +++ b/src/qt/locale/bitcoin_ta.ts @@ -25,9 +25,21 @@ &Delete &அழி + + Sending addresses + முகவரிகள் அனுப்பப்படுகின்றன + + + Receiving addresses + முகவரிகள் பெறப்படுகின்றன + AddressTableModel + + Address + முகவரி + AskPassphraseDialog @@ -558,6 +570,10 @@ &Save Image... &படத்தை சேமி... + + Address + முகவரி + RecentRequestsTableModel @@ -678,6 +694,10 @@ TransactionView + + Address + முகவரி + UnitDisplayStatusBarControl diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts index 5774f5b9b38..fdfc9211799 100644 --- a/src/qt/locale/bitcoin_vi_VN.ts +++ b/src/qt/locale/bitcoin_vi_VN.ts @@ -619,6 +619,10 @@ QRImageWidget + + &Save Image... + $Lưu hình ảnh... + RPCConsole @@ -646,6 +650,58 @@ User Agent User Agent + + 1 &hour + 1&giờ + + + 1 &day + 1&ngày + + + 1 &week + 1&tuần + + + 1 &year + 1&năm + + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. + Sử dụng phím lên và xuống để di chuyển lịch sử, và <b>Ctrl-L</b> để xóa màn hình + + + Type <b>help</b> for an overview of available commands. + Gõ <b>help</b> để xem nhưng câu lệnh có sẵn + + + %1 B + %1 B + + + %1 KB + %1 KB + + + %1 MB + %1 MB + + + %1 GB + %1 GB + + + never + không bao giờ + + + Yes + Đồng ý + + + No + Không + ReceiveCoinsDialog @@ -653,20 +709,120 @@ &Amount: Lượng: + + &Label: + &Nhãn + + + &Message: + &Tin nhắn: + + + Use this form to request payments. All fields are <b>optional</b>. + Sử dụng form này để yêu cầu thanh toán. Tất cả các trường <b>không bắt buộc<b> + + + Clear all fields of the form. + Xóa tất cả các trường trong biểu mẫu + + + Clear + Xóa + + + Requested payments history + Lịch sử yêu cầu thanh toán + + + &Request payment + &Yêu cầu thanh toán + + + Show + Hiển thị + + + Remove the selected entries from the list + Xóa khỏi danh sách + + + Remove + Xóa + + + Copy message + Copy tin nhắn + ReceiveRequestDialog + QR Code + QR Code + + + Copy &URI + Copy &URI + + Copy &Address &Copy Địa Chỉ - + + &Save Image... + $Lưu hình ảnh... + + + Request payment to %1 + Yêu cầu thanh toán cho %1 + + + Payment information + Thông tin thanh toán + + + URI + URI + + + Message + Tin nhắn + + + Error encoding URI into QR Code. + Lỗi khi encode từ URI thành QR Code + + RecentRequestsTableModel + + Message + Tin nhắn + + + (no message) + (không tin nhắn) + SendCoinsDialog + Send Coins + Gửi Coins + + + Coin Control Features + Tính năng Control Coin + + + Inputs... + Nhập... + + + automatically selected + Tự động chọn + + Insufficient funds! Không đủ tiền @@ -698,6 +854,86 @@ Change: Thay đổi: + + Transaction Fee: + Phí giao dịch + + + Choose... + Chọn... + + + collapse fee-settings + Thu gọn fee-settings + + + per kilobyte + trên KB + + + Hide + Ẩn + + + total at least + Tổng cộng ít nhất + + + (read the tooltip) + (Đọc hướng dẫn) + + + Confirmation time: + Thời gian xác nhận + + + normal + Bình thường + + + fast + Nhanh + + + Send to multiple recipients at once + Gửi đến nhiều người nhận trong một lần + + + Add &Recipient + Thêm &Người nhận + + + Clear all fields of the form. + Xóa tất cả các trường trong biểu mẫu + + + Clear &All + Xóa &Tất cả + + + Balance: + Tài khoản + + + Confirm the send action + Xác nhận sự gửi + + + %1 to %2 + %1 đến %2 + + + Total Amount %1 + Tổng cộng %1 + + + or + hoặc + + + Confirm send coins + Xác nhận gửi coins + SendCoinsEntry @@ -705,15 +941,27 @@ A&mount: Lượng: + + &Label: + &Nhãn + SendConfirmationDialog - + + Yes + Đồng ý + + ShutdownWindow SignVerifyMessageDialog + + Clear &All + Xóa &Tất cả + SplashScreen @@ -723,6 +971,10 @@ TransactionDesc + + Message + Tin nhắn + TransactionDescDialog @@ -741,7 +993,11 @@ WalletModel - + + Send Coins + Gửi Coins + + WalletView diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index b8d3cadc2fb..98142b7b004 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -41,10 +41,78 @@ &Delete 删除(&D) - + + Choose the address to send coins to + 选择要付钱过去的地址 + + + Choose the address to receive coins with + 选择要收钱进来的地址 + + + C&hoose + 选择 + + + Sending addresses + 付款地址 + + + Receiving addresses + 收款地址 + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + 这些是你要付款过去的比特币地址。在付钱之前,务必要检查金额和收款地址是否正确。 + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + 这些是你用来收款的比特币地址。建议在每次交易时,都使用一个新的收款地址。 + + + &Copy Address + 复制地址 + + + Copy &Label + 复制标签 + + + &Edit + 编辑 + + + Export Address List + 导出地址列表 + + + Comma separated file (*.csv) + 逗号分隔文件 (*.csv) + + + Exporting Failed + 导出失败 + + + There was an error trying to save the address list to %1. Please try again. + 存储地址列表到 %1 时发生错误。请再试一次。 + + AddressTableModel - + + Label + 标签 + + + Address + 地址 + + + (no label) + (无标签) + + AskPassphraseDialog @@ -63,7 +131,95 @@ Repeat new passphrase 重复新密码 - + + Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>. + 输入钱包的新密码。<br/>密码请用<b>10 个以上的随机字符</b>,或是<b>8 个以上的字词</b>。 + + + Encrypt wallet + 加密钱包 + + + This operation needs your wallet passphrase to unlock the wallet. + 这个操作需要你的钱包密码来解锁钱包。 + + + Unlock wallet + 解锁钱包 + + + This operation needs your wallet passphrase to decrypt the wallet. + 这个操作需要你的钱包密码来把钱包解密。 + + + Decrypt wallet + 解密钱包 + + + Change passphrase + 修改密码 + + + Enter the old passphrase and new passphrase to the wallet. + 请输入钱包的旧密码和新密码。 + + + Confirm wallet encryption + 确认钱包加密 + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + 警告: 如果把钱包加密后又忘记密码,你就会从此<b>失去其中所有的比特币了</b>! + + + Are you sure you wish to encrypt your wallet? + 你确定要把钱包加密吗? + + + Wallet encrypted + 钱包已加密 + + + %1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer. + %1 现在要关闭,以完成加密过程。请注意,加密钱包不能完全防止入侵你的电脑的恶意程序偷取钱币。 + + + 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. + 重要: 请改用新产生的有加密的钱包文件,来取代旧钱包文件的备份。为了安全性,当你开始使用新的有加密的钱包后,旧钱包文件的备份就不能再使用了。 + + + Wallet encryption failed + 钱包加密失败 + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + 因为内部错误导致钱包加密失败。你的钱包还是没加密。 + + + The supplied passphrases do not match. + 提供的密码不yi'zhi。 + + + Wallet unlock failed + 钱包解锁失败 + + + The passphrase entered for the wallet decryption was incorrect. + 输入用来解密钱包的密码不正确。 + + + Wallet decryption failed + 钱包解密失败 + + + Wallet passphrase was successfully changed. + 钱包密码修改成功。 + + + Warning: The Caps Lock key is on! + 警告: 大写字母锁定已开启! + + BanTableModel @@ -115,7 +271,7 @@ &About %1 - &关于 %1 + 关于 %1 Show information about %1 @@ -243,7 +399,7 @@ Request payments (generates QR codes and bitcoin: URIs) - 请求支付(生成二维码和 bitcoin: URI) + 请求支付 (生成二维码和 bitcoin: URI) Show the list of used sending addresses and labels @@ -255,7 +411,7 @@ Open a bitcoin: URI or payment request - 打开一个比特币:URI 或支付请求 + 打开一个 bitcoin: URI 或支付请求 &Command-line options @@ -388,7 +544,7 @@ CoinControlDialog Coin Selection - 币源选择(Coin Selection) + 选择钱币 Quantity: @@ -462,7 +618,151 @@ Priority 优先级 - + + Copy address + 复制地址 + + + Copy label + 复制标签 + + + Copy amount + 复制金额 + + + Copy transaction ID + 复制交易识别码 + + + Lock unspent + 锁定未花费 + + + Unlock unspent + 解锁未花费 + + + Copy quantity + 复制数目 + + + Copy fee + 复制手续费 + + + Copy after fee + 复制计费后金额 + + + Copy bytes + 复制字节数 + + + Copy priority + 复制优先度 + + + Copy dust + 复制零散金额 + + + Copy change + 复制找零金额 + + + highest + 最高 + + + higher + 很高 + + + high + + + + medium-high + 中高 + + + medium + 中等 + + + low-medium + 中低 + + + low + + + + lower + 很低 + + + lowest + 最低 + + + (%1 locked) + (锁定 %1 枚) + + + none + + + + yes + + + + no + + + + This label turns red if the transaction size is greater than 1000 bytes. + 当交易大小大于 1000 字节时,文字会变红色。 + + + This means a fee of at least %1 per kB is required. + 表示每一千字节(kB)需要至少 %1 的手续费。 + + + Can vary +/- 1 byte per input. + 每组输入可能会误差多或少 1 个字节。 + + + Transactions with higher priority are more likely to get included into a block. + 优先度较高的交易比较有可能被接受放进区块中。 + + + This label turns red if the priority is smaller than "medium". + 当优先度低于“中等”时,文字会变红色。 + + + This label turns red if any recipient receives an amount smaller than the current dust threshold. + 当任何一个收款金额小于目前的零散金额上限时,文字会变红色。 + + + Can vary +/- %1 satoshi(s) per input. + 每组输入可能有 +/- %1 个 satoshi 的误差。 + + + (no label) + (无标签) + + + change from %1 (%2) + 找零前是 %1 (%2) + + + (change) + (找零) + + EditAddressDialog @@ -485,7 +785,39 @@ &Address 地址(&A) - + + New receiving address + 新建收款地址 + + + New sending address + 新建付款地址 + + + Edit receiving address + 编辑收款地址 + + + Edit sending address + 编辑付款地址 + + + The entered address "%1" is not a valid Bitcoin address. + 输入的地址 %1 并不是有效的比特币地址。 + + + The entered address "%1" is already in the address book. + 输入的地址 %1 已经存在地址簿。 + + + Could not unlock wallet. + 无法将钱包解锁。 + + + New key generation failed. + 产生新的密钥失败了。 + + FreespaceChecker @@ -580,6 +912,10 @@ 由于这是第一次启动此程序,您可以选择%1的数据所存储的位置 + %1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + %1 会下载并存储一份比特币区块链的副本。至少有 %2GB 的数据会存储到这个目录中,并且还会持续增长。另外钱包资料也会储存在这个目录。 + + Use the default data directory 使用默认的数据目录 @@ -622,7 +958,11 @@ Select payment request file 选择付款请求文件 - + + Select payment request file to open + 选择要打开的付款请求文件 + + OptionsDialog @@ -634,6 +974,14 @@ 主要(&M) + Automatically start %1 after logging in to the system. + 在登入系统后自动启动 %1 + + + &Start %1 on system login + 系统登入时启动 %1 + + Size of &database cache 数据库缓存大小(&D) @@ -759,7 +1107,7 @@ Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services. - 在Tor匿名网络下通过不同的SOCKS5代理连接比特币网络 + 在 Tor 匿名网络下通过不同的 SOCKS5 代理连接比特币网络 Use separate SOCKS5 proxy to reach peers via Tor hidden services: @@ -770,6 +1118,14 @@ 窗口(&W) + &Hide the icon from the system tray. + 不在通知区显示图标 + + + Hide tray icon + 不显示通知区图标 + + Show only a tray icon after minimizing the window. 最小化窗口后仅显示托盘图标 @@ -790,6 +1146,10 @@ 用户界面语言(&L): + The user interface language can be set here. This setting will take effect after restarting %1. + 可以在这里设定用户界面的语言。这个设定在重启 %1 后才会生效。 + + &Unit to show amounts in: 比特币金额单位(&U): @@ -846,7 +1206,7 @@ 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. - 现在显示的消息可能是过期的. 在连接上比特币网络节点后,您的钱包将自动与网络同步,但是这个过程还没有完成。 + 现在显示的消息可能是过期的。在连接上比特币网络节点后,您的钱包将自动与网络同步,但是这个过程还没有完成。 Watch-only: @@ -915,7 +1275,56 @@ PaymentServer - + + Payment request error + 要求付款时发生错误 + + + Cannot start bitcoin: click-to-pay handler + 无法启动 bitcoin 协议的“ +一键支付”处理器 + + + URI handling + URI 处理 + + + Payment request fetch URL is invalid: %1 + 取得付款请求的 URL 无效: %1 + + + Invalid payment address %1 + 无效的付款地址 %1 + + + URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. + 无法解析 URI 地址!可能是因为比特币地址无效,或是 URI 参数格式错误。 + + + Payment request file handling + 处理付款请求文件 + + + Payment request file cannot be read! This can be caused by an invalid payment request file. + 无法读取付款请求文件!可能是文件无效造成的。 + + + Payment request rejected + 付款请求已被拒绝 + + + Payment request network doesn't match client network. + 付款请求的网络类型跟客户端不符。 + + + Payment request expired. + 付款请求已过期。 + + + Payment acknowledged + 付款已确认 + + PeerTableModel @@ -972,7 +1381,23 @@ QRImageWidget - + + &Save Image... + 保存图片(&S)... + + + &Copy Image + 复制图片 + + + Save QR Code + 保存二维码 + + + PNG Image (*.png) + PNG 图像(*.png) + + RPCConsole @@ -1000,6 +1425,10 @@ 使用的 BerkeleyDB 版本 + Datadir + 数据目录 + + Startup time 启动时间 @@ -1084,6 +1513,14 @@ 用户代理 + Decrease font size + 缩小文字 + + + Increase font size + 放大文字 + + Services 服务 @@ -1108,6 +1545,10 @@ Ping 时间 + The duration of a currently outstanding ping. + 目前这一次 ping 已经过去的时间。 + + Ping Wait Ping等待 @@ -1141,7 +1582,7 @@ In: - 输入: + 输入: Out: @@ -1184,6 +1625,10 @@ (&U)允许节点连接 + Welcome to the %1 RPC console. + 欢迎使用 %1 的 RPC 控制台。 + + Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. 使用上下方向键浏览历史, <b>Ctrl-L</b>清除屏幕。 @@ -1310,7 +1755,19 @@ Remove 移除 - + + Copy label + 复制标签 + + + Copy message + 复制消息 + + + Copy amount + 复制金额 + + ReceiveRequestDialog @@ -1329,9 +1786,53 @@ &Save Image... 保存图片(&S)... - + + URI + URI + + + Address + 地址 + + + Amount + 金额 + + + Label + 标签 + + + Message + 消息 + + + Error encoding URI into QR Code. + 把 URI 编码成二维码时发生错误。 + + RecentRequestsTableModel + + Date + 日期 + + + Label + 标签 + + + Message + 消息 + + + (no label) + (无标签) + + + (no message) + (无消息) + SendCoinsDialog @@ -1483,7 +1984,59 @@ S&end 发送(&E) - + + Copy quantity + 复制数目 + + + Copy amount + 复制金额 + + + Copy fee + 复制手续费 + + + Copy after fee + 复制计费后金额 + + + Copy bytes + 复制字节数 + + + Copy priority + 复制优先度 + + + Copy dust + 复制零散金额 + + + Copy change + 复制找零金额 + + + Total Amount %1 + 总金额 %1 + + + or + + + + Payment request expired. + 付款请求已过期。 + + + Warning: Invalid Bitcoin address + 警告: 比特币地址无效 + + + (no label) + (无标签) + + SendCoinsEntry @@ -1565,10 +2118,18 @@ SendConfirmationDialog - + + Yes + + + ShutdownWindow + %1 is shutting down... + 正在关闭 %1 ... + + Do not shut down the computer until this window disappears. 在此窗口消失前不要关闭计算机。 @@ -1676,7 +2237,43 @@ TransactionDesc - + + Date + 日期 + + + Message + 消息 + + + Merchant + 商家 + + + Debug information + 调试信息 + + + Transaction + 交易 + + + Inputs + 输入 + + + Amount + 金额 + + + true + + + + false + + + TransactionDescDialog @@ -1686,10 +2283,130 @@ TransactionTableModel + + Date + 日期 + + + Type + 种类 + + + Label + 标签 + + + Received with + 收款 + + + Sent to + 付款 + + + Mined + 挖矿所得 + + + (no label) + (无标签) + TransactionView - + + All + 全部 + + + Today + 今天 + + + This week + 这星期 + + + This month + 这个月 + + + Last month + 上个月 + + + This year + 今年 + + + Range... + 指定范围... + + + Received with + 收款 + + + Sent to + 付款 + + + To yourself + 给自己 + + + Mined + 挖矿所得 + + + Other + 其它 + + + Copy address + 复制地址 + + + Copy label + 复制标签 + + + Copy amount + 复制金额 + + + Copy transaction ID + 复制交易识别码 + + + Comma separated file (*.csv) + 逗号分隔文件 (*.csv) + + + Date + 日期 + + + Type + 种类 + + + Label + 标签 + + + Address + 地址 + + + Exporting Failed + 导出失败 + + + to + + + UnitDisplayStatusBarControl @@ -1705,6 +2422,18 @@ WalletView + + Backup Wallet + 备份钱包 + + + Backup Failed + 备份失败 + + + Backup Successful + 备份成功 + bitcoin-core @@ -1779,7 +2508,11 @@ Bitcoin Core - 比特币核心 + Bitcoin Core + + + The %s developers + %s 开发人员 -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. @@ -1862,6 +2595,10 @@ 连接选项: + Copyright (C) %i-%i + 版权所有 (C) %i-%i + + Corrupted block database detected 检测发现数据块数据库损坏。请使用 -reindex参数重启客户端。 @@ -1906,6 +2643,10 @@ Error initializing wallet database environment %s! + Error loading %s + 载入 %s 时发生错误 + + Error loading block database 导入数据块数据库出错 @@ -1978,6 +2719,14 @@ 指定钱包文件(数据目录内) + Starting network threads... + 正在启动网络线程... + + + The source code is available from %s. + 源代码可以在 %s 获得。 + + Unsupported argument -benchmark ignored, use -debug=bench. 忽略不支持的选项 -benchmark,使用 -debug=bench @@ -1999,11 +2748,11 @@ Verifying blocks... - 正在验证数据库的完整性... + 正在验证区块... Verifying wallet... - 正在检测钱包的完整性... + 正在验证钱包... Wallet %s resides outside data directory %s @@ -2106,6 +2855,10 @@ 读取数据库出错,关闭中。 + Imports blocks from external blk000??.dat file on startup + 启动时从其他来源的 blk000??.dat 文件导入区块 + + Information 信息 @@ -2134,6 +2887,10 @@ RPC 服务器选项: + Reducing -maxconnections from %d to %d, because of system limitations. + 因为系统的限制,将 -maxconnections 参数从 %d 降到了 %d + + Rescan the block chain for missing wallet transactions on startup 重新扫描区块链以查找遗漏的钱包交易 @@ -2166,6 +2923,14 @@ 这是实验性的软件。 + Tor control port password (default: empty) + Tor 控制端口密码 (默认值: 空白) + + + Tor control port to use if onion listening enabled (default: %s) + 开启监听 onion 连接时的 Tor 控制端口号 (默认值: %s) + + Transaction amount too small 交易量太小 @@ -2198,12 +2963,16 @@ 警告 + Warning: unknown new rules activated (versionbit %i) + 警告: 不明的交易规则被启用了(versionbit %i) + + Whether to operate in a blocks only mode (default: %u) 是否用块方进行 (%u) Zapping all transactions from wallet... - Zapping all transactions from wallet... + 正在消除錢包中的所有交易... ZeroMQ notification options: @@ -2231,6 +3000,22 @@ (1 = 保留 tx meta data , 如 account owner 和 payment request information, 2 = 不保留 tx meta data) + -maxtxfee is set very high! Fees this large could be paid on a single transaction. + 参数 -maxtxfee 设定了很高的金额!这是你一次交易就有可能付出的最高手续费。 + + + -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + 参数 -paytxfee 设定了很高的金额!这是你交易付款时所要付的手续费。 + + + Do not keep transactions in the mempool longer than <n> hours (default: %u) + 不要让交易留在内存池中超过 <n> 个小时 (默认值: %u) + + + Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s) + 当产生交易时,如果每千字节 (kB) 的手续费比这个值 (单位是 %s) 低,就视为没支付手续费 (默认值: %s) + + How thorough the block verification of -checkblocks is (0-4, default: %u) 数据块验证 严密级别 -checkblocks (0-4, 默认: %u) @@ -2247,10 +3032,22 @@ 输出调试信息 (默认: %u, 提供 <category> 是可选项) + Support filtering of blocks and transaction with bloom filters (default: %u) + 支持用 Bloom 过滤器来过滤区块和交易(默认值: %u) + + + Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments. + 网络版本字符串的总长度 (%i) 超过最大长度 (%i) 了。请减少 uacomment 参数的数目或长度。 + + Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d) 尝试保持上传带宽低于(MiB/24h),0=无限制(默认:%d) + Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. + 找到不再支持的 -socks 参数。现在只支持 SOCKS5 协议的代理服务器,因此不可以指定 SOCKS 协议版本。 + + Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. 一个不被支持的参数 -whitelistalwaysrelay 被忽略了。请使用 -whitelistrelay 或者 -whitelistforcerelay. @@ -2259,6 +3056,10 @@ 通过Tor隐藏服务连接节点时 使用不同的SOCKS5代理 (默认: %s) + Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times + JSON-RPC 连接要使用的用户名和散列密码。<userpw> 的格式是:<用户名>:<盐>$<散列值>。在 share/rpcuser 目录下有一个示范的 python 脚本。这个选项可以被多次指定。 + + Warning: Unknown block versions being mined! It's possible unknown rules are in effect 警告: 未知的区块版本被挖掘!未知规则可能已生效 @@ -2356,7 +3157,7 @@ Loading block index... - 正在加载数据块索引... + 正在加载区块索引... Add a node to connect to and attempt to keep the connection open From bdd6d4c97df2052fe160f12ac507ec5946f91a07 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Fri, 2 Dec 2016 15:29:20 -0500 Subject: [PATCH 288/302] SelectCoinsMinConf: Prefer coins with fewer ancestors --- src/txmempool.cpp | 7 ++++ src/txmempool.h | 3 ++ src/wallet/test/wallet_tests.cpp | 74 ++++++++++++++++++++-------------------- src/wallet/wallet.cpp | 19 ++++++++--- src/wallet/wallet.h | 4 ++- 5 files changed, 65 insertions(+), 42 deletions(-) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 59afb2cf5ab..a7056554ad1 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1134,3 +1134,10 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector* pvNoSpendsRe if (maxFeeRateRemoved > CFeeRate(0)) LogPrint("mempool", "Removed %u txn, rolling minimum fee bumped to %s\n", nTxnRemoved, maxFeeRateRemoved.ToString()); } + +bool CTxMemPool::TransactionWithinChainLimit(const uint256& txid, size_t chainLimit) const { + LOCK(cs); + if (exists(txid) && std::max(mapTx.find(txid)->GetCountWithAncestors(), mapTx.find(txid)->GetCountWithDescendants()) >= chainLimit) + return false; + return true; +} diff --git a/src/txmempool.h b/src/txmempool.h index afb328b5af3..8129a05375f 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -595,6 +595,9 @@ class CTxMemPool /** Expire all transaction (and their dependencies) in the mempool older than time. Return the number of removed transactions. */ int Expire(int64_t time); + /** Returns false if the transaction is in the mempool and not within the chain limit specified. */ + bool TransactionWithinChainLimit(const uint256& txid, size_t chainLimit) const; + unsigned long size() { LOCK(cs); diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index c6c5058984c..38637b2d5c1 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -78,24 +78,24 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) empty_wallet(); // with an empty wallet we can't even pay one cent - BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet)); add_coin(1*CENT, 4); // add a new 1 cent coin // with a new 1 cent coin, we still can't find a mature 1 cent - BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet)); // but we can find a new 1 cent - BOOST_CHECK( wallet.SelectCoinsMinConf( 1 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf( 1 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1 * CENT); add_coin(2*CENT); // add a mature 2 cent coin // we can't make 3 cents of mature coins - BOOST_CHECK(!wallet.SelectCoinsMinConf( 3 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(!wallet.SelectCoinsMinConf( 3 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet)); // we can make 3 cents of new coins - BOOST_CHECK( wallet.SelectCoinsMinConf( 3 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf( 3 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 3 * CENT); add_coin(5*CENT); // add a mature 5 cent coin, @@ -105,33 +105,33 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) // now we have new: 1+10=11 (of which 10 was self-sent), and mature: 2+5+20=27. total = 38 // we can't make 38 cents only if we disallow new coins: - BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet)); // we can't even make 37 cents if we don't allow new coins even if they're from us - BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 6, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 6, 6, 0, vCoins, setCoinsRet, nValueRet)); // but we can make 37 cents if we accept new coins from ourself - BOOST_CHECK( wallet.SelectCoinsMinConf(37 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(37 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 37 * CENT); // and we can make 38 cents if we accept all new coins - BOOST_CHECK( wallet.SelectCoinsMinConf(38 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(38 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 38 * CENT); // try making 34 cents from 1,2,5,10,20 - we can't do it exactly - BOOST_CHECK( wallet.SelectCoinsMinConf(34 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(34 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 35 * CENT); // but 35 cents is closest BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U); // the best should be 20+10+5. it's incredibly unlikely the 1 or 2 got included (but possible) // when we try making 7 cents, the smaller coins (1,2,5) are enough. We should see just 2+5 - BOOST_CHECK( wallet.SelectCoinsMinConf( 7 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf( 7 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 7 * CENT); BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); // when we try making 8 cents, the smaller coins (1,2,5) are exactly enough. - BOOST_CHECK( wallet.SelectCoinsMinConf( 8 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf( 8 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK(nValueRet == 8 * CENT); BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U); // when we try making 9 cents, no subset of smaller coins is enough, and we get the next bigger coin (10) - BOOST_CHECK( wallet.SelectCoinsMinConf( 9 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf( 9 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 10 * CENT); BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); @@ -145,30 +145,30 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin(30*CENT); // now we have 6+7+8+20+30 = 71 cents total // check that we have 71 and not 72 - BOOST_CHECK( wallet.SelectCoinsMinConf(71 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); - BOOST_CHECK(!wallet.SelectCoinsMinConf(72 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(71 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(!wallet.SelectCoinsMinConf(72 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); // now try making 16 cents. the best smaller coins can do is 6+7+8 = 21; not as good at the next biggest coin, 20 - BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 20 * CENT); // we should get 20 in one coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); add_coin( 5*CENT); // now we have 5+6+7+8+20+30 = 75 cents total // now if we try making 16 cents again, the smaller coins can make 5+6+7 = 18 cents, better than the next biggest coin, 20 - BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 18 * CENT); // we should get 18 in 3 coins BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U); add_coin( 18*CENT); // now we have 5+6+7+8+18+20+30 // and now if we try making 16 cents again, the smaller coins can make 5+6+7 = 18 cents, the same as the next biggest coin, 18 - BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 18 * CENT); // we should get 18 in 1 coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); // because in the event of a tie, the biggest coin wins // now try making 11 cents. we should get 5+6 - BOOST_CHECK( wallet.SelectCoinsMinConf(11 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(11 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 11 * CENT); BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); @@ -177,11 +177,11 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin( 2*COIN); add_coin( 3*COIN); add_coin( 4*COIN); // now we have 5+6+7+8+18+20+30+100+200+300+400 = 1094 cents - BOOST_CHECK( wallet.SelectCoinsMinConf(95 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(95 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1 * COIN); // we should get 1 BTC in 1 coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); - BOOST_CHECK( wallet.SelectCoinsMinConf(195 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(195 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 2 * COIN); // we should get 2 BTC in 1 coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); @@ -196,14 +196,14 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) // try making 1 * MIN_CHANGE from the 1.5 * MIN_CHANGE // we'll get change smaller than MIN_CHANGE whatever happens, so can expect MIN_CHANGE exactly - BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, MIN_CHANGE); // but if we add a bigger coin, small change is avoided add_coin(1111*MIN_CHANGE); // try making 1 from 0.1 + 0.2 + 0.3 + 0.4 + 0.5 + 1111 = 1112.5 - BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1 * MIN_CHANGE); // we should get the exact amount // if we add more small coins: @@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin(MIN_CHANGE * 7 / 10); // and try again to make 1.0 * MIN_CHANGE - BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1 * MIN_CHANGE); // we should get the exact amount // run the 'mtgox' test (see http://blockexplorer.com/tx/29a3efd3ef04f9153d47a990bd7b048a4b2d213daaa5fb8ed670fb85f13bdbcf) @@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) for (int i = 0; i < 20; i++) add_coin(50000 * COIN); - BOOST_CHECK( wallet.SelectCoinsMinConf(500000 * COIN, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(500000 * COIN, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 500000 * COIN); // we should get the exact amount BOOST_CHECK_EQUAL(setCoinsRet.size(), 10U); // in ten coins @@ -233,7 +233,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin(MIN_CHANGE * 6 / 10); add_coin(MIN_CHANGE * 7 / 10); add_coin(1111 * MIN_CHANGE); - BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1111 * MIN_CHANGE); // we get the bigger coin BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); @@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin(MIN_CHANGE * 6 / 10); add_coin(MIN_CHANGE * 8 / 10); add_coin(1111 * MIN_CHANGE); - BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, MIN_CHANGE); // we should get the exact amount BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); // in two coins 0.4+0.6 @@ -254,12 +254,12 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) add_coin(MIN_CHANGE * 100); // trying to make 100.01 from these three coins - BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 10001 / 100, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 10001 / 100, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, MIN_CHANGE * 10105 / 100); // we should get all coins BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U); // but if we try to make 99.9, we should take the bigger of the two small coins to avoid small change - BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 9990 / 100, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 9990 / 100, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 101 * MIN_CHANGE); BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); @@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) // Create 676 inputs (= MAX_STANDARD_TX_SIZE / 148 bytes per input) for (uint16_t j = 0; j < 676; j++) add_coin(amt); - BOOST_CHECK(wallet.SelectCoinsMinConf(2000, 1, 1, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(2000, 1, 1, 0, vCoins, setCoinsRet, nValueRet)); if (amt - 2000 < MIN_CHANGE) { // needs more than one input: uint16_t returnSize = std::ceil((2000.0 + MIN_CHANGE)/amt); @@ -291,8 +291,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) // picking 50 from 100 coins doesn't depend on the shuffle, // but does depend on randomness in the stochastic approximation code - BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, vCoins, setCoinsRet , nValueRet)); - BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, vCoins, setCoinsRet2, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, 0, vCoins, setCoinsRet , nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, 0, vCoins, setCoinsRet2, nValueRet)); BOOST_CHECK(!equal_sets(setCoinsRet, setCoinsRet2)); int fails = 0; @@ -300,8 +300,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) { // selecting 1 from 100 identical coins depends on the shuffle; this test will fail 1% of the time // run the test RANDOM_REPEATS times and only complain if all of them fail - BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, vCoins, setCoinsRet , nValueRet)); - BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, vCoins, setCoinsRet2, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, 0, vCoins, setCoinsRet , nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, 0, vCoins, setCoinsRet2, nValueRet)); if (equal_sets(setCoinsRet, setCoinsRet2)) fails++; } @@ -321,8 +321,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests) { // selecting 1 from 100 identical coins depends on the shuffle; this test will fail 1% of the time // run the test RANDOM_REPEATS times and only complain if all of them fail - BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, vCoins, setCoinsRet , nValueRet)); - BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, vCoins, setCoinsRet2, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, 0, vCoins, setCoinsRet , nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, 0, vCoins, setCoinsRet2, nValueRet)); if (equal_sets(setCoinsRet, setCoinsRet2)) fails++; } @@ -346,7 +346,7 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset) add_coin(1000 * COIN); add_coin(3 * COIN); - BOOST_CHECK(wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet)); + BOOST_CHECK(wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, 0, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1003 * COIN); BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 7f62402625e..1a33744ce9b 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1921,7 +1921,7 @@ static void ApproximateBestSubset(vector vCoins, +bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMine, const int nConfTheirs, const uint64_t nMaxAncestors, vector vCoins, set >& setCoinsRet, CAmount& nValueRet) const { setCoinsRet.clear(); @@ -1946,6 +1946,9 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int if (output.nDepth < (pcoin->IsFromMe(ISMINE_ALL) ? nConfMine : nConfTheirs)) continue; + if (!mempool.TransactionWithinChainLimit(pcoin->GetHash(), nMaxAncestors)) + continue; + int i = output.i; CAmount n = pcoin->vout[i].nValue; @@ -2071,10 +2074,17 @@ bool CWallet::SelectCoins(const vector& vAvailableCoins, const CAmount& ++it; } + size_t nMaxChainLength = std::min(GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT), GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT)); + bool fRejectLongChains = GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS); + bool res = nTargetValue <= nValueFromPresetInputs || - SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 6, vCoins, setCoinsRet, nValueRet) || - SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 1, vCoins, setCoinsRet, nValueRet) || - (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, vCoins, setCoinsRet, nValueRet)); + SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 6, 0, vCoins, setCoinsRet, nValueRet) || + SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 1, 0, vCoins, setCoinsRet, nValueRet) || + (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, 2, vCoins, setCoinsRet, nValueRet)) || + (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, std::min((size_t)4, nMaxChainLength/3), vCoins, setCoinsRet, nValueRet)) || + (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, nMaxChainLength/2, vCoins, setCoinsRet, nValueRet)) || + (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, nMaxChainLength, vCoins, setCoinsRet, nValueRet)) || + (bSpendZeroConfChange && !fRejectLongChains && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, std::numeric_limits::max(), vCoins, setCoinsRet, nValueRet)); // because SelectCoinsMinConf clears the setCoinsRet, we now add the possible inputs to the coinset setCoinsRet.insert(setPresetCoins.begin(), setPresetCoins.end()); @@ -3263,6 +3273,7 @@ std::string CWallet::GetWalletHelpString(bool showDebug) strUsage += HelpMessageOpt("-dblogsize=", strprintf("Flush wallet database activity from memory to disk log every megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE)); strUsage += HelpMessageOpt("-flushwallet", strprintf("Run a thread to flush wallet periodically (default: %u)", DEFAULT_FLUSHWALLET)); strUsage += HelpMessageOpt("-privdb", strprintf("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)", DEFAULT_WALLET_PRIVDB)); + strUsage += HelpMessageOpt("-walletrejectlongchains", strprintf(_("Wallet will not create transactions that violate mempool chain limits (default: %u"), DEFAULT_WALLET_REJECT_LONG_CHAINS)); } return strUsage; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 056dcc5dafa..10f6ea8fed8 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -51,6 +51,8 @@ static const CAmount MIN_CHANGE = CENT; static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true; //! Default for -sendfreetransactions static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false; +//! Default for -walletrejectlongchains +static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false; //! -txconfirmtarget default static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 2; //! Largest (in bytes) free transaction we're willing to create @@ -668,7 +670,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface * completion the coin set and corresponding actual target value is * assembled */ - bool SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, std::vector vCoins, std::set >& setCoinsRet, CAmount& nValueRet) const; + bool SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, uint64_t nMaxAncestors, std::vector vCoins, std::set >& setCoinsRet, CAmount& nValueRet) const; bool IsSpent(const uint256& hash, unsigned int n) const; From f00066ac513774ba7fcad9e2054b209ffb2c23e8 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Fri, 2 Dec 2016 15:45:43 -0500 Subject: [PATCH 289/302] CreateTransaction: Don't return success with too-many-ancestor txn --- src/wallet/wallet.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 1a33744ce9b..7bcb9aaf11f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2452,6 +2452,21 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt } } + if (GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS)) { + // Lastly, ensure this tx will pass the mempool's chain limits + LockPoints lp; + CTxMemPoolEntry entry(txNew, 0, 0, 0, 0, false, 0, false, 0, lp); + CTxMemPool::setEntries setAncestors; + size_t nLimitAncestors = GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); + size_t nLimitAncestorSize = GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT)*1000; + size_t nLimitDescendants = GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT); + size_t nLimitDescendantSize = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT)*1000; + std::string errString; + if (!mempool.CalculateMemPoolAncestors(entry, setAncestors, nLimitAncestors, nLimitAncestorSize, nLimitDescendants, nLimitDescendantSize, errString)) { + strFailReason = _("Transaction has too long of a mempool chain"); + return false; + } + } return true; } From 4bf2bec18e5f3c613a0bf5c5fa78f6ec14dcc4f5 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Fri, 2 Dec 2016 12:20:29 -0500 Subject: [PATCH 290/302] Test for fix of txn chaining in wallet --- qa/rpc-tests/wallet.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index 3c0dc0f4ea1..992fb8a2d64 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -330,10 +330,12 @@ def run_test (self): # disabled until issue is fixed: https://github.com/bitcoin/bitcoin/issues/7463 # '-salvagewallet', ] + chainlimit = 6 for m in maintenance: print("check " + m) stop_nodes(self.nodes) - self.nodes = start_nodes(3, self.options.tmpdir, [[m]] * 3) + # set lower ancestor limit for later + self.nodes = start_nodes(3, self.options.tmpdir, [[m, "-limitancestorcount="+str(chainlimit)]] * 3) while m == '-reindex' and [block_count] * 3 != [self.nodes[i].getblockcount() for i in range(3)]: # reindex will leave rpc warm up "early"; Wait for it to finish time.sleep(0.1) @@ -346,5 +348,26 @@ def run_test (self): assert_equal(coinbase_tx_1["transactions"][0]["blockhash"], blocks[1]) assert_equal(len(self.nodes[0].listsinceblock(blocks[1])["transactions"]), 0) + # ==Check that wallet prefers to use coins that don't exceed mempool limits ===== + + # Get all non-zero utxos together + chain_addrs = [self.nodes[0].getnewaddress(), self.nodes[0].getnewaddress()] + singletxid = self.nodes[0].sendtoaddress(chain_addrs[0], self.nodes[0].getbalance(), "", "", True) + self.nodes[0].generate(1) + node0_balance = self.nodes[0].getbalance() + # Split into two chains + rawtx = self.nodes[0].createrawtransaction([{"txid":singletxid, "vout":0}], {chain_addrs[0]:node0_balance/2-Decimal('0.01'), chain_addrs[1]:node0_balance/2-Decimal('0.01')}) + signedtx = self.nodes[0].signrawtransaction(rawtx) + singletxid = self.nodes[0].sendrawtransaction(signedtx["hex"]) + txids = [singletxid, singletxid] + self.nodes[0].generate(1) + + # Make a long chain of unconfirmed payments without hitting mempool limit + txid_list = [] + for i in range(chainlimit*2): + txid_list.append(self.nodes[0].sendtoaddress(chain_addrs[0], Decimal('0.0001'))) + assert_equal(self.nodes[0].getmempoolinfo()['size'], chainlimit*2) + assert_equal(len(txid_list), chainlimit*2) + if __name__ == '__main__': WalletTest().main() From e1ff0dbe19c3e7df21206d22bb12c686cd130b4c Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Mon, 19 Dec 2016 09:35:23 -0500 Subject: [PATCH 291/302] reduce number of lookups in TransactionWithinChainLimit --- src/txmempool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index a7056554ad1..63a26da326e 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1137,7 +1137,7 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector* pvNoSpendsRe bool CTxMemPool::TransactionWithinChainLimit(const uint256& txid, size_t chainLimit) const { LOCK(cs); - if (exists(txid) && std::max(mapTx.find(txid)->GetCountWithAncestors(), mapTx.find(txid)->GetCountWithDescendants()) >= chainLimit) - return false; - return true; + auto it = mapTx.find(txid); + return it == mapTx.end() || (it->GetCountWithAncestors() < chainLimit && + it->GetCountWithDescendants() < chainLimit); } From 8e707e868d6020de0d352279eed4fcd0138f3695 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 20 Dec 2016 13:34:57 +0100 Subject: [PATCH 292/302] doc: Add #9382 to release notes --- doc/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index acfb45ae2a9..9d35d8e5fc4 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -118,6 +118,7 @@ git merge commit are mentioned. - #9290 `35174a0` Make RelayWalletTransaction attempt to AcceptToMemoryPool (gmaxwell) - #9295 `43bcfca` Bugfix: Fundrawtransaction: don't terminate when keypool is empty (jonasschnelli) - #9302 `f5d606e` Return txid even if ATMP fails for new transaction (sipa) +- #9262 `fe39f26` Prefer coins that have fewer ancestors, sanity check txn before ATMP (instagibbs) ### Tests and QA - #9159 `eca9b46` Wait for specific block announcement in p2p-compactblocks (ryanofsky) From 20817ce92cc23951d2750076204c66218776f899 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 20 Dec 2016 22:11:45 +0100 Subject: [PATCH 293/302] Bump version to 0.13.2 --- configure.ac | 2 +- doc/Doxyfile | 2 +- doc/README.md | 2 +- doc/README_windows.txt | 2 +- src/clientversion.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index e76a3c7222d..d4e775aefbb 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, 13) -define(_CLIENT_VERSION_REVISION, 1) +define(_CLIENT_VERSION_REVISION, 2) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2016) diff --git a/doc/Doxyfile b/doc/Doxyfile index a5f0aa6c75b..c2af687eca1 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -34,7 +34,7 @@ PROJECT_NAME = "Bitcoin Core" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.13.1 +PROJECT_NUMBER = 0.13.2 # 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 25a280155ca..be2ab7283ab 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Bitcoin Core 0.13.1 +Bitcoin Core 0.13.2 ===================== Setup diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 1127ea76654..0623049da02 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin Core 0.13.1 +Bitcoin Core 0.13.2 ===================== Intro diff --git a/src/clientversion.h b/src/clientversion.h index 74d0a94bfab..eb0ee5973c8 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 13 -#define CLIENT_VERSION_REVISION 1 +#define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 0 //! Set to true for release, false for prerelease or test build From 7a26a34112663b1d4a8de4ce94e5e1b7c97d0869 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 20 Dec 2016 22:17:19 +0100 Subject: [PATCH 294/302] Bump nMinimumChainWork --- src/chainparams.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 69514617b6c..7544e71a023 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -98,7 +98,7 @@ class CMainParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017. // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000002cb971dd56d1c583c20f90"); + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003418b3ccbe5e93bcb39b43"); /** * The message start string is designed to be unlikely to occur in normal data. @@ -198,7 +198,7 @@ class CTestNetParams : public CChainParams { consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017 // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000198b4def2baa9338d6"); + consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000001b3fcc3e766e365e4b"); pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; From 3882c053333ea3deeafdccd38a4bfd40114d776c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 20 Dec 2016 22:48:25 +0100 Subject: [PATCH 295/302] [qt] Bump BLOCK_CHAIN_SIZE --- src/qt/intro.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index 1a241ae0f0e..83b2107d2a2 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -23,7 +23,7 @@ static const uint64_t GB_BYTES = 1000000000LL; /* Minimum free space (in GB) needed for data directory */ -static const uint64_t BLOCK_CHAIN_SIZE = 80; +static const uint64_t BLOCK_CHAIN_SIZE = 100; /* Minimum free space (in GB) needed for data directory when pruned; Does not include prune target */ static const uint64_t CHAIN_STATE_SIZE = 2; /* Total required space (in GB) depending on user choice (prune, not prune) */ From da233db8e09a472cedf21dbc60946a757f52d1af Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 20 Dec 2016 22:43:56 +0100 Subject: [PATCH 296/302] Bump man pages --- contrib/debian/manpages/bitcoin-cli.1 | 95 +++++-- contrib/debian/manpages/bitcoin-qt.1 | 502 +++++++++++++++++++++++++++++++++- contrib/debian/manpages/bitcoin-tx.1 | 107 ++++++++ contrib/debian/manpages/bitcoind.1 | 496 +++++++++++++++++++++++++++++++-- 4 files changed, 1154 insertions(+), 46 deletions(-) create mode 100644 contrib/debian/manpages/bitcoin-tx.1 diff --git a/contrib/debian/manpages/bitcoin-cli.1 b/contrib/debian/manpages/bitcoin-cli.1 index 16c338dd3e5..dbd4745d192 100644 --- a/contrib/debian/manpages/bitcoin-cli.1 +++ b/contrib/debian/manpages/bitcoin-cli.1 @@ -1,21 +1,84 @@ -.TH BITCOIN-CLI "1" "February 2016" "bitcoin-cli 0.12" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH BITCOIN-CLI "1" "December 2016" "bitcoin-cli v0.13.2.0" "User Commands" .SH NAME -bitcoin-cli \- a remote procedure call client for Bitcoin Core. -.SH SYNOPSIS -bitcoin-cli [options] [params] \- Send command to Bitcoin Core. -.TP -bitcoin-cli [options] help \- Asks Bitcoin Core for a list of supported commands. +bitcoin-cli \- manual page for bitcoin-cli v0.13.2.0 .SH DESCRIPTION -This manual page documents the bitcoin-cli program. bitcoin-cli is an RPC client used to send commands to Bitcoin Core. - -.SH OPTIONS +Bitcoin Core RPC client version v0.13.2.0 +.SS "Usage:" +.TP +bitcoin\-cli [options] [params] +Send command to Bitcoin Core .TP -\fB\-?\fR -Show possible options. +bitcoin\-cli [options] help +List commands +.TP +bitcoin\-cli [options] help +Get help for a command +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: bitcoin.conf) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.PP +Chain selection options: +.HP +\fB\-testnet\fR +.IP +Use the test chain +.HP +\fB\-regtest\fR +.IP +Enter regression test mode, which uses a special chain in which blocks +can be solved instantly. This is intended for regression testing +tools and app development. +.HP +\fB\-rpcconnect=\fR +.IP +Send commands to node running on (default: 127.0.0.1) +.HP +\fB\-rpcport=\fR +.IP +Connect to JSON\-RPC on (default: 8332 or testnet: 18332) +.HP +\fB\-rpcwait\fR +.IP +Wait for RPC server to start +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcclienttimeout=\fR +.IP +Timeout during HTTP requests (default: 900) +.HP +\fB\-stdin\fR +.IP +Read extra arguments from standard input, one per line until EOF/Ctrl\-D +(recommended for sensitive information such as passphrases) +.SH COPYRIGHT +Copyright (C) 2009-2016 The Bitcoin Core developers + +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . -.SH "SEE ALSO" -\fBbitcoind\fP, \fBbitcoin.conf\fP -.SH AUTHOR -This manual page was written by Ciemon Dunville . Permission is granted to copy, distribute and/or modify this document under the terms of the MIT License. +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or . -The complete text of the MIT License can be found on the web at \fIhttp://opensource.org/licenses/MIT\fP. +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/contrib/debian/manpages/bitcoin-qt.1 b/contrib/debian/manpages/bitcoin-qt.1 index 685a282080e..e14e1480afd 100644 --- a/contrib/debian/manpages/bitcoin-qt.1 +++ b/contrib/debian/manpages/bitcoin-qt.1 @@ -1,13 +1,501 @@ -.TH BITCOIN-QT "1" "February 2016" "bitcoin-qt 0.12" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH BITCOIN-QT "1" "December 2016" "bitcoin-qt v0.13.2.0" "User Commands" .SH NAME -bitcoin-qt \- peer-to-peer network based digital currency +bitcoin-qt \- manual page for bitcoin-qt v0.13.2.0 .SH DESCRIPTION -.SS "Usage:" +Bitcoin Core version v0.13.2.0 (64\-bit) +Usage: .IP bitcoin\-qt [command\-line options] .SH OPTIONS -.TP +.HP \-? -List options. -.SH "SEE ALSO" -bitcoind(1) +.IP +Print this help message and exit +.HP +\fB\-version\fR +.IP +Print version and exit +.HP +\fB\-alertnotify=\fR +.IP +Execute command when a relevant alert is received or we see a really +long fork (%s in cmd is replaced by message) +.HP +\fB\-blocknotify=\fR +.IP +Execute command when the best block changes (%s in cmd is replaced by +block hash) +.HP +\fB\-checkblocks=\fR +.IP +How many blocks to check at startup (default: 6, 0 = all) +.HP +\fB\-checklevel=\fR +.IP +How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3) +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: bitcoin.conf) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-dbcache=\fR +.IP +Set database cache size in megabytes (4 to 16384, default: 300) +.HP +\fB\-loadblock=\fR +.IP +Imports blocks from external blk000??.dat file on startup +.HP +\fB\-maxorphantx=\fR +.IP +Keep at most unconnectable transactions in memory (default: 100) +.HP +\fB\-maxmempool=\fR +.IP +Keep the transaction memory pool below megabytes (default: 300) +.HP +\fB\-mempoolexpiry=\fR +.IP +Do not keep transactions in the mempool longer than hours (default: +72) +.HP +\fB\-par=\fR +.IP +Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 = +leave that many cores free, default: 0) +.HP +\fB\-pid=\fR +.IP +Specify pid file (default: bitcoind.pid) +.HP +\fB\-prune=\fR +.IP +Reduce storage requirements by pruning (deleting) old blocks. This mode +is incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting +this setting requires re\-downloading the entire blockchain. +(default: 0 = disable pruning blocks, >550 = target size in MiB +to use for block files) +.HP +\fB\-reindex\-chainstate\fR +.IP +Rebuild chain state from the currently indexed blocks +.HP +\fB\-reindex\fR +.IP +Rebuild chain state and block index from the blk*.dat files on disk +.HP +\fB\-sysperms\fR +.IP +Create new files with system default permissions, instead of umask 077 +(only effective with disabled wallet functionality) +.HP +\fB\-txindex\fR +.IP +Maintain a full transaction index, used by the getrawtransaction rpc +call (default: 0) +.PP +Connection options: +.HP +\fB\-addnode=\fR +.IP +Add a node to connect to and attempt to keep the connection open +.HP +\fB\-banscore=\fR +.IP +Threshold for disconnecting misbehaving peers (default: 100) +.HP +\fB\-bantime=\fR +.IP +Number of seconds to keep misbehaving peers from reconnecting (default: +86400) +.HP +\fB\-bind=\fR +.IP +Bind to given address and always listen on it. Use [host]:port notation +for IPv6 +.HP +\fB\-connect=\fR +.IP +Connect only to the specified node(s) +.HP +\fB\-discover\fR +.IP +Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR +or \fB\-proxy\fR) +.HP +\fB\-dns\fR +.IP +Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) +.HP +\fB\-dnsseed\fR +.IP +Query for peer addresses via DNS lookup, if low on addresses (default: 1 +unless \fB\-connect\fR) +.HP +\fB\-externalip=\fR +.IP +Specify your own public address +.HP +\fB\-forcednsseed\fR +.IP +Always query for peer addresses via DNS lookup (default: 0) +.HP +\fB\-listen\fR +.IP +Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR) +.HP +\fB\-listenonion\fR +.IP +Automatically create Tor hidden service (default: 1) +.HP +\fB\-maxconnections=\fR +.IP +Maintain at most connections to peers (default: 125) +.HP +\fB\-maxreceivebuffer=\fR +.IP +Maximum per\-connection receive buffer, *1000 bytes (default: 5000) +.HP +\fB\-maxsendbuffer=\fR +.IP +Maximum per\-connection send buffer, *1000 bytes (default: 1000) +.HP +\fB\-maxtimeadjustment\fR +.IP +Maximum allowed median peer time offset adjustment. Local perspective of +time may be influenced by peers forward or backward by this +amount. (default: 4200 seconds) +.HP +\fB\-onion=\fR +.IP +Use separate SOCKS5 proxy to reach peers via Tor hidden services +(default: \fB\-proxy\fR) +.HP +\fB\-onlynet=\fR +.IP +Only connect to nodes in network (ipv4, ipv6 or onion) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay non\-P2SH multisig (default: 1) +.HP +\fB\-peerbloomfilters\fR +.IP +Support filtering of blocks and transaction with bloom filters (default: +1) +.HP +\fB\-port=\fR +.IP +Listen for connections on (default: 8333 or testnet: 18333) +.HP +\fB\-proxy=\fR +.IP +Connect through SOCKS5 proxy +.HP +\fB\-proxyrandomize\fR +.IP +Randomize credentials for every proxy connection. This enables Tor +stream isolation (default: 1) +.HP +\fB\-rpcserialversion\fR +.IP +Sets the serialization of raw transaction or block hex returned in +non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1) +.HP +\fB\-seednode=\fR +.IP +Connect to a node to retrieve peer addresses, and disconnect +.HP +\fB\-timeout=\fR +.IP +Specify connection timeout in milliseconds (minimum: 1, default: 5000) +.HP +\fB\-torcontrol=\fR: +.IP +Tor control port to use if onion listening enabled (default: +127.0.0.1:9051) +.HP +\fB\-torpassword=\fR +.IP +Tor control port password (default: empty) +.HP +\fB\-whitebind=\fR +.IP +Bind to given address and whitelist peers connecting to it. Use +[host]:port notation for IPv6 +.HP +\fB\-whitelist=\fR +.IP +Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or +CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple +times. Whitelisted peers cannot be DoS banned and their +transactions are always relayed, even if they are already in the +mempool, useful e.g. for a gateway +.HP +\fB\-whitelistrelay\fR +.IP +Accept relayed transactions received from whitelisted peers even when +not relaying transactions (default: 1) +.HP +\fB\-whitelistforcerelay\fR +.IP +Force relay of transactions from whitelisted peers even if they violate +local relay policy (default: 1) +.HP +\fB\-maxuploadtarget=\fR +.IP +Tries to keep outbound traffic under the given target (in MiB per 24h), +0 = no limit (default: 0) +.PP +Wallet options: +.HP +\fB\-disablewallet\fR +.IP +Do not load the wallet and disable wallet RPC calls +.HP +\fB\-keypool=\fR +.IP +Set key pool size to (default: 100) +.HP +\fB\-fallbackfee=\fR +.IP +A fee rate (in BTC/kB) that will be used when fee estimation has +insufficient data (default: 0.0002) +.HP +\fB\-mintxfee=\fR +.IP +Fees (in BTC/kB) smaller than this are considered zero fee for +transaction creation (default: 0.00001) +.HP +\fB\-paytxfee=\fR +.IP +Fee (in BTC/kB) to add to transactions you send (default: 0.00) +.HP +\fB\-rescan\fR +.IP +Rescan the block chain for missing wallet transactions on startup +.HP +\fB\-salvagewallet\fR +.IP +Attempt to recover private keys from a corrupt wallet on startup +.HP +\fB\-spendzeroconfchange\fR +.IP +Spend unconfirmed change when sending transactions (default: 1) +.HP +\fB\-txconfirmtarget=\fR +.IP +If paytxfee is not set, include enough fee so transactions begin +confirmation on average within n blocks (default: 2) +.HP +\fB\-usehd\fR +.IP +Use hierarchical deterministic key generation (HD) after BIP32. Only has +effect during wallet creation/first start (default: 1) +.HP +\fB\-upgradewallet\fR +.IP +Upgrade wallet to latest format on startup +.HP +\fB\-wallet=\fR +.IP +Specify wallet file (within data directory) (default: wallet.dat) +.HP +\fB\-walletbroadcast\fR +.IP +Make the wallet broadcast transactions (default: 1) +.HP +\fB\-walletnotify=\fR +.IP +Execute command when a wallet transaction changes (%s in cmd is replaced +by TxID) +.HP +\fB\-zapwallettxes=\fR +.IP +Delete all wallet transactions and only recover those parts of the +blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. +account owner and payment request information, 2 = drop tx meta +data) +.PP +Debugging/Testing options: +.HP +\fB\-uacomment=\fR +.IP +Append comment to the user agent string +.HP +\fB\-debug=\fR +.IP +Output debugging information (default: 0, supplying is +optional). If is not supplied or if = 1, +output all debugging information. can be: addrman, +alert, bench, cmpctblock, coindb, db, http, libevent, lock, +mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, +selectcoins, tor, zmq, qt. +.HP +\fB\-help\-debug\fR +.IP +Show all debugging options (usage: \fB\-\-help\fR \fB\-help\-debug\fR) +.HP +\fB\-logips\fR +.IP +Include IP addresses in debug output (default: 0) +.HP +\fB\-logtimestamps\fR +.IP +Prepend debug output with timestamp (default: 1) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/kB) smaller than this are considered zero fee for relaying, +mining and transaction creation (default: 0.00001) +.HP +\fB\-maxtxfee=\fR +.IP +Maximum total fees (in BTC) to use in a single wallet transaction or raw +transaction; setting this too low may abort large transactions +(default: 0.10) +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console instead of debug.log file +.HP +\fB\-shrinkdebugfile\fR +.IP +Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) +.PP +Chain selection options: +.HP +\fB\-testnet\fR +.IP +Use the test chain +.PP +Node relay options: +.HP +\fB\-bytespersigop\fR +.IP +Equivalent bytes per sigop in transactions for relay and mining +(default: 20) +.HP +\fB\-datacarrier\fR +.IP +Relay and mine data carrier transactions (default: 1) +.HP +\fB\-datacarriersize\fR +.IP +Maximum size of data in data carrier transactions we relay and mine +(default: 83) +.HP +\fB\-mempoolreplacement\fR +.IP +Enable transaction replacement in the memory pool (default: 1) +.PP +Block creation options: +.HP +\fB\-blockmaxweight=\fR +.IP +Set maximum BIP141 block weight (default: 3000000) +.HP +\fB\-blockmaxsize=\fR +.IP +Set maximum block size in bytes (default: 750000) +.HP +\fB\-blockprioritysize=\fR +.IP +Set maximum size of high\-priority/low\-fee transactions in bytes +(default: 0) +.PP +RPC server options: +.HP +\fB\-server\fR +.IP +Accept command line and JSON\-RPC commands +.HP +\fB\-rest\fR +.IP +Accept public REST requests (default: 0) +.HP +\fB\-rpcbind=\fR +.IP +Bind to given address to listen for JSON\-RPC connections. Use +[host]:port notation for IPv6. This option can be specified +multiple times (default: bind to all interfaces) +.HP +\fB\-rpccookiefile=\fR +.IP +Location of the auth cookie (default: data dir) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcauth=\fR +.IP +Username and hashed password for JSON\-RPC connections. The field + comes in the format: :$. A +canonical python script is included in share/rpcuser. This option +can be specified multiple times +.HP +\fB\-rpcport=\fR +.IP +Listen for JSON\-RPC connections on (default: 8332 or testnet: +18332) +.HP +\fB\-rpcallowip=\fR +.IP +Allow JSON\-RPC connections from specified source. Valid for are a +single IP (e.g. 1.2.3.4), a network/netmask (e.g. +1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This +option can be specified multiple times +.HP +\fB\-rpcthreads=\fR +.IP +Set the number of threads to service RPC calls (default: 4) +.PP +UI Options: +.HP +\fB\-choosedatadir\fR +.IP +Choose data directory on startup (default: 0) +.HP +\fB\-lang=\fR +.IP +Set language, for example "de_DE" (default: system locale) +.HP +\fB\-min\fR +.IP +Start minimized +.HP +\fB\-rootcertificates=\fR +.IP +Set SSL root certificates for payment request (default: \fB\-system\-\fR) +.HP +\fB\-splash\fR +.IP +Show splash screen on startup (default: 1) +.HP +\fB\-resetguisettings\fR +.IP +Reset all settings changed in the GUI +.SH COPYRIGHT +Copyright (C) 2009-2016 The Bitcoin Core developers + +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/contrib/debian/manpages/bitcoin-tx.1 b/contrib/debian/manpages/bitcoin-tx.1 new file mode 100644 index 00000000000..0cbb4ad58fc --- /dev/null +++ b/contrib/debian/manpages/bitcoin-tx.1 @@ -0,0 +1,107 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH BITCOIN-TX "1" "December 2016" "bitcoin-tx v0.13.2.0" "User Commands" +.SH NAME +bitcoin-tx \- manual page for bitcoin-tx v0.13.2.0 +.SH DESCRIPTION +Bitcoin Core bitcoin\-tx utility version v0.13.2.0 +.SS "Usage:" +.TP +bitcoin\-tx [options] [commands] +Update hex\-encoded bitcoin transaction +.TP +bitcoin\-tx [options] \fB\-create\fR [commands] +Create hex\-encoded bitcoin transaction +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-create\fR +.IP +Create new, empty TX. +.HP +\fB\-json\fR +.IP +Select JSON output +.HP +\fB\-txid\fR +.IP +Output only the hex\-encoded transaction id of the resultant transaction. +.PP +Chain selection options: +.HP +\fB\-testnet\fR +.IP +Use the test chain +.HP +\fB\-regtest\fR +.IP +Enter regression test mode, which uses a special chain in which blocks +can be solved instantly. This is intended for regression testing +tools and app development. +.PP +Commands: +.IP +delin=N +.IP +Delete input N from TX +.IP +delout=N +.IP +Delete output N from TX +.IP +in=TXID:VOUT(:SEQUENCE_NUMBER) +.IP +Add input to TX +.IP +locktime=N +.IP +Set TX lock time to N +.IP +nversion=N +.IP +Set TX version to N +.IP +outaddr=VALUE:ADDRESS +.IP +Add address\-based output to TX +.IP +outdata=[VALUE:]DATA +.IP +Add data\-based output to TX +.IP +outscript=VALUE:SCRIPT +.IP +Add raw script output to TX +.IP +sign=SIGHASH\-FLAGS +.IP +Add zero or more signatures to transaction. This command requires JSON +registers:prevtxs=JSON object, privatekeys=JSON object. See +signrawtransaction docs for format of sighash flags, JSON +objects. +.PP +Register Commands: +.IP +load=NAME:FILENAME +.IP +Load JSON file FILENAME into register NAME +.IP +set=NAME:JSON\-STRING +.IP +Set register NAME to given JSON\-STRING +.SH COPYRIGHT +Copyright (C) 2009-2016 The Bitcoin Core developers + +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . + +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/contrib/debian/manpages/bitcoind.1 b/contrib/debian/manpages/bitcoind.1 index 5c3e52f441e..3b83f52ccc4 100644 --- a/contrib/debian/manpages/bitcoind.1 +++ b/contrib/debian/manpages/bitcoind.1 @@ -1,30 +1,480 @@ -.TH BITCOIND "1" "February 2016" "bitcoind 0.12" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH BITCOIND "1" "December 2016" "bitcoind v0.13.2.0" "User Commands" .SH NAME -bitcoind \- peer-to-peer network based digital currency -.SH SYNOPSIS -bitcoin [options] [params] -.TP -bitcoin [options] help \- Get help for a command +bitcoind \- manual page for bitcoind v0.13.2.0 .SH DESCRIPTION -This manual page documents the bitcoind program. Bitcoin is an experimental new digital currency that enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money are carried out collectively by the network. Bitcoin Core is the name of open source software which enables the use of this currency. - -.SH OPTIONS +Bitcoin Core Daemon version v0.13.2.0 +.SS "Usage:" .TP +bitcoind [options] +Start Bitcoin Core Daemon +.SH OPTIONS +.HP \-? -List of possible options. -.SH COMMANDS -.TP -\fBhelp\fR -List commands. - -.TP -\fBhelp 'command'\fR -Get help for a command. +.IP +Print this help message and exit +.HP +\fB\-version\fR +.IP +Print version and exit +.HP +\fB\-alertnotify=\fR +.IP +Execute command when a relevant alert is received or we see a really +long fork (%s in cmd is replaced by message) +.HP +\fB\-blocknotify=\fR +.IP +Execute command when the best block changes (%s in cmd is replaced by +block hash) +.HP +\fB\-checkblocks=\fR +.IP +How many blocks to check at startup (default: 6, 0 = all) +.HP +\fB\-checklevel=\fR +.IP +How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3) +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: bitcoin.conf) +.HP +\fB\-daemon\fR +.IP +Run in the background as a daemon and accept commands +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-dbcache=\fR +.IP +Set database cache size in megabytes (4 to 16384, default: 300) +.HP +\fB\-loadblock=\fR +.IP +Imports blocks from external blk000??.dat file on startup +.HP +\fB\-maxorphantx=\fR +.IP +Keep at most unconnectable transactions in memory (default: 100) +.HP +\fB\-maxmempool=\fR +.IP +Keep the transaction memory pool below megabytes (default: 300) +.HP +\fB\-mempoolexpiry=\fR +.IP +Do not keep transactions in the mempool longer than hours (default: +72) +.HP +\fB\-par=\fR +.IP +Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 = +leave that many cores free, default: 0) +.HP +\fB\-pid=\fR +.IP +Specify pid file (default: bitcoind.pid) +.HP +\fB\-prune=\fR +.IP +Reduce storage requirements by pruning (deleting) old blocks. This mode +is incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting +this setting requires re\-downloading the entire blockchain. +(default: 0 = disable pruning blocks, >550 = target size in MiB +to use for block files) +.HP +\fB\-reindex\-chainstate\fR +.IP +Rebuild chain state from the currently indexed blocks +.HP +\fB\-reindex\fR +.IP +Rebuild chain state and block index from the blk*.dat files on disk +.HP +\fB\-sysperms\fR +.IP +Create new files with system default permissions, instead of umask 077 +(only effective with disabled wallet functionality) +.HP +\fB\-txindex\fR +.IP +Maintain a full transaction index, used by the getrawtransaction rpc +call (default: 0) +.PP +Connection options: +.HP +\fB\-addnode=\fR +.IP +Add a node to connect to and attempt to keep the connection open +.HP +\fB\-banscore=\fR +.IP +Threshold for disconnecting misbehaving peers (default: 100) +.HP +\fB\-bantime=\fR +.IP +Number of seconds to keep misbehaving peers from reconnecting (default: +86400) +.HP +\fB\-bind=\fR +.IP +Bind to given address and always listen on it. Use [host]:port notation +for IPv6 +.HP +\fB\-connect=\fR +.IP +Connect only to the specified node(s) +.HP +\fB\-discover\fR +.IP +Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR +or \fB\-proxy\fR) +.HP +\fB\-dns\fR +.IP +Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) +.HP +\fB\-dnsseed\fR +.IP +Query for peer addresses via DNS lookup, if low on addresses (default: 1 +unless \fB\-connect\fR) +.HP +\fB\-externalip=\fR +.IP +Specify your own public address +.HP +\fB\-forcednsseed\fR +.IP +Always query for peer addresses via DNS lookup (default: 0) +.HP +\fB\-listen\fR +.IP +Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR) +.HP +\fB\-listenonion\fR +.IP +Automatically create Tor hidden service (default: 1) +.HP +\fB\-maxconnections=\fR +.IP +Maintain at most connections to peers (default: 125) +.HP +\fB\-maxreceivebuffer=\fR +.IP +Maximum per\-connection receive buffer, *1000 bytes (default: 5000) +.HP +\fB\-maxsendbuffer=\fR +.IP +Maximum per\-connection send buffer, *1000 bytes (default: 1000) +.HP +\fB\-maxtimeadjustment\fR +.IP +Maximum allowed median peer time offset adjustment. Local perspective of +time may be influenced by peers forward or backward by this +amount. (default: 4200 seconds) +.HP +\fB\-onion=\fR +.IP +Use separate SOCKS5 proxy to reach peers via Tor hidden services +(default: \fB\-proxy\fR) +.HP +\fB\-onlynet=\fR +.IP +Only connect to nodes in network (ipv4, ipv6 or onion) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay non\-P2SH multisig (default: 1) +.HP +\fB\-peerbloomfilters\fR +.IP +Support filtering of blocks and transaction with bloom filters (default: +1) +.HP +\fB\-port=\fR +.IP +Listen for connections on (default: 8333 or testnet: 18333) +.HP +\fB\-proxy=\fR +.IP +Connect through SOCKS5 proxy +.HP +\fB\-proxyrandomize\fR +.IP +Randomize credentials for every proxy connection. This enables Tor +stream isolation (default: 1) +.HP +\fB\-rpcserialversion\fR +.IP +Sets the serialization of raw transaction or block hex returned in +non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1) +.HP +\fB\-seednode=\fR +.IP +Connect to a node to retrieve peer addresses, and disconnect +.HP +\fB\-timeout=\fR +.IP +Specify connection timeout in milliseconds (minimum: 1, default: 5000) +.HP +\fB\-torcontrol=\fR: +.IP +Tor control port to use if onion listening enabled (default: +127.0.0.1:9051) +.HP +\fB\-torpassword=\fR +.IP +Tor control port password (default: empty) +.HP +\fB\-whitebind=\fR +.IP +Bind to given address and whitelist peers connecting to it. Use +[host]:port notation for IPv6 +.HP +\fB\-whitelist=\fR +.IP +Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or +CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple +times. Whitelisted peers cannot be DoS banned and their +transactions are always relayed, even if they are already in the +mempool, useful e.g. for a gateway +.HP +\fB\-whitelistrelay\fR +.IP +Accept relayed transactions received from whitelisted peers even when +not relaying transactions (default: 1) +.HP +\fB\-whitelistforcerelay\fR +.IP +Force relay of transactions from whitelisted peers even if they violate +local relay policy (default: 1) +.HP +\fB\-maxuploadtarget=\fR +.IP +Tries to keep outbound traffic under the given target (in MiB per 24h), +0 = no limit (default: 0) +.PP +Wallet options: +.HP +\fB\-disablewallet\fR +.IP +Do not load the wallet and disable wallet RPC calls +.HP +\fB\-keypool=\fR +.IP +Set key pool size to (default: 100) +.HP +\fB\-fallbackfee=\fR +.IP +A fee rate (in BTC/kB) that will be used when fee estimation has +insufficient data (default: 0.0002) +.HP +\fB\-mintxfee=\fR +.IP +Fees (in BTC/kB) smaller than this are considered zero fee for +transaction creation (default: 0.00001) +.HP +\fB\-paytxfee=\fR +.IP +Fee (in BTC/kB) to add to transactions you send (default: 0.00) +.HP +\fB\-rescan\fR +.IP +Rescan the block chain for missing wallet transactions on startup +.HP +\fB\-salvagewallet\fR +.IP +Attempt to recover private keys from a corrupt wallet on startup +.HP +\fB\-spendzeroconfchange\fR +.IP +Spend unconfirmed change when sending transactions (default: 1) +.HP +\fB\-txconfirmtarget=\fR +.IP +If paytxfee is not set, include enough fee so transactions begin +confirmation on average within n blocks (default: 2) +.HP +\fB\-usehd\fR +.IP +Use hierarchical deterministic key generation (HD) after BIP32. Only has +effect during wallet creation/first start (default: 1) +.HP +\fB\-upgradewallet\fR +.IP +Upgrade wallet to latest format on startup +.HP +\fB\-wallet=\fR +.IP +Specify wallet file (within data directory) (default: wallet.dat) +.HP +\fB\-walletbroadcast\fR +.IP +Make the wallet broadcast transactions (default: 1) +.HP +\fB\-walletnotify=\fR +.IP +Execute command when a wallet transaction changes (%s in cmd is replaced +by TxID) +.HP +\fB\-zapwallettxes=\fR +.IP +Delete all wallet transactions and only recover those parts of the +blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. +account owner and payment request information, 2 = drop tx meta +data) +.PP +Debugging/Testing options: +.HP +\fB\-uacomment=\fR +.IP +Append comment to the user agent string +.HP +\fB\-debug=\fR +.IP +Output debugging information (default: 0, supplying is +optional). If is not supplied or if = 1, +output all debugging information. can be: addrman, +alert, bench, cmpctblock, coindb, db, http, libevent, lock, +mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, +selectcoins, tor, zmq. +.HP +\fB\-help\-debug\fR +.IP +Show all debugging options (usage: \fB\-\-help\fR \fB\-help\-debug\fR) +.HP +\fB\-logips\fR +.IP +Include IP addresses in debug output (default: 0) +.HP +\fB\-logtimestamps\fR +.IP +Prepend debug output with timestamp (default: 1) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/kB) smaller than this are considered zero fee for relaying, +mining and transaction creation (default: 0.00001) +.HP +\fB\-maxtxfee=\fR +.IP +Maximum total fees (in BTC) to use in a single wallet transaction or raw +transaction; setting this too low may abort large transactions +(default: 0.10) +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console instead of debug.log file +.HP +\fB\-shrinkdebugfile\fR +.IP +Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) +.PP +Chain selection options: +.HP +\fB\-testnet\fR +.IP +Use the test chain +.PP +Node relay options: +.HP +\fB\-bytespersigop\fR +.IP +Equivalent bytes per sigop in transactions for relay and mining +(default: 20) +.HP +\fB\-datacarrier\fR +.IP +Relay and mine data carrier transactions (default: 1) +.HP +\fB\-datacarriersize\fR +.IP +Maximum size of data in data carrier transactions we relay and mine +(default: 83) +.HP +\fB\-mempoolreplacement\fR +.IP +Enable transaction replacement in the memory pool (default: 1) +.PP +Block creation options: +.HP +\fB\-blockmaxweight=\fR +.IP +Set maximum BIP141 block weight (default: 3000000) +.HP +\fB\-blockmaxsize=\fR +.IP +Set maximum block size in bytes (default: 750000) +.HP +\fB\-blockprioritysize=\fR +.IP +Set maximum size of high\-priority/low\-fee transactions in bytes +(default: 0) +.PP +RPC server options: +.HP +\fB\-server\fR +.IP +Accept command line and JSON\-RPC commands +.HP +\fB\-rest\fR +.IP +Accept public REST requests (default: 0) +.HP +\fB\-rpcbind=\fR +.IP +Bind to given address to listen for JSON\-RPC connections. Use +[host]:port notation for IPv6. This option can be specified +multiple times (default: bind to all interfaces) +.HP +\fB\-rpccookiefile=\fR +.IP +Location of the auth cookie (default: data dir) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcauth=\fR +.IP +Username and hashed password for JSON\-RPC connections. The field + comes in the format: :$. A +canonical python script is included in share/rpcuser. This option +can be specified multiple times +.HP +\fB\-rpcport=\fR +.IP +Listen for JSON\-RPC connections on (default: 8332 or testnet: +18332) +.HP +\fB\-rpcallowip=\fR +.IP +Allow JSON\-RPC connections from specified source. Valid for are a +single IP (e.g. 1.2.3.4), a network/netmask (e.g. +1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This +option can be specified multiple times +.HP +\fB\-rpcthreads=\fR +.IP +Set the number of threads to service RPC calls (default: 4) +.SH COPYRIGHT +Copyright (C) 2009-2016 The Bitcoin Core developers -.SH "SEE ALSO" -bitcoin.conf(5) -.SH AUTHOR -This manual page was written by Micah Anderson for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. +Please contribute if you find Bitcoin Core useful. Visit + for further information about the software. +The source code is available from . -On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. +This is experimental software. +Distributed under the MIT software license, see the accompanying file COPYING +or . +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. From 0d719145b018e28d48d35c2646a5962b87c60436 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 2 Jan 2017 09:54:25 +0100 Subject: [PATCH 297/302] doc: Remove ... from release notes --- doc/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 9d35d8e5fc4..45fff5c8bbd 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -2,7 +2,7 @@ Bitcoin Core version 0.13.2 is now available from: -This is a new minor version release, including ..., various bugfixes and +This is a new minor version release, including various bugfixes and performance improvements, as well as updated translations. Please report bugs using the issue tracker at github: From 77eaadb6c9619370b09513fecba13cfe656d63d6 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 3 Jan 2017 11:50:57 +0100 Subject: [PATCH 298/302] doc: Clean out release notes on 0.13.x branch Move old release notes to historical release notes. --- doc/release-notes.md | 125 +-------------------- doc/release-notes/release-notes-0.13.2.md | 178 ++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+), 119 deletions(-) create mode 100644 doc/release-notes/release-notes-0.13.2.md diff --git a/doc/release-notes.md b/doc/release-notes.md index 45fff5c8bbd..955a45a409a 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,6 +1,6 @@ -Bitcoin Core version 0.13.2 is now available from: +Bitcoin Core version 0.13.x is now available from: - + This is a new minor version release, including various bugfixes and performance improvements, as well as updated translations. @@ -42,25 +42,10 @@ but severe issues with the libc++ version on 10.7.x keep it from running reliabl Notable changes =============== -Change to wallet handling of mempool rejection +Example item ----------------------------------------------- -When a newly created transaction failed to enter the mempool due to -the limits on chains of unconfirmed transactions the sending RPC -calls would return an error. The transaction would still be queued -in the wallet and, once some of the parent transactions were -confirmed, broadcast after the software was restarted. - -This behavior has been changed to return success and to reattempt -mempool insertion at the same time transaction rebroadcast is -attempted, avoiding a need for a restart. - -Transactions in the wallet which cannot be accepted into the mempool -can be abandoned with the previously existing abandontransaction RPC -(or in the GUI via a context menu on the transaction). - - -0.13.2 Change log +0.13.x Change log ================= Detailed release notes follow. This overview includes changes that affect @@ -68,111 +53,13 @@ behavior, not code moves, refactors and string updates. For convenience in locat the code changes and accompanying discussion, both the pull request and git merge commit are mentioned. -### Consensus -- #9293 `e591c10` [0.13 Backport #9053] IBD using chainwork instead of height and not using header timestamp (gmaxwell) -- #9053 `5b93eee` IBD using chainwork instead of height and not using header timestamps (gmaxwell) - -### RPC and other APIs -- #8845 `1d048b9` Don't return the address of a P2SH of a P2SH (jnewbery) -- #9041 `87fbced` keypoololdest denote Unix epoch, not GMT (s-matthew-english) -- #9122 `f82c81b` fix getnettotals RPC description about timemillis (visvirial) -- #9042 `5bcb05d` [rpc] ParseHash: Fail when length is not 64 (MarcoFalke) -- #9194 `f26dab7` Add option to return non-segwit serialization via rpc (instagibbs) -- #9347 `b711390` [0.13.2] wallet/rpc backports (MarcoFalke) -- #9292 `c365556` Complain when unknown rpcserialversion is specified (sipa) -- #9322 `49a612f` [qa] Don't set unknown rpcserialversion (MarcoFalke) - -### Block and transaction handling -- #8357 `ce0d817` [mempool] Fix relaypriority calculation error (maiiz) -- #9267 `0a4aa87` [0.13 backport #9239] Disable fee estimates for a confirm target of 1 block (morcos) -- #9196 `0c09d9f` Send tip change notification from invalidateblock (ryanofsky) - -### P2P protocol and network code -- #8995 `9ef3875` Add missing cs_main lock to ::GETBLOCKTXN processing (TheBlueMatt) -- #9234 `94531b5` torcontrol: Explicitly request RSA1024 private key (laanwj) -- #8637 `2cad5db` Compact Block Tweaks (rebase of #8235) (sipa) -- #9058 `286e548` Fixes for p2p-compactblocks.py test timeouts on travis (#8842) (ryanofsky) -- #8865 `4c71fc4` Decouple peer-processing-logic from block-connection-logic (TheBlueMatt) -- #9117 `6fe3981` net: don't send feefilter messages before the version handshake is complete (theuni) -- #9188 `ca1fd75` Make orphan parent fetching ask for witnesses (gmaxwell) -- #9052 `3a3bcbf` Use RelevantServices instead of node_network in AttemptToEvict (gmaxwell) -- #9048 `9460771` [0.13 backport #9026] Fix handling of invalid compact blocks (sdaftuar) -- #9357 `03b6f62` [0.13 backport #9352] Attempt reconstruction from all compact block announcements (sdaftuar) -- #9189 `b96a8f7` Always add default_witness_commitment with GBT client support (sipa) -- #9253 `28d0f22` Fix calculation of number of bound sockets to use (TheBlueMatt) -- #9199 `da5a16b` Always drop the least preferred HB peer when adding a new one (gmaxwell) - -### Build system -- #9169 `d1b4da9` build: fix qt5.7 build under macOS (theuni) -- #9326 `a0f7ece` Update for OpenSSL 1.1 API (gmaxwell) -- #9224 `396c405` Prevent FD_SETSIZE error building on OpenBSD (ivdsangen) - -### GUI -- #8972 `6f86b53` Make warnings label selectable (jonasschnelli) (MarcoFalke) -- #9185 `6d70a73` Fix coincontrol sort issue (jonasschnelli) -- #9094 `5f3a12c` Use correct conversion function for boost::path datadir (laanwj) -- #8908 `4a974b2` Update bitcoin-qt.desktop (s-matthew-english) -- #9190 `dc46b10` Plug many memory leaks (laanwj) - -### Wallet -- #9290 `35174a0` Make RelayWalletTransaction attempt to AcceptToMemoryPool (gmaxwell) -- #9295 `43bcfca` Bugfix: Fundrawtransaction: don't terminate when keypool is empty (jonasschnelli) -- #9302 `f5d606e` Return txid even if ATMP fails for new transaction (sipa) -- #9262 `fe39f26` Prefer coins that have fewer ancestors, sanity check txn before ATMP (instagibbs) - -### Tests and QA -- #9159 `eca9b46` Wait for specific block announcement in p2p-compactblocks (ryanofsky) -- #9186 `dccdc3a` Fix use-after-free in scheduler tests (laanwj) -- #9168 `3107280` Add assert_raises_message to check specific error message (mrbandrews) -- #9191 `29435db` 0.13.2 Backports (MarcoFalke) -- #9077 `1d4c884` Increase wallet-dump RPC timeout (ryanofsky) -- #9098 `ecd7db5` Handle zombies and cluttered tmpdirs (MarcoFalke) -- #8927 `387ec9d` Add script tests for FindAndDelete in pre-segwit and segwit scripts (jl2012) -- #9200 `eebc699` bench: Fix subtle counting issue when rescaling iteration count (laanwj) - -### Miscellaneous -- #8838 `094848b` Calculate size and weight of block correctly in CreateNewBlock() (jnewbery) -- #8920 `40169dc` Set minimum required Boost to 1.47.0 (fanquake) -- #9251 `a710a43` Improvement of documentation of command line parameter 'whitelist' (wodry) -- #8932 `106da69` Allow bitcoin-tx to create v2 transactions (btcdrak) -- #8929 `12428b4` add software-properties-common (sigwo) -- #9120 `08d1c90` bug: Missed one "return false" in recent refactoring in #9067 (UdjinM6) -- #9067 `f85ee01` Fix exit codes (UdjinM6) -- #9340 `fb987b3` [0.13] Update secp256k1 subtree (MarcoFalke) -- #9229 `b172377` Remove calls to getaddrinfo_a (TheBlueMatt) +[to be filled in at release] Credits ======= Thanks to everyone who directly contributed to this release: -- Alex Morcos -- BtcDrak -- Cory Fields -- fanquake -- Gregory Maxwell -- Gregory Sanders -- instagibbs -- Ivo van der Sangen -- jnewbery -- Johnson Lau -- Jonas Schnelli -- Luke Dashjr -- maiiz -- MarcoFalke -- Masahiko Hyuga -- Matt Corallo -- matthias -- mrbandrews -- Pavel Janík -- Pieter Wuille -- randy-waterhouse -- Russell Yanofsky -- S. Matthew English -- Steven -- Suhas Daftuar -- UdjinM6 -- Wladimir J. van der Laan -- wodry +[to be filled in at release] 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.13.2.md b/doc/release-notes/release-notes-0.13.2.md new file mode 100644 index 00000000000..45fff5c8bbd --- /dev/null +++ b/doc/release-notes/release-notes-0.13.2.md @@ -0,0 +1,178 @@ +Bitcoin Core version 0.13.2 is now available from: + + + +This is a new minor version release, including various bugfixes and +performance improvements, as well as updated translations. + +Please report bugs using the issue tracker at github: + + + +To receive security and update notifications, please subscribe to: + + + +Compatibility +============== + +Microsoft ended support for Windows XP on [April 8th, 2014](https://www.microsoft.com/en-us/WindowsForBusiness/end-of-xp-support), +an OS initially released in 2001. This means that not even critical security +updates will be released anymore. Without security updates, using a bitcoin +wallet on a XP machine is irresponsible at least. + +In addition to that, with 0.12.x there have been varied reports of Bitcoin Core +randomly crashing on Windows XP. It is [not clear](https://github.com/bitcoin/bitcoin/issues/7681#issuecomment-217439891) +what the source of these crashes is, but it is likely that upstream +libraries such as Qt are no longer being tested on XP. + +We do not have time nor resources to provide support for an OS that is +end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are +suggested to upgrade to a newer version of Windows, or install an alternative OS +that is supported. + +No attempt is made to prevent installing or running the software on Windows XP, +you can still do so at your own risk, but do not expect it to work: do not +report issues about Windows XP to the issue tracker. + +From 0.13.1 onwards OS X 10.7 is no longer supported. 0.13.0 was intended to work on 10.7+, +but severe issues with the libc++ version on 10.7.x keep it from running reliably. +0.13.1 now requires 10.8+, and will communicate that to 10.7 users, rather than crashing unexpectedly. + +Notable changes +=============== + +Change to wallet handling of mempool rejection +----------------------------------------------- + +When a newly created transaction failed to enter the mempool due to +the limits on chains of unconfirmed transactions the sending RPC +calls would return an error. The transaction would still be queued +in the wallet and, once some of the parent transactions were +confirmed, broadcast after the software was restarted. + +This behavior has been changed to return success and to reattempt +mempool insertion at the same time transaction rebroadcast is +attempted, avoiding a need for a restart. + +Transactions in the wallet which cannot be accepted into the mempool +can be abandoned with the previously existing abandontransaction RPC +(or in the GUI via a context menu on the transaction). + + +0.13.2 Change log +================= + +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. + +### Consensus +- #9293 `e591c10` [0.13 Backport #9053] IBD using chainwork instead of height and not using header timestamp (gmaxwell) +- #9053 `5b93eee` IBD using chainwork instead of height and not using header timestamps (gmaxwell) + +### RPC and other APIs +- #8845 `1d048b9` Don't return the address of a P2SH of a P2SH (jnewbery) +- #9041 `87fbced` keypoololdest denote Unix epoch, not GMT (s-matthew-english) +- #9122 `f82c81b` fix getnettotals RPC description about timemillis (visvirial) +- #9042 `5bcb05d` [rpc] ParseHash: Fail when length is not 64 (MarcoFalke) +- #9194 `f26dab7` Add option to return non-segwit serialization via rpc (instagibbs) +- #9347 `b711390` [0.13.2] wallet/rpc backports (MarcoFalke) +- #9292 `c365556` Complain when unknown rpcserialversion is specified (sipa) +- #9322 `49a612f` [qa] Don't set unknown rpcserialversion (MarcoFalke) + +### Block and transaction handling +- #8357 `ce0d817` [mempool] Fix relaypriority calculation error (maiiz) +- #9267 `0a4aa87` [0.13 backport #9239] Disable fee estimates for a confirm target of 1 block (morcos) +- #9196 `0c09d9f` Send tip change notification from invalidateblock (ryanofsky) + +### P2P protocol and network code +- #8995 `9ef3875` Add missing cs_main lock to ::GETBLOCKTXN processing (TheBlueMatt) +- #9234 `94531b5` torcontrol: Explicitly request RSA1024 private key (laanwj) +- #8637 `2cad5db` Compact Block Tweaks (rebase of #8235) (sipa) +- #9058 `286e548` Fixes for p2p-compactblocks.py test timeouts on travis (#8842) (ryanofsky) +- #8865 `4c71fc4` Decouple peer-processing-logic from block-connection-logic (TheBlueMatt) +- #9117 `6fe3981` net: don't send feefilter messages before the version handshake is complete (theuni) +- #9188 `ca1fd75` Make orphan parent fetching ask for witnesses (gmaxwell) +- #9052 `3a3bcbf` Use RelevantServices instead of node_network in AttemptToEvict (gmaxwell) +- #9048 `9460771` [0.13 backport #9026] Fix handling of invalid compact blocks (sdaftuar) +- #9357 `03b6f62` [0.13 backport #9352] Attempt reconstruction from all compact block announcements (sdaftuar) +- #9189 `b96a8f7` Always add default_witness_commitment with GBT client support (sipa) +- #9253 `28d0f22` Fix calculation of number of bound sockets to use (TheBlueMatt) +- #9199 `da5a16b` Always drop the least preferred HB peer when adding a new one (gmaxwell) + +### Build system +- #9169 `d1b4da9` build: fix qt5.7 build under macOS (theuni) +- #9326 `a0f7ece` Update for OpenSSL 1.1 API (gmaxwell) +- #9224 `396c405` Prevent FD_SETSIZE error building on OpenBSD (ivdsangen) + +### GUI +- #8972 `6f86b53` Make warnings label selectable (jonasschnelli) (MarcoFalke) +- #9185 `6d70a73` Fix coincontrol sort issue (jonasschnelli) +- #9094 `5f3a12c` Use correct conversion function for boost::path datadir (laanwj) +- #8908 `4a974b2` Update bitcoin-qt.desktop (s-matthew-english) +- #9190 `dc46b10` Plug many memory leaks (laanwj) + +### Wallet +- #9290 `35174a0` Make RelayWalletTransaction attempt to AcceptToMemoryPool (gmaxwell) +- #9295 `43bcfca` Bugfix: Fundrawtransaction: don't terminate when keypool is empty (jonasschnelli) +- #9302 `f5d606e` Return txid even if ATMP fails for new transaction (sipa) +- #9262 `fe39f26` Prefer coins that have fewer ancestors, sanity check txn before ATMP (instagibbs) + +### Tests and QA +- #9159 `eca9b46` Wait for specific block announcement in p2p-compactblocks (ryanofsky) +- #9186 `dccdc3a` Fix use-after-free in scheduler tests (laanwj) +- #9168 `3107280` Add assert_raises_message to check specific error message (mrbandrews) +- #9191 `29435db` 0.13.2 Backports (MarcoFalke) +- #9077 `1d4c884` Increase wallet-dump RPC timeout (ryanofsky) +- #9098 `ecd7db5` Handle zombies and cluttered tmpdirs (MarcoFalke) +- #8927 `387ec9d` Add script tests for FindAndDelete in pre-segwit and segwit scripts (jl2012) +- #9200 `eebc699` bench: Fix subtle counting issue when rescaling iteration count (laanwj) + +### Miscellaneous +- #8838 `094848b` Calculate size and weight of block correctly in CreateNewBlock() (jnewbery) +- #8920 `40169dc` Set minimum required Boost to 1.47.0 (fanquake) +- #9251 `a710a43` Improvement of documentation of command line parameter 'whitelist' (wodry) +- #8932 `106da69` Allow bitcoin-tx to create v2 transactions (btcdrak) +- #8929 `12428b4` add software-properties-common (sigwo) +- #9120 `08d1c90` bug: Missed one "return false" in recent refactoring in #9067 (UdjinM6) +- #9067 `f85ee01` Fix exit codes (UdjinM6) +- #9340 `fb987b3` [0.13] Update secp256k1 subtree (MarcoFalke) +- #9229 `b172377` Remove calls to getaddrinfo_a (TheBlueMatt) + +Credits +======= + +Thanks to everyone who directly contributed to this release: + +- Alex Morcos +- BtcDrak +- Cory Fields +- fanquake +- Gregory Maxwell +- Gregory Sanders +- instagibbs +- Ivo van der Sangen +- jnewbery +- Johnson Lau +- Jonas Schnelli +- Luke Dashjr +- maiiz +- MarcoFalke +- Masahiko Hyuga +- Matt Corallo +- matthias +- mrbandrews +- Pavel Janík +- Pieter Wuille +- randy-waterhouse +- Russell Yanofsky +- S. Matthew English +- Steven +- Suhas Daftuar +- UdjinM6 +- Wladimir J. van der Laan +- wodry + +As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 59c37ae55a476d3cf84c9bafbc083904472fe4db Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Fri, 16 Dec 2016 16:52:35 +0900 Subject: [PATCH 299/302] Uses built-in byte swap if available (Apple) and if bswap_XX is undefined. Defers to pre-defined version if found (e.g. protobuf). For protobuf case, the definitions are identical and thus include order should not affect results. Github-Pull: #9366 Rebased-From: 815f4148b2eff6c64c764e910e79677d5a67adc7 --- src/Makefile.qttest.include | 6 +++++- src/Makefile.test.include | 1 + src/compat/byteswap.h | 19 +++++++++++++++++++ src/qt/test/compattests.cpp | 23 +++++++++++++++++++++++ src/qt/test/compattests.h | 19 +++++++++++++++++++ src/qt/test/test_main.cpp | 4 ++++ src/test/bswap_tests.cpp | 26 ++++++++++++++++++++++++++ 7 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/qt/test/compattests.cpp create mode 100644 src/qt/test/compattests.h create mode 100644 src/test/bswap_tests.cpp diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index a071fe1362f..22c5f6a0b3d 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -5,13 +5,16 @@ bin_PROGRAMS += qt/test/test_bitcoin-qt TESTS += qt/test/test_bitcoin-qt -TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp +TEST_QT_MOC_CPP = \ + qt/test/moc_compattests.cpp \ + qt/test/moc_uritests.cpp if ENABLE_WALLET TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp endif TEST_QT_H = \ + qt/test/compattests.h \ qt/test/uritests.h \ qt/test/paymentrequestdata.h \ qt/test/paymentservertests.h @@ -20,6 +23,7 @@ qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_ $(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS) qt_test_test_bitcoin_qt_SOURCES = \ + qt/test/compattests.cpp \ qt/test/test_main.cpp \ qt/test/uritests.cpp \ $(TEST_QT_H) diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 0878d8234c1..25656333229 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -50,6 +50,7 @@ BITCOIN_TESTS =\ test/bip32_tests.cpp \ test/blockencodings_tests.cpp \ test/bloom_tests.cpp \ + test/bswap_tests.cpp \ test/coins_tests.cpp \ test/compress_tests.cpp \ test/crypto_tests.cpp \ diff --git a/src/compat/byteswap.h b/src/compat/byteswap.h index 899220bdc54..5c86499d7b9 100644 --- a/src/compat/byteswap.h +++ b/src/compat/byteswap.h @@ -15,6 +15,23 @@ #include #endif +#if defined(__APPLE__) + +#if !defined(bswap_16) + +// Mac OS X / Darwin features; we include a check for bswap_16 because if it is already defined, protobuf has +// defined these macros for us already; if it isn't, we do it ourselves. In either case, we get the exact same +// result regardless which path was taken +#include +#define bswap_16(x) OSSwapInt16(x) +#define bswap_32(x) OSSwapInt32(x) +#define bswap_64(x) OSSwapInt64(x) + +#endif // !defined(bswap_16) + +#else +// Non-Mac OS X / non-Darwin + #if HAVE_DECL_BSWAP_16 == 0 inline uint16_t bswap_16(uint16_t x) { @@ -44,4 +61,6 @@ inline uint64_t bswap_64(uint64_t x) } #endif // HAVE_DECL_BSWAP64 +#endif // defined(__APPLE__) + #endif // BITCOIN_COMPAT_BYTESWAP_H diff --git a/src/qt/test/compattests.cpp b/src/qt/test/compattests.cpp new file mode 100644 index 00000000000..2a7284b5b22 --- /dev/null +++ b/src/qt/test/compattests.cpp @@ -0,0 +1,23 @@ +// Copyright (c) 2016 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "paymentrequestplus.h" // this includes protobuf's port.h which defines its own bswap macos + +#include "compattests.h" + +#include "compat/byteswap.h" + +void CompatTests::bswapTests() +{ + // Sibling in bitcoin/src/test/bswap_tests.cpp + uint16_t u1 = 0x1234; + uint32_t u2 = 0x56789abc; + uint64_t u3 = 0xdef0123456789abc; + uint16_t e1 = 0x3412; + uint32_t e2 = 0xbc9a7856; + uint64_t e3 = 0xbc9a78563412f0de; + QVERIFY(bswap_16(u1) == e1); + QVERIFY(bswap_32(u2) == e2); + QVERIFY(bswap_64(u3) == e3); +} diff --git a/src/qt/test/compattests.h b/src/qt/test/compattests.h new file mode 100644 index 00000000000..35dede77434 --- /dev/null +++ b/src/qt/test/compattests.h @@ -0,0 +1,19 @@ +// Copyright (c) 2009-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. + +#ifndef BITCOIN_QT_TEST_COMPATTESTS_H +#define BITCOIN_QT_TEST_COMPATTESTS_H + +#include +#include + +class CompatTests : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void bswapTests(); +}; + +#endif // BITCOIN_QT_TEST_COMPATTESTS_H diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index db193420bfb..02650320bda 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -8,6 +8,7 @@ #include "util.h" #include "uritests.h" +#include "compattests.h" #ifdef ENABLE_WALLET #include "paymentservertests.h" @@ -48,6 +49,9 @@ int main(int argc, char *argv[]) if (QTest::qExec(&test2) != 0) fInvalid = true; #endif + CompatTests test4; + if (QTest::qExec(&test4) != 0) + fInvalid = true; return fInvalid; } diff --git a/src/test/bswap_tests.cpp b/src/test/bswap_tests.cpp new file mode 100644 index 00000000000..7b3134d327d --- /dev/null +++ b/src/test/bswap_tests.cpp @@ -0,0 +1,26 @@ +// Copyright (c) 2016 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "compat/byteswap.h" +#include "test/test_bitcoin.h" + +#include + +BOOST_FIXTURE_TEST_SUITE(bswap_tests, BasicTestingSetup) + +BOOST_AUTO_TEST_CASE(bswap_tests) +{ + // Sibling in bitcoin/src/qt/test/compattests.cpp + uint16_t u1 = 0x1234; + uint32_t u2 = 0x56789abc; + uint64_t u3 = 0xdef0123456789abc; + uint16_t e1 = 0x3412; + uint32_t e2 = 0xbc9a7856; + uint64_t e3 = 0xbc9a78563412f0de; + BOOST_CHECK(bswap_16(u1) == e1); + BOOST_CHECK(bswap_32(u2) == e2); + BOOST_CHECK(bswap_64(u3) == e3); +} + +BOOST_AUTO_TEST_SUITE_END() From c6811c1bd314f4297b22f12a4cefdd1bbbb0c749 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 21 Feb 2017 14:36:36 +0100 Subject: [PATCH 300/302] Fix segfault crash when shutdown the GUI in disablewallet mode Github-Pull: #9817 Rebased-From: 312c4f10574ccf6dfe0d4ecb3ce928733d3a1e52 --- src/qt/bitcoingui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 1a5d27f6eb9..38cfc262b85 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -499,7 +499,10 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) // Propagate cleared model to child objects rpcConsole->setClientModel(nullptr); #ifdef ENABLE_WALLET - walletFrame->setClientModel(nullptr); + if (walletFrame) + { + walletFrame->setClientModel(nullptr); + } #endif // ENABLE_WALLET unitDisplayControl->setOptionsModel(nullptr); } From 8adf75e6a124267da1ae46be1eee50c52ce6082b Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 17 May 2017 17:41:52 +0800 Subject: [PATCH 301/302] [depends] miniupnpc 2.0.20170509 Github-Pull: #10414 Rebased-From: af5d48c9a03182fdf121623bd98136b66d0fcb27 --- depends/packages/miniupnpc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk index e34cf7be2f1..1bb8cb5d266 100644 --- a/depends/packages/miniupnpc.mk +++ b/depends/packages/miniupnpc.mk @@ -1,8 +1,8 @@ package=miniupnpc -$(package)_version=2.0 +$(package)_version=2.0.20170509 $(package)_download_path=http://miniupnp.free.fr/files $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=d434ceb8986efbe199c5ca53f90ed53eab290b1e6d0530b717eb6fa49d61f93b +$(package)_sha256_hash=d3c368627f5cdfb66d3ebd64ca39ba54d6ff14a61966dbecb8dd296b7039f16a define $(package)_set_vars $(package)_build_opts=CC="$($(package)_cc)" From b6548420291de0e077b02de71b4f2cea3dac0f8c Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Thu, 18 May 2017 16:57:53 -0400 Subject: [PATCH 302/302] Populate services in GetLocalAddress Previously if we didn't have any local addresses, GetLocalAddress would return 0.0.0.0 and then we'd swap in a peer's notion of our address in AdvertiseLocal, but then nServices would never get set. Github-Pull: #10424 Rebased-From: 307013469f9a3b8f13d3eb9dbeea419a55148493 --- src/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index 7cb612ee965..0b8bfd86009 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -179,7 +179,7 @@ static std::vector convertSeed6(const std::vector &vSeedsIn // one by discovery. CAddress GetLocalAddress(const CNetAddr *paddrPeer) { - CAddress ret(CService("0.0.0.0",GetListenPort()), NODE_NONE); + CAddress ret(CService("0.0.0.0",GetListenPort()), nLocalServices); CService addr; if (GetLocal(addr, paddrPeer)) {