btcd icon indicating copy to clipboard operation
btcd copied to clipboard

multi: recognize new standard P2A output type

Open Roasbeef opened this issue 3 months ago • 1 comments

In this PR, we add initial recognition of the new P2A output type. It actually overloads the existing Taproot witness version, but with a distinct witness program. We adopt the proposed standardness rules to make only spends without any witness data standard. Utilities to parse the script, make addresses, etc - have also been added.

Note that this doesn't include the logic to support "ephemeral dust", which enables zero fee and zero value outputs under certain conditions.

A replace dir is used as we modified btcutil in this PR.

Roasbeef avatar Sep 27 '25 02:09 Roasbeef

Pull Request Test Coverage Report for Build 20117557279

Details

  • 101 of 111 (90.99%) changed or added relevant lines in 6 files are covered.
  • 127 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.4%) to 55.171%

Changes Missing Coverage Covered Lines Changed/Added Lines %
txscript/pkscript.go 1 2 50.0%
txscript/sign.go 0 1 0.0%
mempool/policy.go 28 30 93.33%
txscript/standard.go 24 30 80.0%
<!-- Total: 101 111
Files with Coverage Reduction New Missed Lines %
btcutil/bech32/bech32.go 1 99.61%
btcutil/bloom/filter.go 2 96.84%
btcutil/gcs/gcs.go 2 81.25%
txscript/taproot.go 2 97.74%
database/ffldb/blockio.go 4 88.81%
peer/peer.go 15 71.1%
rpcclient/infrastructure.go 38 47.99%
btcec/schnorr/musig2/context.go 63 80.17%
<!-- Total: 127
Totals Coverage Status
Change from base Build 20117517710: 0.4%
Covered Lines: 31296
Relevant Lines: 56725

💛 - Coveralls

coveralls avatar Sep 27 '25 02:09 coveralls

@kcalvinalvin PTAL

Roasbeef avatar Dec 18 '25 02:12 Roasbeef