Skip to content

fix(dash): only decode a special payload from transaction version 3 - #1155

Merged
xdustinface merged 1 commit into
devfrom
fix/payload-below-v3
Oct 12, 2026
Merged

xdustinface merged 1 commit into
devfrom
fix/payload-below-v3

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1135. Part of #1047.

Core reads vExtraPayload only when nVersion >= 3 && nType != 0, with nVersion read as an int16_t. We read a payload whenever version != 0, so a version 1 or 2 transaction (or one with a negative version) with non-zero type bits misaligned the rest of the block.

  • Payloads are decoded only when version as i16 >= 3. Below that, non-zero type bits are kept as ClassicalWithNonStandardVersionTypeBytes, without a payload, as for version 0.
  • The existing version 0 round-trip test now also covers versions 1, 2 and 0xffff.

🤖 Generated with Claude Code

PR Hygiene · 855a71f

  • Bots — coderabbitai not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — post /self-reviewed
  • Build running
  • Approvals
    • files with no dedicated owner (dash/src/blockdata/transaction/mod.rs) — QuantumExplorer or xdustinface

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Core reads the version as an int16_t and a payload only when nVersion >= 3
and nType != 0. Below version 3, non-zero type bits are kept as
ClassicalWithNonStandardVersionTypeBytes, without a payload.

Closes #1135

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 16 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: dashpay/rust-dashcore/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9e091863-f7a5-419e-b432-f075cf26e3f0

📥 Commits

Reviewing files that changed from the base of the PR and between d036d84 and 855a71f.


📒 Files selected for processing (1)
  • dash/src/blockdata/transaction/mod.rs

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 12, 2026
@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.46%. Comparing base (d036d84) to head (855a71f).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1155      +/-   ##
==========================================
- Coverage   78.49%   78.46%   -0.03%     
==========================================
  Files         299      299              
  Lines       80213    80214       +1     
==========================================
- Hits        62960    62943      -17     
- Misses      17253    17271      +18     
Flag Coverage Δ
core 76.66% <100.00%> (+<0.01%) ⬆️
ffi 51.09% <ø> (-0.07%) ⬇️
rpc 49.36% <ø> (ø)
spv 92.57% <ø> (-0.05%) ⬇️
wallet 82.12% <ø> (ø)
Files with missing lines Coverage Δ
dash/src/blockdata/transaction/mod.rs 88.22% <100.00%> (+0.01%) ⬆️

... and 5 files with indirect coverage changes

@xdustinface
xdustinface merged commit 90359ed into dev Oct 12, 2026
36 of 37 checks passed
@xdustinface
xdustinface deleted the fix/payload-below-v3 branch October 12, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dash: only decode a special payload for tx version >= 3

2 participants