23 Commits

Author SHA1 Message Date
MarcoFalke
fac5a1b10a
test: Allow mempool_updatefromblock.py to run on 32-bit 2025-12-22 11:54:59 +01:00
yuvicc
70d9e8f0a1
fix: reorg behaviour in mempool tests to match real one 2025-11-26 13:44:18 +05:30
yuvicc
540ed333f6
Move the create_empty_fork method to the test framework's blocktools.py module to enable reuse across multiple tests. 2025-11-26 13:44:17 +05:30
Suhas Daftuar
6c5c44f774 test: add functional test for new cluster mempool RPCs
Co-authored-by: glozow <gloriajzhao@gmail.com>
2025-11-18 11:14:52 -05:00
Suhas Daftuar
cf3ab8e1d0 Stop enforcing descendant size/count limits
Cluster size limits should be enough.
2025-11-18 08:57:51 -05:00
Suhas Daftuar
95762e6759 Do not allow mempool clusters to exceed configured limits
Include an adjustment to mempool_tests.cpp due to the additional memory used by
txgraph.

Includes a temporary change to the mempool_ephemeral_dust.py functional test,
due to validation checks being reordered. This change will revert once the RBF
rules are changed in a later commit.
2025-11-18 08:53:58 -05:00
Sebastian Falbesoner
23be0ec2f0 test: rename CBlockHeader .rehash()/.sha256 -> .hash_int for consistency
Note that we unfortunately can't use a scripted diff here, as the
`sha256` symbol is also used for other instances (e.g. as function
in hashlib, or in the `UTXO` class in p2p_segwit.py).
2025-07-17 11:59:10 +02:00
merge-script
f3bbc74664
Merge bitcoin/bitcoin#32406: policy: uncap datacarrier by default
a189d636184b1c28fa4a325b56c1fab8f44527b1 add release note for datacarriersize default change (Greg Sanders)
a141e1bf501bb2660f3a62083a65678250085e56 Add more OP_RETURN mempool acceptance functional tests (Peter Todd)
0b4048c73385166144d0b3e76beb9a2ac4cc1eca datacarrier: deprecate startup arguments for future removal (Greg Sanders)
63091b79e70b8e230a122fa6fb3dac91c80638e7 test: remove unnecessary -datacarriersize args from tests (Greg Sanders)
9f36962b07eff2369577a17c8adeaa0433697e1c policy: uncap datacarrier by default (Greg Sanders)

Pull request description:

  Retains the `-datacarrier*` args, marks them as deprecated, and does not require another startup argument for multiple OP_RETURN outputs.

  If a user has set `-datacarriersize` the value is "budgeted" across all seen OP_RETURN output scriptPubKeys. In other words the total script bytes stays the same, but can be spread across any number of outputs. This is done to not introduce an additional argument to support multiple outputs.

  I do not advise people use the option with custom arguments and it is marked as deprecated to not mislead as a promise to offer it forever. The argument itself can be removed in some future release to clean up the code and minimize footguns for users.

ACKs for top commit:
  stickies-v:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  Sjors:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  polespinasa:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  hodlinator:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  ajtowns:
    reACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  mzumsande:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  petertodd:
    ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  theStack:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  1440000bytes:
    re-ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  willcl-ark:
    ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  dergoegge:
    ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  fanquake:
    ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  murchandamus:
    ACK a189d636184b1c28fa4a325b56c1fab8f44527b1
  darosior:
    Concept ACK a189d636184b1c28fa4a325b56c1fab8f44527b1.

Tree-SHA512: 3da2f1ef2f50884d4da7e50df2121bf175cb826edaa14ba7c3068a6d5b2a70beb426edc55d50338ee1d9686b9f74fdf9e10d30fb26a023a718dd82fa1e77b038
2025-06-09 08:23:56 -04:00
fanquake
e50312eab0
doc: fix typos
Co-authored-by: Ragnar <rodiondenmark@gmail.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>
2025-06-03 08:09:28 +01:00
Greg Sanders
63091b79e7 test: remove unnecessary -datacarriersize args from tests 2025-05-30 10:14:18 -04:00
Greg Sanders
84aa484d45 test: fix transaction_graph_test reorg test
The current test directly uses invalidatblock to trigger
mempool re-entry of transactions. Unfortunately, the
behavior doesn't match what a real reorg would look like. As
a result you get surprising behavior such as the mempool
descendant chain limits being exceeded, or if a fork is
greater than 10 blocks deep, evicted block transactions stop
being submitted back into in the mempool.

Fix this by preparing an empty fork chain, and then
continuing with the logic, finally submitting the fork chain
once the rest of the test is prepared. This triggers a more
typical codepath.

Also, extend the descendant limit to 100, like ancestor
limit.
2025-05-27 17:08:15 -04:00
Greg Sanders
eaf44f3767 test: check chainlimits respects on reorg 2025-05-27 17:02:42 -04:00
Greg Sanders
47894367b5 functional test: add MAX_DISCONNECTED_TX_POOL_BYTES coverage 2025-05-27 17:02:02 -04:00
Hennadii Stepanov
a0473442d1
scripted-diff: Add __file__ argument to BitcoinTestFramework.init()
-BEGIN VERIFY SCRIPT-
sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py)
sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py
-END VERIFY SCRIPT-
2024-07-16 22:06:47 +01:00
Sebastian Falbesoner
dee8549be3 test: simplify and speedup mempool_updatefromblock.py by using MiniWallet 2023-02-03 17:23:26 +01:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58b5d8d623e0e7ff4e74bc352dfa83d7
- 2020: fa0074e2d82928016a43ca408717154a1c70a4db
- 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2022-12-24 23:49:50 +00:00
Ayush Sharma
eac1099e00 test: remove wallet dependency from mempool_updatefromblock.py
This functional  test can now be run with the wallet disabled.
2022-07-01 19:27:34 +05:30
Jeremy Rubin
c49daf9885 [TESTS] Increase limitancestorcount in tournament RPC test to showcase improved algorithm 2021-12-08 23:07:56 -08:00
MarcoFalke
fac23c2114
scripted-diff: Bump copyright headers
The previous diff touched most files in ./test/, so bump the headers to
avoid having to touch them again for a bump later.

-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./test/
-END VERIFY SCRIPT-
2021-11-10 11:10:24 +01:00
MarcoFalke
fa0b916971
scripted-diff: Use generate* from TestFramework
-BEGIN VERIFY SCRIPT-
 sed --regexp-extended -i \
     's/((self\.)?(nodes\[[^]]+\]|[a-z_]*(wallet|node)[0-9a-z_]*))\.(generate(|toaddress|block|todescriptor)(\(|, ))/self.\5\1, /g' \
     $(git grep -l generate ./test | grep -v 'test_framework/' | grep -v 'feature_rbf')
-END VERIFY SCRIPT-
2021-09-02 10:34:35 +02:00
Michael Dietz
86dbd54ae8
test: improve mempool_updatefrom efficiency by using getmempoolentry for specific txns 2021-08-16 17:56:28 +05:00
Sebastian Falbesoner
dac7a111bd refactor: test: use _ variable for unused loop counters
substitutes "for x in range(N):" by "for _ in range(N):"
indicates to the reader that a block is just repeated N times, and
that the loop counter is not used in the body
2020-08-06 18:39:33 +02:00
Hennadii Stepanov
8098dea069
test: Add mempool_updatefromblock.py 2020-04-24 18:18:34 +03:00