Commit graph

196 commits

Author SHA1 Message Date
ivanlele
623932d6b0
Merge b9c241804c into merged_master (Bitcoin PR bitcoin/bitcoin#30226) 2026-04-14 13:19:39 +00:00
ivanlele
b573c24538
Merge 0a931a9787 into merged_master (Bitcoin PR bitcoin/bitcoin
(#31599
#31403)
2026-04-14 09:01:18 +00:00
ivanlele
05b3ef9031
Merge 4ac1efb147 into merged_master (Bitcoin PR bitcoin/bitcoin#30322) 2026-04-14 08:47:42 +00:00
ivanlele
f1997989a6
Merge 98ad249b69 into merged_master (Bitcoin PR bitcoin/bitcoin#31277) 2026-04-03 11:05:28 +00:00
ivanlele
744c517dac
Merge b0222bbb49 into merged_master (Bitcoin PR bitcoin/bitcoin#30239) 2026-04-03 10:45:45 +00:00
ivanlele
6a15b8fc71
Merge fc642c33ef into merged_master (Bitcoin PR bitcoin/bitcoin#30718) 2026-03-27 12:19:54 +00:00
ivanlele
2d54cb6526
Merge ec700f0a76 into merged_master (Bitcoin PR bitcoin/bitcoin#30076) 2026-03-10 13:13:42 +00:00
ikripaka
17631653e2
Merge 5ee6b76c69 into merged_master (Bitcoin PR bitcoin/bitcoin#29325) 2026-02-26 20:15:02 +00:00
ivanlele
07fc40d829
Merge e6e4c18a9b into merged_master (Bitcoin PR bitcoin/bitcoin#30162) 2026-02-26 11:14:46 +00:00
ivanlele
bfe084087e
Merge 24572cf768 into merged_master (Bitcoin PR bitcoin/bitcoin#29939) 2026-02-20 10:59:38 +00:00
Tom Trevethan
a1bb0dd675
Added RAW_OP_TRUE miniwallet mode serialization size
(cherry picked from commit 1f13810a73afab07b78d24f3093da6b2cde7e587)
2026-02-12 12:21:33 +02:00
Byron Hambly
474dd0f6f9 Merge 7143d43884 into merged_master (Bitcoin PR bitcoin/bitcoin#28948) 2025-12-03 19:08:52 +00:00
Byron Hambly
1a150831f3
Merge 98b0acda0f into merged_master (Bitcoin PR bitcoin/bitcoin#28725) 2025-11-10 14:40:43 +02:00
Byron Hambly
1c95683b4f
Merge 3966b0a0b6 into merged_master (Bitcoin PR bitcoin/bitcoin#28472) 2025-08-04 09:26:56 +02:00
Byron Hambly
b5fa48988e Merge f1a9fd627b into merged_master (Bitcoin PR bitcoin/bitcoin#28251) 2025-07-21 13:58:00 +02:00
Byron Hambly
36e84e800e Merge 357e3f6aa4 into merged_master (Bitcoin PR bitcoin/bitcoin#28025) 2025-07-01 12:06:50 +02:00
Byron Hambly
ccd960b0f9 Merge 7d65e3372f into merged_master (Bitcoin PR bitcoin/bitcoin#27733) 2025-06-27 21:52:08 +02:00
Byron Hambly
810427867c Merge 3132ec64d9 into merged_master (Bitcoin PR bitcoin/bitcoin#27177) 2025-06-23 11:27:52 +02:00
Byron Hambly
1576f6243d Merge ccc431d53e into merged_master (Bitcoin PR bitcoin/bitcoin#27640) 2025-06-20 21:20:02 +02:00
Byron Hambly
0b1508bf01
ci: fix lint issues 2025-04-17 11:06:32 +02:00
Byron Hambly
a8c15ff245 Merge c0311b1dda into merged_master (Bitcoin PR bitcoin/bitcoin#27349) 2025-04-12 10:10:01 +02:00
Byron Hambly
e048a4bffd Merge 873a5062db into merged_master (Bitcoin PR bitcoin/bitcoin#27269) 2025-04-11 22:20:04 +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
769260634b Merge 8339f3cea8 into merged_master (Bitcoin PR bitcoin/bitcoin#26886) 2025-04-02 21:57:11 +02:00
Tom Trevethan
15bc30b2c3 Merge 599e941c19 into merged_master (Bitcoin PR bitcoin/bitcoin#26657) 2025-04-02 16:04:31 +00:00
Byron Hambly
b4405ba453 Merge e9262ea32a into merged_master (Bitcoin PR bitcoin/bitcoin#26750) 2025-03-31 16:37:52 +02:00
Byron Hambly
41f380c8f0 Merge bd13d6b369 into merged_master (Bitcoin PR bitcoin/bitcoin#26656) 2025-03-31 10:06:08 +02:00
Byron Hambly
4f17f28214 Merge 38cbf43dee into merged_master (Bitcoin PR bitcoin/bitcoin#26414) 2025-03-05 09:36:38 +02:00
Byron Hambly
3ed5ae03ca Merge 00c323610a into merged_master (Bitcoin PR bitcoin/bitcoin#25986) 2025-03-03 16:38:50 +02:00
merge-script
b9c241804c
Merge bitcoin/bitcoin#30226: test: add validation for gettxout RPC response
723440c5b8 test framework, wallet: rename get_scriptPubKey method to get_output_script (Alfonso Roman Zubeldia)
fa0232a3e0 test: add validation for gettxout RPC response (Alfonso Roman Zubeldia)

Pull request description:

  Added a new test in `test/functional/rpc_blockchain.py` to validate the gettxout RPC response. This new test ensures all response elements are verified, including `bestblock`, `confirmations`, `value`, `coinbase`, and `scriptPubKey` details.

  Also renamed the method `get_scriptPubKey` from `test/functional/test_framework/wallet.py` to the modern name `get_output_script` as suggested by maflcko (https://github.com/bitcoin/bitcoin/pull/30226#discussion_r1925491846)

ACKs for top commit:
  fjahr:
    reACK 723440c5b8
  maflcko:
    lgtm ACK 723440c5b8
  brunoerg:
    code review ACK 723440c5b8

Tree-SHA512: 3384578909d2e7548cef302c5b8a9fed5b82dfc942892503ad4a05e73f5cceafad1eab3af9a27e54aef3db7631f8935298d6b882c70d2f02a9a75b8e3c209b6c
2025-02-05 13:30:51 +00:00
Alfonso Roman Zubeldia
723440c5b8 test framework, wallet: rename get_scriptPubKey method to get_output_script 2025-01-24 14:57:36 -03:00
ismaelsadeeq
92787dd52c
test: raise an error when target_vsize is below tx virtual size 2025-01-08 09:35:02 -05:00
ismaelsadeeq
a8780c937f
test: raise an error if output value is <= 0 in create_self_transfer 2025-01-08 09:35:02 -05:00
Byron Hambly
b11cdfc92b Merge 2c3115d4f5 into merged_master (Bitcoin PR bitcoin/bitcoin#25773) 2024-10-25 12:00:10 +02:00
Byron Hambly
48d663a3d6 Merge 9155f9b7af into merged_master (Bitcoin PR bitcoin/bitcoin#25379) 2024-10-25 09:50:32 +02:00
James Dorfman
9841d576fb Merge 8ef096d4f8 into merged_master (Bitcoin PR bitcoin/bitcoin#25522)
This commit made a lot of changes to test/functional/feature_rbf.py.
That functional test already had each subtest commented out, because
they weren't working properly.

For the most part, I simply accepted the incoming changes, and did not
actually get the functional test to start working.
2024-10-13 06:56:17 +00:00
Sebastian Falbesoner
c16ae71768 test: switch MiniWallet padding unit from weight to vsize
The weight unit is merely a consensus rule detail and is largely
irrelevant for fee-rate calculations and mempool policy rules (e.g. for
package relay and TRUC limits), so there doesn't seem to be any value of
using a granularity that we can't even guarantee to reach exactly
anyway.

Switch to the more natural unit of vsize instead, which simplifies both
the padding implementation and the current tests that take use of this
padding. The rather annoying multiplications by `WITNESS_SCALE_FACTOR`
can then be removed and weird-looking magic numbers like `4004` can be
replaced by numbers that are more connected to actual policy limit
constants from the codebase, e.g. `1001` for exceeding
`TRUC_CHILD_MAX_VSIZE` by one.
2024-09-28 22:49:41 +02:00
James Dorfman
7c29c4bcdd Merge c8261026a4 into merged_master (Bitcoin PR bitcoin/bitcoin#25445)
Please double check my changes here -- I had to adjust some units
in test/functional/test_framework/wallet.py.
2024-09-17 18:35:09 +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
b816bdc2f3 Merge b178807265 into merged_master (Bitcoin PR bitcoin/bitcoin#25430) 2024-09-16 03:45:20 +00:00
James Dorfman
7c166369af Merge f8586b25f6 into merged_master (Bitcoin PR bitcoin/bitcoin#25289)
These changes to the functional test framework are pretty simple,
but please verify that I did them correctly. I'm not certain about them.
2024-09-11 16:10:03 +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
James Dorfman
abdd702c0f Merge e282764e04 into merged_master (Bitcoin PR bitcoin/bitcoin#25228) 2024-09-09 19:39:17 +00:00
James Dorfman
fd8fa61417 Merge 1c7ef0abd1 into merged_master (Bitcoin PR bitcoin/bitcoin#25262) 2024-09-06 19:30:23 +00:00
James Dorfman
0d39470585 Merge 9cc010f5a9 into merged_master (Bitcoin PR bitcoin/bitcoin#25087) 2024-09-06 18:49:38 +00:00
James Dorfman
33fdfa36b1 Merge d24318a40c into merged_master (Bitcoin PR bitcoin/bitcoin#24941) 2024-08-08 20:56:06 +00:00
glozow
ec700f0a76
Merge bitcoin/bitcoin#30076: test: fix MiniWallet script-path spend (missing parity bit in leaf version)
e4b0dabb21 test: add functional test for tagged MiniWallet instances (Sebastian Falbesoner)
3162c917e9 test: fix MiniWallet internal key derivation for tagged instances (Sebastian Falbesoner)
c9f7364ab2 test: fix MiniWallet script-path spend (missing parity bit in leaf version) (Sebastian Falbesoner)
7774c314fb test: refactor: return TaprootInfo from P2TR address creation routine (Sebastian Falbesoner)

Pull request description:

  This PR fixes a dormant bug in MiniWallet that exists since support for P2TR was initially added in #23371 (see commit 041abfebe4).

  In the course of spending the output, the leaf version byte of the control block in the witness stack doesn't set the parity bit, i.e. we were so far just lucky that the used combinations of relevant data (internal pubkey, leaf script / version) didn't result in a tweaked pubkey with odd y-parity. If that was the case, we'd get the following validation error:

  `mandatory-script-verify-flag-failed (Witness program hash mismatch) (-26)`

  Since MiniWallets can now optionally be tagged (#29939), resulting in different internal pubkeys, the issue is more prevalent now. Fix it by passing the parity bit, as specified in BIP341.

  Can be tested with the following patch (fails on master, succeeds on PR):
  ```diff
  diff --git a/test/functional/test_framework/mempool_util.py b/test/functional/test_framework/mempool_util.py
  index 148cc935ed..7ebe858681 100644
  --- a/test/functional/test_framework/mempool_util.py
  +++ b/test/functional/test_framework/mempool_util.py
  @@ -42,7 +42,7 @@ def fill_mempool(test_framework, node):
       # Generate UTXOs to flood the mempool
       # 1 to create a tx initially that will be evicted from the mempool later
       # 75 transactions each with a fee rate higher than the previous one
  -    ephemeral_miniwallet = MiniWallet(node, tag_name="fill_mempool_ephemeral_wallet")
  +    ephemeral_miniwallet = MiniWallet(node, tag_name="fill_mempool_ephemeral_wallet3")
       test_framework.generate(ephemeral_miniwallet, 1 + num_of_batches * tx_batch_size)

       # Mine enough blocks so that the UTXOs are allowed to be spent
  ```

  In addition to that, another bug is fixed where the internal key derivation failed, as not every pseudorandom hash results in a valid x-only pubkey. Fix this by treating the hash result as private key and calculate the x-only public key out of that, to be used then as internal key.

  Fixes #30528.

ACKs for top commit:
  glozow:
    ACK e4b0dabb21
  rkrux:
    reACK [e4b0dab](https://github.com/bitcoin/bitcoin/pull/30076/commits/e4b0dabb2115dc74e9c5794ddca3822cd8301c72)
  hodlinator:
    ACK e4b0dabb21

Tree-SHA512: a16f33f76bcb1012857cc3129438a9f6badf28aa2b1d25696da0d385ba5866b46de0f1f93ba777ed9263fe6952f98d7d9c44ea0c0170a2bcc86cbef90bf6ac58
2024-07-26 11:51:46 +01:00
merge-script
5ee6b76c69
Merge bitcoin/bitcoin#29325: consensus: Store transaction nVersion as uint32_t
429ec1aaaa refactor: Rename CTransaction::nVersion to version (Ava Chow)
27e70f1f5b consensus: Store transaction nVersion as uint32_t (Ava Chow)

Pull request description:

  Given that the use of a transaction's nVersion is always as an unsigned int, it doesn't make sense to store it as signed and then cast it to unsigned everywhere it is used and displayed.

  Since a few alternative implementations have recently been revealed to have made an error with this signedness that would have resulted in consensus failure, I think it makes sense for us to just make this always unsigned to make it clear that the version is treated as unsigned. This would also help us avoid future potential issues with signedness of this value.

  I believe that this is safe and does not actually change what transactions would or would not be considered both standard and consensus valid. Within consensus, the only use of the version in consensus is in BIP68 validation which was already casting it to uint32_t. Within policy, although it is used as a signed int for the transaction version number check, I do not think that this change would change standardness. Standard transactions are limited to the range [1, 2]. Negative numbers would have fallen under the < 1 condition, but by making it unsigned, they are still non-standard under the > 2 condition.

  Unsigned and signed ints are serialized and unserialized the same way so there is no change in serialization.

ACKs for top commit:
  maflcko:
    ACK 429ec1aaaa 🐿
  glozow:
    ACK 429ec1aaaa
  shaavan:
    ACK 429ec1aaaa 💯

Tree-SHA512: 0bcd92a245d7d16c3665d2d4e815a4ef28207ad4a1fb46c6f0203cdafeab1b82c4e95e4bdce7805d80a4f4a46074f6542abad708e970550d38a00d759e3dcef1
2024-06-12 10:32:31 +01:00
Sebastian Falbesoner
3162c917e9 test: fix MiniWallet internal key derivation for tagged instances
Not every pseudorandom hash result is a valid x-only public key,
so the pubkey tweaking in the course of creating the output public
key would fail about every second time.

Fix this by treating the hash result as private key and calculate
the x-only public key out of that, to be used then as internal key.
2024-06-11 18:53:07 +02:00