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

Support fixed sized arrays for primitive and custom types to fully comply with EIP 712 specification #30619

Closed
naveen-imtb opened this issue Oct 18, 2024 · 1 comment · Fixed by #30620

Comments

@naveen-imtb
Copy link
Contributor

Rationale

The EIP-712 specification supports fixed size and dynamic sized arrays.

From the spec,

The reference types are arrays and structs. Arrays are either fixed size or dynamic and denoted by Type[n] or Type[] respectively. Structs are references to other structs by their name. The standard supports recursive struct types.

Unfortunately go-ethereum in its current form doesn't fully comply with the EIP-712 standard because the signer module currently doesn't support encoding fixed size array datatypes.

Implementation

Are you willing to implement this feature? Yes

holiman added a commit that referenced this issue Nov 8, 2024
This change updates the EIP-712 implementation to resolve [#30619](#30619).

The test cases have been repurposed from the ethers.js [repository](https://github.com/ethers-io/ethers.js/blob/main/testcases/typed-data.json.gz), but have been updated to remove tests that don't have a valid domain separator; EIP-712 messages without a domain separator are not supported by geth.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
holiman added a commit that referenced this issue Nov 19, 2024
This change updates the EIP-712 implementation to resolve [#30619](#30619).

The test cases have been repurposed from the ethers.js [repository](https://github.com/ethers-io/ethers.js/blob/main/testcases/typed-data.json.gz), but have been updated to remove tests that don't have a valid domain separator; EIP-712 messages without a domain separator are not supported by geth.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
zfy0701 pushed a commit to sentioxyz/go-ethereum that referenced this issue Dec 3, 2024
This change updates the EIP-712 implementation to resolve [ethereum#30619](ethereum#30619).

The test cases have been repurposed from the ethers.js [repository](https://github.com/ethers-io/ethers.js/blob/main/testcases/typed-data.json.gz), but have been updated to remove tests that don't have a valid domain separator; EIP-712 messages without a domain separator are not supported by geth.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@naveen-imtb and others