Commit graph

328 commits

Author SHA1 Message Date
ivanlele
954f20865b
Merge 210210c923 into merged_master (Bitcoin PR bitcoin/bitcoin#29566) 2026-03-24 16:04:02 +00:00
Tom Trevethan
83adc88ab1 Merge d50f0ce248 into merged_master (Bitcoin PR bitcoin/bitcoin#30669) 2026-03-13 14:36:30 +00:00
Tom Trevethan
899125e0f6 Merge 6474132d1b into merged_master (Bitcoin PR bitcoin/bitcoin#30657) 2026-03-13 01:45:12 +00:00
ikripaka
71a0b34c5d
Merge 45750f61d6 into merged_master (Bitcoin PR bitcoin/bitcoin#22729) 2026-03-09 09:24:30 +00:00
ikripaka
cbc839b8ac
Merge c51c694ede into merged_master (Bitcoin PR bitcoin/bitcoin#29431) 2026-03-05 14:59:12 +00:00
ivanlele
bfe084087e
Merge 24572cf768 into merged_master (Bitcoin PR bitcoin/bitcoin#29939) 2026-02-20 10:59:38 +00:00
ivanlele
cc18eeeb23
Merge 67c0d93982 into merged_master (Bitcoin PR bitcoin/bitcoin#29827) 2026-02-18 12:21:33 +00:00
ivanlele
dc380374a9
Merge bdb33ec519 into merged_master (Bitcoin PR bitcoin/bitcoin#29735) 2026-02-18 09:40:49 +00:00
ivanlele
18c5869c41 Merge 10d7b6e201 into merged_master (Bitcoin PR #29514) 2026-02-12 17:19:56 +00:00
Byron Hambly
1c6c1e7f9f
Merge bb6de1befb into merged_master (Bitcoin PR bitcoin/bitcoin#29034) 2025-11-18 10:15:01 +02:00
Byron Hambly
1a150831f3
Merge 98b0acda0f into merged_master (Bitcoin PR bitcoin/bitcoin#28725) 2025-11-10 14:40:43 +02:00
Byron Hambly
cc4cd3f1dd
Merge f028470654 into merged_master (Bitcoin PR bitcoin/bitcoin#28727) 2025-11-05 15:56:50 +02:00
Byron Hambly
f6bbbcaf08
Merge 2a349f9ea5 into merged_master (Bitcoin PR bitcoin/bitcoin#28264) 2025-11-05 14:53:04 +02:00
Byron Hambly
149eb7d34e
Merge 43704827b4 into merged_master (Bitcoin PR bitcoin/bitcoin#28211) 2025-08-08 08:06:57 +02:00
Byron Hambly
c1b5207e8c
Merge d98d88c779 into merged_master (Bitcoin PR bitcoin/bitcoin#28392) 2025-08-07 09:16:33 +02:00
Byron Hambly
e9d955b25a
Merge 38f4b0d9d1 into merged_master (Bitcoin PR bitcoin/bitcoin#28562) 2025-08-06 15:55:32 +02:00
Byron Hambly
f9bb21ff1c
Merge cf553e3ab7 into merged_master (Bitcoin PR bitcoin/bitcoin#28597) 2025-08-06 15:40:08 +02:00
Byron Hambly
04fc205a18 Merge 3367e1c850 into merged_master (Bitcoin PR bitcoin/bitcoin#28009) 2025-06-30 15:00:21 +02:00
Byron Hambly
b71fb23d2d Merge e8543629ae into merged_master (Bitcoin PR bitcoin/bitcoin#27884) 2025-06-30 14:36:23 +02:00
Byron Hambly
fe4599e9f0 Merge 66b08e7822 into merged_master (Bitcoin PR bitcoin/bitcoin#27302) 2025-06-24 14:25:07 +02:00
Byron Hambly
c1b97b12ec Merge a13f3746dc into merged_master (Bitcoin PR bitcoin/bitcoin#27727) 2025-06-23 14:45:00 +02:00
Byron Hambly
a67ba4e6a1 Merge be0325c6a6 into merged_master (Bitcoin PR bitcoin/bitcoin#27538) 2025-05-15 13:11:26 +02:00
Byron Hambly
24b30fd7a6 Merge d89aca1bdb into merged_master (Bitcoin PR bitcoin/bitcoin#27483) 2025-05-14 14:30:31 +02:00
Byron Hambly
443b443230 Merge 88134fcee9 into merged_master (Bitcoin PR bitcoin/bitcoin#27378) 2025-04-12 12:06:18 +02:00
Byron Hambly
a40bcf97bd Merge 89fb354f28 into merged_master (Bitcoin PR bitcoin/bitcoin#26625) 2025-04-03 10:33:03 +02:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
16f25771a0 Merge 35305c759a into merged_master (Bitcoin PR bitcoin/bitcoin#22751)
This PR introduced a new RPC "simulaterawtransaction". It has been modified from
upstream and from ElementsProject/elements#1016
to work correctly with Elements blinded transactions and issued assets.
2024-10-29 10:15:55 +02:00
Byron Hambly
6db4ca0b66 Merge d67f89bd95 into merged_master (Bitcoin PR bitcoin/bitcoin#25625)
Commented out the change to the psbt test with a FIXME, due to
differences between PSBT/PSET
2024-10-18 12:05:54 +02:00
James Dorfman
3f20b33a51 Merge 327b7e9236 into merged_master (Bitcoin PR bitcoin/bitcoin#25581) 2024-10-15 06:51:23 +00:00
James Dorfman
901c7c148e Merge 1ee597817f into merged_master (Bitcoin PR bitcoin/bitcoin#25503) 2024-09-19 19:48:57 +00:00
James Dorfman
fa1a985ef3 Merge 1b71c76886 into merged_master (Bitcoin PR bitcoin/bitcoin#25435) 2024-09-16 04:45:07 +00:00
James Dorfman
d02360aec2 Merge 4c0d1fec16 into merged_master (Bitcoin PR bitcoin/bitcoin#25374) 2024-09-10 19:20:39 +00:00
James Dorfman
63397a752c Merge a55606c3bd into merged_master (Bitcoin PR bitcoin/bitcoin#25356) 2024-09-10 18:37:30 +00:00
James Dorfman
041147b7c6 Merge 506d9b25a3 into merged_master (Bitcoin PR bitcoin/bitcoin#24839)
This required some changes to various helper methods in the python
functional test framework. Please verify those.
2024-09-10 17:49:27 +00:00
Ava Chow
210210c923
Merge bitcoin/bitcoin#29566: test: update satoshi_round function
ec317bc44b test: update satoshi_round function (naiyoma)

Pull request description:

  This PR refactors `satoshi_round` to accept different rounding modes and make rounding a required argument.

  Continuation of https://github.com/bitcoin/bitcoin/pull/23225

ACKs for top commit:
  maflcko:
    review ACK ec317bc44b
  achow101:
    ACK ec317bc44b
  AngusP:
    ACK ec317bc44b

Tree-SHA512: 070f0aa6f66e58bff7412cae6b71f5f4ab8c718c7b5eeba4bb604fe22c6416a1ced0474294f504e1c28943ddc073104466b5944b43bae27e42bee5ca85afa468
2024-09-04 13:26:57 -04:00
tdb3
d8399584dd
refactor: move read_xor_key() to TestNode 2024-08-25 08:42:38 -04:00
tdb3
c8176f758b
test: add blocks_key_path
Adds a convenience function to TestNode
to provide the path to the blocks xor key.
Updates util and feature_blocksxor to use it.
2024-08-23 12:49:56 -04:00
Sebastian Falbesoner
6b3676be3e test: refactor: move read_xor_key/util_xor helpers to util module 2024-08-14 16:43:46 +02:00
James Dorfman
0cf35ca80d Merge bb83aba6c9 into merged_master (Bitcoin PR bitcoin/bitcoin#25161) 2024-08-13 04:30:55 +00:00
naiyoma
ec317bc44b test: update satoshi_round function
Refactor satoshi_round function to accept different rounding modes.
Updated call site to use the revised `satoshi_round` function.

Co-authored-by: Kate Salazar <52637275+katesalazar@users.noreply.github.com>
2024-08-07 15:25:08 +03:00
Ava Chow
45750f61d6
Merge bitcoin/bitcoin#22729: Make it possible to disable Tor binds and abort startup on bind failure
bca346a970 net: require P2P binds to succeed (Vasil Dimov)
af552534ab net: report an error if unable to bind on the Tor listening addr:port (Vasil Dimov)
9a7e5f4d68 net: don't extra bind for Tor if binds are restricted (Vasil Dimov)

Pull request description:

  Make it possible to disable the Tor binding on `127.0.0.1:8334` and stop startup if any P2P bind fails instead of "if all P2P binds fail".

  Fixes https://github.com/bitcoin/bitcoin/issues/22726
  Fixes https://github.com/bitcoin/bitcoin/issues/22727

ACKs for top commit:
  achow101:
    ACK bca346a970
  cbergqvist:
    ACK bca346a970
  pinheadmz:
    ACK bca346a970

Tree-SHA512: fabef89a957191eea4f3e3b6109d2b8389f27ecc74440a920b0c10f31fff00a85bcfd1eb3c91826c7169c618f4de8a8d0a260e2caf40fd854f07ea9a980d8603
2024-07-16 16:27:24 -04:00
Ava Chow
c51c694ede
Merge bitcoin/bitcoin#29431: test/BIP324: disconnection scenarios during v2 handshake
c9dacd958d test: Check that non empty version packet is ignored and no disconnection happens (stratospher)
997cc00b95 test: Check that disconnection happens when AAD isn't filled (stratospher)
b5e6238fdb test: Check that disconnection happens when garbage sent/received are different (stratospher)
ad1482d5a2 test: Check that disconnection happens when wrong garbage terminator is sent (stratospher)
e351576862 test: Check that disconnection happens when >4095 garbage bytes is sent (stratospher)
e075fd131d test: Introduce test types and modify v2 handshake function accordingly (stratospher)
7d07daa623 log: Add V2 handshake timeout (stratospher)
d4a1da8543 test: Make global TRANSPORT_VERSION variable an instance variable (stratospher)
c642b08c4e test: Log when the garbage is actually sent to transport layer (stratospher)
86cca2cba2 test: Support disconnect waiting for add_p2p_connection (stratospher)
bf9669af9c test: Rename early key response test and move random_bitflip to util (stratospher)

Pull request description:

  Add tests for the following v2 handshake scenarios:
  1. Disconnection happens when > `MAX_GARBAGE_LEN` bytes garbage is sent
  2. Disconnection happens when incorrect garbage terminator is sent
  3. Disconnection happens when garbage bytes are tampered with
  4. Disconnection happens when AAD of first encrypted packet after the garbage terminator is not filled
  5. bitcoind ignores non-empty version packet and no disconnection happens

  All these tests require a modified v2 P2P class (different from `EncryptedP2PState` used in `v2_p2p.py`) to implement our custom handshake behaviour based on different scenarios and have been kept in a single test file (`test/functional/p2p_v2_misbehaving.py`). Shifted the test in `test/functional/p2p_v2_earlykeyresponse.py` which is of the same pattern to this file too.

ACKs for top commit:
  achow101:
    ACK c9dacd958d
  mzumsande:
    ACK c9dacd958d
  theStack:
    Code-review ACK c9dacd958d

Tree-SHA512: 90df81f0c7f4ecf0a47762d290a618ded92cde9f83d3ef3cc70e1b005ecb16125ec39a9d80ce95f99e695d29abd63443240cb5490aa57c5bc8fa2e52149a0672
2024-07-09 16:37:27 -04:00
Vasil Dimov
bca346a970
net: require P2P binds to succeed
In the Tor case, this prevents us from telling the Tor daemon to send
our incoming connections from the Tor network to an address where we
do not listen (we tried to listen but failed probably because another
application is already listening).

In the other cases (IPv4/IPv6 binds) this also prevents unpleasant
surprises caused by continuing operations even on bind failure. For
example, another application may be listening on portX, bitcoind tries
to bind on portX and portY, only succeeds with portY and continues
operation leaving the user thinking that his bitcoind is listening on
portX whereas another application is listening (the error message in
the log could easily be missed).

Avoid having the functional testing framework start multiple `bitcoind`s
that try to listen on the same `127.0.0.1:18445` (Tor listen for
regtest) if `bind_to_localhost_only` is set to `False`.

Also fix a typo in `test-shell.md` related to `bind_to_localhost_only`.

Fixes https://github.com/bitcoin/bitcoin/issues/22727
2024-07-02 14:17:51 +02:00
Sebastian Falbesoner
4f347140b1 test: refactor: move fill_mempool to new module mempool_util
This is needed to avoid circular dependencies in later commits.
Can be reviewed via `--color-moved=dimmed-zebra`.
2024-05-05 12:33:30 +02:00
glozow
e9dc511a7e fixup: get all utxos up front in fill_mempool, discourage wallet mixing
Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2024-04-15 18:22:32 +02:00
Greg Sanders
f3aa5bd5eb fill_mempool: assertions and docsctring update 2024-04-09 14:53:34 +02:00
Greg Sanders
a3da63e8fe Move fill_mempool to util function 2024-04-09 14:47:39 +02:00
stratospher
bf9669af9c test: Rename early key response test and move random_bitflip to util
Early key response test is a special kind of test which requires
modified v2 handshake functions. More such tests can be added
where v2 handshake functions send incorrect garbage terminator,
excess garbage bytes etc.. Hence, rename p2p_v2_earlykey.py to a
general test file name - p2p_v2_misbehaving.py.

random_bitflip function (used in signature tests prior to this
commit) can be used in p2p_v2_misbehaving test to generate wrong
garbage terminator, wrong garbage bytes etc..
So, move the function to util.
2024-03-11 12:58:20 +05:30
Anthony Towns
a3badf75f6 tests: Provide more helpful assert_equal errors
In the functional tests, we often compare dicts with assert_equal, but the
output makes it very hard to tell exactly which entry in the dicts don't
match when there are a lot of entries and only minor differences. Change
the output to make it clearer.
2024-02-29 20:42:58 +10:00
Sebastian Falbesoner
4c65ac96f8 test: detect OS consistently using platform.system() 2023-12-08 18:16:24 +01:00