Skip to content

[Feature] Encodable and Decodable for Signature #938

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

Closed
greged93 opened this issue Apr 24, 2025 · 5 comments
Closed

[Feature] Encodable and Decodable for Signature #938

greged93 opened this issue Apr 24, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@greged93
Copy link

Component

primitives

Describe the feature you would like

The alloy_rlp::Encodable and alloy_rlp::Decodable implementations were removed in this commit. I propose to reintroduce the implementations behind the rlp flag as was done before.

Additional context

No response

@nadtech-hub
Copy link

I can do that if maintainers allow it

@klkvr
Copy link
Member

klkvr commented Apr 28, 2025

those were removed to avoid footguns as encoding for signatures may differ depending on context (e.g legacy and non-legacy transactions are using different rlp)

@mattsse
Copy link
Member

mattsse commented Apr 29, 2025

yeah Signature encoding depends on the transaction type, there is Signature::decode_rlp_vrs

e.g. let signature = Signature::decode_rlp_vrs(buf, bool::decode)?; for non legacy transactions where signature has a parity bool

@greged93
Copy link
Author

makes sense, thanks for the answer!

@mattsse mattsse closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Alloy Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

4 participants