Repository navigation
refactor(dash)!: remove the bitcoinconsensus feature - #1318
Conversation
|
Warning Review limit reachedYou'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 54 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them. |
|
Bots are done — your move: post |
The optional `bitcoinconsensus` feature wrapped Bitcoin Core's libbitcoinconsensus, which checks scripts by Bitcoin's rules and parses transactions in Bitcoin's format. It does not work for Dash. A correctly signed special transaction fails with `ERR_TX_SIZE_MISMATCH`, because the extra payload after the locktime is not part of Bitcoin's format and Dash also signs it. A valid DIP-0020 script such as one using `OP_CAT` fails with `ERR_SCRIPT`, because those opcodes are disabled in Bitcoin and active on Dash mainnet since height 1516032. Bitcoin Core deprecated the library in v27 and removed it in v28, so `0.106.0+26.0` is the final crate release. Porting to it would also mean new flags, a new `spent_outputs` argument and dropping the `Ord`/`Hash` derives on `script::Error`. No downstream crate enables the feature: Platform, dash-evo-tool and dash-spv-wallet do not use it. This removes `Script::verify`, `Script::verify_with_flags`, `Transaction::verify`, `Transaction::verify_with_flags`, the `dashcore::bitcoinconsensus` re-export and the `script::Error` variants `BitcoinConsensus`, `UnknownSpentOutput` and `Serialization`, which only that API used.
4bcd5db to
8ec537d
Compare
|
/self-reviewed |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1318 +/- ##
==========================================
- Coverage 82.18% 82.16% -0.02%
==========================================
Files 290 290
Lines 76392 76289 -103
==========================================
- Hits 62785 62686 -99
+ Misses 13607 13603 -4
|
|
Bots are done — your move: post |
The optional
bitcoinconsensusfeature wrapped Bitcoin Core's libbitcoinconsensus, which checks scripts by Bitcoin's rules and parses transactions in Bitcoin's format. It does not work for Dash. A correctly signed special transaction fails withERR_TX_SIZE_MISMATCH, because the extra payload after the locktime is not part of Bitcoin's format and Dash also signs it. A valid DIP-0020 script such as one usingOP_CATfails withERR_SCRIPT, because those opcodes are disabled in Bitcoin and active on Dash mainnet since height 1516032.Bitcoin Core deprecated the library in v27 and removed it in v28, so
0.106.0+26.0is the final crate release. Porting to it would also mean new flags, a newspent_outputsargument and dropping theOrd/Hashderives onscript::Error. No downstream crate enables the feature: Platform, dash-evo-tool and dash-spv-wallet do not use it.This removes
Script::verify,Script::verify_with_flags,Transaction::verify,Transaction::verify_with_flags, thedashcore::bitcoinconsensusre-export and thescript::ErrorvariantsBitcoinConsensus,UnknownSpentOutputandSerialization, which only that API used.PR Hygiene ·
8ec537d/self-reviewedWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit