Skip to content

docs(rfc9162): a root is the lower-case hex that hex writes - #9

Merged
HaoZeke merged 1 commit into
mainfrom
fix/head-hex-case
Nov 16, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
fix/head-hex-case

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Head.root, verify_inclusion and verify_consistency now say that a root is the lower-case hex hex writes.

  • Head.root was documented as hex and the verify functions' roots not at all, but both verify functions compare the root they recompute with the given text as hex writes it, and from_hex refuses anything but 0-9 and a-f. An upper-case root verified nothing with no word why.
  • Lower case stays the one form, since Head::material signs the root as text and a second spelling would be a second signed form of one head. The docs of Head.root and both verify functions now say so, and the reference page says lowercase. The verify_consistency doc named its path parameter nodes; that is fixed too.
  • The code was already doing this, so there is no failing test of a bug; a test pins that an upper-case root fails inclusion and both consistency paths.

The branch has a towncrier fragment.

Head.root was documented as hex and the verify functions' roots not at
all, but both verify functions compare the root they recompute with the
given text as hex writes it, and from_hex refuses anything but 0-9 and
a-f. An upper-case root verified nothing with no word why. Lower case
stays the one form, since Head::material signs the root as text and a
second spelling would be a second signed form of one head; the docs of
Head.root and both verify functions now say so, and the reference page
says lowercase. The code was right, so there is no failing test; a test
pins that an upper-case root fails inclusion and both consistency
paths. The verify_consistency doc named its path parameter nodes.
@HaoZeke
HaoZeke merged commit e1eb372 into main Nov 16, 2026
6 checks passed
@HaoZeke
HaoZeke deleted the fix/head-hex-case branch November 16, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant