Skip to content

test: make governance vote fixtures wire-valid#7450

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
thepastaclaw:fix-governance-inv-vote-fixtures
Jul 12, 2026
Merged

test: make governance vote fixtures wire-valid#7450
PastaPastaPasta merged 1 commit into
dashpay:developfrom
thepastaclaw:fix-governance-inv-vote-fixtures

Conversation

@thepastaclaw

Copy link
Copy Markdown

Issue being fixed or feature implemented

The governance inventory tests merged in #7442 construct unsigned synthetic votes and round-trip them through the network parser. Develop now requires governance vote signatures to use a structurally valid 65- or 96-byte encoding, so the fixture is rejected as malformed before the authorization behavior under test is reached. This causes six unit-test failures across CI configurations.

What was done?

Give the synthetic VOTE_SIGNAL_FUNDING vote a compact-signature-sized placeholder. The 65-byte encoding matches the real ECDSA voting-key form for funding votes. These tests deliberately use a missing parent object, so vote processing takes the orphan path before cryptographic signature verification; production validation is unchanged.

How Has This Been Tested?

  • Built src/test/test_dash in an isolated macOS arm64 worktree using the depends toolchain
  • ./src/test/test_dash --run_test=governance_inv_tests
  • ./src/test/test_dash --run_test=governance_vote_wire_tests
  • git diff --check
  • Mandatory independent pre-PR review gate: ship with no findings

Breaking Changes

None. Test-only change.

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

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

utACK e058152

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8c075618-2a88-44df-a699-7e2e64f9a4b8

📥 Commits

Reviewing files that changed from the base of the PR and between 13b9071 and e058152.

📒 Files selected for processing (1)
  • src/test/governance_inv_tests.cpp

Walkthrough

The MakeGovernanceVote test helper now initializes the governance vote signature with a byte vector sized to CGovernanceVote::COMPACT_SIG_SIZE. Subsequent governance vote-processing tests therefore serialize votes with an explicitly sized signature field.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • dashpay/dash#7440: Adds bounded governance vote signature deserialization aligned with the compact signature size used by this fixture.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the test-only change to governance vote fixtures and matches the changeset.
Description check ✅ Passed The description directly matches the fixture signature update and the intended test behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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.

@thepastaclaw

thepastaclaw commented Jul 12, 2026

Copy link
Copy Markdown
Author

✅ Review complete (commit e058152)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Code Review

Verified the one-line test-only fixture fix at the exact requested head: the 65-byte placeholder satisfies the compact-signature wire-size check, the unknown-parent path returns before cryptographic signature verification, and the vote hash does not include the signature bytes. The single commit is focused and accurately described; no in-scope issue survived verification.

Source: reviewers gpt-5.6-sol (general, dash-core-commit-history) and claude-sonnet-5 (general, dash-core-commit-history); verifier claude-sonnet-5.

Note: GitHub does not allow me to approve my own PR, so the verified APPROVE verdict is posted as a COMMENT review.

@PastaPastaPasta PastaPastaPasta merged commit f343d58 into dashpay:develop Jul 12, 2026
47 checks passed
@UdjinM6 UdjinM6 added this to the 24 milestone Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants