bips icon indicating copy to clipboard operation
bips copied to clipboard

Add sp() output descriptor format for BIP352 Silent Payments

Open craigraw opened this issue 1 month ago • 4 comments

This builds on and provides an alternative to #2026, which references an earlier discussion. Instead of modifying BIP352, a new output descriptor format is proposed in the style of BIPs 381-387.

Similar to #2026 key expressions starting with spscan and spspend are specified, but contain only version and key material information. The wallet birthday and additional labels are specified as optional additional arguments in the output descriptor format.

BIP352 authors: @josibake @RubenSomsen

Mail list discussion: https://groups.google.com/g/bitcoindev/c/bP6ktUyCOJI

craigraw avatar Dec 03 '25 11:12 craigraw

Thanks for the reminder - I've sent the mailing list post and added the link in the BIP. Also, the spaces after commas in the descriptors have been removed to be consistent with BIP 380-387.

craigraw avatar Dec 04 '25 08:12 craigraw

Thanks for working on this! Overall lgtm, the only comment I have is, maybe a way to specify a label range could be useful?

pythcoiner avatar Dec 04 '25 10:12 pythcoiner

Overall lgtm, the only comment I have is, maybe a way to specify a label range could be useful?

I'm not strongly opposed to this, but given the cost of scanning for each additional label I'm reluctant to add it - it may make a wallet synchronization trivially impractical in a non-obvious way simply by accidentally specifying a large range.

craigraw avatar Dec 04 '25 11:12 craigraw

Maybe with adding a note discouraging wallet to export a range? I mainly see range usefull for exchanges that can have a wide range, but also for this special case I guess they also need to backup associate metada for each label, so the descriptor is not sufficient anyway...

pythcoiner avatar Dec 04 '25 13:12 pythcoiner

There has been a second request for label ranges, and as I've said I'm not strongly opposed to adding this.

I suggest the following syntax - a hyphen between two integers represents an inclusive range:

sp(KEY,BIRTHDAY,1-10,15,20-25)

I think this is intuitive, compact and allows mixing sparse labels with ranges. There is slightly more parsing logic required now, and ranges will need to be validated (start < end), but this seems to be a comprehensive solution.

craigraw avatar Dec 23 '25 07:12 craigraw