Skip to content

chore: signer: add support for encoding fixed sized arrays for primitive and custom types.#2

Merged
tsnewnami merged 1 commit intomasterfrom
bugfix/TD-1526-eip712-spec-support-fixed-array
Jul 30, 2024
Merged

chore: signer: add support for encoding fixed sized arrays for primitive and custom types.#2
tsnewnami merged 1 commit intomasterfrom
bugfix/TD-1526-eip712-spec-support-fixed-array

Conversation

@naveen-imtb
Copy link
Contributor

@naveen-imtb naveen-imtb commented Jul 30, 2024

The EIP-712 specification supports encoding 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.

This PR fixes the gap by extending the current signer module encoding logic to support fixed size arrays of primitive and custom types.

This PR was originally reviewed / merged in the parent of this repository,

@naveen-imtb naveen-imtb requested review from a team, rzmahmood and timm088 July 30, 2024 06:18
@tsnewnami tsnewnami merged commit b6e735d into master Jul 30, 2024
@sergerad sergerad deleted the bugfix/TD-1526-eip712-spec-support-fixed-array branch October 9, 2024 20:26
alexi21 pushed a commit that referenced this pull request May 20, 2025
This PR is #2 of a 3-part series that implements the new log index
intended to replace core/bloombits.
Based on ethereum/go-ethereum#31079
Replaces ethereum/go-ethereum#30370

This part replaces the old bloombits based log search logic in
`eth/filters` to use the new `core/filtermaps` logic.

FilterMaps data structure explanation:
https://gist.github.com/zsfelfoldi/a60795f9da7ae6422f28c7a34e02a07e

Log index generator code overview:
https://gist.github.com/zsfelfoldi/97105dff0b1a4f5ed557924a24b9b9e7

Search pattern matcher code overview:
https://gist.github.com/zsfelfoldi/5981735641c956afb18065e84f8aff34

Note that the possibility of a tree hashing scheme and remote proof
protocol are mentioned in the documents above but they are not exactly
specified yet. These specs are WIP and will be finalized after the local
log indexer/filter code is finalized and merged.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
alexi21 pushed a commit that referenced this pull request May 20, 2025
alexi21 pushed a commit that referenced this pull request May 21, 2025
TD-1526: add support for EIP-712 bulk listing types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants