Skip to content

fix: make huge asset lock tx non-standard - #7359

Merged
PastaPastaPasta merged 2 commits into
dashpay:developfrom
knst:fix-non-standard-asset-locks
Jun 13, 2026
Merged

PastaPastaPasta merged 2 commits into
dashpay:developfrom
knst:fix-non-standard-asset-locks

Conversation

@knst

@knst knst commented Jun 12, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Platform ignores asset-locks with amount of inputs more than 100 or with size of transaction bigger than 20480 bytes.
If user will create too big asset-lock transaction that platform (L2) can not recognize it may cause to fund lost.
Issue is worsened once user will have ability to create asset-lock tx himself by Dash Core after #7294

It's an addition to this PR: https://github.com/dashpay/platform/pull/3491/files

What was done?

Asset locks that have more than 100 inputs are non-standard txes
Asset locks that have size bigger than 20480 bytes are non-standard txes
Asset locks that have v2 payload are non-standard txes. Once v24 is activated, platform may be not ready to process them. This non-standard limitation is a feature for soft enabling v2 asset-locks without 2nd fork.

How Has This Been Tested?

See updates in functional test.

Breaking Changes

Some special transactions are now valid for consensus if they are mined in block but they are non-standard and won't be relayed to network.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 24 milestone Jun 12, 2026
@thepastaclaw

thepastaclaw commented Jun 12, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Review complete (commit c8801b2)

@github-actions

github-actions Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

⚠️ Potential Merge Conflicts Detected

This PR has potential conflicts with the following open PRs:

Please coordinate with the authors of these PRs to avoid merge conflicts.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f0e2fcf97

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread test/functional/feature_asset_locks.py Resolved
@coderabbitai

coderabbitai Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR introduces standardness validation for asset lock special transactions in the Dash mempool. A new IsStandardSpecialTx function enforces three constraints on asset lock transactions: maximum 100 inputs, maximum 20,480 bytes total serialized size, and rejection of payload version >= 2. The function is integrated into MemPoolAccept::PreChecks when fRequireStandard is enabled to reject non-standard asset locks with descriptive reason codes. Functional tests and helper updates verify mempool rejection/acceptance behavior and block inclusion.

Sequence Diagram

sequenceDiagram
  participant Client
  participant MemPool as MemPoolAccept
  participant Validator as IsStandardSpecialTx
  participant Mempool
  Client->>MemPool: Submit asset lock transaction
  MemPool->>MemPool: PreChecks: check fRequireStandard
  alt fRequireStandard enabled
    MemPool->>Validator: Validate special transaction
    Validator->>Validator: Check if TRANSACTION_ASSET_LOCK
    alt Asset lock with ≤100 inputs, ≤20480 bytes, version<2
      Validator->>MemPool: return true
      MemPool->>Mempool: Accept to mempool
    else Exceeds limits or invalid version
      Validator->>MemPool: return false with reason
      MemPool->>Client: Reject TX_NOT_STANDARD
    end
  else fRequireStandard disabled
    MemPool->>Mempool: Accept to mempool
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • UdjinM6
  • PastaPastaPasta
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: make huge asset lock tx non-standard' directly and concisely summarizes the main change: marking oversized asset lock transactions as non-standard to prevent relay on the network.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly explains the issue (Platform ignores large asset-locks), the solution (marking them as non-standard), and references related work (PR #7294 and Platform PR #3491).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/functional/feature_asset_locks.py`:
- Around line 765-792: Extend test_non_standard to also exercise the new
serialized-size rule: construct an asset lock transaction whose serialized size
exceeds 20,480 bytes (use the existing helpers in the test — e.g., build a
funding/split tx with many outputs or add a large OP_RETURN/payload and call
create_assetlock to produce the oversized asset lock), assert its vin length if
useful, then call node_wallet.testmempoolaccept and nodes[1].testmempoolaccept
and verify the permissive node allows it but the standard node rejects it with
reject-reason 'assetlocktx-too-large' (follow the existing pattern used for
lock_v2 and lock_many_inputs in test_non_standard).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 27836ae4-8a8a-4eb5-80ed-191953376c14

📥 Commits

Reviewing files that changed from the base of the PR and between 317917a and 5f0e2fcf971d7e3957c4779d9908a5a219021dd3.

📒 Files selected for processing (4)
  • src/evo/specialtxman.cpp
  • src/evo/specialtxman.h
  • src/validation.cpp
  • test/functional/feature_asset_locks.py

Comment thread test/functional/feature_asset_locks.py Outdated
Comment on lines +765 to +792
def test_non_standard(self, node_wallet, node, pubkey):
self.log.info("Testing that v2 and >100-input asset locks are non-standard...")
assert softfork_active(node_wallet, 'v24')

coin = node_wallet.listunspent(query_options={'minimumAmount': 1}).pop()
lock_v2 = self.create_assetlock(coin, COIN, pubkey, version=2)
# reserve this coin so funding the split below can not spend it
node_wallet.lockunspent(False, [{'txid': coin['txid'], 'vout': coin['vout']}])

self.log.info("Split one coin into 101 outputs to build an asset lock with >100 inputs")
raw = node_wallet.createrawtransaction([], [{node_wallet.getnewaddress(): 1} for _ in range(101)])
funded = node_wallet.fundrawtransaction(raw, {'change_position': 101})['hex']
split_txid = node_wallet.sendrawtransaction(node_wallet.signrawtransactionwithwallet(funded)['hex'])
self.generate(node, 1)
many_coins = [{'txid': split_txid, 'vout': i, 'amount': 1} for i in range(101)]
lock_many_inputs = self.create_assetlock(many_coins, COIN, pubkey)
assert_equal(len(lock_many_inputs.vin), 101)

self.log.info("A standard node (-acceptnonstdtxn=0) rejects them; the permissive node accepts them")
self.restart_node(1, self.extra_args[1] + ["-acceptnonstdtxn=0"])
self.connect_nodes(1, 0)
for tx, reason in [(lock_v2, 'assetlocktx-version-2'), (lock_many_inputs, 'assetlocktx-too-many-inputs')]:
tx_hex = tx.serialize().hex()
assert_equal(node_wallet.testmempoolaccept([tx_hex])[0]['allowed'], True)
rejected = self.nodes[1].testmempoolaccept([tx_hex])[0]
assert_equal(rejected['allowed'], False)
assert_equal(rejected['reject-reason'], reason)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Missing functional coverage for the assetlocktx-too-large standardness rule.

test_non_standard currently validates only two reject paths (Line 786): version 2 and >100 inputs. The PR introduces a third mempool standardness rule (serialized size > 20,480), but this test does not assert that rejection path, so that policy can regress unnoticed.

Suggested test extension
@@
-        for tx, reason in [(lock_v2, 'assetlocktx-version-2'), (lock_many_inputs, 'assetlocktx-too-many-inputs')]:
+        # TODO: also construct a tx with <=100 inputs but serialized size > 20480
+        # and assert reject-reason == 'assetlocktx-too-large'
+        for tx, reason in [
+            (lock_v2, 'assetlocktx-version-2'),
+            (lock_many_inputs, 'assetlocktx-too-many-inputs'),
+            # (lock_too_large, 'assetlocktx-too-large'),
+        ]:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/functional/feature_asset_locks.py` around lines 765 - 792, Extend
test_non_standard to also exercise the new serialized-size rule: construct an
asset lock transaction whose serialized size exceeds 20,480 bytes (use the
existing helpers in the test — e.g., build a funding/split tx with many outputs
or add a large OP_RETURN/payload and call create_assetlock to produce the
oversized asset lock), assert its vin length if useful, then call
node_wallet.testmempoolaccept and nodes[1].testmempoolaccept and verify the
permissive node allows it but the standard node rejects it with reject-reason
'assetlocktx-too-large' (follow the existing pattern used for lock_v2 and
lock_many_inputs in test_non_standard).

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code Review

Codex's blocking finding is correct: the PR's stated goal is for v2 asset locks to be non-standard but consensus-valid, yet CAssetLockPayload::CURRENT_VERSION is still 1 and CheckAssetLockTx rejects any getVersion() > CURRENT_VERSION. CheckSpecialTx is invoked unconditionally inside MemPoolAccept::PreChecks (validation.cpp:959) and during block validation, so a v2 asset lock will be rejected via consensus regardless of the new policy gate — both nodes in the new functional test will fail to mine lock_v2. Both reviewers also converge on the missing functional coverage for the assetlocktx-too-big branch. Claude's nitpicks about the magic-number naming and 'silent pass-through' on bad payload deserialization were dropped: payload-deserialization failures are caught later in the same PreChecks invocation by CheckAssetLockTx ("bad-assetlocktx-payload"), so no relay leakage occurs.

🔴 1 blocking | 🟡 1 suggestion(s)

🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `src/evo/specialtxman.cpp`:
- [BLOCKING] src/evo/specialtxman.cpp:1259-1263: v2 asset locks remain consensus-invalid, contradicting the PR goal and breaking the new test
  The PR's header doc and commit message state that v2 asset locks should be "non-standard but consensus-valid" so they can be activated later without another hard fork. The implementation only adds a relay/policy check in `IsStandardSpecialTx`, but does not relax consensus: `CAssetLockPayload::CURRENT_VERSION` is still 1 (src/evo/assetlocktx.h:31), and `CheckAssetLockTx` returns `bad-assetlocktx-version` for `getVersion() > CURRENT_VERSION` (src/evo/assetlocktx.cpp:56). `MemPoolAccept::PreChecks` calls `CheckSpecialTx` unconditionally at validation.cpp:959 (not gated by `fRequireStandard`), and `ProcessSpecialTxsInBlock` calls the same path during block validation. As a result:

  - `node_wallet.sendrawtransaction(lock_v2.serialize().hex())` in the new functional test (feature_asset_locks.py:794) will throw with `bad-assetlocktx-version` even on the permissive `-acceptnonstdtxn=1` node, so the test will fail.
  - Even if the tx is force-injected into a block, `CheckBlock`/`ConnectBlock` paths will reject the block as consensus-invalid.

  Either bump `CAssetLockPayload::CURRENT_VERSION` to 2 (and gate it on the appropriate deployment, e.g. v24), or remove the v2 standardness path from this PR until consensus actually accepts v2. As written, the PR cannot achieve its stated outcome and the functional test will not pass.

In `test/functional/feature_asset_locks.py`:
- [SUGGESTION] test/functional/feature_asset_locks.py:765-802: `assetlocktx-too-big` policy branch is not exercised
  `test_non_standard` covers `assetlocktx-version-2` and `assetlocktx-too-many-inputs`, but never builds an asset lock with ≤100 inputs and `GetTotalSize() > 20480`. In `IsStandardSpecialTx`, the input-count check runs before the size check (specialtxman.cpp:1248 → 1254), so the 101-input fixture short-circuits on `assetlocktx-too-many-inputs` and the 20 KB branch is dead from the test's perspective. Add a case that crafts an asset lock with ≤100 inputs whose serialized size exceeds 20480 bytes (e.g. by padding `creditOutputs` count or scriptSigs) and asserts the reject reason is `assetlocktx-too-big`. Otherwise a future reorder of the checks or a change to the `max_tx_size_for_platform` constant can regress silently.

Comment thread src/evo/specialtxman.cpp Resolved
Comment thread test/functional/feature_asset_locks.py Resolved
@knst
knst force-pushed the fix-non-standard-asset-locks branch from 5f0e2fc to c8801b2 Compare June 12, 2026 17:26
@knst
knst requested review from PastaPastaPasta and UdjinM6 June 12, 2026 20:21
@PastaPastaPasta
PastaPastaPasta merged commit 7fcc54a into dashpay:develop Jun 13, 2026
79 of 82 checks passed
@knst
knst deleted the fix-non-standard-asset-locks branch June 13, 2026 08:54
PastaPastaPasta added a commit that referenced this pull request Jun 18, 2026
c8801b2 test: add test for non-standard asset-locks (Konstantin Akimov)
9ad2afb feat: make v2 asset locks and huge asset locks as non-standard (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  Platform ignores asset-locks with amount of inputs more than 100 or with size of transaction bigger than 20480 bytes.
  If user will create too big asset-lock transaction that platform (L2) can not recognize it may cause to fund lost.
  Issue is worsened once user will have ability to create asset-lock tx himself by Dash Core after #7294

  It's an addition to this PR: https://github.com/dashpay/platform/pull/3491/files

  ## What was done?
  Asset locks that have more than 100 inputs are non-standard txes
  Asset locks that have size bigger than 20480 bytes are non-standard txes
  Asset locks that have v2 payload are non-standard txes. Once v24 is activated, platform may be not ready to process them. This non-standard limitation is a feature for soft enabling v2 asset-locks without 2nd fork.

  ## How Has This Been Tested?
  See updates in functional test.

  ## Breaking Changes
  Some special transactions are now valid for consensus if they are mined in block but they are non-standard and won't be relayed to network.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: ce2a6221f66367d839696ce2bfd93941a74eae1469276703fae06e1ccb3f979beaf14ca4dc05c75d03496cdabb5ae58d6b87b902c0a7bfb16e42d558cbb10d96
@UdjinM6 UdjinM6 modified the milestones: 24, 23.1.4 Jun 18, 2026
PastaPastaPasta added a commit that referenced this pull request Jun 27, 2026
01640b9 chore: prepare v23.1.5 release (PastaClaw)
c3e3b9d fix: correct v23.1.4 checkpoint hash (PastaClaw)
10b6309 docs: use standard bug fixes wording (PastaClaw)
0495b47 docs: refine v23.1.4 release intro (PastaClaw)
3826688 docs: fix v23.1.4 release notes title (PastaClaw)
2068176 Merge #7317: fix: drop `virtual` specifier for `CZMQNotificationInterface` dtor (pasta)
9a463a2 test: early bail-out for huge QSIGSHARESINV and QGETSIGSHARES (Konstantin Akimov)
3426458 fix: early bail-out for huge QSIGSHARESINV and QGETSIGSHARES (Konstantin Akimov)
b9c6b95 chore: version bump, man pages, flatpak, release notes for release v23.1.4 (Konstantin Akimov)
6f7a0ef chore: version bump, man pages, flatpak, release notes for release v23.1.4 (Konstantin Akimov)
78bb4c4 Merge #7359: fix: make huge asset lock tx non-standard (pasta)
5962016 chore: update min-chainwork, checkpoints and seeds for v23.1.4 (Konstantin Akimov)
99305fb test: add test for duplicated platform-node-id in mempool (Konstantin Akimov)
78b8274 fix: don't let 2 protx with the same platform-id to be presented in mempool (Konstantin Akimov)
54187cd perf: avoid re-validation of ehf signals during block-connect (Konstantin Akimov)
47fa631 Merge #7352: perf: optimize division to uint32 to make re-target-pow calculation much faster (pasta)
d93f755 Merge #7332: fix: remove cs_main from MaybePunishNodeForTx, missing changes from bitcoin#19607 (pasta)

Pull request description:

  # chore: merge master 23.1.5 back into develop

  ## Issue being fixed or feature implemented

  Backmerge current `master` into `develop` so the active development branch
  includes the `v23.1.4` and `v23.1.5` release-line changes.

  ## What was done?

  Merged `upstream/master` (`v23.1.5`, `5dde61050d20c23c3e179c34e663a025f56843f3`)
  into `upstream/develop`.

  Carried forward release metadata and generated artifacts for `v23.1.4` and
  `v23.1.5`, including version metadata, man pages, release notes, checkpoints,
  chainTxData, minimum chain work, assume-valid data, and seed updates.

  Resolved conflicts in Dash-specific code while preserving develop-only refactors:

  - Kept develop's `CChainstateHelper` ownership layout and `SuperblockManager`
    integration.
  - Carried forward the EHF block-connect optimization without reintroducing the
    removed `CMNHFManager` quorum-manager member.
  - Carried forward the LLMQ signing-share inventory bounds into develop's
    `NetSigning` split.
  - Carried forward the Platform node ID mempool conflict handling and its
    functional test coverage.

  ## How Has This Been Tested?

  - Ran `git diff --check upstream/develop...HEAD`.
  - Scanned changed files for conflict markers.
  - Verified the corrected `CMNHFManager` constructor call after conflict
    resolution.
  - Ran the required pre-PR `code-review` gate against the backmerge branch;
    final recommendation was `ship` with no significant issues found.

  No local build was run; this is a release backmerge and CI should run the full
  Dash Core PR build/test matrix.

  ## Breaking Changes

  None expected. This is a backmerge from the release branch into `develop`.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone
    _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 1a828c9acd5fe87617f3ab11ca1b5b13656adc61e591b58d68b685bba7404696afa664c53cc752dfbaca7fe08439d9428f33116f475c18c0959293460062b284
@kwvg kwvg mentioned this pull request Sep 13, 2026
1 task
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Nov 2, 2026
Audited the v23.1.1 to v23.1.10 release notes for changes a v24 operator
has to act on or plan for, and added those the v24.0.0 notes were
missing, each under its v24 topic:

- Mining and mempool policy: Asset Locks with more than 100 inputs or
  larger than 20480 bytes are non-standard (dashpay#7359, v23.1.4).
- Changed options: -allowprivatenet no longer affects masternode
  address validation (dashpay#7888, v23.1.9).
- Masternode configuration requirements: a DKG member sharing
  verification-vector coefficients with another is excluded together
  with it, and both get the usual PoSe penalty (v23.1.10).
- Other notable changes: weighted BLS batch verification raises CPU use
  during DKG and signing (v23.1.10).

Routine bug, crash and denial-of-service fixes, GUI, build and
performance changes, and fixes with no operator action (such as the
superblock trigger voting fix) are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PastaPastaPasta PastaPastaPasta mentioned this pull request Nov 2, 2026
3 tasks done
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Nov 2, 2026
Audited the v23.1.1 to v23.1.10 release notes for changes a v24 operator
has to act on or plan for, and added those the v24.0.0 notes were
missing, each under its v24 topic:

- Mining and mempool policy: Asset Locks with more than 100 inputs or
  larger than 20480 bytes are non-standard (dashpay#7359, v23.1.4).
- Changed options: -allowprivatenet no longer affects masternode
  address validation (dashpay#7888, v23.1.9).
- Masternode configuration requirements: a DKG member sharing
  verification-vector coefficients with another is excluded together
  with it, and both get the usual PoSe penalty (v23.1.10).

Routine bug, crash and denial-of-service fixes, GUI, build and
performance changes, and fixes with no operator action (such as the
superblock trigger voting fix, or the extra work of weighted BLS batch
verification) are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PastaPastaPasta added a commit that referenced this pull request Nov 4, 2026
cdb250c doc: note operator-relevant v23.1.x patch-release changes for v24.0.0 (pasta)
fcd332b doc: state the provider-transaction InstantSend change on its own (pasta)
01dc7e0 chore: prepare v23.1.10 release (pasta)
95fbf22 fix(bls): stop weighted contribution batch verification on an invalid partial aggregate (pasta)
12bbd21 fix(llmq): weight batched DKG contribution verification (UdjinM6)
593f252 fix(bls): weight batch-verified signatures so complementary errors cannot cancel (UdjinM6)
bd948aa fix(governance): don't vote on triggers while not synced (pasta)
5d9fe74 fix(governance): don't vote NO-FUNDING on triggers before their maturity window (pasta)
dfd9820 fix(llmq): accept equal DKG secret key shares when aggregating a member's share (pasta)
1ec6aaa test: cover DKG members dealing identical contributions (UdjinM6)
c8627a6 fix(llmq): drop DKG members whose verification vectors share coefficients (UdjinM6)
3174d5f fix(instantsend): propagate !cs_timingsTxSeen to the callers of RemoveNonLockedTx (UdjinM6)
e6f3ad4 fix(bls): stop weighted contribution batch verification on an invalid partial aggregate (pasta)
e04acba fix(llmq): weight batched DKG contribution verification (UdjinM6)
ed96227 fix(bls): weight batch-verified signatures so complementary errors cannot cancel (UdjinM6)
b5c7985 fix(governance): don't vote on triggers while not synced (pasta)
a79f432 fix(governance): don't vote NO-FUNDING on triggers before their maturity window (pasta)
8615244 fix(llmq): accept equal DKG secret key shares when aggregating a member's share (pasta)
1c356f4 test: cover DKG members dealing identical contributions (UdjinM6)
f23f748 fix(llmq): drop DKG members whose verification vectors share coefficients (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Brings the v23.1.10 fixes to `v24.0.x`. `master` was fast-forwarded today to the signed `v23.1.10` tag (703b2a0). `v24.0.x` has none of that release's code fixes, so v24.0.0 would ship without the DKG, BLS batch-verification and superblock-trigger fixes in v23.1.10's release notes. A masternode upgrading from v23.1.10 to v24.0.0 would lose them. Also, `check_merge` requires `master` to fast-forward to `v24.0.x`, which fails until v23.1.10 is recorded here.

  ## What was done?
  This is not a merge of the v23 branch. Each v23.1.10 commit was checked by content against `v24.0.x`, and none of the eight code commits were present. They are picked here with `git cherry-pick -x` from `v23.1.x`, in release order:

  - `fix(llmq): drop DKG members whose verification vectors share coefficients` (c8627a6). Clean.
  - `test: cover DKG members dealing identical contributions` (1ec6aaa). The new `feature_llmq_simplepose.py` case runs right after the sporks are set, in both spork23 modes as in v23, with numeric `dkgsimerror` rates. The simulated clone in `active/dkgsession.cpp` uses this branch's `util::irange` (`util/helpers.h`).
  - `fix(llmq): accept equal DKG secret key shares when aggregating a member's share` (dfd9820). The new `bls_tests` case passes `CBLSWorker::Start(4)`, because `Start()` takes an explicit worker count here.
  - `fix(governance): don't vote NO-FUNDING on triggers before their maturity window` (5d9fe74) and `fix(governance): don't vote on triggers while not synced` (bd948aa). Clean.
  - `fix(bls): weight batch-verified signatures so complementary errors cannot cancel` (593f252). `BatchVerifyMessageSigs` lives in `src/llmq/net_dkg.cpp` on this branch, so its hunk is applied there unchanged.
  - `fix(llmq): weight batched DKG contribution verification` (12bbd21). The new `bls_tests` loop uses `util::irange`.
  - `fix(bls): stop weighted contribution batch verification on an invalid partial aggregate` (95fbf22). Clean.

  Each adaptation is described in its commit message. They are the same as in the develop merge-back, #8015. The files these fixes touch are identical on `develop` and `v24.0.x`, apart from two unrelated lines.

  Not picked:
  - `fix(instantsend): propagate !cs_timingsTxSeen to the callers of RemoveNonLockedTx` (3174d5f). It fixes a clang `-Werror` break that exists only on v23.1.x. The methods it annotates don't exist on this branch, which builds cleanly with `-Werror` and `-Wthread-safety`.
  - Release bookkeeping (01dc7e0): the version, the v23.1.10 release notes file, man pages and flatpak entry stay with v24's own release process. Its operator-relevant content is covered in the v24.0.0 notes (see below).

  ### Merge of v23.1.10
  The last commit merges the `v23.1.10` tag with the tree unchanged (`-s ours`), as #7965 did for v23.1.9. That lets `master` fast-forward to `v24.0.x`, and the final v24.0.0 contains every v23.1.10 commit. A trial real merge on top of the picks staged no clean additions. Everything else it produced was release bookkeeping or conflicts re-inserting code the picks already carry.

  ### Release notes
  The v24.0.0 notes include only what a v24 operator needs to act on or plan for: required action, configuration, compatibility, upgrade behaviour and changed operational expectations. They no longer carry patch releases forward one by one. I checked the v23.1.1 to v23.1.10 notes against that rule. Two doc commits follow the merge:

  - The v23.1.9 carry-forward bullet is replaced by a standalone note that provider transactions are no longer InstantSend-locked, with the advice to wait for a ChainLock or confirmations instead (#7858).
  - Added under their v24 topics:
    - Asset Locks with more than 100 inputs or larger than 20480 bytes are non-standard (#7359).
    - `-allowprivatenet` no longer affects masternode address validation (#7888).
    - A DKG member sharing verification-vector coefficients with another is excluded together with it, and both get the usual PoSe penalty.

  Routine bug, crash and DoS fixes, GUI, build and performance changes, and fixes that need no operator action (including the superblock trigger voting fix, the negative-`nVersion` rule and the extra work of weighted BLS batch verification, for which no node-wide CPU impact has been measured) are left out. The archived v23.1.10 notes, the older-releases list and the change-log link stay with v24.0.0 release preparation.

  No version change is needed. `configure.ac` stays at 24.0.0 with `CLIENT_VERSION_IS_RELEASE` false.

  ## How Has This Been Tested?
  macOS arm64 against depends, `--enable-debug --enable-werror --disable-hardening --without-gui`. `dashd`, `test_dash` and `bench_dash` build cleanly at the tip. `dashd` and `test_dash` also build at every pick.

  - Unit suites, all passing: `bls_tests`, `llmq_dkg_tests`, `llmq_utils_tests`, `governance_inv_tests`, `governance_validators_tests`.
  - Functional tests, all passing: `feature_governance.py` (with the new early-trigger case), `feature_governance_cl.py`, `feature_llmq_simplepose.py` (default and `--disable-spork23`, both with the new cloned-contribution case), `feature_llmq_dkgerrors.py`, `feature_llmq_signing.py` (default and `--spork21`), `feature_llmq_data_recovery.py`, `feature_llmq_rotation.py`.
  - Every file the release touches was compared with `v23.1.9..v23.1.10`, and each carries the same added and removed lines. The only exceptions are the adaptations listed above and the skipped instantsend commit.

  I did not run the full functional suite locally; CI covers it.

  ## Breaking Changes
  None. These are not consensus changes.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(if you have permission to set one)_

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

Top commit has no ACKs.

Tree-SHA512: 86827d96833136d556de2bebdfbbb5e8aa287da9f47a2cd96ee33fc3f11c5eafeab7991ef5f2307f42bb7367f78ee1ebd5a36c97a22223d5d3b3816b04ee13cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants