ethereum / ethereum/execution-apis

Is the pattern for the byte type correct?

Open
#634 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Io
Stars
1.1k
Forks
530
Avg merge
5d 8h
Merged PRs (30d)
9

Description

This is the pattern for the `byte` type:

```
^0x([0-9a-fA-F]?){1,2}$
```

Unless I'm missing something, this is equivalent to:

```
^0x([0-9a-fA-F]){0,2}$
```

(I removed the `?` and changed the repetition range from `{1,2}` to `{0,2}`)

Meaning that it accepts `0x` as a valid value.

Maybe that's intentional, but the weird combination of `?` and `{1,2}` makes me think it might be a mistake. I also tried this with geth some weeks ago, and _I think_ it didn't accept `0x` as a valid value for the `yParity` of authorization items, although I haven't double-checked.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.