Repository navigation
BIP352: align reference address decoding with silent payment rules - #2288
ginavalent wants to merge 1 commit into
Conversation
Signed-off-by: ginavalent <ginavalent@outlook.com>
murchandamus
left a comment
There was a problem hiding this comment.
Thanks. @theStack, this seems to fix a discrepancy between the specification and the reference implementation. Do you want it?
|
Concept ACK |
|
ACK c39bae2 The decoder now does what the BIP says: bech32m only, exactly 66 bytes for v0, the first 66 bytes for v1 through v30, fail on v31. At c39bae2 the five new tests pass and |
BIP 352 specifies that silent payment addresses use Bech32m encoding and defines forward-compatible address decoding rules for versions 0 through 30.
The BIP352 reference implementation currently uses the generic SegWit decoder without checking the encoding type, which allows a Bech32 checksum for a silent payment address. It also rejects versions above 16 and passes the complete payload to the spend key parser instead of discarding extension data for future versions.
Update the BIP352-specific decoder to: