Skip to content

schemas: byte and uintDecimal patterns fixed to match geth#802

Merged
fjl merged 1 commit into
ethereum:mainfrom
felix314159:fix-base-types
Jun 30, 2026
Merged

schemas: byte and uintDecimal patterns fixed to match geth#802
fjl merged 1 commit into
ethereum:mainfrom
felix314159:fix-base-types

Conversation

@felix314159

Copy link
Copy Markdown
Contributor

two regex patterns in src/schemas/base-types.yaml diverge from what geth actually does:

  • byte
- ^0x([0-9a-fA-F]?){1,2}$
+ ^0x[0-9a-f]{1,2}$

Old pattern allows "0x" but geth would always append at least one hex digit (e.g. to make it 0x0 in the smallest case)


  • uintDecimal
- ^[1-9][0-9]*$
+ ^(0|[1-9][0-9]*)$

old pattern rejects "0" but geth allows plain 0 (here api.networkVersion is just uint64 and there is no guarding or whatever against 0). i used this example cuz it is the JSON-emitter for net_version


AFAIK all in-spec example values that resolve to these two types still validate without additional changes

@fjl fjl changed the title fix: byte and uintDecimal patterns fixed to match geth schemas: byte and uintDecimal patterns fixed to match geth Jun 30, 2026
@fjl
fjl merged commit f74de4b into ethereum:main Jun 30, 2026
5 checks passed
jihoonsong pushed a commit to jihoonsong/execution-apis that referenced this pull request Jul 16, 2026
…eum#802)

For 'byte', the old schema allowed an empty input "0x" and uppercase characters. This is inconsistent with other definitions such as bytes, bytes32 etc.

Simiarly, for 'uintDecimal', the schema should allow a single "0".
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