From 35af157641ddbf6090e86edff7533d45ee4fb990 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 1 Mar 2016 13:51:38 +0100 Subject: [PATCH 01/45] doc: Clean out release notes 0.12.0 was released, prepare empty release notes for 0.12.1. --- doc/release-notes.md | 822 +------------------------------------------ 1 file changed, 5 insertions(+), 817 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 332d4cebe..17a8984b3 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -1,6 +1,6 @@ -Bitcoin Core version 0.12.0 is now available from: +Bitcoin Core version 0.12.1 is now available from: - + This is a new major version release, bringing new features and other improvements. @@ -22,28 +22,6 @@ bitcoind/bitcoin-qt (on Linux). Downgrade warning ----------------- -### Downgrade to a version < 0.10.0 - -Because release 0.10.0 and later makes use of headers-first synchronization and -parallel block download (see further), the block files and databases are not -backwards-compatible with pre-0.10 versions of Bitcoin Core or other software: - -* Blocks will be stored on disk out of order (in the order they are -received, really), which makes it incompatible with some tools or -other programs. Reindexing using earlier versions will also not work -anymore as a result of this. - -* The block index database will now hold headers for which no block is -stored on disk, which earlier versions won't support. - -If you want to be able to downgrade smoothly, make a backup of your entire data -directory. Without this your node will need start syncing (or importing from -bootstrap.dat) anew afterwards. It is possible that the data from a completely -synchronised 0.10 node may be usable in older versions as-is, but this is not -supported and may break as soon as the older version attempts to reindex. - -This does not affect wallet forward or backward compatibility. - ### Downgrade to a version < 0.12.0 Because release 0.12.0 and later will obfuscate the chainstate on every @@ -57,408 +35,12 @@ earlier. Notable changes =============== -Signature validation using libsecp256k1 +Example item --------------------------------------- -ECDSA signatures inside Bitcoin transactions now use validation using -[https://github.com/bitcoin/secp256k1](libsecp256k1) instead of OpenSSL. +Example text. -Depending on the platform, this means a significant speedup for raw signature -validation speed. The advantage is largest on x86_64, where validation is over -five times faster. In practice, this translates to a raw reindexing and new -block validation times that are less than half of what it was before. - -Libsecp256k1 has undergone very extensive testing and validation. - -A side effect of this change is that libconsensus no longer depends on OpenSSL. - -Reduce upload traffic ---------------------- - -A major part of the outbound traffic is caused by serving historic blocks to -other nodes in initial block download state. - -It is now possible to reduce the total upload traffic via the `-maxuploadtarget` -parameter. This is *not* a hard limit but a threshold to minimize the outbound -traffic. When the limit is about to be reached, the uploaded data is cut by not -serving historic blocks (blocks older than one week). -Moreover, any SPV peer is disconnected when they request a filtered block. - -This option can be specified in MiB per day and is turned off by default -(`-maxuploadtarget=0`). -The recommended minimum is 144 * MAX_BLOCK_SIZE (currently 144MB) per day. - -Whitelisted peers will never be disconnected, although their traffic counts for -calculating the target. - -A more detailed documentation about keeping traffic low can be found in -[/doc/reduce-traffic.md](/doc/reduce-traffic.md). - -Direct headers announcement (BIP 130) -------------------------------------- - -Between compatible peers, [BIP 130] -(https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki) -direct headers announcement is used. This means that blocks are advertized by -announcing their headers directly, instead of just announcing the hash. In a -reorganization, all new headers are sent, instead of just the new tip. This -can often prevent an extra roundtrip before the actual block is downloaded. - -With this change, pruning nodes are now able to relay new blocks to compatible -peers. - -Memory pool limiting --------------------- - -Previous versions of Bitcoin Core had their mempool limited by checking -a transaction's fees against the node's minimum relay fee. There was no -upper bound on the size of the mempool and attackers could send a large -number of transactions paying just slighly more than the default minimum -relay fee to crash nodes with relatively low RAM. A temporary workaround -for previous versions of Bitcoin Core was to raise the default minimum -relay fee. - -Bitcoin Core 0.12 will have a strict maximum size on the mempool. The -default value is 300 MB and can be configured with the `-maxmempool` -parameter. Whenever a transaction would cause the mempool to exceed -its maximum size, the transaction that (along with in-mempool descendants) has -the lowest total feerate (as a package) will be evicted and the node's effective -minimum relay feerate will be increased to match this feerate plus the initial -minimum relay feerate. The initial minimum relay feerate is set to -1000 satoshis per kB. - -Bitcoin Core 0.12 also introduces new default policy limits on the length and -size of unconfirmed transaction chains that are allowed in the mempool -(generally limiting the length of unconfirmed chains to 25 transactions, with a -total size of 101 KB). These limits can be overriden using command line -arguments; see the extended help (`--help -help-debug`) for more information. - -Opt-in Replace-by-fee transactions ----------------------------------- - -It is now possible to replace transactions in the transaction memory pool of -Bitcoin Core 0.12 nodes. Bitcoin Core will only allow replacement of -transactions which have any of their inputs' `nSequence` number set to less -than `0xffffffff - 1`. Moreover, a replacement transaction may only be -accepted when it pays sufficient fee, as described in [BIP 125] -(https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki). - -Transaction replacement can be disabled with a new command line option, -`-mempoolreplacement=0`. Transactions signaling replacement under BIP125 will -still be allowed into the mempool in this configuration, but replacements will -be rejected. This option is intended for miners who want to continue the -transaction selection behavior of previous releases. - -The `-mempoolreplacement` option is *not recommended* for wallet users seeking -to avoid receipt of unconfirmed opt-in transactions, because this option does -not prevent transactions which are replaceable under BIP 125 from being accepted -(only subsequent replacements, which other nodes on the network that implement -BIP 125 are likely to relay and mine). Wallet users wishing to detect whether -a transaction is subject to replacement under BIP 125 should instead use the -updated RPC calls `gettransaction` and `listtransactions`, which now have an -additional field in the output indicating if a transaction is replaceable under -BIP125 ("bip125-replaceable"). - -Note that the wallet in Bitcoin Core 0.12 does not yet have support for -creating transactions that would be replaceable under BIP 125. - - -RPC: Random-cookie RPC authentication -------------------------------------- - -When no `-rpcpassword` is specified, the daemon now uses a special 'cookie' -file for authentication. This file is generated with random content when the -daemon starts, and deleted when it exits. Its contents are used as -authentication token. Read access to this file controls who can access through -RPC. By default it is stored in the data directory but its location can be -overridden with the option `-rpccookiefile`. - -This is similar to Tor's CookieAuthentication: see -https://www.torproject.org/docs/tor-manual.html.en - -This allows running bitcoind without having to do any manual configuration. - -Relay: Any sequence of pushdatas in OP_RETURN outputs now allowed ------------------------------------------------------------------ - -Previously OP_RETURN outputs with a payload were only relayed and mined if they -had a single pushdata. This restriction has been lifted to allow any -combination of data pushes and numeric constant opcodes (OP_1 to OP_16) after -the OP_RETURN. The limit on OP_RETURN output size is now applied to the entire -serialized scriptPubKey, 83 bytes by default. (the previous 80 byte default plus -three bytes overhead) - -Relay and Mining: Priority transactions ---------------------------------------- - -Bitcoin Core has a heuristic 'priority' based on coin value and age. This -calculation is used for relaying of transactions which do not pay the -minimum relay fee, and can be used as an alternative way of sorting -transactions for mined blocks. Bitcoin Core will relay transactions with -insufficient fees depending on the setting of `-limitfreerelay=` (default: -`r=15` kB per minute) and `-blockprioritysize=`. - -In Bitcoin Core 0.12, when mempool limit has been reached a higher minimum -relay fee takes effect to limit memory usage. Transactions which do not meet -this higher effective minimum relay fee will not be relayed or mined even if -they rank highly according to the priority heuristic. - -The mining of transactions based on their priority is also now disabled by -default. To re-enable it, simply set `-blockprioritysize=` where is the size -in bytes of your blocks to reserve for these transactions. The old default was -50k, so to retain approximately the same policy, you would set -`-blockprioritysize=50000`. - -Additionally, as a result of computational simplifications, the priority value -used for transactions received with unconfirmed inputs is lower than in prior -versions due to avoiding recomputing the amounts as input transactions confirm. - -External miner policy set via the `prioritisetransaction` RPC to rank -transactions already in the mempool continues to work as it has previously. -Note, however, that if mining priority transactions is left disabled, the -priority delta will be ignored and only the fee metric will be effective. - -This internal automatic prioritization handling is being considered for removal -entirely in Bitcoin Core 0.13, and it is at this time undecided whether the -more accurate priority calculation for chained unconfirmed transactions will be -restored. Community direction on this topic is particularly requested to help -set project priorities. - -Automatically use Tor hidden services -------------------------------------- - -Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket -API, to create and destroy 'ephemeral' hidden services programmatically. -Bitcoin Core has been updated to make use of this. - -This means that if Tor is running (and proper authorization is available), -Bitcoin Core automatically creates a hidden service to listen on, without -manual configuration. Bitcoin Core will also use Tor automatically to connect -to other .onion nodes if the control socket can be successfully opened. This -will positively affect the number of available .onion nodes and their usage. - -This new feature is enabled by default if Bitcoin Core is listening, and -a connection to Tor can be made. It can be configured with the `-listenonion`, -`-torcontrol` and `-torpassword` settings. To show verbose debugging -information, pass `-debug=tor`. - -Notifications through ZMQ -------------------------- - -Bitcoind can now (optionally) asynchronously notify clients through a -ZMQ-based PUB socket of the arrival of new transactions and blocks. -This feature requires installation of the ZMQ C API library 4.x and -configuring its use through the command line or configuration file. -Please see [docs/zmq.md](/doc/zmq.md) for details of operation. - -Wallet: Transaction fees ------------------------- - -Various improvements have been made to how the wallet calculates -transaction fees. - -Users can decide to pay a predefined fee rate by setting `-paytxfee=` -(or `settxfee ` rpc during runtime). A value of `n=0` signals Bitcoin -Core to use floating fees. By default, Bitcoin Core will use floating -fees. - -Based on past transaction data, floating fees approximate the fees -required to get into the `m`th block from now. This is configurable -with `-txconfirmtarget=` (default: `2`). - -Sometimes, it is not possible to give good estimates, or an estimate -at all. Therefore, a fallback value can be set with `-fallbackfee=` -(default: `0.0002` BTC/kB). - -At all times, Bitcoin Core will cap fees at `-maxtxfee=` (default: -0.10) BTC. -Furthermore, Bitcoin Core will never create transactions smaller than -the current minimum relay fee. -Finally, a user can set the minimum fee rate for all transactions with -`-mintxfee=`, which defaults to 1000 satoshis per kB. - -Wallet: Negative confirmations and conflict detection ------------------------------------------------------ - -The wallet will now report a negative number for confirmations that indicates -how deep in the block chain the conflict is found. For example, if a transaction -A has 5 confirmations and spends the same input as a wallet transaction B, B -will be reported as having -5 confirmations. If another wallet transaction C -spends an output from B, it will also be reported as having -5 confirmations. -To detect conflicts with historical transactions in the chain a one-time -`-rescan` may be needed. - -Unlike earlier versions, unconfirmed but non-conflicting transactions will never -get a negative confirmation count. They are not treated as spendable unless -they're coming from ourself (change) and accepted into our local mempool, -however. The new "trusted" field in the `listtransactions` RPC output -indicates whether outputs of an unconfirmed transaction are considered -spendable. - -Wallet: Merkle branches removed -------------------------------- - -Previously, every wallet transaction stored a Merkle branch to prove its -presence in blocks. This wasn't being used for more than an expensive -sanity check. Since 0.12, these are no longer stored. When loading a -0.12 wallet into an older version, it will automatically rescan to avoid -failed checks. - -Wallet: Pruning ---------------- - -With 0.12 it is possible to use wallet functionality in pruned mode. -This can reduce the disk usage from currently around 60 GB to -around 2 GB. - -However, rescans as well as the RPCs `importwallet`, `importaddress`, -`importprivkey` are disabled. - -To enable block pruning set `prune=` on the command line or in -`bitcoin.conf`, where `N` is the number of MiB to allot for -raw block & undo data. - -A value of 0 disables pruning. The minimal value above 0 is 550. Your -wallet is as secure with high values as it is with low ones. Higher -values merely ensure that your node will not shut down upon blockchain -reorganizations of more than 2 days - which are unlikely to happen in -practice. In future releases, a higher value may also help the network -as a whole: stored blocks could be served to other nodes. - -For further information about pruning, you may also consult the [release -notes of v0.11.0](https://github.com/bitcoin/bitcoin/blob/v0.11.0/doc/release-notes.md#block-file-pruning). - -`NODE_BLOOM` service bit ------------------------- - -Support for the `NODE_BLOOM` service bit, as described in [BIP -111](https://github.com/bitcoin/bips/blob/master/bip-0111.mediawiki), has been -added to the P2P protocol code. - -BIP 111 defines a service bit to allow peers to advertise that they support -bloom filters (such as used by SPV clients) explicitly. It also bumps the protocol -version to allow peers to identify old nodes which allow bloom filtering of the -connection despite lacking the new service bit. - -In this version, it is only enforced for peers that send protocol versions -`>=70011`. For the next major version it is planned that this restriction will be -removed. It is recommended to update SPV clients to check for the `NODE_BLOOM` -service bit for nodes that report versions newer than 70011. - -Option parsing behavior ------------------------ - -Command line options are now parsed strictly in the order in which they are -specified. It used to be the case that `-X -noX` ends up, unintuitively, with X -set, as `-X` had precedence over `-noX`. This is no longer the case. Like for -other software, the last specified value for an option will hold. - -RPC: Low-level API changes --------------------------- - -- Monetary amounts can be provided as strings. This means that for example the - argument to sendtoaddress can be "0.0001" instead of 0.0001. This can be an - advantage if a JSON library insists on using a lossy floating point type for - numbers, which would be dangerous for monetary amounts. - -* The `asm` property of each scriptSig now contains the decoded signature hash - type for each signature that provides a valid defined hash type. - -* OP_NOP2 has been renamed to OP_CHECKLOCKTIMEVERIFY by [BIP 65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) - -The following items contain assembly representations of scriptSig signatures -and are affected by this change: - -- RPC `getrawtransaction` -- RPC `decoderawtransaction` -- RPC `decodescript` -- REST `/rest/tx/` (JSON format) -- REST `/rest/block/` (JSON format when including extended tx details) -- `bitcoin-tx -json` - -For example, the `scriptSig.asm` property of a transaction input that -previously showed an assembly representation of: - - 304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c509001 400000 OP_NOP2 - -now shows as: - - 304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c5090[ALL] 400000 OP_CHECKLOCKTIMEVERIFY - -Note that the output of the RPC `decodescript` did not change because it is -configured specifically to process scriptPubKey and not scriptSig scripts. - -RPC: SSL support dropped ------------------------- - -SSL support for RPC, previously enabled by the option `rpcssl` has been dropped -from both the client and the server. This was done in preparation for removing -the dependency on OpenSSL for the daemon completely. - -Trying to use `rpcssl` will result in an error: - - Error: SSL mode for RPC (-rpcssl) is no longer supported. - -If you are one of the few people that relies on this feature, a flexible -migration path is to use `stunnel`. This is an utility that can tunnel -arbitrary TCP connections inside SSL. On e.g. Ubuntu it can be installed with: - - sudo apt-get install stunnel4 - -Then, to tunnel a SSL connection on 28332 to a RPC server bound on localhost on port 18332 do: - - stunnel -d 28332 -r 127.0.0.1:18332 -p stunnel.pem -P '' - -It can also be set up system-wide in inetd style. - -Another way to re-attain SSL would be to setup a httpd reverse proxy. This solution -would allow the use of different authentication, loadbalancing, on-the-fly compression and -caching. A sample config for apache2 could look like: - - Listen 443 - - NameVirtualHost *:443 - - - SSLEngine On - SSLCertificateFile /etc/apache2/ssl/server.crt - SSLCertificateKeyFile /etc/apache2/ssl/server.key - - - ProxyPass http://127.0.0.1:8332/ - ProxyPassReverse http://127.0.0.1:8332/ - # optional enable digest auth - # AuthType Digest - # ... - - # optional bypass bitcoind rpc basic auth - # RequestHeader set Authorization "Basic " - # get the from the shell with: base64 <<< bitcoinrpc: - - - # Or, balance the load: - # ProxyPass / balancer://balancer_cluster_name - - - -Mining Code Changes -------------------- - -The mining code in 0.12 has been optimized to be significantly faster and use less -memory. As part of these changes, consensus critical calculations are cached on a -transaction's acceptance into the mempool and the mining code now relies on the -consistency of the mempool to assemble blocks. However all blocks are still tested -for validity after assembly. - -Other P2P Changes ------------------ - -The list of banned peers is now stored on disk rather than in memory. -Restarting bitcoind will no longer clear out the list of banned peers; instead -a new RPC call (`clearbanned`) can be used to manually clear the list. The new -`setban` RPC call can also be used to manually ban or unban a peer. - -0.12.0 Change log +0.12.1 Change log ================= Detailed release notes follow. This overview includes changes that affect @@ -468,423 +50,29 @@ git merge commit are mentioned. ### RPC and REST -- #6121 `466f0ea` Convert entire source tree from json_spirit to UniValue (Jonas Schnelli) -- #6234 `d38cd47` fix rpcmining/getblocktemplate univalue transition logic error (Jonas Schnelli) -- #6239 `643114f` Don't go through double in AmountFromValue and ValueFromAmount (Wladimir J. van der Laan) -- #6266 `ebab5d3` Fix univalue handling of \u0000 characters. (Daniel Kraft) -- #6276 `f3d4dbb` Fix getbalance * 0 (Tom Harding) -- #6257 `5ebe7db` Add `paytxfee` and `errors` JSON fields where appropriate (Stephen) -- #6271 `754aae5` New RPC command disconnectnode (Alex van der Peet) -- #6158 `0abfa8a` Add setban/listbanned RPC commands (Jonas Schnelli) -- #6307 `7ecdcd9` rpcban fixes (Jonas Schnelli) -- #6290 `5753988` rpc: make `gettxoutsettinfo` run lock-free (Wladimir J. van der Laan) -- #6262 `247b914` Return all available information via RPC call "validateaddress" (dexX7) -- #6339 `c3f0490` UniValue: don't escape solidus, keep espacing of reverse solidus (Jonas Schnelli) -- #6353 `6bcb0a2` Show softfork status in getblockchaininfo (Wladimir J. van der Laan) -- #6247 `726e286` Add getblockheader RPC call (Peter Todd) -- #6362 `d6db115` Fix null id in RPC response during startup (Forrest Voight) -- #5486 `943b322` [REST] JSON support for /rest/headers (Jonas Schnelli) -- #6379 `c52e8b3` rpc: Accept scientific notation for monetary amounts in JSON (Wladimir J. van der Laan) -- #6388 `fd5dfda` rpc: Implement random-cookie based authentication (Wladimir J. van der Laan) -- #6457 `3c923e8` Include pruned state in chaininfo.json (Simon Males) -- #6456 `bfd807f` rpc: Avoid unnecessary parsing roundtrip in number formatting, fix locale issue (Wladimir J. van der Laan) -- #6380 `240b30e` rpc: Accept strings in AmountFromValue (Wladimir J. van der Laan) -- #6346 `6bb2805` Add OP_RETURN support in createrawtransaction RPC call, add tests. (paveljanik) -- #6013 `6feeec1` [REST] Add memory pool API (paveljanik) -- #6576 `da9beb2` Stop parsing JSON after first finished construct. (Daniel Kraft) -- #5677 `9aa9099` libevent-based http server (Wladimir J. van der Laan) -- #6633 `bbc2b39` Report minimum ping time in getpeerinfo (Matt Corallo) -- #6648 `cd381d7` Simplify logic of REST request suffix parsing. (Daniel Kraft) -- #6695 `5e21388` libevent http fixes (Wladimir J. van der Laan) -- #5264 `48efbdb` show scriptSig signature hash types in transaction decodes. fixes #3166 (mruddy) -- #6719 `1a9f19a` Make HTTP server shutdown more graceful (Wladimir J. van der Laan) -- #6859 `0fbfc51` http: Restrict maximum size of http + headers (Wladimir J. van der Laan) -- #5936 `bf7c195` [RPC] Add optional locktime to createrawtransaction (Tom Harding) -- #6877 `26f5b34` rpc: Add maxmempool and effective min fee to getmempoolinfo (Wladimir J. van der Laan) -- #6970 `92701b3` Fix crash in validateaddress with -disablewallet (Wladimir J. van der Laan) -- #5574 `755b4ba` Expose GUI labels in RPC as comments (Luke-Jr) -- #6990 `dbd2c13` http: speed up shutdown (Wladimir J. van der Laan) -- #7013 `36baa9f` Remove LOCK(cs_main) from decodescript (Peter Todd) -- #6999 `972bf9c` add (max)uploadtarget infos to getnettotals RPC help (Jonas Schnelli) -- #7011 `31de241` Add mediantime to getblockchaininfo (Peter Todd) -- #7065 `f91e29f` http: add Boost 1.49 compatibility (Wladimir J. van der Laan) -- #7087 `be281d8` [Net]Add -enforcenodebloom option (Patrick Strateman) -- #7044 `438ee59` RPC: Added additional config option for multiple RPC users. (Gregory Sanders) -- #7072 `c143c49` [RPC] Add transaction size to JSON output (Nikita Zhavoronkov) -- #7022 `9afbd96` Change default block priority size to 0 (Alex Morcos) -- #7141 `c0c08c7` rpc: Don't translate warning messages (Wladimir J. van der Laan) -- #7312 `fd4bd50` Add RPC call abandontransaction (Alex Morcos) -- #7222 `e25b158` RPC: indicate which transactions are replaceable (Suhas Daftuar) -- #7472 `b2f2b85` rpc: Add WWW-Authenticate header to 401 response (Wladimir J. van der Laan) -- #7469 `9cb31e6` net.h fix spelling: misbeha{b,v}ing (Matt) - ### Configuration and command-line options -- #6164 `8d05ec7` Allow user to use -debug=1 to enable all debugging (lpescher) -- #5288 `4452205` Added -whiteconnections= option (Josh Lehan) -- #6284 `10ac38e` Fix argument parsing oddity with -noX (Wladimir J. van der Laan) -- #6489 `c9c017a` Give a better error message if system clock is bad (Casey Rodarmor) -- #6462 `c384800` implement uacomment config parameter which can add comments to user agent as per BIP-0014 (Pavol Rusnak) -- #6647 `a3babc8` Sanitize uacomment (MarcoFalke) -- #6742 `3b2d37c` Changed logging to make -logtimestamps to work also for -printtoconsole (arnuschky) -- #6846 `2cd020d` alias -h for -help (Daniel Cousens) -- #6622 `7939164` Introduce -maxuploadtarget (Jonas Schnelli) -- #6881 `2b62551` Debug: Add option for microsecond precision in debug.log (Suhas Daftuar) -- #6776 `e06c14f` Support -checkmempool=N, which runs checks once every N transactions (Pieter Wuille) -- #6896 `d482c0a` Make -checkmempool=1 not fail through int32 overflow (Pieter Wuille) -- #6993 `b632145` Add -blocksonly option (Patrick Strateman) -- #7323 `a344880` 0.12: Backport -bytespersigop option (Luke-Jr) -- #7386 `da83ecd` Add option `-permitrbf` to set transaction replacement policy (Wladimir J. van der Laan) -- #7290 `b16b5bc` Add missing options help (MarcoFalke) -- #7440 `c76bfff` Rename permitrbf to mempoolreplacement and provide minimal string-list forward compatibility (Luke-Jr) - ### Block and transaction handling -- #6203 `f00b623` Remove P2SH coinbase flag, no longer interesting (Luke-Jr) -- #6222 `9c93ee5` Explicitly set tx.nVersion for the genesis block and mining tests (Mark Friedenbach) -- #5985 `3a1d3e8` Fix removing of orphan transactions (Alex Morcos) -- #6221 `dd8fe82` Prune: Support noncontiguous block files (Adam Weiss) -- #6124 `41076aa` Mempool only CHECKLOCKTIMEVERIFY (BIP65) verification, unparameterized version (Peter Todd) -- #6329 `d0a10c1` acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke-Jr) -- #6410 `7cdefb9` Implement accurate memory accounting for mempool (Pieter Wuille) -- #6444 `24ce77d` Exempt unspendable transaction outputs from dust checks (dexX7) -- #5913 `a0625b8` Add absurdly high fee message to validation state (Shaul Kfir) -- #6177 `2f746c6` Prevent block.nTime from decreasing (Mark Friedenbach) -- #6377 `e545371` Handle no chain tip available in InvalidChainFound() (Ross Nicoll) -- #6551 `39ddaeb` Handle leveldb::DestroyDB() errors on wipe failure (Adam Weiss) -- #6654 `b0ce450` Mempool package tracking (Suhas Daftuar) -- #6715 `82d2aef` Fix mempool packages (Suhas Daftuar) -- #6680 `4f44530` use CBlockIndex instead of uint256 for UpdatedBlockTip signal (Jonas Schnelli) -- #6650 `4fac576` Obfuscate chainstate (James O'Beirne) -- #6777 `9caaf6e` Unobfuscate chainstate data in CCoinsViewDB::GetStats (James O'Beirne) -- #6722 `3b20e23` Limit mempool by throwing away the cheapest txn and setting min relay fee to it (Matt Corallo) -- #6889 `38369dd` fix locking issue with new mempool limiting (Jonas Schnelli) -- #6464 `8f3b3cd` Always clean up manual transaction prioritization (Casey Rodarmor) -- #6865 `d0badb9` Fix chainstate serialized_size computation (Pieter Wuille) -- #6566 `ff057f4` BIP-113: Mempool-only median time-past as endpoint for lock-time calculations (Mark Friedenbach) -- #6934 `3038eb6` Restores mempool only BIP113 enforcement (Gregory Maxwell) -- #6965 `de7d459` Benchmark sanity checks and fork checks in ConnectBlock (Matt Corallo) -- #6918 `eb6172a` Make sigcache faster, more efficient, larger (Pieter Wuille) -- #6771 `38ed190` Policy: Lower default limits for tx chains (Alex Morcos) -- #6932 `73fa5e6` ModifyNewCoins saves database lookups (Alex Morcos) -- #5967 `05d5918` Alter assumptions in CCoinsViewCache::BatchWrite (Alex Morcos) -- #6871 `0e93586` nSequence-based Full-RBF opt-in (Peter Todd) -- #7008 `eb77416` Lower bound priority (Alex Morcos) -- #6915 `2ef5ffa` [Mempool] Improve removal of invalid transactions after reorgs (Suhas Daftuar) -- #6898 `4077ad2` Rewrite CreateNewBlock (Alex Morcos) -- #6872 `bdda4d5` Remove UTXO cache entries when the tx they were added for is removed/does not enter mempool (Matt Corallo) -- #7062 `12c469b` [Mempool] Fix mempool limiting and replace-by-fee for PrioritiseTransaction (Suhas Daftuar) -- #7276 `76de36f` Report non-mandatory script failures correctly (Pieter Wuille) -- #7217 `e08b7cb` Mark blocks with too many sigops as failed (Suhas Daftuar) -- #7387 `f4b2ce8` Get rid of inaccurate ScriptSigArgsExpected (Pieter Wuille) - ### P2P protocol and network code -- #6172 `88a7ead` Ignore getheaders requests when not synced (Suhas Daftuar) -- #5875 `9d60602` Be stricter in processing unrequested blocks (Suhas Daftuar) -- #6256 `8ccc07c` Use best header chain timestamps to detect partitioning (Gavin Andresen) -- #6283 `a903ad7` make CAddrMan::size() return the correct type of size_t (Diapolo) -- #6272 `40400d5` Improve proxy initialization (continues #4871) (Wladimir J. van der Laan, Diapolo) -- #6310 `66e5465` banlist.dat: store banlist on disk (Jonas Schnelli) -- #6412 `1a2de32` Test whether created sockets are select()able (Pieter Wuille) -- #6498 `219b916` Keep track of recently rejected transactions with a rolling bloom filter (cont'd) (Peter Todd) -- #6556 `70ec975` Fix masking of irrelevant bits in address groups. (Alex Morcos) -- #6530 `ea19c2b` Improve addrman Select() performance when buckets are nearly empty (Pieter Wuille) -- #6583 `af9305a` add support for miniupnpc api version 14 (Pavel Vasin) -- #6374 `69dc5b5` Connection slot exhaustion DoS mitigation (Patrick Strateman) -- #6636 `536207f` net: correctly initialize nMinPingUsecTime (Wladimir J. van der Laan) -- #6579 `0c27795` Add NODE_BLOOM service bit and bump protocol version (Matt Corallo) -- #6148 `999c8be` Relay blocks when pruning (Suhas Daftuar) -- #6588 `cf9bb11` In (strCommand == "tx"), return if AlreadyHave() (Tom Harding) -- #6974 `2f71b07` Always allow getheaders from whitelisted peers (Wladimir J. van der Laan) -- #6639 `bd629d7` net: Automatically create hidden service, listen on Tor (Wladimir J. van der Laan) -- #6984 `9ffc687` don't enforce maxuploadtarget's disconnect for whitelisted peers (Jonas Schnelli) -- #7046 `c322652` Net: Improve blocks only mode. (Patrick Strateman) -- #7090 `d6454f6` Connect to Tor hidden services by default (when listening on Tor) (Peter Todd) -- #7106 `c894fbb` Fix and improve relay from whitelisted peers (Pieter Wuille) -- #7129 `5d5ef3a` Direct headers announcement (rebase of #6494) (Pieter Wuille) -- #7079 `1b5118b` Prevent peer flooding inv request queue (redux) (redux) (Gregory Maxwell) -- #7166 `6ba25d2` Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell) -- #7133 `f31955d` Replace setInventoryKnown with a rolling bloom filter (rebase of #7100) (Pieter Wuille) -- #7174 `82aff88` Don't do mempool lookups for "mempool" command without a filter (Matt Corallo) -- #7179 `44fef99` net: Fix sent reject messages for blocks and transactions (Wladimir J. van der Laan) -- #7181 `8fc174a` net: Add and document network messages in protocol.h (Wladimir J. van der Laan) -- #7125 `10b88be` Replace global trickle node with random delays (Pieter Wuille) -- #7415 `cb83beb` net: Hardcoded seeds update January 2016 (Wladimir J. van der Laan) -- #7438 `e2d9a58` Do not absolutely protect local peers; decide group ties based on time (Gregory Maxwell) -- #7439 `86755bc` Add whitelistforcerelay to control forced relaying. [#7099 redux] (Gregory Maxwell) -- #7482 `e16f5b4` Ensure headers count is correct (Suhas Daftuar) - ### Validation -- #5927 `8d9f0a6` Reduce checkpoints' effect on consensus. (Pieter Wuille) -- #6299 `24f2489` Bugfix: Don't check the genesis block header before accepting it (Jorge Timón) -- #6361 `d7ada03` Use real number of cores for default -par, ignore virtual cores (Wladimir J. van der Laan) -- #6519 `87f37e2` Make logging for validation optional (Wladimir J. van der Laan) -- #6351 `2a1090d` CHECKLOCKTIMEVERIFY (BIP65) IsSuperMajority() soft-fork (Peter Todd) -- #6931 `54e8bfe` Skip BIP 30 verification where not necessary (Alex Morcos) -- #6954 `e54ebbf` Switch to libsecp256k1-based ECDSA validation (Pieter Wuille) -- #6508 `61457c2` Switch to a constant-space Merkle root/branch algorithm. (Pieter Wuille) -- #6914 `327291a` Add pre-allocated vector type and use it for CScript (Pieter Wuille) -- #7500 `889e5b3` Correctly report high-S violations (Pieter Wuille) - - ### Build system -- #6210 `0e4f2a0` build: disable optional use of gmp in internal secp256k1 build (Wladimir J. van der Laan) -- #6214 `87406aa` [OSX] revert renaming of Bitcoin-Qt.app and use CFBundleDisplayName (partial revert of #6116) (Jonas Schnelli) -- #6218 `9d67b10` build/gitian misc updates (Cory Fields) -- #6269 `d4565b6` gitian: Use the new bitcoin-detached-sigs git repo for OSX signatures (Cory Fields) -- #6418 `d4a910c` Add autogen.sh to source tarball. (randy-waterhouse) -- #6373 `1ae3196` depends: non-qt bumps for 0.12 (Cory Fields) -- #6434 `059b352` Preserve user-passed CXXFLAGS with --enable-debug (Gavin Andresen) -- #6501 `fee6554` Misc build fixes (Cory Fields) -- #6600 `ef4945f` Include bitcoin-tx binary on Debian/Ubuntu (Zak Wilcox) -- #6619 `4862708` depends: bump miniupnpc and ccache (Michael Ford) -- #6801 `ae69a75` [depends] Latest config.guess and config.sub (Michael Ford) -- #6938 `193f7b5` build: If both Qt4 and Qt5 are installed, use Qt5 (Wladimir J. van der Laan) -- #7092 `348b281` build: Set osx permissions in the dmg to make Gatekeeper happy (Cory Fields) -- #6980 `eccd671` [Depends] Bump Boost, miniupnpc, ccache & zeromq (Michael Ford) -- #7424 `aa26ee0` Add security/export checks to gitian and fix current failures (Cory Fields) - ### Wallet -- #6183 `87550ee` Fix off-by-one error w/ nLockTime in the wallet (Peter Todd) -- #6057 `ac5476e` re-enable wallet in autoprune (Jonas Schnelli) -- #6356 `9e6c33b` Delay initial pruning until after wallet init (Adam Weiss) -- #6088 `91389e5` fundrawtransaction (Matt Corallo) -- #6415 `ddd8d80` Implement watchonly support in fundrawtransaction (Matt Corallo) -- #6567 `0f0f323` Fix crash when mining with empty keypool. (Daniel Kraft) -- #6688 `4939eab` Fix locking in GetTransaction. (Alex Morcos) -- #6645 `4dbd43e` Enable wallet key imports without rescan in pruned mode. (Gregory Maxwell) -- #6550 `5b77244` Do not store Merkle branches in the wallet. (Pieter Wuille) -- #5924 `12a7712` Clean up change computation in CreateTransaction. (Daniel Kraft) -- #6906 `48b5b84` Reject invalid pubkeys when reading ckey items from the wallet. (Gregory Maxwell) -- #7010 `e0a5ef8` Fix fundrawtransaction handling of includeWatching (Peter Todd) -- #6851 `616d61b` Optimisation: Store transaction list order in memory rather than compute it every need (Luke-Jr) -- #6134 `e92377f` Improve usage of fee estimation code (Alex Morcos) -- #7103 `a775182` [wallet, rpc tests] Fix settxfee, paytxfee (MarcoFalke) -- #7105 `30c2d8c` Keep track of explicit wallet conflicts instead of using mempool (Pieter Wuille) -- #7096 `9490bd7` [Wallet] Improve minimum absolute fee GUI options (Jonas Schnelli) -- #6216 `83f06ca` Take the training wheels off anti-fee-sniping (Peter Todd) -- #4906 `96e8d12` Issue#1643: Coinselection prunes extraneous inputs from ApproximateBestSubset (Murch) -- #7200 `06c6a58` Checks for null data transaction before issuing error to debug.log (Andy Craze) -- #7296 `a36d79b` Add sane fallback for fee estimation (Alex Morcos) -- #7293 `ff9b610` Add regression test for vValue sort order (MarcoFalke) -- #7306 `4707797` Make sure conflicted wallet tx's update balances (Alex Morcos) -- #7381 `621bbd8` [walletdb] Fix syntax error in key parser (MarcoFalke) -- #7491 `00ec73e` wallet: Ignore MarkConflict if block hash is not known (Wladimir J. van der Laan) -- #7502 `1329963` Update the wallet best block marker before pruning (Pieter Wuille) - ### GUI -- #6217 `c57e12a` disconnect peers from peers tab via context menu (Diapolo) -- #6209 `ab0ec67` extend rpc console peers tab (Diapolo) -- #6484 `1369d69` use CHashWriter also in SignVerifyMessageDialog (Pavel Vasin) -- #6487 `9848d42` Introduce PlatformStyle (Wladimir J. van der Laan) -- #6505 `100c9d3` cleanup icons (MarcoFalke) -- #4587 `0c465f5` allow users to set -onion via GUI (Diapolo) -- #6529 `c0f66ce` show client user agent in debug window (Diapolo) -- #6594 `878ea69` Disallow duplicate windows. (Casey Rodarmor) -- #5665 `6f55cdd` add verifySize() function to PaymentServer (Diapolo) -- #6317 `ca5e2a1` minor optimisations in peertablemodel (Diapolo) -- #6315 `e59d2a8` allow banning and unbanning over UI->peers table (Jonas Schnelli) -- #6653 `e04b2fa` Pop debug window in foreground when opened twice (MarcoFalke) -- #6864 `c702521` Use monospace font (MarcoFalke) -- #6887 `3694b74` Update coin control and smartfee labels (MarcoFalke) -- #7000 `814697c` add shortcurts for debug-/console-window (Jonas Schnelli) -- #6951 `03403d8` Use maxTxFee instead of 10000000 (MarcoFalke) -- #7051 `a190777` ui: Add "Copy raw transaction data" to transaction list context menu (Wladimir J. van der Laan) -- #6979 `776848a` simple mempool info in debug window (Jonas Schnelli) -- #7006 `26af1ac` add startup option to reset Qt settings (Jonas Schnelli) -- #6780 `2a94cd6` Call init's parameter interaction before we create the UI options model (Jonas Schnelli) -- #7112 `96b8025` reduce cs_main locks during tip update, more fluently update UI (Jonas Schnelli) -- #7206 `f43c2f9` Add "NODE_BLOOM" to guiutil so that peers don't get UNKNOWN[4] (Matt Corallo) -- #7282 `5cadf3e` fix coincontrol update issue when deleting a send coins entry (Jonas Schnelli) -- #7319 `1320300` Intro: Display required space (Jonas Schnelli) -- #7318 `9265e89` quickfix for RPC timer interface problem (Jonas Schnelli) -- #7327 `b16b5bc` [Wallet] Transaction View: LastMonth calculation fixed (crowning-) -- #7364 `7726c48` [qt] Windows: Make rpcconsole monospace font larger (MarcoFalke) -- #7384 `294f432` [qt] Peertable: Increase SUBVERSION_COLUMN_WIDTH (MarcoFalke) - ### Tests and QA -- #6305 `9005c91` build: comparison tool swap (Cory Fields) -- #6318 `e307e13` build: comparison tool NPE fix (Cory Fields) -- #6337 `0564c5b` Testing infrastructure: mocktime fixes (Gavin Andresen) -- #6350 `60abba1` add unit tests for the decodescript rpc (mruddy) -- #5881 `3203a08` Fix and improve txn_doublespend.py test (Tom Harding) -- #6390 `6a73d66` tests: Fix bitcoin-tx signing test case (Wladimir J. van der Laan) -- #6368 `7fc25c2` CLTV: Add more tests to improve coverage (Esteban Ordano) -- #6414 `5121c68` Fix intermittent test failure, reduce test time (Tom Harding) -- #6417 `44fa82d` [QA] fix possible reorg issue in (fund)rawtransaction(s).py RPC test (Jonas Schnelli) -- #6398 `3d9362d` rpc: Remove chain-specific RequireRPCPassword (Wladimir J. van der Laan) -- #6428 `bb59e78` tests: Remove old sh-based test framework (Wladimir J. van der Laan) -- #5515 `d946e9a` RFC: Assert on probable deadlocks if the second lock isnt try_lock (Matt Corallo) -- #6287 `d2464df` Clang lock debug (Cory Fields) -- #6465 `410fd74` Don't share objects between TestInstances (Casey Rodarmor) -- #6534 `6c1c7fd` Fix test locking issues and un-revert the probable-deadlines assertions commit (Cory Fields) -- #6509 `bb4faee` Fix race condition on test node shutdown (Casey Rodarmor) -- #6523 `561f8af` Add p2p-fullblocktest.py (Casey Rodarmor) -- #6590 `981fd92` Fix stale socket rebinding and re-enable python tests for Windows (Cory Fields) -- #6730 `cb4d6d0` build: Remove dependency of bitcoin-cli on secp256k1 (Wladimir J. van der Laan) -- #6616 `5ab5dca` Regression Tests: Migrated rpc-tests.sh to all Python rpc-tests.py (Peter Tschipper) -- #6720 `d479311` Creates unittests for addrman, makes addrman more testable. (Ethan Heilman) -- #6853 `c834f56` Added fPowNoRetargeting field to Consensus::Params (Eric Lombrozo) -- #6827 `87e5539` [rpc-tests] Check return code (MarcoFalke) -- #6848 `f2c869a` Add DERSIG transaction test cases (Ross Nicoll) -- #6813 `5242bb3` Support gathering code coverage data for RPC tests with lcov (dexX7) -- #6888 `c8322ff` Clear strMiscWarning before running PartitionAlert (Eric Lombrozo) -- #6894 `2675276` [Tests] Fix BIP65 p2p test (Suhas Daftuar) -- #6863 `725539e` [Test Suite] Fix test for null tx input (Daniel Kraft) -- #6926 `a6d0d62` tests: Initialize networking on windows (Wladimir J. van der Laan) -- #6822 `9fa54a1` [tests] Be more strict checking dust (MarcoFalke) -- #6804 `5fcc14e` [tests] Add basic coverage reporting for RPC tests (James O'Beirne) -- #7045 `72dccfc` Bugfix: Use unique autostart filenames on Linux for testnet/regtest (Luke-Jr) -- #7095 `d8368a0` Replace scriptnum_test's normative ScriptNum implementation (Wladimir J. van der Laan) -- #7063 `6abf6eb` [Tests] Add prioritisetransaction RPC test (Suhas Daftuar) -- #7137 `16f4a6e` Tests: Explicitly set chain limits in replace-by-fee test (Suhas Daftuar) -- #7216 `9572e49` Removed offline testnet DNSSeed 'alexykot.me'. (tnull) -- #7209 `f3ad812` test: don't override BITCOIND and BITCOINCLI if they're set (Wladimir J. van der Laan) -- #7226 `301f16a` Tests: Add more tests to p2p-fullblocktest (Suhas Daftuar) -- #7153 `9ef7c54` [Tests] Add mempool_limit.py test (Jonas Schnelli) -- #7170 `453c567` tests: Disable Tor interaction (Wladimir J. van der Laan) -- #7229 `1ed938b` [qa] wallet: Check if maintenance changes the balance (MarcoFalke) -- #7308 `d513405` [Tests] Eliminate intermittent failures in sendheaders.py (Suhas Daftuar) -- #7468 `947c4ff` [rpc-tests] Change solve() to use rehash (Brad Andrews) - ### Miscellaneous -- #6213 `e54ff2f` [init] add -blockversion help and extend -upnp help (Diapolo) -- #5975 `1fea667` Consensus: Decouple ContextualCheckBlockHeader from checkpoints (Jorge Timón) -- #6061 `eba2f06` Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs (Jorge Timón) -- #5994 `786ed11` detach wallet from miner (Jonas Schnelli) -- #6387 `11576a5` [bitcoin-cli] improve error output (Jonas Schnelli) -- #6401 `6db53b4` Add BITCOIND_SIGTERM_TIMEOUT to OpenRC init scripts (Florian Schmaus) -- #6430 `b01981e` doc: add documentation for shared library libbitcoinconsensus (Braydon Fuller) -- #6372 `dcc495e` Update Linearize tool to support Windows paths; fix variable scope; update README and example configuration (Paul Georgiou) -- #6453 `8fe5cce` Separate core memory usage computation in core_memusage.h (Pieter Wuille) -- #6149 `633fe10` Buffer log messages and explicitly open logs (Adam Weiss) -- #6488 `7cbed7f` Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor) -- #6497 `a2bf40d` Make sure LogPrintf strings are line-terminated (Wladimir J. van der Laan) -- #6504 `b6fee6b` Rationalize currency unit to "BTC" (Ross Nicoll) -- #6507 `9bb4dd8` Removed contrib/bitrpc (Casey Rodarmor) -- #6527 `41d650f` Use unique name for AlertNotify tempfile (Casey Rodarmor) -- #6561 `e08a7d9` limitedmap fixes and tests (Casey Rodarmor) -- #6565 `a6f2aff` Make sure we re-acquire lock if a task throws (Casey Rodarmor) -- #6599 `f4d88c4` Make sure LogPrint strings are line-terminated (Ross Nicoll) -- #6630 `195942d` Replace boost::reverse_lock with our own (Casey Rodarmor) -- #6103 `13b8282` Add ZeroMQ notifications (João Barbosa) -- #6692 `d5d1d2e` devtools: don't push if signing fails in github-merge (Wladimir J. van der Laan) -- #6728 `2b0567b` timedata: Prevent warning overkill (Wladimir J. van der Laan) -- #6713 `f6ce59c` SanitizeString: Allow hypen char (MarcoFalke) -- #5987 `4899a04` Bugfix: Fix testnet-in-a-box use case (Luke-Jr) -- #6733 `b7d78fd` Simple benchmarking framework (Gavin Andresen) -- #6854 `a092970` devtools: Add security-check.py (Wladimir J. van der Laan) -- #6790 `fa1d252` devtools: add clang-format.py (MarcoFalke) -- #7114 `f3d0fdd` util: Don't set strMiscWarning on every exception (Wladimir J. van der Laan) -- #7078 `93e0514` uint256::GetCheapHash bigendian compatibility (arowser) -- #7094 `34e02e0` Assert now > 0 in GetTime GetTimeMillis GetTimeMicros (Patrick Strateman) - Credits ======= Thanks to everyone who directly contributed to this release: -- accraze -- Adam Weiss -- Alex Morcos -- Alex van der Peet -- AlSzacrel -- Altoidnerd -- Andriy Voskoboinyk -- antonio-fr -- Arne Brutschy -- Ashley Holman -- Bob McElrath -- Braydon Fuller -- BtcDrak -- Casey Rodarmor -- centaur1 -- Chris Kleeschulte -- Christian Decker -- Cory Fields -- daniel -- Daniel Cousens -- Daniel Kraft -- David Hill -- dexX7 -- Diego Viola -- Elias Rohrer -- Eric Lombrozo -- Erik Mossberg -- Esteban Ordano -- EthanHeilman -- Florian Schmaus -- Forrest Voight -- Gavin Andresen -- Gregory Maxwell -- Gregory Sanders / instagibbs -- Ian T -- Irving Ruan -- Jacob Welsh -- James O'Beirne -- Jeff Garzik -- Johnathan Corgan -- Jonas Schnelli -- Jonathan Cross -- João Barbosa -- Jorge Timón -- Josh Lehan -- J Ross Nicoll -- kazcw -- Kevin Cooper -- lpescher -- Luke Dashjr -- Marco -- MarcoFalke -- Mark Friedenbach -- Matt -- Matt Bogosian -- Matt Corallo -- Matt Quinn -- Micha -- Michael -- Michael Ford / fanquake -- Midnight Magic -- Mitchell Cash -- mrbandrews -- mruddy -- Nick -- Patrick Strateman -- Paul Georgiou -- Paul Rabahy -- Pavel Janík / paveljanik -- Pavel Vasin -- Pavol Rusnak -- Peter Josling -- Peter Todd -- Philip Kaufmann -- Pieter Wuille -- ptschip -- randy-waterhouse -- rion -- Ross Nicoll -- Ryan Havar -- Shaul Kfir -- Simon Males -- Stephen -- Suhas Daftuar -- tailsjoin -- Thomas Kerin -- Tom Harding -- tulip -- unsystemizer -- Veres Lajos -- Wladimir J. van der Laan -- xor-freenet -- Zak Wilcox -- zathras-crypto As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 00d57b4d3a9a8e0a6e59ac639229debe14385ceb Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 9 Feb 2016 22:17:09 +0000 Subject: [PATCH 02/45] Workaround Travis-side CI issues Github-Pull: #7487 Rebased-From: 149641e8fc9996da01eb76ffe4578828c40d37b5 c01f08db127883ff985889214eebdbe9513c729a 5d1148cb79856ac4695a0c7ac1cd28ada04eff34 1ecbb3b0f717c277f3db1a923fff16f7fc39432c --- .travis.yml | 8 +++++++- depends/builders/darwin.mk | 2 +- depends/builders/linux.mk | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2d43d633..1a5731f3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,12 @@ # compiler key (which we don't use anyway). This is worked around for now by # replacing the "compilers" with a build name prefixed by the no-op ":" # command. See: https://github.com/travis-ci/travis-ci/issues/4393 +# - sudo/dist/group are set so as to get Blue Box VMs, necessary for [loopback] +# IPv6 support + +sudo: required +dist: precise +group: legacy os: linux language: cpp @@ -52,7 +58,7 @@ install: before_script: - unset CC; unset CXX - mkdir -p depends/SDKs depends/sdk-sources - - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then wget $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -O depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi + - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS script: diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index b366460e6..cedbddc57 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -7,7 +7,7 @@ build_darwin_OTOOL: = $(shell xcrun -f otool) build_darwin_NM: = $(shell xcrun -f nm) build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) build_darwin_SHA256SUM = shasum -a 256 -build_darwin_DOWNLOAD = curl --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o +build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o #darwin host on darwin builder. overrides darwin host preferences. darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) diff --git a/depends/builders/linux.mk b/depends/builders/linux.mk index 98d0e9de3..d6a304e4b 100644 --- a/depends/builders/linux.mk +++ b/depends/builders/linux.mk @@ -1,2 +1,2 @@ build_linux_SHA256SUM = sha256sum -build_linux_DOWNLOAD = wget --timeout=$(DOWNLOAD_CONNECT_TIMEOUT) --tries=$(DOWNLOAD_RETRIES) -nv -O +build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o From a10da9aa4933832b8258132729e31a18b57daf0f Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 26 Feb 2016 09:59:39 +0100 Subject: [PATCH 03/45] [depends] builders: No need to set -L and --location for curl Github-Pull: #7606 Rebased-From: fa7a5c54fc836ada12c185c43806c5e4a1044701 --- depends/builders/darwin.mk | 2 +- depends/builders/linux.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk index cedbddc57..200d6ed22 100644 --- a/depends/builders/darwin.mk +++ b/depends/builders/darwin.mk @@ -7,7 +7,7 @@ build_darwin_OTOOL: = $(shell xcrun -f otool) build_darwin_NM: = $(shell xcrun -f nm) build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool) build_darwin_SHA256SUM = shasum -a 256 -build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o +build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o #darwin host on darwin builder. overrides darwin host preferences. darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) diff --git a/depends/builders/linux.mk b/depends/builders/linux.mk index d6a304e4b..b03f42401 100644 --- a/depends/builders/linux.mk +++ b/depends/builders/linux.mk @@ -1,2 +1,2 @@ build_linux_SHA256SUM = sha256sum -build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o +build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o From ca8f160af5a54d08f8dc73acd959b0a73a7b427c Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 27 Feb 2016 06:09:18 +0000 Subject: [PATCH 04/45] Bugfix: gitian: Add curl to packages (now needed for depends) Github-Pull: #7614 Rebased-From: 5c70a6d6d15cc301b76558f708948c375fe63ccb --- contrib/gitian-descriptors/gitian-linux.yml | 1 + contrib/gitian-descriptors/gitian-osx.yml | 1 + contrib/gitian-descriptors/gitian-win.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index d034a9130..ed1e63822 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -6,6 +6,7 @@ suites: architectures: - "amd64" packages: +- "curl" - "g++-multilib" - "git-core" - "pkg-config" diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 81888dea0..27dfe63ac 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -6,6 +6,7 @@ suites: architectures: - "amd64" packages: +- "curl" - "g++" - "git-core" - "pkg-config" diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index bcc6c4629..38cdfe4e1 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -6,6 +6,7 @@ suites: architectures: - "amd64" packages: +- "curl" - "g++" - "git-core" - "pkg-config" From f04f4fd2eed581a5e287d14036d790cf2badcbe6 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 19 Dec 2015 14:27:15 +0100 Subject: [PATCH 05/45] [doc/log] Fix markdown syntax and line terminate LogPrint - Fix doxygen comment for payTxFee - [doc] Fix markdown - Make sure LogPrintf strings are line-terminated Github-Pull: #7617 Rebased-From: fa06ce09498707d5e82633f1e1b034675e552628 fa97f95c15a7aee15feea500571a10a90f22ea8b fa266524592cc18c789cc587d738fb0e548fd23a --- README.md | 3 ++- contrib/verifysfbinaries/README.md | 4 ++-- doc/README.md | 2 +- doc/release-process.md | 2 +- qa/rpc-tests/multi_rpc.py | 2 +- share/rpcuser/README.md | 3 +-- src/httprpc.cpp | 2 +- src/wallet/wallet.cpp | 4 +--- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 77d30db69..d5b742534 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ out collectively by the network. Bitcoin Core is the name of open source software which enables the use of this currency. For more information, as well as an immediately useable, binary version of -the Bitcoin Core software, see https://www.bitcoin.org/en/download. +the Bitcoin Core software, see https://bitcoin.org/en/download, or read the +[original whitepaper](https://bitcoincore.org/bitcoin.pdf). License ------- diff --git a/contrib/verifysfbinaries/README.md b/contrib/verifysfbinaries/README.md index 8c038865b..1db3fe52f 100644 --- a/contrib/verifysfbinaries/README.md +++ b/contrib/verifysfbinaries/README.md @@ -1,6 +1,6 @@ -### Verify SF Binaries ### +### Verify Binaries ### This script attempts to download the signature file `SHA256SUMS.asc` from https://bitcoin.org. It first checks if the signature passes, and then downloads the files specified in the file, and checks if the hashes of these files match those that are specified in the signature file. -The script returns 0 if everything passes the checks. It returns 1 if either the signature check or the hash check doesn't pass. If an error occurs the return value is 2. \ No newline at end of file +The script returns 0 if everything passes the checks. It returns 1 if either the signature check or the hash check doesn't pass. If an error occurs the return value is 2. diff --git a/doc/README.md b/doc/README.md index 79523d9c9..5dadbc964 100644 --- a/doc/README.md +++ b/doc/README.md @@ -49,7 +49,7 @@ The following are developer notes on how to build Bitcoin on your native platfor Development --------------------- -The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/README.md) contains relevant information on the development process and automated testing. +The Bitcoin repo's [root README](/README.md) contains relevant information on the development process and automated testing. - [Developer Notes](developer-notes.md) - [Multiwallet Qt Development](multiwallet-qt.md) diff --git a/doc/release-process.md b/doc/release-process.md index 8fb083d0d..2c83896c2 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -210,7 +210,7 @@ Note: check that SHA256SUMS itself doesn't end up in SHA256SUMS, which is a spur - Optionally reddit /r/Bitcoin, ... but this will usually sort out itself -- Notify BlueMatt so that he can start building [https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin](the PPAs) +- Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin) - Add release notes for the new version to the directory `doc/release-notes` in git master diff --git a/qa/rpc-tests/multi_rpc.py b/qa/rpc-tests/multi_rpc.py index 62071d426..2452b7731 100755 --- a/qa/rpc-tests/multi_rpc.py +++ b/qa/rpc-tests/multi_rpc.py @@ -44,7 +44,7 @@ class HTTPBasicsTest (BitcoinTestFramework): #Old authpair authpair = url.username + ':' + url.password - #New authpair generated via contrib/rpcuser tool + #New authpair generated via share/rpcuser tool rpcauth = "rpcauth=rt:93648e835a54c573682c2eb19f882535$7681e9c5b74bdd85e78166031d2058e1069b3ed7ed967c93fc63abba06f31144" password = "cA773lm788buwYe4g4WT+05pKyNruVKjQ25x3n0DQcM=" diff --git a/share/rpcuser/README.md b/share/rpcuser/README.md index 7c2c909a4..12a8e6fb0 100644 --- a/share/rpcuser/README.md +++ b/share/rpcuser/README.md @@ -7,5 +7,4 @@ Create an RPC user login credential. Usage: -./rpcuser.py - + ./rpcuser.py diff --git a/src/httprpc.cpp b/src/httprpc.cpp index f6fa988b9..57b3f9a09 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -215,7 +215,7 @@ static bool InitRPCAuthentication() return false; } } else { - LogPrintf("Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation."); + LogPrintf("Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.\n"); strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]; } return true; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index be70240a6..fca3d52f4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -33,9 +33,7 @@ using namespace std; -/** - * Settings - */ +/** Transaction fee set by the user */ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE); CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE; unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET; From 15ba08c3b5f66a6c4726a746affc7fb3216d4206 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Mon, 7 Dec 2015 15:44:16 -0500 Subject: [PATCH 06/45] Implement SequenceLocks functions SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68. The majority of this code is copied from maaku in #6312 Further credit: btcdrak, sipa, NicolasDorier --- src/consensus/consensus.h | 5 +- src/main.cpp | 150 ++++++++++++++++++++++++++++++++- src/main.h | 17 +++- src/policy/policy.h | 5 +- src/primitives/transaction.cpp | 2 +- src/primitives/transaction.h | 38 +++++++-- src/script/interpreter.cpp | 2 +- src/test/miner_tests.cpp | 124 ++++++++++++++++++++------- src/test/script_tests.cpp | 4 +- src/txmempool.cpp | 2 +- 10 files changed, 300 insertions(+), 49 deletions(-) diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h index 5a099cf53..ad9cc2617 100644 --- a/src/consensus/consensus.h +++ b/src/consensus/consensus.h @@ -13,8 +13,11 @@ static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */ static const int COINBASE_MATURITY = 100; -/** Flags for LockTime() */ +/** Flags for nSequence and nLockTime locks */ enum { + /* Interpret sequence numbers as relative lock-time constraints. */ + LOCKTIME_VERIFY_SEQUENCE = (1 << 0), + /* Use GetMedianTimePast() instead of nTime for end point timestamp. */ LOCKTIME_MEDIAN_TIME_PAST = (1 << 1), }; diff --git a/src/main.cpp b/src/main.cpp index 5b27698d8..1bc02c094 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -671,9 +671,10 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime) return true; if ((int64_t)tx.nLockTime < ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime)) return true; - BOOST_FOREACH(const CTxIn& txin, tx.vin) - if (!txin.IsFinal()) + BOOST_FOREACH(const CTxIn& txin, tx.vin) { + if (!(txin.nSequence == CTxIn::SEQUENCE_FINAL)) return false; + } return true; } @@ -709,6 +710,128 @@ bool CheckFinalTx(const CTransaction &tx, int flags) return IsFinalTx(tx, nBlockHeight, nBlockTime); } +/** + * Calculates the block height and previous block's median time past at + * which the transaction will be considered final in the context of BIP 68. + * Also removes from the vector of input heights any entries which did not + * correspond to sequence locked inputs as they do not affect the calculation. + */ +static std::pair CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeights, const CBlockIndex& block) +{ + assert(prevHeights->size() == tx.vin.size()); + + // Will be set to the equivalent height- and time-based nLockTime + // values that would be necessary to satisfy all relative lock- + // time constraints given our view of block chain history. + // The semantics of nLockTime are the last invalid height/time, so + // use -1 to have the effect of any height or time being valid. + int nMinHeight = -1; + int64_t nMinTime = -1; + + // tx.nVersion is signed integer so requires cast to unsigned otherwise + // we would be doing a signed comparison and half the range of nVersion + // wouldn't support BIP 68. + bool fEnforceBIP68 = static_cast(tx.nVersion) >= 2 + && flags & LOCKTIME_VERIFY_SEQUENCE; + + // Do not enforce sequence numbers as a relative lock time + // unless we have been instructed to + if (!fEnforceBIP68) { + return std::make_pair(nMinHeight, nMinTime); + } + + for (size_t txinIndex = 0; txinIndex < tx.vin.size(); txinIndex++) { + const CTxIn& txin = tx.vin[txinIndex]; + + // Sequence numbers with the most significant bit set are not + // treated as relative lock-times, nor are they given any + // consensus-enforced meaning at this point. + if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG) { + // The height of this input is not relevant for sequence locks + (*prevHeights)[txinIndex] = 0; + continue; + } + + int nCoinHeight = (*prevHeights)[txinIndex]; + + if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) { + int64_t nCoinTime = block.GetAncestor(std::max(nCoinHeight-1, 0))->GetMedianTimePast(); + // NOTE: Subtract 1 to maintain nLockTime semantics + // BIP 68 relative lock times have the semantics of calculating + // the first block or time at which the transaction would be + // valid. When calculating the effective block time or height + // for the entire transaction, we switch to using the + // semantics of nLockTime which is the last invalid block + // time or height. Thus we subtract 1 from the calculated + // time or height. + + // Time-based relative lock-times are measured from the + // smallest allowed timestamp of the block containing the + // txout being spent, which is the median time past of the + // block prior. + nMinTime = std::max(nMinTime, nCoinTime + (int64_t)((txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_MASK) << CTxIn::SEQUENCE_LOCKTIME_GRANULARITY) - 1); + } else { + nMinHeight = std::max(nMinHeight, nCoinHeight + (int)(txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_MASK) - 1); + } + } + + return std::make_pair(nMinHeight, nMinTime); +} + +static bool EvaluateSequenceLocks(const CBlockIndex& block, std::pair lockPair) +{ + assert(block.pprev); + int64_t nBlockTime = block.pprev->GetMedianTimePast(); + if (lockPair.first >= block.nHeight || lockPair.second >= nBlockTime) + return false; + + return true; +} + +bool SequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeights, const CBlockIndex& block) +{ + return EvaluateSequenceLocks(block, CalculateSequenceLocks(tx, flags, prevHeights, block)); +} + +bool CheckSequenceLocks(const CTransaction &tx, int flags) +{ + AssertLockHeld(cs_main); + AssertLockHeld(mempool.cs); + + CBlockIndex* tip = chainActive.Tip(); + CBlockIndex index; + index.pprev = tip; + // CheckSequenceLocks() uses chainActive.Height()+1 to evaluate + // height based locks because when SequenceLocks() is called within + // CBlock::AcceptBlock(), the height of the block *being* + // evaluated is what is used. Thus if we want to know if a + // transaction can be part of the *next* block, we need to call + // SequenceLocks() with one more than chainActive.Height(). + index.nHeight = tip->nHeight + 1; + + // pcoinsTip contains the UTXO set for chainActive.Tip() + CCoinsViewMemPool viewMemPool(pcoinsTip, mempool); + std::vector prevheights; + prevheights.resize(tx.vin.size()); + for (size_t txinIndex = 0; txinIndex < tx.vin.size(); txinIndex++) { + const CTxIn& txin = tx.vin[txinIndex]; + CCoins coins; + if (!viewMemPool.GetCoins(txin.prevout.hash, coins)) { + return error("%s: Missing input", __func__); + } + if (coins.nHeight == MEMPOOL_HEIGHT) { + // Assume all mempool transaction confirm in the next block + prevheights[txinIndex] = tip->nHeight + 1; + } else { + prevheights[txinIndex] = coins.nHeight; + } + } + + std::pair lockPair = CalculateSequenceLocks(tx, flags, &prevheights, index); + return EvaluateSequenceLocks(index, lockPair); +} + + unsigned int GetLegacySigOpCount(const CTransaction& tx) { unsigned int nSigOps = 0; @@ -930,6 +1053,14 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C // we have all inputs cached now, so switch back to dummy, so we don't need to keep lock on mempool view.SetBackend(dummy); + + // Only accept BIP68 sequence locked transactions that can be mined in the next + // block; we don't want our mempool filled up with transactions that can't + // be mined yet. + // Must keep pool.cs for this unless we change CheckSequenceLocks to take a + // CoinsViewCache instead of create its own + if (!CheckSequenceLocks(tx, STANDARD_LOCKTIME_VERIFY_FLAGS)) + return state.DoS(0, false, REJECT_NONSTANDARD, "non-BIP68-final"); } // Check for non-standard pay-to-script-hash in inputs @@ -2056,6 +2187,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin CCheckQueueControl control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL); + std::vector prevheights; + int nLockTimeFlags = 0; CAmount nFees = 0; int nInputs = 0; unsigned int nSigOps = 0; @@ -2079,6 +2212,19 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin return state.DoS(100, error("ConnectBlock(): inputs missing/spent"), REJECT_INVALID, "bad-txns-inputs-missingorspent"); + // Check that transaction is BIP68 final + // BIP68 lock checks (as opposed to nLockTime checks) must + // be in ConnectBlock because they require the UTXO set + prevheights.resize(tx.vin.size()); + for (size_t j = 0; j < tx.vin.size(); j++) { + prevheights[j] = view.AccessCoins(tx.vin[j].prevout.hash)->nHeight; + } + + if (!SequenceLocks(tx, nLockTimeFlags, &prevheights, *pindex)) { + return state.DoS(100, error("ConnectBlock(): contains a non-BIP68-final transaction", __func__), + REJECT_INVALID, "bad-txns-nonfinal"); + } + if (fStrictPayToScriptHash) { // Add in sigops done by pay-to-script-hash inputs; diff --git a/src/main.h b/src/main.h index 9fd97d212..ed02a2e71 100644 --- a/src/main.h +++ b/src/main.h @@ -353,7 +353,22 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime); */ bool CheckFinalTx(const CTransaction &tx, int flags = -1); -/** +/** + * Check if transaction is final per BIP 68 sequence numbers and can be included in a block. + * Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed. + */ +bool SequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeights, const CBlockIndex& block); + +/** + * Check if transaction will be BIP 68 final in the next block to be created. + * + * Calls SequenceLocks() with data from the tip of the current active chain. + * + * See consensus/consensus.h for flag definitions. + */ +bool CheckSequenceLocks(const CTransaction &tx, int flags); + +/** * Closure representing one script verification * Note that this stores references to the spending transaction */ diff --git a/src/policy/policy.h b/src/policy/policy.h index 726864f19..746775f56 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -45,8 +45,9 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY /** 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; -/** Used as the flags parameter to CheckFinalTx() in non-consensus code */ -static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_MEDIAN_TIME_PAST; +/** Used as the flags parameter to LockTime() in non-consensus code. */ +static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_VERIFY_SEQUENCE | + LOCKTIME_MEDIAN_TIME_PAST; bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType); /** diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp index aea96d8a1..947f2e6a7 100644 --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -37,7 +37,7 @@ std::string CTxIn::ToString() const str += strprintf(", coinbase %s", HexStr(scriptSig)); else str += strprintf(", scriptSig=%s", HexStr(scriptSig).substr(0, 24)); - if (nSequence != std::numeric_limits::max()) + if (nSequence != SEQUENCE_FINAL) str += strprintf(", nSequence=%u", nSequence); str += ")"; return str; diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 8bd6d00e2..07ae39e0b 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -61,13 +61,40 @@ public: CScript scriptSig; uint32_t nSequence; + /* Setting nSequence to this value for every input in a transaction + * disables nLockTime. */ + static const uint32_t SEQUENCE_FINAL = 0xffffffff; + + /* Below flags apply in the context of BIP 68*/ + /* If this flag set, CTxIn::nSequence is NOT interpreted as a + * relative lock-time. */ + static const uint32_t SEQUENCE_LOCKTIME_DISABLE_FLAG = (1 << 31); + + /* If CTxIn::nSequence encodes a relative lock-time and this flag + * is set, the relative lock-time has units of 512 seconds, + * otherwise it specifies blocks with a granularity of 1. */ + static const uint32_t SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22); + + /* If CTxIn::nSequence encodes a relative lock-time, this mask is + * applied to extract that lock-time from the sequence field. */ + static const uint32_t SEQUENCE_LOCKTIME_MASK = 0x0000ffff; + + /* In order to use the same number of bits to encode roughly the + * same wall-clock duration, and because blocks are naturally + * limited to occur every 600s on average, the minimum granularity + * for time-based relative lock-time is fixed at 512 seconds. + * Converting from CTxIn::nSequence to seconds is performed by + * multiplying by 512 = 2^9, or equivalently shifting up by + * 9 bits. */ + static const int SEQUENCE_LOCKTIME_GRANULARITY = 9; + CTxIn() { - nSequence = std::numeric_limits::max(); + nSequence = SEQUENCE_FINAL; } - explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits::max()); - CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits::max()); + explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=SEQUENCE_FINAL); + CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=SEQUENCE_FINAL); ADD_SERIALIZE_METHODS; @@ -78,11 +105,6 @@ public: READWRITE(nSequence); } - bool IsFinal() const - { - return (nSequence == std::numeric_limits::max()); - } - friend bool operator==(const CTxIn& a, const CTxIn& b) { return (a.prevout == b.prevout && diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 265131ae0..901f901f0 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1150,7 +1150,7 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con // prevent this condition. Alternatively we could test all // inputs, but testing just this input minimizes the data // required to prove correct CHECKLOCKTIMEVERIFY execution. - if (txTo->vin[nIn].IsFinal()) + if (CTxIn::SEQUENCE_FINAL == txTo->vin[nIn].nSequence) return false; return true; diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 71b52409b..f3297e074 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -57,6 +57,20 @@ struct { {2, 0xbbbeb305}, {2, 0xfe1c810a}, }; +CBlockIndex CreateBlockIndex(int nHeight) +{ + CBlockIndex index; + index.nHeight = nHeight; + index.pprev = chainActive.Tip(); + return index; +} + +bool TestSequenceLocks(const CTransaction &tx, int flags) +{ + LOCK(mempool.cs); + return CheckSequenceLocks(tx, flags); +} + // NOTE: These tests rely on CreateNewBlock doing its own self-validation! BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) { @@ -79,6 +93,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // We can't make transactions until we have inputs // Therefore, load 100 blocks :) + int baseheight = 0; std::vectortxFirst; for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i) { @@ -92,7 +107,9 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) txCoinbase.vin[0].scriptSig.push_back(chainActive.Height()); txCoinbase.vout[0].scriptPubKey = CScript(); pblock->vtx[0] = CTransaction(txCoinbase); - if (txFirst.size() < 2) + if (txFirst.size() == 0) + baseheight = chainActive.Height(); + if (txFirst.size() < 4) txFirst.push_back(new CTransaction(pblock->vtx[0])); pblock->hashMerkleRoot = BlockMerkleRoot(*pblock); pblock->nNonce = blockinfo[i].nonce; @@ -240,49 +257,96 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // non-final txs in mempool SetMockTime(chainActive.Tip()->GetMedianTimePast()+1); + int flags = LOCKTIME_VERIFY_SEQUENCE|LOCKTIME_MEDIAN_TIME_PAST; + // height map + std::vector prevheights; - // height locked - tx.vin[0].prevout.hash = txFirst[0]->GetHash(); + // relative height locked + tx.nVersion = 2; + tx.vin.resize(1); + prevheights.resize(1); + tx.vin[0].prevout.hash = txFirst[0]->GetHash(); // only 1 transaction + tx.vin[0].prevout.n = 0; tx.vin[0].scriptSig = CScript() << OP_1; - tx.vin[0].nSequence = 0; + tx.vin[0].nSequence = chainActive.Tip()->nHeight + 1; // txFirst[0] is the 2nd block + prevheights[0] = baseheight + 1; + tx.vout.resize(1); tx.vout[0].nValue = 4900000000LL; tx.vout[0].scriptPubKey = CScript() << OP_1; - tx.nLockTime = chainActive.Tip()->nHeight+1; + tx.nLockTime = 0; hash = tx.GetHash(); mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); - BOOST_CHECK(!CheckFinalTx(tx, LOCKTIME_MEDIAN_TIME_PAST)); + BOOST_CHECK(CheckFinalTx(tx, flags)); // Locktime passes + BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail + BOOST_CHECK(SequenceLocks(tx, flags, &prevheights, CreateBlockIndex(chainActive.Tip()->nHeight + 2))); // Sequence locks pass on 2nd block - // time locked - tx2.vin.resize(1); - tx2.vin[0].prevout.hash = txFirst[1]->GetHash(); - tx2.vin[0].prevout.n = 0; - tx2.vin[0].scriptSig = CScript() << OP_1; - tx2.vin[0].nSequence = 0; - tx2.vout.resize(1); - tx2.vout[0].nValue = 4900000000LL; - tx2.vout[0].scriptPubKey = CScript() << OP_1; - tx2.nLockTime = chainActive.Tip()->GetMedianTimePast()+1; - hash = tx2.GetHash(); - mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx2)); - BOOST_CHECK(!CheckFinalTx(tx2, LOCKTIME_MEDIAN_TIME_PAST)); + // relative time locked + tx.vin[0].prevout.hash = txFirst[1]->GetHash(); + tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | (((chainActive.Tip()->GetMedianTimePast()+1-chainActive[1]->GetMedianTimePast()) >> CTxIn::SEQUENCE_LOCKTIME_GRANULARITY) + 1); // txFirst[1] is the 3rd block + prevheights[0] = baseheight + 2; + hash = tx.GetHash(); + mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx)); + BOOST_CHECK(CheckFinalTx(tx, flags)); // Locktime passes + BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail + + for (int i = 0; i < CBlockIndex::nMedianTimeSpan; i++) + chainActive.Tip()->GetAncestor(chainActive.Tip()->nHeight - i)->nTime += 512; //Trick the MedianTimePast + BOOST_CHECK(SequenceLocks(tx, flags, &prevheights, CreateBlockIndex(chainActive.Tip()->nHeight + 1))); // Sequence locks pass 512 seconds later + for (int i = 0; i < CBlockIndex::nMedianTimeSpan; i++) + chainActive.Tip()->GetAncestor(chainActive.Tip()->nHeight - i)->nTime -= 512; //undo tricked MTP + + // absolute height locked + tx.vin[0].prevout.hash = txFirst[2]->GetHash(); + tx.vin[0].nSequence = CTxIn::SEQUENCE_FINAL - 1; + prevheights[0] = baseheight + 3; + tx.nLockTime = chainActive.Tip()->nHeight + 1; + hash = tx.GetHash(); + mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx)); + BOOST_CHECK(!CheckFinalTx(tx, flags)); // Locktime fails + BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass + BOOST_CHECK(IsFinalTx(tx, chainActive.Tip()->nHeight + 2, chainActive.Tip()->GetMedianTimePast())); // Locktime passes on 2nd block + + // absolute time locked + tx.vin[0].prevout.hash = txFirst[3]->GetHash(); + tx.nLockTime = chainActive.Tip()->GetMedianTimePast(); + prevheights.resize(1); + prevheights[0] = baseheight + 4; + hash = tx.GetHash(); + mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx)); + BOOST_CHECK(!CheckFinalTx(tx, flags)); // Locktime fails + BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass + BOOST_CHECK(IsFinalTx(tx, chainActive.Tip()->nHeight + 2, chainActive.Tip()->GetMedianTimePast() + 1)); // Locktime passes 1 second later + + // mempool-dependent transactions (not added) + tx.vin[0].prevout.hash = hash; + prevheights[0] = chainActive.Tip()->nHeight + 1; + tx.nLockTime = 0; + tx.vin[0].nSequence = 0; + BOOST_CHECK(CheckFinalTx(tx, flags)); // Locktime passes + BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass + tx.vin[0].nSequence = 1; + BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail + tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG; + BOOST_CHECK(TestSequenceLocks(tx, flags)); // Sequence locks pass + tx.vin[0].nSequence = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | 1; + BOOST_CHECK(!TestSequenceLocks(tx, flags)); // Sequence locks fail BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); - // Neither tx should have make it into the template. - BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 1); + // None of the of the absolute height/time locked tx should have made + // it into the template because we still check IsFinalTx in CreateNewBlock, + // but relative locked txs will if inconsistently added to mempool. + // For now these will still generate a valid template until BIP68 soft fork + BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 3); delete pblocktemplate; - - // However if we advance height and time by one, both will. + // However if we advance height by 1 and time by 512, all of them should be mined + for (int i = 0; i < CBlockIndex::nMedianTimeSpan; i++) + chainActive.Tip()->GetAncestor(chainActive.Tip()->nHeight - i)->nTime += 512; //Trick the MedianTimePast chainActive.Tip()->nHeight++; - SetMockTime(chainActive.Tip()->GetMedianTimePast()+2); - - // FIXME: we should *actually* create a new block so the following test - // works; CheckFinalTx() isn't fooled by monkey-patching nHeight. - //BOOST_CHECK(CheckFinalTx(tx)); - //BOOST_CHECK(CheckFinalTx(tx2)); + SetMockTime(chainActive.Tip()->GetMedianTimePast() + 1); BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); - BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 2); + BOOST_CHECK_EQUAL(pblocktemplate->block.vtx.size(), 5); delete pblocktemplate; chainActive.Tip()->nHeight--; diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 10175ebe8..f370a4aa2 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -63,7 +63,7 @@ CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey) txCredit.vout.resize(1); txCredit.vin[0].prevout.SetNull(); txCredit.vin[0].scriptSig = CScript() << CScriptNum(0) << CScriptNum(0); - txCredit.vin[0].nSequence = std::numeric_limits::max(); + txCredit.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; txCredit.vout[0].scriptPubKey = scriptPubKey; txCredit.vout[0].nValue = 0; @@ -80,7 +80,7 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMu txSpend.vin[0].prevout.hash = txCredit.GetHash(); txSpend.vin[0].prevout.n = 0; txSpend.vin[0].scriptSig = scriptSig; - txSpend.vin[0].nSequence = std::numeric_limits::max(); + txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL; txSpend.vout[0].scriptPubKey = CScript(); txSpend.vout[0].nValue = 0; diff --git a/src/txmempool.cpp b/src/txmempool.cpp index f8e03c253..0b0f32e40 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -506,7 +506,7 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem list transactionsToRemove; for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) { const CTransaction& tx = it->GetTx(); - if (!CheckFinalTx(tx, flags)) { + if (!CheckFinalTx(tx, flags) || !CheckSequenceLocks(tx, flags)) { transactionsToRemove.push_back(tx); } else if (it->GetSpendsCoinbase()) { BOOST_FOREACH(const CTxIn& txin, tx.vin) { From 0d09af77b730e5a30e9c138233517c86af41ce76 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 8 Dec 2015 17:25:28 -0500 Subject: [PATCH 07/45] Add RPC test exercising BIP68 (mempool only) --- qa/rpc-tests/bip68-sequence.py | 388 ++++++++++++++++++++++++ qa/rpc-tests/test_framework/mininode.py | 8 + 2 files changed, 396 insertions(+) create mode 100755 qa/rpc-tests/bip68-sequence.py diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py new file mode 100755 index 000000000..45b4f22c0 --- /dev/null +++ b/qa/rpc-tests/bip68-sequence.py @@ -0,0 +1,388 @@ +#!/usr/bin/env python2 +# 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. + +# +# Test BIP68 implementation (mempool only) +# + +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * +from test_framework.script import * +from test_framework.mininode import * +from test_framework.blocktools import * + +COIN = 100000000 +SEQUENCE_LOCKTIME_DISABLE_FLAG = (1<<31) +SEQUENCE_LOCKTIME_TYPE_FLAG = (1<<22) # this means use time (0 means height) +SEQUENCE_LOCKTIME_GRANULARITY = 9 # this is a bit-shift +SEQUENCE_LOCKTIME_MASK = 0x0000ffff + +# RPC error for non-BIP68 final transactions +NOT_FINAL_ERROR = "64: non-BIP68-final" + +class BIP68Test(BitcoinTestFramework): + + def setup_network(self): + self.nodes = [] + self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-blockprioritysize=0"])) + self.is_network_split = False + self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"] + + def run_test(self): + # Generate some coins + self.nodes[0].generate(110) + + print "Running test disable flag" + self.test_disable_flag() + + print "Running test sequence-lock-confirmed-inputs" + self.test_sequence_lock_confirmed_inputs() + + print "Running test sequence-lock-unconfirmed-inputs" + self.test_sequence_lock_unconfirmed_inputs() + + # This test needs to change when BIP68 becomes consensus + print "Running test BIP68 not consensus" + self.test_bip68_not_consensus() + + print "Passed\n" + + # Test that BIP68 is not in effect if tx version is 1, or if + # the first sequence bit is set. + def test_disable_flag(self): + # Create some unconfirmed inputs + new_addr = self.nodes[0].getnewaddress() + self.nodes[0].sendtoaddress(new_addr, 2) # send 2 BTC + + utxos = self.nodes[0].listunspent(0, 0) + assert(len(utxos) > 0) + + utxo = utxos[0] + + tx1 = CTransaction() + value = satoshi_round(utxo["amount"] - self.relayfee)*COIN + + # Check that the disable flag disables relative locktime. + # If sequence locks were used, this would require 1 block for the + # input to mature. + sequence_value = SEQUENCE_LOCKTIME_DISABLE_FLAG | 1 + tx1.vin = [CTxIn(COutPoint(int(utxo["txid"], 16), utxo["vout"]), nSequence=sequence_value)] + tx1.vout = [CTxOut(value, CScript([b'a']))] + + tx1_signed = self.nodes[0].signrawtransaction(ToHex(tx1))["hex"] + tx1_id = self.nodes[0].sendrawtransaction(tx1_signed) + tx1_id = int(tx1_id, 16) + + # This transaction will enable sequence-locks, so this transaction should + # fail + tx2 = CTransaction() + tx2.nVersion = 2 + sequence_value = sequence_value & 0x7fffffff + tx2.vin = [CTxIn(COutPoint(tx1_id, 0), nSequence=sequence_value)] + tx2.vout = [CTxOut(int(value-self.relayfee*COIN), CScript([b'a']))] + tx2.rehash() + + try: + self.nodes[0].sendrawtransaction(ToHex(tx2)) + except JSONRPCException as exp: + assert_equal(exp.error["message"], NOT_FINAL_ERROR) + else: + assert(False) + + # Setting the version back down to 1 should disable the sequence lock, + # so this should be accepted. + tx2.nVersion = 1 + + self.nodes[0].sendrawtransaction(ToHex(tx2)) + + # Calculate the median time past of a prior block ("confirmations" before + # the current tip). + def get_median_time_past(self, confirmations): + block_hash = self.nodes[0].getblockhash(self.nodes[0].getblockcount()-confirmations) + return self.nodes[0].getblockheader(block_hash)["mediantime"] + + # Test that sequence locks are respected for transactions spending confirmed inputs. + def test_sequence_lock_confirmed_inputs(self): + # Create lots of confirmed utxos, and use them to generate lots of random + # transactions. + max_outputs = 50 + addresses = [] + while len(addresses) < max_outputs: + addresses.append(self.nodes[0].getnewaddress()) + while len(self.nodes[0].listunspent()) < 200: + import random + random.shuffle(addresses) + num_outputs = random.randint(1, max_outputs) + outputs = {} + for i in xrange(num_outputs): + outputs[addresses[i]] = random.randint(1, 20)*0.01 + self.nodes[0].sendmany("", outputs) + self.nodes[0].generate(1) + + utxos = self.nodes[0].listunspent() + + # Try creating a lot of random transactions. + # Each time, choose a random number of inputs, and randomly set + # some of those inputs to be sequence locked (and randomly choose + # between height/time locking). Small random chance of making the locks + # all pass. + for i in xrange(400): + # Randomly choose up to 10 inputs + num_inputs = random.randint(1, 10) + random.shuffle(utxos) + + # Track whether any sequence locks used should fail + should_pass = True + + # Track whether this transaction was built with sequence locks + using_sequence_locks = False + + tx = CTransaction() + tx.nVersion = 2 + value = 0 + for j in xrange(num_inputs): + sequence_value = 0xfffffffe # this disables sequence locks + + # 50% chance we enable sequence locks + if random.randint(0,1): + using_sequence_locks = True + + # 10% of the time, make the input sequence value pass + input_will_pass = (random.randint(1,10) == 1) + sequence_value = utxos[j]["confirmations"] + if not input_will_pass: + sequence_value += 1 + should_pass = False + + # Figure out what the median-time-past was for the confirmed input + # Note that if an input has N confirmations, we're going back N blocks + # from the tip so that we're looking up MTP of the block + # PRIOR to the one the input appears in, as per the BIP68 spec. + orig_time = self.get_median_time_past(utxos[j]["confirmations"]) + cur_time = self.get_median_time_past(0) # MTP of the tip + + # can only timelock this input if it's not too old -- otherwise use height + can_time_lock = True + if ((cur_time - orig_time) >> SEQUENCE_LOCKTIME_GRANULARITY) >= SEQUENCE_LOCKTIME_MASK: + can_time_lock = False + + # if time-lockable, then 50% chance we make this a time lock + if random.randint(0,1) and can_time_lock: + # Find first time-lock value that fails, or latest one that succeeds + time_delta = sequence_value << SEQUENCE_LOCKTIME_GRANULARITY + if input_will_pass and time_delta > cur_time - orig_time: + sequence_value = ((cur_time - orig_time) >> SEQUENCE_LOCKTIME_GRANULARITY) + elif (not input_will_pass and time_delta <= cur_time - orig_time): + sequence_value = ((cur_time - orig_time) >> SEQUENCE_LOCKTIME_GRANULARITY)+1 + sequence_value |= SEQUENCE_LOCKTIME_TYPE_FLAG + tx.vin.append(CTxIn(COutPoint(int(utxos[j]["txid"], 16), utxos[j]["vout"]), nSequence=sequence_value)) + value += utxos[j]["amount"]*COIN + # Overestimate the size of the tx - signatures should be less than 120 bytes, and leave 50 for the output + tx_size = len(ToHex(tx))/2 + 120*num_inputs + 50 + tx.vout.append(CTxOut(value-self.relayfee*tx_size*COIN/1000, CScript([b'a']))) + rawtx = self.nodes[0].signrawtransaction(ToHex(tx))["hex"] + + try: + self.nodes[0].sendrawtransaction(rawtx) + except JSONRPCException as exp: + assert(not should_pass and using_sequence_locks) + assert_equal(exp.error["message"], NOT_FINAL_ERROR) + else: + assert(should_pass or not using_sequence_locks) + # Recalculate utxos if we successfully sent the transaction + utxos = self.nodes[0].listunspent() + + # Test that sequence locks on unconfirmed inputs must have nSequence + # height or time of 0 to be accepted. + # Then test that BIP68-invalid transactions are removed from the mempool + # after a reorg. + def test_sequence_lock_unconfirmed_inputs(self): + # Store height so we can easily reset the chain at the end of the test + cur_height = self.nodes[0].getblockcount() + + utxos = self.nodes[0].listunspent() + + # Create a mempool tx. + txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2) + tx1 = FromHex(CTransaction(), self.nodes[0].getrawtransaction(txid)) + tx1.rehash() + + # Anyone-can-spend mempool tx. + # Sequence lock of 0 should pass. + tx2 = CTransaction() + tx2.nVersion = 2 + tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)] + tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))] + tx2_raw = self.nodes[0].signrawtransaction(ToHex(tx2))["hex"] + tx2 = FromHex(tx2, tx2_raw) + tx2.rehash() + + self.nodes[0].sendrawtransaction(tx2_raw) + + # Create a spend of the 0th output of orig_tx with a sequence lock + # of 1, and test what happens when submitting. + # orig_tx.vout[0] must be an anyone-can-spend output + def test_nonzero_locks(orig_tx, node, relayfee, use_height_lock): + sequence_value = 1 + if not use_height_lock: + sequence_value |= SEQUENCE_LOCKTIME_TYPE_FLAG + + tx = CTransaction() + tx.nVersion = 2 + tx.vin = [CTxIn(COutPoint(orig_tx.sha256, 0), nSequence=sequence_value)] + tx.vout = [CTxOut(int(orig_tx.vout[0].nValue - relayfee*COIN), CScript([b'a']))] + tx.rehash() + + try: + node.sendrawtransaction(ToHex(tx)) + except JSONRPCException as exp: + assert_equal(exp.error["message"], NOT_FINAL_ERROR) + assert(orig_tx.hash in node.getrawmempool()) + else: + # orig_tx must not be in mempool + assert(orig_tx.hash not in node.getrawmempool()) + return tx + + test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=True) + test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=False) + + # Now mine some blocks, but make sure tx2 doesn't get mined. + # Use prioritisetransaction to lower the effective feerate to 0 + self.nodes[0].prioritisetransaction(tx2.hash, -1e15, int(-self.relayfee*COIN)) + cur_time = int(time.time()) + for i in xrange(10): + self.nodes[0].setmocktime(cur_time + 600) + self.nodes[0].generate(1) + cur_time += 600 + + assert(tx2.hash in self.nodes[0].getrawmempool()) + + test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=True) + test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=False) + + # Mine tx2, and then try again + self.nodes[0].prioritisetransaction(tx2.hash, 1e15, int(self.relayfee*COIN)) + + # Advance the time on the node so that we can test timelocks + self.nodes[0].setmocktime(cur_time+600) + self.nodes[0].generate(1) + assert(tx2.hash not in self.nodes[0].getrawmempool()) + + # Now that tx2 is not in the mempool, a sequence locked spend should + # succeed + tx3 = test_nonzero_locks(tx2, self.nodes[0], self.relayfee, use_height_lock=False) + assert(tx3.hash in self.nodes[0].getrawmempool()) + + self.nodes[0].generate(1) + assert(tx3.hash not in self.nodes[0].getrawmempool()) + + # One more test, this time using height locks + tx4 = test_nonzero_locks(tx3, self.nodes[0], self.relayfee, use_height_lock=True) + assert(tx4.hash in self.nodes[0].getrawmempool()) + + # Now try combining confirmed and unconfirmed inputs + tx5 = test_nonzero_locks(tx4, self.nodes[0], self.relayfee, use_height_lock=True) + assert(tx5.hash not in self.nodes[0].getrawmempool()) + + tx5.vin.append(CTxIn(COutPoint(int(utxos[0]["txid"], 16), utxos[0]["vout"]), nSequence=1)) + tx5.vout[0].nValue += int(utxos[0]["amount"]*COIN) + raw_tx5 = self.nodes[0].signrawtransaction(ToHex(tx5))["hex"] + + try: + self.nodes[0].sendrawtransaction(raw_tx5) + except JSONRPCException as exp: + assert_equal(exp.error["message"], NOT_FINAL_ERROR) + else: + assert(False) + + # Test mempool-BIP68 consistency after reorg + # + # State of the transactions in the last blocks: + # ... -> [ tx2 ] -> [ tx3 ] + # tip-1 tip + # And currently tx4 is in the mempool. + # + # If we invalidate the tip, tx3 should get added to the mempool, causing + # tx4 to be removed (fails sequence-lock). + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + assert(tx4.hash not in self.nodes[0].getrawmempool()) + assert(tx3.hash in self.nodes[0].getrawmempool()) + + # Now mine 2 empty blocks to reorg out the current tip (labeled tip-1 in + # diagram above). + # This would cause tx2 to be added back to the mempool, which in turn causes + # tx3 to be removed. + tip = int(self.nodes[0].getblockhash(self.nodes[0].getblockcount()-1), 16) + height = self.nodes[0].getblockcount() + for i in xrange(2): + block = create_block(tip, create_coinbase(height), cur_time) + block.nVersion = 3 + block.rehash() + block.solve() + tip = block.sha256 + height += 1 + self.nodes[0].submitblock(ToHex(block)) + cur_time += 1 + + mempool = self.nodes[0].getrawmempool() + assert(tx3.hash not in mempool) + assert(tx2.hash in mempool) + + # Reset the chain and get rid of the mocktimed-blocks + self.nodes[0].setmocktime(0) + self.nodes[0].invalidateblock(self.nodes[0].getblockhash(cur_height+1)) + self.nodes[0].generate(10) + + # Make sure that BIP68 isn't being used to validate blocks. + def test_bip68_not_consensus(self): + txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2) + + tx1 = FromHex(CTransaction(), self.nodes[0].getrawtransaction(txid)) + tx1.rehash() + + # Make an anyone-can-spend transaction + tx2 = CTransaction() + tx2.nVersion = 1 + tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)] + tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))] + + # sign tx2 + tx2_raw = self.nodes[0].signrawtransaction(ToHex(tx2))["hex"] + tx2 = FromHex(tx2, tx2_raw) + tx2.rehash() + + self.nodes[0].sendrawtransaction(ToHex(tx2)) + + # Now make an invalid spend of tx2 according to BIP68 + sequence_value = 100 # 100 block relative locktime + + tx3 = CTransaction() + tx3.nVersion = 2 + tx3.vin = [CTxIn(COutPoint(tx2.sha256, 0), nSequence=sequence_value)] + tx3.vout = [CTxOut(int(tx2.vout[0].nValue - self.relayfee*COIN), CScript([b'a']))] + tx3.rehash() + + try: + self.nodes[0].sendrawtransaction(ToHex(tx3)) + except JSONRPCException as exp: + assert_equal(exp.error["message"], NOT_FINAL_ERROR) + else: + assert(False) + + # make a block that violates bip68; ensure that the tip updates + tip = int(self.nodes[0].getbestblockhash(), 16) + block = create_block(tip, create_coinbase(self.nodes[0].getblockcount()+1)) + block.nVersion = 3 + block.vtx.extend([tx1, tx2, tx3]) + block.hashMerkleRoot = block.calc_merkle_root() + block.rehash() + block.solve() + + self.nodes[0].submitblock(ToHex(block)) + assert_equal(self.nodes[0].getbestblockhash(), block.hash) + + +if __name__ == '__main__': + BIP68Test().main() diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 2135570b8..81bb439ce 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -231,6 +231,14 @@ def ser_int_vector(l): r += struct.pack(" Date: Wed, 10 Feb 2016 16:01:04 -0500 Subject: [PATCH 08/45] Bug fix to RPC test --- qa/rpc-tests/bip68-sequence.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py index 45b4f22c0..bd61282fa 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -202,8 +202,6 @@ class BIP68Test(BitcoinTestFramework): # Store height so we can easily reset the chain at the end of the test cur_height = self.nodes[0].getblockcount() - utxos = self.nodes[0].listunspent() - # Create a mempool tx. txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2) tx1 = FromHex(CTransaction(), self.nodes[0].getrawtransaction(txid)) @@ -286,6 +284,7 @@ class BIP68Test(BitcoinTestFramework): tx5 = test_nonzero_locks(tx4, self.nodes[0], self.relayfee, use_height_lock=True) assert(tx5.hash not in self.nodes[0].getrawmempool()) + utxos = self.nodes[0].listunspent() tx5.vin.append(CTxIn(COutPoint(int(utxos[0]["txid"], 16), utxos[0]["vout"]), nSequence=1)) tx5.vout[0].nValue += int(utxos[0]["amount"]*COIN) raw_tx5 = self.nodes[0].signrawtransaction(ToHex(tx5))["hex"] From 197c3760ff07daeecbb726a0cfef899502520ee5 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Thu, 11 Feb 2016 15:34:04 -0500 Subject: [PATCH 09/45] fix sdaftuar's nits again it boggles the mind why these nits can't be delivered on a more timely basis --- src/main.cpp | 10 +++++----- src/main.h | 2 +- src/policy/policy.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1bc02c094..bdb085bbd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -803,10 +803,10 @@ bool CheckSequenceLocks(const CTransaction &tx, int flags) index.pprev = tip; // CheckSequenceLocks() uses chainActive.Height()+1 to evaluate // height based locks because when SequenceLocks() is called within - // CBlock::AcceptBlock(), the height of the block *being* - // evaluated is what is used. Thus if we want to know if a - // transaction can be part of the *next* block, we need to call - // SequenceLocks() with one more than chainActive.Height(). + // ConnectBlock(), the height of the block *being* + // evaluated is what is used. + // Thus if we want to know if a transaction can be part of the + // *next* block, we need to use one more than chainActive.Height() index.nHeight = tip->nHeight + 1; // pcoinsTip contains the UTXO set for chainActive.Tip() @@ -2221,7 +2221,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin } if (!SequenceLocks(tx, nLockTimeFlags, &prevheights, *pindex)) { - return state.DoS(100, error("ConnectBlock(): contains a non-BIP68-final transaction", __func__), + return state.DoS(100, error("%s: contains a non-BIP68-final transaction", __func__), REJECT_INVALID, "bad-txns-nonfinal"); } diff --git a/src/main.h b/src/main.h index ed02a2e71..93e58988c 100644 --- a/src/main.h +++ b/src/main.h @@ -362,7 +362,7 @@ bool SequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeig /** * Check if transaction will be BIP 68 final in the next block to be created. * - * Calls SequenceLocks() with data from the tip of the current active chain. + * Simulates calling SequenceLocks() with data from the tip of the current active chain. * * See consensus/consensus.h for flag definitions. */ diff --git a/src/policy/policy.h b/src/policy/policy.h index 746775f56..aabeebb25 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -45,7 +45,7 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY /** 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; -/** Used as the flags parameter to LockTime() in non-consensus code. */ +/** Used as the flags parameter to sequence and nLocktime checks in non-consensus code. */ static const unsigned int STANDARD_LOCKTIME_VERIFY_FLAGS = LOCKTIME_VERIFY_SEQUENCE | LOCKTIME_MEDIAN_TIME_PAST; From c0c5e09fe2166a0b8ea6fc1f13e131e3ba8df478 Mon Sep 17 00:00:00 2001 From: Mark Friedenbach Date: Fri, 25 Sep 2015 16:18:51 -0700 Subject: [PATCH 10/45] BIP112: Implement CHECKSEQUENCEVERIFY - Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112) CHECKSEQUENCEVERIFY -> - Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block. - Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence() - Add bitwise AND operator to CScriptNum - Enable CHECKSEQUENCEVERIFY as a standard script verify flag - Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use. --- src/policy/policy.h | 1 + src/script/interpreter.cpp | 89 +++++++++++++++++++++++++++++++--- src/script/interpreter.h | 11 +++++ src/script/script.h | 12 +++++ src/script/script_error.h | 2 +- src/test/data/tx_invalid.json | 54 +++++++++++++++++++++ src/test/data/tx_valid.json | 84 ++++++++++++++++++++++++++++++++ src/test/transaction_tests.cpp | 3 +- 8 files changed, 247 insertions(+), 9 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index aabeebb25..4f9354e36 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -40,6 +40,7 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS | SCRIPT_VERIFY_CLEANSTACK | SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY | + SCRIPT_VERIFY_CHECKSEQUENCEVERIFY | SCRIPT_VERIFY_LOW_S; /** For convenience, standard but not mandatory verify flags. */ diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 901f901f0..4e87006f5 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -373,7 +373,44 @@ bool EvalScript(vector >& stack, const CScript& script, un break; } - case OP_NOP1: case OP_NOP3: case OP_NOP4: case OP_NOP5: + case OP_CHECKSEQUENCEVERIFY: + { + if (!(flags & SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)) { + // not enabled; treat as a NOP3 + if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) { + return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS); + } + break; + } + + if (stack.size() < 1) + return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION); + + // nSequence, like nLockTime, is a 32-bit unsigned integer + // field. See the comment in CHECKLOCKTIMEVERIFY regarding + // 5-byte numeric operands. + const CScriptNum nSequence(stacktop(-1), fRequireMinimal, 5); + + // In the rare event that the argument may be < 0 due to + // some arithmetic being done first, you can always use + // 0 MAX CHECKSEQUENCEVERIFY. + if (nSequence < 0) + return set_error(serror, SCRIPT_ERR_NEGATIVE_LOCKTIME); + + // To provide for future soft-fork extensibility, if the + // operand has the disabled lock-time flag set, + // CHECKSEQUENCEVERIFY behaves as a NOP. + if ((nSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG) != 0) + break; + + // Compare the specified sequence number with the input. + if (!checker.CheckSequence(nSequence)) + return set_error(serror, SCRIPT_ERR_UNSATISFIED_LOCKTIME); + + break; + } + + case OP_NOP1: case OP_NOP4: case OP_NOP5: case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10: { if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS) @@ -1120,27 +1157,33 @@ bool TransactionSignatureChecker::CheckSig(const vector& vchSigIn return true; } -bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) const +static bool VerifyLockTime(int64_t txToLockTime, int64_t nThreshold, const CScriptNum& nLockTime) { // There are two kinds of nLockTime: lock-by-blockheight // and lock-by-blocktime, distinguished by whether - // nLockTime < LOCKTIME_THRESHOLD. + // nLockTime < nThreshold (either LOCKTIME_THRESHOLD or + // CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG). // // We want to compare apples to apples, so fail the script // unless the type of nLockTime being tested is the same as // the nLockTime in the transaction. if (!( - (txTo->nLockTime < LOCKTIME_THRESHOLD && nLockTime < LOCKTIME_THRESHOLD) || - (txTo->nLockTime >= LOCKTIME_THRESHOLD && nLockTime >= LOCKTIME_THRESHOLD) + (txToLockTime < nThreshold && nLockTime < nThreshold) || + (txToLockTime >= nThreshold && nLockTime >= nThreshold) )) return false; // Now that we know we're comparing apples-to-apples, the // comparison is a simple numeric one. - if (nLockTime > (int64_t)txTo->nLockTime) + if (nLockTime > txToLockTime) return false; - // Finally the nLockTime feature can be disabled and thus + return true; +} + +bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) const +{ + // The nLockTime feature can be disabled and thus // CHECKLOCKTIMEVERIFY bypassed if every txin has been // finalized by setting nSequence to maxint. The // transaction would be allowed into the blockchain, making @@ -1153,6 +1196,38 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con if (CTxIn::SEQUENCE_FINAL == txTo->vin[nIn].nSequence) return false; + if (!::VerifyLockTime((int64_t)txTo->nLockTime, LOCKTIME_THRESHOLD, nLockTime)) + return false; + + return true; +} + +bool TransactionSignatureChecker::CheckSequence(const CScriptNum& nSequence) const +{ + // Relative lock times are supported by comparing the passed + // in operand to the sequence number of the input. + const int64_t txToSequence = (int64_t)txTo->vin[nIn].nSequence; + + // Fail if the transaction's version number is not set high + // enough to trigger BIP 68 rules. + if (static_cast(txTo->nVersion) < 2) + return false; + + // Sequence numbers with their most significant bit set are not + // consensus constrained. Testing that the transaction's sequence + // number do not have this bit set prevents using this property + // to get around a CHECKSEQUENCEVERIFY check. + if (txToSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG) + return false; + + // Mask off any bits that do not have consensus-enforced meaning + // before doing the integer comparisons of ::VerifyLockTime. + const uint32_t nLockTimeMask = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG + | CTxIn::SEQUENCE_LOCKTIME_MASK; + + if (!::VerifyLockTime(txToSequence & nLockTimeMask, CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG, nSequence & nLockTimeMask)) + return false; + return true; } diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 7b34547ff..e5cb7290f 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -81,6 +81,11 @@ enum // // See BIP65 for details. SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), + + // support CHECKSEQUENCEVERIFY opcode + // + // See BIP112 for details + SCRIPT_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), }; bool CheckSignatureEncoding(const std::vector &vchSig, unsigned int flags, ScriptError* serror); @@ -100,6 +105,11 @@ public: return false; } + virtual bool CheckSequence(const CScriptNum& nSequence) const + { + return false; + } + virtual ~BaseSignatureChecker() {} }; @@ -116,6 +126,7 @@ public: TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {} bool CheckSig(const std::vector& scriptSig, const std::vector& vchPubKey, const CScript& scriptCode) const; bool CheckLockTime(const CScriptNum& nLockTime) const; + bool CheckSequence(const CScriptNum& nSequence) const; }; class MutableTransactionSignatureChecker : public TransactionSignatureChecker diff --git a/src/script/script.h b/src/script/script.h index 6551eea30..d2a68a07b 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -165,6 +165,7 @@ enum opcodetype OP_CHECKLOCKTIMEVERIFY = 0xb1, OP_NOP2 = OP_CHECKLOCKTIMEVERIFY, OP_NOP3 = 0xb2, + OP_CHECKSEQUENCEVERIFY = OP_NOP3, OP_NOP4 = 0xb3, OP_NOP5 = 0xb4, OP_NOP6 = 0xb5, @@ -259,6 +260,11 @@ public: inline CScriptNum& operator+=( const CScriptNum& rhs) { return operator+=(rhs.m_value); } inline CScriptNum& operator-=( const CScriptNum& rhs) { return operator-=(rhs.m_value); } + inline CScriptNum operator&( const int64_t& rhs) const { return CScriptNum(m_value & rhs);} + inline CScriptNum operator&( const CScriptNum& rhs) const { return operator&(rhs.m_value); } + + inline CScriptNum& operator&=( const CScriptNum& rhs) { return operator&=(rhs.m_value); } + inline CScriptNum operator-() const { assert(m_value != std::numeric_limits::min()); @@ -287,6 +293,12 @@ public: return *this; } + inline CScriptNum& operator&=( const int64_t& rhs) + { + m_value &= rhs; + return *this; + } + int getint() const { if (m_value > std::numeric_limits::max()) diff --git a/src/script/script_error.h b/src/script/script_error.h index bb10b8a29..26df33932 100644 --- a/src/script/script_error.h +++ b/src/script/script_error.h @@ -35,7 +35,7 @@ typedef enum ScriptError_t SCRIPT_ERR_INVALID_ALTSTACK_OPERATION, SCRIPT_ERR_UNBALANCED_CONDITIONAL, - /* OP_CHECKLOCKTIMEVERIFY */ + /* CHECKLOCKTIMEVERIFY and CHECKSEQUENCEVERIFY */ SCRIPT_ERR_NEGATIVE_LOCKTIME, SCRIPT_ERR_UNSATISFIED_LOCKTIME, diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json index 902584194..2d7d9b958 100644 --- a/src/test/data/tx_invalid.json +++ b/src/test/data/tx_invalid.json @@ -201,5 +201,59 @@ [[["b1dbc81696c8a9c0fccd0693ab66d7c368dbc38c0def4e800685560ddd1b2132", 0, "DUP HASH160 0x14 0x4b3bd7eba3bc0284fd3007be7f3be275e94f5826 EQUALVERIFY CHECKSIG"]], "010000000132211bdd0d568506804eef0d8cc3db68c3d766ab9306cdfcc0a9c89616c8dbb1000000006c493045022100c7bb0faea0522e74ff220c20c022d2cb6033f8d167fb89e75a50e237a35fd6d202203064713491b1f8ad5f79e623d0219ad32510bfaa1009ab30cbee77b59317d6e30001210237af13eb2d84e4545af287b919c2282019c9691cc509e78e196a9d8274ed1be0ffffffff0100000000000000001976a914f1b3ed2eda9a2ebe5a9374f692877cdf87c0f95b88ac00000000", "P2SH,DERSIG"], +["CHECKSEQUENCEVERIFY tests"], + +["By-height locks, with argument just beyond txin.nSequence"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4259839 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000feff40000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["By-time locks, with argument just beyond txin.nSequence (but within numerical boundries)"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194305 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4259839 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000feff40000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument missing"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument negative with by-blockheight txin.nSequence=0"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "-1 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument negative with by-blocktime txin.nSequence=CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "-1 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument/tx height/time mismatch, both versions"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "65535 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194304 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4259839 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["6 byte non-minimally-encoded arguments are invalid even if their contents are valid"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x06 0x000000000000 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffff00000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Failure due to failing CHECKSEQUENCEVERIFY in scriptSig"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]], +"02000000010001000000000000000000000000000000000000000000000000000000000000000000000251b2000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Failure due to failing CHECKSEQUENCEVERIFY in redeemScript"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x7c17aff532f22beb54069942f9bf567a66133eaf EQUAL"]], +"0200000001000100000000000000000000000000000000000000000000000000000000000000000000030251b2000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Failure due to insufficient tx.nVersion (<2)"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP3 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194304 NOP3 1"]], +"010000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + ["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 76d29bcf2..717ad1954 100644 --- a/src/test/data/tx_valid.json +++ b/src/test/data/tx_valid.json @@ -233,5 +233,89 @@ [[["b1dbc81696c8a9c0fccd0693ab66d7c368dbc38c0def4e800685560ddd1b2132", 0, "DUP HASH160 0x14 0x4b3bd7eba3bc0284fd3007be7f3be275e94f5826 EQUALVERIFY CHECKSIG"]], "010000000132211bdd0d568506804eef0d8cc3db68c3d766ab9306cdfcc0a9c89616c8dbb1000000006c493045022100c7bb0faea0522e74ff220c20c022d2cb6033f8d167fb89e75a50e237a35fd6d202203064713491b1f8ad5f79e623d0219ad32510bfaa1009ab30cbee77b59317d6e30001210237af13eb2d84e4545af287b919c2282019c9691cc509e78e196a9d8274ed1be0ffffffff0100000000000000001976a914f1b3ed2eda9a2ebe5a9374f692877cdf87c0f95b88ac00000000", "P2SH"], +["CHECKSEQUENCEVERIFY tests"], + +["By-height locks, with argument == 0 and == txin.nSequence"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "65535 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffff00000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "65535 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffbf7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffbf7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["By-time locks, with argument == 0 and == txin.nSequence"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194304 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4259839 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffff40000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4259839 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffff7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194304 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffff7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Upper sequence with upper sequence is fine"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000800100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000800100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000feffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000feffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument 2^31 with various nSequence"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffbf7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffff7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483648 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument 2^32-1 with various nSequence"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffbf7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffff7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967295 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Argument 3<<31 with various nSequence"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "6442450944 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffbf7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "6442450944 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffff7f0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "6442450944 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffffffff0100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["5 byte non-minimally-encoded operandss are valid"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x05 0x0000000000 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["The argument can be calculated rather than created directly by a PUSHDATA"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194303 1ADD NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4194304 1SUB NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000ffff00000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["An ADD producing a 5-byte result that sets CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483647 65536 NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "2147483647 4259840 ADD NOP3 1"]], +"020000000100010000000000000000000000000000000000000000000000000000000000000000000000000040000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Valid CHECKSEQUENCEVERIFY in scriptSig"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "1"]], +"02000000010001000000000000000000000000000000000000000000000000000000000000000000000251b2010000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + +["Valid CHECKSEQUENCEVERIFY in redeemScript"], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x7c17aff532f22beb54069942f9bf567a66133eaf EQUAL"]], +"0200000001000100000000000000000000000000000000000000000000000000000000000000000000030251b2010000000100000000000000000000000000", "P2SH,CHECKSEQUENCEVERIFY"], + ["Make diffs cleaner by leaving a comment here without comma at the end"] ] diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index c27f194b5..d9195bf34 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -44,7 +44,8 @@ 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("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY); + (string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY) + (string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY); unsigned int ParseScriptFlags(string strFlags) { From 6170506fdf920e1cb07c086be670ad624cb04241 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Fri, 12 Feb 2016 20:02:46 +0000 Subject: [PATCH 11/45] Separate CheckLockTime() and CheckSequence() logic For the sake of a little repetition, make code more readable. --- src/script/interpreter.cpp | 46 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 4e87006f5..d4fe001d7 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1157,33 +1157,27 @@ bool TransactionSignatureChecker::CheckSig(const vector& vchSigIn return true; } -static bool VerifyLockTime(int64_t txToLockTime, int64_t nThreshold, const CScriptNum& nLockTime) +bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) const { // There are two kinds of nLockTime: lock-by-blockheight // and lock-by-blocktime, distinguished by whether - // nLockTime < nThreshold (either LOCKTIME_THRESHOLD or - // CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG). + // nLockTime < LOCKTIME_THRESHOLD. // // We want to compare apples to apples, so fail the script // unless the type of nLockTime being tested is the same as // the nLockTime in the transaction. if (!( - (txToLockTime < nThreshold && nLockTime < nThreshold) || - (txToLockTime >= nThreshold && nLockTime >= nThreshold) + (txTo->nLockTime < LOCKTIME_THRESHOLD && nLockTime < LOCKTIME_THRESHOLD) || + (txTo->nLockTime >= LOCKTIME_THRESHOLD && nLockTime >= LOCKTIME_THRESHOLD) )) return false; // Now that we know we're comparing apples-to-apples, the // comparison is a simple numeric one. - if (nLockTime > txToLockTime) + if (nLockTime > (int64_t)txTo->nLockTime) return false; - return true; -} - -bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) const -{ - // The nLockTime feature can be disabled and thus + // Finally the nLockTime feature can be disabled and thus // CHECKLOCKTIMEVERIFY bypassed if every txin has been // finalized by setting nSequence to maxint. The // transaction would be allowed into the blockchain, making @@ -1196,9 +1190,6 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con if (CTxIn::SEQUENCE_FINAL == txTo->vin[nIn].nSequence) return false; - if (!::VerifyLockTime((int64_t)txTo->nLockTime, LOCKTIME_THRESHOLD, nLockTime)) - return false; - return true; } @@ -1221,17 +1212,32 @@ bool TransactionSignatureChecker::CheckSequence(const CScriptNum& nSequence) con return false; // Mask off any bits that do not have consensus-enforced meaning - // before doing the integer comparisons of ::VerifyLockTime. - const uint32_t nLockTimeMask = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG - | CTxIn::SEQUENCE_LOCKTIME_MASK; + // before doing the integer comparisons + const uint32_t nLockTimeMask = CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG | CTxIn::SEQUENCE_LOCKTIME_MASK; + const int64_t txToSequenceMasked = txToSequence & nLockTimeMask; + const CScriptNum nSequenceMasked = nSequence & nLockTimeMask; - if (!::VerifyLockTime(txToSequence & nLockTimeMask, CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG, nSequence & nLockTimeMask)) + // There are two kinds of nSequence: lock-by-blockheight + // and lock-by-blocktime, distinguished by whether + // nSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG. + // + // We want to compare apples to apples, so fail the script + // unless the type of nSequenceMasked being tested is the same as + // the nSequenceMasked in the transaction. + if (!( + (txToSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) || + (txToSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) + )) + return false; + + // Now that we know we're comparing apples-to-apples, the + // comparison is a simple numeric one. + if (nSequenceMasked > txToSequenceMasked) return false; return true; } - bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror) { set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR); From c8d309e4b4d82dd233f167b4df503e6a5b4164ef Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Tue, 16 Feb 2016 09:39:44 +0000 Subject: [PATCH 12/45] Code style fix. This if statement is a little obtuse and using braces here improves readability. --- src/script/interpreter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index d4fe001d7..149a4f015 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1227,8 +1227,9 @@ bool TransactionSignatureChecker::CheckSequence(const CScriptNum& nSequence) con if (!( (txToSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked < CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) || (txToSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG && nSequenceMasked >= CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) - )) + )) { return false; + } // Now that we know we're comparing apples-to-apples, the // comparison is a simple numeric one. From ade85e126d1ba7cb90a3382fb8c3cc4f3b89dc4d Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Fri, 4 Dec 2015 15:01:22 -0500 Subject: [PATCH 13/45] Add LockPoints Obtain LockPoints to store in CTxMemPoolEntry and during a reorg, evaluate whether they are still valid and if not, recalculate them. --- src/main.cpp | 89 ++++++++++++++++++++++++++++++--------- src/main.h | 12 +++++- src/test/test_bitcoin.cpp | 2 +- src/test/test_bitcoin.h | 4 +- src/txmempool.cpp | 18 ++++++-- src/txmempool.h | 32 +++++++++++++- 6 files changed, 131 insertions(+), 26 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bdb085bbd..d6eeceaaf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -793,7 +793,25 @@ bool SequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeig return EvaluateSequenceLocks(block, CalculateSequenceLocks(tx, flags, prevHeights, block)); } -bool CheckSequenceLocks(const CTransaction &tx, int flags) +bool TestLockPointValidity(const LockPoints* lp) +{ + AssertLockHeld(cs_main); + assert(lp); + // If there are relative lock times then the maxInputBlock will be set + // If there are no relative lock times, the LockPoints don't depend on the chain + if (lp->maxInputBlock) { + // Check whether chainActive is an extension of the block at which the LockPoints + // calculation was valid. If not LockPoints are no longer valid + if (!chainActive.Contains(lp->maxInputBlock)) { + return false; + } + } + + // LockPoints still valid + return true; +} + +bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints) { AssertLockHeld(cs_main); AssertLockHeld(mempool.cs); @@ -809,25 +827,57 @@ bool CheckSequenceLocks(const CTransaction &tx, int flags) // *next* block, we need to use one more than chainActive.Height() index.nHeight = tip->nHeight + 1; - // pcoinsTip contains the UTXO set for chainActive.Tip() - CCoinsViewMemPool viewMemPool(pcoinsTip, mempool); - std::vector prevheights; - prevheights.resize(tx.vin.size()); - for (size_t txinIndex = 0; txinIndex < tx.vin.size(); txinIndex++) { - const CTxIn& txin = tx.vin[txinIndex]; - CCoins coins; - if (!viewMemPool.GetCoins(txin.prevout.hash, coins)) { - return error("%s: Missing input", __func__); + std::pair lockPair; + if (useExistingLockPoints) { + assert(lp); + lockPair.first = lp->height; + lockPair.second = lp->time; + } + else { + // pcoinsTip contains the UTXO set for chainActive.Tip() + CCoinsViewMemPool viewMemPool(pcoinsTip, mempool); + std::vector prevheights; + prevheights.resize(tx.vin.size()); + for (size_t txinIndex = 0; txinIndex < tx.vin.size(); txinIndex++) { + const CTxIn& txin = tx.vin[txinIndex]; + CCoins coins; + if (!viewMemPool.GetCoins(txin.prevout.hash, coins)) { + return error("%s: Missing input", __func__); + } + if (coins.nHeight == MEMPOOL_HEIGHT) { + // Assume all mempool transaction confirm in the next block + prevheights[txinIndex] = tip->nHeight + 1; + } else { + prevheights[txinIndex] = coins.nHeight; + } } - if (coins.nHeight == MEMPOOL_HEIGHT) { - // Assume all mempool transaction confirm in the next block - prevheights[txinIndex] = tip->nHeight + 1; - } else { - prevheights[txinIndex] = coins.nHeight; + lockPair = CalculateSequenceLocks(tx, flags, &prevheights, index); + if (lp) { + lp->height = lockPair.first; + lp->time = lockPair.second; + // Also store the hash of the block with the highest height of + // all the blocks which have sequence locked prevouts. + // This hash needs to still be on the chain + // for these LockPoint calculations to be valid + // Note: It is impossible to correctly calculate a maxInputBlock + // if any of the sequence locked inputs depend on unconfirmed txs, + // except in the special case where the relative lock time/height + // is 0, which is equivalent to no sequence lock. Since we assume + // input height of tip+1 for mempool txs and test the resulting + // lockPair from CalculateSequenceLocks against tip+1. We know + // EvaluateSequenceLocks will fail if there was a non-zero sequence + // lock on a mempool input, so we can use the return value of + // CheckSequenceLocks to indicate the LockPoints validity + int maxInputHeight = 0; + BOOST_FOREACH(int height, prevheights) { + // Can ignore mempool inputs since we'll fail if they had non-zero locks + if (height != tip->nHeight+1) { + maxInputHeight = std::max(maxInputHeight, height); + } + } + lp->maxInputBlock = tip->GetAncestor(maxInputHeight); } } - - std::pair lockPair = CalculateSequenceLocks(tx, flags, &prevheights, index); return EvaluateSequenceLocks(index, lockPair); } @@ -1016,6 +1066,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C CCoinsViewCache view(&dummy); CAmount nValueIn = 0; + LockPoints lp; { LOCK(pool.cs); CCoinsViewMemPool viewMemPool(pcoinsTip, pool); @@ -1059,7 +1110,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C // be mined yet. // Must keep pool.cs for this unless we change CheckSequenceLocks to take a // CoinsViewCache instead of create its own - if (!CheckSequenceLocks(tx, STANDARD_LOCKTIME_VERIFY_FLAGS)) + if (!CheckSequenceLocks(tx, STANDARD_LOCKTIME_VERIFY_FLAGS, &lp)) return state.DoS(0, false, REJECT_NONSTANDARD, "non-BIP68-final"); } @@ -1091,7 +1142,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C } } - CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height(), pool.HasNoInputsOf(tx), inChainInputValue, fSpendsCoinbase, nSigOps); + CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height(), pool.HasNoInputsOf(tx), inChainInputValue, fSpendsCoinbase, nSigOps, lp); unsigned int nSize = entry.GetTxSize(); // Check that the transaction doesn't have an excessive number of diff --git a/src/main.h b/src/main.h index 93e58988c..3793f55ba 100644 --- a/src/main.h +++ b/src/main.h @@ -39,6 +39,7 @@ class CValidationInterface; class CValidationState; struct CNodeStateStats; +struct LockPoints; /** Default for accepting alerts from the P2P network. */ static const bool DEFAULT_ALERTS = true; @@ -353,6 +354,11 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime); */ bool CheckFinalTx(const CTransaction &tx, int flags = -1); +/** + * Test whether the LockPoints height and time are still valid on the current chain + */ +bool TestLockPointValidity(const LockPoints* lp); + /** * Check if transaction is final per BIP 68 sequence numbers and can be included in a block. * Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed. @@ -363,10 +369,14 @@ bool SequenceLocks(const CTransaction &tx, int flags, std::vector* prevHeig * Check if transaction will be BIP 68 final in the next block to be created. * * Simulates calling SequenceLocks() with data from the tip of the current active chain. + * Optionally stores in LockPoints the resulting height and time calculated and the hash + * of the block needed for calculation or skips the calculation and uses the LockPoints + * passed in for evaluation. + * The LockPoints should not be considered valid if CheckSequenceLocks returns false. * * See consensus/consensus.h for flag definitions. */ -bool CheckSequenceLocks(const CTransaction &tx, int flags); +bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp = NULL, bool useExistingLockPoints = false); /** * Closure representing one script verification diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp index f81050b15..f278d7e39 100644 --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -150,7 +150,7 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CMutableTransaction &tx, CTxMemPo CAmount inChainValue = hasNoDependencies ? txn.GetValueOut() : 0; return CTxMemPoolEntry(txn, nFee, nTime, dPriority, nHeight, - hasNoDependencies, inChainValue, spendsCoinbase, sigOpCount); + hasNoDependencies, inChainValue, spendsCoinbase, sigOpCount, lp); } void Shutdown(void* parg) diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h index 273bfdd7f..37bcb9b57 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -5,6 +5,7 @@ #include "key.h" #include "pubkey.h" #include "txdb.h" +#include "txmempool.h" #include #include @@ -67,7 +68,8 @@ struct TestMemPoolEntryHelper bool hadNoDependencies; bool spendsCoinbase; unsigned int sigOpCount; - + LockPoints lp; + TestMemPoolEntryHelper() : nFee(0), nTime(0), dPriority(0.0), nHeight(1), hadNoDependencies(false), spendsCoinbase(false), sigOpCount(1) { } diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 0b0f32e40..5f814749b 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -22,10 +22,10 @@ using namespace std; CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee, int64_t _nTime, double _entryPriority, unsigned int _entryHeight, bool poolHasNoInputsOf, CAmount _inChainInputValue, - bool _spendsCoinbase, unsigned int _sigOps): + bool _spendsCoinbase, unsigned int _sigOps, LockPoints lp): tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight), hadNoDependencies(poolHasNoInputsOf), inChainInputValue(_inChainInputValue), - spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOps) + spendsCoinbase(_spendsCoinbase), sigOpCount(_sigOps), lockPoints(lp) { nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION); nModSize = tx.CalculateModifiedSize(nTxSize); @@ -61,6 +61,11 @@ void CTxMemPoolEntry::UpdateFeeDelta(int64_t newFeeDelta) feeDelta = newFeeDelta; } +void CTxMemPoolEntry::UpdateLockPoints(const LockPoints& lp) +{ + lockPoints = lp; +} + // Update the given tx for any in-mempool descendants. // Assumes that setMemPoolChildren is correct for the given tx and all // descendants. @@ -506,7 +511,11 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem list transactionsToRemove; for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) { const CTransaction& tx = it->GetTx(); - if (!CheckFinalTx(tx, flags) || !CheckSequenceLocks(tx, flags)) { + LockPoints lp = it->GetLockPoints(); + bool validLP = TestLockPointValidity(&lp); + if (!CheckFinalTx(tx, flags) || !CheckSequenceLocks(tx, flags, &lp, validLP)) { + // Note if CheckSequenceLocks fails the LockPoints may still be invalid + // So it's critical that we remove the tx and not depend on the LockPoints. transactionsToRemove.push_back(tx); } else if (it->GetSpendsCoinbase()) { BOOST_FOREACH(const CTxIn& txin, tx.vin) { @@ -521,6 +530,9 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem } } } + if (!validLP) { + mapTx.modify(it, update_lock_points(lp)); + } } BOOST_FOREACH(const CTransaction& tx, transactionsToRemove) { list removed; diff --git a/src/txmempool.h b/src/txmempool.h index 386cb26d2..5997346b0 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -19,6 +19,7 @@ #include "boost/multi_index/ordered_index.hpp" class CAutoFile; +class CBlockIndex; inline double AllowFreeThreshold() { @@ -35,6 +36,21 @@ inline bool AllowFree(double dPriority) /** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */ static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF; +struct LockPoints +{ + // Will be set to the blockchain height and median time past + // values that would be necessary to satisfy all relative locktime + // constraints (BIP68) of this tx given our view of block chain history + int height; + int64_t time; + // As long as the current chain descends from the highest height block + // containing one of the inputs used in the calculation, then the cached + // values are still valid even after a reorg. + CBlockIndex* maxInputBlock; + + LockPoints() : height(0), time(0), maxInputBlock(NULL) { } +}; + class CTxMemPool; /** \class CTxMemPoolEntry @@ -70,6 +86,7 @@ private: bool spendsCoinbase; //! keep track of transactions that spend a coinbase unsigned int sigOpCount; //! Legacy sig ops plus P2SH sig op count int64_t feeDelta; //! Used for determining the priority of the transaction for mining in a block + LockPoints lockPoints; //! Track the height and time at which tx was final // Information about descendants of this transaction that are in the // mempool; if we remove this transaction we must remove all of these @@ -84,7 +101,7 @@ public: CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee, int64_t _nTime, double _entryPriority, unsigned int _entryHeight, bool poolHasNoInputsOf, CAmount _inChainInputValue, bool spendsCoinbase, - unsigned int nSigOps); + unsigned int nSigOps, LockPoints lp); CTxMemPoolEntry(const CTxMemPoolEntry& other); const CTransaction& GetTx() const { return this->tx; } @@ -101,12 +118,15 @@ public: unsigned int GetSigOpCount() const { return sigOpCount; } int64_t GetModifiedFee() const { return nFee + feeDelta; } size_t DynamicMemoryUsage() const { return nUsageSize; } + const LockPoints& GetLockPoints() const { return lockPoints; } // Adjusts the descendant state, if this entry is not dirty. void UpdateState(int64_t modifySize, CAmount modifyFee, int64_t modifyCount); // Updates the fee delta used for mining priority score, and the // modified fees with descendants. void UpdateFeeDelta(int64_t feeDelta); + // Update the LockPoints after a reorg + void UpdateLockPoints(const LockPoints& lp); /** We can set the entry to be dirty if doing the full calculation of in- * mempool descendants will be too expensive, which can potentially happen @@ -154,6 +174,16 @@ private: int64_t feeDelta; }; +struct update_lock_points +{ + update_lock_points(const LockPoints& _lp) : lp(_lp) { } + + void operator() (CTxMemPoolEntry &e) { e.UpdateLockPoints(lp); } + +private: + const LockPoints& lp; +}; + // extracts a TxMemPoolEntry's transaction hash struct mempoolentry_txid { From 6f83cf2adb2fd73cfeaa8ef67054ea8a0e4ef4db Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 15 Feb 2016 05:13:27 +0100 Subject: [PATCH 14/45] BIP9 Implementation Inspired by former implementations by Eric Lombrozo and Rusty Russell, and based on code by Jorge Timon. --- src/Makefile.am | 2 + src/chain.h | 2 - src/chainparams.cpp | 6 ++ src/consensus/params.h | 28 +++++++++ src/init.cpp | 2 +- src/main.cpp | 80 +++++++++++++++++++++-- src/main.h | 5 ++ src/miner.cpp | 11 ++-- src/primitives/block.h | 3 +- src/test/miner_tests.cpp | 33 +++++++++- src/versionbits.cpp | 133 +++++++++++++++++++++++++++++++++++++++ src/versionbits.h | 59 +++++++++++++++++ 12 files changed, 345 insertions(+), 19 deletions(-) create mode 100644 src/versionbits.cpp create mode 100644 src/versionbits.h diff --git a/src/Makefile.am b/src/Makefile.am index 4c12e550b..52316a9fd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -163,6 +163,7 @@ BITCOIN_CORE_H = \ utiltime.h \ validationinterface.h \ version.h \ + versionbits.h \ wallet/crypter.h \ wallet/db.h \ wallet/wallet.h \ @@ -214,6 +215,7 @@ libbitcoin_server_a_SOURCES = \ txdb.cpp \ txmempool.cpp \ validationinterface.cpp \ + versionbits.cpp \ $(BITCOIN_CORE_H) if ENABLE_ZMQ diff --git a/src/chain.h b/src/chain.h index b9b1b9306..ae6c4338d 100644 --- a/src/chain.h +++ b/src/chain.h @@ -14,8 +14,6 @@ #include -#include - struct CDiskBlockPos { int nFile; diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 9cf99492c..b911ab3f6 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -81,6 +81,8 @@ public: consensus.nPowTargetSpacing = 10 * 60; consensus.fPowAllowMinDifficultyBlocks = false; consensus.fPowNoRetargeting = false; + consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016 + consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing /** * 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 @@ -163,6 +165,8 @@ public: consensus.nPowTargetSpacing = 10 * 60; consensus.fPowAllowMinDifficultyBlocks = true; consensus.fPowNoRetargeting = false; + consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains + consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; pchMessageStart[2] = 0x09; @@ -227,6 +231,8 @@ public: consensus.nPowTargetSpacing = 10 * 60; consensus.fPowAllowMinDifficultyBlocks = true; consensus.fPowNoRetargeting = true; + consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains + consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016) pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0xbf; diff --git a/src/consensus/params.h b/src/consensus/params.h index 335750fe8..d5039211a 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -7,8 +7,28 @@ #define BITCOIN_CONSENSUS_PARAMS_H #include "uint256.h" +#include +#include namespace Consensus { + +enum DeploymentPos +{ + MAX_VERSION_BITS_DEPLOYMENTS = 0, +}; + +/** + * Struct for each individual consensus rule change using BIP9. + */ +struct BIP9Deployment { + /** Bit position to select the particular bit in nVersion. */ + int bit; + /** Start MedianTime for version bits miner confirmation. Can be a date in the past */ + int64_t nStartTime; + /** Timeout/expiry MedianTime for the deployment attempt. */ + int64_t nTimeout; +}; + /** * Parameters that influence chain consensus. */ @@ -22,6 +42,14 @@ struct Params { /** Block height and hash at which BIP34 becomes active */ int BIP34Height; uint256 BIP34Hash; + /** + * Minimum blocks including miner confirmation of the total of 2016 blocks in a retargetting period, + * (nPowTargetTimespan / nPowTargetSpacing) which is also used for BIP9 deployments. + * Examples: 1916 for 95%, 1512 for testchains. + */ + uint32_t nRuleChangeActivationThreshold; + uint32_t nMinerConfirmationWindow; + BIP9Deployment vDeployments[MAX_VERSION_BITS_DEPLOYMENTS]; /** Proof of work parameters */ uint256 powLimit; bool fPowAllowMinDifficultyBlocks; diff --git a/src/init.cpp b/src/init.cpp index 71a9eae86..2b7da4ee8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -496,7 +496,7 @@ std::string HelpMessage(HelpMessageMode mode) 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) - strUsage += HelpMessageOpt("-blockversion=", strprintf("Override block version to test forking scenarios (default: %d)", (int)CBlock::CURRENT_VERSION)); + strUsage += HelpMessageOpt("-blockversion=", "Override block version to test forking scenarios"); strUsage += HelpMessageGroup(_("RPC server options:")); strUsage += HelpMessageOpt("-server", _("Accept command line and JSON-RPC commands")); diff --git a/src/main.cpp b/src/main.cpp index d6eeceaaf..542f37876 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,6 +34,7 @@ #include "utilmoneystr.h" #include "utilstrencodings.h" #include "validationinterface.h" +#include "versionbits.h" #include @@ -2135,6 +2136,51 @@ void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const } } +// Protected by cs_main +static VersionBitsCache versionbitscache; + +int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params) +{ + LOCK(cs_main); + int32_t nVersion = VERSIONBITS_TOP_BITS; + + for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) { + ThresholdState state = VersionBitsState(pindexPrev, params, (Consensus::DeploymentPos)i, versionbitscache); + if (state == THRESHOLD_LOCKED_IN || state == THRESHOLD_STARTED) { + nVersion |= VersionBitsMask(params, (Consensus::DeploymentPos)i); + } + } + + return nVersion; +} + +/** + * Threshold condition checker that triggers when unknown versionbits are seen on the network. + */ +class WarningBitsConditionChecker : public AbstractThresholdConditionChecker +{ +private: + int bit; + +public: + WarningBitsConditionChecker(int bitIn) : bit(bitIn) {} + + int64_t BeginTime(const Consensus::Params& params) const { return 0; } + int64_t EndTime(const Consensus::Params& params) const { return std::numeric_limits::max(); } + int Period(const Consensus::Params& params) const { return params.nMinerConfirmationWindow; } + int Threshold(const Consensus::Params& params) const { return params.nRuleChangeActivationThreshold; } + + bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const + { + return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && + ((pindex->nVersion >> bit) & 1) != 0 && + ((ComputeBlockVersion(pindex->pprev, params) >> bit) & 1) == 0; + } +}; + +// Protected by cs_main +static ThresholdConditionCache warningcache[VERSIONBITS_NUM_BITS]; + static int64_t nTimeCheck = 0; static int64_t nTimeForks = 0; static int64_t nTimeVerify = 0; @@ -2503,24 +2549,42 @@ void static UpdateTip(CBlockIndex *pindexNew) { // Check the version of the last 100 blocks to see if we need to upgrade: static bool fWarned = false; - if (!IsInitialBlockDownload() && !fWarned) + if (!IsInitialBlockDownload()) { int nUpgraded = 0; const CBlockIndex* pindex = chainActive.Tip(); + for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { + WarningBitsConditionChecker checker(bit); + ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); + if (state == THRESHOLD_ACTIVE || state == THRESHOLD_LOCKED_IN) { + if (state == THRESHOLD_ACTIVE) { + strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit); + if (!fWarned) { + CAlert::Notify(strMiscWarning, true); + fWarned = true; + } + } else { + LogPrintf("%s: unknown new rules are about to activate (versionbit %i)\n", __func__, bit); + } + } + } for (int i = 0; i < 100 && pindex != NULL; i++) { - if (pindex->nVersion > CBlock::CURRENT_VERSION) + int32_t nExpectedVersion = ComputeBlockVersion(pindex->pprev, chainParams.GetConsensus()); + if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0) ++nUpgraded; pindex = pindex->pprev; } if (nUpgraded > 0) - LogPrintf("%s: %d of last 100 blocks above version %d\n", __func__, nUpgraded, (int)CBlock::CURRENT_VERSION); + LogPrintf("%s: %d of last 100 blocks have unexpected version\n", __func__, nUpgraded); if (nUpgraded > 100/2) { // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user: - strMiscWarning = _("Warning: This version is obsolete; upgrade required!"); - CAlert::Notify(strMiscWarning, true); - fWarned = true; + strMiscWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect"); + if (!fWarned) { + CAlert::Notify(strMiscWarning, true); + fWarned = true; + } } } } @@ -3839,6 +3903,10 @@ void UnloadBlockIndex() setDirtyFileInfo.clear(); mapNodeState.clear(); recentRejects.reset(NULL); + versionbitscache.Clear(); + for (int b = 0; b < VERSIONBITS_NUM_BITS; b++) { + warningcache[b].clear(); + } BOOST_FOREACH(BlockMap::value_type& entry, mapBlockIndex) { delete entry.second; diff --git a/src/main.h b/src/main.h index 3793f55ba..8c6a51cac 100644 --- a/src/main.h +++ b/src/main.h @@ -528,6 +528,11 @@ extern CBlockTreeDB *pblocktree; */ int GetSpendHeight(const CCoinsViewCache& inputs); +/** + * Determine what nVersion a new block should use. + */ +int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params); + /** Reject codes greater or equal to this can be returned by AcceptToMemPool * for transactions, to signal internal conditions. They cannot and should not * be sent over the P2P network. diff --git a/src/miner.cpp b/src/miner.cpp index c454c0279..d095d418f 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -79,11 +79,6 @@ CBlockTemplate* CreateNewBlock(const CChainParams& chainparams, const CScript& s return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience - // -regtest only: allow overriding block.nVersion with - // -blockversion=N to test forking scenarios - if (chainparams.MineBlocksOnDemand()) - pblock->nVersion = GetArg("-blockversion", pblock->nVersion); - // Create coinbase tx CMutableTransaction txNew; txNew.vin.resize(1); @@ -137,6 +132,12 @@ CBlockTemplate* CreateNewBlock(const CChainParams& chainparams, const CScript& s pblock->nTime = GetAdjustedTime(); const int64_t nMedianTimePast = pindexPrev->GetMedianTimePast(); + pblock->nVersion = ComputeBlockVersion(pindexPrev, chainparams.GetConsensus()); + // -regtest only: allow overriding block.nVersion with + // -blockversion=N to test forking scenarios + if (chainparams.MineBlocksOnDemand()) + pblock->nVersion = GetArg("-blockversion", pblock->nVersion); + int64_t nLockTimeCutoff = (STANDARD_LOCKTIME_VERIFY_FLAGS & LOCKTIME_MEDIAN_TIME_PAST) ? nMedianTimePast : pblock->GetBlockTime(); diff --git a/src/primitives/block.h b/src/primitives/block.h index 0e93399c0..42276b2bc 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -21,7 +21,6 @@ class CBlockHeader { public: // header - static const int32_t CURRENT_VERSION=4; int32_t nVersion; uint256 hashPrevBlock; uint256 hashMerkleRoot; @@ -49,7 +48,7 @@ public: void SetNull() { - nVersion = CBlockHeader::CURRENT_VERSION; + nVersion = 0; hashPrevBlock.SetNull(); hashMerkleRoot.SetNull(); nTime = 0; diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index f3297e074..ab6485081 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -247,13 +247,40 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // subsidy changing int nHeight = chainActive.Height(); - chainActive.Tip()->nHeight = 209999; + // Create an actual 209999-long block chain (without valid blocks). + while (chainActive.Tip()->nHeight < 209999) { + CBlockIndex* prev = chainActive.Tip(); + CBlockIndex* next = new CBlockIndex(); + next->phashBlock = new uint256(GetRandHash()); + pcoinsTip->SetBestBlock(next->GetBlockHash()); + next->pprev = prev; + next->nHeight = prev->nHeight + 1; + next->BuildSkip(); + chainActive.SetTip(next); + } BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; - chainActive.Tip()->nHeight = 210000; + // Extend to a 210000-long block chain. + while (chainActive.Tip()->nHeight < 210000) { + CBlockIndex* prev = chainActive.Tip(); + CBlockIndex* next = new CBlockIndex(); + next->phashBlock = new uint256(GetRandHash()); + pcoinsTip->SetBestBlock(next->GetBlockHash()); + next->pprev = prev; + next->nHeight = prev->nHeight + 1; + next->BuildSkip(); + chainActive.SetTip(next); + } BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; - chainActive.Tip()->nHeight = nHeight; + // Delete the dummy blocks again. + while (chainActive.Tip()->nHeight > nHeight) { + CBlockIndex* del = chainActive.Tip(); + chainActive.SetTip(del->pprev); + pcoinsTip->SetBestBlock(del->pprev->GetBlockHash()); + delete del->phashBlock; + delete del; + } // non-final txs in mempool SetMockTime(chainActive.Tip()->GetMedianTimePast()+1); diff --git a/src/versionbits.cpp b/src/versionbits.cpp new file mode 100644 index 000000000..fbb60c0fc --- /dev/null +++ b/src/versionbits.cpp @@ -0,0 +1,133 @@ +// 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 "versionbits.h" + +ThresholdState AbstractThresholdConditionChecker::GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const +{ + int nPeriod = Period(params); + int nThreshold = Threshold(params); + int64_t nTimeStart = BeginTime(params); + int64_t nTimeTimeout = EndTime(params); + + // A block's state is always the same as that of the first of its period, so it is computed based on a pindexPrev whose height equals a multiple of nPeriod - 1. + if (pindexPrev != NULL) { + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - ((pindexPrev->nHeight + 1) % nPeriod)); + } + + // Walk backwards in steps of nPeriod to find a pindexPrev whose information is known + std::vector vToCompute; + while (cache.count(pindexPrev) == 0) { + if (pindexPrev == NULL) { + // The genesis block is by definition defined. + cache[pindexPrev] = THRESHOLD_DEFINED; + break; + } + if (pindexPrev->GetMedianTimePast() < nTimeStart) { + // Optimizaton: don't recompute down further, as we know every earlier block will be before the start time + cache[pindexPrev] = THRESHOLD_DEFINED; + break; + } + vToCompute.push_back(pindexPrev); + pindexPrev = pindexPrev->GetAncestor(pindexPrev->nHeight - nPeriod); + } + + // At this point, cache[pindexPrev] is known + assert(cache.count(pindexPrev)); + ThresholdState state = cache[pindexPrev]; + + // Now walk forward and compute the state of descendants of pindexPrev + while (!vToCompute.empty()) { + ThresholdState stateNext = state; + pindexPrev = vToCompute.back(); + vToCompute.pop_back(); + + switch (state) { + case THRESHOLD_DEFINED: { + if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { + stateNext = THRESHOLD_FAILED; + } else if (pindexPrev->GetMedianTimePast() >= nTimeStart) { + stateNext = THRESHOLD_STARTED; + } + break; + } + case THRESHOLD_STARTED: { + if (pindexPrev->GetMedianTimePast() >= nTimeTimeout) { + stateNext = THRESHOLD_FAILED; + break; + } + // We need to count + const CBlockIndex* pindexCount = pindexPrev; + int count = 0; + for (int i = 0; i < nPeriod; i++) { + if (Condition(pindexCount, params)) { + count++; + } + pindexCount = pindexCount->pprev; + } + if (count >= nThreshold) { + stateNext = THRESHOLD_LOCKED_IN; + } + break; + } + case THRESHOLD_LOCKED_IN: { + // Always progresses into ACTIVE. + stateNext = THRESHOLD_ACTIVE; + break; + } + case THRESHOLD_FAILED: + case THRESHOLD_ACTIVE: { + // Nothing happens, these are terminal states. + break; + } + } + cache[pindexPrev] = state = stateNext; + } + + return state; +} + +namespace +{ +/** + * Class to implement versionbits logic. + */ +class VersionBitsConditionChecker : public AbstractThresholdConditionChecker { +private: + const Consensus::DeploymentPos id; + +protected: + int64_t BeginTime(const Consensus::Params& params) const { return params.vDeployments[id].nStartTime; } + int64_t EndTime(const Consensus::Params& params) const { return params.vDeployments[id].nTimeout; } + int Period(const Consensus::Params& params) const { return params.nMinerConfirmationWindow; } + int Threshold(const Consensus::Params& params) const { return params.nRuleChangeActivationThreshold; } + + bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const + { + return (((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && (pindex->nVersion & Mask(params)) != 0); + } + +public: + VersionBitsConditionChecker(Consensus::DeploymentPos id_) : id(id_) {} + uint32_t Mask(const Consensus::Params& params) const { return ((uint32_t)1) << params.vDeployments[id].bit; } +}; + +} + +ThresholdState VersionBitsState(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache) +{ + return VersionBitsConditionChecker(pos).GetStateFor(pindexPrev, params, cache.caches[pos]); +} + +uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos) +{ + return VersionBitsConditionChecker(pos).Mask(params); +} + +void VersionBitsCache::Clear() +{ + for (unsigned int d = 0; d < Consensus::MAX_VERSION_BITS_DEPLOYMENTS; d++) { + caches[d].clear(); + } +} diff --git a/src/versionbits.h b/src/versionbits.h new file mode 100644 index 000000000..04f473827 --- /dev/null +++ b/src/versionbits.h @@ -0,0 +1,59 @@ +// 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_CONSENSUS_VERSIONBITS +#define BITCOIN_CONSENSUS_VERSIONBITS + +#include "chain.h" +#include + +/** What block version to use for new blocks (pre versionbits) */ +static const int32_t VERSIONBITS_LAST_OLD_BLOCK_VERSION = 4; +/** What bits to set in version for versionbits blocks */ +static const int32_t VERSIONBITS_TOP_BITS = 0x20000000UL; +/** What bitmask determines whether versionbits is in use */ +static const int32_t VERSIONBITS_TOP_MASK = 0xE0000000UL; +/** Total bits available for versionbits */ +static const int32_t VERSIONBITS_NUM_BITS = 29; + +enum ThresholdState { + THRESHOLD_DEFINED, + THRESHOLD_STARTED, + THRESHOLD_LOCKED_IN, + THRESHOLD_ACTIVE, + THRESHOLD_FAILED, +}; + +// A map that gives the state for blocks whose height is a multiple of Period(). +// The map is indexed by the block's parent, however, so all keys in the map +// will either be NULL or a block with (height + 1) % Period() == 0. +typedef std::map ThresholdConditionCache; + +/** + * Abstract class that implements BIP9-style threshold logic, and caches results. + */ +class AbstractThresholdConditionChecker { +protected: + virtual bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const =0; + virtual int64_t BeginTime(const Consensus::Params& params) const =0; + virtual int64_t EndTime(const Consensus::Params& params) const =0; + virtual int Period(const Consensus::Params& params) const =0; + virtual int Threshold(const Consensus::Params& params) const =0; + +public: + // Note that the function below takes a pindexPrev as input: they compute information for block B based on its parent. + ThresholdState GetStateFor(const CBlockIndex* pindexPrev, const Consensus::Params& params, ThresholdConditionCache& cache) const; +}; + +struct VersionBitsCache +{ + ThresholdConditionCache caches[Consensus::MAX_VERSION_BITS_DEPLOYMENTS]; + + void Clear(); +}; + +ThresholdState VersionBitsState(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos pos, VersionBitsCache& cache); +uint32_t VersionBitsMask(const Consensus::Params& params, Consensus::DeploymentPos pos); + +#endif From 5f90d4e29470a8a8fa9f9580b195a0d5c23430b7 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 20 Feb 2016 02:57:36 +0100 Subject: [PATCH 15/45] Versionbits tests --- src/Makefile.test.include | 1 + src/test/versionbits_tests.cpp | 185 +++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100644 src/test/versionbits_tests.cpp diff --git a/src/Makefile.test.include b/src/Makefile.test.include index d89132f80..e96e7bec3 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -82,6 +82,7 @@ BITCOIN_TESTS =\ test/timedata_tests.cpp \ test/transaction_tests.cpp \ test/txvalidationcache_tests.cpp \ + test/versionbits_tests.cpp \ test/uint256_tests.cpp \ test/univalue_tests.cpp \ test/util_tests.cpp diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp new file mode 100644 index 000000000..9de8461d8 --- /dev/null +++ b/src/test/versionbits_tests.cpp @@ -0,0 +1,185 @@ +// 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. + +#include "chain.h" +#include "random.h" +#include "versionbits.h" +#include "test/test_bitcoin.h" + +#include + +/* Define a virtual block time, one block per 10 minutes after Nov 14 2014, 0:55:36am */ +int32_t TestTime(int nHeight) { return 1415926536 + 600 * nHeight; } + +static const Consensus::Params paramsDummy = Consensus::Params(); + +class TestConditionChecker : public AbstractThresholdConditionChecker +{ +private: + mutable ThresholdConditionCache cache; + +public: + int64_t BeginTime(const Consensus::Params& params) const { return TestTime(10000); } + int64_t EndTime(const Consensus::Params& params) const { return TestTime(20000); } + int Period(const Consensus::Params& params) const { return 1000; } + int Threshold(const Consensus::Params& params) const { return 900; } + bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const { return (pindex->nVersion & 0x100); } + + ThresholdState GetStateFor(const CBlockIndex* pindexPrev) const { return AbstractThresholdConditionChecker::GetStateFor(pindexPrev, paramsDummy, cache); } +}; + +#define CHECKERS 6 + +class VersionBitsTester +{ + // A fake blockchain + std::vector vpblock; + + // 6 independent checkers for the same bit. + // The first one performs all checks, the second only 50%, the third only 25%, etc... + // This is to test whether lack of cached information leads to the same results. + TestConditionChecker checker[CHECKERS]; + + // Test counter (to identify failures) + int num; + +public: + VersionBitsTester() : num(0) {} + + VersionBitsTester& Reset() { + for (unsigned int i = 0; i < vpblock.size(); i++) { + delete vpblock[i]; + } + for (unsigned int i = 0; i < CHECKERS; i++) { + checker[i] = TestConditionChecker(); + } + vpblock.clear(); + return *this; + } + + ~VersionBitsTester() { + Reset(); + } + + VersionBitsTester& Mine(unsigned int height, int32_t nTime, int32_t nVersion) { + while (vpblock.size() < height) { + CBlockIndex* pindex = new CBlockIndex(); + pindex->nHeight = vpblock.size(); + pindex->pprev = vpblock.size() > 0 ? vpblock.back() : NULL; + pindex->nTime = nTime; + pindex->nVersion = nVersion; + pindex->BuildSkip(); + vpblock.push_back(pindex); + } + return *this; + } + + VersionBitsTester& TestDefined() { + for (int i = 0; i < CHECKERS; i++) { + if ((insecure_rand() & ((1 << i) - 1)) == 0) { + BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty() ? NULL : vpblock.back()) == THRESHOLD_DEFINED, strprintf("Test %i for DEFINED", num)); + } + } + num++; + return *this; + } + + VersionBitsTester& TestStarted() { + for (int i = 0; i < CHECKERS; i++) { + if ((insecure_rand() & ((1 << i) - 1)) == 0) { + BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty() ? NULL : vpblock.back()) == THRESHOLD_STARTED, strprintf("Test %i for STARTED", num)); + } + } + num++; + return *this; + } + + VersionBitsTester& TestLockedIn() { + for (int i = 0; i < CHECKERS; i++) { + if ((insecure_rand() & ((1 << i) - 1)) == 0) { + BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty() ? NULL : vpblock.back()) == THRESHOLD_LOCKED_IN, strprintf("Test %i for LOCKED_IN", num)); + } + } + num++; + return *this; + } + + VersionBitsTester& TestActive() { + for (int i = 0; i < CHECKERS; i++) { + if ((insecure_rand() & ((1 << i) - 1)) == 0) { + BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty() ? NULL : vpblock.back()) == THRESHOLD_ACTIVE, strprintf("Test %i for ACTIVE", num)); + } + } + num++; + return *this; + } + + VersionBitsTester& TestFailed() { + for (int i = 0; i < CHECKERS; i++) { + if ((insecure_rand() & ((1 << i) - 1)) == 0) { + BOOST_CHECK_MESSAGE(checker[i].GetStateFor(vpblock.empty() ? NULL : vpblock.back()) == THRESHOLD_FAILED, strprintf("Test %i for FAILED", num)); + } + } + num++; + return *this; + } +}; + +BOOST_FIXTURE_TEST_SUITE(versionbits_tests, TestingSetup) + +BOOST_AUTO_TEST_CASE(versionbits_test) +{ + for (int i = 0; i < 64; i++) { + // DEFINED -> FAILED + VersionBitsTester().TestDefined() + .Mine(1, TestTime(1), 0x100).TestDefined() + .Mine(11, TestTime(11), 0x100).TestDefined() + .Mine(989, TestTime(989), 0x100).TestDefined() + .Mine(999, TestTime(20000), 0x100).TestDefined() + .Mine(1000, TestTime(20000), 0x100).TestFailed() + .Mine(1999, TestTime(30001), 0x100).TestFailed() + .Mine(2000, TestTime(30002), 0x100).TestFailed() + .Mine(2001, TestTime(30003), 0x100).TestFailed() + .Mine(2999, TestTime(30004), 0x100).TestFailed() + .Mine(3000, TestTime(30005), 0x100).TestFailed() + + // DEFINED -> STARTED -> FAILED + .Reset().TestDefined() + .Mine(1, TestTime(1), 0).TestDefined() + .Mine(1000, TestTime(10000) - 1, 0x100).TestDefined() // One second more and it would be defined + .Mine(2000, TestTime(10000), 0x100).TestStarted() // So that's what happens the next period + .Mine(2051, TestTime(10010), 0).TestStarted() // 51 old blocks + .Mine(2950, TestTime(10020), 0x100).TestStarted() // 899 new blocks + .Mine(3000, TestTime(20000), 0).TestFailed() // 50 old blocks (so 899 out of the past 1000) + .Mine(4000, TestTime(20010), 0x100).TestFailed() + + // DEFINED -> STARTED -> FAILED while threshold reached + .Reset().TestDefined() + .Mine(1, TestTime(1), 0).TestDefined() + .Mine(1000, TestTime(10000) - 1, 0x101).TestDefined() // One second more and it would be defined + .Mine(2000, TestTime(10000), 0x101).TestStarted() // So that's what happens the next period + .Mine(2999, TestTime(30000), 0x100).TestStarted() // 999 new blocks + .Mine(3000, TestTime(30000), 0x100).TestFailed() // 1 new block (so 1000 out of the past 1000 are new) + .Mine(3999, TestTime(30001), 0).TestFailed() + .Mine(4000, TestTime(30002), 0).TestFailed() + .Mine(14333, TestTime(30003), 0).TestFailed() + .Mine(24000, TestTime(40000), 0).TestFailed() + + // DEFINED -> STARTED -> LOCKEDIN at the last minute -> ACTIVE + .Reset().TestDefined() + .Mine(1, TestTime(1), 0).TestDefined() + .Mine(1000, TestTime(10000) - 1, 0x101).TestDefined() // One second more and it would be defined + .Mine(2000, TestTime(10000), 0x101).TestStarted() // So that's what happens the next period + .Mine(2050, TestTime(10010), 0x200).TestStarted() // 50 old blocks + .Mine(2950, TestTime(10020), 0x100).TestStarted() // 900 new blocks + .Mine(2999, TestTime(19999), 0x200).TestStarted() // 49 old blocks + .Mine(3000, TestTime(29999), 0x200).TestLockedIn() // 1 old block (so 900 out of the past 1000) + .Mine(3999, TestTime(30001), 0).TestLockedIn() + .Mine(4000, TestTime(30002), 0).TestActive() + .Mine(14333, TestTime(30003), 0).TestActive() + .Mine(24000, TestTime(40000), 0).TestActive(); + } +} + +BOOST_AUTO_TEST_SUITE_END() From 0bdaacd7913fd626691daa2946590547071dcf3b Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 3 Mar 2016 21:00:03 +0100 Subject: [PATCH 16/45] Softfork status report in RPC --- src/main.cpp | 6 +++++- src/main.h | 4 ++++ src/rpcblockchain.cpp | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 542f37876..89ca99bc9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5930,7 +5930,11 @@ bool SendMessages(CNode* pto) return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst), DateTimeStrFormat("%Y-%m-%d", nTimeLast)); } - +ThresholdState VersionBitsTipState(const Consensus::Params& params, Consensus::DeploymentPos pos) +{ + LOCK(cs_main); + return VersionBitsState(chainActive.Tip(), params, pos, versionbitscache); +} class CMainCleanup { diff --git a/src/main.h b/src/main.h index 8c6a51cac..05ae9ea45 100644 --- a/src/main.h +++ b/src/main.h @@ -16,6 +16,7 @@ #include "net.h" #include "script/script_error.h" #include "sync.h" +#include "versionbits.h" #include #include @@ -275,6 +276,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa /** Convert CValidationState to a human-readable message for logging */ std::string FormatStateMessage(const CValidationState &state); +/** Get the BIP9 state for a given deployment at the current tip. */ +ThresholdState VersionBitsTipState(const Consensus::Params& params, Consensus::DeploymentPos pos); + struct CNodeStateStats { int nMisbehavior; int nSyncHeight; diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index f5b16bc7c..4fd2e6d05 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -604,6 +604,20 @@ static UniValue SoftForkDesc(const std::string &name, int version, CBlockIndex* return rv; } +static UniValue BIP9SoftForkDesc(const std::string& name, const Consensus::Params& consensusParams, Consensus::DeploymentPos id) +{ + UniValue rv(UniValue::VOBJ); + rv.push_back(Pair("id", name)); + switch (VersionBitsTipState(consensusParams, id)) { + case THRESHOLD_DEFINED: rv.push_back(Pair("status", "defined")); break; + case THRESHOLD_STARTED: rv.push_back(Pair("status", "started")); break; + case THRESHOLD_LOCKED_IN: rv.push_back(Pair("status", "locked_in")); break; + case THRESHOLD_ACTIVE: rv.push_back(Pair("status", "active")); break; + case THRESHOLD_FAILED: rv.push_back(Pair("status", "failed")); break; + } + return rv; +} + UniValue getblockchaininfo(const UniValue& params, bool fHelp) { if (fHelp || params.size() != 0) @@ -634,6 +648,12 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) " },\n" " \"reject\": { ... } (object) progress toward rejecting pre-softfork blocks (same fields as \"enforce\")\n" " }, ...\n" + " ],\n" + " \"bip9_softforks\": [ (array) status of BIP9 softforks in progress\n" + " {\n" + " \"id\": \"xxxx\", (string) name of the softfork\n" + " \"status\": \"xxxx\", (string) one of \"defined\", \"started\", \"lockedin\", \"active\", \"failed\"\n" + " }\n" " ]\n" "}\n" "\nExamples:\n" @@ -657,10 +677,12 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) const Consensus::Params& consensusParams = Params().GetConsensus(); CBlockIndex* tip = chainActive.Tip(); UniValue softforks(UniValue::VARR); + UniValue bip9_softforks(UniValue::VARR); softforks.push_back(SoftForkDesc("bip34", 2, tip, consensusParams)); softforks.push_back(SoftForkDesc("bip66", 3, tip, consensusParams)); softforks.push_back(SoftForkDesc("bip65", 4, tip, consensusParams)); obj.push_back(Pair("softforks", softforks)); + obj.push_back(Pair("bip9_softforks", bip9_softforks)); if (fPruneMode) { From 8ebc6f2aac554c08a0d83229c1043a36ef9492f5 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Wed, 9 Mar 2016 16:00:53 -0500 Subject: [PATCH 17/45] Add testing of ComputeBlockVersion --- src/chainparams.cpp | 9 +++ src/consensus/params.h | 3 +- src/test/versionbits_tests.cpp | 109 +++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index b911ab3f6..1d3de502a 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -83,6 +83,9 @@ public: consensus.fPowNoRetargeting = false; consensus.nRuleChangeActivationThreshold = 1916; // 95% of 2016 consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008 + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 /** * 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 @@ -167,6 +170,9 @@ public: consensus.fPowNoRetargeting = false; consensus.nRuleChangeActivationThreshold = 1512; // 75% for testchains consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008 + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; pchMessageStart[2] = 0x09; @@ -233,6 +239,9 @@ public: consensus.fPowNoRetargeting = true; consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016) + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0; + consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 999999999999ULL; pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0xbf; diff --git a/src/consensus/params.h b/src/consensus/params.h index d5039211a..7c3a8e84c 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -14,7 +14,8 @@ namespace Consensus { enum DeploymentPos { - MAX_VERSION_BITS_DEPLOYMENTS = 0, + DEPLOYMENT_TESTDUMMY, + MAX_VERSION_BITS_DEPLOYMENTS }; /** diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp index 9de8461d8..63dc4726b 100644 --- a/src/test/versionbits_tests.cpp +++ b/src/test/versionbits_tests.cpp @@ -6,6 +6,9 @@ #include "random.h" #include "versionbits.h" #include "test/test_bitcoin.h" +#include "chainparams.h" +#include "main.h" +#include "consensus/params.h" #include @@ -124,6 +127,8 @@ public: num++; return *this; } + + CBlockIndex * Tip() { return vpblock.size() ? vpblock.back() : NULL; } }; BOOST_FIXTURE_TEST_SUITE(versionbits_tests, TestingSetup) @@ -182,4 +187,108 @@ BOOST_AUTO_TEST_CASE(versionbits_test) } } +BOOST_AUTO_TEST_CASE(versionbits_computeblockversion) +{ + // Check that ComputeBlockVersion will set the appropriate bit correctly + // on mainnet. + const Consensus::Params &mainnetParams = Params(CBaseChainParams::MAIN).GetConsensus(); + + // Use the TESTDUMMY deployment for testing purposes. + int64_t bit = mainnetParams.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit; + int64_t nStartTime = mainnetParams.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime; + int64_t nTimeout = mainnetParams.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout; + + assert(nStartTime < nTimeout); + + // In the first chain, test that the bit is set by CBV until it has failed. + // In the second chain, test the bit is set by CBV while STARTED and + // LOCKED-IN, and then no longer set while ACTIVE. + VersionBitsTester firstChain, secondChain; + + // Start generating blocks before nStartTime + int64_t nTime = nStartTime - 1; + + // Before MedianTimePast of the chain has crossed nStartTime, the bit + // should not be set. + CBlockIndex *lastBlock = NULL; + lastBlock = firstChain.Mine(2016, nTime, VERSIONBITS_LAST_OLD_BLOCK_VERSION).Tip(); + BOOST_CHECK_EQUAL(ComputeBlockVersion(lastBlock, mainnetParams) & (1< 0) { + lastBlock = firstChain.Mine(nHeight+1, nTime, VERSIONBITS_LAST_OLD_BLOCK_VERSION).Tip(); + BOOST_CHECK((ComputeBlockVersion(lastBlock, mainnetParams) & (1< Date: Wed, 9 Mar 2016 09:48:20 -0500 Subject: [PATCH 18/45] Test versionbits deployments --- src/test/versionbits_tests.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp index 63dc4726b..1f86a06a3 100644 --- a/src/test/versionbits_tests.cpp +++ b/src/test/versionbits_tests.cpp @@ -185,6 +185,28 @@ BOOST_AUTO_TEST_CASE(versionbits_test) .Mine(14333, TestTime(30003), 0).TestActive() .Mine(24000, TestTime(40000), 0).TestActive(); } + + // Sanity checks of version bit deployments + const Consensus::Params &mainnetParams = Params(CBaseChainParams::MAIN).GetConsensus(); + for (int i=0; i<(int) Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) { + uint32_t bitmask = VersionBitsMask(mainnetParams, (Consensus::DeploymentPos)i); + // Make sure that no deployment tries to set an invalid bit. + BOOST_CHECK_EQUAL(bitmask & ~(uint32_t)VERSIONBITS_TOP_MASK, bitmask); + + // Verify that the deployment windows of different deployment using the + // same bit are disjoint. + // This test may need modification at such time as a new deployment + // is proposed that reuses the bit of an activated soft fork, before the + // end time of that soft fork. (Alternatively, the end time of that + // activated soft fork could be later changed to be earlier to avoid + // overlap.) + for (int j=i+1; j<(int) Consensus::MAX_VERSION_BITS_DEPLOYMENTS; j++) { + if (VersionBitsMask(mainnetParams, (Consensus::DeploymentPos)j) == bitmask) { + BOOST_CHECK(mainnetParams.vDeployments[j].nStartTime > mainnetParams.vDeployments[i].nTimeout || + mainnetParams.vDeployments[i].nStartTime > mainnetParams.vDeployments[j].nTimeout); + } + } + } } BOOST_AUTO_TEST_CASE(versionbits_computeblockversion) From 6ff0b9f96ef83dc11f70e1ab66d815fb6c971e60 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 15 Mar 2016 12:09:16 -0400 Subject: [PATCH 19/45] RPC test for BIP9 warning logic --- qa/pull-tester/rpc-tests.py | 1 + qa/rpc-tests/p2p-versionbits-warning.py | 160 ++++++++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100755 qa/rpc-tests/p2p-versionbits-warning.py diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index e7173fda0..60f12e514 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -106,6 +106,7 @@ testScripts = [ 'invalidblockrequest.py', 'invalidtxrequest.py', 'abandonconflict.py', + 'p2p-versionbits-warning.py', ] testScriptsExt = [ 'bip65-cltv.py', diff --git a/qa/rpc-tests/p2p-versionbits-warning.py b/qa/rpc-tests/p2p-versionbits-warning.py new file mode 100755 index 000000000..061dcbf0e --- /dev/null +++ b/qa/rpc-tests/p2p-versionbits-warning.py @@ -0,0 +1,160 @@ +#!/usr/bin/env python2 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT/X11 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 * +import time +from test_framework.blocktools import create_block, create_coinbase + +''' +Test version bits' warning system. + +Generate chains with block versions that appear to be signalling unknown +soft-forks, and test that warning alerts are generated. +''' + +VB_PERIOD = 144 # versionbits period length for regtest +VB_THRESHOLD = 108 # versionbits activation threshold for regtest +VB_TOP_BITS = 0x20000000 +VB_UNKNOWN_BIT = 27 # Choose a bit unassigned to any deployment + +# 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): + def __init__(self): + NodeConnCB.__init__(self) + self.connection = None + self.ping_counter = 1 + self.last_pong = msg_pong() + + def add_connection(self, conn): + self.connection = conn + + def on_inv(self, conn, message): + pass + + # Wrapper for the NodeConn's send_message function + def send_message(self, message): + self.connection.send_message(message) + + def on_pong(self, conn, message): + self.last_pong = message + + # Sync up with the node after delivery of a block + def sync_with_ping(self, timeout=30): + self.connection.send_message(msg_ping(nonce=self.ping_counter)) + received_pong = False + sleep_time = 0.05 + while not received_pong and timeout > 0: + time.sleep(sleep_time) + timeout -= sleep_time + with mininode_lock: + if self.last_pong.nonce == self.ping_counter: + received_pong = True + self.ping_counter += 1 + return received_pong + + +class VersionBitsWarningTest(BitcoinTestFramework): + def setup_chain(self): + initialize_chain_clean(self.options.tmpdir, 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: + 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") + + # Send numblocks blocks via peer with nVersionToUse set. + def send_blocks_with_version(self, peer, numblocks, nVersionToUse): + tip = self.nodes[0].getbestblockhash() + height = self.nodes[0].getblockcount() + block_time = self.nodes[0].getblockheader(tip)["time"]+1 + tip = int(tip, 16) + + for i in xrange(numblocks): + block = create_block(tip, create_coinbase(height+1), block_time) + block.nVersion = nVersionToUse + block.solve() + peer.send_message(msg_block(block)) + block_time += 1 + height += 1 + tip = block.sha256 + peer.sync_with_ping() + + 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)) + + def run_test(self): + # Setup the p2p connection and start up the network thread. + test_node = TestNode() + + connections = [] + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], test_node)) + test_node.add_connection(connections[0]) + + NetworkThread().start() # Start up network handling in another thread + + # Test logic begins here + test_node.wait_for_verack() + + # 1. Have the node mine one period worth of blocks + self.nodes[0].generate(VB_PERIOD) + + # 2. Now build one period of blocks on the tip, with < VB_THRESHOLD + # blocks signaling some unknown bit. + nVersion = VB_TOP_BITS | (1<= VB_THRESHOLD blocks signaling + # some unknown bit + self.send_blocks_with_version(test_node, VB_THRESHOLD, nVersion) + self.nodes[0].generate(VB_PERIOD - VB_THRESHOLD) + # 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) + + # 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 + # to ACTIVE. + self.nodes[0].generate(VB_PERIOD) + stop_node(self.nodes[0], 0) + wait_bitcoinds() + # Empty out the alert file + with open(self.alert_filename, 'w') as f: + pass + self.nodes[0] = start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]) + + # Connecting one block should be enough to generate an error. + self.nodes[0].generate(1) + assert(len(self.nodes[0].getinfo()["errors"]) != 0) + 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 + "\""]) + + +if __name__ == '__main__': + VersionBitsWarningTest().main() From ee40924fef1e8835b9ef865360b126952ad8359d Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 20 Feb 2016 23:37:13 +0100 Subject: [PATCH 20/45] Add CHECKSEQUENCEVERIFY softfork through BIP9 --- src/chainparams.cpp | 17 ++++++++++++++++- src/consensus/params.h | 1 + src/main.cpp | 5 +++++ src/rpcblockchain.cpp | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 1d3de502a..4af6f34c6 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -86,7 +86,13 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 - /** + + // Deployment of BIP68, BIP112, and BIP113. + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1462060800; // May 1st, 2016 + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017 + + /** * 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 * a large 32-bit integer with any alignment. @@ -173,6 +179,12 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 1199145601; // January 1, 2008 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 + + // Deployment of BIP68, BIP112, and BIP113. + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 1456790400; // March 1st, 2016 + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 1493596800; // May 1st, 2017 + pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; pchMessageStart[2] = 0x09; @@ -242,6 +254,9 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28; consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0; consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 999999999999ULL; + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0; + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0; + consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 999999999999ULL; pchMessageStart[0] = 0xfa; pchMessageStart[1] = 0xbf; diff --git a/src/consensus/params.h b/src/consensus/params.h index 7c3a8e84c..4f3480b89 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -15,6 +15,7 @@ namespace Consensus { enum DeploymentPos { DEPLOYMENT_TESTDUMMY, + DEPLOYMENT_CSV, // Deployment of BIP68, BIP112, and BIP113. MAX_VERSION_BITS_DEPLOYMENTS }; diff --git a/src/main.cpp b/src/main.cpp index 89ca99bc9..39d68af37 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2277,6 +2277,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY; } + // Start enforcing CHECKSEQUENCEVERIFY using versionbits logic. + if (VersionBitsState(pindex->pprev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV, versionbitscache) == THRESHOLD_ACTIVE) { + flags |= SCRIPT_VERIFY_CHECKSEQUENCEVERIFY; + } + int64_t nTime2 = GetTimeMicros(); nTimeForks += nTime2 - nTime1; LogPrint("bench", " - Fork checks: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimeForks * 0.000001); diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 4fd2e6d05..f0bcafafe 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -681,6 +681,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp) softforks.push_back(SoftForkDesc("bip34", 2, tip, consensusParams)); softforks.push_back(SoftForkDesc("bip66", 3, tip, consensusParams)); softforks.push_back(SoftForkDesc("bip65", 4, tip, consensusParams)); + bip9_softforks.push_back(BIP9SoftForkDesc("csv", consensusParams, Consensus::DEPLOYMENT_CSV)); obj.push_back(Pair("softforks", softforks)); obj.push_back(Pair("bip9_softforks", bip9_softforks)); From 648be9b442587cc1682052bca80625aea906a01d Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Tue, 16 Feb 2016 16:33:31 +0000 Subject: [PATCH 21/45] Soft fork logic for BIP113 --- src/main.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 39d68af37..3035a3e5d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3310,12 +3310,18 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->nHeight + 1; const Consensus::Params& consensusParams = Params().GetConsensus(); + // Start enforcing BIP113 (Median Time Past) using versionbits logic. + int nLockTimeFlags = 0; + if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_CSV, versionbitscache) == THRESHOLD_ACTIVE) { + nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST; + } + + int64_t nLockTimeCutoff = (nLockTimeFlags & LOCKTIME_MEDIAN_TIME_PAST) + ? pindexPrev->GetMedianTimePast() + : block.GetBlockTime(); + // Check that all transactions are finalized BOOST_FOREACH(const CTransaction& tx, block.vtx) { - int nLockTimeFlags = 0; - int64_t nLockTimeCutoff = (nLockTimeFlags & LOCKTIME_MEDIAN_TIME_PAST) - ? pindexPrev->GetMedianTimePast() - : block.GetBlockTime(); if (!IsFinalTx(tx, nHeight, nLockTimeCutoff)) { return state.DoS(10, error("%s: contains a non-final transaction", __func__), REJECT_INVALID, "bad-txns-nonfinal"); } From 9713ed3015da02b0132b665e965fd591689e6510 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Tue, 16 Feb 2016 16:37:43 +0000 Subject: [PATCH 22/45] Soft fork logic for BIP68 --- src/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3035a3e5d..14f70cdf5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2277,9 +2277,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY; } - // Start enforcing CHECKSEQUENCEVERIFY using versionbits logic. + // Start enforcing BIP68 (sequence locks) and BIP112 (CHECKSEQUENCEVERIFY) using versionbits logic. + int nLockTimeFlags = 0; if (VersionBitsState(pindex->pprev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV, versionbitscache) == THRESHOLD_ACTIVE) { flags |= SCRIPT_VERIFY_CHECKSEQUENCEVERIFY; + nLockTimeFlags |= LOCKTIME_VERIFY_SEQUENCE; } int64_t nTime2 = GetTimeMicros(); nTimeForks += nTime2 - nTime1; @@ -2290,7 +2292,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin CCheckQueueControl control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL); std::vector prevheights; - int nLockTimeFlags = 0; CAmount nFees = 0; int nInputs = 0; unsigned int nSigOps = 0; From 159ee3dd90490eabf6c048c17a62ffa01f6a0967 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Fri, 19 Feb 2016 19:52:31 +0000 Subject: [PATCH 23/45] Policy: allow transaction version 2 relay policy. This commit introduces a way to gracefully bump the default transaction version in a two step process. --- src/policy/policy.cpp | 2 +- src/primitives/transaction.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index c92a249c1..018b3d25b 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -58,7 +58,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType) bool IsStandardTx(const CTransaction& tx, std::string& reason) { - if (tx.nVersion > CTransaction::CURRENT_VERSION || tx.nVersion < 1) { + if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1) { reason = "version"; return false; } diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index 07ae39e0b..9f7d6f394 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -206,8 +206,15 @@ private: void UpdateHash() const; public: + // Default transaction version. static const int32_t CURRENT_VERSION=1; + // Changing the default transaction version requires a two step process: first + // adapting relay policy by bumping MAX_STANDARD_VERSION, and then later date + // bumping the default CURRENT_VERSION at which point both CURRENT_VERSION and + // MAX_STANDARD_VERSION will be equal. + static const int32_t MAX_STANDARD_VERSION=2; + // The local variables are made const to prevent unintended modification // without updating the cached hash value. However, CTransaction is not // actually immutable; deserialization and assignment are implemented, From 3a99feba859f39f0d61bd672b5cbb20ed31dacac Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Thu, 10 Mar 2016 18:36:55 -0500 Subject: [PATCH 24/45] Add RPC test for BIP 68/112/113 soft fork. This RPC test will test both the activation mechanism of the first versionbits soft fork as well as testing many code branches of the consensus logic for BIP's 68, 112, and 113. --- qa/pull-tester/rpc-tests.py | 1 + qa/rpc-tests/bip68-112-113-p2p.py | 547 ++++++++++++++++++++++++++++++ 2 files changed, 548 insertions(+) create mode 100755 qa/rpc-tests/bip68-112-113-p2p.py diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 60f12e514..fe65b32ca 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -74,6 +74,7 @@ if EXEEXT == ".exe" and "-win" not in opts: #Tests testScripts = [ + 'bip68-112-113-p2p.py', 'wallet.py', 'listtransactions.py', 'receivedby.py', diff --git a/qa/rpc-tests/bip68-112-113-p2p.py b/qa/rpc-tests/bip68-112-113-p2p.py new file mode 100755 index 000000000..c226f4dad --- /dev/null +++ b/qa/rpc-tests/bip68-112-113-p2p.py @@ -0,0 +1,547 @@ +#!/usr/bin/env python2 +# Copyright (c) 2015 The Bitcoin Core developers +# Distributed under the MIT/X11 software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# + +from test_framework.test_framework import ComparisonTestFramework +from test_framework.util import * +from test_framework.mininode import ToHex, CTransaction, NetworkThread +from test_framework.blocktools import create_coinbase, create_block +from test_framework.comptool import TestInstance, TestManager +from test_framework.script import * +from binascii import unhexlify +import cStringIO +import time + +''' +This test is meant to exercise activation of the first version bits soft fork +This soft fork will activate the following BIPS: +BIP 68 - nSequence relative lock times +BIP 112 - CHECKSEQUENCEVERIFY +BIP 113 - MedianTimePast semantics for nLockTime + +regtest lock-in with 108/144 block signalling +activation after a further 144 blocks + +mine 82 blocks whose coinbases will be used to generate inputs for our tests +mine 61 blocks to transition from DEFINED to STARTED +mine 144 blocks only 100 of which are signaling readiness in order to fail to change state this period +mine 144 blocks with 108 signaling and verify STARTED->LOCKED_IN +mine 140 blocks and seed block chain with the 82 inputs will use for our tests at height 572 +mine 3 blocks and verify still at LOCKED_IN and test that enforcement has not triggered +mine 1 block and test that enforcement has triggered (which triggers ACTIVE) +Test BIP 113 is enforced +Mine 4 blocks so next height is 580 and test BIP 68 is enforced for time and height +Mine 1 block so next height is 581 and test BIP 68 now passes time but not height +Mine 1 block so next height is 582 and test BIP 68 now passes time and height +Test that BIP 112 is enforced + +Various transactions will be used to test that the BIPs rules are not enforced before the soft fork activates +And that after the soft fork activates transactions pass and fail as they should according to the rules. +For each BIP, transactions of versions 1 and 2 will be tested. +---------------- +BIP 113: +bip113tx - modify the nLocktime variable + +BIP 68: +bip68txs - 16 txs with nSequence relative locktime of 10 with various bits set as per the relative_locktimes below + +BIP 112: +bip112txs_vary_nSequence - 16 txs with nSequence relative_locktimes of 10 evaluated against 10 OP_CSV OP_DROP +bip112txs_vary_nSequence_9 - 16 txs with nSequence relative_locktimes of 9 evaluated against 10 OP_CSV OP_DROP +bip112txs_vary_OP_CSV - 16 txs with nSequence = 10 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP +bip112txs_vary_OP_CSV_9 - 16 txs with nSequence = 9 evaluated against varying {relative_locktimes of 10} OP_CSV OP_DROP +bip112tx_special - test negative argument to OP_CSV +''' + +base_relative_locktime = 10 +seq_disable_flag = 1<<31 +seq_random_high_bit = 1<<25 +seq_type_flag = 1<<22 +seq_random_low_bit = 1<<18 + +# b31,b25,b22,b18 represent the 31st, 25th, 22nd and 18th bits respectively in the nSequence field +# relative_locktimes[b31][b25][b22][b18] is a base_relative_locktime with the indicated bits set if their indices are 1 +relative_locktimes = [] +for b31 in xrange(2): + b25times = [] + for b25 in xrange(2): + b22times = [] + for b22 in xrange(2): + b18times = [] + for b18 in xrange(2): + rlt = base_relative_locktime + if (b31): + rlt = rlt | seq_disable_flag + if (b25): + rlt = rlt | seq_random_high_bit + if (b22): + rlt = rlt | seq_type_flag + if (b18): + rlt = rlt | seq_random_low_bit + b18times.append(rlt) + b22times.append(b18times) + b25times.append(b22times) + relative_locktimes.append(b25times) + +def all_rlt_txs(txarray): + txs = [] + for b31 in xrange(2): + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + txs.append(txarray[b31][b25][b22][b18]) + return txs + +class BIP68_112_113Test(ComparisonTestFramework): + def __init__(self): + self.num_nodes = 1 + + def setup_network(self): + # Must set the blockversion for this test + self.nodes = start_nodes(1, self.options.tmpdir, + extra_args=[['-debug', '-whitelist=127.0.0.1', '-blockversion=4']], + binary=[self.options.testbinary]) + + def run_test(self): + test = TestManager(self, self.options.tmpdir) + test.add_all_connections(self.nodes) + NetworkThread().start() # Start up network handling in another thread + test.run() + + def send_generic_input_tx(self, node, coinbases): + amount = Decimal("49.99") + return node.sendrawtransaction(ToHex(self.sign_transaction(node, self.create_transaction(node, node.getblock(coinbases.pop())['tx'][0], self.nodeaddress, amount)))) + + def create_transaction(self, node, txid, to_address, amount): + inputs = [{ "txid" : txid, "vout" : 0}] + outputs = { to_address : amount } + rawtx = node.createrawtransaction(inputs, outputs) + tx = CTransaction() + f = cStringIO.StringIO(unhexlify(rawtx)) + tx.deserialize(f) + return tx + + def sign_transaction(self, node, unsignedtx): + rawtx = ToHex(unsignedtx) + signresult = node.signrawtransaction(rawtx) + tx = CTransaction() + f = cStringIO.StringIO(unhexlify(signresult['hex'])) + tx.deserialize(f) + return tx + + def generate_blocks(self, number, version, test_blocks = []): + for i in xrange(number): + block = self.create_test_block([], version) + test_blocks.append([block, True]) + self.last_block_time += 600 + self.tip = block.sha256 + self.tipheight += 1 + return test_blocks + + def create_test_block(self, txs, version = 536870912): + block = create_block(self.tip, create_coinbase(self.tipheight + 1), self.last_block_time + 600) + block.nVersion = version + block.vtx.extend(txs) + block.hashMerkleRoot = block.calc_merkle_root() + block.rehash() + block.solve() + return block + + def get_bip9_status(self, key): + info = self.nodes[0].getblockchaininfo() + for row in info['bip9_softforks']: + if row['id'] == key: + return row + raise IndexError ('key:"%s" not found' % key) + + def create_bip68txs(self, bip68inputs, txversion, locktime_delta = 0): + txs = [] + assert(len(bip68inputs) >= 16) + i = 0 + for b31 in xrange(2): + b25txs = [] + for b25 in xrange(2): + b22txs = [] + for b22 in xrange(2): + b18txs = [] + for b18 in xrange(2): + tx = self.create_transaction(self.nodes[0], bip68inputs[i], self.nodeaddress, Decimal("49.98")) + i += 1 + tx.nVersion = txversion + tx.vin[0].nSequence = relative_locktimes[b31][b25][b22][b18] + locktime_delta + b18txs.append(self.sign_transaction(self.nodes[0], tx)) + b22txs.append(b18txs) + b25txs.append(b22txs) + txs.append(b25txs) + return txs + + def create_bip112special(self, input, txversion): + tx = self.create_transaction(self.nodes[0], input, self.nodeaddress, Decimal("49.98")) + tx.nVersion = txversion + signtx = self.sign_transaction(self.nodes[0], tx) + signtx.vin[0].scriptSig = CScript([-1, OP_NOP3, OP_DROP] + list(CScript(signtx.vin[0].scriptSig))) + return signtx + + def create_bip112txs(self, bip112inputs, varyOP_CSV, txversion, locktime_delta = 0): + txs = [] + assert(len(bip112inputs) >= 16) + i = 0 + for b31 in xrange(2): + b25txs = [] + for b25 in xrange(2): + b22txs = [] + for b22 in xrange(2): + b18txs = [] + for b18 in xrange(2): + tx = self.create_transaction(self.nodes[0], bip112inputs[i], self.nodeaddress, Decimal("49.98")) + i += 1 + if (varyOP_CSV): # if varying OP_CSV, nSequence is fixed + tx.vin[0].nSequence = base_relative_locktime + locktime_delta + else: # vary nSequence instead, OP_CSV is fixed + tx.vin[0].nSequence = relative_locktimes[b31][b25][b22][b18] + locktime_delta + tx.nVersion = txversion + signtx = self.sign_transaction(self.nodes[0], tx) + if (varyOP_CSV): + signtx.vin[0].scriptSig = CScript([relative_locktimes[b31][b25][b22][b18], OP_NOP3, OP_DROP] + list(CScript(signtx.vin[0].scriptSig))) + else: + signtx.vin[0].scriptSig = CScript([base_relative_locktime, OP_NOP3, OP_DROP] + list(CScript(signtx.vin[0].scriptSig))) + b18txs.append(signtx) + b22txs.append(b18txs) + b25txs.append(b22txs) + txs.append(b25txs) + return txs + + def get_tests(self): + long_past_time = int(time.time()) - 600 * 1000 # enough to build up to 1000 blocks 10 minutes apart without worrying about getting into the future + self.nodes[0].setmocktime(long_past_time - 100) # enough so that the generated blocks will still all be before long_past_time + self.coinbase_blocks = self.nodes[0].generate(1 + 16 + 2*32 + 1) # 82 blocks generated for inputs + self.nodes[0].setmocktime(0) # set time back to present so yielded blocks aren't in the future as we advance last_block_time + self.tipheight = 82 # height of the next block to build + self.last_block_time = long_past_time + self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0) + self.nodeaddress = self.nodes[0].getnewaddress() + + assert_equal(self.get_bip9_status('csv')['status'], 'defined') + test_blocks = self.generate_blocks(61, 4) + yield TestInstance(test_blocks, sync_every_block=False) # 1 + # Advanced from DEFINED to STARTED, height = 143 + assert_equal(self.get_bip9_status('csv')['status'], 'started') + + # Fail to achieve LOCKED_IN 100 out of 144 signal bit 0 + # using a variety of bits to simulate multiple parallel softforks + test_blocks = self.generate_blocks(50, 536870913) # 0x20000001 (signalling ready) + test_blocks = self.generate_blocks(20, 4, test_blocks) # 0x00000004 (signalling not) + test_blocks = self.generate_blocks(50, 536871169, test_blocks) # 0x20000101 (signalling ready) + test_blocks = self.generate_blocks(24, 536936448, test_blocks) # 0x20010000 (signalling not) + yield TestInstance(test_blocks, sync_every_block=False) # 2 + # Failed to advance past STARTED, height = 287 + assert_equal(self.get_bip9_status('csv')['status'], 'started') + + # 108 out of 144 signal bit 0 to achieve lock-in + # using a variety of bits to simulate multiple parallel softforks + test_blocks = self.generate_blocks(58, 536870913) # 0x20000001 (signalling ready) + test_blocks = self.generate_blocks(26, 4, test_blocks) # 0x00000004 (signalling not) + test_blocks = self.generate_blocks(50, 536871169, test_blocks) # 0x20000101 (signalling ready) + test_blocks = self.generate_blocks(10, 536936448, test_blocks) # 0x20010000 (signalling not) + yield TestInstance(test_blocks, sync_every_block=False) # 3 + # Advanced from STARTED to LOCKED_IN, height = 431 + assert_equal(self.get_bip9_status('csv')['status'], 'locked_in') + + # 140 more version 4 blocks + test_blocks = self.generate_blocks(140, 4) + yield TestInstance(test_blocks, sync_every_block=False) # 4 + + ### Inputs at height = 572 + # Put inputs for all tests in the chain at height 572 (tip now = 571) (time increases by 600s per block) + # Note we reuse inputs for v1 and v2 txs so must test these separately + # 16 normal inputs + bip68inputs = [] + for i in xrange(16): + bip68inputs.append(self.send_generic_input_tx(self.nodes[0], self.coinbase_blocks)) + # 2 sets of 16 inputs with 10 OP_CSV OP_DROP (actually will be prepended to spending scriptSig) + bip112basicinputs = [] + for j in xrange(2): + inputs = [] + for i in xrange(16): + inputs.append(self.send_generic_input_tx(self.nodes[0], self.coinbase_blocks)) + bip112basicinputs.append(inputs) + # 2 sets of 16 varied inputs with (relative_lock_time) OP_CSV OP_DROP (actually will be prepended to spending scriptSig) + bip112diverseinputs = [] + for j in xrange(2): + inputs = [] + for i in xrange(16): + inputs.append(self.send_generic_input_tx(self.nodes[0], self.coinbase_blocks)) + bip112diverseinputs.append(inputs) + # 1 special input with -1 OP_CSV OP_DROP (actually will be prepended to spending scriptSig) + bip112specialinput = self.send_generic_input_tx(self.nodes[0], self.coinbase_blocks) + # 1 normal input + bip113input = self.send_generic_input_tx(self.nodes[0], self.coinbase_blocks) + + self.nodes[0].setmocktime(self.last_block_time + 600) + inputblockhash = self.nodes[0].generate(1)[0] # 1 block generated for inputs to be in chain at height 572 + self.nodes[0].setmocktime(0) + self.tip = int("0x" + inputblockhash + "L", 0) + self.tipheight += 1 + self.last_block_time += 600 + assert_equal(len(self.nodes[0].getblock(inputblockhash,True)["tx"]), 82+1) + + # 2 more version 4 blocks + test_blocks = self.generate_blocks(2, 4) + yield TestInstance(test_blocks, sync_every_block=False) # 5 + # Not yet advanced to ACTIVE, height = 574 (will activate for block 576, not 575) + assert_equal(self.get_bip9_status('csv')['status'], 'locked_in') + + # Test both version 1 and version 2 transactions for all tests + # BIP113 test transaction will be modified before each use to put in appropriate block time + bip113tx_v1 = self.create_transaction(self.nodes[0], bip113input, self.nodeaddress, Decimal("49.98")) + bip113tx_v1.vin[0].nSequence = 0xFFFFFFFE + bip113tx_v2 = self.create_transaction(self.nodes[0], bip113input, self.nodeaddress, Decimal("49.98")) + bip113tx_v2.vin[0].nSequence = 0xFFFFFFFE + bip113tx_v2.nVersion = 2 + + # For BIP68 test all 16 relative sequence locktimes + bip68txs_v1 = self.create_bip68txs(bip68inputs, 1) + bip68txs_v2 = self.create_bip68txs(bip68inputs, 2) + + # For BIP112 test: + # 16 relative sequence locktimes of 10 against 10 OP_CSV OP_DROP inputs + bip112txs_vary_nSequence_v1 = self.create_bip112txs(bip112basicinputs[0], False, 1) + bip112txs_vary_nSequence_v2 = self.create_bip112txs(bip112basicinputs[0], False, 2) + # 16 relative sequence locktimes of 9 against 10 OP_CSV OP_DROP inputs + bip112txs_vary_nSequence_9_v1 = self.create_bip112txs(bip112basicinputs[1], False, 1, -1) + bip112txs_vary_nSequence_9_v2 = self.create_bip112txs(bip112basicinputs[1], False, 2, -1) + # sequence lock time of 10 against 16 (relative_lock_time) OP_CSV OP_DROP inputs + bip112txs_vary_OP_CSV_v1 = self.create_bip112txs(bip112diverseinputs[0], True, 1) + bip112txs_vary_OP_CSV_v2 = self.create_bip112txs(bip112diverseinputs[0], True, 2) + # sequence lock time of 9 against 16 (relative_lock_time) OP_CSV OP_DROP inputs + bip112txs_vary_OP_CSV_9_v1 = self.create_bip112txs(bip112diverseinputs[1], True, 1, -1) + bip112txs_vary_OP_CSV_9_v2 = self.create_bip112txs(bip112diverseinputs[1], True, 2, -1) + # -1 OP_CSV OP_DROP input + bip112tx_special_v1 = self.create_bip112special(bip112specialinput, 1) + bip112tx_special_v2 = self.create_bip112special(bip112specialinput, 2) + + + ### TESTING ### + ################################## + ### Before Soft Forks Activate ### + ################################## + # All txs should pass + ### Version 1 txs ### + success_txs = [] + # add BIP113 tx and -1 CSV tx + bip113tx_v1.nLockTime = self.last_block_time - 600 * 5 # = MTP of prior block (not <) but < time put on current block + bip113signed1 = self.sign_transaction(self.nodes[0], bip113tx_v1) + success_txs.append(bip113signed1) + success_txs.append(bip112tx_special_v1) + # add BIP 68 txs + success_txs.extend(all_rlt_txs(bip68txs_v1)) + # add BIP 112 with seq=10 txs + success_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_v1)) + success_txs.extend(all_rlt_txs(bip112txs_vary_OP_CSV_v1)) + # try BIP 112 with seq=9 txs + success_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_9_v1)) + success_txs.extend(all_rlt_txs(bip112txs_vary_OP_CSV_9_v1)) + yield TestInstance([[self.create_test_block(success_txs), True]]) # 6 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + ### Version 2 txs ### + success_txs = [] + # add BIP113 tx and -1 CSV tx + bip113tx_v2.nLockTime = self.last_block_time - 600 * 5 # = MTP of prior block (not <) but < time put on current block + bip113signed2 = self.sign_transaction(self.nodes[0], bip113tx_v2) + success_txs.append(bip113signed2) + success_txs.append(bip112tx_special_v2) + # add BIP 68 txs + success_txs.extend(all_rlt_txs(bip68txs_v2)) + # add BIP 112 with seq=10 txs + success_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_v2)) + success_txs.extend(all_rlt_txs(bip112txs_vary_OP_CSV_v2)) + # try BIP 112 with seq=9 txs + success_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_9_v2)) + success_txs.extend(all_rlt_txs(bip112txs_vary_OP_CSV_9_v2)) + yield TestInstance([[self.create_test_block(success_txs), True]]) # 7 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + + # 1 more version 4 block to get us to height 575 so the fork should now be active for the next block + test_blocks = self.generate_blocks(1, 4) + yield TestInstance(test_blocks, sync_every_block=False) # 8 + assert_equal(self.get_bip9_status('csv')['status'], 'active') + + + ################################# + ### After Soft Forks Activate ### + ################################# + ### BIP 113 ### + # BIP 113 tests should now fail regardless of version number if nLockTime isn't satisfied by new rules + bip113tx_v1.nLockTime = self.last_block_time - 600 * 5 # = MTP of prior block (not <) but < time put on current block + bip113signed1 = self.sign_transaction(self.nodes[0], bip113tx_v1) + bip113tx_v2.nLockTime = self.last_block_time - 600 * 5 # = MTP of prior block (not <) but < time put on current block + bip113signed2 = self.sign_transaction(self.nodes[0], bip113tx_v2) + for bip113tx in [bip113signed1, bip113signed2]: + yield TestInstance([[self.create_test_block([bip113tx]), False]]) # 9,10 + # BIP 113 tests should now pass if the locktime is < MTP + bip113tx_v1.nLockTime = self.last_block_time - 600 * 5 - 1 # = MTP of prior block (not <) but < time put on current block + bip113signed1 = self.sign_transaction(self.nodes[0], bip113tx_v1) + bip113tx_v2.nLockTime = self.last_block_time - 600 * 5 - 1 # = MTP of prior block (not <) but < time put on current block + bip113signed2 = self.sign_transaction(self.nodes[0], bip113tx_v2) + for bip113tx in [bip113signed1, bip113signed2]: + yield TestInstance([[self.create_test_block([bip113tx]), True]]) # 11,12 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + # Next block height = 580 after 4 blocks of random version + test_blocks = self.generate_blocks(4, 1234) + yield TestInstance(test_blocks, sync_every_block=False) # 13 + + ### BIP 68 ### + ### Version 1 txs ### + # All still pass + success_txs = [] + success_txs.extend(all_rlt_txs(bip68txs_v1)) + yield TestInstance([[self.create_test_block(success_txs), True]]) # 14 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + ### Version 2 txs ### + bip68success_txs = [] + # All txs with SEQUENCE_LOCKTIME_DISABLE_FLAG set pass + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + bip68success_txs.append(bip68txs_v2[1][b25][b22][b18]) + yield TestInstance([[self.create_test_block(bip68success_txs), True]]) # 15 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + # All txs without flag fail as we are at delta height = 8 < 10 and delta time = 8 * 600 < 10 * 512 + bip68timetxs = [] + for b25 in xrange(2): + for b18 in xrange(2): + bip68timetxs.append(bip68txs_v2[0][b25][1][b18]) + for tx in bip68timetxs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 16 - 19 + bip68heighttxs = [] + for b25 in xrange(2): + for b18 in xrange(2): + bip68heighttxs.append(bip68txs_v2[0][b25][0][b18]) + for tx in bip68heighttxs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 20 - 23 + + # Advance one block to 581 + test_blocks = self.generate_blocks(1, 1234) + yield TestInstance(test_blocks, sync_every_block=False) # 24 + + # Height txs should fail and time txs should now pass 9 * 600 > 10 * 512 + bip68success_txs.extend(bip68timetxs) + yield TestInstance([[self.create_test_block(bip68success_txs), True]]) # 25 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + for tx in bip68heighttxs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 26 - 29 + + # Advance one block to 582 + test_blocks = self.generate_blocks(1, 1234) + yield TestInstance(test_blocks, sync_every_block=False) # 30 + + # All BIP 68 txs should pass + bip68success_txs.extend(bip68heighttxs) + yield TestInstance([[self.create_test_block(bip68success_txs), True]]) # 31 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + + ### BIP 112 ### + ### Version 1 txs ### + # -1 OP_CSV tx should fail + yield TestInstance([[self.create_test_block([bip112tx_special_v1]), False]]) #32 + # If SEQUENCE_LOCKTIME_DISABLE_FLAG is set in argument to OP_CSV, version 1 txs should still pass + success_txs = [] + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + success_txs.append(bip112txs_vary_OP_CSV_v1[1][b25][b22][b18]) + success_txs.append(bip112txs_vary_OP_CSV_9_v1[1][b25][b22][b18]) + yield TestInstance([[self.create_test_block(success_txs), True]]) # 33 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + # If SEQUENCE_LOCKTIME_DISABLE_FLAG is unset in argument to OP_CSV, version 1 txs should now fail + fail_txs = [] + fail_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_v1)) + fail_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_9_v1)) + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + fail_txs.append(bip112txs_vary_OP_CSV_v1[0][b25][b22][b18]) + fail_txs.append(bip112txs_vary_OP_CSV_9_v1[0][b25][b22][b18]) + + for tx in fail_txs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 34 - 81 + + ### Version 2 txs ### + # -1 OP_CSV tx should fail + yield TestInstance([[self.create_test_block([bip112tx_special_v2]), False]]) #82 + + # If SEQUENCE_LOCKTIME_DISABLE_FLAG is set in argument to OP_CSV, version 2 txs should pass (all sequence locks are met) + success_txs = [] + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + success_txs.append(bip112txs_vary_OP_CSV_v2[1][b25][b22][b18]) # 8/16 of vary_OP_CSV + success_txs.append(bip112txs_vary_OP_CSV_9_v2[1][b25][b22][b18]) # 8/16 of vary_OP_CSV_9 + + yield TestInstance([[self.create_test_block(success_txs), True]]) # 83 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + ## SEQUENCE_LOCKTIME_DISABLE_FLAG is unset in argument to OP_CSV for all remaining txs ## + # All txs with nSequence 11 should fail either due to earlier mismatch or failing the CSV check + fail_txs = [] + fail_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_9_v2)) # 16/16 of vary_nSequence_9 + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + fail_txs.append(bip112txs_vary_OP_CSV_9_v2[0][b25][b22][b18]) # 16/16 of vary_OP_CSV_9 + + for tx in fail_txs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 84 - 107 + + # If SEQUENCE_LOCKTIME_DISABLE_FLAG is set in nSequence, tx should fail + fail_txs = [] + for b25 in xrange(2): + for b22 in xrange(2): + for b18 in xrange(2): + fail_txs.append(bip112txs_vary_nSequence_v2[1][b25][b22][b18]) # 8/16 of vary_nSequence + for tx in fail_txs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 108-115 + + # If sequencelock types mismatch, tx should fail + fail_txs = [] + for b25 in xrange(2): + for b18 in xrange(2): + fail_txs.append(bip112txs_vary_nSequence_v2[0][b25][1][b18]) # 12/16 of vary_nSequence + fail_txs.append(bip112txs_vary_OP_CSV_v2[0][b25][1][b18]) # 12/16 of vary_OP_CSV + for tx in fail_txs: + yield TestInstance([[self.create_test_block([tx]), False]]) # 116-123 + + # Remaining txs should pass, just test masking works properly + success_txs = [] + for b25 in xrange(2): + for b18 in xrange(2): + success_txs.append(bip112txs_vary_nSequence_v2[0][b25][0][b18]) # 16/16 of vary_nSequence + success_txs.append(bip112txs_vary_OP_CSV_v2[0][b25][0][b18]) # 16/16 of vary_OP_CSV + yield TestInstance([[self.create_test_block(success_txs), True]]) # 124 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + # Additional test, of checking that comparison of two time types works properly + time_txs = [] + for b25 in xrange(2): + for b18 in xrange(2): + tx = bip112txs_vary_OP_CSV_v2[0][b25][1][b18] + tx.vin[0].nSequence = base_relative_locktime | seq_type_flag + signtx = self.sign_transaction(self.nodes[0], tx) + time_txs.append(signtx) + yield TestInstance([[self.create_test_block(time_txs), True]]) # 125 + self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) + + ### Missing aspects of test + ## Testing empty stack fails + + +if __name__ == '__main__': + BIP68_112_113Test().main() From 19866c1ffcb860bc2980e00e956685b9a8f96529 Mon Sep 17 00:00:00 2001 From: Alex Morcos Date: Thu, 17 Mar 2016 12:48:05 -0400 Subject: [PATCH 25/45] Fix calculation of balances and available coins. No longer consider coins which aren't in our mempool. Add test for regression in abandonconflict.py Github-Pull: #7715 Rebased-From: 68d4282774d6a60c609301cddad0b652f16df4d9 --- qa/rpc-tests/abandonconflict.py | 6 ++++++ src/wallet/wallet.cpp | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/qa/rpc-tests/abandonconflict.py b/qa/rpc-tests/abandonconflict.py index 38028df07..a83aa97fc 100755 --- a/qa/rpc-tests/abandonconflict.py +++ b/qa/rpc-tests/abandonconflict.py @@ -83,6 +83,12 @@ class AbandonConflictTest(BitcoinTestFramework): # inputs are still spent, but change not received newbalance = self.nodes[0].getbalance() assert(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) + # Also shouldn't show up in listunspent + assert(not txABC2 in [utxo["txid"] for utxo in self.nodes[0].listunspent(0)]) balance = newbalance # Abandon original transaction and verify inputs are available again diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fca3d52f4..71f309148 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1576,7 +1576,7 @@ CAmount CWallet::GetUnconfirmedBalance() const for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; - if (!CheckFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0)) + if (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0 && pcoin->InMempool()) nTotal += pcoin->GetAvailableCredit(); } } @@ -1621,7 +1621,7 @@ CAmount CWallet::GetUnconfirmedWatchOnlyBalance() const for (map::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it) { const CWalletTx* pcoin = &(*it).second; - if (!CheckFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0)) + if (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0 && pcoin->InMempool()) nTotal += pcoin->GetAvailableWatchOnlyCredit(); } } @@ -1666,6 +1666,11 @@ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const if (nDepth < 0) continue; + // We should not consider coins which aren't at least in our mempool + // It's possible for these to be conflicted via ancestors which we may never be able to detect + if (nDepth == 0 && !pcoin->InMempool()) + continue; + for (unsigned int i = 0; i < pcoin->vout.size(); i++) { isminetype mine = IsMine(pcoin->vout[i]); if (!(IsSpent(wtxid, i)) && mine != ISMINE_NO && From 7ffc2bd9439b2ad4da653583f7e57915980522a3 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 17 Mar 2016 17:46:06 +0100 Subject: [PATCH 26/45] [Wallet][RPC] add abandoned status to listtransactions Github-Pull: #7739 Rebased-From: 263de3d1c80c8a0aa54acd4d6708a4078d479b70 --- src/wallet/rpcwallet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index f7f146763..ba43b805a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1347,6 +1347,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe entry.push_back(Pair("fee", ValueFromAmount(-nFee))); if (fLong) WalletTxToJSON(wtx, entry); + entry.push_back(Pair("abandoned", wtx.isAbandoned())); ret.push_back(entry); } } From 597494f5a90c041945006b8f3eff8f7e482e0f2f Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Fri, 26 Feb 2016 09:35:39 +0100 Subject: [PATCH 27/45] Remove openssl info from init/log and from Qt debug window Conflicts: src/init.cpp Github-Merge: #7605 Rebased-From: 5ecfa36fd01fc27475abbfcd53b4efb9da4a7398 --- src/init.cpp | 6 --- src/qt/forms/debugwindow.ui | 96 ++++++++++++++----------------------- src/qt/rpcconsole.cpp | 7 --- 3 files changed, 35 insertions(+), 74 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 71a9eae86..69ef71b4f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1075,12 +1075,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (fPrintToDebugLog) OpenDebugLog(); -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) - LogPrintf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION)); -#else - LogPrintf("Using OpenSSL version %s\n", OpenSSL_version(OPENSSL_VERSION)); -#endif - #ifdef ENABLE_WALLET LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0)); #endif diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 247147036..a2c198e08 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -7,7 +7,7 @@ 0 0 740 - 450 + 430 @@ -113,32 +113,6 @@ - - - Using OpenSSL version - - - 10 - - - - - - - IBeamCursor - - - N/A - - - Qt::PlainText - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - Using BerkeleyDB version @@ -148,7 +122,7 @@ - + IBeamCursor @@ -164,14 +138,14 @@ - + Build date - + IBeamCursor @@ -187,14 +161,14 @@ - + Startup time - + IBeamCursor @@ -210,14 +184,27 @@ - + + + + + 75 + true + + + + Network + + + + Name - + IBeamCursor @@ -233,14 +220,14 @@ - + Number of connections - + IBeamCursor @@ -256,7 +243,7 @@ - + @@ -269,14 +256,14 @@ - + Current number of blocks - + IBeamCursor @@ -292,14 +279,14 @@ - + Last block time - + IBeamCursor @@ -315,7 +302,7 @@ - + @@ -328,14 +315,14 @@ - + Current number of transactions - + IBeamCursor @@ -351,27 +338,14 @@ - - - - - 75 - true - - - - Network - - - - + Memory usage - + IBeamCursor @@ -387,7 +361,7 @@ - + 3 @@ -427,7 +401,7 @@ - + Qt::Vertical diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index be589c815..7e387d9aa 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -263,13 +263,6 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) : connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear())); // set library version labels - -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) - ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION)); -#else - ui->openSSLVersion->setText(OpenSSL_version(OPENSSL_VERSION)); -#endif - #ifdef ENABLE_WALLET ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0)); #else From c0fe2c9e0301f9b046b51fd78bb89ed8f6946eb8 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Thu, 24 Mar 2016 19:25:03 +0000 Subject: [PATCH 28/45] Mark p2p alert system as deprecated. Set default to off This feature is removed entirely as of 0.13.0 --- doc/release-notes.md | 5 +---- src/main.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 17a8984b3..177bf333b 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -35,10 +35,7 @@ earlier. Notable changes =============== -Example item ---------------------------------------- - -Example text. +The p2p alert system is off by default. To turn on, use `-alert` with startup configuration. 0.12.1 Change log ================= diff --git a/src/main.h b/src/main.h index 9fd97d212..c63e19070 100644 --- a/src/main.h +++ b/src/main.h @@ -41,7 +41,7 @@ class CValidationState; struct CNodeStateStats; /** Default for accepting alerts from the P2P network. */ -static const bool DEFAULT_ALERTS = true; +static const bool DEFAULT_ALERTS = false; /** Default for DEFAULT_WHITELISTRELAY. */ static const bool DEFAULT_WHITELISTRELAY = true; /** Default for DEFAULT_WHITELISTFORCERELAY. */ From 26e9a05cc3192ce19b7c46043aeb12230d3207a5 Mon Sep 17 00:00:00 2001 From: NicolasDorier Date: Wed, 16 Mar 2016 14:30:04 +0900 Subject: [PATCH 29/45] Test of BIP9 fork activation of mtp, csv, sequence_lock --- qa/pull-tester/rpc-tests.py | 1 + qa/rpc-tests/bip9-softforks.py | 220 ++++++++++++++++++++++++ qa/rpc-tests/test_framework/comptool.py | 4 + 3 files changed, 225 insertions(+) create mode 100755 qa/rpc-tests/bip9-softforks.py diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index fe65b32ca..f7e98dbf6 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -110,6 +110,7 @@ testScripts = [ 'p2p-versionbits-warning.py', ] testScriptsExt = [ + 'bip9-softforks.py', 'bip65-cltv.py', 'bip65-cltv-p2p.py', 'bipdersig-p2p.py', diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py new file mode 100755 index 000000000..cbb1b7d4c --- /dev/null +++ b/qa/rpc-tests/bip9-softforks.py @@ -0,0 +1,220 @@ +#!/usr/bin/env python2 +# Copyright (c) 2015 The Bitcoin Core developers +# Distributed under the MIT/X11 software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# + +from test_framework.test_framework import ComparisonTestFramework +from test_framework.util import * +from test_framework.mininode import CTransaction, NetworkThread +from test_framework.blocktools import create_coinbase, create_block +from test_framework.comptool import TestInstance, TestManager +from test_framework.script import CScript, OP_1NEGATE, OP_NOP3, OP_DROP +from binascii import hexlify, unhexlify +import cStringIO +import time +import itertools + +''' +This test is meant to exercise BIP forks +Connect to a single node. +regtest lock-in with 108/144 block signalling +activation after a further 144 blocks +mine 2 block and save coinbases for later use +mine 141 blocks to transition from DEFINED to STARTED +mine 100 blocks signalling readiness and 44 not in order to fail to change state this period +mine 108 blocks signalling readiness and 36 blocks not signalling readiness (STARTED->LOCKED_IN) +mine a further 143 blocks (LOCKED_IN) +test that enforcement has not triggered (which triggers ACTIVE) +test that enforcement has triggered +''' + + + +class BIP9SoftForksTest(ComparisonTestFramework): + + def __init__(self): + self.num_nodes = 1 + + def setup_network(self): + self.nodes = start_nodes(1, self.options.tmpdir, + extra_args=[['-debug', '-whitelist=127.0.0.1']], + binary=[self.options.testbinary]) + + def run_test(self): + self.test = TestManager(self, self.options.tmpdir) + self.test.add_all_connections(self.nodes) + NetworkThread().start() # Start up network handling in another thread + self.test.run() + + def create_transaction(self, node, coinbase, to_address, amount): + from_txid = node.getblock(coinbase)['tx'][0] + inputs = [{ "txid" : from_txid, "vout" : 0}] + outputs = { to_address : amount } + rawtx = node.createrawtransaction(inputs, outputs) + tx = CTransaction() + f = cStringIO.StringIO(unhexlify(rawtx)) + tx.deserialize(f) + tx.nVersion = 2 + return tx + + def sign_transaction(self, node, tx): + signresult = node.signrawtransaction(hexlify(tx.serialize())) + tx = CTransaction() + f = cStringIO.StringIO(unhexlify(signresult['hex'])) + tx.deserialize(f) + return tx + + def generate_blocks(self, number, version, test_blocks = []): + for i in xrange(number): + block = create_block(self.tip, create_coinbase(self.height), self.last_block_time + 1) + block.nVersion = version + block.rehash() + block.solve() + test_blocks.append([block, True]) + self.last_block_time += 1 + self.tip = block.sha256 + self.height += 1 + return test_blocks + + def get_bip9_status(self, key): + info = self.nodes[0].getblockchaininfo() + for row in info['bip9_softforks']: + if row['id'] == key: + return row + raise IndexError ('key:"%s" not found' % key) + + + def test_BIP(self, bipName, activated_version, invalidate, invalidatePostSignature): + # generate some coins for later + self.coinbase_blocks = self.nodes[0].generate(2) + self.height = 3 # height of the next block to build + self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0) + self.nodeaddress = self.nodes[0].getnewaddress() + self.last_block_time = time.time() + + assert_equal(self.get_bip9_status(bipName)['status'], 'defined') + + # Test 1 + # Advance from DEFINED to STARTED + test_blocks = self.generate_blocks(141, 4) + yield TestInstance(test_blocks, sync_every_block=False) + + assert_equal(self.get_bip9_status(bipName)['status'], 'started') + + # Test 2 + # Fail to achieve LOCKED_IN 100 out of 144 signal bit 1 + # using a variety of bits to simulate multiple parallel softforks + test_blocks = self.generate_blocks(50, activated_version) # 0x20000001 (signalling ready) + test_blocks = self.generate_blocks(20, 4, test_blocks) # 0x00000004 (signalling not) + test_blocks = self.generate_blocks(50, activated_version, test_blocks) # 0x20000101 (signalling ready) + test_blocks = self.generate_blocks(24, 4, test_blocks) # 0x20010000 (signalling not) + yield TestInstance(test_blocks, sync_every_block=False) + + assert_equal(self.get_bip9_status(bipName)['status'], 'started') + + # Test 3 + # 108 out of 144 signal bit 1 to achieve LOCKED_IN + # using a variety of bits to simulate multiple parallel softforks + test_blocks = self.generate_blocks(58, activated_version) # 0x20000001 (signalling ready) + test_blocks = self.generate_blocks(26, 4, test_blocks) # 0x00000004 (signalling not) + test_blocks = self.generate_blocks(50, activated_version, test_blocks) # 0x20000101 (signalling ready) + test_blocks = self.generate_blocks(10, 4, test_blocks) # 0x20010000 (signalling not) + yield TestInstance(test_blocks, sync_every_block=False) + + assert_equal(self.get_bip9_status(bipName)['status'], 'locked_in') + + # Test 4 + # 143 more version 536870913 blocks (waiting period-1) + test_blocks = self.generate_blocks(143, 4) + yield TestInstance(test_blocks, sync_every_block=False) + + assert_equal(self.get_bip9_status(bipName)['status'], 'locked_in') + + # Test 5 + # Check that the new rule is enforced + spendtx = self.create_transaction(self.nodes[0], + self.coinbase_blocks[0], self.nodeaddress, 1.0) + invalidate(spendtx) + spendtx = self.sign_transaction(self.nodes[0], spendtx) + spendtx.rehash() + invalidatePostSignature(spendtx) + spendtx.rehash() + block = create_block(self.tip, create_coinbase(self.height), self.last_block_time + 1) + block.nVersion = activated_version + block.vtx.append(spendtx) + block.hashMerkleRoot = block.calc_merkle_root() + block.rehash() + block.solve() + + self.last_block_time += 1 + self.tip = block.sha256 + self.height += 1 + yield TestInstance([[block, True]]) + + assert_equal(self.get_bip9_status(bipName)['status'], 'active') + + # Test 6 + # Check that the new sequence lock rules are enforced + spendtx = self.create_transaction(self.nodes[0], + self.coinbase_blocks[1], self.nodeaddress, 1.0) + invalidate(spendtx) + spendtx = self.sign_transaction(self.nodes[0], spendtx) + spendtx.rehash() + invalidatePostSignature(spendtx) + spendtx.rehash() + + block = create_block(self.tip, create_coinbase(self.height), self.last_block_time + 1) + block.nVersion = 5 + block.vtx.append(spendtx) + block.hashMerkleRoot = block.calc_merkle_root() + block.rehash() + block.solve() + self.last_block_time += 1 + yield TestInstance([[block, False]]) + + # Restart all + stop_nodes(self.nodes) + wait_bitcoinds() + shutil.rmtree(self.options.tmpdir) + self.setup_chain() + self.setup_network() + self.test.clear_all_connections() + self.test.add_all_connections(self.nodes) + NetworkThread().start() # Start up network handling in another thread + + + + def get_tests(self): + for test in itertools.chain( + self.test_BIP('csv', 536870913, self.sequence_lock_invalidate, self.donothing), + self.test_BIP('csv', 536870913, self.mtp_invalidate, self.donothing), + self.test_BIP('csv', 536870913, self.donothing, self.csv_invalidate) + ): + yield test + + def donothing(self, tx): + return + + def csv_invalidate(self, tx): + '''Modify the signature in vin 0 of the tx to fail CSV + Prepends -1 CSV DROP in the scriptSig itself. + ''' + tx.vin[0].scriptSig = CScript([OP_1NEGATE, OP_NOP3, OP_DROP] + + list(CScript(tx.vin[0].scriptSig))) + + def sequence_lock_invalidate(self, tx): + '''Modify the nSequence to make it fails once sequence lock rule is activated (high timespan) + ''' + tx.vin[0].nSequence = 0x00FFFFFF + tx.nLockTime = 0 + + def mtp_invalidate(self, tx): + '''Modify the nLockTime to make it fails once MTP rule is activated + ''' + # Disable Sequence lock, Activate nLockTime + tx.vin[0].nSequence = 0x90FFFFFF + tx.nLockTime = self.last_block_time + +if __name__ == '__main__': + BIP9SoftForksTest().main() \ No newline at end of file diff --git a/qa/rpc-tests/test_framework/comptool.py b/qa/rpc-tests/test_framework/comptool.py index badbc0a1f..544321705 100755 --- a/qa/rpc-tests/test_framework/comptool.py +++ b/qa/rpc-tests/test_framework/comptool.py @@ -193,6 +193,10 @@ class TestManager(object): # associated NodeConn test_node.add_connection(self.connections[-1]) + def clear_all_connections(self): + self.connections = [] + self.test_nodes = [] + def wait_for_disconnections(self): def disconnected(): return all(node.closed for node in self.test_nodes) From caf138122decac7d96b2f53c0c894277cb0f33ca Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Sat, 13 Feb 2016 15:42:24 +0000 Subject: [PATCH 30/45] Add bip68-sequence.py to extended rpc tests --- qa/pull-tester/rpc-tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index f7e98dbf6..37014cf76 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -113,6 +113,7 @@ testScriptsExt = [ 'bip9-softforks.py', 'bip65-cltv.py', 'bip65-cltv-p2p.py', + 'bip68-sequence.py', 'bipdersig-p2p.py', 'bipdersig.py', 'getblocktemplate_longpoll.py', From ba80ceef59bdfb7e0a42da4df81335698047fbce Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 30 Mar 2016 20:12:12 +0200 Subject: [PATCH 31/45] bump version to 0.12.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 8b1c375cc..6eb868114 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, 12) -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 386be8e7d..5d225b302 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.0 +PROJECT_NUMBER = 0.12.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 5dadbc964..35d3b26fb 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Bitcoin Core 0.12.0 +Bitcoin Core 0.12.1 ===================== Setup diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 171c4078d..ba39352e9 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin Core 0.12.0 +Bitcoin Core 0.12.1 ===================== Intro diff --git a/src/clientversion.h b/src/clientversion.h index eff27b0e9..ab79da9b3 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 12 -#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 c270b62cc20788bdc59cd648c971523bab7ec8fc Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Wed, 30 Mar 2016 19:38:02 +0100 Subject: [PATCH 32/45] Fix comments in tests --- qa/rpc-tests/bip68-112-113-p2p.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/rpc-tests/bip68-112-113-p2p.py b/qa/rpc-tests/bip68-112-113-p2p.py index c226f4dad..7d3c59be3 100755 --- a/qa/rpc-tests/bip68-112-113-p2p.py +++ b/qa/rpc-tests/bip68-112-113-p2p.py @@ -383,9 +383,9 @@ class BIP68_112_113Test(ComparisonTestFramework): for bip113tx in [bip113signed1, bip113signed2]: yield TestInstance([[self.create_test_block([bip113tx]), False]]) # 9,10 # BIP 113 tests should now pass if the locktime is < MTP - bip113tx_v1.nLockTime = self.last_block_time - 600 * 5 - 1 # = MTP of prior block (not <) but < time put on current block + bip113tx_v1.nLockTime = self.last_block_time - 600 * 5 - 1 # < MTP of prior block bip113signed1 = self.sign_transaction(self.nodes[0], bip113tx_v1) - bip113tx_v2.nLockTime = self.last_block_time - 600 * 5 - 1 # = MTP of prior block (not <) but < time put on current block + bip113tx_v2.nLockTime = self.last_block_time - 600 * 5 - 1 # < MTP of prior block bip113signed2 = self.sign_transaction(self.nodes[0], bip113tx_v2) for bip113tx in [bip113signed1, bip113signed2]: yield TestInstance([[self.create_test_block([bip113tx]), True]]) # 11,12 @@ -490,7 +490,7 @@ class BIP68_112_113Test(ComparisonTestFramework): self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash()) ## SEQUENCE_LOCKTIME_DISABLE_FLAG is unset in argument to OP_CSV for all remaining txs ## - # All txs with nSequence 11 should fail either due to earlier mismatch or failing the CSV check + # All txs with nSequence 9 should fail either due to earlier mismatch or failing the CSV check fail_txs = [] fail_txs.extend(all_rlt_txs(bip112txs_vary_nSequence_9_v2)) # 16/16 of vary_nSequence_9 for b25 in xrange(2): From 4d035bcc9aa3388dc7f37cf81451e55f0b6270ee Mon Sep 17 00:00:00 2001 From: accraze Date: Wed, 30 Mar 2016 07:29:56 -0700 Subject: [PATCH 33/45] [doc] added depends cross compile info Conflicts: doc/build-unix.md Github-Pull: #7747 Rebased-From: 3e55b3a00450279522900ca96e5cf79162169019 --- doc/build-unix.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/build-unix.md b/doc/build-unix.md index 31bbab7f0..74863c3ec 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -236,3 +236,31 @@ In this case there is no dependency on Berkeley DB 4.8. Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC call not `getwork`. + +Additional Configure Flags +-------------------------- +A list of additional configure flags can be displayed with: + + ./configure --help + +ARM Cross-compilation +------------------- +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: + + sudo apt-get install g++-arm-linux-gnueabihf + +To build executables for ARM: + + cd depends + make HOST=arm-linux-gnueabihf NO_QT=1 + cd .. + ./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++ + make + + +For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory. +>>>>>>> 3e55b3a... [doc] added depends cross compile info From 869262605f21973910640676858f4c4a3baa6da8 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Wed, 30 Mar 2016 20:00:30 +0100 Subject: [PATCH 34/45] Disable bad chain alerts Continuous false positives lead to them being ignored entirely so it's better to disable now until this can be fixed more thoroughly. --- src/init.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 69ef71b4f..a712ffcac 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1645,10 +1645,17 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) StartNode(threadGroup, scheduler); // Monitor the chain, and alert if we get blocks much quicker or slower than expected - int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing; - CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload, - boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing); - scheduler.scheduleEvery(f, nPowTargetSpacing); + // The "bad chain alert" scheduler has been disabled because the current system gives far + // too many false positives, such that users are starting to ignore them. + // This code will be disabled for 0.12.1 while a fix is deliberated in #7568 + // this was discussed in the IRC meeting on 2016-03-31. + // + // --- disabled --- + //int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing; + //CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload, + // boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing); + //scheduler.scheduleEvery(f, nPowTargetSpacing); + // --- end disabled --- // Generate coins in the background GenerateBitcoins(GetBoolArg("-gen", DEFAULT_GENERATE), GetArg("-genproclimit", DEFAULT_GENERATE_THREADS), chainparams); From e10c044c78f1f4de679936b18480f1b0e1352124 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Sun, 3 Apr 2016 17:48:38 +0100 Subject: [PATCH 35/45] [0.12] Update release notes --- doc/release-notes.md | 103 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 177bf333b..070be08d0 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -35,7 +35,108 @@ earlier. Notable changes =============== -The p2p alert system is off by default. To turn on, use `-alert` with startup configuration. +First version bits BIP9 softfork deployment +------------------------------------------- + +This release includes a soft fork deployment to enforce [BIP68][], +[BIP112][] and [BIP113][] using the [BIP9][] deployment mechanism. + +The deployment sets the block version number to 0x20000001 between +midnight 1st May 2016 and midnight 1st May 2017 to signal readiness for +deployment. The version number consists of 0x20000000 to indicate version +bits together with setting bit 0 to indicate support for this combined +deployment, shown as "csv" in the `getblockchaininfo` RPC call. + +For more information about the soft forking change, please see + + +This specific backport pull-request can be viewed at + + +[BIP9]: https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki +[BIP68]: https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki +[BIP112]: https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki + +BIP68 soft fork to enforce sequence locks for relative locktime +--------------------------------------------------------------- + +[BIP68][] introduces relative lock-time consensus-enforced semantics of +the sequence number field to enable a signed transaction input to remain +invalid for a defined period of time after confirmation of its corresponding +outpoint. + +For more information about the implementation, see + + +BIP112 soft fork to enforce OP_CHECKSEQUENCEVERIFY +-------------------------------------------------- + +[BIP112][] redefines the existing OP_NOP3 as OP_CHECKSEQUENCEVERIFY (CSV) +for a new opcode in the Bitcoin scripting system that in combination with +[BIP68][] allows execution pathways of a script to be restricted based +on the age of the output being spent. + +For more information about the implementation, see + + +BIP113 locktime enforcement soft fork +------------------------------------- + +Bitcoin Core 0.11.2 previously introduced mempool-only locktime +enforcement using GetMedianTimePast(). This release seeks to +consensus enforce the rule. + +Bitcoin transactions currently may specify a locktime indicating when +they may be added to a valid block. Current consensus rules require +that blocks have a block header time greater than the locktime specified +in any transaction in that block. + +Miners get to choose what time they use for their header time, with the +consensus rule being that no node will accept a block whose time is more +than two hours in the future. This creates a incentive for miners to +set their header times to future values in order to include locktimed +transactions which weren't supposed to be included for up to two more +hours. + +The consensus rules also specify that valid blocks may have a header +time greater than that of the median of the 11 previous blocks. This +GetMedianTimePast() time has a key feature we generally associate with +time: it can't go backwards. + +[BIP113][] specifies a soft fork enforced in this release that +weakens this perverse incentive for individual miners to use a future +time by requiring that valid blocks have a computed GetMedianTimePast() +greater than the locktime specified in any transaction in that block. + +Mempool inclusion rules currently require transactions to be valid for +immediate inclusion in a block in order to be accepted into the mempool. +This release begins applying the BIP113 rule to received transactions, +so transaction whose time is greater than the GetMedianTimePast() will +no longer be accepted into the mempool. + +**Implication for miners:** you will begin rejecting transactions that +would not be valid under BIP113, which will prevent you from producing +invalid blocks when BIP113 is enforced on the network. Any +transactions which are valid under the current rules but not yet valid +under the BIP113 rules will either be mined by other miners or delayed +until they are valid under BIP113. Note, however, that time-based +locktime transactions are more or less unseen on the network currently. + +**Implication for users:** GetMedianTimePast() always trails behind the +current time, so a transaction locktime set to the present time will be +rejected by nodes running this release until the median time moves +forward. To compensate, subtract one hour (3,600 seconds) from your +locktimes to allow those transactions to be included in mempools at +approximately the expected time. + +For more information about the implementation, see + + +Miscellaneous +------------- + +The p2p alert system is off by default. To turn on, use `-alert` with +startup configuration. 0.12.1 Change log ================= From 640666b22fdbc6f436fbf701629b04a2367f7317 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Sun, 3 Apr 2016 18:03:53 +0100 Subject: [PATCH 36/45] [qa] rpc-tests: Properly use integers, floats partial backport from #7778 using fa2cea1 --- qa/rpc-tests/bip68-sequence.py | 6 +++--- qa/rpc-tests/bip9-softforks.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py index bd61282fa..40c9eff88 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -62,7 +62,7 @@ class BIP68Test(BitcoinTestFramework): utxo = utxos[0] tx1 = CTransaction() - value = satoshi_round(utxo["amount"] - self.relayfee)*COIN + value = int(satoshi_round(utxo["amount"] - self.relayfee)*COIN) # Check that the disable flag disables relative locktime. # If sequence locks were used, this would require 1 block for the @@ -180,8 +180,8 @@ class BIP68Test(BitcoinTestFramework): tx.vin.append(CTxIn(COutPoint(int(utxos[j]["txid"], 16), utxos[j]["vout"]), nSequence=sequence_value)) value += utxos[j]["amount"]*COIN # Overestimate the size of the tx - signatures should be less than 120 bytes, and leave 50 for the output - tx_size = len(ToHex(tx))/2 + 120*num_inputs + 50 - tx.vout.append(CTxOut(value-self.relayfee*tx_size*COIN/1000, CScript([b'a']))) + tx_size = len(ToHex(tx))//2 + 120*num_inputs + 50 + tx.vout.append(CTxOut(int(value-self.relayfee*tx_size*COIN/1000), CScript([b'a']))) rawtx = self.nodes[0].signrawtransaction(ToHex(tx))["hex"] try: diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py index cbb1b7d4c..97c6f3f3a 100755 --- a/qa/rpc-tests/bip9-softforks.py +++ b/qa/rpc-tests/bip9-softforks.py @@ -91,7 +91,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): self.height = 3 # height of the next block to build self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0) self.nodeaddress = self.nodes[0].getnewaddress() - self.last_block_time = time.time() + self.last_block_time = int(time.time()) assert_equal(self.get_bip9_status(bipName)['status'], 'defined') From a784675a329d6206af125d997381221dd1e99d11 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 31 Mar 2016 14:50:10 +0200 Subject: [PATCH 37/45] build: Remove unnecessary executables from gitian release This removes the following executables from the binary gitian release: - test_bitcoin-qt[.exe] - bench_bitcoin[.exe] @jonasschnelli and me discussed this on IRC a few days ago - unlike the normal `bitcoin_tests` which is useful to see if it is safe to run bitcoin on a certain OS/environment combination, there is no good reason to include these. Better to leave them out to reduce the download size. Sizes from the 0.12 release: ``` 2.4M bitcoin-0.12.0/bin/bench_bitcoin.exe 22M bitcoin-0.12.0/bin/test_bitcoin-qt.exe ``` Github-Pull: #7776 Rebased-From: f063863d1fc964aec80d8a0acfde623543573823 --- configure.ac | 21 ++++++++++++--------- contrib/gitian-descriptors/gitian-linux.yml | 2 +- contrib/gitian-descriptors/gitian-osx.yml | 2 +- contrib/gitian-descriptors/gitian-win.yml | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 6eb868114..e2056ee75 100644 --- a/configure.ac +++ b/configure.ac @@ -94,6 +94,11 @@ AC_ARG_ENABLE(tests, [use_tests=$enableval], [use_tests=yes]) +AC_ARG_ENABLE(gui-tests, + AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]), + [use_gui_tests=$enableval], + [use_gui_tests=$use_tests]) + AC_ARG_ENABLE(bench, AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]), [use_bench=$enableval], @@ -832,8 +837,8 @@ else fi dnl these are only used when qt is enabled +BUILD_TEST_QT="" if test x$bitcoin_enable_qt != xno; then - BUILD_QT=qt dnl enable dbus support AC_MSG_CHECKING([whether to build GUI with support for D-Bus]) if test x$bitcoin_enable_qt_dbus != xno; then @@ -863,9 +868,9 @@ if test x$bitcoin_enable_qt != xno; then fi AC_MSG_CHECKING([whether to build test_bitcoin-qt]) - if test x$use_tests$bitcoin_enable_qt_test = xyesyes; then + if test x$use_gui_tests$bitcoin_enable_qt_test = xyesyes; then AC_MSG_RESULT([yes]) - BUILD_TEST_QT="test" + BUILD_TEST_QT="yes" else AC_MSG_RESULT([no]) fi @@ -876,9 +881,10 @@ AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"]) AC_MSG_CHECKING([whether to build test_bitcoin]) if test x$use_tests = xyes; then AC_MSG_RESULT([yes]) - BUILD_TEST="test" + BUILD_TEST="yes" else AC_MSG_RESULT([no]) + BUILD_TEST="" fi AC_MSG_CHECKING([whether to reduce exports]) @@ -896,9 +902,9 @@ AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin]) AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows]) AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes]) -AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests = xyes]) +AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes]) AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes]) -AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes]) +AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes]) AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes]) AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes]) AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes]) @@ -932,9 +938,6 @@ AC_SUBST(USE_QRCODE) AC_SUBST(BOOST_LIBS) AC_SUBST(TESTDEFS) AC_SUBST(LEVELDB_TARGET_FLAGS) -AC_SUBST(BUILD_TEST) -AC_SUBST(BUILD_QT) -AC_SUBST(BUILD_TEST_QT) AC_SUBST(MINIUPNPC_CPPFLAGS) AC_SUBST(MINIUPNPC_LIBS) AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py]) diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index ed1e63822..b761b237f 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -26,7 +26,7 @@ files: [] script: | WRAP_DIR=$HOME/wrapped HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu" - CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++" + CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests LDFLAGS=-static-libstdc++" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="date ar ranlib nm strip" diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 27dfe63ac..ef8af2e3a 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -30,7 +30,7 @@ files: script: | WRAP_DIR=$HOME/wrapped HOSTS="x86_64-apple-darwin11" - CONFIGFLAGS="--enable-reduce-exports GENISOIMAGE=$WRAP_DIR/genisoimage" + CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests GENISOIMAGE=$WRAP_DIR/genisoimage" FAKETIME_HOST_PROGS="" FAKETIME_PROGS="ar ranlib date dmg genisoimage" diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 38cdfe4e1..7c8258448 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -29,7 +29,7 @@ files: [] script: | WRAP_DIR=$HOME/wrapped HOSTS="x86_64-w64-mingw32 i686-w64-mingw32" - CONFIGFLAGS="--enable-reduce-exports" + CONFIGFLAGS="--enable-reduce-exports --disable-gui-tests" FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip" FAKETIME_PROGS="date makensis zip" From c2106543fe017d443c2e50daf3dd1d42e6ec35a2 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 5 Apr 2016 17:57:14 +0200 Subject: [PATCH 38/45] pre-rc1 translations update New languages: - `af` Afrikaans - `es_AR` Spanish (Argentina) - `es_CO` Spanish (Colombia) - `ro` Romanian - `ta` Tamil - `uz@Latn` Uzbek in Latin script --- src/Makefile.qt.include | 6 + src/qt/bitcoin_locale.qrc | 6 + src/qt/bitcoinstrings.cpp | 27 +- src/qt/locale/bitcoin_af.ts | 509 ++++++++++ src/qt/locale/bitcoin_ar.ts | 40 + src/qt/locale/bitcoin_cs.ts | 266 ++++- src/qt/locale/bitcoin_de.ts | 24 + src/qt/locale/bitcoin_en.ts | 229 +++-- src/qt/locale/bitcoin_eo.ts | 38 + src/qt/locale/bitcoin_es_AR.ts | 373 +++++++ src/qt/locale/bitcoin_es_CO.ts | 542 ++++++++++ src/qt/locale/bitcoin_fi.ts | 44 + src/qt/locale/bitcoin_fr_FR.ts | 1620 +++++++++++++++++++++++++++++- src/qt/locale/bitcoin_he.ts | 12 + src/qt/locale/bitcoin_hu.ts | 4 + src/qt/locale/bitcoin_id_ID.ts | 298 ++++-- src/qt/locale/bitcoin_it.ts | 2 +- src/qt/locale/bitcoin_ko_KR.ts | 42 +- src/qt/locale/bitcoin_pl.ts | 14 +- src/qt/locale/bitcoin_pt_PT.ts | 580 ++++++++++- src/qt/locale/bitcoin_ro.ts | 169 ++++ src/qt/locale/bitcoin_ro_RO.ts | 100 +- src/qt/locale/bitcoin_ru_RU.ts | 52 + src/qt/locale/bitcoin_sk.ts | 283 +++++- src/qt/locale/bitcoin_ta.ts | 1029 +++++++++++++++++++ src/qt/locale/bitcoin_tr.ts | 8 +- src/qt/locale/bitcoin_uz@Latn.ts | 169 ++++ src/qt/locale/bitcoin_zh_TW.ts | 120 +-- 28 files changed, 6320 insertions(+), 286 deletions(-) create mode 100644 src/qt/locale/bitcoin_af.ts create mode 100644 src/qt/locale/bitcoin_es_AR.ts create mode 100644 src/qt/locale/bitcoin_es_CO.ts create mode 100644 src/qt/locale/bitcoin_ro.ts create mode 100644 src/qt/locale/bitcoin_ta.ts create mode 100644 src/qt/locale/bitcoin_uz@Latn.ts diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index a390d96a9..9b7085be3 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -3,6 +3,7 @@ EXTRA_LIBRARIES += qt/libbitcoinqt.a # bitcoin qt core # QT_TS = \ + qt/locale/bitcoin_af.ts \ qt/locale/bitcoin_af_ZA.ts \ qt/locale/bitcoin_ar.ts \ qt/locale/bitcoin_be_BY.ts \ @@ -22,7 +23,9 @@ QT_TS = \ qt/locale/bitcoin_en_GB.ts \ qt/locale/bitcoin_en.ts \ qt/locale/bitcoin_eo.ts \ + qt/locale/bitcoin_es_AR.ts \ qt/locale/bitcoin_es_CL.ts \ + qt/locale/bitcoin_es_CO.ts \ qt/locale/bitcoin_es_DO.ts \ qt/locale/bitcoin_es_ES.ts \ qt/locale/bitcoin_es_MX.ts \ @@ -62,6 +65,7 @@ QT_TS = \ qt/locale/bitcoin_pt_BR.ts \ qt/locale/bitcoin_pt_PT.ts \ qt/locale/bitcoin_ro_RO.ts \ + qt/locale/bitcoin_ro.ts \ qt/locale/bitcoin_ru_RU.ts \ qt/locale/bitcoin_ru.ts \ qt/locale/bitcoin_sk.ts \ @@ -69,12 +73,14 @@ QT_TS = \ qt/locale/bitcoin_sq.ts \ qt/locale/bitcoin_sr.ts \ qt/locale/bitcoin_sv.ts \ + qt/locale/bitcoin_ta.ts \ qt/locale/bitcoin_th_TH.ts \ qt/locale/bitcoin_tr_TR.ts \ qt/locale/bitcoin_tr.ts \ qt/locale/bitcoin_uk.ts \ qt/locale/bitcoin_ur_PK.ts \ qt/locale/bitcoin_uz@Cyrl.ts \ + qt/locale/bitcoin_uz@Latn.ts \ qt/locale/bitcoin_vi.ts \ qt/locale/bitcoin_vi_VN.ts \ qt/locale/bitcoin_zh_CN.ts \ diff --git a/src/qt/bitcoin_locale.qrc b/src/qt/bitcoin_locale.qrc index a8a0253b0..4cb9a3ad4 100644 --- a/src/qt/bitcoin_locale.qrc +++ b/src/qt/bitcoin_locale.qrc @@ -1,5 +1,6 @@ + locale/bitcoin_af.qm locale/bitcoin_af_ZA.qm locale/bitcoin_ar.qm locale/bitcoin_be_BY.qm @@ -19,7 +20,9 @@ locale/bitcoin_en_GB.qm locale/bitcoin_en.qm locale/bitcoin_eo.qm + locale/bitcoin_es_AR.qm locale/bitcoin_es_CL.qm + locale/bitcoin_es_CO.qm locale/bitcoin_es_DO.qm locale/bitcoin_es_ES.qm locale/bitcoin_es_MX.qm @@ -59,6 +62,7 @@ locale/bitcoin_pt_BR.qm locale/bitcoin_pt_PT.qm locale/bitcoin_ro_RO.qm + locale/bitcoin_ro.qm locale/bitcoin_ru_RU.qm locale/bitcoin_ru.qm locale/bitcoin_sk.qm @@ -66,12 +70,14 @@ locale/bitcoin_sq.qm locale/bitcoin_sr.qm locale/bitcoin_sv.qm + locale/bitcoin_ta.qm locale/bitcoin_th_TH.qm locale/bitcoin_tr_TR.qm locale/bitcoin_tr.qm locale/bitcoin_uk.qm locale/bitcoin_ur_PK.qm locale/bitcoin_uz@Cyrl.qm + locale/bitcoin_uz@Latn.qm locale/bitcoin_vi.qm locale/bitcoin_vi_VN.qm locale/bitcoin_zh_CN.qm diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 6b5f24366..46a5d1aa1 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -13,12 +13,21 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "(1 = keep tx meta data e.g. account owner and payment request information, 2 " "= drop tx meta data)"), QT_TRANSLATE_NOOP("bitcoin-core", "" +"-fallbackfee is set very high! This is the transaction fee you may pay when " +"fee estimates are not available."), +QT_TRANSLATE_NOOP("bitcoin-core", "" "-maxtxfee is set very high! Fees this large could be paid on a single " "transaction."), QT_TRANSLATE_NOOP("bitcoin-core", "" "-paytxfee is set very high! This is the transaction fee you will pay if you " "send a transaction."), QT_TRANSLATE_NOOP("bitcoin-core", "" +"A fee rate (in %s/kB) that will be used when fee estimation has insufficient " +"data (default: %s)"), +QT_TRANSLATE_NOOP("bitcoin-core", "" +"Accept relayed transactions received from whitelisted peers even when not " +"relaying transactions (default: %d)"), +QT_TRANSLATE_NOOP("bitcoin-core", "" "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"), @@ -70,6 +79,9 @@ 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)"), +QT_TRANSLATE_NOOP("bitcoin-core", "" "How thorough the block verification of -checkblocks is (0-4, default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "" "If is not supplied or if = 1, output all debugging " @@ -152,6 +164,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "Unsupported argument -socks found. Setting SOCKS version isn't possible " "anymore, only SOCKS5 proxies are supported."), QT_TRANSLATE_NOOP("bitcoin-core", "" +"Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/" +"or -whitelistforcerelay."), +QT_TRANSLATE_NOOP("bitcoin-core", "" "Use UPnP to map the listening port (default: 1 when listening and no -proxy)"), QT_TRANSLATE_NOOP("bitcoin-core", "" "Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: " @@ -170,6 +185,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "Warning: The network does not appear to fully agree! Some miners appear to " "be experiencing issues."), QT_TRANSLATE_NOOP("bitcoin-core", "" +"Warning: Unknown block versions being mined! It's possible unknown rules are " +"in effect"), +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", "" @@ -196,7 +214,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Activating best chain..."), QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"), QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"), QT_TRANSLATE_NOOP("bitcoin-core", "Always query for peer addresses via DNS lookup (default: %u)"), -QT_TRANSLATE_NOOP("bitcoin-core", "Always relay transactions received from whitelisted peers (default: %d)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Append comment to the user agent string"), QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat on startup"), QT_TRANSLATE_NOOP("bitcoin-core", "Automatically create Tor hidden service (default: %d)"), QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"), @@ -219,6 +237,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish hash block in
"), QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish hash transaction in
"), QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish raw block in
"), QT_TRANSLATE_NOOP("bitcoin-core", "Enable publish raw transaction in
"), +QT_TRANSLATE_NOOP("bitcoin-core", "Enable transaction replacement in the memory pool (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing block database"), QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing wallet database environment %s!"), QT_TRANSLATE_NOOP("bitcoin-core", "Error loading block database"), @@ -243,6 +262,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. Bitcoin C QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address: '%s'"), +QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -fallbackfee=: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -maxtxfee=: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -minrelaytxfee=: '%s'"), QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -mintxfee=: '%s'"), @@ -256,10 +276,12 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on (default: %u QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."), QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."), QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."), +QT_TRANSLATE_NOOP("bitcoin-core", "Location of the auth cookie (default: data dir)"), QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most connections to peers (default: %u)"), 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."), @@ -267,6 +289,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network (ipv4, QT_TRANSLATE_NOOP("bitcoin-core", "Options:"), QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"), QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: %u)"), +QT_TRANSLATE_NOOP("bitcoin-core", "Print version and exit"), QT_TRANSLATE_NOOP("bitcoin-core", "Prune cannot be configured with a negative value."), QT_TRANSLATE_NOOP("bitcoin-core", "Prune mode is incompatible with -txindex."), QT_TRANSLATE_NOOP("bitcoin-core", "Pruning blockstore..."), @@ -322,7 +345,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside data directory %s") QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin Core to complete"), QT_TRANSLATE_NOOP("bitcoin-core", "Wallet options:"), QT_TRANSLATE_NOOP("bitcoin-core", "Warning"), -QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete; upgrade required!"), +QT_TRANSLATE_NOOP("bitcoin-core", "Warning: unknown new rules activated (versionbit %i)"), QT_TRANSLATE_NOOP("bitcoin-core", "Whether to operate in a blocks only mode (default: %u)"), QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"), QT_TRANSLATE_NOOP("bitcoin-core", "Zapping all transactions from wallet..."), diff --git a/src/qt/locale/bitcoin_af.ts b/src/qt/locale/bitcoin_af.ts new file mode 100644 index 000000000..492c7bccd --- /dev/null +++ b/src/qt/locale/bitcoin_af.ts @@ -0,0 +1,509 @@ + + + AddressBookPage + + Right-click to edit address or label + Regs-kliek om die adres of etiket te verander + + + Create a new address + Skep 'n nuwe adres + + + &New + &Nuut + + + Copy the currently selected address to the system clipboard + Dupliseer die geselekteerde adres na die sisteem se geheuebord + + + &Copy + &Dupliseer + + + &Copy Address + &Dupliseer Adres + + + Delete the currently selected address from the list + Verwyder die adres wat u gekies het van die lys + + + Export the data in the current tab to a file + Voer die inligting op hierdie bladsy uit na 'n leer + + + &Export + &Voer uit + + + &Delete + &Vee uit + + + Choose the address to send coins to + Kies die adres waarheen u munte wil stuur + + + Choose the address to receive coins with + Kies die adres wat die munte moet ontvang + + + Sending addresses + Stuurders adresse + + + Receiving addresses + Ontvanger adresse + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Hierdie is die adresse vanwaar u Bitcoin betalings stuur. U moet altyd die bedrag en die adres van die ontvanger nagaan voordat u enige munte stuur. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Hierdie is die adresse waar u Bitcoins sal ontvang. Ons beveel aan dat u 'n nuwe adres kies vir elke transaksie + + + &Edit + &Verander + + + Export Address List + Voer adreslys uit + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + Exporting Failed + Uitvoer was onsuksesvol + + + There was an error trying to save the address list to %1. Please try again. + Die adreslys kon nie in %1 gestoor word nie. Probeer asseblief weer. + + + + AddressTableModel + + Address + Adres + + + (no label) + (geen etiket) + + + + AskPassphraseDialog + + Passphrase Dialog + Wagwoord Dialoog + + + Enter passphrase + Tik u wagwoord in + + + New passphrase + Nuwe wagwoord + + + Repeat new passphrase + Herhaal nuwe wagwoord + + + Encrypt wallet + Kodifiseer beursie + + + This operation needs your wallet passphrase to unlock the wallet. + U het u beursie se wagwoord nodig om toegang tot u beursie te verkry. + + + Unlock wallet + Sluit beursie oop + + + This operation needs your wallet passphrase to decrypt the wallet. + U het u beursie se wagwoord nodig om u beursie se kode te ontsyfer. + + + Decrypt wallet + Ontsleutel beursie + + + Change passphrase + Verander wagwoord + + + Confirm wallet encryption + Bevestig dat die beursie gekodifiseer is + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Waarskuwing: Indien u die beursie kodifiseer en u vergeet u wagwoord <b>VERLOOR U AL U BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + Is u seker dat u die beursie wil kodifiseer? + + + Bitcoin Core 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. + Bitcoin Kern gaan nou toemaak om die kodifikasie af te handel. Onthou dat die kodifikasie van u beursie nie altyd u munte kan beskerm teen diefstal deur kwaadwillige sagteware op u rekenaar nie. + + + 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. + BELANGRIK: Alle vorige kopieë en rugsteun-weergawes wat u tevore van die gemaak het, moet vervang word met die jongste weergawe van u nuutste gekodifiseerde beursie. Alle vorige weergawes en rugsteun-kopieë van u beursie sal nutteloos raak die oomblik wat u die nuut-gekodifiseerde beursie begin gebruik. + + + Warning: The Caps Lock key is on! + WAARSKUWING: Outomatiese Kapitalisering is aktief op u sleutelbord! + + + Wallet encrypted + Beursie gekodifiseer + + + 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>. + Tik die nuwe wagwoord vir u beursie.<br/>Gerbuik asseblief 'n wagwoord met <b>tien of meer lukrake karakters</b>, of <b>agt of meer woorde</b>. + + + Enter the old passphrase and new passphrase to the wallet. + Tik die ou en die nuwe wagwoorde vir die beursie. + + + Wallet encryption failed + Kodifikasie was onsuksesvol + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Weens 'n interne fout het kodifikasie het nie geslaag nie. U beursie is nie gekodifiseer nie + + + The supplied passphrases do not match. + Die wagwoorde stem nie ooreen nie. + + + Wallet unlock failed + Die beursie is nie oopgesluit nie + + + The passphrase entered for the wallet decryption was incorrect. + U het die verkeerde wagwoord ingetik. + + + + BanTableModel + + Banned Until + Verban tot + + + + BitcoinGUI + + Synchronizing with network... + Netwerk-sinkronisasie... + + + &Overview + &Oorsig + + + Node + Node + + + Show general overview of wallet + Vertoon 'n algemene oorsig van die beursie + + + &Transactions + &Transaksies + + + Quit application + Stop en verlaat die applikasie + + + &Options... + &Opsies + + + &Encrypt Wallet... + &Kodifiseer Beursie + + + &Backup Wallet... + &Rugsteun-kopie van Beursie + + + &Change Passphrase... + &Verander Wagwoord + + + &Sending addresses... + &Versending adresse... + + + &Receiving addresses... + &Ontvanger adresse + + + Open &URI... + Oop & URI... + + + Bitcoin Core client + Bitcoin Kern klient + + + Importing blocks from disk... + Besig om blokke vanaf die hardeskyf in te voer... + + + Reindexing blocks on disk... + Besig met herindeksering van blokke op hardeskyf... + + + Send coins to a Bitcoin address + Stuur munte na 'n Bitcoin adres + + + Backup wallet to another location + Maak 'n rugsteun-kopié van beursie na 'n ander stoorplek + + + Change the passphrase used for wallet encryption + Verander die wagwoord wat ek vir kodifikasie van my beursie gebruik + + + Bitcoin + Bitcoin + + + Wallet + Beursie + + + &Send + &Stuur + + + &Receive + &Ontvang + + + Show information about Bitcoin Core + Vertoon inligting oor Bitcoin Kern + + + Show or hide the main Window + Wys of versteek die hoofbladsy + + + Encrypt the private keys that belong to your wallet + Kodifiseer die private sleutes wat aan jou beursie gekoppel is. + + + Sign messages with your Bitcoin addresses to prove you own them + Onderteken boodskappe met u Bitcoin adresse om u eienaarskap te bewys + + + Verify messages to ensure they were signed with specified Bitcoin addresses + Verifieër boodskappe om seker te maak dat dit met die gespesifiseerde Bitcoin adresse + + + &Help + &Help + + + Bitcoin Core + Bitcoin Kern + + + Request payments (generates QR codes and bitcoin: URIs) + Versoek betalings (genereer QR-kodes en bitcoin: URI's) + + + &About Bitcoin Core + &Omtrent Bitcoin Kern + + + Modify configuration options for Bitcoin Core + Verander konfigurasie-opsies vir Bitcoin Kern + + + Show the list of used sending addresses and labels + Vertoon die lys van gebruikte versendingsadresse en etikette + + + Show the list of used receiving addresses and labels + Vertoon die lys van gebruikte ontvangers-adresse en etikette + + + Open a bitcoin: URI or payment request + Skep 'n bitcoin: URI of betalingsversoek + + + + ClientModel + + + CoinControlDialog + + (no label) + (geen etiket) + + + + EditAddressDialog + + + FreespaceChecker + + + HelpMessageDialog + + Bitcoin Core + Bitcoin Kern + + + Reset all settings changes made over the GUI + Herstel al my veranderinge aan die stellings terug na die verstek-opsies + + + + Intro + + Bitcoin Core + Bitcoin Kern + + + + OpenURIDialog + + + OptionsDialog + + + OverviewPage + + + PaymentServer + + + PeerTableModel + + + QObject + + + QRImageWidget + + + RPCConsole + + + ReceiveCoinsDialog + + + ReceiveRequestDialog + + Address + Adres + + + + RecentRequestsTableModel + + (no label) + (geen etiket) + + + + SendCoinsDialog + + (no label) + (geen etiket) + + + + SendCoinsEntry + + + ShutdownWindow + + + SignVerifyMessageDialog + + + SplashScreen + + Bitcoin Core + Bitcoin Kern + + + + TrafficGraphWidget + + + TransactionDesc + + + TransactionDescDialog + + + TransactionTableModel + + + TransactionView + + Exporting Failed + Uitvoer was onsuksesvol + + + Comma separated file (*.csv) + Comma separated file (*.csv) + + + Address + Adres + + + + UnitDisplayStatusBarControl + + + WalletFrame + + + WalletModel + + + WalletView + + &Export + &Voer uit + + + Export the data in the current tab to a file + Voer die inligting op hierdie bladsy uit na 'n leer + + + + bitcoin-core + + WARNING: check your network connection, %d blocks received in the last %d hours (%d expected) + WAARSKUWING: toets die status van u netwerk, %d blokke ontvang in die laaste %d ure (%d verwag) + + + 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) + + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts index 88ce05bbd..6a969b876 100644 --- a/src/qt/locale/bitcoin_ar.ts +++ b/src/qt/locale/bitcoin_ar.ts @@ -325,6 +325,10 @@ &Debug window &نافذة المعالجة + + Open debugging and diagnostic console + إفتح وحدة التصحيح و التشخيص + &Verify message... &التحقق من الرسالة... @@ -361,6 +365,14 @@ Encrypt the private keys that belong to your wallet تشفير المفتاح الخاص بمحفظتك + + Sign messages with your Bitcoin addresses to prove you own them + وقَع الرسائل بواسطة ال: Bitcoin الخاص بك لإثبات امتلاكك لهم + + + Verify messages to ensure they were signed with specified Bitcoin addresses + تحقق من الرسائل للتأكد من أنَها وُقعت برسائل Bitcoin محدَدة + &File &ملف @@ -385,6 +397,22 @@ &About Bitcoin Core حول bitcoin core + + Modify configuration options for Bitcoin Core + تغيير خيارات الإعداد لأساس Bitcoin + + + Show the list of used sending addresses and labels + عرض قائمة عناوين الإرسال المستخدمة والملصقات + + + Show the list of used receiving addresses and labels + عرض قائمة عناوين الإستقبال المستخدمة والملصقات + + + Open a bitcoin: URI or payment request + فتح URI : Bitcoin أو طلب دفع + %1 and %2 %1 و %2 @@ -1793,14 +1821,26 @@ Invalid -proxy address: '%s' عنوان البروكسي غير صحيح : '%s' + + Make the wallet broadcast transactions + إنتاج معاملات بث المحفظة + Insufficient funds اموال غير كافية + + Loading block index... + تحميل مؤشر الكتلة + Loading wallet... تحميل المحفظه + + Cannot downgrade wallet + لا يمكن تخفيض قيمة المحفظة + Cannot write default address لايمكن كتابة العنوان الافتراضي diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index ef1903edd..b9069fc3c 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -343,7 +343,7 @@ &Send - &Pošli + P&ošli &Receive @@ -383,7 +383,7 @@ &Help - Ná&pověda + Nápověd&a Tabs toolbar @@ -874,6 +874,30 @@ command-line options možnosti příkazové řádky + + UI Options: + Možnosti UI: + + + Choose data directory on startup (default: %u) + Zvolit při startu adresář pro data (výchozí: %u) + + + Set language, for example "de_DE" (default: system locale) + Nastavit jazyk, například „de_DE“ (výchozí: systémové nastavení) + + + Start minimized + Nastartovat minimalizovaně + + + Set SSL root certificates for payment request (default: -system-) + Nastavit kořenové SSL certifikáty pro platební požadavky (výchozí: -system-) + + + Show splash screen on startup (default: %u) + Zobrazit startovací obrazovku (výchozí: %u) + Intro @@ -1071,6 +1095,30 @@ Port of the proxy (e.g. 9050) Port proxy (např. 9050) + + Used for reaching peers via: + 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. + Ukazuje, jestli se zadaná výchozí SOCKS5 proxy používá k připojování k peerům v rámci tohoto typu sítě. + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services. + Připojí se do Bitcoinové sítě přes SOCKS5 proxy vyhrazenou pro skryté služby v Tor síti. + Use separate SOCKS5 proxy to reach peers via Tor hidden services: Použít samostatnou SOCKS5 proxy ke spojení s protějšky přes skryté služby v Toru: @@ -1549,6 +1597,34 @@ Clear console Vyčistit konzoli + + &Disconnect Node + &Odpojit uzel + + + Ban Node for + Uvalit na uzel klatbu na + + + 1 &hour + 1 &hodinu + + + 1 &day + 1 &den + + + 1 &week + 1 &týden + + + 1 &year + 1 &rok + + + &Unban Node + &Zbavit uzel klatby + Welcome to the Bitcoin Core RPC console. Vítej v RPC konzoli Bitcoin Core. @@ -1577,6 +1653,10 @@ %1 GB %1 GB + + (node id: %1) + (id uzlu: %1) + via %1 via %1 @@ -1931,7 +2011,7 @@ S&end - P&ošli + Pošl&i Confirm send coins @@ -1969,6 +2049,10 @@ Copy change Kopíruj drobné + + Total Amount %1 + Celková částka %1 + or nebo @@ -2001,6 +2085,10 @@ 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ů. @@ -2090,7 +2178,7 @@ S&ubtract fee from amount - &Odečíst poplatek od částky + Od&ečíst poplatek od částky Message: @@ -2636,6 +2724,10 @@ Copy transaction ID Kopíruj ID transakce + + Copy raw transaction + Kopíruj surovou transakci + Edit label Uprav označení @@ -2783,9 +2875,45 @@ Accept command line and JSON-RPC commands Akceptovat příkazy z příkazové řádky a přes JSON-RPC + + If <category> is not supplied or if <category> = 1, output all debugging information. + Pokud není <category> zadána nebo je <category> = 1, bude tisknout veškeré ladicí informace. + + + Prune configured below the minimum of %d MiB. Please use a higher number. + Prořezávání je nastaveno pod minimum %d MiB. Použij, prosím, nějaké vyšší číslo. + + + Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node) + Prořezávání: poslední synchronizace peněženky proběhla před už prořezanými daty. Je třeba provést -reindex (tedy v případě prořezávacího režimu stáhnout znovu celý řetězec bloků) + + + 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) + Omezit nároky na úložný prostor prořezáváním (mazáním) starých bloků. Tento režim není slučitelný s -txindex ani -rescan. Upozornění: opětovná změna tohoto nastavení bude vyžadovat nové stažení celého řetězce bloků. (výchozí: 0 = bloky neprořezávat, >%u = cílová velikost souborů s bloky, v MiB) + + + Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. + V prořezávacím režimu není možné přeskenovávat řetězec bloků. Musíš provést -reindex, což znovu stáhne celý řetězec bloků. + + + Error: A fatal internal error occurred, see debug.log for details + Chyba: Přihodila se závažná vnitřní chyba, podrobnosti viz v debug.log + + + Fee (in %s/kB) to add to transactions you send (default: %s) + Poplatek (v %s/kB), který se přidá ke každé odeslané transakci (výchozí: %s) + + + Pruning blockstore... + Prořezávám úložiště bloků... + Run in the background as a daemon and accept commands - Běžet na pozadí jako démon a akceptovat příkazy + Běžet na pozadí jako démon a přijímat příkazy + + + Unable to start HTTP server. See debug log for details. + Nemohu spustit HTTP server. Detaily viz v debug.log. Accept connections from outside (default: 1 if no -proxy or -connect) @@ -2811,6 +2939,10 @@ 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) + + 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áze bloků obsahuje blok, který vypadá jako z budoucnosti, což může být kvůli špatně nastavenému datu a času na tvém počítači. Nech databázi bloků přestavět pouze v případě, že si jsi jistý, že máš na počítači správný datum a čas + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications Tohle je testovací verze – používej ji jen na vlastní riziko, ale rozhodně ji nepoužívej k těžbě nebo pro obchodní aplikace @@ -2819,6 +2951,10 @@ Unable to bind to %s on this computer. Bitcoin Core is probably already running. Nedaří se mi připojit na %s na tomhle počítači. Bitcoin Core už pravděpodobně jednou běží. + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) + Použít UPnP k namapování naslouchacího portu (výchozí: 1, pokud naslouchá a nepoužívá -proxy) + WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected) UPOZORNĚNÍ: vygenerováno nezvykle mnoho bloků – přijato %d bloků jen za posledních %d hodin (očekáváno %d) @@ -2837,11 +2973,15 @@ Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup. - Upozornění: soubor wallet.dat je poškozený, data jsou však zachráněna! Původní soubor wallet.dat je uložený jako wallet.{timestamp}.bak v %s. Pokud je stav tvého účtu nebo transakce nesprávné, zřejmě bys měl obnovit zálohu. + Upozornění: soubor wallet.dat je poškozený, data jsou však zachráněna! Původní soubor wallet.dat je uložený jako wallet.{timestamp}.bak v %s. Pokud jsou stav tvého účtu nebo transakce nesprávné, zřejmě bys měl obnovit zálohu. Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. - Umístit na bílou listinu protějšky připojující se z dané podsítě či IP adresy. Lze zadat i vícekrát. + Vždy vítat protějšky připojující se z dané podsítě či IP adresy. Lze zadat i vícekrát. + + + -maxmempool must be at least %d MB + -maxmempool musí být alespoň %d MB <category> can be: @@ -2911,6 +3051,10 @@ Invalid -onion address: '%s' Neplatná -onion adresa: '%s' + + Keep the transaction memory pool below <n> megabytes (default: %u) + Udržovat zasobník transakcí menší než <n> megabajtů (výchozí: %u) + Not enough file descriptors available. Je nedostatek deskriptorů souborů. @@ -2939,10 +3083,26 @@ Specify wallet file (within data directory) Udej název souboru s peněženkou (v rámci datového adresáře) + + Unsupported argument -benchmark ignored, use -debug=bench. + Nepodporovaný argument -benchmark se ignoruje, použij -debug=bench. + + + Unsupported argument -debugnet ignored, use -debug=net. + Nepodporovaný argument -debugnet se ignoruje, použij -debug=net. + + + Unsupported argument -tor found, use -onion. + Argument -tor již není podporovaný, použij -onion. + Use UPnP to map the listening port (default: %u) Použít UPnP k namapování naslouchacího portu (výchozí: %u) + + User Agent comment (%s) contains unsafe characters. + Komentář u typu klienta (%s) obsahuje riskantní znaky. + Verifying blocks... Ověřuji bloky... @@ -2973,7 +3133,7 @@ Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 - Obsadit zadanou adresu a protějšky, které se na ní připojí, umístit na bílou listinu. Pro zápis IPv6 adresy použij notaci [adresa]:port + Obsadit zadanou adresu a vždy vítat protějšky, které se na ni připojí. Pro zápis IPv6 adresy použij notaci [adresa]:port 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) @@ -2999,6 +3159,10 @@ Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) Spustit příkaz, když přijde relevantní upozornění nebo když dojde k opravdu dlouhému rozštěpení řetezce bloků (%s se v příkazu nahradí zprávou) + + Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s) + 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) + 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) @@ -3037,7 +3201,7 @@ 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 - Na protějšky na bílé listině se nevztahuje DoS klatba a jejich transakce jsou vždy přeposílány, i když už třeba jsou v mempoolu, což je užitečné např. pro bránu + Na vždy vítané protějšky se nevztahuje DoS klatba a jejich transakce jsou vždy přeposílány, i když už třeba jsou v transakčním zásobníku, což je užitečné např. pro bránu You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain @@ -3055,6 +3219,14 @@ Activating best chain... Aktivuji nejlepší řetězec... + + Attempt to recover private keys from a corrupt wallet.dat on startup + Pokusit se při startu zachránit soukromé klíče z poškozeného souboru wallet.dat + + + Automatically create Tor hidden service (default: %d) + Automaticky v Toru vytvářet skryté služby (výchozí: %d) + Cannot resolve -whitebind address: '%s' Nemohu přeložit -whitebind adresu: '%s' @@ -3075,6 +3247,10 @@ Error reading from database, shutting down. Chyba při čtení z databáze, ukončuji se. + + Imports blocks from external blk000??.dat file on startup + Importovat při startu bloky z externího souboru blk000??.dat + Information Informace @@ -3127,6 +3303,14 @@ Receive and display P2P network alerts (default: %u) Přijímat a zobrazovat poplachy z P2P sítě (výchozí: %u) + + Reducing -maxconnections from %d to %d, because of system limitations. + Omezuji -maxconnections z %d na %d kvůli systémovým omezením. + + + Rescan the block chain for missing wallet transactions on startup + Přeskenovat při startu řetězec bloků na chybějící transakce tvé pěněženky + Send trace/debug info to console instead of debug.log file Posílat stopovací/ladicí informace do konzole místo do souboru debug.log @@ -3155,6 +3339,14 @@ This is experimental software. Tohle je experimentální program. + + Tor control port password (default: empty) + Heslo ovládacího portu Toru (výchozí: prázdné) + + + Tor control port to use if onion listening enabled (default: %s) + Ovládací port Toru, je-li zapnuté onion naslouchání (výchozí: %s) + Transaction amount too small Částka v transakci je příliš malá @@ -3175,6 +3367,10 @@ Unable to bind to %s on this computer (bind returned error %s) Nedaří se mi připojit na %s na tomhle počítači (operace bind vrátila chybu %s) + + Upgrade wallet to latest format on startup + Převést při startu peněženku na nejnovější formát + Username for JSON-RPC connections Uživatelské jméno pro JSON-RPC spojení @@ -3187,10 +3383,18 @@ Warning Upozornění + + Whether to operate in a blocks only mode (default: %u) + Zda fungovat v čistě blokovém režimu (výchozí: %u) + Zapping all transactions from wallet... Vymazat všechny transakce z peněženky... + + ZeroMQ notification options: + Možnosti ZeroMQ oznámení: + wallet.dat corrupt, salvage failed Soubor wallet.dat je poškozen, jeho záchrana se nezdařila @@ -3223,6 +3427,26 @@ (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) (1 = ukládat transakční metadata, např. majitele účtu a informace o platebním požadavku, 2 = mazat transakční metadata) + + -maxtxfee is set very high! Fees this large could be paid on a single transaction. + -maxtxfee je nastaveno velmi vysoko! Takto vysoký poplatek může být zaplacen v jednotlivé transakci. + + + -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + -paytxfee je nastaveno velmi vysoko! Toto je transakční poplatek, který zaplatíš za každou poslanou transakci. + + + Do not keep transactions in the mempool longer than <n> hours (default: %u) + Nedržet transakce v zásobníku déle než <n> hodin (výchozí: %u) + + + Error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Nastala chyba při čtení souboru wallet.dat! Všechny klíče se přečetly správně, ale data o transakcích nebo záznamy v adresáři mohou chybět či být nesprávné. + + + Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s) + Poplatky (v %s/kB) menší než tato hodnota jsou považovány za nulové pro účely vytváření transakcí (výchozí: %s) + How thorough the block verification of -checkblocks is (0-4, default: %u) Jak moc důkladná má být verifikace bloků -checkblocks (0-4, výchozí: %u) @@ -3239,10 +3463,30 @@ Output debugging information (default: %u, supplying <category> is optional) Tisknout ladicí informace (výchozí: %u, zadání <category> je volitelné) + + Support filtering of blocks and transaction with bloom filters (default: %u) + Umožnit filtrování bloků a transakcí pomocí Bloomova filtru (výchozí: %u) + + + Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments. + Celková délka síťového identifikačního řetězce (%i) překročila svůj horní limit (%i). Omez počet nebo velikost voleb uacomment. + + + Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d) + Pokusit se udržet odchozí provoz pod stanovenou hodnotou (v MiB za 24 hodin), 0 = bez omezení (výchozí: %d) + + + Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. + Byl použit nepodporovaný argument -socks. Nastavení verze SOCKS už není možné, podporovány jsou pouze SOCKS5 proxy. + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) Použít samostatnou SOCKS5 proxy ke spojení s protějšky přes skryté služby v Toru (výchozí: %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ž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 + (default: %s) (výchozí: %s) @@ -3327,10 +3571,6 @@ Specify connection timeout in milliseconds (minimum: 1, default: %d) Zadej časový limit spojení v milivteřinách (minimum: 1, výchozí: %d) - - Specify pid file (default: %s) - PID soubor (výchozí: %s) - Spend unconfirmed change when sending transactions (default: %u) Utrácet i ještě nepotvrzené drobné při posílání transakcí (výchozí: %u) diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 7c8c4c2d6..d810ed12c 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -2991,6 +2991,10 @@ Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (%u bis %d, 0 = automatisch, <0 = so viele Kerne frei lassen, Standard: %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 + Die Block-Datenbank enthält einen Block, der in der Zukunft auftaucht. Dies kann daran liegen, dass die Systemzeit Ihres Computers falsch eingestellt ist. Stellen Sie die Block-Datenbank nur wieder her, wenn Sie sich sicher sind, dass Ihre Systemzeit korrekt eingestellt ist. + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen! @@ -3115,6 +3119,10 @@ Invalid -onion address: '%s' Ungültige "-onion"-Adresse: '%s' + + Keep the transaction memory pool below <n> megabytes (default: %u) + Halten Sie den Transaktionsspeicherpool unter <n> Megabytes (Voreinstellung: %u) + Not enough file descriptors available. Nicht genügend Datei-Deskriptoren verfügbar. @@ -3279,6 +3287,10 @@ Activating best chain... Aktiviere beste Blockkette... + + Always relay transactions received from whitelisted peers (default: %d) + Geben Sie immer die Transaktionen, die Sie von freigegebenen Peers erhalten haben, weiter (Voreinstellung: %d) + Attempt to recover private keys from a corrupt wallet.dat on startup Versuchen, private Schlüssel beim Starten aus einer beschädigten wallet.dat wiederherzustellen @@ -3363,6 +3375,10 @@ Receive and display P2P network alerts (default: %u) P2P-Netzwerk-Alarme empfangen und anzeigen (Standard: %u) + + Reducing -maxconnections from %d to %d, because of system limitations. + Reduziere -maxconnections von %d zu %d, aufgrund von Systemlimitierungen. + Rescan the block chain for missing wallet transactions on startup Blockkette beim Starten erneut nach fehlenden Wallet-Transaktionen durchsuchen @@ -3519,6 +3535,10 @@ Output debugging information (default: %u, supplying <category> is optional) Debugginginformationen ausgeben (Standard: %u, <category> anzugeben ist optional) + + Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments. + Gesamtlänge des Netzwerkversionstrings (%i) erreicht die maximale Länge (%i). Reduzieren Sie die Nummer oder die Größe von uacomments. + Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d) Versucht ausgehenden Datenverkehr unter dem gegebenen Wert zu halten (in MiB pro 24h), 0 = kein Limit (default: %d) @@ -3531,6 +3551,10 @@ Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: %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 + Benutzername und gehashtes Passwort für JSON-RPC Verbindungen. Das Feld <userpw> kommt im Format: <USERNAME>:<SALT>$<HASH>. Ein kanonisches Pythonskript ist in share/rpcuser inbegriffen. Diese Option kann mehrere Male spezifiziert werden + (default: %s) (Standard: %s) diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index e709f8515..c4daef4b9 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -1058,7 +1058,7 @@ FreespaceChecker - + A new data directory will be created. A new data directory will be created. @@ -1190,7 +1190,7 @@ Use a custom data directory: - + Bitcoin Core Bitcoin Core @@ -1781,12 +1781,12 @@ QObject - + Amount Amount - + Enter a Bitcoin address (e.g. %1) @@ -1807,7 +1807,7 @@ - + %1 s @@ -1862,15 +1862,14 @@ - - - + + @@ -1892,7 +1891,7 @@ N/A - + Client version Client version @@ -1913,11 +1912,6 @@ - Using OpenSSL version - Using OpenSSL version - - - Using BerkeleyDB version @@ -1927,12 +1921,12 @@ Startup time - + Network Network - + Name @@ -1962,7 +1956,7 @@ - + Memory usage @@ -1995,8 +1989,8 @@ - - + + Select a peer to view detailed information. @@ -2031,8 +2025,8 @@ - - + + User Agent @@ -2082,12 +2076,12 @@ - + Last block time Last block time - + &Open &Open @@ -2137,7 +2131,7 @@ Clear console - + &Disconnect Node @@ -2175,7 +2169,7 @@ - + Welcome to the Bitcoin Core RPC console. @@ -2763,7 +2757,7 @@ - + Estimated to begin confirmation within %n block(s). Estimated to begin confirmation within %n block. @@ -2771,7 +2765,7 @@ - + The recipient address is not valid. Please recheck. @@ -2781,7 +2775,7 @@ - + Warning: Invalid Bitcoin address @@ -2796,7 +2790,7 @@ - + Copy dust @@ -3755,32 +3749,32 @@ bitcoin-core - + Options: Options: - + Specify data directory 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. @@ -3815,7 +3809,7 @@ - + Error: A fatal internal error occurred, see debug.log for details @@ -3825,7 +3819,7 @@ - + Pruning blockstore... @@ -3840,12 +3834,27 @@ - + Accept connections from outside (default: 1 if no -proxy or -connect) Accept connections from outside (default: 1 if no -proxy or -connect) - + + -fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available. + + + + + A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s) + + + + + 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 Bind to given address and always listen on it. Use [host]:port notation for IPv6 @@ -3865,7 +3874,12 @@ 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) + + + + Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d) @@ -3886,6 +3900,11 @@ + Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay. + + + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) @@ -3904,6 +3923,11 @@ Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. + + + Warning: Unknown block versions being mined! It's possible unknown rules are in effect + + Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade. @@ -3930,7 +3954,12 @@ - + + Append comment to the user agent string + + + + Block creation options: Block creation options: @@ -3984,6 +4013,11 @@ Enable publish raw transaction in <address> + + + Enable transaction replacement in the memory pool (default: %u) + + Error initializing block database @@ -4030,12 +4064,27 @@ - + + Invalid amount for -fallbackfee=<amount>: '%s' + + + + Keep the transaction memory pool below <n> megabytes (default: %u) - + + Location of the auth cookie (default: data dir) + + + + + Minimum bytes per sigop in transactions we relay and mine (default: %u) + + + + Not enough file descriptors available. Not enough file descriptors available. @@ -4046,6 +4095,11 @@ + Print version and exit + + + + Prune cannot be configured with a negative value. @@ -4115,17 +4169,12 @@ - - Warning: This version is obsolete; upgrade required! - - - - + You need to rebuild the database using -reindex to change -txindex You need to rebuild the database using -reindex to change -txindex - + 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 @@ -4170,7 +4219,7 @@ - + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) @@ -4215,7 +4264,7 @@ - + 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 @@ -4240,12 +4289,7 @@ - - Always relay transactions received from whitelisted peers (default: %d) - - - - + Attempt to recover private keys from a corrupt wallet.dat on startup @@ -4270,7 +4314,7 @@ - + Error loading wallet.dat: Wallet requires newer version of Bitcoin Core @@ -4295,7 +4339,7 @@ - + Invalid amount for -maxtxfee=<amount>: '%s' @@ -4325,7 +4369,7 @@ - + Need to specify a port with -whitebind: '%s' @@ -4335,7 +4379,7 @@ - + RPC server options: @@ -4450,7 +4494,12 @@ Warning - + + Warning: unknown new rules activated (versionbit %i) + + + + Whether to operate in a blocks only mode (default: %u) @@ -4470,42 +4519,42 @@ wallet.dat corrupt, salvage failed - + Password for JSON-RPC connections 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) - + This help message This help message - + Allow DNS lookups for -addnode, -seednode and -connect Allow DNS lookups for -addnode, -seednode and -connect - + Loading addresses... Loading addresses... - + Error loading wallet.dat: Wallet corrupted Error loading wallet.dat: Wallet corrupted - + (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) - + -maxtxfee is set very high! Fees this large could be paid on a single transaction. @@ -4515,7 +4564,7 @@ - + Do not keep transactions in the mempool longer than <n> hours (default: %u) @@ -4530,7 +4579,7 @@ - + How thorough the block verification of -checkblocks is (0-4, default: %u) @@ -4570,7 +4619,7 @@ - + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) @@ -4580,7 +4629,7 @@ - + (default: %s) @@ -4590,7 +4639,7 @@ - + Error loading wallet.dat Error loading wallet.dat @@ -4615,7 +4664,7 @@ Invalid -proxy address: '%s' - + Listen for JSON-RPC connections on <port> (default: %u or testnet: %u) @@ -4625,7 +4674,7 @@ - + Maintain at most <n> connections to peers (default: %u) @@ -4645,12 +4694,12 @@ - + Prepend debug output with timestamp (default: %u) - + Relay and mine data carrier transactions (default: %u) @@ -4705,7 +4754,7 @@ Unknown network specified in -onlynet: '%s' - + Cannot resolve -bind address: '%s' Cannot resolve -bind address: '%s' @@ -4715,32 +4764,32 @@ Cannot resolve -externalip address: '%s' - + Invalid amount for -paytxfee=<amount>: '%s' Invalid amount for -paytxfee=<amount>: '%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 @@ -4750,17 +4799,17 @@ Cannot write default address - + Rescanning... Rescanning... - + Done loading Done loading - + Error Error diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts index ab8dd65f8..f8810e115 100644 --- a/src/qt/locale/bitcoin_eo.ts +++ b/src/qt/locale/bitcoin_eo.ts @@ -179,6 +179,10 @@ Wallet encrypted La monujo estas ĉifrita + + Enter the old passphrase and new passphrase to the wallet. + Tajpu la malnovan pasvorton kaj la novan pasvorton por la monujo. + Wallet encryption failed Ĉifrado de la monujo fiaskis @@ -409,6 +413,10 @@ No block source available... Neniu fonto de blokoj trovebla... + + %n hour(s) + %n horo%n horoj + %n day(s) %n tago%n tagoj @@ -479,6 +487,12 @@ Label: %1 Etikedo: %1 + + + + Address: %1 + + Adreso: %1 @@ -812,6 +826,10 @@ command-line options komandliniaj agordaĵoj + + UI Options: + Uzantinterfaco ebloj: + Intro @@ -847,6 +865,10 @@ Error Eraro + + %n GB of free space available + %n gigabajto de libera loko disponeble%n gigabajtoj de libera loko disponebla. + OpenURIDialog @@ -1098,6 +1120,10 @@ PeerTableModel + + User Agent + Uzanto Agento + QObject @@ -1203,10 +1229,22 @@ Sent Sendita + + &Peers + &Samuloj + + + Banned peers + Malpermesita samuloj. + Version Versio + + User Agent + Uzanto Agento + Services Servoj diff --git a/src/qt/locale/bitcoin_es_AR.ts b/src/qt/locale/bitcoin_es_AR.ts new file mode 100644 index 000000000..fb9ac895b --- /dev/null +++ b/src/qt/locale/bitcoin_es_AR.ts @@ -0,0 +1,373 @@ + + + AddressBookPage + + Right-click to edit address or label + Hacé click para editar la dirección o etiqueta + + + Create a new address + Crear una nueva dirección + + + &New + &Nuevo + + + Copy the currently selected address to the system clipboard + Copiá la dirección que seleccionaste al portapapeles + + + &Copy + &Copiar + + + C&lose + C&lose + + + &Copy Address + &Copiar Dirección + + + Delete the currently selected address from the list + Borrar de la lista la dirección seleccionada + + + Export the data in the current tab to a file + Exportar los datos de la pestaña actual a un archivo + + + &Export + &Exportar + + + &Delete + &Borrar + + + Choose the address to send coins to + Elegir la dirección a donde enviar las monedas (coins) + + + Choose the address to receive coins with + Elegí la dirección donde recibir las monedas + + + C&hoose + E&legir + + + Sending addresses + Direcciones de envío + + + Receiving addresses + Direcciones de recepción + + + These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. + Estas son tus direcciones Bitcoin para enviar pagos. Siempre chequeá el monto y la dirección de recepción antes de mandar monedas. + + + These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. + Estas son tus direcciones para recibir pagos. Te recomendamos que uses una dirección de recibir para cada transacción. + + + Copy &Label + Copiar &Etiqueta + + + &Edit + &Editar + + + Export Address List + Exportar lista de direcciones + + + Comma separated file (*.csv) + Archivo separado por coma (*.csv) + + + Exporting Failed + Falló la exportación + + + There was an error trying to save the address list to %1. Please try again. + Hubo un error al tratar de guardar la lista de direcciones a %1. Por favor tratá de nuevo. + + + + AddressTableModel + + Label + Etiqueta + + + Address + Dirección + + + (no label) + (sin etiqueta) + + + + AskPassphraseDialog + + Passphrase Dialog + Diálogo de Frase de Contraseña + + + Enter passphrase + Ingresar la Frase de Contraseña + + + New passphrase + Nueva Frase de Contraseña + + + Repeat new passphrase + Repetí la nueva Frase de Contraseña + + + Encrypt wallet + Encriptar la billetera + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operación necesita tu frase de contraseña para desbloquear tu billetera. + + + Unlock wallet + Desbloquear la billetera + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operación necesita tu Frase de Contraseña de billetera para desencriptar la billetera. + + + Decrypt wallet + Desencriptar la billetera + + + Change passphrase + Cambiar la Frase de Contraseña + + + Confirm wallet encryption + Confirmá la encriptación de la billetera + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Atención: Si encriptás tu billetera y perdés tu frase de contraseña, vas a <b>PERDER TODOS TUS BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + ¿Estás seguro que querés encriptar tu billetera? + + + Bitcoin Core 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. + Bitcoin Core ahora se va a cerrar para terminar el proceso de encriptación. Acordate que encriptar tu billetera no te protege completamente de que algún malware que pueda infectar tu computadora te robe tus bitcoins. + + + 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: Todos los backups que hayas hecho de tu billetera tendrían que ser reemplazados por el archivo encriptado de billetera que generaste. Por razones de seguridad, los backups anteriores del archivo de billetera no encriptado se inutilizan en el momento en que empezás a usar la nueva billetera encriptada + + + Warning: The Caps Lock key is on! + Atención: Tenés puestas las mayúsculas! + + + Wallet encrypted + Billetera encriptada + + + 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>. + Ingresá una nueva frase de contraseña para la billetera.<br/>Por favor, fijate de usar una frase de contraseña de <b>diez o más caracteres aleatorios</b>, o de <b>ocho o más palabras</b>. + + + Enter the old passphrase and new passphrase to the wallet. + Ingresá la frase de contraseña vieja y la nueva para la billetera. + + + Wallet encryption failed + Falló la encriptación de la billetera + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Falló la encriptación de la billetera por un error interno. Tu billetera no está encriptada. + + + The supplied passphrases do not match. + Las frases de contraseña no son iguales. + + + Wallet unlock failed + Falló el desbloqueo de la billetera + + + The passphrase entered for the wallet decryption was incorrect. + La frase de contraseña que ingresaste para desencriptar la billetera es incorrecta. + + + Wallet decryption failed + Falló la desencriptación de la billetera + + + + BanTableModel + + + BitcoinGUI + + + ClientModel + + + CoinControlDialog + + (no label) + (sin etiqueta) + + + + EditAddressDialog + + + FreespaceChecker + + + HelpMessageDialog + + + Intro + + + OpenURIDialog + + + OptionsDialog + + + OverviewPage + + + PaymentServer + + + PeerTableModel + + + QObject + + + QRImageWidget + + + RPCConsole + + + ReceiveCoinsDialog + + + ReceiveRequestDialog + + Address + Dirección + + + Label + Etiqueta + + + + RecentRequestsTableModel + + Label + Etiqueta + + + (no label) + (sin etiqueta) + + + + SendCoinsDialog + + (no label) + (sin etiqueta) + + + + SendCoinsEntry + + + ShutdownWindow + + + SignVerifyMessageDialog + + + SplashScreen + + + TrafficGraphWidget + + + TransactionDesc + + + TransactionDescDialog + + + TransactionTableModel + + Label + Etiqueta + + + + TransactionView + + Exporting Failed + Falló la exportación + + + Comma separated file (*.csv) + Archivo separado por coma (*.csv) + + + Label + Etiqueta + + + Address + Dirección + + + + UnitDisplayStatusBarControl + + + WalletFrame + + + WalletModel + + + WalletView + + &Export + &Exportar + + + Export the data in the current tab to a file + Exportar los datos de la pestaña actual a un archivo + + + + bitcoin-core + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_es_CO.ts b/src/qt/locale/bitcoin_es_CO.ts new file mode 100644 index 000000000..ea0664636 --- /dev/null +++ b/src/qt/locale/bitcoin_es_CO.ts @@ -0,0 +1,542 @@ + + + AddressBookPage + + Right-click to edit address or label + Click derecho para editar la dirección o etiqueta + + + Create a new address + Crear una nueva dirección + + + &New + &Nuevo + + + Copy the currently selected address to the system clipboard + Copiar la dirección actualmente seleccionada al sistema de portapapeles + + + &Copy + &Copiar + + + C&lose + C&errar + + + &Copy Address + &Copiar dirección + + + Delete the currently selected address from the list + Borrar la dirección actualmente seleccionada de la lista + + + &Export + &Exportar + + + &Delete + &Borrar + + + Choose the address to send coins to + Escoje la dirección para enviar monedas a + + + Choose the address to receive coins with + Escoje la dirección para recibir monedas con + + + C&hoose + E&scojer + + + 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 las direcciones de Bitcoin para enviar pagos . Siempre verifique la cantidad y la dirección de recepción 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 las direcciones de Bitcoin para recibir los pagos . Se recomienda el uso de una nueva dirección de recepción para cada transacción. + + + Copy &Label + Copiar &Etiqueta + + + &Edit + &Editar + + + Export Address List + Exportar lista de direcciones + + + Comma separated file (*.csv) + Coma(,) archivo separado (*.csv) + + + Exporting Failed + Exportación Fallida + + + There was an error trying to save the address list to %1. Please try again. + Hubo un error intentando guardar la lista de direcciones a %1 Inténtelo otravez + + + + AddressTableModel + + Label + Etiqueta + + + Address + Dirección + + + (no label) + (ninguna dirección) + + + + AskPassphraseDialog + + Passphrase Dialog + Diálogo de contraseña + + + Enter passphrase + Poner contraseña + + + New passphrase + Nueva contraseña + + + Repeat new passphrase + Repetir nueva contraseña + + + Encrypt wallet + Billetera Encriptada + + + This operation needs your wallet passphrase to unlock the wallet. + Esta operación necesita tu contraseña de la billetera para desbloquear la billetera + + + Unlock wallet + Billetera Desbloqueada + + + This operation needs your wallet passphrase to decrypt the wallet. + Esta operación necesita tu contraseña de la billetera para desencriptar la billetera. + + + Decrypt wallet + Billetera Desencriptada + + + Change passphrase + Cambiar contraseña + + + Confirm wallet encryption + Confirmar encriptación de la billetera + + + Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! + Precaución: Si tú has encriptado tu billetera y has perdido tu contraseña, usted <b>PERDERÁ TODOS TUS BITCOINS</b> + + + Are you sure you wish to encrypt your wallet? + Estas seguro de que deseas encriptar tu billetera? + + + Bitcoin Core 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. + Bitcoin Core se cerrará ahora para finalizar el proceso de encriptación. Recuerda que encriptando tu billetera no protegera por completo tus bitcoins desde robos por malware que infectan tu computadora. + + + 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 copias de seguridad anteriores que han hecho de su archivo cartera debe ser reemplazado por el archivo de la carpeta recién generado , encriptado . Por razones de seguridad , las copias de seguridad anteriores del archivo cartera sin cifrar se vuelven inútiles , tan pronto como empiece a utilizar el nuevo , carpeta cifrada . + + + Warning: The Caps Lock key is on! + Ojo: El bloqueo de MAYUSCULAS esta activado! + + + Wallet encrypted + Billetera encriptada + + + 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>. + Poner la nueva contraseña a la billetera.<br/>Por favor usa una contraseña de <b>diez o más palabras aleatorias</b>, o <b>nueve o más letras</b>. + + + Enter the old passphrase and new passphrase to the wallet. + Poner la antigua contraseña y nueva contraseña a la billetera. + + + Wallet encryption failed + Encriptación de la billetera fallida + + + Wallet encryption failed due to an internal error. Your wallet was not encrypted. + Encriptación de la billetera fallida por un error interno. Tu billetera no ha sido encriptada. + + + Wallet unlock failed + Falló el desbloqueo de la billetera + + + The passphrase entered for the wallet decryption was incorrect. + La contraseña tecleada de la desencriptación de la billetera ha sido incorrecta. + + + Wallet decryption failed + Encriptación de la billetera fallida + + + Wallet passphrase was successfully changed. + La contraseña de la billetera a sido cambiada exitosamente. + + + + BanTableModel + + + BitcoinGUI + + Synchronizing with network... + Sincronizando con la red... + + + Node + Nodo + + + Show general overview of wallet + Mostrar vista general de la billetera + + + &Transactions + &Transacciones + + + E&xit + S&alir + + + Quit application + Salir de la aplicación + + + About &Qt + Acerca de &Qt + + + Show information about Qt + Mostrar información sobre Qt + + + &Options... + &Opciones + + + &Encrypt Wallet... + &Billetera Encriptada + + + &Backup Wallet... + &Billetera Copia de seguridad... + + + &Change Passphrase... + &Cambiar contraseña... + + + &Sending addresses... + &Enviando Direcciones... + + + &Receiving addresses... + &Recibiendo Direcciones... + + + Open &URI... + Abrir &URL... + + + Bitcoin Core client + Bitcoin Core cliente + + + Importing blocks from disk... + Importando bloques desde el disco... + + + Send coins to a Bitcoin address + Enviando monedas a una dirección de Bitcoin + + + Change the passphrase used for wallet encryption + Cambiar la contraseña usando la encriptación de la billetera + + + &Debug window + &Ventana desarrollador + + + Open debugging and diagnostic console + Abrir consola de diagnóstico y desarrollo + + + &Verify message... + &Verificar Mensaje... + + + Bitcoin + Bitcoin + + + Wallet + Billetera + + + &Send + &Enviar + + + &Receive + &Recibir + + + Show information about Bitcoin Core + Mostrar información sobre Bitcoin Core + + + &Show / Hide + &Mostrar / Ocultar + + + Show or hide the main Window + Mostrar u ocultar la Ventana Principal + + + &File + &Archivo + + + &Settings + &Configuraciones + + + &Help + &Ayuda + + + Bitcoin Core + Bitcoin Core + + + Error + Error + + + + ClientModel + + + CoinControlDialog + + (no label) + (ninguna dirección) + + + + EditAddressDialog + + + FreespaceChecker + + + HelpMessageDialog + + Bitcoin Core + Bitcoin Core + + + + Intro + + Bitcoin Core + Bitcoin Core + + + Error + Error + + + + OpenURIDialog + + + OptionsDialog + + + OverviewPage + + + PaymentServer + + + PeerTableModel + + + QObject + + + QRImageWidget + + + RPCConsole + + + ReceiveCoinsDialog + + + ReceiveRequestDialog + + Address + Dirección + + + Label + Etiqueta + + + + RecentRequestsTableModel + + Label + Etiqueta + + + (no label) + (ninguna dirección) + + + + SendCoinsDialog + + (no label) + (ninguna dirección) + + + + SendCoinsEntry + + + ShutdownWindow + + + SignVerifyMessageDialog + + + SplashScreen + + Bitcoin Core + Bitcoin Core + + + + TrafficGraphWidget + + + TransactionDesc + + + TransactionDescDialog + + + TransactionTableModel + + Label + Etiqueta + + + + TransactionView + + Exporting Failed + Exportación Fallida + + + Comma separated file (*.csv) + Coma(,) archivo separado (*.csv) + + + Label + Etiqueta + + + Address + Dirección + + + + UnitDisplayStatusBarControl + + + WalletFrame + + + WalletModel + + + WalletView + + &Export + &Exportar + + + + bitcoin-core + + Insufficient funds + Fondos Insuficientes + + + Loading wallet... + Cargando billetera... + + + Cannot write default address + No se puede escribir la dirección por defecto + + + Rescanning... + Reescaneando + + + Done loading + Listo Cargando + + + Error + Error + + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts index 57987b26e..8fa15b892 100644 --- a/src/qt/locale/bitcoin_fi.ts +++ b/src/qt/locale/bitcoin_fi.ts @@ -2001,6 +2001,10 @@ Custom: Muokattu: + + (Smart fee not initialized yet. This usually takes a few blocks...) + (Älykästä rahansiirtokulua ei ole vielä alustettu. Tähän kuluu yleensä aikaa muutaman lohkon verran...) + Confirmation time: Vahvistusaika: @@ -3095,6 +3099,10 @@ You need to rebuild the database using -reindex to change -txindex Sinun tulee uudelleenrakentaa tietokanta käyttäen -reindex vaihtaen -txindex + + 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 + Salli JSON-RPC-yhteydet määritetystä lähteestä. Kelvolliset arvot <ip> ovat yksittäinen IP (esim. 1.2.3.4), verkko/verkkomaski (esim. 1.2.3.4/255.255.255.0) tai verkko/luokaton reititys (esim. 1.2.3.4/24). Tätä valintatapaa voidaan käyttää useita kertoja + Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running. Ei voida lukita data-hakemistoa %s. Bitcoin Core on luultavasti jo käynnissä. @@ -3163,6 +3171,10 @@ Invalid amount for -mintxfee=<amount>: '%s' Virheellinen määrä -mintxfee=<amount>: '%s' + + Keep at most <n> unconnectable transactions in memory (default: %u) + Pidä enimmillään <n> yhdistämiskelvotonta rahansiirtoa muistissa (oletus: %u) + Node relay options: Välityssolmukohdan asetukset: @@ -3283,10 +3295,22 @@ Error loading wallet.dat: Wallet corrupted Virhe ladattaessa wallet.dat-tiedostoa: Lompakko vioittunut + + -maxtxfee is set very high! Fees this large could be paid on a single transaction. + -maxtxfee on asetettu erittäin suureksi! Tämänkokoisia kuluja saatetaan maksaa yhdessä rahansiirrossa. + + + -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + -paytxfee on asetettu erittäin suureksi! Tämä on rahansiirtokulu, jonka maksat, mikäli lähetät rahansiirron. + Do not keep transactions in the mempool longer than <n> hours (default: %u) Älä pidä rahansiirtoja muistivarannoissa kauemmin kuin <n> tuntia (oletus: %u) + + Error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Virhe lukiessa wallet.dat-tiedostoa! Kaikki avaimet luettiin onnistuneesti, mutta rahansiirtotiedot tai osoitekirjan sisältö saattavat olla muuttuneita tai vääriä. + How thorough the block verification of -checkblocks is (0-4, default: %u) Kuinka läpikäyvä lohkojen -checkblocks -todennus on (0-4, oletus: %u) @@ -3299,6 +3323,10 @@ (default: %s) (oletus: %s) + + Always query for peer addresses via DNS lookup (default: %u) + Pyydä vertaisten osoitteita aina DNS-kyselyjen avulla (oletus: %u) + Error loading wallet.dat Virhe ladattaessa wallet.dat-tiedostoa @@ -3327,6 +3355,10 @@ Listen for connections on <port> (default: %u or testnet: %u) Kuuntele yhteyksiä portissa <port> (oletus: %u tai testnet: %u) + + Maintain at most <n> connections to peers (default: %u) + Ylläpidä enimmillään <n> yhteyttä vertaisiin (oletus: %u) + Make the wallet broadcast transactions Aseta lompakko kuuluttamaan rahansiirtoja @@ -3339,6 +3371,10 @@ Maximum per-connection send buffer, <n>*1000 bytes (default: %u) Maksimi yhteyttä kohden käytettävä lähetyspuskurin koko, <n>*1000 tavua (oletus: %u) + + Prepend debug output with timestamp (default: %u) + Lisää debug-tietojen alkuun aikaleimat (oletus: %u) + Relay and mine data carrier transactions (default: %u) Välitä ja louhi dataa kantavia rahansiirtoja (oletus: %u) @@ -3363,6 +3399,10 @@ Specify configuration file (default: %s) Määritä asetustiedosto (oletus: %s) + + Specify connection timeout in milliseconds (minimum: 1, default: %d) + Määritä yhteyden aikakatkaisu millisekunneissa (minimi: 1, oletus: %d) + Specify pid file (default: %s) Määritä pid-tiedosto (oletus: %s) @@ -3371,6 +3411,10 @@ Spend unconfirmed change when sending transactions (default: %u) Käytä vahvistamattomia vaihtorahoja lähetettäessä rahansiirtoja (oletus: %u) + + Threshold for disconnecting misbehaving peers (default: %u) + Aikaväli sopimattomien vertaisten yhteyksien katkaisuun (oletus: %u) + Unknown network specified in -onlynet: '%s' Tuntematon verkko -onlynet parametrina: '%s' diff --git a/src/qt/locale/bitcoin_fr_FR.ts b/src/qt/locale/bitcoin_fr_FR.ts index df6324335..2c0f1d0fd 100644 --- a/src/qt/locale/bitcoin_fr_FR.ts +++ b/src/qt/locale/bitcoin_fr_FR.ts @@ -1,27 +1,96 @@ AddressBookPage + + Right-click to edit address or label + Double cliquez afin de modifier l'adresse ou l'étiquette + Create a new address Créer une nouvelle adresse + + &New + &Nouveau + Copy the currently selected address to the system clipboard Copier l'adresse surlignée dans votre presse-papiers + + &Copy + &Copie + + + &Copy Address + &Adresse de copie + + + Delete the currently selected address from the list + Supprimer l'adresse sélectionnée de la liste + Export the data in the current tab to a file Exporter les données de l'onglet courant vers un fichier + + &Export + &Exporter... + &Delete &Supprimer + + Choose the address to send coins to + Choisissez une adresse où envoyer les bitcoins + + + Choose the address to receive coins with + Choisissez une adresse où recevoir les bitcoins + + + 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 qui vous permettent d'envoyer des paiements. Vérifiez toujours le montant et l'adresse de réception 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 qui vous permettent de recevoir des paiements. Il est recommandé d'utiliser une nouvelle adresse de réception pour chaque transaction + + + Copy &Label + Copier &Étiquette + + + &Edit + &Éditer + + + Export Address List + Exporter la liste d'adresses + Comma separated file (*.csv) Valeurs séparées par des virgules (*.csv) - + + Exporting Failed + Échec de l'export + + + There was an error trying to save the address list to %1. Please try again. + Il y a eu une erreur durant la tentative de sauvegarde de la liste d’adresse vers %1. +Réessayez. + + AddressTableModel @@ -39,6 +108,10 @@ AskPassphraseDialog + + Passphrase Dialog + Dialogue mot de passe + Enter passphrase Entrez la phrase de passe @@ -79,10 +152,30 @@ 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>! + Attention: Si vous cryptez votre portefeuille et que vous perdez votre mot de passe vous <b> PERDREZ TOUS VOS BITCOINS</b>! + + + Are you sure you wish to encrypt your wallet? + Êtes-vous sûr de de vouloir crypter votre portefeuille ? + + + Bitcoin Core 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. + Bitcoin Core fermera maintenant pour finir le processus de chiffrement. Rappelez-vous que crypter votre portefeuille ne protége pas totalement vos bitcoins d'être volé par un malware ayant infecté votre ordinateur. + + + Warning: The Caps Lock key is on! + Attention : La touche majuscule est enfoncé. + Wallet encrypted Porte-monnaie chiffré + + Enter the old passphrase and new passphrase to the wallet. + Entrez l'ancien mot de passe et le nouveau mot de passe pour le portefeuille + Wallet encryption failed Le chiffrement du porte-monnaie a échoué @@ -107,12 +200,28 @@ Wallet decryption failed Le décryptage du porte-monnaie a échoué - + + Wallet passphrase was successfully changed. + Le changement du mot de passe du portefeuille à été effectué avec succès. + + BanTableModel - + + IP/Netmask + IP/Masque de sous réseau + + + Banned Until + Banni jusque + + BitcoinGUI + + Sign &message... + Signer &message... + Synchronizing with network... Synchronisation avec le réseau... @@ -121,6 +230,10 @@ &Overview &Vue d'ensemble + + Node + Nœud + Show general overview of wallet Affiche une vue d'ensemble du porte-monnaie @@ -153,6 +266,46 @@ &Options... &Options... + + &Encrypt Wallet... + &Chiffrer le portefeuille + + + &Backup Wallet... + &Sauvegarder le portefeuille + + + &Change Passphrase... + &Modifier le mot de passe + + + &Sending addresses... + &Adresses d'envoi + + + &Receiving addresses... + &Adresses de réception + + + Open &URI... + Ouvrir &URI + + + Bitcoin Core client + Client Bitcoin Core + + + Importing blocks from disk... + Importer les blocs depuis le disque... + + + Reindexing blocks on disk... + Réindexer les blocs sur le disque... + + + Send coins to a Bitcoin address + Envoyer des pièces à une adresse Bitcoin + Backup wallet to another location Sauvegarder le porte-monnaie à un autre emplacement @@ -161,14 +314,54 @@ Change the passphrase used for wallet encryption Modifier la phrase de passe utilisée pour le cryptage du porte-monnaie + + &Debug window + &Fenêtre de débogage + + + Open debugging and diagnostic console + Ouvrir la console de débogage et de diagnostic + + + &Verify message... + &Vérification du message + Bitcoin Bitcoin + + Wallet + Portefeuille + &Send &Envoyer + + &Receive + &Réception + + + Show information about Bitcoin Core + Montrer les informations à propos de Bitcoin Core + + + &Show / Hide + &Montrer / Cacher + + + Show or hide the main Window + Montrer ou cacher la fenêtre principale + + + Encrypt the private keys that belong to your wallet + Crypter les clé privées qui appartiennent votre portefeuille + + + Sign messages with your Bitcoin addresses to prove you own them + Signer vos messages avec vos adresses Bitcoin pour prouver que vous les détenez + &File &Fichier @@ -185,6 +378,86 @@ Tabs toolbar Barre d'outils des onglets + + Bitcoin Core + Bitcoin Core + + + Request payments (generates QR codes and bitcoin: URIs) + Demander des paiements (générer QR codes et bitcoin: URIs) + + + &About Bitcoin Core + &À propos de Bitcoin + + + Modify configuration options for Bitcoin Core + Modifier les options de configuration de Bitcoin Core + + + Show the list of used sending addresses and labels + Montrer la liste des adresses d'envois utilisées et les étiquettes + + + Open a bitcoin: URI or payment request + Ouvrir un bitcoin: URI ou demande de paiement + + + &Command-line options + &Options de ligne de commande + + + %n active connection(s) to Bitcoin network + %n connexion active au réseau Bitcoin%n connexions actives au réseau Bitcoin + + + No block source available... + Aucun bloc source disponible + + + %n hour(s) + %n heure%n heures + + + %n day(s) + %n jour%n jours + + + %n week(s) + %n semaine%n semaines + + + %1 and %2 + %1 et %2 + + + %n year(s) + %n an%n années + + + %1 behind + en retard de %1 + + + Last received block was generated %1 ago. + Le dernier bloc reçu a été généré %1. + + + Transactions after this will not yet be visible. + Les transactions ne seront plus visible après ceci. + + + Error + Erreur + + + Warning + Attention + + + Information + Information + Up to date À jour @@ -193,6 +466,36 @@ Catching up... Rattrapage... + + Date: %1 + + Date: %1 + + + + Amount: %1 + + Montant:%1 + + + + Type: %1 + + Type: %1 + + + + Label: %1 + + Étiquette: %1 + + + + Address: %1 + + Adresse: %1 + + Sent transaction Transaction envoyée @@ -212,25 +515,89 @@ ClientModel - + + Network Alert + Alerte réseau + + CoinControlDialog + + Coin Selection + Sélection de pièce + + + Quantity: + Quantité: + + + Bytes: + Octets: + Amount: Montant : + + Priority: + Priorité: + + + Fee: + Frais: + + + Dust: + Poussière: + + + After Fee: + Après frais: + + + Change: + Change: + + + (un)select all + (dé)sélectionné tout: + + + Tree mode + Mode arbre + + + List mode + Mode list + Amount Montant + + Received with label + Reçu avec : + + + Received with address + Reçue avec l'adresse + Date Date + + Confirmations + Confirmations + Confirmed Confirmée + + Priority + Priorité + Copy address Copier l'adresse @@ -243,11 +610,131 @@ Copy amount Copier le montant + + Copy transaction ID + Copie ID transaction + + + Lock unspent + Verrouiller les non dépensés + + + Unlock unspent + Déverrouiller les non dépensés + + + 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 changement + + + highest + le plus élevé + + + higher + plus haute + + + high + haut + + + medium-high + moyen-élevé + + + medium + moyen + + + low-medium + bas-moyen + + + low + bas + + + lower + inférieur + + + lowest + le plus bas + + + (%1 locked) + (%1 verrouillé) + + + none + aucun + + + This label turns red if the transaction size is greater than 1000 bytes. + Cette étiquette devient rouge si la taille de la transaction est plus grande que 1000 octets + + + This label turns red if the priority is smaller than "medium". + Cette étiquette devient rouge si la priorité est plus petite que "moyen" + + + Can vary +/- %1 satoshi(s) per input. + Peut varier de +/- %1 satoshi(s) par entrée. + + + yes + oui + + + no + non + + + This means a fee of at least %1 per kB is required. + Cela signifie que des frais d'au moins %1 par kO sont requis. + + + Can vary +/- 1 byte per input. + Peut varier de +/- 1 octet par entrée. + (no label) (aucune étiquette) - + + change from %1 (%2) + changement de %1 (%2) + + + (change) + (changement) + + EditAddressDialog @@ -282,6 +769,10 @@ The entered address "%1" is already in the address book. L'adresse fournie « %1 » est déjà présente dans le carnet d'adresses. + + The entered address "%1" is not a valid Bitcoin address. + L'adresse entrée "%1" n'est pas une adresse Bitcoin valide. + Could not unlock wallet. Impossible de déverrouiller le porte-monnaie. @@ -293,26 +784,174 @@ FreespaceChecker - + + A new data directory will be created. + Un nouveau répertoire de données sera créé. + + + name + nom + + + Path already exists, and is not a directory. + Le chemin existe déjà et ce n'est pas un répertoire. + + + Cannot create data directory here. + Impossible de créer un répertoire ici. + + HelpMessageDialog + + Bitcoin Core + Bitcoin Core + + + version + version + + + (%1-bit) + (%1-bit) + + + About Bitcoin Core + À propos de Bitcoin Core + + + Command-line options + Options de ligne de commande + Usage: Utilisation : + + command-line options + Options de ligne de commande + + + UI Options: + Options interface graphique: + + + Start minimized + Démarrer sous forme minimisée + Intro - + + Welcome + Bienvenue + + + Welcome to Bitcoin Core. + Bienvenue sur Bitcoin Core. + + + Use the default data directory + Utiliser le répertoire par défaut + + + Use a custom data directory: + Utiliser votre propre répertoire + + + Bitcoin Core + Bitcoin Core + + + Error: Specified data directory "%1" cannot be created. + Erreur: Le répertoire de données "%1" n'a pas pu être créé. + + + Error + Erreur + + + %n GB of free space available + %n GO d'espace libre disponible%n GO d'espace libre disponible + + + (of %n GB needed) + (%n GB nécessaire)(%n GB nécessaire) + + OpenURIDialog - + + Open URI + Ouvrir URI + + + Open payment request from URI or file + Ouvrir une demande de paiement depuis une URI ou un fichier + + + URI: + URI: + + + Select payment request file + Sélectionner un fichier de demande de paiement + + + Select payment request file to open + Sélectionnez le fichier de demande de paiement à ouvrir + + OptionsDialog Options Options + + &Main + &Principal + + + Size of &database cache + Taille du cache de la base de données. + + + MB + MO + + + Accept connections from outside + Accepter les connexions venant de l'extérieur + + + Allow incoming connections + Autoriser les connexions entrantes + + + IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) + Adresse IP du proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) + + + Reset all client options to default. + Réinitialiser toutes les options du client par défaut. + + + &Reset Options + &Options de réinitialisation + + + &Network + &Réseau + + + Automatically start Bitcoin Core after logging in to the system. + Démarrer automatiquement Bitcoin Core après s'être connecté au système. + + + Expert + Expert + 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. Cela ne fonctionne que si votre routeur supporte l'UPnP et si la fonctionnalité est activée. @@ -321,6 +960,38 @@ Map port using &UPnP Ouvrir le port avec l'&UPnP + + Proxy &IP: + Proxy &IP: + + + &Port: + &Port: + + + Port of the proxy (e.g. 9050) + Port du proxy (e.g. 9050) + + + Used for reaching peers via: + Utilisé pour contacter des pairs via: + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + &Window + &Fenêtre + &Minimize to the tray instead of the taskbar &Minimiser dans la barre système au lieu de la barre des tâches @@ -329,37 +1000,429 @@ M&inimize on close Mi&nimiser lors de la fermeture - + + &Display + &Afficher + + + User Interface &language: + Interface utilisateur &langage: + + + &OK + &OK + + + &Cancel + &Annuler + + + default + defaut + + + none + aucun + + + Confirm options reset + Confirmer les options de réinitialisation + + + Client restart required to activate changes. + Redémarrage du client nécessaire pour activer les changements. + + + This change would require a client restart. + Ce changement nécessiterait un redémarrage du client. + + + The supplied proxy address is invalid. + L'adresse du proxy est invalide. + + OverviewPage Form Formulaire + + Watch-only: + Regarder seulement: + + + Available: + Disponible: + + + Pending: + En attente: + + + Immature: + Immature: + + + Balances + Balances + + + Total: + Total: + + + Your current total balance + Votre balance totale courante + + + Spendable: + Dépensable: + + + Recent transactions + Transactions récentes + PaymentServer - + + Invalid payment address %1 + Adresse de paiement invalide %1 + + + Payment request rejected + Requête de paiement rejetée + + + Payment request is not initialized. + La demande de paiement n'a pas été initialisée. + + + Payment request error + Erreur lors de la requête de paiement + + + Payment request expired. + Demande de paiement expirée. + + + Invalid payment request. + Demande de paiement invalide. + + + Refund from %1 + Remboursement de %1 + + + Bad response from server %1 + Mauvaise réponse du serveur %1 + + + Network request error + Erreur de demande de réseau + + PeerTableModel - + + User Agent + Agent Utilisateur + + + Node/Service + Nœud/Service + + + Ping Time + Temps du ping + + QObject Amount Montant - + + Enter a Bitcoin address (e.g. %1) + Entrer une adresse Bitcoin (e.g. %1) + + + %1 d + %1 j + + + %1 h + %1 h + + + %1 m + %1 m + + + %1 s + %1 s + + + None + Aucun + + + N/A + N/A + + + %1 ms + %1 ms + + QRImageWidget - + + &Save Image... + &Sauvegarder image + + + &Copy Image + &Copier image + + + Save QR Code + Sauvegarder QR code + + + PNG Image (*.png) + Image PNG (*.png) + + RPCConsole + + Client name + Nom du client + + + N/A + N/A + + + Client version + Version du client + + + &Information + &Information + + + Debug window + Fenêtre de débogage + + + General + Général + + + Using OpenSSL version + Version OpenSSL utilisée + + + Using BerkeleyDB version + Version BerkeleyDButilisée + + + Startup time + Le temps de démarrage + + + Network + Réseau + Name Nom - + + Number of connections + Nombre de connexions + + + Block chain + Chaîne de bloc + + + Current number of blocks + Nombre courant de blocs + + + Memory Pool + Mémoire du pool + + + Current number of transactions + Nombre courant de transactions + + + Memory usage + Usage de la mémoire + + + Received + Reçu + + + Sent + Envoyé + + + &Peers + &Pairs + + + Banned peers + Pairs bannis + + + Whitelisted + Autorisé par la liste + + + Direction + Direction + + + Version + Version + + + Starting Block + Bloc de départ + + + User Agent + Agent Utilisateur + + + Services + Services + + + Ban Score + Score de ban + + + Connection Time + Temps de connexion + + + Last Send + Dernier envoyé + + + Last Receive + Dernier reçu + + + Ping Time + Temps du ping + + + Ping Wait + Attente du ping + + + &Open + &Ouvert + + + &Console + &Console + + + &Network Traffic + &Trafic réseau + + + &Clear + &Nettoyer + + + Totals + Totaux + + + In: + Entrée: + + + Out: + Sortie: + + + Build date + Date de création + + + Debug log file + Fichier du journal de débogage + + + Clear console + Nettoyer la console + + + 1 &hour + 1 &heure + + + 1 &day + 1 &jour + + + 1 &week + 1 &semaine + + + 1 &year + 1 &an + + + %1 B + %1 O + + + %1 KB + %1 KO + + + %1 MB + %1 MO + + + %1 GB + %1 GO + + + via %1 + via %1 + + + never + jamais + + + Yes + Oui + + + No + Non + + + Unknown + Inconnu + + ReceiveCoinsDialog @@ -374,10 +1437,38 @@ &Message: Message : + + Clear all fields of the form. + Nettoyer tous les champs du formulaire. + + + Clear + Nettoyer + + + Requested payments history + Historique des demandes de paiements. + + + &Request payment + &Demande de paiement + + + Show + Montrer + + + Remove + Retirer + Copy label Copier l'étiquette + + Copy message + Copier message + Copy amount Copier le montant @@ -389,6 +1480,30 @@ QR Code QR Code + + Copy &URI + Copier &URI + + + Copy &Address + Copier &Adresse + + + &Save Image... + &Sauvegarder image + + + Request payment to %1 + Demande de paiement à %1 + + + Payment information + Informations de paiement + + + URI + URI + Address Adresse @@ -428,25 +1543,113 @@ (no label) (aucune étiquette) - + + (no message) + (pas de message) + + + (no amount) + (pas de montant) + + SendCoinsDialog Send Coins Envoyer des pièces + + Inputs... + Sorties... + + + automatically selected + Automatiquement sélectionné + Insufficient funds! Fonds insuffisants + + Quantity: + Quantité: + + + Bytes: + Octets: + Amount: Montant : + + Priority: + Priorité: + + + Fee: + Frais: + + + After Fee: + Après frais: + + + Change: + Change: + + + Transaction Fee: + Frais de transaction + + + Choose... + Choisir... + + + per kilobyte + par kilo octet + + + Hide + Cacher + + + total at least + Au total au moins + + + Recommended: + Recommandé: + + + Confirmation time: + Temps de confirmation: + + + normal + normal + + + fast + rapide + Send to multiple recipients at once Envoyer des pièces à plusieurs destinataires à la fois + + Clear all fields of the form. + Nettoyer tous les champs du formulaire. + + + Dust: + Poussière: + + + Clear &All + Nettoyer &Tout + Balance: Solde : @@ -459,19 +1662,87 @@ Confirm send coins Confirmer l'envoi des pièces + + %1 to %2 + %1 à %2 + + + Copy quantity + Copier la quantité + Copy amount Copier le montant + + Copy fee + Copier les frais + + + Copy after fee + Copier après les frais + + + Copy bytes + Copier les octets + + + Copy priority + Copier la priorité + + + Copy change + Copier changement + + + Total Amount %1 + Montant Total %1 + + + or + ou + The amount to pay must be larger than 0. Le montant à payer doit être supérieur à 0. + + The amount exceeds your balance. + Le montant excède votre balance. + + + Transaction creation failed! + Échec de la création de la transaction + + + Payment request expired. + Demande de paiement expirée. + + + Pay only the required fee of %1 + Payer seulement les frais obligatoire de %1 + + + Warning: Invalid Bitcoin address + Attention: Adresse Bitcoin Invalide + (no label) (aucune étiquette) - + + Copy dust + Copier la poussière + + + Are you sure you want to send? + Êtes-vous sûr de vouloir envoyer ? + + + added as transaction fee + Ajoute en tant que frais de transaction + + SendCoinsEntry @@ -490,6 +1761,14 @@ &Label: &Étiquette : + + Choose previously used address + Choisir une adresse précédemment utilisée + + + This is a normal payment. + C'est un paiement normal. + Alt+A Alt+A @@ -502,6 +1781,10 @@ Alt+P Alt+P + + Remove this entry + Retirer cette entrée + Message: Message : @@ -510,7 +1793,11 @@ Pay To: Payer à : - + + Memo: + Memo: + + ShutdownWindow @@ -520,6 +1807,10 @@ &Sign Message &Signer le message + + Choose previously used address + Choisir une adresse précédemment utilisée + Alt+A Alt+A @@ -536,13 +1827,65 @@ Enter the message you want to sign here Entrez ici le message que vous désirez signer + + Signature + Signature + + + Copy the current signature to the system clipboard + Copier l'adresse courante dans le presse papier + Sign &Message &Signer le message - + + Clear &All + Nettoyer &Tout + + + &Verify Message + &Vérifier message + + + Verify &Message + Vérifier &Message + + + The entered address is invalid. + L'adresse entrée est invalide. + + + Please check the address and try again. + Vérifiez l'adresse et réessayer. + + + Message signed. + Message signé. + + + Please check the signature and try again. + Vérifiez la signature et réessayer. + + + Message verification failed. + Vérification du message échouée. + + + Message verified. + Message vérifié. + + SplashScreen + + Bitcoin Core + Bitcoin Core + + + The Bitcoin Core developers + Les développeurs de Bitcoin Core + [testnet] [testnet] @@ -550,7 +1893,11 @@ TrafficGraphWidget - + + KB/s + KO/s + + TransactionDesc @@ -573,30 +1920,102 @@ Date Date + + Source + Source + Generated Généré + + From + De + + + To + Á + + + own address + Votre adresse + + + label + Étiquette + Credit Crédit + + not accepted + Pas accepté + 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 transaction + + + Debug information + Information de débogage + + + Transaction + Transaction + + + Inputs + Entrées + Amount Montant + + true + vrai + + + false + faux + , has not been successfully broadcast yet , n'a pas encore été diffusée avec succès + + Open for %n more block(s) + Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + unknown inconnue @@ -623,6 +2042,10 @@ Type Type + + Open for %n more block(s) + Ouvert pour %n bloc de plusOuvert pour %n blocs de plus + Open until %1 Ouvert jusqu'à %1 @@ -639,6 +2062,10 @@ Generated but not accepted Généré mais pas accepté + + Offline + Hors ligne + Label Étiquette @@ -754,10 +2181,30 @@ Copy amount Copier le montant + + Copy transaction ID + Copie ID transaction + Edit label Éditer l'étiquette + + Show transaction details + Afficher les détails de la transaction + + + Export Transaction History + Exporter l'historique des transactions + + + Exporting Failed + Échec de l'export + + + Exporting Successful + Export réalisé avec sucés + Comma separated file (*.csv) Valeurs séparées par des virgules (*.csv) @@ -800,7 +2247,11 @@ WalletFrame - + + No wallet has been loaded. + Aucun portefeuille a été chargé. + + WalletModel @@ -810,6 +2261,10 @@ WalletView + + &Export + &Exporter... + Export the data in the current tab to a file Exporter les données de l'onglet courant vers un fichier @@ -826,7 +2281,11 @@ Backup Failed La sauvegarde a échoué - + + Backup Successful + Sauvegarde réussie + + bitcoin-core @@ -837,6 +2296,10 @@ Specify data directory Spécifier le répertoire de données + + Specify your own public address + Spécifier votre adresse publique + Accept command line and JSON-RPC commands Accepter les commandes de JSON-RPC et de la ligne de commande @@ -845,14 +2308,99 @@ Run in the background as a daemon and accept commands Fonctionner en arrière-plan en tant que démon et accepter les commandes + + <category> can be: + <category> peut être: + + + Block creation options: + Options de création de bloc: + + + Connection options: + Options de connexion: + + + Debugging/Testing options: + Options de débogage/test + + + Importing... + +Importation ... + + + Verifying blocks... + Vérifications des blocs... + + + Verifying wallet... + Vérification du portefeuille... + + + Wallet options: + Options du portefeuille: + + + Warning: This version is obsolete; upgrade required! + Attention: Cette version est obsolète; mise à jour nécessaire + + + (default: %u) + (défaut: %u) + + + Connect through SOCKS5 proxy + Connecté au travers du proxy SOCKS5 + + + Information + Information + + + Node relay options: + Options du relais de nœud: + + + RPC server options: + Options de serveur RPC: + 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 + + Signing transaction failed + Transaction signée échouée + + + This is experimental software. + C'est un logiciel expérimental. + + + Transaction amount too small + Montant de la transaction trop bas + + + Transaction amounts must be positive + Les montants de la transaction doivent être positif + + + Transaction too large for fee policy + Montant de la transaction trop élevé pour la politique de frais + + + Transaction too large + Transaction trop grande + Username for JSON-RPC connections Nom d'utilisateur pour les connexions JSON-RPC + + Warning + Attention + Password for JSON-RPC connections Mot de passe pour les connexions JSON-RPC @@ -869,10 +2417,26 @@ Error loading wallet.dat: Wallet corrupted Erreur lors du chargement de wallet.dat : porte-monnaie corrompu + + (default: %s) + (défaut: %s) + Error loading wallet.dat Erreur lors du chargement de wallet.dat + + Generate coins (default: %u) + Générer des pièces (défaut: %u) + + + Invalid -proxy address: '%s' + Adresse -proxy invalide: '%s' + + + Specify pid file (default: %s) + Spécifier le pid du fichier (défaut: %s) + Insufficient funds Fonds insuffisants @@ -885,6 +2449,14 @@ Loading wallet... Chargement du porte-monnaie... + + Cannot downgrade wallet + Vous ne pouvez pas rétrograder votre portefeuille + + + Cannot write default address + Impossible d'écrire l'adresse par défaut + Rescanning... Nouvelle analyse... @@ -893,5 +2465,9 @@ Done loading Chargement terminé - + + Error + Erreur + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts index 926d20620..207eb277e 100644 --- a/src/qt/locale/bitcoin_he.ts +++ b/src/qt/locale/bitcoin_he.ts @@ -1,6 +1,10 @@ AddressBookPage + + Right-click to edit address or label + לחץ משק ימני כדי לערוך כתובת או חברה + Create a new address יצירת כתובת חדשה @@ -163,6 +167,10 @@ Are you sure you wish to encrypt your wallet? האם אכן להצפין את הארנק? + + Bitcoin Core 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. לתשומת לבך: כל גיבוי קודם שביצעת לארנק שלך יש להחליף בקובץ הארנק המוצפן שזה עתה נוצר. מטעמי אבטחה, גיבויים קודמים של קובץ הארנק הבלתי-מוצפן יהפכו לחסרי תועלת עם התחלת השימוש בארנק החדש המוצפן. @@ -179,6 +187,10 @@ 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>. + + Enter the old passphrase and new passphrase to the wallet. + הכנס את מילת הצופן הישנה ומילת צופן חדשה לארנק שלך. + Wallet encryption failed הצפנת הארנק נכשלה diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts index ab4517ccf..c652f07e4 100644 --- a/src/qt/locale/bitcoin_hu.ts +++ b/src/qt/locale/bitcoin_hu.ts @@ -963,6 +963,10 @@ The user interface language can be set here. This setting will take effect after restarting Bitcoin Core. Itt beállíthatod a kezelőfelület nyelvét. A beállítás a Bitcoin újraindítása után lép érvénybe. + + Third party transaction URLs + Harmadik fél tranzakció URL-ek + Reset all client options to default. Minden kliensbeállítás alapértelmezettre állítása. diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts index 1b626fbf2..dd131b5e7 100644 --- a/src/qt/locale/bitcoin_id_ID.ts +++ b/src/qt/locale/bitcoin_id_ID.ts @@ -59,19 +59,19 @@ Sending addresses - Alamat-alamat mengirim + Alamat pengirim Receiving addresses - Alamat-alamat menerima + Alamat penerima These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. - Alamat-alamat Anda supaya mengirim pembayaran. Periksalah jumlah dan alamat penerima setiap kali Anda mengirim Bitcoin. + Alamat-alamat Anda untuk mengirim pembayaran. Periksalah jumlah dan alamat penerima setiap kali Anda mengirim Bitcoin. These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. - Alamat-alamat Anda supaya menerima pembayaran. Dianjurkan agar Anda menggunakan alamat menerima yang baru untuk setiap transaksi. + Alamat-alamat Anda untuk menerima pembayaran. Dianjurkan agar Anda menggunakan alamat yang baru untuk setiap transaksi. Copy &Label @@ -93,7 +93,11 @@ Exporting Failed Proses Ekspor Gagal - + + There was an error trying to save the address list to %1. Please try again. + Terjadi kesalahan saat menyimpan daftar alamat ke %1. Silakan coba lagi. + + AddressTableModel @@ -133,7 +137,7 @@ This operation needs your wallet passphrase to unlock the wallet. - Operasi ini memerlukan kata kunci dompet Anda untuk membuka dompet ini. + Operasi ini memerlukan kata kunci dompet Anda untuk membuka dompet. Unlock wallet @@ -141,7 +145,7 @@ This operation needs your wallet passphrase to decrypt the wallet. - Operasi ini memerlukan kata kunci dompet Anda untuk mendekripsi dompet ini. + Operasi ini memerlukan kata kunci dompet Anda untuk mendekripsi dompet. Decrypt wallet @@ -157,11 +161,19 @@ Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! - Perhatian: Jika anda mengenkripsi dompet anda dan lupa kata kuncinya, anda pasti <b>KEHILANGAN SELURUH BITCOIN ANDA</B>! + Perhatian: Jika anda mengenkripsi dompet anda dan lupa kata kuncinya, anda akan <b>KEHILANGAN SELURUH BITCOIN ANDA</b>! Are you sure you wish to encrypt your wallet? - Apakah kamu yakin ingin mengenkripsi dompet anda? + Apakah Anda yakin ingin mengenkripsi dompet Anda? + + + Bitcoin Core 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. + Bitcoin Core akan ditutup untuk menyelesaikan proses enkripsi. Mohon diingat bahwa mengenkripsi dompet Anda tidak akan sepenuhnya melindungi bitcoin Anda dari virus atau malware yang menginfeksi komputer Anda. + + + 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. + PENTING: Setiap back up yang sudah Anda buat sebaiknya diganti dengan data dompet Anda yang baru dan terenkripsi. Untuk alasan keamanan, data back up tidak terenkripsi yang sudah Anda buat sebelumnya tidak akan dapat digunakan setelah Anda mulai menggunakan dompet yang baru dan terenkripsi. Warning: The Caps Lock key is on! @@ -171,6 +183,14 @@ Wallet encrypted Dompet terenkripsi + + 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>. + Masukkan kata kunci untuk dompet Anda.<br/>Mohon gunakan kata kunci <b>yang terdiri dari 10 karakter acak</b>, atau <b>delapan atau beberapa kata lagi</b>. + + + Enter the old passphrase and new passphrase to the wallet. + Masukkan kata kunci lama dan kata kunci baru dompet Anda. + Wallet encryption failed Enkripsi dompet gagal @@ -197,12 +217,20 @@ Wallet passphrase was successfully changed. - Kata kunci untuk dompet berubah berhasil. + Kata kunci dompet Anda berhasil diubah. BanTableModel - + + IP/Netmask + IP/Netmask + + + Banned Until + Di banned sampai + + BitcoinGUI @@ -223,7 +251,7 @@ Show general overview of wallet - Tampilkan kilasan umum dari dompet + Tampilkan gambaran umum dompet Anda &Transactions @@ -231,7 +259,7 @@ Browse transaction history - Jelajah sejarah transaksi + Lihat riwayat transaksi E&xit @@ -267,11 +295,11 @@ &Sending addresses... - Alamat-alamat &Mengirim + &Alamat-alamat untuk mengirim... &Receiving addresses... - Alamat-alamat &Menerima + &Alamat-alamat untuk menerima... Open &URI... @@ -279,15 +307,15 @@ Bitcoin Core client - Client Bitcoin Inti + Klien Bitcoin Core Importing blocks from disk... - Blok-blok sedang di-impor dari disk + Mengimpor blok dari disk... Reindexing blocks on disk... - Mengindex ulang block di harddisk... + Mengindex ulang blok di dalam disk... Send coins to a Bitcoin address @@ -331,11 +359,11 @@ Show information about Bitcoin Core - Tampilkan informasi tentang Bitcoin Inti + Tampilkan informasi tentang Bitcoin Core &Show / Hide - &Sunjukkan / Menyembungi + &Tampilkan / Sembunyikan Show or hide the main Window @@ -343,15 +371,15 @@ Encrypt the private keys that belong to your wallet - Mengenkripsi kunci-kunci pribadi yang dipunyai dompetmu + Enkripsi private key yang dimiliki dompet Anda Sign messages with your Bitcoin addresses to prove you own them - Tandalah pesanan dengan alamat-alamat Bitcoin Anda supaya membuktikan pesanan itu dikirim oleh Anda + Tanda tangani sebuah pesan menggunakan alamat Bitcoin Anda untuk membuktikan bahwa Anda adalah pemilik alamat tersebut Verify messages to ensure they were signed with specified Bitcoin addresses - Periksakan pesan-pesan supaya menjaminkan ditandatangani oleh alamat Bitcoin yang terperinci + Verifikasi pesan untuk memastikan bahwa pesan tersebut ditanda tangani oleh suatu alamat Bitcoin tertentu &File @@ -375,12 +403,16 @@ Request payments (generates QR codes and bitcoin: URIs) - Permintaan pembayaran (membangkitkan kode QR dan bitcoin: URIs) + Permintaan pembayaran (membuat kode QR dan bitcoin: URIs) &About Bitcoin Core &Mengenai Bitcoin Core + + Modify configuration options for Bitcoin Core + Modifikasi pengaturan konfigurasi untuk Bitcoin Core + Show the list of used sending addresses and labels Tampilkan daftar alamat dan label yang terkirim @@ -395,20 +427,24 @@ &Command-line options - &pilihan Perintah-baris + &pilihan Command-line Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options - Tampilkan pesan bantuan Bitcoin Core untuk memberikan daftar pilihan perintah-baris yang memungkinkan dalam aplikasi Bitcoin + Tampilkan pesan bantuan Bitcoin Core untuk mendapatkan daftar pilihan Command-line %n active connection(s) to Bitcoin network - %n hubungan aktif ke jaringan Bitcoin + %n koneksi aktif ke jaringan Bitcoin No block source available... Sumber blok tidak tersedia... + + Processed %n block(s) of transaction history. + %n blok dari riwayat transaksi diproses. + %n hour(s) %n jam @@ -435,15 +471,15 @@ Last received block was generated %1 ago. - Blok terakhir dibuat %1 lalu. + Blok terakhir yang diterima %1 lalu. Transactions after this will not yet be visible. - Transaksi setelah ini tidak akan ditampilkan + Transaksi setelah ini belum akan terlihat. Error - Gagal + Terjadi sebuah kesalahan Warning @@ -531,7 +567,7 @@ Amount: - Nilai: + Jumlah: Priority: @@ -541,13 +577,17 @@ Fee: Biaya: + + Dust: + Dust: + After Fee: Dengan Biaya: Change: - Uang Kembali: + Kembalian: (un)select all @@ -555,7 +595,7 @@ Tree mode - mode pohon + Tree mode List mode @@ -563,7 +603,15 @@ Amount - Nilai + Jumlah + + + Received with label + Diterima dengan label + + + Received with address + Diterima dengan alamat Date @@ -571,7 +619,7 @@ Confirmations - Konfirmasi-konfirmasi + Konfirmasi Confirmed @@ -591,19 +639,19 @@ Copy amount - Salin nilai + Salin jumlah Copy transaction ID - Menyalinkan ID transaksi + Salin ID transaksi Lock unspent - Kunci terpakai. + Kunci unspent. Unlock unspent - Membuka kunci terpakai + Buka unspent Copy quantity @@ -625,9 +673,13 @@ Copy priority Salin prioritas + + Copy dust + Salin dust + Copy change - Salin uang kembali + Salin kembalian highest @@ -673,6 +725,22 @@ none tidak satupun + + This label turns red if the transaction size is greater than 1000 bytes. + Label ini akan menjadi merah apabila ukuran transaksi melebihi 1000 bytes. + + + This label turns red if the priority is smaller than "medium". + Label ini akan menjadi merah apabila prioritasnya lebih kecil dari "sedang" + + + This label turns red if any recipient receives an amount smaller than %1. + Label ini akan menjadi merah apabila penerima menerima jumlah yang lebih kecil dari %1. + + + Can vary +/- %1 satoshi(s) per input. + Dapat beragam +/- %1 satoshi per input. + yes ya @@ -683,15 +751,15 @@ This means a fee of at least %1 per kB is required. - Berarti perlu biaya lebih dari %1 untuk setiap kB. + Perlu biaya lebih dari %1 untuk setiap kB. Can vary +/- 1 byte per input. - Boleh berbeda +/- 1 byte setiap masukan. + Dapat beragam +/- 1 byte per input. Transactions with higher priority are more likely to get included into a block. - Makin penting transaksinya, makin kemungkinan akan termasuk dalam blok. + Transaksi dengan prioritas lebih tinggi akan lebih cepat dimasukkan kedalam blok. (no label) @@ -699,11 +767,11 @@ change from %1 (%2) - uang kembali dari %1 (%2) + kembalian dari %1 (%2) (change) - (uang kembali) + (kembalian) @@ -718,11 +786,11 @@ The label associated with this address list entry - Label yang terkait dengan daftar alamat yang dimasukkan ini + Label yang terkait dengan daftar alamat The address associated with this address list entry. This can only be modified for sending addresses. - Alamat yang terkait dengan entri buku alamat ini. Hanya dapat diubah untuk alamat pengirim. + Alamat yang terkait dengan daftar alamat. Hanya dapat diubah untuk alamat pengirim. &Address @@ -773,15 +841,15 @@ Directory already exists. Add %1 if you intend to create a new directory here. - Direktori masih ada. Tambahlah %1 kalau ingin membuat direktori baru disini. + Direktori masih ada. Tambahlah %1 apabila Anda ingin membuat direktori baru disini. Path already exists, and is not a directory. - Masih ada Path, dan path itu bukan direktori. + Sudah ada path, dan itu bukan direktori. Cannot create data directory here. - Tidak busa membuat direktori untuk data disini. + Tidak bisa membuat direktori data disini. @@ -794,13 +862,17 @@ version versi + + (%1-bit) + (%1-bit) + About Bitcoin Core Mengenai Bitcoin Core Command-line options - pilihan Perintah-baris + Pilihan Command-line Usage: @@ -808,9 +880,37 @@ command-line options - pilihan perintah-baris + pilihan command-line - + + UI Options: + Pilihan UI: + + + Choose data directory on startup (default: %u) + Pilih direktori data saat memulai (default: %u) + + + Set language, for example "de_DE" (default: system locale) + Pilih bahasa, contoh "id_ID" (default: system locale) + + + Start minimized + Start minimized + + + Set SSL root certificates for payment request (default: -system-) + Pilih sertifikat root SSL untuk permintaan pembayaran {default: -system-) + + + Show splash screen on startup (default: %u) + Tampilkan layar kilat saat memulai (default: %u) + + + Reset all settings changes made over the GUI + Reset semua pengaturan yang dibuat dari GUI + + Intro @@ -821,27 +921,43 @@ Welcome to Bitcoin Core. Selamat Datang ke Bitcoin Core + + As this is the first time the program is launched, you can choose where Bitcoin Core will store its data. + Ini adalah pertama kali program ini dijalankan, Anda dapat memilih dimana Bitcoin Core menyimpan data. + + + Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. + Bitcoin Core akan mengunduh dan menyimpan salinan dari block chain Bitcoin. Setidaknya %1GB data akan disimpan di direktori ini, dan akan terus bertambah. Dompet Anda juga akan disimpan di direktori ini. + Use the default data directory - Menggunakan direktori untuk data yang biasa. + Gunakan direktori data default. Use a custom data directory: - Menggunakan direktori data yang dipilih Anda: + Gunakan direktori pilihan Anda: Bitcoin Core Bitcoin Core + + Error: Specified data directory "%1" cannot be created. + Kesalahan: Direktori data "%1" tidak dapat dibuat. + Error - Gagal + Kesalahan %n GB of free space available - %n GB dari ruang yang tersedia + %n GB ruang kosong tersedia. - + + (of %n GB needed) + (dari %n GB yang dibutuhkan) + + OpenURIDialog @@ -850,7 +966,7 @@ Open payment request from URI or file - Buka permintaan pembayaran dari URI atau arsip + Buka permintaan pembayaran dari URI atau data URI: @@ -858,11 +974,11 @@ Select payment request file - Pilihlah arsip permintaan pembayaran + Pilih data permintaan pembayaran Select payment request file to open - Pilihlah arsip permintaan pembayaran yang Anda ingin membuka + Pilih data permintaan pembayaran yang akan dibuka @@ -875,25 +991,53 @@ &Main &Utama + + Size of &database cache + Ukuran cache &database + MB MB + + Number of script &verification threads + Jumlah script &verification threads + + + Accept connections from outside + Terima koneksi dari luar + + + Allow incoming connections + Perbolehkan koneksi masuk + IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1) Alamat IP proxy (cth. 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. + Minimalisasi aplikasi ketika jendela ditutup. Ketika pilihan ini dipilih, aplikasi akan menutup seluruhnya jika anda memilih Keluar di menu yang tersedia. + + + The user interface language can be set here. This setting will take effect after restarting Bitcoin Core. + Bahasa interface pengguna bisa diubah disini. Pengaturan ini akan memberikan efek setelah Bitcoin Core di-restart. + + + 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 pihak ketika (misalnya sebuah block explorer) yang mumcul dalam tab transaksi sebagai konteks menu. %s dalam URL diganti dengan kode transaksi. URL dipisahkan dengan tanda vertikal |. + Third party transaction URLs - Transaksi URLs pihak ketiga + URL transaksi pihak ketiga Active command-line options that override above options: - pilihan perintah-baris aktif menimpa atas pilihan-pilihan: + Pilihan command-line yang aktif menimpa diatas opsi: Reset all client options to default. - Reset setiap pilihan untuk pilihan biasa + Kembalikan semua pengaturan ke awal. &Reset Options @@ -903,6 +1047,18 @@ &Network &Jaringan + + Automatically start Bitcoin Core after logging in to the system. + Buka Bitcoin Core secara otomatis setelah Anda log-in ke sistem Anda. + + + &Start Bitcoin Core on system login + &Mulai Bitcoin Core saat log-in sistem + + + (0 = auto, <0 = leave that many cores free) + (0 = auto, <0 = leave that many cores free) + W&allet D&ompet @@ -913,7 +1069,7 @@ Enable coin &control features - Nyalain cara &pengaturan koin + Perbolehkan fitur &pengaturan koin 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. @@ -931,6 +1087,10 @@ Map port using &UPnP Petakan port dengan &UPnP + + Connect to the Bitcoin network through a SOCKS5 proxy. + Hubungkan ke jaringan Bitcoin melalui SOCKS5 proxy. + Proxy &IP: IP Proxy: @@ -1595,6 +1755,10 @@ Clear all fields of the form. Hapus informasi dari form. + + Dust: + Dust: + Clear &All Hapus &Semua @@ -1691,6 +1855,10 @@ (no label) (tidak ada label) + + Copy dust + Salin dust + Are you sure you want to send? Apakah Anda yakin ingin kirim? diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 94e4e08e6..d9122a35f 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -2854,7 +2854,7 @@ Per specificare più URL separarli con una barra verticale "|". UnitDisplayStatusBarControl Unit to show amounts in. Click to select another unit. - Unità con cui visualizzare gli importi. Clicca per selezionare un altra unità. + Unità con cui visualizzare gli importi. Clicca per selezionare un'altra unità. diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts index ce48ce249..0018ebb37 100644 --- a/src/qt/locale/bitcoin_ko_KR.ts +++ b/src/qt/locale/bitcoin_ko_KR.ts @@ -167,6 +167,10 @@ Are you sure you wish to encrypt your wallet? 지갑 암호화를 허용하시겠습니까? + + Bitcoin Core 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. 중요: 본인 지갑파일에서 만든 예전 백업들은 새로 생성한 암호화 된 지갑 파일로 교체됩니다. 보안상 이유로 이전에 암호화 하지 않은 지갑 파일 백업은 사용할 수 없게 되니 빠른 시일 내로 새로 암호화 된 지갑을 사용하시기 바랍니다. @@ -179,6 +183,10 @@ Wallet encrypted 지갑 암호화 완료 + + 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> 정하세요. + Enter the old passphrase and new passphrase to the wallet. 지갑의 기존 암호와 새로운 암호를 입력해주세요. @@ -214,7 +222,15 @@ BanTableModel - + + IP/Netmask + IP주소/넷마스크 + + + Banned Until + 다음과 같은 상황이 될 때까지 계정 정지됩니다. + + BitcoinGUI @@ -393,6 +409,10 @@ &About Bitcoin Core &비트코인 코어 소개 + + Modify configuration options for Bitcoin Core + 비트코인 코어를 위한 설정 옵션을 수정하세요. + Show the list of used sending addresses and labels 한번 이상 사용된 보내는 주소와 주소 제목의 목록을 보여줍니다. @@ -413,10 +433,18 @@ Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options 사용할 수 있는 비트코인 명령어 옵션 목록을 가져오기 위해 Bitcoin-Qt 도움말 메시지를 표시합니다. + + %n active connection(s) to Bitcoin network + 비트코인 네트워크에 %n개의 연결이 활성화되어 있습니다. + No block source available... 사용 가능한 블록이 없습니다... + + Processed %n block(s) of transaction history. + %n 블럭 만큼의 거래 내역을 처리하였습니다. + %n hour(s) %n시간 @@ -577,6 +605,14 @@ Amount 거래량 + + Received with label + 레이블과 함께 수신되었습니다. + + + Received with address + 주소와 함께 수신되었습니다. + Date 날짜 @@ -681,6 +717,10 @@ none 없음 + + This label turns red if the transaction size is greater than 1000 bytes. + 이 라벨은 1000바이트 이상의 거래가 이루어지면 붉게 변합니다. + yes diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts index f6c9fac39..d54eff19e 100644 --- a/src/qt/locale/bitcoin_pl.ts +++ b/src/qt/locale/bitcoin_pl.ts @@ -91,7 +91,7 @@ Exporting Failed - Błąd przy próbie eksportu + Błąd przy próbie eksportowania There was an error trying to save the address list to %1. Please try again. @@ -371,7 +371,7 @@ Encrypt the private keys that belong to your wallet - Szyfruj klucze prywatne, które są w Twoim portfelu + Szyfruj klucze prywatne, które są w twoim portfelu Sign messages with your Bitcoin addresses to prove you own them @@ -403,7 +403,7 @@ Request payments (generates QR codes and bitcoin: URIs) - Żądaj płatności (generuje kod QR oraz bitcoin URI) + Żądaj płatności (generuje kod QR oraz bitcoinowe URI) &About Bitcoin Core @@ -495,7 +495,7 @@ Catching up... - Synchronizuję się... + Trwa synchronizacja… Date: %1 @@ -1137,7 +1137,7 @@ &Minimize to the tray instead of the taskbar - &Minimalizuj do paska przy zegarku zamiast do paska zadań + &Minimalizuj do zasobnika systemowego zamiast do paska zadań M&inimize on close @@ -2391,7 +2391,7 @@ SplashScreen Bitcoin Core - Rdzeń Bitcoin + Rdzeń Bitcoina The Bitcoin Core developers @@ -3389,7 +3389,7 @@ Do not keep transactions in the mempool longer than <n> hours (default: %u) - Nie trzymaj w pamięci transakcji starszych niż <n> godzin (domyślnie: %u) + Nie trzymaj w pamięci transakcji starszych niż <n> godz. (domyślnie: %u) Error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts index ffed44a61..d44a049a6 100644 --- a/src/qt/locale/bitcoin_pt_PT.ts +++ b/src/qt/locale/bitcoin_pt_PT.ts @@ -3,7 +3,7 @@ AddressBookPage Right-click to edit address or label - Clique á direita para editar endereço ou rótulo + Clique com o botão direiro para editar endereço ou rótulo Create a new address @@ -222,7 +222,15 @@ BanTableModel - + + IP/Netmask + IP/Máscara de Rede + + + Banned Until + Banido Até + + BitcoinGUI @@ -874,7 +882,35 @@ command-line options opções da linha de comandos - + + UI Options: + Opções de Interface + + + Choose data directory on startup (default: %u) + Escolha a pasta de dados ao iniciar (por defeito: %u) + + + Set language, for example "de_DE" (default: system locale) + Definir linguagem, por exemplo "pt_PT" (por defeito: linguagem do sistema) + + + Start minimized + Iniciar minimizado + + + Set SSL root certificates for payment request (default: -system-) + Configurar certificados SSL root para pedido de pagamento (default: -system-) + + + Show splash screen on startup (default: %u) + Mostrar imagem ao iniciar (por defeito: %u) + + + Reset all settings changes made over the GUI + Restabelecer opções de interface predefinidas + + Intro @@ -1072,6 +1108,34 @@ Port of the proxy (e.g. 9050) Porto do proxy (p.ex. 9050) + + Used for reaching peers via: + Usado para alcançar nós via: + + + Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type. + Mostra, caso o proxy SOCKS5 predefinido submetido seja usado para alcançar nós através deste tipo de rede. + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services. + Ligar à rede Bitcoin através de um proxy SOCKS5 separado para utilizar os serviços ocultos do Tor. + + + Use separate SOCKS5 proxy to reach peers via Tor hidden services: + Utilizar um proxy SOCKS5 separado para alcançar nós via serviços ocultos do Tor: + &Window &Janela @@ -1442,6 +1506,22 @@ Current number of blocks Número actual de blocos + + Memory Pool + Memory Pool + + + Current number of transactions + Número actual de transacções + + + Memory usage + Utilização de memória + + + Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files. + Abrir o ficheiro de registo de depuração da pasta de dados actual. Isto pode demorar alguns segundos para ficheiros de registo grandes. + Received Recebido @@ -1452,7 +1532,11 @@ &Peers - &Conexção + &Conexão + + + Banned peers + Nós banidos Select a peer to view detailed information. @@ -1466,6 +1550,18 @@ Version Versão + + Starting Block + Bloco Inicial + + + Synced Headers + Cabeçalhos Sincronizados + + + Synced Blocks + Blocos Sincronizados + User Agent Agente Usuário @@ -1480,7 +1576,7 @@ Connection Time - Tempo de Conexção + Tempo de Ligação Last Send @@ -1494,6 +1590,14 @@ Ping Time Tempo de Latência + + Ping Wait + Espera do Ping + + + Time Offset + Fuso Horário + Last block time Data do último bloco @@ -1538,6 +1642,34 @@ Clear console Limpar consola + + &Disconnect Node + &Desligar Nó + + + Ban Node for + Banir Nó por + + + 1 &hour + 1 &hora + + + 1 &day + 1 &dia + + + 1 &week + 1 &semana + + + 1 &year + 1 &ano + + + &Unban Node + &Desbloquear Nó + Welcome to the Bitcoin Core RPC console. Bem-vindo à consola RPC do Bitcoin Core. @@ -1566,6 +1698,10 @@ %1 GB %1 GB + + (node id: %1) + (id nó: %1) + via %1 via %1 @@ -1582,6 +1718,14 @@ Outbound Saída + + Yes + Sim + + + No + Não + Unknown Desconhecido @@ -1950,6 +2094,10 @@ Copy change Copiar alteração + + Total Amount %1 + Quantia Total %1 + or ou @@ -1974,10 +2122,26 @@ 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! Isto poderá acontecer se algumas das moedas na sua carteira já tiverem sido gastas, se por exemplo tiver usado uma cópia do ficheiro wallet.dat e as moedas tiverem sido gastas na cópia mas não tiverem sido marcadas como gastas aqui. + + A fee higher than %1 is considered an absurdly high fee. + Uma taxa superior a %1 é considerada muito alta. + Payment request expired. Pedido de pagamento expirou. + + Pay only the required fee of %1 + Pagar somente a taxa mínima de %1 + + + The recipient address is not valid. Please recheck. + O endereço de destino não é válido. Por favor, verifique novamente. + + + Duplicate address found: addresses should only be used once each. + Endereço duplicado encontrado: cada endereço só poderá ser usado uma vez. + Warning: Invalid Bitcoin address Aviso: Endereço Bitcoin inválido @@ -2049,10 +2213,26 @@ Remove this entry Remover esta entrada + + 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 ao montante enviado. O destinatário irá receber menos bitcoins do que as que introduziu no campo montante. Caso sejam seleccionados múltiplos destinatários, a taxa será repartida equitativamente. + + + S&ubtract fee from amount + S&ubtrair taxa ao montante + Message: Mensagem: + + This is an unauthenticated payment request. + Pedido de pagamento não autenticado. + + + This is an authenticated payment request. + Pedido de pagamento autenticado. + Enter a label for this address to add it to the list of used addresses Introduza um rótulo para este endereço para o adicionar à sua lista de endereços usados @@ -2091,6 +2271,10 @@ &Sign Message &Assinar Mensagem + + 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. + Pode assinar mensagens com os seus endereços para provar que são seus. Tenha atenção ao assinar mensagens ambíguas, pois ataques de phishing podem tentar enganá-lo de modo a assinar a sua identidade para os atacantes. Apenas assine declarações detalhadas com as quais concorde. + The Bitcoin address to sign the message with O endereço Bitcoin para designar a mensagem @@ -2143,6 +2327,10 @@ &Verify Message &Verificar Mensagem + + 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! + Introduza o endereço de assinatura, mensagem (assegure-se que copia quebras de linha, espaços, tabulações, etc. exactamente) e assinatura abaixo para verificar a mensagem. Tenha atenção para não ler mais na assinatura do que o que estiver na mensagem assinada, para evitar ser enganado por um atacante que se encontre entre si e quem assinou a mensagem. + The Bitcoin address the message was signed with O endereço Bitcoin com que a mensagem foi designada @@ -2494,6 +2682,10 @@ Whether or not a watch-only address is involved in this transaction. Desde que um endereço de modo-verificação faça parte ou não desta transação + + User-defined intent/purpose of the transaction. + Motivo da transacção definido pelo utilizador. + Amount removed from or added to balance. Quantia retirada ou adicionada ao saldo. @@ -2573,6 +2765,10 @@ Copy transaction ID Copiar ID da Transação + + Copy raw transaction + Copiar dados brutos da transacção + Edit label Editar rótulo @@ -2720,10 +2916,50 @@ Accept command line and JSON-RPC commands Aceitar comandos de linha de comandos e JSON-RPC + + If <category> is not supplied or if <category> = 1, output all debugging information. + Se <category> não é fornecida ou <category> = 1, imprimir toda a informação de depuração. + + + Maximum total fees (in %s) to use in a single wallet transaction; setting this too low may abort large transactions (default: %s) + Total máximo de taxas (em %s) a utilizar numa única transacção; definir este valor demasiado baixo pode abortar transacções grandes (padrão: %s) + + + Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly. + Por favor verifique que a data e hora do seu computador estão correctas! Se o seu relógio não estiver certo o Bitcoin Core não irá funcionar correctamente. + + + Prune configured below the minimum of %d MiB. Please use a higher number. + Poda configurada abaixo do mínimo de %d MiB. Por favor, utilize um valor mais elevado. + + + 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 requisitos de armazenamento podando (eliminando) blocos antigos. Este modo é incompatível com -txindex e -rescan. Aviso: Reverter esta opção requer um novo descarregamento da cadeia de blocos completa. (padrão: 0 = desactivar poda de blocos, >%u = tamanho desejado em MiB para utilizar em ficheiros de blocos) + + + Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again. + Reanálises não são possíveis em modo poda. Para isso terá de usar -reindex, que irá descarregar novamente a cadeia de blocos. + + + Error: A fatal internal error occurred, see debug.log for details + Erro: Um erro fatal interno ocorreu, verificar debug.log para mais informação + + + Fee (in %s/kB) to add to transactions you send (default: %s) + Taxa (em %s/kB) a adicionar às transacções que envia (padrão: %s) + + + Pruning blockstore... + A podar a blockstore... + Run in the background as a daemon and accept commands Correr o processo em segundo plano e aceitar comandos + + Unable to start HTTP server. See debug log for details. + Não é possível iniciar o servidor HTTP. Verifique o debug.log para detalhes. + Accept connections from outside (default: 1 if no -proxy or -connect) Aceitar ligações externas (padrão: 1 sem -proxy ou -connect) @@ -2748,6 +2984,10 @@ 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) + + 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 + A base de dados de blocos contém um bloco que aparenta ser do futuro. Isto pode ser causado por uma data incorrecta definida no seu computador. Reconstrua apenas a base de dados de blocos caso tenha a certeza de que a data e hora do seu computador estão correctos. + This is a pre-release test build - use at your own risk - do not use for mining or merchant applications Esta é uma versão de testes pré-lançamento - use à sua responsabilidade - não usar para minar ou aplicações comerciais @@ -2756,6 +2996,18 @@ Unable to bind to %s on this computer. Bitcoin Core is probably already running. Incapaz de vincular à porta %s neste computador. O Bitcoin Core provavelmente já está a correr. + + Use UPnP to map the listening port (default: 1 when listening and no -proxy) + Usar UPnP para mapear a porta de escuta (padrão: 1 ao escutar e sem -proxy) + + + WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected) + AVISO: gerado um número anormalmente elevado de blocos, %d blocos recebidos nas últimas %d horas (%d esperados) + + + WARNING: check your network connection, %d blocks received in the last %d hours (%d expected) + AVISO: verifique a sua conexão à rede, %d blocos recebidos nas últimas %d horas (%d esperados) + Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. Aviso: A rede não parece estar completamente de acordo! Parece que alguns mineiros estão com dificuldades técnicas. @@ -2772,6 +3024,10 @@ Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. Ligações na lista branca conectam desde a seguinte netmask ou endereço IP. Posse ser especificado varias vezes. + + -maxmempool must be at least %d MB + -maxmempool deverá ser pelo menos %d MB + <category> can be: <categoria> pode ser: @@ -2786,7 +3042,7 @@ Connection options: - Opcões de conexção: + Opcões de ligação: Corrupted block database detected @@ -2804,6 +3060,22 @@ Do you want to rebuild the block database now? Deseja reconstruir agora a base de dados de blocos. + + Enable publish hash block in <address> + Activar publicação do hash do bloco em <address> + + + Enable publish hash transaction in <address> + Activar publicação do hash da transacção em <address> + + + Enable publish raw block in <address> + Activar publicação de dados brutos do bloco em <address> + + + Enable publish raw transaction in <address> + Activar publicação de dados brutos da transacção em <address> + Error initializing block database Erro ao inicializar a cadeia de blocos @@ -2840,6 +3112,10 @@ Invalid -onion address: '%s' Endereço -onion inválido: '%s' + + Keep the transaction memory pool below <n> megabytes (default: %u) + Manter a memory pool de transacções abaixo de <n> megabytes (padrão: %u) + Not enough file descriptors available. Os descritores de ficheiros disponíveis são insuficientes. @@ -2848,6 +3124,14 @@ Only connect to nodes in network <net> (ipv4, ipv6 or onion) Somente conectar aos nodes na rede <net> (ipv4, ipv6 ou onion) + + Prune cannot be configured with a negative value. + Poda não pode ser configurada com um valor negativo. + + + Prune mode is incompatible with -txindex. + Modo poda é incompatível com -txindex. + Set database cache size in megabytes (%d to %d, default: %d) Definir o tamanho da cache de base de dados em megabytes (%d a %d, padrão: %d) @@ -2860,10 +3144,26 @@ Specify wallet file (within data directory) Especifique ficheiro de carteira (dentro da pasta de dados) + + Unsupported argument -benchmark ignored, use -debug=bench. + Argumento não suportado -benchmark ignorado, use -debug=bench. + + + Unsupported argument -debugnet ignored, use -debug=net. + Argumento não suportado -debugnet ignorado, use -debug=net. + + + Unsupported argument -tor found, use -onion. + Argumento não suportado -tor encontrado, use -onion. + Use UPnP to map the listening port (default: %u) Use UPnP para mapear a porto de escuta (default: %u) + + User Agent comment (%s) contains unsafe characters. + Comentário no User Agent (%s) contém caracteres inseguros. + Verifying blocks... A verificar blocos... @@ -2904,22 +3204,94 @@ Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running. Impossível trancar a pasta de dados %s. Provavelmente o Bitcoin Core já está a ser executado. + + Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) + Crie ficheiros novos com as permisões predefinidas do sistema, em vez de umask 077 (apenas eficaz caso a funcionalidade carteira esteja desactivada) + + + Discover own IP addresses (default: 1 when listening and no -externalip or -proxy) + Descobrir o próprio endereço IP (padrão: 1 ao escutar e sem -externalip ou -proxy) + + + Error: Listening for incoming connections failed (listen returned error %s) + Erro: A escuta de ligações de entrada falhou (escuta devolveu erro %s) + Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) Executar comando quando um alerta relevante for recebido ou em caso de uma divisão longa da cadeia de blocos (no comando, %s é substituído pela mensagem) + + Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s) + Taxas (em %s/kB) abaixo deste valor são consideradas nulas para propagação, mineração e criação de transacções (padrão: %s) + + + If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u) + Caso o paytxfee não seja definido, inclua uma taxa suficiente para que as transacções comecem a ser confirmadas, 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) + Montante inválido para -maxtxfee=<amount>: '%s' (deverá ser, no mínimo , a taxa mínima de propagação de %s, de modo a evitar transações bloqueadas) + + + Maximum size of data in data carrier transactions we relay and mine (default: %u) + Tamanho máximo dos dados em transacções que incluem dados que propagamos e mineramos (padrão: %u) + + + Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect) + Encontrar pares usando DNS lookup, caso o número de endereços seja reduzido (padrão: 1 excepto -connect) + + + Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u) + Usar credenciais aleatórias por cada ligação proxy. Permite que o Tor use stream isolation (padrão: %u) + Set maximum size of high-priority/low-fee transactions in bytes (default: %d) Definir tamanho máximo de transações com alta-prioridade/baixa-taxa em bytes (por defeito: %d) + + Set the number of threads for coin generation if enabled (-1 = all cores, default: %d) + Definir o número threads para a geração de moedas, caso activo (-1 = todos os cores, padrão: %d) + + + The transaction amount is too small to send after the fee has been deducted + O montante da transacção é demasiado baixo após a dedução da taxa + + + 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 produto inclui software desenvolvido pelo OpenSSL Project para utilização no OpenSSL Toolkit <https://www.openssl.org/> e software criptográfico escrito por Eric Young e software UPnP escrito por Thomas Bernard. + + + You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain + É necessário reconstruir a base de dados usando -reindex para sair do modo poda. Isto irá descarregar novamente a blockchain completa + (default: %u) (por defeito: %u) + + Accept public REST requests (default: %u) + Aceitar pedidos REST públicos (padrão: %u) + + + Activating best chain... + A activar a melhor cadeia... + + + Attempt to recover private keys from a corrupt wallet.dat on startup + Tentar recuperar chaves privadas de um wallet.dat corrompido ao iniciar + + + Automatically create Tor hidden service (default: %d) + Criar serviço Tor oculto automaticamente (padrão: %d) + Cannot resolve -whitebind address: '%s' Não foi possível resolver o endereço -whitebind: '%s' + + Connect through SOCKS5 proxy + Ligar através de um proxy SOCKS5 + Copyright (C) 2009-%i The Bitcoin Core Developers Copyright (C) 2009-%i Os Programadores do Bitcoin Core @@ -2928,10 +3300,22 @@ Error loading wallet.dat: Wallet requires newer version of Bitcoin Core Erro ao carregar wallet.dat: A Carteira requer uma versão mais recente do Bitcoin Core + + Error reading from database, shutting down. + Erro ao ler da base de dados, encerrando. + + + Imports blocks from external blk000??.dat file on startup + Importar blocos de um ficheiro blk000??.dat externo ao iniciar + Information Informação + + Initialization sanity check failed. Bitcoin Core is shutting down. + Falha na prova real inicial. Bitcoin Core está a desligar. + Invalid amount for -maxtxfee=<amount>: '%s' Quantia inválida para -maxtxfee=<quantidade>: '%s' @@ -2944,10 +3328,58 @@ Invalid amount for -mintxfee=<amount>: '%s' Quantia inválida para -mintxfee=<quantidade>: '%s' + + Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s) + Montante inválido para -paytxfee=<amount>: '%s' (deverá ser no mínimo %s) + + + Invalid netmask specified in -whitelist: '%s' + Máscara de rede inválida especificada em -whitelist: '%s' + + + Keep at most <n> unconnectable transactions in memory (default: %u) + Manter no máximo <n> transacções órfãs em memória (padrão: %u) + + + Need to specify a port with -whitebind: '%s' + Necessário especificar uma porta com -whitebind: '%s' + + + Node relay options: + Opções de propagação de nós: + + + RPC server options: + Opções do servidor RPC: + + + Rebuild block chain index from current blk000??.dat files on startup + Reconstruir a cadeia de blocos a partir dos ficheiros blk000??.dat actuais ao iniciar + + + Receive and display P2P network alerts (default: %u) + Receber e mostrar alertas da rede P2P (padrão: %u) + + + Reducing -maxconnections from %d to %d, because of system limitations. + Reduzindo -maxconnections de %d para %d, devido a limitações no sistema. + + + Rescan the block chain for missing wallet transactions on startup + Procurar transacções em falta na cadeia de blocos ao iniciar + Send trace/debug info to console instead of debug.log file Enviar informação de rastreio/depuração para a consola e não para o ficheiro debug.log + + Send transactions as zero-fee transactions if possible (default: %u) + Enviar como uma transacção a custo zero se possível (padrão: %u) + + + Show all debugging options (usage: --help -help-debug) + Mostrar todas as opções de depuração (uso: --help -help-debug) + Shrink debug.log file on client startup (default: 1 when no -debug) Encolher ficheiro debug.log ao iniciar o cliente (por defeito: 1 sem -debug definido) @@ -2956,6 +3388,22 @@ Signing transaction failed Falhou assinatura da transação + + The transaction amount is too small to pay the fee + O montante da transacção é demasiado baixo para pagar a taxa + + + This is experimental software. + Isto é software experimental. + + + Tor control port password (default: empty) + Password de controlo da porta Tor (padrão: vazio) + + + Tor control port to use if onion listening enabled (default: %s) + Porta de controlo Tor a utillizar caso a escuta onion esteja activa (padrão: %s) + Transaction amount too small Quantia da transação é muito baixa @@ -2964,10 +3412,22 @@ Transaction amounts must be positive Quantia da transação deverá ser positiva + + Transaction too large for fee policy + Transacção demasiado grande para a política de taxas + Transaction too large Transação grande demais + + Unable to bind to %s on this computer (bind returned error %s) + Incapaz de vincular à porta %s neste computador (vínculo retornou erro %s) + + + Upgrade wallet to latest format on startup + Actualizar carteira para o formato mais recente ao iniciar + Username for JSON-RPC connections Nome de utilizador para ligações JSON-RPC @@ -2980,10 +3440,18 @@ Warning Aviso + + Whether to operate in a blocks only mode (default: %u) + Modo apenas blocos (padrão: %u) + Zapping all transactions from wallet... A limpar todas as transações da carteira... + + ZeroMQ notification options: + Opções de notificação ZeroMQ: + wallet.dat corrupt, salvage failed wallet.dat corrompido, recuperação falhou @@ -3012,14 +3480,90 @@ Error loading wallet.dat: Wallet corrupted Erro ao carregar wallet.dat: Carteira danificada + + (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) + (1 = guardar metadados da transacção ex: proprietário da conta e informação do pedido de pagamento, 2 = descartar metadados da transacção) + + + -maxtxfee is set very high! Fees this large could be paid on a single transaction. + -maxtxfee está definido com um valor muito alto! Taxas desta magnitude podem ser pagas numa única transacção. + + + -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction. + -paytxfee está definido com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transacção. + + + Do not keep transactions in the mempool longer than <n> hours (default: %u) + Não guardar transacções na mempool por mais de <n> horas (padrão: %u) + + + Error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect. + Erro ao ler wallet.dat! Todas as chaves foram lidas correctamente, mas os dados das transacções ou do livro de endereços podem estar em falta ou incorrectos. + + + Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s) + Taxas (em %s/kB) abaixo deste valor são consideradas nulas para a criação de transacções (padrão: %s) + + + How thorough the block verification of -checkblocks is (0-4, default: %u) + Minuciosidade da verificação de blocos para -checkblocks é (0-4, padrão: %u) + + + Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u) + Manter um índice de transacções completo, usado pela chamada RPC getrawtransaction (padrão: %u) + + + Number of seconds to keep misbehaving peers from reconnecting (default: %u) + Número de segundos a impedir que pares com comportamento indesejado se liguem de novo (padrão: %u) + + + Output debugging information (default: %u, supplying <category> is optional) + Informação de depuração (padrão: %u, fornecer uma <category> é opcional) + + + Support filtering of blocks and transaction with bloom filters (default: %u) + Suportar filtragem de blocos e transacções com fitros bloom (padrão: %u) + + + Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d) + Tenta manter o tráfego externo abaixo do limite especificado (em MiB por 24h), 0 = sem limite (padrão: %d) + + + Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported. + Encontrado um argumento não suportado -socks. Definir a versão do SOCKS já não é possível, apenas proxies SOCKS5 são suportados. + + + Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s) + Use um proxy SOCKS5 separado para alcançar pares via serviços ocultos do Tor (padrão: %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 + Username e hash da password para ligações JSON-RPC. O campo <userpw> está no formato: <USERNAME>:<SALT>$<HASH>. Um script python está incluido em share/rpcuser. Esta opção pode ser especificada múltiplas vezes. + (default: %s) (por defeito: %s) + + Always query for peer addresses via DNS lookup (default: %u) + Usar sempre DNS lookup para encontrar pares (padrão: %u) + Error loading wallet.dat Erro ao carregar wallet.dat + + Generate coins (default: %u) + Gerar moedas (padrão: %u) + + + How many blocks to check at startup (default: %u, 0 = all) + Quantos blocos verificar ao inicializar (padrão: %u, 0 = todos) + + + Include IP addresses in debug output (default: %u) + Incluir endereços IP na informação de depuração (padrão: %u) + Invalid -proxy address: '%s' Endereço -proxy inválido: '%s' @@ -3036,6 +3580,10 @@ Maintain at most <n> connections to peers (default: %u) Manter no máximo <n> ligações a outros nós da rede (por defeito: %u) + + Make the wallet broadcast transactions + Colocar a carteira a transmitir transacções + Maximum per-connection receive buffer, <n>*1000 bytes (default: %u) Maximo armazenamento intermédio de recepção por ligação, <n>*1000 bytes (por defeito: %u) @@ -3048,6 +3596,14 @@ Prepend debug output with timestamp (default: %u) Adicionar data e hora à informação de depuração (por defeito: %u) + + Relay and mine data carrier transactions (default: %u) + Propagar e minerar transacções que incluem dados (padrão: %u) + + + Relay non-P2SH multisig (default: %u) + Propagar não-P2SH multisig (padrão: %u) + Set key pool size to <n> (default: %u) Definir o tamanho da memória de chaves para <n> (por defeito: %u) @@ -3068,6 +3624,18 @@ Specify connection timeout in milliseconds (minimum: 1, default: %d) Especificar tempo de espera da ligação em milissegundos (mínimo 1, por defeito: %d) + + Specify pid file (default: %s) + Especificar ficheiro pid (padrão: %s) + + + Spend unconfirmed change when sending transactions (default: %u) + Gastar troco não confirmado ao enviar transacções (padrão: %u) + + + Threshold for disconnecting misbehaving peers (default: %u) + Tolerância para desligar nós com comportamento indesejável (padrão: %u) + Unknown network specified in -onlynet: '%s' Rede desconhecida especificada em -onlynet: '%s' diff --git a/src/qt/locale/bitcoin_ro.ts b/src/qt/locale/bitcoin_ro.ts new file mode 100644 index 000000000..11ac69f0f --- /dev/null +++ b/src/qt/locale/bitcoin_ro.ts @@ -0,0 +1,169 @@ + + + AddressBookPage + + Right-click to edit address or label + Click dreapta pentru a modifica adresa o eticheta + + + Create a new address + Crează o nouă adresă + + + &New + &Nou + + + Copy the currently selected address to the system clipboard + Copiază în notițe adresa selectată în prezent + + + &Copy + &Copiază + + + C&lose + Î&nchide + + + &Copy Address + &Copiază Adresa + + + Delete the currently selected address from the list + Șterge adresa curentă selectata din listă + + + Export the data in the current tab to a file + Exportă datele din tabul curent in fisier + + + &Export + &Exportă + + + Choose the address to send coins to + Indică adresa de expediere a monedelor + + + Choose the address to receive coins with + Indică adresa de a primi monedele + + + + AddressTableModel + + + AskPassphraseDialog + + + BanTableModel + + + BitcoinGUI + + + ClientModel + + + CoinControlDialog + + + EditAddressDialog + + + FreespaceChecker + + + HelpMessageDialog + + + Intro + + + OpenURIDialog + + + OptionsDialog + + + OverviewPage + + + PaymentServer + + + PeerTableModel + + + QObject + + + QRImageWidget + + + RPCConsole + + + ReceiveCoinsDialog + + + ReceiveRequestDialog + + + RecentRequestsTableModel + + + SendCoinsDialog + + + SendCoinsEntry + + + ShutdownWindow + + + SignVerifyMessageDialog + + + SplashScreen + + + TrafficGraphWidget + + + TransactionDesc + + + TransactionDescDialog + + + TransactionTableModel + + + TransactionView + + + UnitDisplayStatusBarControl + + + WalletFrame + + + WalletModel + + + WalletView + + &Export + &Exportă + + + Export the data in the current tab to a file + Exportă datele din tabul curent in fisier + + + + bitcoin-core + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts index 0b80667cf..17a28a680 100644 --- a/src/qt/locale/bitcoin_ro_RO.ts +++ b/src/qt/locale/bitcoin_ro_RO.ts @@ -27,7 +27,7 @@ &Copy Address - &Copiază adresa + &Copiază Adresa Delete the currently selected address from the list @@ -43,15 +43,15 @@ &Delete - Şterge + &Şterge Choose the address to send coins to - Alegeţi adresa unde vreţi să trimiteţi monezile + Alegeţi adresa unde vreţi să trimiteţi monedele Choose the address to receive coins with - Alegeţi adresa unde vreţi să primiţi monezile + Alegeţi adresa unde vreţi să primiţi monedele C&hoose @@ -67,7 +67,7 @@ These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. - Acestea sînt adresele dumneavoastră Bitcoin pentru efectuarea plăţilor. Verificaţi întotdeauna cantitatea şi adresa de primire înainte de a trimite monezi. + Acestea sînt adresele dumneavoastră Bitcoin pentru efectuarea plăţilor. Verificaţi întotdeauna cantitatea şi adresa de primire înainte de a trimite monede. These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction. @@ -555,7 +555,7 @@ CoinControlDialog Coin Selection - Selectarea monezii + Selectarea monedei Quantity: @@ -906,7 +906,11 @@ Show splash screen on startup (default: %u) Afişează ecran splash la pornire (implicit: %u) - + + Reset all settings changes made over the GUI + Resetează toate schimbările făcute în GUI + + Intro @@ -1043,6 +1047,10 @@ &Network Reţea + + Automatically start Bitcoin Core after logging in to the system. + Porneşte automat Bitcoin Core după logarea în sistem. + &Start Bitcoin Core on system login Porneşte Nucleul Bitcoin la pornirea sistemului @@ -1099,6 +1107,18 @@ Port of the proxy (e.g. 9050) Portul proxy (de exemplu: 9050) + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + &Window &Fereastră @@ -1469,6 +1489,14 @@ Current number of blocks Numărul curent de blocuri + + Current number of transactions + Numărul curent de tranzacţii + + + Memory usage + Memorie folosită + Received Recepţionat @@ -1485,6 +1513,10 @@ Select a peer to view detailed information. Selectaţi un partener pentru a vedea informaţiile detaliate. + + Whitelisted + Whitelisted + Direction Direcţie @@ -1493,6 +1525,18 @@ Version Versiune + + Starting Block + Bloc de început + + + Synced Headers + Headere Sincronizate + + + Synced Blocks + Blocuri Sincronizate + User Agent Agent utilizator @@ -1561,6 +1605,26 @@ Clear console Curăţă consola + + &Disconnect Node + &Deconectare nod + + + 1 &hour + 1 &oră + + + 1 &day + 1 &zi + + + 1 &week + 1 &săptămână + + + 1 &year + 1 &an + Welcome to the Bitcoin Core RPC console. Bun venit la consola Nucleului Bitcoin RPC. @@ -1605,6 +1669,14 @@ Outbound Ieşire + + Yes + Da + + + No + Nu + Unknown Necunoscut @@ -1953,6 +2025,10 @@ Copy change Copiază rest + + Total Amount %1 + Suma totală %1 + or sau @@ -1985,6 +2061,10 @@ The recipient address is not valid. Please recheck. Adresa destinatarului nu este validă, vă rugăm să o verificaţi. + + Duplicate address found: addresses should only be used once each. + Adresă duplicat găsită: fiecare adresă ar trebui folosită o singură dată. + Warning: Invalid Bitcoin address Atenţie: Adresa bitcoin nevalidă! @@ -2353,7 +2433,7 @@ 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. - Monezile generate trebuie să crească %1 blocuri înainte să poată fi cheltuite. Cînd aţi generat acest bloc, a fost transmis reţelei pentru a fi adaugat la lanţul de blocuri. Aceasta se poate întîmpla ocazional dacă alt nod generează un bloc la numai cîteva secunde de al dvs. + Monedele generate trebuie să crească %1 blocuri înainte să poată fi cheltuite. Cînd aţi generat acest bloc, a fost transmis reţelei pentru a fi adaugat la lanţul de blocuri. Aceasta se poate întîmpla ocazional dacă alt nod generează un bloc la numai cîteva secunde de al dvs. Debug information @@ -2879,6 +2959,10 @@ Wallet options: Opţiuni portofel: + + Warning: This version is obsolete; upgrade required! + Atenţie: această versiune este depăşită, actualizarea este necesară ! + You need to rebuild the database using -reindex to change -txindex Trebuie să reconstruiţi baza de date folosind -reindex pentru a schimba -txindex diff --git a/src/qt/locale/bitcoin_ru_RU.ts b/src/qt/locale/bitcoin_ru_RU.ts index 53a1c1d8a..88f3dd406 100644 --- a/src/qt/locale/bitcoin_ru_RU.ts +++ b/src/qt/locale/bitcoin_ru_RU.ts @@ -1,6 +1,50 @@ AddressBookPage + + Create a new address + Создать новый адрес + + + &New + Новый + + + Copy the currently selected address to the system clipboard + Скопировать выделенный адрес в буфер + + + &Copy + Копировать + + + C&lose + Закрыть + + + &Copy Address + Копировать адрес + + + Delete the currently selected address from the list + Удалить выбранный адрес из списка + + + Export the data in the current tab to a file + Экспортировать данные текущей вкладки в файл + + + &Export + Экспортировать + + + &Delete + Удалить + + + C&hoose + Выбрать + AddressTableModel @@ -226,6 +270,14 @@ WalletView + + &Export + Экспорт + + + Export the data in the current tab to a file + Экспортировать данные текущей вкладки в файл + bitcoin-core diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts index 8c779cbe9..32ac3950d 100644 --- a/src/qt/locale/bitcoin_sk.ts +++ b/src/qt/locale/bitcoin_sk.ts @@ -63,7 +63,7 @@ Receiving addresses - Adresa prijatia + Prijímacia adresa These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins. @@ -222,7 +222,15 @@ BanTableModel - + + IP/Netmask + IP/Maska stiete + + + Banned Until + Blokovaný do + + BitcoinGUI @@ -874,7 +882,35 @@ command-line options voľby príkazového riadku - + + UI Options: + Možnosti používateľského rozhrania: + + + Choose data directory on startup (default: %u) + Vyberte dátový priečinok pri štarte (predvolené: %u) + + + Set language, for example "de_DE" (default: system locale) + Nastavte jazyk, napríklad "de_DE" (predvolené: podľa systému) + + + Start minimized + Spustiť minimalizované + + + Set SSL root certificates for payment request (default: -system-) + Nastaviť SSL root certifikáty pre vyžiadanie platby (predvolené: -system-) + + + Show splash screen on startup (default: %u) + Zobraziť uvítaciu obrazovku pri štarte (predvolené: %u) + + + Reset all settings changes made over the GUI + Reštartovať všetky nastavenia urobené v používateľskom rozhraní. + + Intro @@ -1009,7 +1045,7 @@ &Network - Sieť + &Sieť Automatically start Bitcoin Core after logging in to the system. @@ -1025,7 +1061,7 @@ W&allet - Peňaženka + &Peňaženka Expert @@ -1071,13 +1107,37 @@ Port of the proxy (e.g. 9050) Port proxy (napr. 9050) + + Used for reaching peers via: + Použité pre získavanie peerov cez: + + + Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type. + Zobrazuje, či je poskytované predvolené SOCKS5 proxy používané pre získavanie peerov cez tento typ siete. + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services. + Pripojiť k Bitcoinovej sieti cez separované SOCKS5 proxy pre skrytú službu Tor. + Use separate SOCKS5 proxy to reach peers via Tor hidden services: Použiť samostatný SOCKS5 proxy server na dosiahnutie počítačov cez skryté služby Tor: &Window - Okno + &Okno Show only a tray icon after minimizing the window. @@ -1093,7 +1153,7 @@ &Display - &Displej + &Zobrazenie User Interface &language: @@ -1445,6 +1505,18 @@ Current number of blocks Aktuálny počet blokov + + Memory Pool + Pamäť Poolu + + + Current number of transactions + Aktuálny počet tranzakcií + + + Memory usage + Využitie pamäte + Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files. Otvoriť Bitcoin log súbor pre ladenie z aktuálneho dátového adresára. Toto môže trvať niekoľko sekúnd pre veľké súbory. @@ -1461,10 +1533,18 @@ &Peers &Partneri + + Banned peers + Zablokované spojenia + Select a peer to view detailed information. Vyberte počítač pre zobrazenie podrobností. + + Whitelisted + Povolené + Direction Smer @@ -1473,6 +1553,19 @@ Version Verzia + + Starting Block + Počiatočný Blok + + + Synced Headers + Synchronizované hlavičky + + + + Synced Blocks + Synchronizované bloky + User Agent Aplikácia @@ -1501,6 +1594,10 @@ Ping Time Čas odozvy + + Ping Wait + Čakanie na ping + Time Offset Časový posun @@ -1549,6 +1646,34 @@ Clear console Vymazať konzolu + + &Disconnect Node + &Odpojené uzly + + + Ban Node for + Blokovať uzol na + + + 1 &hour + 1 &hodinu + + + 1 &day + 1 &deň + + + 1 &week + 1 &týždeň + + + 1 &year + 1 &rok + + + &Unban Node + &odblokovať uzol + Welcome to the Bitcoin Core RPC console. Vitajte v RPC konzole pre Jadro Bitcoin. @@ -1577,6 +1702,10 @@ %1 GB %1 GB + + (node id: %1) + (ID uzlu: %1) + via %1 cez %1 @@ -1593,6 +1722,14 @@ Outbound Odchádzajúce + + Yes + Áno + + + No + Nie + Unknown neznámy @@ -1961,6 +2098,10 @@ Copy change Kopírovať zmenu + + Total Amount %1 + Celkové množstvo %1 + or alebo @@ -1993,6 +2134,10 @@ Payment request expired. Vypršala platnosť požiadavky na platbu. + + Pay only the required fee of %1 + Zaplatiť len vyžadovaný poplatok z %1 + The recipient address is not valid. Please recheck. Adresa príjemcu je neplatná. Prosím, overte ju. @@ -2072,6 +2217,10 @@ Remove this entry Odstrániť túto položku + + 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. + Poplatok sa odpočíta od čiastky, ktorú odosielate. Príjemca dostane menej bitcoinov ako zadáte. Ak je vybraných viacero príjemcov, poplatok je rozdelený rovným dielom. + S&ubtract fee from amount Odpočítať poplatok od s&umy @@ -2126,6 +2275,10 @@ &Sign Message &Podpísať Správu + + The Bitcoin address to sign the message with + Bitcoin adresa pre podpísanie správy s + Choose previously used address Vybrať predtým použitú adresu @@ -2600,6 +2753,10 @@ Copy transaction ID Kopírovať ID transakcie + + Copy raw transaction + Kopírovať celú tranzakciu + Edit label Editovať popis @@ -2747,10 +2904,30 @@ Accept command line and JSON-RPC commands Prijímať príkazy z príkazového riadku a JSON-RPC + + Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly. + Skontrolujte správnosť nastavenia dátumu a času na vašom počítači! Ak je čas nesprávny Jadro Bitcoin nebude správne fungovať. + + + Error: A fatal internal error occurred, see debug.log for details + Chyba: Vyskytla sa interná chyba, pre viac informácií zobrazte debug.log + + + Fee (in %s/kB) to add to transactions you send (default: %s) + Poplatok (za %s/kB) pridaný do tranzakcie, ktorú posielate (predvolené: %s) + + + Pruning blockstore... + Redukovanie blockstore... + Run in the background as a daemon and accept commands Bežať na pozadí ako démon a prijímať príkazy + + Unable to start HTTP server. See debug log for details. + Nepodarilo sa spustiť HTTP server. Pre viac detailov zobrazte debug log. + Accept connections from outside (default: 1 if no -proxy or -connect) Prijať spojenia zvonku (predvolené: 1 ak žiadne -proxy alebo -connect) @@ -2783,6 +2960,14 @@ Unable to bind to %s on this computer. Bitcoin Core is probably already running. Nepodarilo sa pripojiť na %s na tomto počítači. Bitcoin Jadro je už pravdepodobne spustené. + + WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected) + VAROVANIE: príliš veľa vygenerovaných blokov; %d prijatých blokov v posledných %d hodinách (očakávaných %d) + + + WARNING: check your network connection, %d blocks received in the last %d hours (%d expected) + VAROVANIE: skontrolujte sieťové pripojenie, %d prijatých blokov za posledných %d hodín (očakávané %d) + Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues. Varovanie: Javí sa že sieť sieť úplne nesúhlasí! Niektorí mineri zjavne majú ťažkosti. @@ -2801,6 +2986,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. Uzle na zoznam povolených, ktoré sa pripájajú z danej netmask alebo IP adresy. Môže byť zadané viac krát. + + -maxmempool must be at least %d MB + -maxmempool musí byť najmenej %d MB + <category> can be: <category> môže byť: @@ -2833,6 +3022,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin Do you want to rebuild the block database now? Chcete znovu zostaviť databázu blokov? + + Enable publish hash block in <address> + Povoliť zverejneneie hash blokov pre <address> + + + Enable publish hash transaction in <address> + Povoliť zverejnenie hash tranzakcií pre <address> + + + Enable publish raw block in <address> + Povoliť zverejnenie raw bloku pre <address> + Error initializing block database Chyba inicializácie databázy blokov @@ -2877,6 +3078,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin Only connect to nodes in network <net> (ipv4, ipv6 or onion) Pripojiť iba k uzlom v sieti <net> (ipv4, ipv6, alebo onion) + + Prune cannot be configured with a negative value. + Redukovanie nemôže byť nastavené na zápornú hodnotu. + + + Prune mode is incompatible with -txindex. + Redukovanie je nekompatibilné s -txindex. + 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) @@ -2889,6 +3098,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin Specify wallet file (within data directory) Označ súbor peňaženky (v priečinku s dátami) + + Unsupported argument -benchmark ignored, use -debug=bench. + Nepodporovaný parameter -benchmark bol ignorovaný, použite -debug=bench. + + + Unsupported argument -debugnet ignored, use -debug=net. + Nepodporovaný argument -debugnet bol ignorovaný, použite -debug=net. + + + Unsupported argument -tor found, use -onion. + Nepodporovaný argument -tor, použite -onion. + Use UPnP to map the listening port (default: %u) Použiť UPnP pre mapovanie počúvajúceho portu (predvolené: %u) @@ -2909,6 +3130,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Wallet options: Voľby peňaženky: + + Warning: This version is obsolete; upgrade required! + Varovanie: Táto verzia je zastaralá; vyžaduje sa aktualizácia! + You need to rebuild the database using -reindex to change -txindex Potrebujete prebudovať databázu použitím -reindex zmeniť -txindex @@ -2933,6 +3158,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) Vytvoriť nové súbory z predvolenými systémovými právami, namiesto umask 077 (funguje iba z vypnutou funkcionalitou peňaženky) + + Discover own IP addresses (default: 1 when listening and no -externalip or -proxy) + Zisti vlastnú IP adresu (predvolené: 1 pre listen a -externalip alebo -proxy) + Error: Listening for incoming connections failed (listen returned error %s) Chyba: Počúvanie prichádzajúcich spojení zlyhalo (vrátená chyba je %s) @@ -2965,6 +3194,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin Set the number of threads for coin generation if enabled (-1 = all cores, default: %d) Nastaviť počet vlákien pre generáciu mincí (-1 = všetky jadrá, predvolené: %d) + + The transaction amount is too small to send after the fee has been deducted + Suma je príliš malá pre odoslanie tranzakcie + 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. Tento produkt obsahuje softvér vyvinutý projektom OpenSSL pre použitie sady nástrojov OpenSSL <https://www.openssl.org/> a kryptografického softvéru napísaného Eric Young a UPnP softvér napísaný Thomas Bernard. @@ -2981,6 +3214,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin Accept public REST requests (default: %u) Akceptovať verejné REST žiadosti (predvolené: %u) + + Activating best chain... + Aktivácia najlepšej reťaze... + + + Attempt to recover private keys from a corrupt wallet.dat on startup + Pokus o obnovenie privátnych kľúčov z poškodenej wallet.dat pri spustení + + + Automatically create Tor hidden service (default: %d) + Automaticky vytvoriť skrytú službu Tor (predvolené: %d) + Cannot resolve -whitebind address: '%s' Nedá sa vyriešiť -whitebind adresa: '%s' @@ -3001,10 +3246,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin Error reading from database, shutting down. Chyba pri načítaní z databázy, ukončuje sa. + + Imports blocks from external blk000??.dat file on startup + Importovať bloky z externého súboru blk000??.dat pri štarte + Information Informácia + + Initialization sanity check failed. Bitcoin Core is shutting down. + Inicializačná kontrola zlyhala. Jadro Bitcoin sa ukončuje. + Invalid amount for -maxtxfee=<amount>: '%s' Neplatná suma pre -maxtxfee=<amount>: '%s' @@ -3065,10 +3318,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin Signing transaction failed Podpísanie správy zlyhalo + + The transaction amount is too small to pay the fee + Suma tranzakcie je príliš malá na zaplatenie poplatku + This is experimental software. Toto je experimentálny softvér. + + Tor control port password (default: empty) + Heslo na kontrolu portu pre Tor (predvolené: žiadne) + Transaction amount too small Suma transakcie príliš malá @@ -3089,10 +3350,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin Unable to bind to %s on this computer (bind returned error %s) Na tomto počítači sa nedá vytvoriť väzba %s (vytvorenie väzby vrátilo chybu %s) + + Upgrade wallet to latest format on startup + Aktualizovať peňaženku na posledný formát pri štarte + Username for JSON-RPC connections Užívateľské meno pre JSON-RPC spojenia + + Wallet needed to be rewritten: restart Bitcoin Core to complete + Peňaženka musí byť prepísaná: pre dokončenie reštartujte Jadro Bitcoin + Warning Upozornenie diff --git a/src/qt/locale/bitcoin_ta.ts b/src/qt/locale/bitcoin_ta.ts new file mode 100644 index 000000000..c93524cda --- /dev/null +++ b/src/qt/locale/bitcoin_ta.ts @@ -0,0 +1,1029 @@ + + + AddressBookPage + + Create a new address + ஒரு புதிய முகவரியை உருவாக்கு + + + &New + &புதிய + + + &Copy + &நகல் + + + C&lose + &மூடு + + + &Copy Address + &முகவரியை நகலெடு + + + &Export + &ஏற்றுமதி + + + &Delete + &அழி + + + C&hoose + &தேர்ந்தெடு + + + Sending addresses + அனுப்பும் முகவரிகள் + + + Receiving addresses + பெறும் முகவரிகள் + + + &Edit + &தொகு + + + + AddressTableModel + + Label + லேபிள் + + + Address + விலாசம் + + + + AskPassphraseDialog + + Encrypt wallet + என்க்ரிப்ட் பணப்பை + + + Decrypt wallet + டிக்ரிப்ட் பணப்பை + + + + BanTableModel + + IP/Netmask + IP/Netmask + + + + BitcoinGUI + + &Overview + &கண்ணோட்டம் + + + &Transactions + &பரிவர்த்தனைகள் + + + E&xit + &வெளியேறு + + + Quit application + விலகு + + + About &Qt + &Qt-ஐ பற்றி + + + &Options... + &விருப்பங்கள்... + + + &Encrypt Wallet... + &என்க்ரிப்ட் பணப்பை... + + + Open &URI... + &URI-ஐ திற + + + &Verify message... + &செய்தியை சரிசெய்... + + + Bitcoin + Bitcoin + + + Wallet + பணப்பை + + + &Send + &அனுப்பு + + + &Receive + &பெறு + + + &Show / Hide + &காட்டு/மறை + + + &File + &கோப்பு + + + &Settings + &அமைப்பு + + + &Help + &உதவி + + + Bitcoin Core + Bitcoin மையம் + + + %n hour(s) + %n மணி%n மணி + + + %1 and %2 + %1 மற்றும் %2 + + + %1 behind + %1 பின்னால் + + + Error + தவறு + + + Warning + எச்சரிக்கை + + + Information + தகவல் + + + Date: %1 + + தேதி: %1 + + + + Amount: %1 + + தொகை: %1 + + + + Type: %1 + + வகை: %1 + + + + Address: %1 + + முகவரி: %1 + + + + Sent transaction + அனுப்பிய பரிவர்த்தனை + + + + ClientModel + + Network Alert + பிணைய எச்சரிக்கை + + + + CoinControlDialog + + Quantity: + அளவு + + + Amount: + விலை: + + + Priority: + முன்னுரிமை + + + Fee: + கட்டணம்: + + + After Fee: + கட்டணத்திறகுப் பின்: + + + Change: + மாற்று: + + + Amount + விலை + + + Date + தேதி + + + Confirmations + உறுதிப்படுத்தல்கள் + + + Confirmed + உறுதியாக + + + Priority + முன்னுரிமை + + + Copy address + பிரதியை முகவரியை + + + Copy amount + நகலை தொகை + + + none + none + + + yes + ஆம் + + + no + இல்லை + + + + EditAddressDialog + + + FreespaceChecker + + name + பெயர் + + + + HelpMessageDialog + + Bitcoin Core + Bitcoin மையம் + + + About Bitcoin Core + Bitcoin மையம் பற்றி + + + + Intro + + Welcome + நல்வரவு + + + Bitcoin Core + Bitcoin மையம் + + + Error + தவறு + + + + OpenURIDialog + + Open URI + URI-ஐ திற + + + URI: + URI: + + + + OptionsDialog + + Options + விருப்பத்தேர்வு + + + &Main + &தலைமை + + + MB + MB + + + &Network + &பிணையம் + + + W&allet + &பணப்பை + + + Expert + வல்லுநர் + + + IPv4 + IPv4 + + + IPv6 + IPv6 + + + Tor + Tor + + + &Window + &சாளரம் + + + &Display + &காட்டு + + + &OK + &சரி + + + &Cancel + &ரத்து + + + default + இயல்புநிலை + + + none + none + + + + OverviewPage + + Form + படிவம் + + + Available: + கிடைக்ககூடிய: + + + Pending: + நிலுவையில்: + + + Immature: + முதிராத: + + + Balances + மீதி + + + Total: + மொத்தம்: + + + + PaymentServer + + + PeerTableModel + + User Agent + பயனர் முகவர் + + + Ping Time + பிங் நேரம் + + + + QObject + + Amount + விலை + + + %1 d + %1 d + + + %1 h + %1 h + + + %1 s + %1 s + + + N/A + N/A + + + %1 ms + %1 ms + + + + QRImageWidget + + &Save Image... + &படத்தை சேமி... + + + &Copy Image + &படத்தை + + + Save QR Code + QR குறியீடு காப்பாற்ற + + + PNG Image (*.png) + PNG படத்தை (*.png) + + + + RPCConsole + + Client name + வாடிக்கையாளர் பெயர் + + + N/A + N/A + + + Client version + வாடிக்கையாளர் பதிப்பு + + + &Information + &தகவல் + + + Network + பிணையம் + + + Name + பெயர் + + + Memory Pool + நினைவக குளம் + + + Memory usage + நினைவக பயன்பாடு + + + Sent + அனுப்பிய + + + Direction + திசை + + + Version + பதிப்பு + + + User Agent + பயனர் முகவர் + + + Ping Time + பிங் நேரம் + + + &Open + &திற + + + &Console + &பணியகம் + + + &Clear + &வழுநீக்கு + + + Totals + மொத்தம் + + + In: + உள்ளே: + + + Out: + வெளியே: + + + 1 &hour + 1 &மணி + + + 1 &day + 1 &நாள் + + + 1 &week + 1 &வாரம் + + + 1 &year + 1 &ஆண்டு + + + %1 B + %1 B + + + %1 KB + %1 KB + + + %1 MB + %1 MB + + + %1 GB + %1 GB + + + via %1 + via %1 + + + never + ஒருபோதும் + + + Inbound + உள்வரும் + + + Outbound + வெளி செல்லும் + + + Yes + ஆம் + + + No + மறு + + + Unknown + அறியப்படாத + + + + ReceiveCoinsDialog + + &Amount: + &தொகை: + + + &Label: + &சிட்டை: + + + &Message: + &செய்தி: + + + Clear + நீக்கு + + + Show + காண்பி + + + Remove + நீக்கு + + + Copy message + நகலை செய்தி + + + Copy amount + நகலை தொகை + + + + ReceiveRequestDialog + + QR Code + QR குறியீடு + + + Copy &URI + நகலை &URI + + + Copy &Address + நகலை விலாசம் + + + &Save Image... + &படத்தை சேமி... + + + URI + URI + + + Address + விலாசம் + + + Amount + விலை + + + Label + லேபிள் + + + Message + செய்தி + + + + RecentRequestsTableModel + + Date + தேதி + + + Label + லேபிள் + + + Message + செய்தி + + + Amount + விலை + + + + SendCoinsDialog + + Quantity: + அளவு + + + Amount: + விலை + + + Priority: + முன்னுரிமை + + + Fee: + கட்டணம்: + + + After Fee: + கட்டணத்திறகுப் பின்: + + + Change: + மாற்று: + + + Choose... + தேர்ந்தெடு... + + + Hide + மறை + + + normal + இயல்பான + + + fast + வேகமாக + + + Balance: + மீதி: + + + S&end + &அனுப்பு + + + %1 to %2 + %1 to %2 + + + Copy amount + நகலை தொகை + + + or + அல்லது + + + + SendCoinsEntry + + A&mount: + &தொகை: + + + &Label: + &சிட்டை: + + + Alt+A + Alt+A + + + Alt+P + Alt+P + + + Message: + செய்தி: + + + + ShutdownWindow + + + SignVerifyMessageDialog + + Alt+A + Alt+A + + + Alt+P + Alt+P + + + Signature + கையொப்பம் + + + + SplashScreen + + Bitcoin Core + Bitcoin மையம் + + + + TrafficGraphWidget + + KB/s + KB/s + + + + TransactionDesc + + Status + நிலை + + + Date + தேதி + + + Source + மூலம் + + + Credit + கடன் + + + Debit + பற்று + + + Total debit + மொத்த பற்று + + + Total credit + மொத்த கடன் + + + Net amount + நிகர தொகை + + + Message + செய்தி + + + Comment + கருத்து + + + Transaction ID + பரிவர்த்தனை ID + + + Merchant + வணிகர் + + + Debug information + சரிசெய்வதற்கான தகவல் + + + Transaction + பரிவர்த்தனை + + + Inputs + உள்ளீடுகள் + + + Amount + விலை + + + true + உண்மை + + + false + தவறான + + + + TransactionDescDialog + + + TransactionTableModel + + Date + தேதி + + + Offline + ஆஃப்லைன் + + + Label + லேபிள் + + + (n/a) + (n/a) + + + + TransactionView + + All + முழுவதும் + + + Today + இன்று + + + This week + இந்த வாரம் + + + This month + இந்த மாதம் + + + Last month + கடந்த மாதம் + + + This year + இந்த வருடம் + + + Range... + எல்லை... + + + Other + வேறு + + + Copy address + பிரதியை முகவரியை + + + Copy amount + நகலை தொகை + + + Confirmed + உறுதியாக + + + Date + தேதி + + + Label + லேபிள் + + + Address + விலாசம் + + + ID + ID + + + Range: + எல்லை: + + + + UnitDisplayStatusBarControl + + + WalletFrame + + + WalletModel + + + WalletView + + &Export + &ஏற்றுமதி + + + + bitcoin-core + + (default: %u) + (default: %u) + + + Information + தகவல் + + + Warning + எச்சரிக்கை + + + (default: %s) + (default: %s) + + + Error + தவறு + + + \ No newline at end of file diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index 96fca8bb2..46f17f4e2 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -2941,7 +2941,7 @@ Prune configured below the minimum of %d MiB. Please use a higher number. - Prune, asgari değer olan %d MiB'den düşük olarak ayarlanmıştır. Lütfen daha yüksek bir sayı kullanınız. + Budama, asgari değer olan %d MiB'den düşük olarak ayarlanmıştır. Lütfen daha yüksek bir sayı kullanınız. Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node) @@ -3141,11 +3141,11 @@ Prune cannot be configured with a negative value. - Prune negatif bir değerle yapılandırılamaz. + Budama negatif bir değerle yapılandırılamaz. Prune mode is incompatible with -txindex. - Prune kipi -txindex ile uyumsuzdur. + Budama kipi -txindex ile uyumsuzdur. Set database cache size in megabytes (%d to %d, default: %d) @@ -3281,7 +3281,7 @@ You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain - Prune olmayan kipe dönmek için veritabanını -reindex ile tekrar derlemeniz gerekir. Bu, tüm blok zincirini tekrar indirecektir + Budama olmayan kipe dönmek için veritabanını -reindex ile tekrar derlemeniz gerekir. Bu, tüm blok zincirini tekrar indirecektir (default: %u) diff --git a/src/qt/locale/bitcoin_uz@Latn.ts b/src/qt/locale/bitcoin_uz@Latn.ts new file mode 100644 index 000000000..2e4dabb59 --- /dev/null +++ b/src/qt/locale/bitcoin_uz@Latn.ts @@ -0,0 +1,169 @@ + + + AddressBookPage + + Create a new address + Yangi manzil yaratish + + + &New + &Yangi + + + &Copy + &Nusxalash + + + C&lose + Yo&pish + + + &Copy Address + &Manzillarni nusxalash + + + &Delete + &O'chirish + + + + AddressTableModel + + Label + Yorliq + + + Address + Manzil + + + + AskPassphraseDialog + + + BanTableModel + + + BitcoinGUI + + + ClientModel + + + CoinControlDialog + + + EditAddressDialog + + + FreespaceChecker + + + HelpMessageDialog + + + Intro + + + OpenURIDialog + + + OptionsDialog + + + OverviewPage + + + PaymentServer + + + PeerTableModel + + + QObject + + + QRImageWidget + + + RPCConsole + + + ReceiveCoinsDialog + + + ReceiveRequestDialog + + Address + Manzil + + + Label + Yorliq + + + + RecentRequestsTableModel + + Label + Yorliq + + + + SendCoinsDialog + + + SendCoinsEntry + + + ShutdownWindow + + + SignVerifyMessageDialog + + + SplashScreen + + + TrafficGraphWidget + + + TransactionDesc + + + TransactionDescDialog + + + TransactionTableModel + + Label + Yorliq + + + + TransactionView + + Label + Yorliq + + + Address + Manzil + + + + 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 075410f96..d3eb44510 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -67,11 +67,11 @@ 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 &Label @@ -161,7 +161,7 @@ Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! - 警告: 如果把錢包加密後又忘記密碼,你就會從此<b>失去其中所有的位元幣了</b>! + 警告: 如果把錢包加密後又忘記密碼,你就會從此<b>失去其中所有的 Bitcoin 了</b>! Are you sure you wish to encrypt your wallet? @@ -169,7 +169,7 @@ Bitcoin Core 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. - 比特幣核心現在要關閉,好完成加密程序。請注意,加密錢包不能完全防止入侵你的電腦的惡意程式偷取比特幣。 + Bitcoin Core 現在要關閉,好完成加密程序。請注意,加密錢包不能完全防止入侵你的電腦的惡意程式偷取錢幣。 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. @@ -307,7 +307,7 @@ Bitcoin Core client - 比特幣核心客戶端軟體 + Bitcoin Core 客戶端軟體 Importing blocks from disk... @@ -319,7 +319,7 @@ Send coins to a Bitcoin address - 付錢給一個比特幣位址 + 付錢給一個 Bitcoin 位址 Backup wallet to another location @@ -343,7 +343,7 @@ Bitcoin - 比特幣 + Bitcoin Wallet @@ -359,7 +359,7 @@ Show information about Bitcoin Core - 顯示比特幣核心的相關資訊 + 顯示 Bitcoin Core 的相關資訊 &Show / Hide @@ -375,11 +375,11 @@ Sign messages with your Bitcoin addresses to prove you own them - 用比特幣位址簽署訊息來證明位址是你的 + 用 Bitcoin 位址簽署訊息來證明位址是你的 Verify messages to ensure they were signed with specified Bitcoin addresses - 驗證訊息是用來確定訊息是用指定的比特幣位址簽署的 + 驗證訊息是用來確定訊息是用指定的 Bitcoin 位址簽署的 &File @@ -399,19 +399,19 @@ Bitcoin Core - 比特幣核心 + Bitcoin Core Request payments (generates QR codes and bitcoin: URIs) - 要求付款(產生 QR Code 和位元幣付款協議的資源識別碼: URI) + 要求付款(產生 QR Code 和 bitcoin 付款協議的資源識別碼: URI) &About Bitcoin Core - 關於比特幣核心 + 關於 Bitcoin Core Modify configuration options for Bitcoin Core - 修改比特幣核心的設定選項 + 修改 Bitcoin Core 的設定選項 Show the list of used sending addresses and labels @@ -431,11 +431,11 @@ Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options - 顯示比特幣核心的說明訊息,來取得可用命令列選項的列表 + 顯示 Bitcoin Core 的說明訊息,來取得可用命令列選項的列表 %n active connection(s) to Bitcoin network - %n 個運作中的比特幣網路連線 + %n 個運作中的 Bitcoin 網路連線 No block source available... @@ -818,7 +818,7 @@ The entered address "%1" is not a valid Bitcoin address. - 輸入的位址 %1 並不是有效的位元幣位址。 + 輸入的位址 %1 並不是有效的 Bitcoin 位址。 Could not unlock wallet. @@ -856,7 +856,7 @@ HelpMessageDialog Bitcoin Core - 比特幣核心 + Bitcoin Core version @@ -868,7 +868,7 @@ About Bitcoin Core - 關於比特幣核心 + 關於 Bitcoin Core Command-line options @@ -919,15 +919,15 @@ Welcome to Bitcoin Core. - 歡迎使用比特幣核心 + 歡迎使用 Bitcoin Core As this is the first time the program is launched, you can choose where Bitcoin Core will store its data. - 因為這是程式第一次啓動,你可以選擇比特幣核心儲存資料的地方。 + 因為這是程式第一次啓動,你可以選擇 Bitcoin Core 儲存資料的地方。 Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory. - 比特幣核心會下載並儲存一份比特幣區塊鏈的拷貝。至少有 %1GB 的資料會儲存到這個目錄中,並且還會持續增長。另外錢包資料也會儲存在這個目錄。 + Bitcoin Core 會下載並儲存一份 Bitcoin 區塊鏈的拷貝。至少有 %1GB 的資料會儲存到這個目錄中,並且還會持續增長。另外錢包資料也會儲存在這個目錄。 Use the default data directory @@ -939,7 +939,7 @@ Bitcoin Core - 比特幣核心 + Bitcoin Core Error: Specified data directory "%1" cannot be created. @@ -1021,7 +1021,7 @@ The user interface language can be set here. This setting will take effect after restarting Bitcoin Core. - 可以在這裡設定使用者介面的語言。這個設定在重啓位元幣核心後才會生效。 + 可以在這裡設定使用者介面的語言。這個設定在重啓 Bitcoin Core 後才會生效。 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 |. @@ -1049,11 +1049,11 @@ Automatically start Bitcoin Core after logging in to the system. - 在登入系統後自動啓動比特幣核心。 + 在登入系統後自動啓動 Bitcoin Core。 &Start Bitcoin Core on system login - 系統登入時啟動比特幣核心 + 系統登入時啟動 Bitcoin Core (0 = auto, <0 = leave that many cores free) @@ -1081,7 +1081,7 @@ Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled. - 自動在路由器上開放位元幣的客戶端通訊埠。只有在你的路由器支援且開啓「通用即插即用」協定(UPnP)時才有作用。 + 自動在路由器上開放 Bitcoin 的客戶端通訊埠。只有在你的路由器支援且開啓「通用即插即用」協定(UPnP)時才有作用。 Map port using &UPnP @@ -1089,7 +1089,7 @@ Connect to the Bitcoin network through a SOCKS5 proxy. - 透過 SOCKS5 代理伺服器來連線到位元幣網路。 + 透過 SOCKS5 代理伺服器來連線到 Bitcoin 網路。 &Connect through SOCKS5 proxy (default proxy): @@ -1129,11 +1129,11 @@ Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services. - 透過另外的 SOCKS5 代理伺服器來連線到位元幣網路中的 Tor 隱藏服務。 + 透過另外的 SOCKS5 代理伺服器來連線到 Bitcoin 網路中的 Tor 隱藏服務。 Use separate SOCKS5 proxy to reach peers via Tor hidden services: - 用另外的 SOCKS5 代理伺服器,來透過洋蔥路由的隱藏服務跟其他節點聯絡: + 用另外的 SOCKS5 代理伺服器,來透過 Tor 隱藏服務跟其他節點聯絡: &Window @@ -1216,7 +1216,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. - 顯示的資訊可能是過期的。跟位元幣網路的連線建立後,你的錢包會自動和網路同步,但是這個步驟還沒完成。 + 顯示的資訊可能是過期的。跟 Bitcoin 網路的連線建立後,你的錢包會自動和網路同步,但是這個步驟還沒完成。 Watch-only: @@ -1323,7 +1323,7 @@ URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters. - 沒辦法解析資源識別碼(URI)!可能是因為比特幣位址無效,或是 URI 參數格式錯誤。 + 沒辦法解析資源識別碼(URI)!可能是因為 Bitcoin 位址無效,或是 URI 參數格式錯誤。 Payment request file handling @@ -1397,7 +1397,7 @@ Enter a Bitcoin address (e.g. %1) - 輸入比特幣位址 (比如說 %1) + 輸入 Bitcoin 位址 (比如說 %1) %1 d @@ -1519,7 +1519,7 @@ Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files. - 從目前的資料目錄下開啓位元幣核心的除錯紀錄檔。當紀錄檔很大時,可能會花好幾秒的時間。 + 從目前的資料目錄下開啓 Bitcoin Core 的除錯紀錄檔。當紀錄檔很大時,可能會花好幾秒的時間。 Received @@ -1679,7 +1679,7 @@ Welcome to the Bitcoin Core RPC console. - 歡迎使用比特幣核心 RPC 主控台。 + 歡迎使用 Bitcoin Core 的 RPC 主控台。 Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen. @@ -1762,7 +1762,7 @@ 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. - 附加在付款要求中的訊息,可以不填,打開要求內容時會顯示。注意: 這個訊息不會隨著付款送到位元幣網路上。 + 附加在付款要求中的訊息,可以不填,打開要求內容時會顯示。注意: 這個訊息不會隨著付款送到 Bitcoin 網路上。 An optional label to associate with the new receiving address. @@ -2155,7 +2155,7 @@ Warning: Invalid Bitcoin address - 警告: 比特幣位址無效 + 警告: Bitcoin 位址無效 (no label) @@ -2206,7 +2206,7 @@ The Bitcoin address to send the payment to - 接收付款的比特幣位址 + 接收付款的 Bitcoin 位址 Alt+A @@ -2226,7 +2226,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. - 手續費會從要付款出去的金額中扣掉。因此收款人會收到比輸入的金額還要少的位元幣。如果有多個收款人的話,手續費會平均分配來扣除。 + 手續費會從要付款出去的金額中扣掉。因此收款人會收到比輸入的金額還要少的 bitcoin。如果有多個收款人的話,手續費會平均分配來扣除。 S&ubtract fee from amount @@ -2250,7 +2250,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. - 附加在比特幣付款協議的資源識別碼(URI)中的訊息,會和交易內容一起存起來,給你自己做參考。注意: 這個訊息不會送到比特幣網路上。 + 附加在 Bitcoin 付款協議的資源識別碼(URI)中的訊息,會和交易內容一起存起來,給你自己做參考。注意: 這個訊息不會送到 Bitcoin 網路上。 Pay To: @@ -2265,7 +2265,7 @@ ShutdownWindow Bitcoin Core is shutting down... - 正在關閉比特幣核心中... + 正在關閉 Bitcoin Core 中... Do not shut down the computer until this window disappears. @@ -2288,7 +2288,7 @@ The Bitcoin address to sign the message with - 用來簽署訊息的位元幣位址 + 用來簽署訊息的 Bitcoin 位址 Choose previously used address @@ -2320,7 +2320,7 @@ Sign the message to prove you own this Bitcoin address - 簽署這個訊息來證明這個比特幣位址是你的 + 簽署這個訊息來證明這個 Bitcoin 位址是你的 Sign &Message @@ -2344,11 +2344,11 @@ The Bitcoin address the message was signed with - 簽署這個訊息的比特幣位址 + 簽署這個訊息的 Bitcoin 位址 Verify the message to ensure it was signed with the specified Bitcoin address - 驗證這個訊息來確定是用指定的比特幣位址簽署的 + 驗證這個訊息來確定是用指定的 Bitcoin 位址簽署的 Verify &Message @@ -2415,11 +2415,11 @@ SplashScreen Bitcoin Core - 比特幣核心 + Bitcoin Core The Bitcoin Core developers - 比特幣核心開發人員 + Bitcoin Core 開發人員 [testnet] @@ -2938,7 +2938,7 @@ Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly. - 請檢查電腦日期和時間是否正確!比特幣核心沒辦法在時鐘不準的情況下正常運作。 + 請檢查電腦日期和時間是否正確!Bitcoin Core 沒辦法在時鐘不準的情況下正常運作。 Prune configured below the minimum of %d MiB. Please use a higher number. @@ -2970,7 +2970,7 @@ Run in the background as a daemon and accept commands - 在背景執行並接受指令 + 用護靈模式在背景執行並接受指令 Unable to start HTTP server. See debug log for details. @@ -3010,7 +3010,7 @@ Unable to bind to %s on this computer. Bitcoin Core is probably already running. - 沒辦法繫結在這台電腦上的 %s 。位元幣核心可能已經在執行了。 + 沒辦法繫結在這台電腦上的 %s 。Bitcoin Core 可能已經在執行了。 Use UPnP to map the listening port (default: 1 when listening and no -proxy) @@ -3026,7 +3026,7 @@ 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. @@ -3218,7 +3218,7 @@ Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running. - 沒辦法鎖定資料目錄 %s。比特幣核心可能已經在執行了。 + 沒辦法鎖定資料目錄 %s。Bitcoin Core 可能已經在執行了。 Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) @@ -3306,7 +3306,7 @@ Automatically create Tor hidden service (default: %d) - 自動產生洋蔥路由的隱藏服務(預設值: %d) + 自動產生 Tor 隱藏服務(預設值: %d) Cannot resolve -whitebind address: '%s' @@ -3318,11 +3318,11 @@ Copyright (C) 2009-%i The Bitcoin Core Developers - 版權為比特幣核心開發人員自西元 2009 至 %i 年起所有 + 版權為 Bitcoin Core 開發人員自西元 2009 至 %i 年起所有 Error loading wallet.dat: Wallet requires newer version of Bitcoin Core - 載入 wallet.dat 檔案時發生錯誤: 這個錢包需要新版的比特幣核心 + 載入 wallet.dat 檔案時發生錯誤: 這個錢包需要新版的 Bitcoin Core Error reading from database, shutting down. @@ -3338,7 +3338,7 @@ Initialization sanity check failed. Bitcoin Core is shutting down. - 初始化時的基本檢查失敗了。位元幣核心就要關閉了。 + 初始化時的基本檢查失敗了。Bitcoin Core 就要關閉了。 Invalid amount for -maxtxfee=<amount>: '%s' @@ -3422,11 +3422,11 @@ Tor control port password (default: empty) - 洋蔥路由控制埠密碼(預設值: 空白) + Tor 控制埠密碼(預設值: 空白) Tor control port to use if onion listening enabled (default: %s) - 開啟聽候 onion 連線時的洋蔥路由控制埠號碼(預設值: %s) + 開啟聽候 onion 連線時的 Tor 控制埠號碼(預設值: %s) Transaction amount too small @@ -3458,7 +3458,7 @@ Wallet needed to be rewritten: restart Bitcoin Core to complete - 錢包需要重寫: 請重新啓動比特幣核心來完成 + 錢包需要重寫: 請重新啓動 Bitcoin Core 來完成 Warning @@ -3582,7 +3582,7 @@ Generate coins (default: %u) - 生產比特幣(預設值: %u) + 生產錢幣(預設值: %u) How many blocks to check at startup (default: %u, 0 = all) From 4226aacdba7d0e1e22555dac69363b3b460a166b Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 6 Apr 2016 10:27:51 +0200 Subject: [PATCH 39/45] init: allow shutdown during 'Activating best chain...' Two-line patch to make it possible to shut down bitcoind cleanly during the initial ActivateBestChain. Fixes #6459 (among other complaints). To reproduce: - shutdown bitcoind - copy chainstate - start bitcoind - let the chain sync a bit - shutdown bitcoind - copy back old chainstate - start bitcoind - bitcoind will catch up with all blocks during Init() (the `boost::this_thread::interruption_point` / `ShutdownRequested()` dance is ugly, this should be refactored all over bitcoind at some point when moving from boost::threads to c++11 threads, but it works...) Github-Pull: #7821 Rebased-From: 07398e8e9d2ef807e63abd0978a6e98549bdf271 --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 14f70cdf5..27d8a4a17 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2867,6 +2867,8 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, CBlockIndex *pindexMostWork = NULL; do { boost::this_thread::interruption_point(); + if (ShutdownRequested()) + break; CBlockIndex *pindexNewTip = NULL; const CBlockIndex *pindexFork; From 90f1d246d38803eb546c6652ddce5ebea55eec98 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 3 Apr 2016 15:24:09 +0200 Subject: [PATCH 40/45] Track block download times per individual block Currently, we're keeping a timeout for each requested block, starting from when it is requested, with a correction factor for the number of blocks in the queue. That's unnecessarily complicated and inaccurate. As peers process block requests in order, we can make the timeout for each block start counting only when all previous ones have been received, and have a correction based on the number of peers, rather than the total number of blocks. Conflicts: src/main.cpp src/main.h Self check after the last peer is removed Github-Pull: #7804 Rebased-From: 2d1d6581eca4508838cd339cc19c72efc42d6ea0 0e24bbf679c95784ed5514a6a1f2fbf99dd97725 --- src/main.cpp | 71 ++++++++++++++++++++++++++++------------------------ src/main.h | 4 +++ 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 27d8a4a17..2275a0208 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -192,16 +192,11 @@ namespace { /** Blocks that are in flight, and that are in the queue to be downloaded. Protected by cs_main. */ struct QueuedBlock { uint256 hash; - CBlockIndex *pindex; //! Optional. - int64_t nTime; //! Time of "getdata" request in microseconds. - bool fValidatedHeaders; //! Whether this block has validated headers at the time of request. - int64_t nTimeDisconnect; //! The timeout for this block request (for disconnecting a slow peer) + CBlockIndex* pindex; //!< Optional. + bool fValidatedHeaders; //!< Whether this block has validated headers at the time of request. }; map::iterator> > mapBlocksInFlight; - /** Number of blocks in flight with validated headers. */ - int nQueuedValidatedHeaders = 0; - /** Number of preferable block download peers. */ int nPreferredDownload = 0; @@ -210,6 +205,9 @@ namespace { /** Dirty block file entries. */ set setDirtyFileInfo; + + /** Number of peers from which we're downloading blocks. */ + int nPeersWithValidatedDownloads = 0; } // anon namespace ////////////////////////////////////////////////////////////////////////////// @@ -257,6 +255,8 @@ struct CNodeState { //! Since when we're stalling block download progress (in microseconds), or 0. int64_t nStallingSince; list vBlocksInFlight; + //! When the first entry in vBlocksInFlight started downloading. Don't care when vBlocksInFlight is empty. + int64_t nDownloadingSince; int nBlocksInFlight; int nBlocksInFlightValidHeaders; //! Whether we consider this a preferred download peer. @@ -274,6 +274,7 @@ struct CNodeState { pindexBestHeaderSent = NULL; fSyncStarted = false; nStallingSince = 0; + nDownloadingSince = 0; nBlocksInFlight = 0; nBlocksInFlightValidHeaders = 0; fPreferredDownload = false; @@ -308,12 +309,6 @@ void UpdatePreferredDownload(CNode* node, CNodeState* state) nPreferredDownload += state->fPreferredDownload; } -// Returns time at which to timeout block request (nTime in microseconds) -int64_t GetBlockTimeout(int64_t nTime, int nValidatedQueuedBefore, const Consensus::Params &consensusParams) -{ - return nTime + 500000 * consensusParams.nPowTargetSpacing * (4 + nValidatedQueuedBefore); -} - void InitializeNode(NodeId nodeid, const CNode *pnode) { LOCK(cs_main); CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second; @@ -333,13 +328,21 @@ void FinalizeNode(NodeId nodeid) { } BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight) { - nQueuedValidatedHeaders -= entry.fValidatedHeaders; mapBlocksInFlight.erase(entry.hash); } EraseOrphansFor(nodeid); nPreferredDownload -= state->fPreferredDownload; + nPeersWithValidatedDownloads -= (state->nBlocksInFlightValidHeaders != 0); + assert(nPeersWithValidatedDownloads >= 0); mapNodeState.erase(nodeid); + + if (mapNodeState.empty()) { + // Do a consistency check after the last peer is removed. + assert(mapBlocksInFlight.empty()); + assert(nPreferredDownload == 0); + assert(nPeersWithValidatedDownloads == 0); + } } // Requires cs_main. @@ -348,8 +351,15 @@ bool MarkBlockAsReceived(const uint256& hash) { map::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash); if (itInFlight != mapBlocksInFlight.end()) { CNodeState *state = State(itInFlight->second.first); - nQueuedValidatedHeaders -= itInFlight->second.second->fValidatedHeaders; state->nBlocksInFlightValidHeaders -= itInFlight->second.second->fValidatedHeaders; + if (state->nBlocksInFlightValidHeaders == 0 && itInFlight->second.second->fValidatedHeaders) { + // Last validated block on the queue was received. + nPeersWithValidatedDownloads--; + } + if (state->vBlocksInFlight.begin() == itInFlight->second.second) { + // First block on the queue was received, update the start download time for the next one + state->nDownloadingSince = std::max(state->nDownloadingSince, GetTimeMicros()); + } state->vBlocksInFlight.erase(itInFlight->second.second); state->nBlocksInFlight--; state->nStallingSince = 0; @@ -367,12 +377,17 @@ void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const Consensus::Pa // Make sure it's not listed somewhere already. MarkBlockAsReceived(hash); - int64_t nNow = GetTimeMicros(); - QueuedBlock newentry = {hash, pindex, nNow, pindex != NULL, GetBlockTimeout(nNow, nQueuedValidatedHeaders, consensusParams)}; - nQueuedValidatedHeaders += newentry.fValidatedHeaders; + QueuedBlock newentry = {hash, pindex, pindex != NULL}; list::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(), newentry); state->nBlocksInFlight++; state->nBlocksInFlightValidHeaders += newentry.fValidatedHeaders; + if (state->nBlocksInFlight == 1) { + // We're starting a block download (batch) from this peer. + state->nDownloadingSince = GetTimeMicros(); + } + if (state->nBlocksInFlightValidHeaders == 1 && pindex != NULL) { + nPeersWithValidatedDownloads++; + } mapBlocksInFlight[hash] = std::make_pair(nodeid, it); } @@ -3911,7 +3926,6 @@ void UnloadBlockIndex() nBlockSequenceId = 1; mapBlockSource.clear(); mapBlocksInFlight.clear(); - nQueuedValidatedHeaders = 0; nPreferredDownload = 0; setDirtyBlockIndex.clear(); setDirtyFileInfo.clear(); @@ -5866,24 +5880,15 @@ bool SendMessages(CNode* pto) LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id); pto->fDisconnect = true; } - // In case there is a block that has been in flight from this peer for (2 + 0.5 * N) times the block interval - // (with N the number of validated blocks that were in flight at the time it was requested), disconnect due to - // timeout. We compensate for in-flight blocks to prevent killing off peers due to our own downstream link + // In case there is a block that has been in flight from this peer for 2 + 0.5 * N times the block interval + // (with N the number of peers from which we're downloading validated blocks), disconnect due to timeout. + // We compensate for other peers to prevent killing off peers due to our own downstream link // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes // to unreasonably increase our timeout. - // We also compare the block download timeout originally calculated against the time at which we'd disconnect - // if we assumed the block were being requested now (ignoring blocks we've requested from this peer, since we're - // only looking at this peer's oldest request). This way a large queue in the past doesn't result in a - // permanently large window for this block to be delivered (ie if the number of blocks in flight is decreasing - // more quickly than once every 5 minutes, then we'll shorten the download window for this block). if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0) { QueuedBlock &queuedBlock = state.vBlocksInFlight.front(); - int64_t nTimeoutIfRequestedNow = GetBlockTimeout(nNow, nQueuedValidatedHeaders - state.nBlocksInFlightValidHeaders, consensusParams); - if (queuedBlock.nTimeDisconnect > nTimeoutIfRequestedNow) { - LogPrint("net", "Reducing block download timeout for peer=%d block=%s, orig=%d new=%d\n", pto->id, queuedBlock.hash.ToString(), queuedBlock.nTimeDisconnect, nTimeoutIfRequestedNow); - queuedBlock.nTimeDisconnect = nTimeoutIfRequestedNow; - } - if (queuedBlock.nTimeDisconnect < nNow) { + int nOtherPeersWithValidatedDownloads = nPeersWithValidatedDownloads - (state.nBlocksInFlightValidHeaders > 0); + if (nNow > state.nDownloadingSince + consensusParams.nPowTargetSpacing * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) { LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id); pto->fDisconnect = true; } diff --git a/src/main.h b/src/main.h index 47e18eab4..a89d14cdc 100644 --- a/src/main.h +++ b/src/main.h @@ -98,6 +98,10 @@ static const unsigned int AVG_ADDRESS_BROADCAST_INTERVAL = 30; /** Average delay between trickled inventory broadcasts in seconds. * Blocks, whitelisted receivers, and a random 25% of transactions bypass this. */ static const unsigned int AVG_INVENTORY_BROADCAST_INTERVAL = 5; +/** Block download timeout base, expressed in millionths of the block interval (i.e. 20 min) */ +static const int64_t BLOCK_DOWNLOAD_TIMEOUT_BASE = 2000000; +/** Additional block download timeout per parallel downloading peer (i.e. 5 min) */ +static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000; static const unsigned int DEFAULT_LIMITFREERELAY = 15; static const bool DEFAULT_RELAYPRIORITY = true; From 4c3a00d35ca31b66cba416092558e4a55e1da9d8 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 7 Apr 2016 13:18:11 +0200 Subject: [PATCH 41/45] Reduce block timeout to 10 minutes Now that #7804 fixed the timeout handling, reduce the block timeout from 20 minutes to 10 minutes. 20 minutes is overkill. Conflicts: src/main.h Github-Pull: #7832 Rebased-From: 62b9a557fca2aa55803c336ffcceccc50ccf0c3e --- src/main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.h b/src/main.h index a89d14cdc..1a696dcd9 100644 --- a/src/main.h +++ b/src/main.h @@ -98,8 +98,8 @@ static const unsigned int AVG_ADDRESS_BROADCAST_INTERVAL = 30; /** Average delay between trickled inventory broadcasts in seconds. * Blocks, whitelisted receivers, and a random 25% of transactions bypass this. */ static const unsigned int AVG_INVENTORY_BROADCAST_INTERVAL = 5; -/** Block download timeout base, expressed in millionths of the block interval (i.e. 20 min) */ -static const int64_t BLOCK_DOWNLOAD_TIMEOUT_BASE = 2000000; +/** Block download timeout base, expressed in millionths of the block interval (i.e. 10 min) */ +static const int64_t BLOCK_DOWNLOAD_TIMEOUT_BASE = 1000000; /** Additional block download timeout per parallel downloading peer (i.e. 5 min) */ static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000; From cada7c2418ef159ee932957314588956ec4d7eb1 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 7 Apr 2016 13:58:42 +0200 Subject: [PATCH 42/45] Fill in rest of release notes --- doc/release-notes.md | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 070be08d0..eba6c965e 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -2,7 +2,8 @@ Bitcoin Core version 0.12.1 is now available from: -This is a new major version release, bringing new features and other improvements. +This is a new minor version release, including the BIP9, BIP68 and BIP112 +softfork, various bugfixes and updated translations. Please report bugs using the issue tracker at github: @@ -146,31 +147,50 @@ 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 - -### Configuration and command-line options +### RPC and other APIs +- #7739 `7ffc2bd` Add abandoned status to listtransactions (jonasschnelli) ### Block and transaction handling +- #7543 `834aaef` Backport BIP9, BIP68 and BIP112 with softfork (btcdrak) ### P2P protocol and network code +- #7804 `90f1d24` Track block download times per individual block (sipa) +- #7832 `4c3a00d` Reduce block timeout to 10 minutes (laanwj) ### Validation +- #7821 `4226aac` init: allow shutdown during 'Activating best chain...' (laanwj) ### Build system +- #7487 `00d57b4` Workaround Travis-side CI issues (luke-jr) +- #7606 `a10da9a` No need to set -L and --location for curl (MarcoFalke) +- #7614 `ca8f160` Add curl to packages (now needed for depends) (luke-jr) +- #7776 `a784675` Remove unnecessary executables from gitian release (laanwj) ### Wallet - -### GUI - -### Tests and QA +- #7715 `19866c1` Fix calculation of balances and available coins. (morcos) ### Miscellaneous +- #7617 `f04f4fd` Fix markdown syntax and line terminate LogPrint (MarcoFalke) +- #7747 `4d035bc` added depends cross compile info (accraze) +- #7741 `a0cea89` Mark p2p alert system as deprecated (btcdrak) +- #7780 `c5f94f6` Disable bad-chain alert (btcdrak) Credits ======= Thanks to everyone who directly contributed to this release: +- accraze +- Alex Morcos +- BtcDrak +- Jonas Schnelli +- Luke Dashjr +- MarcoFalke +- Mark Friedenbach +- NicolasDorier +- Pieter Wuille +- Suhas Daftuar +- Wladimir J. van der Laan As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/). From 46898e7e942b4e04021aac3724eb4f2ec4cf567b Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Thu, 7 Apr 2016 14:33:08 -0400 Subject: [PATCH 43/45] Version 2 transactions remain non-standard until CSV activates Before activation, such transactions might not be mined, so don't allow into the mempool. - Tests: move get_bip9_status to util.py - Test relay of version 2 transactions Github-Pull: #7835 Rebased-From: e4ba9f6b0402cf7a2ad0d74f617c434a26c6e124 5cb1d8a2071d05beb9907a423178895fd8a5c359 da5fdbb3a2778523cce70d635c1aa2b31a693bc6 --- qa/rpc-tests/bip68-112-113-p2p.py | 19 ++++-------- qa/rpc-tests/bip68-sequence.py | 46 ++++++++++++++++++++++++++--- qa/rpc-tests/test_framework/util.py | 7 +++++ src/main.cpp | 8 +++++ 4 files changed, 63 insertions(+), 17 deletions(-) diff --git a/qa/rpc-tests/bip68-112-113-p2p.py b/qa/rpc-tests/bip68-112-113-p2p.py index 7d3c59be3..10b90318c 100755 --- a/qa/rpc-tests/bip68-112-113-p2p.py +++ b/qa/rpc-tests/bip68-112-113-p2p.py @@ -149,13 +149,6 @@ class BIP68_112_113Test(ComparisonTestFramework): block.solve() return block - def get_bip9_status(self, key): - info = self.nodes[0].getblockchaininfo() - for row in info['bip9_softforks']: - if row['id'] == key: - return row - raise IndexError ('key:"%s" not found' % key) - def create_bip68txs(self, bip68inputs, txversion, locktime_delta = 0): txs = [] assert(len(bip68inputs) >= 16) @@ -223,11 +216,11 @@ class BIP68_112_113Test(ComparisonTestFramework): self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0) self.nodeaddress = self.nodes[0].getnewaddress() - assert_equal(self.get_bip9_status('csv')['status'], 'defined') + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'defined') test_blocks = self.generate_blocks(61, 4) yield TestInstance(test_blocks, sync_every_block=False) # 1 # Advanced from DEFINED to STARTED, height = 143 - assert_equal(self.get_bip9_status('csv')['status'], 'started') + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'started') # Fail to achieve LOCKED_IN 100 out of 144 signal bit 0 # using a variety of bits to simulate multiple parallel softforks @@ -237,7 +230,7 @@ class BIP68_112_113Test(ComparisonTestFramework): test_blocks = self.generate_blocks(24, 536936448, test_blocks) # 0x20010000 (signalling not) yield TestInstance(test_blocks, sync_every_block=False) # 2 # Failed to advance past STARTED, height = 287 - assert_equal(self.get_bip9_status('csv')['status'], 'started') + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'started') # 108 out of 144 signal bit 0 to achieve lock-in # using a variety of bits to simulate multiple parallel softforks @@ -247,7 +240,7 @@ class BIP68_112_113Test(ComparisonTestFramework): test_blocks = self.generate_blocks(10, 536936448, test_blocks) # 0x20010000 (signalling not) yield TestInstance(test_blocks, sync_every_block=False) # 3 # Advanced from STARTED to LOCKED_IN, height = 431 - assert_equal(self.get_bip9_status('csv')['status'], 'locked_in') + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'locked_in') # 140 more version 4 blocks test_blocks = self.generate_blocks(140, 4) @@ -291,7 +284,7 @@ class BIP68_112_113Test(ComparisonTestFramework): test_blocks = self.generate_blocks(2, 4) yield TestInstance(test_blocks, sync_every_block=False) # 5 # Not yet advanced to ACTIVE, height = 574 (will activate for block 576, not 575) - assert_equal(self.get_bip9_status('csv')['status'], 'locked_in') + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'locked_in') # Test both version 1 and version 2 transactions for all tests # BIP113 test transaction will be modified before each use to put in appropriate block time @@ -368,7 +361,7 @@ class BIP68_112_113Test(ComparisonTestFramework): # 1 more version 4 block to get us to height 575 so the fork should now be active for the next block test_blocks = self.generate_blocks(1, 4) yield TestInstance(test_blocks, sync_every_block=False) # 8 - assert_equal(self.get_bip9_status('csv')['status'], 'active') + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'active') ################################# diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py index 40c9eff88..4f4a39f15 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -4,7 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. # -# Test BIP68 implementation (mempool only) +# Test BIP68 implementation # from test_framework.test_framework import BitcoinTestFramework @@ -27,8 +27,10 @@ class BIP68Test(BitcoinTestFramework): def setup_network(self): self.nodes = [] self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-blockprioritysize=0"])) + self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-blockprioritysize=0", "-acceptnonstdtxn=0"])) self.is_network_split = False self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"] + connect_nodes(self.nodes[0], 1) def run_test(self): # Generate some coins @@ -43,10 +45,18 @@ class BIP68Test(BitcoinTestFramework): print "Running test sequence-lock-unconfirmed-inputs" self.test_sequence_lock_unconfirmed_inputs() - # This test needs to change when BIP68 becomes consensus - print "Running test BIP68 not consensus" + print "Running test BIP68 not consensus before versionbits activation" self.test_bip68_not_consensus() + print "Verifying nVersion=2 transactions aren't standard" + self.test_version2_relay(before_activation=True) + + print "Activating BIP68 (and 112/113)" + self.activateCSV() + + print "Verifying nVersion=2 transactions are now standard" + self.test_version2_relay(before_activation=False) + print "Passed\n" # Test that BIP68 is not in effect if tx version is 1, or if @@ -334,8 +344,12 @@ class BIP68Test(BitcoinTestFramework): self.nodes[0].invalidateblock(self.nodes[0].getblockhash(cur_height+1)) self.nodes[0].generate(10) - # Make sure that BIP68 isn't being used to validate blocks. + # Make sure that BIP68 isn't being used to validate blocks, prior to + # versionbits activation. If more blocks are mined prior to this test + # being run, then it's possible the test has activated the soft fork, and + # this test should be moved to run earlier, or deleted. def test_bip68_not_consensus(self): + assert(get_bip9_status(self.nodes[0], 'csv')['status'] != 'active') txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2) tx1 = FromHex(CTransaction(), self.nodes[0].getrawtransaction(txid)) @@ -382,6 +396,30 @@ class BIP68Test(BitcoinTestFramework): self.nodes[0].submitblock(ToHex(block)) assert_equal(self.nodes[0].getbestblockhash(), block.hash) + def activateCSV(self): + # activation should happen at block height 432 (3 periods) + min_activation_height = 432 + height = self.nodes[0].getblockcount() + assert(height < 432) + self.nodes[0].generate(432-height) + assert(get_bip9_status(self.nodes[0], 'csv')['status'] == 'active') + sync_blocks(self.nodes) + + # Use self.nodes[1] to test standardness relay policy + def test_version2_relay(self, before_activation): + inputs = [ ] + outputs = { self.nodes[1].getnewaddress() : 1.0 } + rawtx = self.nodes[1].createrawtransaction(inputs, outputs) + rawtxfund = self.nodes[1].fundrawtransaction(rawtx)['hex'] + tx = FromHex(CTransaction(), rawtxfund) + tx.nVersion = 2 + tx_signed = self.nodes[1].signrawtransaction(ToHex(tx))["hex"] + try: + tx_id = self.nodes[1].sendrawtransaction(tx_signed) + assert(before_activation == False) + except: + assert(before_activation) + if __name__ == '__main__': BIP68Test().main() diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index d8bb63dbb..c71ca0d9f 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -490,3 +490,10 @@ def create_lots_of_big_transactions(node, txouts, utxos, fee): txid = node.sendrawtransaction(signresult["hex"], True) txids.append(txid) return txids + +def get_bip9_status(node, key): + info = node.getblockchaininfo() + for row in info['bip9_softforks']: + if row['id'] == key: + return row + raise IndexError ('key:"%s" not found' % key) diff --git a/src/main.cpp b/src/main.cpp index 2275a0208..f85ac3317 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1022,6 +1022,14 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const C if (fRequireStandard && !IsStandardTx(tx, reason)) return state.DoS(0, false, REJECT_NONSTANDARD, reason); + // Don't relay version 2 transactions until CSV is active, and we can be + // sure that such transactions will be mined (unless we're on + // -testnet/-regtest). + const CChainParams& chainparams = Params(); + if (fRequireStandard && tx.nVersion >= 2 && VersionBitsTipState(chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV) != THRESHOLD_ACTIVE) { + return state.DoS(0, false, REJECT_NONSTANDARD, "premature-version2-tx"); + } + // Only accept nLockTime-using transactions that can be mined in the next // block; we don't want our mempool filled up with transactions that can't // be mined yet. From 465d30915cd3c1634b32f942c1faae32967e9805 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 8 Apr 2016 14:24:57 +0200 Subject: [PATCH 44/45] doc: update release notes for #7835 --- doc/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index eba6c965e..5edab26a9 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -159,6 +159,7 @@ git merge commit are mentioned. ### Validation - #7821 `4226aac` init: allow shutdown during 'Activating best chain...' (laanwj) +- #7835 `46898e7` Version 2 transactions remain non-standard until CSV activates (sdaftuar) ### Build system - #7487 `00d57b4` Workaround Travis-side CI issues (luke-jr) From de7c34cab093557b139e407195996935b3fe7db3 Mon Sep 17 00:00:00 2001 From: BtcDrak Date: Sun, 10 Apr 2016 11:32:16 +0100 Subject: [PATCH 45/45] Add missing link to BIP113 --- doc/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 5edab26a9..610cd481d 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -57,6 +57,7 @@ This specific backport pull-request can be viewed at [BIP9]: https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki [BIP68]: https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki [BIP112]: https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki +[BIP113]: https://github.com/bitcoin/bips/blob/master/bip-0113.mediawiki BIP68 soft fork to enforce sequence locks for relative locktime ---------------------------------------------------------------