fix(op-revm): return error when enveloped_tx is missing#3143
Merged
rakita merged 3 commits intobluealloy:mainfrom Nov 13, 2025
Merged
fix(op-revm): return error when enveloped_tx is missing#3143rakita merged 3 commits intobluealloy:mainfrom
rakita merged 3 commits intobluealloy:mainfrom
Conversation
rakita
reviewed
Nov 12, 2025
crates/op-revm/src/l1block.rs
Outdated
| /// Internally calls [`L1BlockInfo::tx_cost`]. | ||
| #[track_caller] | ||
| pub fn tx_cost_with_tx(&mut self, tx: impl OpTxTr, spec: OpSpecId) -> U256 { | ||
| pub fn tx_cost_with_tx(&mut self, tx: impl OpTxTr, spec: OpSpecId) -> Result<U256, String> { |
Member
There was a problem hiding this comment.
Better to return Option here, and leave for caller to create the error message.
Contributor
Author
There was a problem hiding this comment.
will do, thanks!
Contributor
Author
There was a problem hiding this comment.
Hi @rakita, updated, pls check, let me know if there's anything else needs tweaking. Appreciate your time.
0f6a033 to
cae8502
Compare
CodSpeed Performance ReportMerging #3143 will not alter performanceComparing Summary
|
rakita
reviewed
Nov 13, 2025
crates/op-revm/src/l1block.rs
Outdated
| .enveloped_tx() | ||
| .expect("all not deposit tx have enveloped tx") | ||
| .clone(); | ||
| let enveloped_tx = tx.enveloped_tx().cloned()?; |
Member
There was a problem hiding this comment.
Suggested change
| let enveloped_tx = tx.enveloped_tx().cloned()?; | |
| let enveloped_tx = tx.enveloped_tx()?; |
probably dont need clone here, not sure why was cloned in first place
Contributor
Author
There was a problem hiding this comment.
You're right, removed, thanks!
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 21, 2026
…vm#3143) * fix(op-revm): return error when enveloped_tx is missing * fmt * Remove unnecessary clone
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.
Fixes a missing case from #3055 where
tx_cost_with_txinl1block.rs:272still uses.expect()with the sameenveloped_tx()call.