Skip to content

ERC-4361 erratum: align grammar, prose, and reference implementation#1

Draft
jwahdatehagh wants to merge 19 commits into
masterfrom
review/4361
Draft

ERC-4361 erratum: align grammar, prose, and reference implementation#1
jwahdatehagh wants to merge 19 commits into
masterfrom
review/4361

Conversation

@jwahdatehagh
Copy link
Copy Markdown
Member

@jwahdatehagh jwahdatehagh commented Apr 24, 2026

Summary

Erratum scope appropriate for a Final ERC: direct contradictions, grammar/prose/reference-implementation mismatches, and two explicitly classified compatibility changes.

The intentional behavior-affecting changes are narrow:

  • userinfo@ is excluded from the SIWE domain field, aligning the grammar with the wallet origin model.
  • statement is widened to printable ASCII while preserving parser acceptance of empty and omitted statements.

Commit series

Commits are ordered low-controversy first. Each subject starts with one of the following tags:

  • editorial: typos, stale names, prose wording. No normative effect.
  • clarification: no intended behavior change in conforming implementations.
  • narrow: grammar/prose becomes stricter. Previously-valid messages become invalid.
  • widen: grammar becomes looser. Previously-invalid messages become valid.
  • judgment: a direction call between competing readings, justified by compatibility evidence.
# Tag Subject
1 editorial Remove invalid space after :// in informal template
2 editorial Fix stale request-uri reference
3 editorial Clarify RFC 3339 is a profile of ISO 8601
4 editorial Normalize EIP-55 to ERC-55 in ABNF comment
5 clarification Assign ERC-191 prefixing to wallet/signing primitive
6 clarification Route omitted-scheme default via wallet defaultScheme
7 clarification Drop redundant subdomain rule (host already covers it)
8 clarification Formalize RFC 3986/5234/7405 grammar imports
9 clarification Declare UTF-8 as the wire encoding
10 judgment Pin %s"0x"; harmonize ERC-55 (final wording in ethereum#18)
11 narrow Require non-empty domain host, exclude userinfo
12 clarification Treat empty optional field forms as omission
13 widen Widen statement to printable ASCII excluding LF
14 clarification Align reference implementation with cumulative grammar
15 clarification Amend reference implementation: optional LF and statement helper
16 editorial Normalize EIP/ERC link paths in the document
17 clarification Restore browser https default to SHOULD
18 judgment Restate ERC-55: mixed-case addresses MUST be checksum-valid
19 editorial Sync reference grammar comment with ERC body

The branch is structured so contested commits can be removed without reopening unrelated corrections.

Consideration on commit 12 (4b2cecf)

We would prefer to tighten the ABNF so that empty statement, empty request-id, and bare Resources: are not grammatically valid in the first place. The simplified erratum keeps them parseable only to preserve backwards compatibility with the canonical test vectors. Given how young this ecosystem still is, we believe a clean grammar fix is worth considering rather than carrying empty-form support indefinitely as spec noise. We are open to either direction if editors and library maintainers agree.

Backwards compatibility

Audited against the canonical @signinwithethereum/test-vectors corpus consumed by the maintained TypeScript, Python, Rust, and Go SIWE libraries.

  • The retained narrowing (userinfo@ in domain) affects 2 positive grammar-completeness vectors. The concurrent test-vectors PR moves them to negative.
  • The retained widening (statement printable ASCII) updates statement character vectors and should roll out parser-first before producers rely on the wider set.
  • Empty statement, empty request-id, and bare Resources: remain parseable. The PR adds producer guidance to prefer omission, not parser rejection.
  • ERC-55 is restated: lowercase and uppercase addresses remain accepted; mixed-case addresses MUST satisfy the ERC-55 checksum. This matches the canonical parser's existing warn/reject behavior.

Concurrent release plan

The companion test-vector PR is signinwithethereum/test-vectors#1. It covers both surviving behavior changes:

  • move the two userinfo@ domain vectors from positive to negative
  • update statement-character vectors for printable ASCII

Downstream library PRs should only implement surviving parser changes: rejecting userinfo@ in domain and accepting the widened statement character set.

Evidence

Primary sources, rationale, and the conformance audit: signinwithethereum/erc-4361-erratum.


Filed as an erratum against version 1 of ERC-4361. The status remains Final; no version bump is proposed.

@jwahdatehagh jwahdatehagh changed the title ERC-4361 Erratum Summary ERC-4361 erratum: align grammar, prose, and reference implementation Apr 30, 2026
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.

2 participants