Skip to content

Conversation

markjr
Copy link
Contributor

@markjr markjr commented Oct 8, 2025

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.

markjr added 2 commits October 8, 2025 11:54
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.
@murchandamus
Copy link
Contributor

cc: @TheBlueMatt

@murchandamus murchandamus added Proposed BIP modification Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Oct 9, 2025
Copy link
Contributor

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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>&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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean sure, but this is also the definition of a TXT RR :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice for readers not to need to look it up separately.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
image

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

Suggested change
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.
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&nbsp;1035&nbsp;§3.3.14]]), each ≤255 bytes.
Suggested change
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.
The 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.

@murchandamus murchandamus removed the Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified label Oct 9, 2025
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like conceptually the change is fine, but could you check out the formatting?

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>&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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
image

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

Suggested change
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.
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&nbsp;1035&nbsp;§3.3.14]]), each ≤255 bytes.
Suggested change
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.
The 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.

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>&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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed - my bad.

@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Oct 9, 2025
Fix markup: use literal <character-string> instead of html entities &lt;…&gt;
Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@murchandamus murchandamus merged commit 1cf4130 into bitcoin:master Oct 11, 2025
4 checks passed
@murchandamus murchandamus removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants