BIP 77: Delimit fragment params with - instead of + #1890

pull nothingmuch wants to merge 2 commits into bitcoin:master from nothingmuch:fragment-fixes changing 1 files +25 −9
  1. nothingmuch commented at 12:48 pm on July 5, 2025: contributor

    This PR addresses the concerns raised in #1885 with regards using + as a delimiter, by switching to -. Some URI libraries implement RFC 1866’s (HTML 2.0) “keyword” delimitation in query parameters by decoding + as unconditionally, which necessitates kludgy workarounds.

    Additionally fragment parameters must now ordered lexicographically (instead of reverse), the motivation for a canonical ordering was to reduce implementation fingerprinting concerns, but the reverse lexicographical ordering was specified simply because that was the behavior that was already implemented in PDK. Since that is somewhat surprising and the delimiter change breaks backwards compatibility anyway, the marginal cost in terms of compatibility of reducing the surprisingness of the reversed ordering is arguably zero, so this is also addressed here.

    cc @kumulynja

  2. in bip-0077.md:742 in 315dcc2252 outdated
    737+parameters.
    738+
    739+As a result of this change implementations are encouraged to still accept `+`
    740+delimited fragment parameters for during 2026 (a grace period of just under 6
    741+months).
    742+
    


    murchandamus commented at 8:04 pm on July 7, 2025:
    This part would perhaps better work in a “Changelog” section, given that the Backwards compatibility section usually refers to existing behavior and other proposals.

    nothingmuch commented at 11:13 am on July 8, 2025:

    Thanks, I forgot about that part of BIP 3 but that does make a lot more sense.

    I retroactively called the merged draft 0.1.0, and this updated version 0.2.0, and moved the compatibility grace period recommendation to the section defining the fragment parameters, since that didn’t seem to make sense in the changelog.


    nothingmuch commented at 1:13 pm on July 8, 2025:
    See also #1891 which only contains what is now the first commit of this PR
  3. nothingmuch force-pushed on Jul 8, 2025
  4. nothingmuch force-pushed on Jul 8, 2025
  5. nothingmuch force-pushed on Jul 8, 2025
  6. in bip-0077.md:11 in cbf69f333f outdated
     7@@ -8,6 +8,7 @@
     8   Post-History: https://github.com/bitcoin/bips/pull/1483
     9                 https://gnusha.org/pi/bitcoindev/7B11AE34-27A7-46ED-95BF-66CA13BA26F3@ngould.dev/#t
    10                 https://gnusha.org/pi/bitcoindev/3C0A6E4C-444E-4E75-829C-1A21D8EE40E0@ngould.dev/#t
    11+  Version: 0.2.0
    


    murchandamus commented at 8:17 pm on July 8, 2025:
    Per BIP-3: BIP Header Preamble, “the headers must appear in the following order[…]License, License-Code, Discussion, Version, Requires”, so this should be under “License”, but I would suggest to drop the Version header until BIP 3 is activated.
  7. in scripts/buildtable.pl:40 in cbf69f333f outdated
    36@@ -37,6 +37,9 @@
    37 	'Requires' => undef,
    38 	'Superseded-By' => undef,
    39 );
    40+my %VersionField = (
    


    murchandamus commented at 8:21 pm on July 8, 2025:
    The changes to scripts/buildtable.pl were cherry-picked into #1820 as discussed, I think they can be dropped here.
  8. DanGould referenced this in commit 70755a9dac on Jul 9, 2025
  9. Separate fragment params with `-` instead of `+`
    Since only Bull Bitcoin Mobile and Cake wallet are currently deployed in
    production, both using PDK, and the `+` character is causing some
    friction, this change seems justified to avoid similar issues with
    future implementations.
    43f9688600
  10. nothingmuch force-pushed on Jul 9, 2025
  11. murchandamus commented at 7:07 pm on July 10, 2025: contributor

    LGTM, should we wait for a review from @DanGould or is this ready to go?

    Nit: We use ISO-8601 formatted dates (YYYY-MM-DD) in the preamble, so I would prefer also using the same format in the Changelog, but either is fine and this is not a blocker.

  12. nothingmuch force-pushed on Jul 10, 2025
  13. nothingmuch commented at 7:20 pm on July 10, 2025: contributor

    LGTM, should we wait for a review from @DanGould or is this ready to go?

    I’d be more comfortable with an explicit ACK even though the corresponding code changes were merged into PDK

    Nit: We use ISO-8601 formatted dates (YYYY-MM-DD) in the preamble, so I would prefer also using the same format in the Changelog, but either is fine and this is not a blocker.

    ISO-8601 is better, done

  14. DanGould commented at 7:31 pm on July 10, 2025: contributor
    ACK 1474f0d71552b4bc6cc68ec816847be4e487d7ef
  15. in bip-0077.md:744 in 1474f0d715 outdated
    737@@ -734,3 +738,15 @@ directory, and development kit may be found here:
    738 <https://github.com/payjoin/rust-payjoin>. Source code for an Oblivious
    739 HTTP relay implementation may be found here:
    740 <https://github.com/payjoin/ohttp-relay>.
    741+
    742+## Changelog
    743+
    744+- 0.2.0 2025-06-08
    


    murchandamus commented at 7:56 pm on July 10, 2025:

    I was looking at the diff from the force push and noticed that it was July before and now is June. Just wanted to doublecheck whether you meant June.

    0-- 0.2.0 Jul 8 2025
    1+- 0.2.0 2025-06-08
    

    nothingmuch commented at 8:06 pm on July 10, 2025:
    No I’m just an idiot
  16. nothingmuch force-pushed on Jul 10, 2025
  17. Specify lexicographical order for fragment params
    The rationale for this change is that since `-` instead of `+` breaks
    compatibility anyway, the marginal cost of removing this
    unusual/surprising requirement for reverse lexicographical ordering is
    zero.
    8b83c34949
  18. nothingmuch force-pushed on Jul 10, 2025
  19. murchandamus merged this on Jul 10, 2025
  20. murchandamus closed this on Jul 10, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-29 16:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me