Skip to content

chore!: remove SegWit support - #1259

Closed
ZocoLini wants to merge 1 commit into
chore/remove-taprootfrom
chore/remove-segwit
Closed

ZocoLini wants to merge 1 commit into
chore/remove-taprootfrom
chore/remove-segwit

Conversation

@ZocoLini

@ZocoLini ZocoLini commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Dash has no SegWit, but dashcore still carries the Bitcoin code for it. Nothing in the workspace uses it beyond its own tests, so this removes it.

Removed:

  • Building witness addresses and scripts: p2wpkh, p2shwpkh, p2wsh, p2shwsh, new_v0_p2wpkh, new_v0_p2wsh, to_v0_p2wsh, wscript_hash.
  • WPubkeyHash, WScriptHash, WitnessMerkleNode, WitnessCommitment and SegwitV0Sighash.
  • The BIP143 sighash and the block witness commitment methods.
  • InputWeightPrediction::P2WPKH_MAX and ground_p2wpkh.
  • ServiceFlags::WITNESS, NetworkMessage::WtxidRelay, Inventory::WTx, Inventory::WitnessTransaction and Inventory::WitnessBlock.
  • Version 2 compact blocks.

Kept, with TODOs, because existing data still depends on them:

  • Witness and the BIP144 transaction form, for the asset locks Dash Platform has accepted in that form.
  • WitnessProgram and Payload::WitnessProgram, so addresses already persisted as witness programs keep decoding.

Breaking, because public items go away.

Stacked on #1253, so the base is chore/remove-taproot; retarget to dev once that merges. It overlaps #1255 in dash/src/network/. If #1255 merges first, take its version of those changes, which also removes ServiceFlags::GETUTXO.

Testing: cargo fmt --check, cargo clippy --workspace --all-features --all-targets -- -D warnings, and cargo test -p dashcore -p dashcore-crypto -p key-wallet pass. dash-spv tests were not run locally.

🤖 Generated with Claude Code

Dash has no SegWit. Remove witness address and script construction, the
BIP143 sighash, block witness commitments, wtxid relay and version 2
compact blocks. Witness, the BIP144 transaction form and WitnessProgram
stay, with TODOs, so accepted asset locks and persisted addresses keep
decoding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@codecov

codecov Bot commented Nov 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.79%. Comparing base (c70940f) to head (45aebd6).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           chore/remove-taproot    #1259      +/-   ##
========================================================
+ Coverage                 80.77%   80.79%   +0.02%     
========================================================
  Files                       290      290              
  Lines                     75716    75313     -403     
========================================================
- Hits                      61159    60850     -309     
+ Misses                    14557    14463      -94     
Flag Coverage Δ
core 79.20% <100.00%> (+0.08%) ⬆️
ffi 57.00% <ø> (ø)
rpc 52.05% <ø> (ø)
spv 93.68% <ø> (-0.04%) ⬇️
wallet 82.57% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
dash/src/address.rs 58.01% <ø> (-0.81%) ⬇️
dash/src/bip152.rs 80.99% <100.00%> (+0.06%) ⬆️
dash/src/blockdata/block.rs 80.13% <ø> (+9.41%) ⬆️
dash/src/blockdata/script/borrowed.rs 78.49% <ø> (-2.37%) ⬇️
dash/src/blockdata/script/mod.rs 51.84% <ø> (+1.39%) ⬆️
dash/src/blockdata/script/owned.rs 70.06% <ø> (-2.62%) ⬇️
dash/src/blockdata/script/push_bytes.rs 29.81% <ø> (-1.87%) ⬇️
dash/src/blockdata/transaction/mod.rs 91.27% <ø> (+1.39%) ⬆️
dash/src/blockdata/transaction/txin.rs 97.22% <ø> (ø)
dash/src/blockdata/witness.rs 89.61% <ø> (ø)
... and 9 more

... and 4 files with indirect coverage changes

@ZocoLini

ZocoLini commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

#400 got updated

@ZocoLini ZocoLini closed this Nov 2, 2026
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.

1 participant