Commit Graph

21144 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
bff9273316
Merge #16737: test: Establish only one connection between nodes in rpc_invalidateblock
fae961de6be3e2ab9793d437079651541e219e71 test: Establish only one connection between nodes in rpc_invalidateblock (MarcoFalke)

Pull request description:

  Headers and block sync should eventually converge to the same result, regardless of whether the peers treat each other as "inbound" or "outbound".

  `connect_nodes_bi` has been introduced as a (temporary?) workaround for bug #5113 and #5138, which has long been fixed in #5157 and #5662.

  Thus remove the `connect_nodes_bi` workaround from the rpc_invalidateblock test.

  Conveniently, this also closes #16453. See https://github.com/bitcoin/bitcoin/issues/16444#issuecomment-514801708 for rationale

ACKs for top commit:
  laanwj:
    ACK fae961de6be3e2ab9793d437079651541e219e71

Tree-SHA512: b3614c66a205823df73f64d19cacfbec269beb5db52ff79004d746e17d7c0dfb43ab9785fdddc97e2a76fe76286c8c605b34df3dda4a2bf5be035f01169ae89a
2021-12-15 20:09:57 +05:30
MarcoFalke
cf43f40fb4
Merge #16404: qa: Test ZMQ notification after chain reorg
abdfc5e89b687f73de4ab97e924c29cc27e71c15 qa: Test ZMQ notification after chain reorg (João Barbosa)
aa2622a726bc0f02152d79c888a332694678a989 qa: Refactor ZMQ test (João Barbosa)
6bc1ff915dd495f05985d3402a34dbfc3b6a08b4 doc: Add note regarding ZMQ block notification (João Barbosa)

Pull request description:

Top commit has no ACKs.

Tree-SHA512: b93237adc8c84b3aa72ccc28097090eabcb006cf408083218bebf6fec703bd0de2ded80b6879e77096872e14ba9402a6d3f923b146a54d4c4e41dcb862c3e765
2021-12-15 20:09:56 +05:30
Wladimir J. van der Laan
3d8be2d355
Merge #15687: test: tool wallet test coverage for unexpected writes to wallet
7195fa792fcc19e9c064c4e38814c3b46a210b34 test: Tool wallet test coverage for unexpected writes to wallet (Jon Atack)
3bf2b3a37bbd550491d124b77fd7c1b2a7969f66 test: Split tool_wallet.py test into subtests (Jon Atack)
1eb13f09a9d8c2c7dc69f4cdf1b1ccf632543aa0 test: Add log messages to test/functional/tool_wallet.py (Jon Atack)

Pull request description:

  This pull request adds test coverage in `test/functional/tool_wallet.py` to reproduce unexpected writes to the wallet as described in https://github.com/bitcoin/bitcoin/issues/15608 and serve as a benchmark for fixing the issue:

  - Wallet tool `info` unexpectedly writes to the wallet file if the wallet file permissions are read/write.

  - Wallet tool `info` raises with "Error loading . Is wallet being used by another process?" if the wallet file permissions are read-only.

  Goals:

  1. Reproduce the reported issue, define the current unexpected behavior, and add test coverage to guide a future fix. Add debug-level logging for sanity checking and commented-out assertions to be uncommented when fixing the issue. Add the same coverage to the wallet tool create test and the getwalletinfo test as regression tests while fixing the issue.

  2. Add info log messages as there are currently none in the test file.

  3. Split the tests out to separate functions as per review feedback.

  Thanks to Marco Falke for pointing me in the right direction.

ACKs for top commit:
  laanwj:
    code review ACK 7195fa792fcc19e9c064c4e38814c3b46a210b34

Tree-SHA512: 16a41cce989c8f819cf5b02c6cf8ea84653ede2738fb402f6c36cf4dc075b424dff3e2c73a1cfa1ec9c75f614675baecc71e588845a2596db06ba0957db2df7b
2021-12-15 20:09:56 +05:30
Wladimir J. van der Laan
f659d98cc6
Merge #16294: qt: test: Create at most one testing setup
faa1e0fb1712b1f94334e42794163f79988270fd qt: test: Create at most one testing setup (MarcoFalke)

Pull request description:

  It is assumed that ideally only one BasicTestingSetup exists at any point in time for each process (due to use of globals).

  This assumption is violated in the GUI tests, as a testing setup is created as the first step of the `main` function and then (sometimes) another one for the following test cases.

  So, the gui tests create two testing setups:
  * `BasicTestingSetup` in `main` (added in fa4a04a5a942d582c62773d815c7e1e9897975d0)
  * a testing setup for individual test cases

  Avoid that by destructing the testing setup in main after creation and then move the explicit `ECC_Stop` to the only places where it is needed (before and after `apptests`).

ACKs for top commit:
  laanwj:
    code review ACK faa1e0fb1712b1f94334e42794163f79988270fd

Tree-SHA512: b8edceb7e2a8749e1de3ea80bc20b6fb7d4390bf366bb9817206ada3dc8669a91416f4803c22a0e6c636c514e0c858dcfe04523221f8851b10deaf472f107d82
2021-12-15 20:09:55 +05:30
UdjinM6
6af131f825
Merge pull request #4568 from kittywhiskers/miscports
merge bitcoin#15588...#16475: backports
2021-12-13 01:15:18 +03:00
MarcoFalke
3c5dcb036a Merge #16659: refactoring: Remove unused includes
084e17cebd424b8e8ced674bc810eef4e6ee5d3b Remove unused includes (practicalswift)

Pull request description:

  As requested by MarcoFalke in https://github.com/bitcoin/bitcoin/pull/16273#issuecomment-521332089:

  This PR removes unused includes.

  Please note that in contrast to #16273 I'm limiting the scope to the trivial cases of pure removals (i.e. no includes added) to make reviewing easier.

  I'm seeking "Concept ACK":s for this obviously non-urgent minor cleanup.

  Rationale:
  * Avoids unnecessary re-compiles in case of header changes.
  * Makes reasoning about code dependencies easier.
  * Reduces compile-time memory usage.
  * Reduces compilation time.
  * Warm fuzzy feeling of being lean :-)

ACKs for top commit:
  ryanofsky:
    Code review ACK 084e17cebd424b8e8ced674bc810eef4e6ee5d3b. PR only removes include lines and it still compiles. In the worst case someone might have to explicitly add an include later for something now included implicitly. But maybe some effort was taken to avoid this, and it wouldn't be a tragedy anyway.

Tree-SHA512: 89de56edc6ceea4696e9579bccff10c80080821685b9fb4e8c5ef593b6e43cf662f358788701bb09f84867693f66b2e4db035b92b522a0a775f50b7ecffd6a6d
2021-12-12 16:44:54 -05:00
PastaPastaPasta
a7f5379e19
Merge pull request #4570 from kittywhiskers/miscports_again_again
merge bitcoin#15928...#16984: backports
2021-12-12 16:00:56 -05:00
Kittywhiskers Van Gogh
f2af35c92e merge bitcoin#16502: Drop unused OldKey 2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
1f61b27399 merge bitcoin#16475: Enumerate walletdb keys 2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
f67199bbb0 merge bitcoin#16468: Exclude depends/Makefile in .gitignore 2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
1e11a7ad03 merge bitcoin#16415: Get rid of PendingWalletTx class
Co-authored-by: PastaPastaPasta <PastaPastaPasta@users.noreply.github.com>
2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
e51c4c41c0 merge bitcoin#16299: Move generated data to a dedicated translation unit 2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
4bc0ae1ee2 merge bitcoin#16033: Hold cs_main when reading chainActive via getTipLocator(). Remove assumeLocked(). 2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
0187d2e597 merge bitcoin#15713: Replace chain relayTransactions/submitMemoryPool by higher method 2021-12-12 22:36:50 +05:30
Kittywhiskers Van Gogh
77d4c51507 merge bitcoin#15778: Move maxtxfee from node to wallet 2021-12-12 21:27:53 +05:30
Kittywhiskers Van Gogh
ed48a889bf merge bitcoin#15632: Remove ResendWalletTransactions from the Validation Interface 2021-12-12 21:27:51 +05:30
Kittywhiskers Van Gogh
3284d82296 merge bitcoin#15620: Uncouple non-wallet rpcs from maxTxFee global 2021-12-12 21:07:49 +05:30
Kittywhiskers Van Gogh
c04f74b1d4 merge bitcoin#15680: Remove resendwallettransactions RPC method 2021-12-12 21:07:49 +05:30
Kittywhiskers Van Gogh
ee4f2fc8b4 merge bitcoin#15728: Refactor relay transactions 2021-12-12 21:07:49 +05:30
Kittywhiskers Van Gogh
11fc0f5667 merge bitcoin#15646: Add test for wallet rebroadcasts
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-12-12 21:07:43 +05:30
Kittywhiskers Van Gogh
6718789ada merge bitcoin#17449: fix uninitialized variable nMinerConfirmationWindow 2021-12-12 20:32:49 +05:30
Kittywhiskers Van Gogh
4486659768 merge bitcoin#15928: Move QRImageWidget to its own file-pair 2021-12-12 20:32:49 +05:30
Kittywhiskers Van Gogh
adc3f0478c merge bitcoin#16984: Make thread names shorter 2021-12-12 20:32:49 +05:30
Kittywhiskers Van Gogh
ac4dc7f4a6 merge bitcoin#16713: Ignore old versionbit activations to avoid 'unknown softforks' warning 2021-12-12 20:32:48 +05:30
Kittywhiskers Van Gogh
e1a40e554c merge bitcoin#15588: Log the actual wallet file version and no longer publicly expose the "version" record 2021-12-12 19:46:11 +05:30
Kittywhiskers Van Gogh
2fecd1495f merge bitcoin#15401: Actually throw help when passed invalid number of params 2021-12-12 19:46:11 +05:30
Kittywhiskers Van Gogh
269501259c merge bitcoin#14845: Add wallet_balance.py
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-12-12 19:46:11 +05:30
PastaPastaPasta
58d3e1381b
refactor: modifications to GenerateContributions (#4594)
* modifications to GenerateContributions

* Introduce some benchmarks to ensure there's no regression

* minor fixups

Signed-off-by: pasta <pasta@dashboost.org>
2021-12-12 16:37:26 +03:00
Kittywhiskers Van Gogh
45e09d4bb0 merge bitcoin#16865: add some unit tests for merkle.cpp 2021-12-12 18:57:02 +05:30
Kittywhiskers Van Gogh
98465b2a59 merge bitcoin#16850: servicesnames field in getpeerinfo and getnetworkinfo 2021-12-12 18:57:02 +05:30
Kittywhiskers Van Gogh
fc6e35060d merge bitcoin#16796: Fix segfault in CreateWalletFromFile 2021-12-12 18:57:02 +05:30
Kittywhiskers Van Gogh
c6c307b3f7 merge bitcoin#13541: sendrawtransaction maxfeerate 2021-12-12 11:57:44 +05:30
PastaPastaPasta
8f36cfe236
refactor: introduce MAKE_MSG macro for compile time check to ensure the p2p message name is short enough (#4614)
* refactor: introduce MAKE_MSG macro for compile time check to ensure the p2p message name is short enough

I would like this ofc to not be a macro, but to be as non-invasive as possible, I think a macro is best. Arguably these should all be converted to string_view and have a better abstraction layer over it (kinda like we do with sporks) as opposed to needing to place these names in multiple files.

* optional; also use it for bitcoin's NetMsgType's

* use std::size instead of potentiall non-constexpr strlen

Signed-off-by: pasta <pasta@dashboost.org>
2021-12-12 01:15:00 +03:00
PastaPastaPasta
683be4086e
build: enable experimental Cxx20 support (#4600)
* build: Add optional c++20 compilation option

* build: update ax_cxx_compile_stdcxx.m4 to be compatible with c++20

* fix: fix c++20 build error for undefined identifier

* ci: enable c++20 build during ci

* cxx17 -> cxx20

Signed-off-by: pasta <pasta@dashboost.org>
2021-12-12 01:14:17 +03:00
PastaPastaPasta
a490615a8b
Merge pull request #4601 from dzutte-cpp/merge_15497_15744
Backport bitcoin#15497 and bitcoin#15744
2021-12-11 16:09:07 -05:00
UdjinM6
5502ce2705
Merge pull request #4602 from PastaPastaPasta/drop-unused-boost-libs
build: remove unused boost libraries
2021-12-11 23:02:44 +03:00
PastaPastaPasta
9f95e4947e
refactor: remove unused include in miner.cpp (#4617)
Signed-off-by: pasta <pasta@dashboost.org>
2021-12-11 23:01:56 +03:00
UdjinM6
99cbd9d0d2
test: replace feature_block_reward_reallocation.py with two corresponding unit tests (#4603)
* test: Add BRR and DAT unit tests

* test: Drop feature_block_reward_reallocation.py

* change copyright

* remove trivially removable includes

* use constexpr, remove empty statement

* Don't use BOOST_ASSERT, fix bug?

Not sure if this was a bug, as it does an assignment. If this isn't a bug please add a comment / explanation
```
BOOST_ASSERT(::ChainActive().Tip()->nVersion = 536870912);
```

* deduplicate all the things (also test all activation periods)

* use try_emplace, and remove some tempararies

* update threshold to be inline with dynamic

* explicitly include map, vector, remove now unneeded base58.h

* remove unused param, and replace raw loop with range loop

* re: Don't use BOOST_ASSERT, fix bug?

* Make TestChain<smth>Setup in dynamic_activation_thresholds_tests more general

* Specify min level activation tests correctly

Co-authored-by: Pasta <pasta@dashboost.org>
2021-12-11 23:01:20 +03:00
pravblockc
459bc3ee7e
add ehf special tx (#4577) 2021-12-11 23:00:27 +03:00
Wladimir J. van der Laan
52d2004b0b Merge #16817: rpc: Fix casing in getblockchaininfo to be inline with other fields
1a02edb3f2803b6f82f06a31acf0b0e5fc19bd1c [RPC] Fix casing in getblockchaininfo to be inline with the rest of the response (Dan Gershony)

Pull request description:

  The response in the RPC result `startTime` is camel cased while the rest of the response seems to be lower cased.

  If this was intentional please ignore and close this PR.

  Note: RPC field case changes might break existing callers

ACKs for top commit:
  laanwj:
    ACK 1a02edb3f2803b6f82f06a31acf0b0e5fc19bd1c

Tree-SHA512: 6f0eaf2b4aaf73c9a9bf1fbd4af59af5f95fc012fa88f94e050e6ae273b3ad647f5729df53bfce91e1a925fe4fd7b14818908bb6131a81413a555137d1007d7c
2021-12-09 11:18:25 -05:00
Kittywhiskers Van Gogh
06ebacbb9a
build: bump gmp from 6.1.2 to 6.2.1 (#4597) 2021-12-06 19:35:38 -05:00
Pasta
4176234dea
remove references to libboost-system-dev and libboost-chrono-dev 2021-12-06 13:05:32 -05:00
Pasta
9504065688
extend 18264: build: Remove Boost System 2021-12-05 23:52:21 -05:00
fanquake
ff632333ae
Merge #18264: build: Remove Boost Chrono
ad345909b2465a65ee023b389fae342088e2f187 doc: remove Boost Chrono from install docs (fanquake)
e21fa542b189263ad3a4342d048905d68c3a3507 test: remove Boost Chrono installation from CI (fanquake)
bd37f2bc26158f85ef1ab73b9ca1fc0da8ea562a build: remove Boost Chrono detection from build system (fanquake)
1d0a87e712a6253ef3f9b06a9611fd8e113401d2 build: remove chrono package from depends Boost (fanquake)

Pull request description:

  We no longer use Boost Chrono.

ACKs for top commit:
  practicalswift:
    ACK ad345909b2465a65ee023b389fae342088e2f187
  MarcoFalke:
    ACK ad345909b2465a65ee023b389fae342088e2f187
  kallewoof:
    ACK ad345909b2465a65ee023b389fae342088e2f187

Tree-SHA512: d987ab5461c76c982318c65ec8d625094356716b79fd3a462beea75f07db0f82608ace13ec4c4b0233f352508715a4505ac2b4ed1c1e9d9d78f0da936b80f0f3

# Conflicts:
#	build_msvc/bitcoin_config.h
#	ci/test/00_setup_env_native_asan.sh
#	ci/test/00_setup_env_native_fuzz.sh
#	ci/test/00_setup_env_native_fuzz_with_valgrind.sh
#	ci/test/00_setup_env_native_tsan.sh
#	ci/test/00_setup_env_native_valgrind.sh
#	depends/packages/boost.mk
#	doc/build-unix.md
2021-12-05 23:51:09 -05:00
Kittywhiskers Van Gogh
d7281c82ef merge bitcoin#16826: Do additional character escaping for wallet names and address labels 2021-12-05 18:45:22 +05:30
Kittywhiskers Van Gogh
4c85471e6d merge bitcoin#16758: Replace QFontMetrics::width() with TextWidth() 2021-12-05 18:45:22 +05:30
Kittywhiskers Van Gogh
d4a1decb73 merge bitcoin#16701: Replace functions deprecated in Qt 5.13 2021-12-05 18:45:22 +05:30
Kittywhiskers Van Gogh
16b2591e77 merge bitcoin#16570: Make descriptor tests deterministic 2021-12-05 15:47:46 +05:30
UdjinM6
632c759352
Merge pull request #4605 from UdjinM6/bp21036_min
Merges: #16184, #17029, #17308, #17409, #17483, #17756, #18331, #18556, #19622; partial merges: #16327, #18104, #18741, #20318, #21036
2021-12-05 13:07:44 +03:00
Wladimir J. van der Laan
3d642e293b Merge #16397: doc: Clarify includeWatching for fundrawtransaction
80031045fc6435ef4eb5dd1aee773d938c57a0fd Clarify includeWatching for fundrawtransaction (Steven Roose)

Pull request description:

  Might be sufficient to solve https://github.com/bitcoin/bitcoin/issues/16396, https://github.com/bitcoin/bitcoin/issues/7879 and https://github.com/bitcoin/bitcoin/issues/14405.

ACKs for top commit:
  Sjors:
    ACK 8003104. This will always be confusing, but at least it gives a bunch more clues for the user to google.

Tree-SHA512: 9b8002c259c50f93d89fc5574105aae6152858d8d45c07b4c3d5b7023adafe73c7a98a290874ff3fbbb7dfad2ac1bdf4acb8769a2a1c14e38484922f44e84e54
2021-12-04 21:05:07 -05:00