feat(consensus): impl SignableTx for TxDeposit#152
Merged
Conversation
emhane
approved these changes
Oct 7, 2024
klkvr
reviewed
Oct 7, 2024
Member
klkvr
left a comment
There was a problem hiding this comment.
deposit transactions are not "signable" and do not carry a signature, why do we need this?
Comment on lines
+259
to
+262
| let mut out = Vec::with_capacity(payload_length); | ||
| self.encode_inner(&mut out, false); | ||
| signature.write_rlp_vrs(&mut out); | ||
| let hash = keccak256(out); |
Member
There was a problem hiding this comment.
this will produce invalid hash. deposit transaction rlp encoding does not include a signature
Member
|
I see, we migrated this from anvil I don't think we need this for it because signature is always getting dropped when converting to envelope https://github.com/foundry-rs/foundry/blob/47f1ecb9c6f7e251c5bf2452c1f327d5508481a9/crates/anvil/src/eth/sign.rs#L143 imo even if it's needed in anvil we shouldn't introduce trait implementations which produce off-spec encodings |
Contributor
Author
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 21, 2026
…oy#152) <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and building the documentation. --> <!-- ** Please select "Allow edits from maintainers" in the PR Options ** --> ## Motivation Ref: foundry-rs/foundry#9047 <!-- Explain the context and why you're making that change. What is the problem you're trying to solve? In some cases there is not a problem and this can be thought of as being the motivation for your change. --> ## Solution impl `SignableTransaction<alloy_primitives::Signature>` for `TxDeposit` <!-- Summarize the solution and provide any necessary context needed to understand the code change. --> ## PR Checklist - [ ] Added Tests - [ ] Added Documentation - [ ] Breaking changes --------- Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Ref: foundry-rs/foundry#9047
Solution
impl
SignableTransaction<alloy_primitives::Signature>forTxDepositPR Checklist