Commit graph

29676 commits

Author SHA1 Message Date
Sebastian Falbesoner
b57b633b94 test: use script_util helpers for creating P2PKH scripts 2021-06-28 20:14:07 +02:00
Sebastian Falbesoner
61b6a017a9 test: wallet util: fix multisig P2SH-P2WSH script creation 2021-06-28 20:14:01 +02:00
MarcoFalke
9c3751a0c9
Merge bitcoin/bitcoin#22342: Avoid the use of P0083R3 std::set::merge
6cf4ea7187 Avoid the use of P0083R3 std::set::merge (Pieter Wuille)

Pull request description:

  This use was introduced in #21365, but as pointed out in #22339, this causes compatibility problems.

  Just avoid its use for now.

ACKs for top commit:
  jonatack:
    re-ACK 6cf4ea7187
  benthecarman:
    ACK 6cf4ea7187
  hebasto:
    ACK 6cf4ea7187, successfully compiled on the following systems:

Tree-SHA512: 2b3fdcadb7de98963ebb0b192bd956aa68526457fe5b374c74a69ea10d5b68902763148f11abbcc471010bcdc799e0804faef5f8e8ff8a509b3a053c0cb0ba39
2021-06-26 10:02:36 +02:00
Pieter Wuille
6cf4ea7187 Avoid the use of P0083R3 std::set::merge 2021-06-25 10:42:05 -07:00
MarcoFalke
3e306ee1d5
Merge bitcoin/bitcoin#19362: rpc/blockchain: Reset scantxoutset progress before inferring descriptors
8c4129b454 rpc: reset scantxoutset progress on finish (Pavol Rusnak)

Pull request description:

  Fixes https://github.com/bitcoin/bitcoin/issues/19361 by moving resetting the `g_scan_progress` variable **before** inferring the descriptors

ACKs for top commit:
  achow101:
    Code review ACK 8c4129b454

Tree-SHA512: 2b81e5c930b9c201a1b9cc742c37e0617582326acd9adbd6b14991d33c05d51b1d5ff6a26f3accab7d274dc8c6a48bc8cbccf0811b60c1f76dd805f9b31482c0
2021-06-25 11:21:33 +02:00
MarcoFalke
246daf1f53
Merge bitcoin/bitcoin#22322: fuzz: Check banman roundtrip
fa485d06ec fuzz: Check banman roundtrip (MarcoFalke)

Pull request description:

ACKs for top commit:
  practicalswift:
    cr ACK fa485d06ec
  vasild:
    ACK fa485d06ec

Tree-SHA512: 84e297c0b90ef68d72afd2053bfda2888496c1b180233516a8caaf76d6c03403f1e4ed59f1eb32d799873fc34009634b4ce372244b9d546d04626af41ac4d1d7
2021-06-25 10:07:58 +02:00
MarcoFalke
b2f5c38333
Merge bitcoin/bitcoin#22327: cli: Avoid truncating -rpcwaittimeout
fa34cb8024 cli: Avoid truncating -rpcwaittimeout (MarcoFalke)

Pull request description:

  `seconds` is not enough precision to "exactly" store a timestamp n seconds into the future. Improve the precision by using `microseconds`. Fixes #22325

  Also, use chrono literals.

ACKs for top commit:
  jonatack:
    ACK fa34cb8024 review, debug-built, tested
  theStack:
    Tested ACK fa34cb8024

Tree-SHA512: 7158da8545f9998a82bcc8636e04564efdb1e1be43b4288298c151b4df29ad47a2760259eefadd4a01db92ea18a1e017f3febc1cd8c69a4b28c86180229d8c90
2021-06-24 16:01:21 +02:00
MarcoFalke
fa485d06ec
fuzz: Check banman roundtrip 2021-06-24 15:57:34 +02:00
W. J. van der Laan
0553d75268
Merge bitcoin/bitcoin#22154: Add OutputType::BECH32M and related wallet support for fetching bech32m addresses
754f134a50 wallet: Add error message to GetReservedDestination (Andrew Chow)
87a0e7a3b7 Disallow bech32m addresses for legacy wallet things (Andrew Chow)
6dbe4d1072 Use BECH32M for tr() desc, WitV1Taproot, and WitUnknown CTxDests (Andrew Chow)
699dfcd8ad Opportunistically use bech32m change addresses if available (Andrew Chow)
0262536c34 Add OutputType::BECH32M (Andrew Chow)
177c15d2f7 Limit LegacyScriptPubKeyMan address types (Andrew Chow)

Pull request description:

  Currently bech32m addresses are classfied as bech32. Because bech32m is incompatible with bech32, we need to define a new `OutputType` for it so that it can be handled correctly. This PR adds `OutputType::BECH32M`, updates all of the relevant `OutputType` classifications, and handle requests for bech32m addresses. There is now a `bech32m` address type string that can be used.

  * `tr()` descriptors now report their output type as `OutputType::BECH32M`. `WtinessV1Taproot` and `WitnessUnknown` are also classified as `OutputType::BECH32M`.
  * Bech32m addresses are completely disabled for legacy wallets. They cannot be imported (explicitly disallowed in `importaddress` and `importmulti`), will not be created when getting all destinations for a pubkey, and will not be added with `addmultisigaddress`. Additional protections have been added to `LegacyScriptPubKeyMan` to disallow attempting to retrieve bech32m addresses.
  * Since Taproot multisigs are not implemented yet, `createmultisig` will also disallow the bech32m address type.
  * As Taproot is not yet active, `DescriptorScriptPubKeyMan` cannot and will not create a `tr()` descriptor. Protections have been added to make sure this cannot occur.
  * The change address type detection algorithm has been updated to return `bech32m` when there is a segwit v1+ output script and the wallet has a bech32m `ScriptPubKeyMan`, falling back to bech32 if one is not available.

ACKs for top commit:
  laanwj:
    re-review ACK 754f134a50
  Sjors:
    re-utACK 754f134: only change is switching to `bech32m` in two `wallet_taproot.py` test cases.
  fjahr:
    re-ACK 754f134a50
  jonatack:
    ACK 754f134a50

Tree-SHA512: 6ea90867d3631d0d438e2b08ce6ed930f37d01323224661e8e38f183ea5ee2ab65b5891394a3612c7382a1aff907b457616c6725665a10c320174017b998ca9f
2021-06-24 14:20:28 +02:00
W. J. van der Laan
b7565c708d
Merge bitcoin/bitcoin#22250: doc: add basic I2P documentation
78cdab1ad2 doc: sort entries in doc/README.md#Miscellaneous alphabetically (Vasil Dimov)
cad487bcfa doc: add basic I2P documentation (Vasil Dimov)

Pull request description:

  Add basic I2P documentation to help users to start using I2P and Bitcoin Core.

ACKs for top commit:
  jonatack:
    ACK 78cdab1ad2
  laanwj:
    ACK 78cdab1ad2

Tree-SHA512: 71cffc9419338a21cb9e811ee9463d6d09eef1a2a73190f766523bc1642a1f58984d5b2ab13da9b6560387ac9f431aace8bc7ae9b776585ecd3e3c1ff6af8e8d
2021-06-24 13:38:39 +02:00
MarcoFalke
e59ea87954
Merge bitcoin/bitcoin#22311: test: Add missing syncwithvalidationinterfacequeue in p2p_blockfilters
fadddd13ee test: Add missing syncwithvalidationinterfacequeue (MarcoFalke)
faa211fc6e test: Misc cleanup (MarcoFalke)
fa1668bf50 test: Run pep-8 (MarcoFalke)
facd97ae0f scripted-diff: Renames (MarcoFalke)

Pull request description:

  The index on the block filters is running in the background on the validation interface. To avoid intermittent test failures, it needs to be synced.

  Also other cleanups.

ACKs for top commit:
  lsilva01:
    Tested ACK fadddd13ee on Ubuntu 20.04

Tree-SHA512: d858405db426a2f9d5620059dd88bcead4e3fba3ccc6bd8023f624b768fbcfa2203246fb0b2db620490321730d990f0e78063b21a26988c969cb126d4bd697bd
2021-06-24 12:54:00 +02:00
MarcoFalke
d6a59166a1
Merge bitcoin/bitcoin#22257: test: refactor: various (de)serialization helpers cleanups/improvements
bdb8b9a347 test: doc: improve doc for `from_hex` helper (mention `to_hex` alternative) (Sebastian Falbesoner)
1914054208 scripted-diff: test: rename `FromHex` to `from_hex` (Sebastian Falbesoner)
a79396fe5f test: remove `ToHex` helper, use .serialize().hex() instead (Sebastian Falbesoner)
2ce7b47958 test: introduce `tx_from_hex` helper for tx deserialization (Sebastian Falbesoner)

Pull request description:

  There are still many functional tests that perform conversions from a hex-string to a message object (deserialization) manually. This PR identifies all those instances and replaces them with a newly introduced helper `tx_from_hex`.

  Instances were found via
  * `git grep "deserialize.*BytesIO"`

  and some of them manually, when it were not one-liners.

  Further, the helper `ToHex` was removed and simply replaced by `.serialize().hex()`, since now both variants are in use (sometimes even within the same test) and using the helper doesn't really have an advantage in readability. (see discussion https://github.com/bitcoin/bitcoin/pull/22257#discussion_r652404782)

ACKs for top commit:
  MarcoFalke:
    review re-ACK bdb8b9a347 😁

Tree-SHA512: e25d7dc85918de1d6755a5cea65471b07a743204c20ad1c2f71ff07ef48cc1b9ad3fe5f515c1efaba2b2e3d89384e7980380c5d81895f9826e2046808cd3266e
2021-06-24 12:47:13 +02:00
fanquake
c31161f4f7
Merge bitcoin/bitcoin#22320: build: set minimum required Boost to 1.64.0
957f358427 build: remove check for Boost Process header (fanquake)
df2c933217 build: remove workaround for Boost and std::atomic (fanquake)
2bf211696b build: set minimum required Boost to 1.64.0 (fanquake)

Pull request description:

  Setting a newer minimum required Boost means we can remove the awkward header / compile check for Boost Process.

  If we don't do this, we should at-least make Boost Process being missing no longer a failure, otherwise anyone building using Boost < 1.64.0 would have to pass `--disable-external-signer` as well.

  The only system I can see that is affected here, (doesn't have new enough system packages) is Debian Oldstable. However, anyone compiling there, can use depends. They can also no-longer use the system GCC (6.0), and I'd assume would be using Clang 7, which would be the newest compiler available to them. It's extended, LTS support also end in 1 year from now, so anyone still using it should be considering upgrading.

  Debian Buster (Stable) has 1.67+, Ubuntu Bionic has 1.65+, any of the BSDs, recent Fedora, macOS etc all also have well and truly new enough Boost versions available.

  I think this is something we should just do for 22.0. If not, definitely for 23.0.

  Fixes #22319. Compiling Bitcoin Core should work, as `windows.h` will be included.
  Alternative to #22294.
  Would also close #22269.
  #19128 could be re-opened.

ACKs for top commit:
  laanwj:
    Tested ACK 957f358427 that this fixes #22269.
  MarcoFalke:
    review ACK 957f358427

Tree-SHA512: a8ffa7933dce8bf994892ef16664103d7b4e1008e52628e9becb918a7727232dfb51b23100a82dc2b60cd9af5877abc32dc2d3754a7e1b3ac5410a92fdf393f3
2021-06-24 18:35:25 +08:00
MarcoFalke
bfa885898a
Merge bitcoin/bitcoin#22306: [test] Improvements to p2p_addr_relay.py
6168eb06b2 [test] Prevent intermittent issue (Amiti Uttarwar)
1d8193e2a2 [test] Remove GetAddrStore class (Amiti Uttarwar)
ef2f149bf2 [test] Update GetAddrStore callers to use AddrReceiver (Amiti Uttarwar)
e8c67ea19a [test] Add functionality to AddrReceiver (Amiti Uttarwar)
09dc073cff [test] Allow AddrReceiver to be used more generally (Amiti Uttarwar)

Pull request description:

  A test refactor broken out from #21528 & a fix to #22243.

  This PR:
  1. consolidates the two helper classes into one, with the intent of making the test logic more clear & usable as we add more subtests to the file

  2. hopefully fixes the test flakiness by bumping up the mocktime interval to ensure `m_next_addr_send` timer triggers

ACKs for top commit:
  mzumsande:
    Code-Review ACK 6168eb06b2
  lsilva01:
    Tested ACK 6168eb06b2 on Ubuntu 20.04
  brunoerg:
    tACK 6168eb06b2

Tree-SHA512: 248324f9d37e0e5ffe4acc437cd72ad9a2960abc868a97c6040a36e6ea8b59029127ac4f63fcf67d981a5bb4dbf2334bb2c23c541fae8e910d5523884bcedcba
2021-06-24 12:10:44 +02:00
MarcoFalke
a196c89317
Merge bitcoin/bitcoin#22270: test: Add bitcoin-util tests (+refactors)
fa4017e7a0 refactor: Pass grind args vector as const reference (MarcoFalke)
fa08bc288f Remove gArgs from AppInitUtil (MarcoFalke)
fa751a47ff Remove unused OptionsCategory arg from AddCommand (MarcoFalke)
fa3c1eee7f Remove unused includes from bitcoin-util (MarcoFalke)
fa304929e2 test: Add bitcoin-util tests (MarcoFalke)
fa831e709a build_msvc: Add bitcoin-util.exe (MarcoFalke)

Pull request description:

  bitcoin-util has no tests

  See https://marcofalke.github.io/btc_cov/total.coverage/src/bitcoin-util.cpp.gcov.html (Coverage report showing 0%)

ACKs for top commit:
  klementtan:
    Code review and tested ACK fa4017e7a0
  theStack:
    Tested ACK fa4017e7a0
  jamesob:
    reACK fa4017e7a0 ([`jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te))

Tree-SHA512: 68e2791239bc48d28fbb6394155c39ea0357a96ec7e4896ca579feeef1a803657165a0ef9fa3cf6e2a381e5b0ca0dafa1b594158303a04997db784201d8dd66d
2021-06-24 09:42:07 +02:00
MarcoFalke
7317e14a44
Merge bitcoin/bitcoin#22263: refactor: wrap CCoinsViewCursor in unique_ptr
7ad414f4bf doc: add comment about CCoinsViewDBCursor constructor (James O'Beirne)
0f8a5a4dd5 move-only(ish): don't expose CCoinsViewDBCursor (James O'Beirne)
615c1adfb0 refactor: wrap CCoinsViewCursor in unique_ptr (James O'Beirne)

Pull request description:

  I tripped over this one for a few hours at the beginning of the week, so I've sort of got a personal vendetta against `CCoinsView::Cursor()` returning a raw pointer.

  Specifically in the case of CCoinsViewDB, if a raw cursor is allocated and not freed, a cryptic leveldb assertion failure occurs on CCoinsViewDB destruction (`Assertion 'dummy_versions_.next_ == &dummy_versions_' failed.`).

  This is a pretty simple change.

  Related to: https://github.com/bitcoin/bitcoin/issues/21766
  See also: https://github.com/google/leveldb/issues/142#issuecomment-414418135

ACKs for top commit:
  MarcoFalke:
    review ACK 7ad414f4bf 🔎
  jonatack:
    re-ACK 7ad414f4bf modulo suggestion
  ryanofsky:
    Code review ACK 7ad414f4bf. Two new commits look good and thanks for clarifying constructor comment

Tree-SHA512: 6471d03e2de674d84b1ea0d31e25f433d52aa1aa4996f7b4aab1bd02b6bc340b15e64cc8ea07bbefefa3b5da35384ca5400cc230434e787c30931b8574c672f9
2021-06-23 18:32:35 +02:00
MarcoFalke
c0e30933e0
Merge bitcoin/bitcoin#22323: doc: spelling update
184d4534f6 script, doc: spelling update (Jon Atack)

Pull request description:

  Clears out the report from `test/lint/lint-spelling.sh` and touches up the leftover nits in https://github.com/bitcoin/bitcoin/pull/22166#pullrequestreview-690454669. Happy to add any others people are aware of.

ACKs for top commit:
  MarcoFalke:
    cr ACK 184d4534f6
  Sjors:
    utACK 184d453

Tree-SHA512: 3b0ef6bd5ff227363b0bda79eeb66763151c74f607bc3a2a7bfe7823e3eef196587bccfe639e714e8e27b918ba57e8317eda06f225143c32c736685087dbcd24
2021-06-23 14:46:37 +02:00
MarcoFalke
fa34cb8024
cli: Avoid truncating -rpcwaittimeout 2021-06-23 14:40:55 +02:00
Jon Atack
184d4534f6
script, doc: spelling update 2021-06-23 13:33:18 +02:00
Samuel Dobson
567670bec5
Merge bitcoin/bitcoin#22166: Add support for inferring tr() descriptors
d637a9b397 Taproot descriptor inference (Pieter Wuille)
c7388e5ada Report address as solvable based on inferred descriptor (Pieter Wuille)
29e5dd1a5b consensus refactor: extract ComputeTapleafHash, ComputeTaprootMerkleRoot (Pieter Wuille)

Pull request description:

  Includes:
  * First commit from #21365, adding TaprootSpendData in SigningProvider
  * A refactor to expose ComputeTapleafHash and ComputeTaprootMerkleRoot from script/interpreter
  * A tiny change to make `getaddressinfo` report tr() descriptors as solvable (so that inferred descriptors are shown), despite not having signing code for them.
  * Logic to infer the script tree back from TaprootSpendData, and then use that to infer descriptors.

ACKs for top commit:
  achow101:
    re-ACK d637a9b397
  Sjors:
    re-utACK d637a9b
  meshcollider:
    Code review ACK d637a9b397

Tree-SHA512: 5ab9b95da662382d8549004be4a1297a577d7caca6b068f875c7c9343723931d03fa9cbf133de11f83b74e4851490ce820fb80413c77b9e8495a5f812e505d86
2021-06-23 22:42:30 +12:00
Vasil Dimov
78cdab1ad2
doc: sort entries in doc/README.md#Miscellaneous alphabetically 2021-06-23 12:21:39 +02:00
Vasil Dimov
cad487bcfa
doc: add basic I2P documentation 2021-06-23 12:21:38 +02:00
MarcoFalke
d6e0d78c31
Merge bitcoin/bitcoin#20966: banman: save the banlist in a JSON format on disk
bb719a08db style: remove () from assert in rpc_setban.py (Vasil Dimov)
24b10ebda3 doc: fix grammar in doc/files.md (Vasil Dimov)
dd4e957dcd test: ensure banlist can be read from disk after restart (Vasil Dimov)
d197977ae2 banman: save the banlist in a JSON format on disk (Vasil Dimov)

Pull request description:

  Save the banlist in `banlist.json` instead of `banlist.dat`.

  This makes it possible to store Tor v3 entries in the banlist on disk
  (and any other addresses that cannot be serialized in addrv1 format).

  Only read `banlist.dat` if it exists and `banlist.json` does not exist (first start after an upgrade).

  Supersedes https://github.com/bitcoin/bitcoin/pull/20904
  Resolves https://github.com/bitcoin/bitcoin/issues/19748

ACKs for top commit:
  jonatack:
    Code review re-ACK bb719a08db per `git range-diff 6a67366 4b52c72 bb719a0`
  achow101:
    Code Review ACK bb719a08db

Tree-SHA512: fc135c3a1fe20bcf5d008ce6bea251b4135e56c78bf8f750b4bd8144c095b81ffe165133cdc7e4715875eec7e7c4e13ad9f5d2450b21102af063d7c8abf716b6
2021-06-23 10:01:56 +02:00
fanquake
957f358427
build: remove check for Boost Process header
Now that we require Boost 1.64.0+, Boost Process will be available.
2021-06-23 15:48:42 +08:00
fanquake
df2c933217
build: remove workaround for Boost and std::atomic 2021-06-23 15:48:42 +08:00
fanquake
2bf211696b
build: set minimum required Boost to 1.64.0 2021-06-23 15:48:37 +08:00
MarcoFalke
03aa59a4e5
Merge bitcoin/bitcoin#22313: test: Add missing sync_all to feature_coinstatsindex
fafd9165e9 test: Add missing sync_all to feature_coinstatsindex (MarcoFalke)

Pull request description:

  Sync the blocks before invalidating them to ensure all nodes are on the right tip. Otherwise nodes[0] might stay on the "stale" block and the test fails (intermittently)

ACKs for top commit:
  jamesob:
    crACK fafd9165e9

Tree-SHA512: ca567b97b839b56c91d52831eaac18d8c843d376be90c9fd8b49d2eb4a46b801a1d2402996d5dfe2bef3e2c9bd75d19ed443e3f42cc4679c5f20043ba556efc8
2021-06-23 08:07:19 +02:00
Andrew Chow
754f134a50 wallet: Add error message to GetReservedDestination
Adds an error output parameter to all GetReservedDestination functions
so that callers can get the actual reason that a change address could
not be fetched. This more closely matches GetNewDestination. This allows
for more granular error messages, such as one that indicates that
bech32m addresses cannot be generated yet.
2021-06-22 21:57:04 -04:00
Andrew Chow
87a0e7a3b7 Disallow bech32m addresses for legacy wallet things
We don't want the legacy wallet to ever have bech32m addresses so don't
allow importing them. This includes addmultisigaddress as that is a
legacy wallet only RPC

Additionally, bech32m multisigs are not available yet, so disallow them
in createmultisig.
2021-06-22 21:57:04 -04:00
Andrew Chow
6dbe4d1072 Use BECH32M for tr() desc, WitV1Taproot, and WitUnknown CTxDests
The tr() descriptor, WitnessV1Taproot CTxDestination, and
WitnessUnknown CTxDestination are OutputType::BECH32M so they should
report as such.
2021-06-22 21:57:04 -04:00
Andrew Chow
699dfcd8ad Opportunistically use bech32m change addresses if available
If a transaction as a segwit output, use a bech32m change address if
they are available. If not, fallback to bech32. If bech32 change
addresses are unavailable, fallback to the default address type.
2021-06-22 21:53:11 -04:00
Andrew Chow
0262536c34 Add OutputType::BECH32M
Bech32m addresses need their own OutputType

We are not ready to create DescriptorScriptPubKeyMans which produce
bech32m addresses. So don't allow generating them.
2021-06-22 21:53:11 -04:00
Andrew Chow
177c15d2f7 Limit LegacyScriptPubKeyMan address types
Make sure that LegacyScriptPubKeyMan can only be used for legacy,
p2sh-segwit, and bech32 address types.
2021-06-22 21:53:11 -04:00
MarcoFalke
c93e123dc7
Merge bitcoin/bitcoin#22308: wallet: Add missing BlockUntilSyncedToCurrentChain
fa27baa9c8 Revert "test: Add temporary logging to debug #20975" (MarcoFalke)
fadb55085a wallet: Add missing BlockUntilSyncedToCurrentChain (MarcoFalke)

Pull request description:

  Fixes #20975

  Also replace the wallet pointer by a reference

ACKs for top commit:
  achow101:
    ACK fa27baa9c8

Tree-SHA512: 79047a30998104a12c2ff84a8e3cc5207151410bbe92b74cfedbe1c1aca3ffa5909391607fc597f3a3cf0725fa827528a4c57edaeacc8360536b1965e166be6a
2021-06-22 23:08:23 +02:00
MarcoFalke
fafd9165e9
test: Add missing sync_all to feature_coinstatsindex 2021-06-22 20:10:33 +02:00
MarcoFalke
fadddd13ee
test: Add missing syncwithvalidationinterfacequeue 2021-06-22 19:42:51 +02:00
MarcoFalke
faa211fc6e
test: Misc cleanup
* Replace wait_until with assert_equal where possible
* Use send_and_ping helper where possible
2021-06-22 19:42:35 +02:00
MarcoFalke
fa1668bf50
test: Run pep-8
Can be reviewed with --word-diff-regex=.
2021-06-22 19:42:25 +02:00
MarcoFalke
facd97ae0f
scripted-diff: Renames
-BEGIN VERIFY SCRIPT-

 ren() { sed -i "s/\<$1\>/$2/g" test/functional/p2p_blockfilters.py ; }

 # Rename from "node" to "peer" to avoid confusion with self.nodes
 ren node0 peer_0
 ren node1 peer_1

 # Remove the confusing "C" prefix
 ren CFiltersClient FiltersClient

-END VERIFY SCRIPT-
2021-06-22 19:41:28 +02:00
MarcoFalke
327e2691f6
Merge bitcoin/bitcoin#22309: blockstorage: Add missing atomic include
fa2d21fec8 add missing atomic include (MarcoFalke)

Pull request description:

  `std::atomic` is used in the file, so to avoid compile issues, add the missing include.

ACKs for top commit:
  practicalswift:
    cr ACK fa2d21fec8
  jamesob:
    crACK fa2d21fec8
  hebasto:
    ACK fa2d21fec8, I have reviewed the code and it looks OK, I agree it can be merged.
  prayank23:
    crACK fa2d21fec8

Tree-SHA512: 307b15abd62006be4457b2437fb65de517c296bf0417e8acd181904eb6056dba5655dd5bc43b834bf68a087d06637f5e99ba5a6bc8be3e12388cea470dc155d0
2021-06-22 15:52:16 +02:00
MarcoFalke
fa2d21fec8
add missing atomic include 2021-06-22 11:06:30 +02:00
MarcoFalke
fa27baa9c8
Revert "test: Add temporary logging to debug #20975"
This reverts commit faa94961d6.
2021-06-22 10:04:06 +02:00
MarcoFalke
fadb55085a
wallet: Add missing BlockUntilSyncedToCurrentChain 2021-06-22 10:01:50 +02:00
MarcoFalke
672870ab7b
Merge bitcoin/bitcoin#22201: test: Fix TestShell to allow running in Jupyter Notebook
168b6c317c add dummy file param to fix jupyter (Josiah Baker)

Pull request description:

  this fixes argparse to use `parse_known_args`. previously, if an unknown argument was passed, argparse would fail with an `unrecognized arguments: %s` error.

  ## why
  the documentation mentions being able to run `TestShell` in a REPL interpreter or a jupyter notebook. when i tried to run inside a jupyter notebook, i got the following error:

  ![image](https://user-images.githubusercontent.com/7444140/121382910-57554880-c947-11eb-94f2-49da8679528c.png)

  this was due to the notebook passing the filename of the notebook as an argument. this is a known problem with notebooks and argparse, documented here: https://stackoverflow.com/questions/48796169/how-to-fix-ipykernel-launcher-py-error-unrecognized-arguments-in-jupyter

  ## testing
  to test, make sure you have jupyter notebooks installed. you can do this by running:
  ```
  pip install notebook
  ```
  or following instructions from [here](https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html).

  once installed, start a notebook (`jupyter notebook`), launch a python3 kernel and run the following snippet:

  ```python
  import sys

  # make sure this is the path for your system
  sys.path.insert(0, "/path/to/bitcoin/test/functional")
  from test_framework.test_shell import TestShell

  test = TestShell().setup(num_nodes=2, setup_clean_chain=True)
  ```

  you should see the following output, without errors:
  ![image](https://user-images.githubusercontent.com/7444140/121383301-a307f200-c947-11eb-83b6-6c50b2cada25.png)

  if you are unfamiliar with notebooks, here is a short guide on using them: https://jupyter.readthedocs.io/en/latest/running.html

ACKs for top commit:
  MarcoFalke:
    review ACK 168b6c317c
  jamesob:
    crACK 168b6c317c
  practicalswift:
    cr ACK 168b6c317c

Tree-SHA512: 4fee1563bf64a1cf9009934182412446cde03badf2f19553b78ad2cb3ceb0e5e085a5db41ed440473494ac047f04641311ecbba3948761c6553d0ca4b54937b4
2021-06-22 08:11:16 +02:00
Amiti Uttarwar
6168eb06b2 [test] Prevent intermittent issue
Since m_next_addr_send is on a Poisson distribution, increase the mocktime bump
to ensure we don't experience flakiness in the tests. Closes #22243.
2021-06-21 18:05:54 -07:00
Amiti Uttarwar
1d8193e2a2 [test] Remove GetAddrStore class 2021-06-21 18:05:48 -07:00
Amiti Uttarwar
ef2f149bf2 [test] Update GetAddrStore callers to use AddrReceiver 2021-06-21 18:05:43 -07:00
Amiti Uttarwar
e8c67ea19a [test] Add functionality to AddrReceiver
Add two simple helper functions to `AddrReceiver` to support callers currently
using `GetAddrStore` [used in next commit].
2021-06-21 18:05:27 -07:00
Amiti Uttarwar
09dc073cff [test] Allow AddrReceiver to be used more generally
The `on_addr` functionality of `AddrReceiver` tests logic specific to how the
addr messages are set up in the test bodies. To allow other callers to also use
`AddrReceiver`, only apply the assertion logic if the caller indicates
desirability by setting `test_addr_contents` to true when initializing the
class.
2021-06-21 10:25:06 -07:00
MarcoFalke
398dd67833
Merge bitcoin/bitcoin#22296: doc: Final merge of release notes snippets, mv to wiki
fa09fd1a09 doc: Final merge of release notes snippets (MarcoFalke)

Pull request description:

  None of the remaining pulls tagged for 22.0 have snippets, so merge them and move them to the wiki.

  Trivial to review with `--color-moved=dimmed-zebra`.

ACKs for top commit:
  laanwj:
    ACK fa09fd1a09
  jonatack:
    ACK fa09fd1a09

Tree-SHA512: d5d272a9fc2217a87988efa189000cae5330da22f0459dd5e4340a18aba3d67d8fe8661016cb777e2e15f5d137c1c2b3de7d576c942eaf4201dabdc4e9c783f4
2021-06-21 17:55:00 +02:00