BIP‑353: Clarify TXT record structure and concatenation order (single RR; RDATA order; no cross‑RR joins) #2000

pull markjr wants to merge 3 commits into bitcoin:master from markjr:master changing 1 files +6 −2
  1. markjr commented at 5:11 pm on October 8, 2025: contributor

    Clarifies existing intent without changing the on‑wire format.

    • Publishers: one TXT RR whose RDATA may contain multiple s (≤255 bytes each, RFC 1035 §3.3.14). • Clients: concatenate the RR’s strings in RDATA order (no separators) before parsing; do not concatenate across multiple TXT RRs; if multiple bitcoin: TXT RRs exist at the same name, treat as invalid.

  2. Update bip-0353.mediawiki
    BIP-353: Clarify TXT record structure and concatenation order (single RR; RDATA order; no cross-RR joins)
    91e0196d29
  3. Update bip-0353.mediawiki
    removed: 
    “If more than one TXT RR beginning with bitcoin: … treat as invalid.” -- redundant.
    2e9e55eb23
  4. murchandamus commented at 8:34 pm on October 9, 2025: contributor
  5. murchandamus added the label Proposed BIP modification on Oct 9, 2025
  6. murchandamus added the label Pending acceptance on Oct 9, 2025
  7. in bip-0353.mediawiki:41 in 2e9e55eb23
    35@@ -36,7 +36,9 @@ Thus, using TXT records to store Bitcoin payment instructions allows for human-r
    36 Bitcoin wallets MUST NOT prefer to use DNS-based resolving when methods with explicit public keys or addresses are available. In other words, if a standard Bitcoin address or direct BIP 21 URI is available or would suffice, Bitcoin wallets MUST prefer to use that instead.
    37 
    38 === Records ===
    39-Payment instructions are indexed by both a user and a domain. Instructions for a given <code>user</code> and <code>domain</code> are stored at <code>user</code>.user._bitcoin-payment.<code>domain</code> in a single TXT record.
    40+Payment instructions are indexed by both a user and a domain. Instructions for a given <code>user</code> and <code>domain</code> are stored at <code>user</code>.user._bitcoin-payment.<code>domain</code> in a single TXT RR.
    41+
    42+The TXT RR’s RDATA <b>MUST</b> consist of one or more DNS <code>&lt;character-string&gt;</code>s (see [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC&nbsp;1035&nbsp;§3.3.14]]), each ≤255 bytes.
    


    TheBlueMatt commented at 8:41 pm on October 9, 2025:
    I mean sure, but this is also the definition of a TXT RR :)

    murchandamus commented at 9:26 pm on October 9, 2025:
    Might be nice for readers not to need to look it up separately.

    murchandamus commented at 10:01 pm on October 9, 2025:

    I’m not sure what you were exactly going for, but if you wanted to render that as <character-string>, the &lt; and &gt; is done twice to the point it has an unintended outcome:

    This is what the rendered file looks like:

    I think one of the following would have the intended outcome:

    0The TXT RR’s RDATA <b>MUST</b> consist of one or more DNS <code><character-string></code>s (see [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC&nbsp;1035&nbsp;§3.3.14]]), each ≤255 bytes.
    
    0The TXT RR’s RDATA <b>MUST</b> consist of one or more DNS &lt;character-string&gt;s (see [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC&nbsp;1035&nbsp;§3.3.14]]), each ≤255 bytes.
    
  8. TheBlueMatt commented at 8:43 pm on October 9, 2025: contributor
    Changes LGTM. I worry we may end up too deep in DNS jargon for bitcoiners who might not know anything about DNS (or even that TXT records are made up of multiple strings rather than one), but its fine either way.
  9. murchandamus removed the label Pending acceptance on Oct 9, 2025
  10. in bip-0353.mediawiki:57 in 2e9e55eb23
    53@@ -52,7 +54,9 @@ For payment instructions that have a built-in expiry time (e.g. Lightning BOLT 1
    54 
    55 Clients resolving Bitcoin payment instructions MUST ignore any TXT records at the same label which do not begin with (ignoring case) "bitcoin:". Resolvers encountering multiple "bitcoin:"-matching TXT records at the same label MUST treat the records as invalid and refuse to use any payment instructions therein.
    56 
    57-Clients resolving Bitcoin payment instructions MUST concatenate all strings in the TXT record before processing the complete URI.<ref>TXT records are defined as "one or more character-strings" in [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC 1035]], and a "character-string" is a single byte (with a max value of 255) followed by that many characters.</ref>
    58+Clients resolving Bitcoin payment instructions <b>MUST</b> reconstruct the <code>bitcoin:</code> URI by concatenating the TXT RR’s <code>&lt;character-string&gt;</code> fields in <b>RDATA order</b>, without inserting separators, before parsing.<ref>DNS TXT RDATA consists of one or more length-prefixed strings with a maximum of 255 bytes of content; see RFC&nbsp;1035&nbsp;§3.3.14.</ref>
    


    murchandamus commented at 10:05 pm on October 9, 2025:
    Same as above:

    markjr commented at 11:43 pm on October 9, 2025:
    Fixed - my bad.
  11. murchandamus commented at 10:05 pm on October 9, 2025: contributor
    Looks like conceptually the change is fine, but could you check out the formatting?
  12. murchandamus added the label PR Author action required on Oct 9, 2025
  13. Update bip-0353.mediawiki
    Fix markup: use literal <character-string> instead of html entities &lt;…&gt;
    a686b1f8ca
  14. murchandamus commented at 0:11 am on October 11, 2025: contributor
    New commit just fixed the formatting issue, the text remains otherwise the same as what was previously signed off on by the BIP author. LGTM.
  15. murchandamus merged this on Oct 11, 2025
  16. murchandamus closed this on Oct 11, 2025

  17. murchandamus removed the label PR Author action required on Oct 11, 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-10-12 03:10 UTC

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