-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: Merge bitcoin/bitcoin#30397, 22729, 29633, 29459 #7300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
6eeed08
6cb8c95
f6ff796
bccd3eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,12 @@ def run_test(self): | |
| txid_in_block = self.wallet.sendrawtransaction(from_node=node, tx_hex=raw_tx_in_block) | ||
| self.generate(node, 1) | ||
| self.mempool_size = 0 | ||
| # Check negative feerate | ||
| assert_raises_rpc_error(-3, "Amount out of range", lambda: self.check_mempool_result( | ||
| result_expected=None, | ||
| rawtxs=[raw_tx_in_block], | ||
| maxfeerate=-0.01, | ||
| )) | ||
|
Comment on lines
+80
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Blocking: Missing prerequisite: bitcoin#29434 bitcoin#29459 was added upstream immediately after the maxfeerate coverage introduced by bitcoin#29434. In upstream, bitcoin#29434 added the 1 BTC/kvB rejection test, the 0.99 BTC/kvB passing test, and the src/rpc/mempool.cpp ParseFeeRate path that rejects fee rates >= 1 BTC/kvB. Dash's current backport of bitcoin#29459 only adds the negative maxfeerate assertion and adapts around the missing bitcoin#29434 context: the following already-known check still has no maxfeerate=0.99, and src/rpc/mempool.cpp still parses maxfeerate with CFeeRate(AmountFromValue(...)) instead of ParseFeeRate. This is a soft prerequisite gap because the new negative-feerate test is cleanly adapted and should pass, but the upstream dependency chain around this test is incomplete. Policy gate (backport-prereq-restore): For full upstream backport PRs, a missing prerequisite is blocking unless the finding is explicitly allowlisted (e.g. source: ['codex-backport-reviewer'] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still present at |
||
| self.check_mempool_result( | ||
| result_expected=[{'txid': txid_in_block, 'allowed': False, 'reject-reason': 'txn-already-known'}], | ||
| rawtxs=[raw_tx_in_block], | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -40,6 +40,7 @@ | |||||||||||||||||||||||
| wait_until_helper, | ||||||||||||||||||||||||
| p2p_port, | ||||||||||||||||||||||||
| get_chain_folder, | ||||||||||||||||||||||||
| tor_port, | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| BITCOIND_PROC_WAIT_TIMEOUT = 60 | ||||||||||||||||||||||||
|
|
@@ -90,8 +91,11 @@ def __init__(self, i, datadir, extra_args_from_options, *, chain, rpchost, timew | |||||||||||||||||||||||
| self.cwd = cwd | ||||||||||||||||||||||||
| self.mocktime = mocktime | ||||||||||||||||||||||||
| self.descriptors = descriptors | ||||||||||||||||||||||||
| self.has_explicit_bind = False | ||||||||||||||||||||||||
| if extra_conf is not None: | ||||||||||||||||||||||||
| append_config(datadir, extra_conf) | ||||||||||||||||||||||||
| # Remember if there is bind=... in the config file. | ||||||||||||||||||||||||
| self.has_explicit_bind = any(e.startswith("bind=") for e in extra_conf) | ||||||||||||||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
|
||||||||||||||||||||||||
| # Most callers will just need to add extra args to the standard list below. | ||||||||||||||||||||||||
| # For those callers that need more flexibity, they can just set the args property directly. | ||||||||||||||||||||||||
| # Note that common args are set in the config file (see initialize_datadir) | ||||||||||||||||||||||||
|
|
@@ -227,6 +231,17 @@ def start(self, extra_args=None, *, cwd=None, stdout=None, stderr=None, **kwargs | |||||||||||||||||||||||
| if extra_args is None: | ||||||||||||||||||||||||
| extra_args = self.extra_args | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Comment on lines
231
to
233
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||||||||||||||||||||||||
| # If listening and no -bind is given, then dashd would bind P2P ports on | ||||||||||||||||||||||||
| # 0.0.0.0:P and 127.0.0.1:<default onion-service target port> (for incoming Tor connections), where P is | ||||||||||||||||||||||||
| # a unique port chosen by the test framework and configured as port=P in | ||||||||||||||||||||||||
| # dash.conf. To avoid collisions on default onion target port, change it to | ||||||||||||||||||||||||
| # 127.0.0.1:tor_port(). | ||||||||||||||||||||||||
| will_listen = all(e != "-nolisten" and e != "-listen=0" for e in extra_args) | ||||||||||||||||||||||||
| has_explicit_bind = self.has_explicit_bind or any(e.startswith("-bind=") for e in extra_args) | ||||||||||||||||||||||||
|
Comment on lines
+239
to
+240
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||||||||||||||||||||||||
| if will_listen and not has_explicit_bind: | ||||||||||||||||||||||||
| extra_args.append(f"-bind=0.0.0.0:{p2p_port(self.index)}") | ||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a test opts out with Useful? React with 👍 / 👎. |
||||||||||||||||||||||||
| extra_args.append(f"-bind=127.0.0.1:{tor_port(self.index)}=onion") | ||||||||||||||||||||||||
|
knst marked this conversation as resolved.
Comment on lines
+239
to
+243
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Implicit -bind injection ignores --dashd-extra-args (extra_args_from_options)
Suggested change
source: ['codex'] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved in this update — Implicit -bind injection ignores --dashd-extra-args (extra_args_from_options) no longer present. Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread.
Comment on lines
231
to
+243
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: start() mutates caller's extra_args list — shared-reference footgun Carried forward from the prior review at 314e0a3 and still valid at 086d42e. When Correction note: this is a suggestion, not a backport-prerequisite blocker; the earlier policy-gate text on this comment was incorrect. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still present at
Comment on lines
231
to
+243
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Superseded duplicate This inline comment duplicated the carried-forward There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved in this update — Prior finding still valid: start() mutates caller-owned extra_args no longer present. Auto-resolved by the review system based on the latest commit diff. If you believe this was closed in error, reopen the thread. |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| self.use_v2transport = "-v2transport=1" in extra_args or (self.default_to_v2 and "-v2transport=0" not in extra_args) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Add a new stdout and stderr file each time dashd is started | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppInitMain()still insertsDefaultOnionServiceTarget()intooptions.onion_bindswhen no-bind/-whitebindis supplied, even if the user sets-listenonion=0; making every onion bind failure fatal here means a conflict on the implicit 127.0.0.1 onion target port aborts startup before the later 0.0.0.0 bind can succeed. This regresses running another node with a different-portand onion listening disabled, where the implicit Tor target is occupied but normal P2P listening would otherwise work; only explicit onion binds should be fatal, or the default should be skipped when onion listening is off.Useful? React with 👍 / 👎.