refactor(cketh): rename EthTransactions to WithdrawalTransactions and hide its fields - #11177
Queued
gregorydemay wants to merge 1 commit into
Queued
refactor(cketh): rename EthTransactions to WithdrawalTransactions and hide its fields#11177gregorydemay wants to merge 1 commit into
gregorydemay wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the ckETH minter’s Ethereum transaction tracking by separating “send/nonce state machine” concerns from withdrawal reimbursement bookkeeping, preparing the codebase for supporting multiple independent transaction lanes (e.g., a sweeper address) without inheriting refund logic.
Changes:
- Split the original
EthTransactionsinto a privateTransactionLane(send machinery) plus a newEthTransactionswrapper that owns a lane and reimbursement state, forwarding the lane API to keep callers stable. - Centralized the “arm reimbursement on create / disarm on finalize” invariant in the wrapper (
record_created_transaction/record_finalized_transaction). - Moved state-equivalence fixture logic into the transactions test module and adjusted tests to account for the new
laneencapsulation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rs/ethereum/cketh/minter/src/state/transactions/mod.rs | Introduces TransactionLane and reworks EthTransactions into a wrapper that couples lane finalization with reimbursement tracking. |
| rs/ethereum/cketh/minter/src/state/transactions/tests.rs | Updates unit tests for the new lane field and adds a shared fixture for state-equivalence tests. |
| rs/ethereum/cketh/minter/src/state/tests.rs | Switches state-equivalence test setup to reuse the fixture now hosted under state::transactions::tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
gregorydemay
force-pushed
the
greg/cketh-lane-tidy
branch
6 times, most recently
from
August 18, 2026 12:50
dceea28 to
f134d3d
Compare
gregorydemay
force-pushed
the
greg/cketh-lane-tidy
branch
from
August 18, 2026 13:40
f134d3d to
84be123
Compare
gregorydemay
marked this pull request as ready for review
August 18, 2026 13:44
|
✅ No security or compliance issues detected. Reviewed everything up to 8d4bc99. Security Overview
Detected Code Changes
|
The nine fields were `pub(in crate::state)`, but no production code ever read one. The visibility existed solely so `state::tests` could assemble a populated value and vary one field at a time to exercise `is_equivalent_to`. A builder in `transactions::tests` covers that without exposing the fields. It does nothing but collect them, so what a test builds is still spelled out at the test — and since varying a field is what the test is for, each case clones the builder and changes only the field it is probing, rather than restating the other eight. `state_equivalence` keeps every assertion it had, in place. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gregorydemay
force-pushed
the
greg/cketh-lane-tidy
branch
from
August 18, 2026 14:03
84be123 to
8d4bc99
Compare
mbjorkqvist
approved these changes
Aug 18, 2026
gregorydemay
added this pull request to the merge queue
Aug 19, 2026
Any commits made after this event will not be merged.
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.
Part of DEFI-2917 (deposit-from-CEX), the first of a stack preparing the minter to send Ethereum transactions from a second address. Pure refactoring: no behaviour change, and no test loses or gains coverage.
Wide but shallow — a rename across twelve files plus one genuine change. The substantive work sits in the PRs above.
What
EthTransactionstoWithdrawalTransactions. The name has to give way: a second sender address is coming, and its transactions are equally "Eth transactions". What distinguishes this one is that it carries user withdrawals.state::testscould assemble a populated value and vary one field at a time to exerciseis_equivalent_to. A builder intransactions::testscovers that without exposing the fields. It does nothing but collect them, so what a test builds is still spelled out at the test; and since varying a field is what the test is for, each case clones the builder and changes only the field it is probing rather than restating the other eight:state_equivalencekeeps every assertion it had, in place.Note on visibility
transactions::testsispub(in crate::state)sostate::testscan name the builder. A plain associated function would not need that — method resolution does not go through the module path — but a builder is a type, and types need a reachable path. The fields themselves stay private, which is the point of the change.Stack created with GitHub Stacks CLI • Give Feedback 💬