BIP‑353: Clarify TXT record structure and concatenation order (single RR; RDATA order; no cross‑RR joins)#2000
Conversation
BIP-353: Clarify TXT record structure and concatenation order (single RR; RDATA order; no cross-RR joins)
removed: “If more than one TXT RR beginning with bitcoin: … treat as invalid.” -- redundant.
|
cc: @TheBlueMatt |
TheBlueMatt
left a comment
There was a problem hiding this comment.
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.
bip-0353.mediawiki
Outdated
| 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. | ||
| 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. | ||
|
|
||
| The 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 1035 §3.3.14]]), each ≤255 bytes. |
There was a problem hiding this comment.
I mean sure, but this is also the definition of a TXT RR :)
There was a problem hiding this comment.
Might be nice for readers not to need to look it up separately.
There was a problem hiding this comment.
I’m not sure what you were exactly going for, but if you wanted to render that as <character-string>, the < and > 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:
| The 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 1035 §3.3.14]]), each ≤255 bytes. | |
| The 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 1035 §3.3.14]]), each ≤255 bytes. |
| The 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 1035 §3.3.14]]), each ≤255 bytes. | |
| The TXT RR’s RDATA <b>MUST</b> consist of one or more DNS <character-string>s (see [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC 1035 §3.3.14]]), each ≤255 bytes. |
murchandamus
left a comment
There was a problem hiding this comment.
Looks like conceptually the change is fine, but could you check out the formatting?
bip-0353.mediawiki
Outdated
| 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. | ||
| 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. | ||
|
|
||
| The 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 1035 §3.3.14]]), each ≤255 bytes. |
There was a problem hiding this comment.
I’m not sure what you were exactly going for, but if you wanted to render that as <character-string>, the < and > 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:
| The 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 1035 §3.3.14]]), each ≤255 bytes. | |
| The 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 1035 §3.3.14]]), each ≤255 bytes. |
| The 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 1035 §3.3.14]]), each ≤255 bytes. | |
| The TXT RR’s RDATA <b>MUST</b> consist of one or more DNS <character-string>s (see [[https://www.rfc-editor.org/rfc/rfc1035#section-3.3.14|RFC 1035 §3.3.14]]), each ≤255 bytes. |
bip-0353.mediawiki
Outdated
| 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. | ||
|
|
||
| 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> | ||
| Clients resolving Bitcoin payment instructions <b>MUST</b> reconstruct the <code>bitcoin:</code> URI by concatenating the TXT RR’s <code><character-string></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 1035 §3.3.14.</ref> |
Fix markup: use literal <character-string> instead of html entities <…>
murchandamus
left a comment
There was a problem hiding this comment.
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.

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.