Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/functional/feature_taproot.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ def byte_popper(expr):
DUST_LIMIT = 600
MIN_FEE = 50000

TX_MAX_STANDARD_VERSION = 3
TX_STANDARD_VERSIONS = [1, 2, TX_MAX_STANDARD_VERSION]

# === Actual test cases ===


Expand Down Expand Up @@ -1443,7 +1446,7 @@ def test_spenders(self, node, spenders, input_counts):
while left:
# Construct CTransaction with random version, nLocktime
tx = CTransaction()
tx.version = random.choice([1, 2, random.getrandbits(32)])
tx.version = random.choice(TX_STANDARD_VERSIONS + [0, TX_MAX_STANDARD_VERSION + 1, random.getrandbits(32)])
min_sequence = (tx.version != 1 and tx.version != 0) * 0x80000000 # The minimum sequence number to disable relative locktime
if random.choice([True, False]):
tx.nLockTime = random.randrange(LOCKTIME_THRESHOLD, self.lastblocktime - 7200) # all absolute locktimes in the past
Expand Down Expand Up @@ -1535,8 +1538,7 @@ def test_spenders(self, node, spenders, input_counts):
is_standard_tx = (
fail_input is None # Must be valid to be standard
and (all(utxo.spender.is_standard for utxo in input_utxos)) # All inputs must be standard
and tx.version >= 1 # The tx version must be standard
and tx.version <= 2)
and tx.version in TX_STANDARD_VERSIONS) # The tx version must be standard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess it is not enough and the truc rules need to be checked as well. Otherwise:

[10:00:08.436] �[0;36m                                   test_framework.authproxy.JSONRPCException: TRUC-violation, version=3 tx 18cf284e19b7df3927bb95ea6a15d7d710a180bb62ccf18ad05948915c85171f (wtxid=3a4704c5da033ee18e46813915c5bad5747277e40f9684689bb66ed91ac85256) is too big: 25250 > 10000 virtual bytes (-26)�[0m

https://cirrus-ci.com/task/6341200170450944?logs=ci#L2708

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no in-mempool deps afaik, so checking the vsize of tx should suffice?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opened potential resolution at #32859

was able to reproduce the issue and not run into it anymore

msg = ','.join(utxo.spender.comment + ("*" if n == fail_input else "") for n, utxo in enumerate(input_utxos))
if is_standard_tx:
node.sendrawtransaction(tx.serialize().hex(), 0)
Expand Down
Loading