Skip to content

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

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

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

Conversation

@jwahdatehagh
Copy link
Copy Markdown
Member

@jwahdatehagh jwahdatehagh commented Apr 24, 2026

Summary

This PR simplifies the ERC-4361 erratum to corrections that are appropriate for a Final ERC: direct contradictions, grammar/prose/reference-implementation mismatches, and explicitly classified compatibility changes.

Most commits are editorial or clarifications. The behavior-affecting changes are intentionally narrow:

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

Earlier draft changes for IDN/punycode policy, percent-decoded URI display framing, leading-zero chain-id, and standalone empty-port rejection were removed from this erratum scope.

What changes

14 commits against ERCS/erc-4361.md and assets/erc-4361/example.js, ordered low-controversy first.

# Commit subject Tag Finding
1 ERC-4361 editorial: remove invalid space after :// in informal template (ethereum#18) editorial ethereum#18
2 ERC-4361 editorial: fix stale request-uri reference (ethereum#19) editorial ethereum#19
3 ERC-4361 editorial: clarify RFC 3339 is a profile of ISO 8601, not equivalent (ethereum#20) editorial ethereum#20
4 ERC-4361 editorial: normalize EIP-55 to ERC-55 in ABNF comment (ethereum#21) editorial ethereum#21
5 ERC-4361 clarification: assign ERC-191 prefixing to wallet/signing primitive only (ethereum#2) clarification ethereum#2
6 ERC-4361 clarification: harmonize omitted-scheme default via wallet defaultScheme (ethereum#7) clarification ethereum#7
7 ERC-4361 clarification: drop redundant subdomain-mismatch rule, host already covers it (ethereum#8) clarification ethereum#8
8 ERC-4361 clarification: formalize RFC 3986/5234/7405 grammar imports (ethereum#5) clarification ethereum#5
9 ERC-4361 clarification: declare UTF-8 as the wire encoding (#1) clarification #1
10 ERC-4361 judgment: harmonize ERC-55 to SHOULD and pin "0x" to case-sensitive (ethereum#3) judgment ethereum#3
11 ERC-4361 narrow: require non-empty domain host and exclude userinfo subcomponent (ethereum#16) narrow ethereum#6, ethereum#16
12 ERC-4361 clarification: empty optional field forms equate to omission (ethereum#12, ethereum#13, ethereum#14) clarification ethereum#12, ethereum#13, ethereum#14
13 ERC-4361 widen: statement charset to printable ASCII excluding LF (ethereum#11) widen ethereum#11
14 ERC-4361 clarification: align reference implementation with cumulative grammar (ethereum#4) clarification ethereum#4

Finding numbers refer to the companion evidence repository.

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 harmonized down to SHOULD, matching existing parser warning behavior for all-lowercase/all-uppercase addresses.

Concurrent release plan

The companion test-vector PR is signinwithethereum/test-vectors#1. It now 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

Review guidance

If editors object to a specific commit, name the SHA and the objection. The branch is structured so contested commits can be removed without reopening unrelated corrections.


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.

1 participant