Halve gas used by SafetyChecker#210
Merged
K-Ho merged 1 commit intoethereum-optimism:masterfrom Aug 11, 2020
Merged
Conversation
K-Ho
approved these changes
Aug 11, 2020
Contributor
K-Ho
left a comment
There was a problem hiding this comment.
LGTM! Curious about your thoughts w.r.t gas savings by removing all of the "seenJump" logic
| // we are now inside unreachable code until we hit a JUMPDEST! | ||
| insideUnreachableCode = true; | ||
| // STOP or REVERT or INVALID or RETURN (see safety checker docs in wiki for more info) | ||
| } else if (op == 0x00 || op == 0xfd || op == 0xfe || op == 0xf3) { |
Contributor
There was a problem hiding this comment.
Would it be cheaper to also do an opBit & mask != 0 here?
Contributor
Author
There was a problem hiding this comment.
Yes, but it's diminishing returns since it's already gated outside.
| // JUMP | ||
| } else if (op == 0x56) { | ||
| // We can now reach all JUMPDESTs | ||
| seenJUMP = true; |
Contributor
There was a problem hiding this comment.
now that I think about it, we can just assume that we've seen a JUMP. I doubt we'll ever have a case where we reach a halting opcode before seeing a JUMP (no need to update this in this PR, but curious about your thoughts)
Contributor
Author
There was a problem hiding this comment.
Meh, personally I'd remove this logic. It's safer the other way, never allow something you don't expect.
Comment on lines
+110
to
+111
| if (!seenJUMP) { | ||
| return true; |
protolambda
added a commit
to protolambda/optimism
that referenced
this pull request
May 1, 2022
…lete_code_v2 ref impl: Source and Driver Cleanup
Lredhdx
pushed a commit
to node-real/combo-optimism
that referenced
this pull request
Jun 17, 2024
bap2pecs
pushed a commit
to babylonlabs-io/optimism
that referenced
this pull request
Jul 31, 2024
theochap
pushed a commit
that referenced
this pull request
Dec 10, 2025
* feat(client): `StatelessL2BlockExecutor` Implements the `StatelessL2BlockExecutor`, capable of executing `L2PayloadAttributes` and returning the block header + receipts. The `StatelessL2BlockExecutor` is backed by the `TrieDB` in the `kona-mpt` crate, fetching necessary data from the initial state root as well as the starting parent block hash. * fix(client): Trie fixes, etc. x trim test files * big block testin' * checkpoint: big block works * checkpoint dep reordering * cleanups * more tests
Zena-park
added a commit
to tokamak-network/optimism
that referenced
this pull request
Dec 30, 2025
theochap
pushed a commit
that referenced
this pull request
Jan 15, 2026
emhane
pushed a commit
that referenced
this pull request
Feb 3, 2026
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.
Running tests now (they pass), shouldn't change any functionality, and uses about 40% of previous gas. There's more possible, but this is the low hanging fruit, closes #209