Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signer/core/apitypes: support fixed size arrays for EIP-712 typed data #30175

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

mdymalla
Copy link
Contributor

@mdymalla mdymalla commented Jul 17, 2024

resolves: #30183

When attempting to hash a typed data struct that includes a type reference with a fixed-size array, the validation process fails. According to EIP-712, arrays can be either fixed-size or dynamic, denoted by Type[n] or Type[] respectively, although it appears this currently isn't supported.

This PR introduces a change to the validation logic to accommodate types containing fixed-size arrays.

@mdymalla mdymalla requested a review from holiman as a code owner July 17, 2024 05:06
@mdymalla mdymalla changed the title fix: support fixed size arrays for EIP-712 typed data fix: support fixed size arrays for EIP-712 typed data - resolves: https://github.com/ethereum/go-ethereum/issues/30183 Jul 18, 2024
@mdymalla mdymalla changed the title fix: support fixed size arrays for EIP-712 typed data - resolves: https://github.com/ethereum/go-ethereum/issues/30183 fix: support fixed size arrays for EIP-712 typed data Jul 18, 2024
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman changed the title fix: support fixed size arrays for EIP-712 typed data signer/core: support fixed size arrays for EIP-712 typed data Aug 28, 2024
@holiman holiman changed the title signer/core: support fixed size arrays for EIP-712 typed data signer/core/apitypes: support fixed size arrays for EIP-712 typed data Aug 28, 2024
@holiman holiman added this to the 1.14.9 milestone Aug 28, 2024
@holiman holiman merged commit ea3b509 into ethereum:master Aug 28, 2024
2 checks passed
mask-pp pushed a commit to mask-pp/go-ethereum that referenced this pull request Aug 30, 2024
ethereum#30175)

When attempting to hash a typed data struct that includes a type
reference with a fixed-size array, the validation process fails.
According to EIP-712, arrays can be either fixed-size or dynamic,
denoted by `Type[n]` or `Type[]` respectively, although it appears this
currently isn't supported.

This change modifies  the validation logic to accommodate types
containing fixed-size arrays.
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.

3 participants