diff options
-rw-r--r-- | .travis.yml | 4 | ||||
-rwxr-xr-x | .travis/lint_04_install.sh | 2 | ||||
-rwxr-xr-x | .travis/test_06_script_b.sh | 2 | ||||
-rw-r--r-- | CONTRIBUTING.md | 31 | ||||
-rw-r--r-- | SECURITY.md | 11 | ||||
-rw-r--r-- | contrib/devtools/README.md | 2 | ||||
-rwxr-xr-x | contrib/devtools/github-merge.py | 6 | ||||
-rw-r--r-- | doc/developer-notes.md | 2 | ||||
-rw-r--r-- | doc/release-notes/release-notes-0.12.0.md | 2 | ||||
-rw-r--r-- | doc/release-process.md | 5 | ||||
-rw-r--r-- | src/netaddress.cpp | 4 | ||||
-rw-r--r-- | src/policy/fees.cpp | 2 | ||||
-rw-r--r-- | src/qt/bitcoingui.cpp | 5 | ||||
-rw-r--r-- | src/rpc/blockchain.cpp | 7 | ||||
-rw-r--r-- | src/rpc/rawtransaction.cpp | 2 | ||||
-rw-r--r-- | src/test/crypto_tests.cpp | 2 | ||||
-rw-r--r-- | src/torcontrol.cpp | 2 | ||||
-rwxr-xr-x | test/functional/feature_pruning.py | 19 | ||||
-rw-r--r-- | test/lint/lint-spelling.ignore-words.txt | 7 |
19 files changed, 63 insertions, 54 deletions
diff --git a/.travis.yml b/.travis.yml index c281d3ed70..adf2140642 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,8 @@ language: minimal cache: ccache: true directories: - - depends/built - - depends/sdk-sources + - $TRAVIS_BUILD_DIR/depends/built + - $TRAVIS_BUILD_DIR/depends/sdk-sources - $HOME/.ccache stages: - lint diff --git a/.travis/lint_04_install.sh b/.travis/lint_04_install.sh index 9a22773e57..62174620f2 100755 --- a/.travis/lint_04_install.sh +++ b/.travis/lint_04_install.sh @@ -6,7 +6,7 @@ export LC_ALL=C -travis_retry pip install codespell==1.13.0 +travis_retry pip install codespell==1.15.0 travis_retry pip install flake8==3.5.0 travis_retry pip install vulture==0.29 diff --git a/.travis/test_06_script_b.sh b/.travis/test_06_script_b.sh index 0420acb993..e40055a6ee 100755 --- a/.travis/test_06_script_b.sh +++ b/.travis/test_06_script_b.sh @@ -25,3 +25,5 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN} END_FOLD fi + +cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5df99adba8..a2456f5b8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -237,24 +237,35 @@ request. Typically reviewers will review the code for obvious errors, as well as test out the patch set and opine on the technical merits of the patch. Project maintainers take into account the peer review when determining if there is consensus to merge a pull request (remember that discussions may have been -spread out over GitHub, mailing list and IRC discussions). The following +spread out over GitHub, mailing list and IRC discussions). + +#### Conceptual Review + +A review can be a conceptual review, where the reviewer leaves a comment + * `Concept (N)ACK`, meaning "I do (not) agree in the general goal of this pull + request", + * `Approach (N)ACK`, meaning `Concept ACK`, but "I do (not) agree with the + approach of this change". + +A `NACK` needs to include a rationale why the change is not worthwhile. +NACKs without accompanying reasoning may be disregarded. + +#### Code Review + +After conceptual agreement on the change, code review can be provided. It is +starting with `ACK BRANCH_COMMIT`, where `BRANCH_COMMIT` is the top of the +topic branch. The review is followed by a description of how the reviewer did +the review. The following language is used within pull-request comments: - - (t)ACK means "I have tested the code and I agree it should be merged", involving + - "I have tested the code", involving change-specific manual testing in addition to running the unit and functional tests, and in case it is not obvious how the manual testing was done, it should be described; - - NACK means "I disagree this should be merged", and must be accompanied by - sound technical justification (or in certain cases of copyright/patent/licensing - issues, legal justification). NACKs without accompanying reasoning may be - disregarded; - - utACK means "I have not tested the code, but I have reviewed it and it looks + - "I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged"; - - Concept ACK means "I agree in the general principle of this pull request"; - Nit refers to trivial, often non-blocking issues. -Reviewers should include the commit hash which they reviewed in their comments. - Project maintainers reserve the right to weigh the opinions of peer reviewers using common sense judgement and also may weight based on meritocracy: Those that have demonstrated a deeper commitment and understanding towards the project diff --git a/SECURITY.md b/SECURITY.md index 4044722374..7ed96c7cea 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,15 +2,8 @@ ## Supported Versions -Versions of Bitcoin Core that are currently supported with security updates: - -| Version | Supported | -| ------- | ------------------ | -| 0.18 | :white_check_mark: | -| 0.17 | :white_check_mark: | -| 0.16 | :white_check_mark: | -| 0.15 | :white_check_mark: | -| < 0.15 | :x: | +See our website for versions of Bitcoin Core that are currently supported with +security updates: https://bitcoincore.org/en/lifecycle/#schedule ## Reporting a Vulnerability diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 0c8c396503..4994d7f0a5 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -144,7 +144,7 @@ Then do: Create and verify timestamps of merge commits --------------------------------------------- To create or verify timestamps on the merge commits, install the OpenTimestamps -client via `pip3 install opentimestamps-client`. Then, dowload the gpg wrapper +client via `pip3 install opentimestamps-client`. Then, download the gpg wrapper `ots-git-gpg-wrapper.sh` and set it as git's `gpg.program`. See [the ots git integration documentation](https://github.com/opentimestamps/opentimestamps-client/blob/master/doc/git-integration.md#usage) for further details. diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py index df1f3c8024..03179cec24 100755 --- a/contrib/devtools/github-merge.py +++ b/contrib/devtools/github-merge.py @@ -32,11 +32,11 @@ BASH = os.getenv('BASH','bash') # OS specific configuration for terminal attributes ATTR_RESET = '' ATTR_PR = '' -COMMIT_FORMAT = '%h %s (%an)%d' +COMMIT_FORMAT = '%H %s (%an)%d' if os.name == 'posix': # if posix, assume we can use basic terminal escapes ATTR_RESET = '\033[0m' ATTR_PR = '\033[1;36m' - COMMIT_FORMAT = '%C(bold blue)%h%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset' + COMMIT_FORMAT = '%C(bold blue)%H%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset' def git_config_get(option, default=None): ''' @@ -279,7 +279,7 @@ def main(): else: firstline = 'Merge #%s' % (pull,) message = firstline + '\n\n' - message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8') + message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%H %s (%an)',base_branch+'..'+head_branch]).decode('utf-8') message += '\n\nPull request description:\n\n ' + body.replace('\n', '\n ') + '\n' message += get_acks_from_comments(head_commit=subprocess.check_output([GIT,'log','-1','--pretty=format:%H',head_branch]).decode('utf-8')[:6], comments=comments) try: diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 45e55b7c40..f4fc55427d 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -280,7 +280,7 @@ thread](https://askubuntu.com/questions/50145/how-to-install-perf-monitoring-too for specific instructions. Certain kernel parameters may need to be set for perf to be able to inspect the -running process' stack. +running process's stack. ```sh $ sudo sysctl -w kernel.perf_event_paranoid=-1 diff --git a/doc/release-notes/release-notes-0.12.0.md b/doc/release-notes/release-notes-0.12.0.md index cf74a17975..bc0d5ea3b0 100644 --- a/doc/release-notes/release-notes-0.12.0.md +++ b/doc/release-notes/release-notes-0.12.0.md @@ -127,7 +127,7 @@ minimum relay feerate. The initial minimum relay feerate is set to 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 +total size of 101 KB). These limits can be overridden using command line arguments; see the extended help (`--help -help-debug`) for more information. Opt-in Replace-by-fee transactions diff --git a/doc/release-process.md b/doc/release-process.md index 8f1222cb88..480b09ee11 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -41,12 +41,10 @@ Release Process #### After branch-off (on master) - Update the version of `contrib/gitian-descriptors/*.yml`. -- Update the versions in `SECURITY.md` as per the software lifecycle [maintenance policy](https://bitcoincore.org/en/lifecycle/#maintenance-period), generally bumping all up one major version. #### After branch-off (on the major release branch) - Update the versions and the link to the release notes draft in `doc/release-notes.md`. -- Delete `SECURITY.md`. #### Before final release @@ -325,6 +323,9 @@ bitcoin.org (see below for bitcoin.org update instructions). - bitcoincore.org blog post + - bitcoincore.org maintained versions update: + [table](https://github.com/bitcoin-core/bitcoincore.org/commits/master/_includes/posts/maintenance-table.md) + - bitcoincore.org RPC documentation update - Update packaging repo diff --git a/src/netaddress.cpp b/src/netaddress.cpp index db6c46d12a..4fbfa2b5c8 100644 --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -239,7 +239,7 @@ bool CNetAddr::IsLocal() const * be used to refer to an actual host. * * @note A valid address may or may not be publicly routable on the global - * internet. As in, the set of valid addreses is a superset of the set of + * internet. As in, the set of valid addresses is a superset of the set of * publicly routable addresses. * * @see CNetAddr::IsRoutable() @@ -287,7 +287,7 @@ bool CNetAddr::IsValid() const * @returns Whether or not this network address is publicly routable on the * global internet. * - * @note A routable address is always valid. As in, the set of routable addreses + * @note A routable address is always valid. As in, the set of routable addresses * is a subset of the set of valid addresses. * * @see CNetAddr::IsValid() diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp index 7e93a746ca..5d538606c2 100644 --- a/src/policy/fees.cpp +++ b/src/policy/fees.cpp @@ -47,7 +47,7 @@ private: std::vector<double> txCtAvg; // Count the total # of txs confirmed within Y blocks in each bucket - // Track the historical moving average of theses totals over blocks + // Track the historical moving average of these totals over blocks std::vector<std::vector<double>> confAvg; // confAvg[Y][X] // Track moving avg of txs which have been evicted from the mempool diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index b5c92e10a2..1444dddeb1 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -335,7 +335,7 @@ void BitcoinGUI::createActions() openAction->setStatusTip(tr("Open a bitcoin: URI or payment request")); m_open_wallet_action = new QAction(tr("Open Wallet"), this); - m_open_wallet_action->setMenu(new QMenu(this)); + m_open_wallet_action->setEnabled(false); m_open_wallet_action->setStatusTip(tr("Open a wallet")); m_close_wallet_action = new QAction(tr("Close Wallet..."), this); @@ -633,6 +633,9 @@ void BitcoinGUI::setWalletController(WalletController* wallet_controller) m_wallet_controller = wallet_controller; + m_open_wallet_action->setEnabled(true); + m_open_wallet_action->setMenu(new QMenu(this)); + connect(wallet_controller, &WalletController::walletAdded, this, &BitcoinGUI::addWallet); connect(wallet_controller, &WalletController::walletRemoved, this, &BitcoinGUI::removeWallet); diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 49d7ae2016..50c4589d9f 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1061,7 +1061,12 @@ static UniValue pruneblockchain(const JSONRPCRequest& request) } PruneBlockFilesManual(height); - return uint64_t(height); + const CBlockIndex* block = ::ChainActive().Tip(); + assert(block); + while (block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA)) { + block = block->pprev; + } + return uint64_t(block->nHeight); } static UniValue gettxoutsetinfo(const JSONRPCRequest& request) diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 0b760439c1..cabab78dc3 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -39,7 +39,7 @@ /** High fee for sendrawtransaction and testmempoolaccept. * By default, transaction with a fee higher than this will be rejected by the - * RPCs. This can be overriden with the maxfeerate argument. + * RPCs. This can be overridden with the maxfeerate argument. */ constexpr static CAmount DEFAULT_MAX_RAW_TX_FEE{COIN / 10}; diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index 35911e507f..4e2acca4c3 100644 --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -567,7 +567,7 @@ BOOST_AUTO_TEST_CASE(poly1305_testvector) BOOST_AUTO_TEST_CASE(hkdf_hmac_sha256_l32_tests) { - // Use rfc5869 test vectors but trucated to 32 bytes (our implementation only support length 32) + // Use rfc5869 test vectors but truncated to 32 bytes (our implementation only support length 32) TestHKDF_SHA256_32( /* IKM */ "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b", /* salt */ "000102030405060708090a0b0c", diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index 550e23b222..84f54da515 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -412,7 +412,7 @@ public: TorController(struct event_base* base, const std::string& target); ~TorController(); - /** Get name fo file to store private key in */ + /** Get name of file to store private key in */ fs::path GetPrivateKeyFile(); /** Reconnect, after getting disconnected */ diff --git a/test/functional/feature_pruning.py b/test/functional/feature_pruning.py index e2b3b2d544..66c395d7a2 100755 --- a/test/functional/feature_pruning.py +++ b/test/functional/feature_pruning.py @@ -23,8 +23,6 @@ from test_framework.util import ( wait_until, ) -MIN_BLOCKS_TO_KEEP = 288 - # Rescans start at the earliest block up to 2 hours before a key timestamp, so # the manual prune RPC avoids pruning blocks in the same window to be # compatible with pruning based on key creation time. @@ -273,20 +271,9 @@ class PruneTest(BitcoinTestFramework): else: return index - def prune(index, expected_ret=None): + def prune(index): ret = node.pruneblockchain(height=height(index)) - # Check the return value. When use_timestamp is True, just check - # that the return value is less than or equal to the expected - # value, because when more than one block is generated per second, - # a timestamp will not be granular enough to uniquely identify an - # individual block. - if expected_ret is None: - expected_ret = index - if use_timestamp: - assert_greater_than(ret, 0) - assert_greater_than(expected_ret + 1, ret) - else: - assert_equal(ret, expected_ret) + assert_equal(ret, node.getblockchaininfo()['pruneheight']) def has_block(index): return os.path.isfile(os.path.join(self.nodes[node_number].datadir, "regtest", "blocks", "blk{:05}.dat".format(index))) @@ -326,7 +313,7 @@ class PruneTest(BitcoinTestFramework): assert not has_block(1), "blk00001.dat is still there, should be pruned by now" # height=1000 should not prune anything more, because tip-288 is in blk00002.dat. - prune(1000, 1001 - MIN_BLOCKS_TO_KEEP) + prune(1000) assert has_block(2), "blk00002.dat is still there, should be pruned by now" # advance the tip so blk00002.dat and blk00003.dat can be pruned (the last 288 blocks should now be in blk00004.dat) diff --git a/test/lint/lint-spelling.ignore-words.txt b/test/lint/lint-spelling.ignore-words.txt index f0415443db..a25de2435b 100644 --- a/test/lint/lint-spelling.ignore-words.txt +++ b/test/lint/lint-spelling.ignore-words.txt @@ -5,3 +5,10 @@ mut objext unselect useable +wit +unparseable +copyable +cachable +errorstring +keyserver +homogenous |