Update ERC 7730: update json-schema to 2020-12 - #1822
Merged
Merged
Conversation
Collaborator
|
✅ All reviewers have approved. |
hilljessica8787-dot
approved these changes
Jul 2, 2026
Contributor
Author
|
I instead moved to solution 1, as discussed |
Member
|
I guess we need to test this by changing the schema on https://github.com/ethereum/clear-signing-erc7730-registry too and running the validation tests against all descriptors @manuelwedler |
Contributor
Author
|
@kuzdogan I opened ethereum/clear-signing-erc7730-registry#2624 to update the schema on the registry repo note:
|
ankurdotb
approved these changes
Jul 3, 2026
hilljessica8787-dot
approved these changes
Jul 3, 2026
hilljessica8787-dot
approved these changes
Jul 3, 2026
hilljessica8787-dot
approved these changes
Jul 3, 2026
Frank122480
approved these changes
Jul 6, 2026
kuzdogan
approved these changes
Jul 7, 2026
eip-review-bot
enabled auto-merge (squash)
July 7, 2026 12:31
eip-review-bot
approved these changes
Jul 7, 2026
eip-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
All Reviewers Have Approved; Performing Automatic Merge...
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.
following work on adding a new erc7730 registry using the
assets/erc-7730/erc7730-v2.schema.jsonin ethereum/clear-signing-erc7730-registry#2595TL;DR
The v2 schema declares draft-07 (line 2), but
fieldusesunevaluatedProperties: false(a draft-2019-09+ keyword) to reject stray keys. Draft-07 ignores that keyword, sofieldaccepts an extra$refand overlaps thereferencebranch → any bare{ "path": ..., "$ref": ... }field matches twooneOfbranches and fails validation. Fix: either declare 2020-12, or add{ "not": { "required": ["$ref"] } }tofield.Details
Symptom. In the https://github.com/ethereum/clear-signing-erc7730-registry repository,
check-jsonschemarejects bare references like{ "path": "amount", "$ref": "$.display.definitions.x" }with "valid under each of#/$display/reference,#/$format/field" (matches 2 of thefields[]oneOfbranches).Cause. Dialect mismatch:
field'sunevaluatedProperties: false(line ~640) is meant to reject unknown keys, but it only exists from draft 2019-09 — under the declared draft-07 it's silently ignored, sofieldtolerates$refand overlapsreference. The same mismatch overlapsfield/fieldGroupfor{ "path": ..., "fields": [...] }groups (e.g.registry/paraswap/calldata-AugustusSwapper-v6.2.jsoncurrently fails too).Fix options:
https://json-schema.org/draft/2020-12/schema→ activates the existingunevaluatedProperties, fixes both overlaps, keeps strictness.$ref-with-siblings, line 546) — needs full-registry re-validation.{ "not": { "required": ["$ref"] } }tofield'sallOf. Verified green on the affected file +kyberswap/erc721/okx/1inch/lido/threshold; no regression. Doesn't cover thefieldGroupoverlap (would need an analogous{ "not": { "required": ["fields"] } }).oneOf→anyOf(line 419) — one word, fixes both, but weakens validation.Recommendation: option 1 long-term (the dialect is just mis-declared); option 2 short-term/low-risk.
Open to discussion