Skip to content

refactor!: drop dashcore_hashes::hex in favour of hex-conservative, ban hex{,_lit,-literal} with cargo deny - #1110

Open
kwvg wants to merge 13 commits into
dashpay:devfrom
kwvg:reduce_p2
Open

kwvg wants to merge 13 commits into
dashpay:devfrom
kwvg:reduce_p2

Conversation

@kwvg

@kwvg kwvg commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Additional Information

PR Hygiene · 3cce84b

  • Bots — coderabbitai ✓
  • Self-review — posted; again after any push
  • Build green
  • Approvals
    • files with no dedicated owner (CHANGELOG.md, crypto/src/ecdsa.rs, crypto/src/key.rs and 42 more) — QuantumExplorer or ZocoLini or xdustinface
    • key-wallet-manager (key-wallet-manager/Cargo.toml, key-wallet-manager/src/error.rs, key-wallet-manager/src/process_block.rs) — QuantumExplorer or ZocoLini or xdustinface
    • key-wallet (key-wallet/README.md, key-wallet/src/bip32.rs, key-wallet/src/lib.rs and 3 more) — QuantumExplorer or ZocoLini 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.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: dashpay/rust-dashcore/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f0cbcfc0-400f-4c9c-809e-577b3416a364
📥 Commits

Reviewing files that changed from the base of the PR and between 861e82b and 3cce84b.

📒 Files selected for processing (4)
  • dash/src/blockdata/transaction/special_transaction/coinbase.rs
  • dash/src/hash_types.rs
  • dash/src/network/message_headers2.rs
  • rpc-client/src/client.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

This pull request replaces internal and hashes-based hexadecimal APIs with hex-conservative across the workspace. It updates parsing, formatting, and error types, and changes BIP32 parsing to reject odd-length 256-bit child numbers.

Changes

Hex API migration

Layer / File(s) Summary
Hash crate hex foundation
hashes/*, internals/src/hex/*, internals/src/lib.rs, deny.toml, CHANGELOG.md
Hash parsing and formatting now use hex-conservative, with shared padding support. The internal hex module is removed, and the deny rules block other hex crates. The changelog records related API changes.
DashCore hex parsing and formatting
dash/src/*, dash/benches/transaction.rs
DashCore updates hex formatting, decoding, and related error types across hash, serialization, script, and network code. Tests and examples use the new decoder.
Wallet hex APIs and child-number parsing
key-wallet/*, key-wallet-manager/*, key-wallet-ffi/src/*, key-wallet/README.md, CHANGELOG.md
Wallet code adopts the new hex APIs. BIP32 parsing rejects odd-length and short 256-bit child numbers, with tests for accepted and rejected inputs.
Crypto and RPC consumers
crypto/src/*, rpc-client/*, rpc-integration-test/*, dash-spv-ffi/src/bin/ffi_cli.rs
Crypto and RPC code use hex-conservative for formatting and decoding. Related error payloads and test fixtures are updated.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 3cce8

No merge-blocking issue was identified in the reviewed changes; normal checks remain appropriate.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 53.77% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 106 functions across 42 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: replacing dashcore_hashes::hex with hex-conservative and banning legacy hex crates.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · 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 7, 2026

Copy link
Copy Markdown
Contributor

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@kwvg
kwvg marked this pull request as ready for review October 7, 2026 07:35
@github-actions

github-actions Bot commented Oct 7, 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 waiting-bots Waiting for the review bots to report on this head and removed merge-conflict The PR conflicts with the target branch. labels Oct 7, 2026
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.22222% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.85%. Comparing base (78b660c) to head (3cce84b).

Files with missing lines Patch % Lines
rpc-client/src/client.rs 16.66% 5 Missing ⚠️
dash-spv-ffi/src/bin/ffi_cli.rs 0.00% 3 Missing ⚠️
dash/src/consensus/serde.rs 33.33% 2 Missing ⚠️
dash/src/internal_macros.rs 81.81% 2 Missing ⚠️
key-wallet-manager/src/error.rs 0.00% 2 Missing ⚠️
rpc-client/src/queryable.rs 0.00% 2 Missing ⚠️
...ction/special_transaction/provider_registration.rs 0.00% 1 Missing ⚠️
dash/src/pow.rs 95.00% 1 Missing ⚠️
dash/src/taproot.rs 66.66% 1 Missing ⚠️
hashes/src/util.rs 95.23% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1110      +/-   ##
==========================================
- Coverage   78.19%   77.85%   -0.35%     
==========================================
  Files         302      298       -4     
  Lines       79257    78716     -541     
==========================================
- Hits        61978    61287     -691     
- Misses      17279    17429     +150     
Flag Coverage Δ
core 75.70% <93.75%> (+0.55%) ⬆️
ffi 49.20% <62.50%> (-3.61%) ⬇️
rpc 49.21% <11.11%> (ø)
spv 92.41% <ø> (-0.03%) ⬇️
wallet 81.98% <88.57%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
dash/src/bip152.rs 80.93% <100.00%> (ø)
dash/src/blockdata/block.rs 68.80% <100.00%> (ø)
dash/src/blockdata/script/mod.rs 48.35% <100.00%> (+0.15%) ⬆️
dash/src/blockdata/script/owned.rs 69.83% <100.00%> (ø)
dash/src/blockdata/transaction/mod.rs 86.93% <100.00%> (+0.01%) ⬆️
dash/src/blockdata/transaction/outpoint.rs 82.43% <ø> (ø)
...transaction/asset_unlock/qualified_asset_unlock.rs 91.72% <ø> (ø)
...ckdata/transaction/special_transaction/coinbase.rs 90.36% <100.00%> (+0.47%) ⬆️
...ata/transaction/special_transaction/mnhf_signal.rs 98.55% <100.00%> (+3.14%) ⬆️
dash/src/blockdata/transaction/txin.rs 97.22% <100.00%> (ø)
... and 26 more

... and 16 files with indirect coverage changes

@kwvg
kwvg marked this pull request as draft October 7, 2026 08:07
@kwvg kwvg changed the title refactor!: harmonize behind hex-conservative 1.x, propagate with dashcore_hashes::hex, ban hex{,_lit,-literal} with cargo deny refactor!: propagate hex-conservative 1.x through dashcore_hashes::hex, ban hex{,_lit,-literal} with cargo deny Oct 7, 2026
@github-actions github-actions Bot added merge-conflict The PR conflicts with the target branch. and removed waiting-bots Waiting for the review bots to report on this head labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@kwvg kwvg changed the title refactor!: propagate hex-conservative 1.x through dashcore_hashes::hex, ban hex{,_lit,-literal} with cargo deny refactor!: drop dashcore_hashes::hex in favour of hex-conservative, ban hex{,_lit,-literal} with cargo deny Oct 7, 2026
@github-actions github-actions Bot removed the merge-conflict The PR conflicts with the target branch. label Oct 7, 2026
@kwvg
kwvg marked this pull request as ready for review October 7, 2026 21:30
coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 7, 2026
@kwvg

kwvg commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

/self-reviewed

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Ready for review — files with no dedicated owner: QuantumExplorer or ZocoLini or xdustinface · key-wallet-manager: QuantumExplorer or ZocoLini or xdustinface · key-wallet: QuantumExplorer or ZocoLini or xdustinface.
Full checklist in the description.

@github-actions github-actions Bot added the ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. label Oct 7, 2026
@github-actions github-actions Bot added the merge-conflict The PR conflicts with the target branch. label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.

@github-actions github-actions Bot removed the merge-conflict The PR conflicts with the target branch. label Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 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 waiting-bots Waiting for the review bots to report on this head and removed ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 8, 2026
@kwvg

kwvg commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

/self-reviewed

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Ready for review — files with no dedicated owner: QuantumExplorer or ZocoLini or xdustinface · key-wallet-manager: QuantumExplorer or ZocoLini or xdustinface · key-wallet: QuantumExplorer or ZocoLini or xdustinface.
Full checklist in the description.

@github-actions github-actions Bot added ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. and removed waiting-self-review Waiting for the author to post /self-reviewed labels Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant