ERC-4361 erratum: align grammar, prose, and reference implementation#1
Draft
jwahdatehagh wants to merge 19 commits into
Draft
ERC-4361 erratum: align grammar, prose, and reference implementation#1jwahdatehagh wants to merge 19 commits into
jwahdatehagh wants to merge 19 commits into
Conversation
071159b to
ab3818b
Compare
…e statement implementation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 SIWEdomainfield, aligning the grammar with the wallet origin model.statementis 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.://in informal templaterequest-urireferenceschemedefault via walletdefaultScheme%s"0x"; harmonize ERC-55 (final wording in ethereum#18)userinfostatementto printable ASCII excluding LFstatementhelperhttpsdefault to SHOULDThe 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, emptyrequest-id, and bareResources: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-vectorscorpus consumed by the maintained TypeScript, Python, Rust, and Go SIWE libraries.userinfo@indomain) affects 2 positive grammar-completeness vectors. The concurrent test-vectors PR moves them to negative.statementprintable ASCII) updates statement character vectors and should roll out parser-first before producers rely on the wider set.statement, emptyrequest-id, and bareResources:remain parseable. The PR adds producer guidance to prefer omission, not parser rejection.Concurrent release plan
The companion test-vector PR is
signinwithethereum/test-vectors#1. It covers both surviving behavior changes:userinfo@domain vectors from positive to negativeDownstream library PRs should only implement surviving parser changes: rejecting
userinfo@indomainand 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.