WIP: Remove CeloConsensusTx#157
Draft
karlb wants to merge 2 commits into
Draft
Conversation
Reverts the ~600-line wrapper introduced in 8c1a706 once the upstream fix in ethereum-optimism/optimism#20382 lands. That PR moves the effective_tip_per_gas() call to before into_consensus() in OpPayloadBuilderCtx::execute_best_transactions, so the pool-layer view (which already exposes native-equivalent fees on CeloPoolTx) is used to compute the miner tip — no consensus-layer cache needed. Closes #152. Remaining TODOs (cannot complete on this branch): - Land ethereum-optimism/optimism#20382 upstream and cut a kona-client tag containing it. - Bump the kona-client tag in Cargo.toml from kona-client/v1.2.13 to the new tag. Until then this branch will REGRESS CIP-64 payload building: the pinned op-reth still calls effective_tip_per_gas after into_consensus(), which on a raw CeloTxEnvelope returns None for CIP-64 (FC-denominated max_fee vs. native base_fee) and panics on the upstream .expect(). DO NOT MERGE before the dep bump. - Optionally add a regression test that drives the payload builder with a CIP-64 pool tx so future op-reth bumps can't silently break this again.
Drives OpPayloadBuilderCtx::execute_best_transactions end-to-end with a single CIP-64 transaction whose fee-currency-denominated max_fee is numerically less than the native base_fee. Mock FeeCurrencyDirectory, Oracle, and ERC20 are deployed inline (1 FC = 10 native) so the FC base-fee check passes while CeloTxEnvelope::Cip64::max_fee_per_gas (FC units) is still below native base_fee. Status: FAILS on kona-client/v1.2.13 — the consensus-tx effective_tip_per_gas in op-reth's execute_best_transactions returns None and the .expect() panics at op-reth builder.rs:769. Will pass once ethereum-optimism/optimism#20382 is merged and the dep is bumped (the call moves before into_consensus(), reading the pool tx's native overrides). This file is throwaway: delete after the dep bump.
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.
Blocked: Waiting for ethereum-optimism/optimism#20382 to find its way into the next kona-client release.
Fixes #152