Skip to content

rlp: allow manually registering types implementing Encoder/Decoder #32048

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

omerfirmak
Copy link
Contributor

@omerfirmak omerfirmak commented Jun 16, 2025

tinygo doesn't support reflect.Type.Implements but thankfully we don't rely on this for the state transition function to work properly.

So this PR makes sure that we never call reflect.Type.Implements in tinygo and if we ever need a type with custom encoder/decoder to be handled properly, we can register them. I have been doing that for types.Transaction to be able to properly decode a block from its RLP encoding.

@omerfirmak omerfirmak changed the title rlp: ignore rlp.Encoder/Decoder impls in tinygo rlp: allow manually registering types implementing Encoder/Decoder Jun 16, 2025
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.

1 participant