op-devstack: replace faucet/funder with a prefunded EOA#21706
Draft
joshklop wants to merge 5 commits into
Draft
Conversation
Remove the op-faucet service wiring and the dsl.Faucet/dsl.Funder types from the acceptance-test devstack. Every sysgo runtime already prefunds a funder account at genesis (devkeys.UserKey(funderMnemonicIndex)); tests now hand out funds directly from a single prefunded *dsl.EOA per chain instead of relaying through a hosted faucet service. - dsl.EOA absorbs the funding helpers (NewFundedEOA/NewFundedEOAs, Fund, FundNoWait, FundAtLeast) via NewFundingEOA, with a mutex + locally-managed nonce (WithStaticNonce) for safe concurrent funding, replacing the faucet's txmgr-managed nonce. Adds EOA.AsFunder to rebind a funder to a specific EL. - sysgo exposes FunderKey and drops the faucet service (startFaucets, startFaucetsForRPCs, FaucetService fields). Genesis prefunding is unchanged. - presets build funder EOAs via a shared helper; FunderX fields are now *dsl.EOA and the FaucetX fields are removed. - stack.Faucet, the preset faucet frontend, and sources.FaucetClient are removed (no remaining consumers). Test call sites that used sys.FunderX.NewFundedEOA(...) are unchanged. The op-faucet package itself is removed in a follow-up commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
872b58c to
354d607
Compare
Follow-up to the faucet/funder removal. The previous commit kept the funding
helpers on dsl.EOA (behind a wallet + managed-nonce "glue" field) to minimize
test churn; move that responsibility into a dedicated dsl.FunderEOA so dsl.EOA
stays a plain primitive.
- Add dsl.FunderEOA{eoa, inner *SyncEOA, wallet}: NewFundedEOA/NewFundedEOAs,
Fund, FundAtLeast, AsFunder. Funding goes through a SyncEOA (txinclude.Includer)
which manages nonces, so many funding txs can be issued concurrently — e.g.
NewFundedEOAs, or several goroutines sharing one FunderEOA.
- Move SyncEOA from the loadtest package into dsl so FunderEOA can reuse it (and
to de-duplicate); loadtest and the osaka/fusaka spammers now use dsl.SyncEOA.
- Strip the funding glue (NewFundingEOA, fundingState, Fund*/NewFundedEOA*,
AsFunder) from dsl.EOA.
- presets and helpers now build/pass *dsl.FunderEOA; tx_producer shares one
FunderEOA across producer goroutines (safe under the shared includer).
sys.FunderX.NewFundedEOA(...) call sites are unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI fixes for the FunderEOA change: - txinclude Monitor: treat op-reth's "transaction indexing is in progress" (note the "is") as transient, alongside geth's "in progress" wording. Funding through FunderEOA/SyncEOA/Persistent was failing on op-reth when a receipt was requested during the indexing window, because the Monitor only matched geth's string and treated op-reth's as fatal. Adds a regression test. - FunderEOA.fund: assert the funding tx receipt is successful, so a reverted funding tx surfaces a clear error instead of a later WaitForBalance timeout. - gofmt: fix blank-line formatting in the sysgo files left over from removing the faucet service (deployer.go, multichain_supernode_runtime.go, singlechain_build.go). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…er-funding FunderEOA funded through txinclude's Persistent includer wrapped in a full reliable EL (Monitor + Resubmitter). After a funding tx was mined, the Resubmitter's next resubmit returned "nonce too low", which Persistent treats as "advance the nonce and re-send" — re-sending the value transfer and over-funding the recipient (observed: a single 0.1 ETH Fund delivering 2.7 ETH across 27 txs). The exact-equality WaitForBalance then never matched and timed out. It was timing-dependent (worse on slower L1 blocks vs the 1s poll cadence), which is why it surfaced in the interop fault-proof tests on L1 but not in faster L2 funds. Build the funder's includer with a Monitor (reliable receipt polling, including the op-reth "indexing is in progress" retry) but a plain sender and no resubmitter, mirroring loadtest's invalid-msg spammer. Each funding tx is sent exactly once, so funding amounts are exact while concurrent funding stays nonce-safe via the includer's nonce manager. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Removing the FaucetService field from the MultiChainRuntime literal left the remaining field group over-aligned; go-lint (goimports) flagged it. This file was missed by the earlier gofmt pass, which only checked uncommitted files. Verified all branch-changed Go files are goimports-clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Summary
Replaces the op-faucet service and the
dsl.Faucet/dsl.FunderDSL types with a single prefunded*dsl.EOAper chain in the acceptance-test devstack.Every sysgo runtime already prefunds a funder account at genesis (
devkeys.UserKey(funderMnemonicIndex)); the op-faucet service was just relaying from it. Since devstack is sysgo-only (each test gets its own devnet, so the cross-process funder races the hosted service guarded against no longer apply), tests can fund directly from that prefunded account. This removes a whole hosted-service layer (txmgr, RPC frontend,stack.Faucet,sources.FaucetClient) and a load-related flake source.Net: +243 / −561.
What changed
dsl.EOAbecomes the funder (op-devstack/dsl/eoa.go)NewFundingEOA(key, el, wallet)creates a prefunded funder EOA that owns the genesis-prefunded key and mints/funds child EOAs from the test's wallet.NewFundedEOA,NewFundedEOAs,Fund,FundNoWait,FundAtLeast) move ontoEOAwith identical signatures, backed by a mutex + locally-managed nonce (WithStaticNonce) so concurrent funding stays correct — this replaces the txmgr-managed nonce the faucet service provided.EOA.AsFunder(el)rebinds a funder to a specific EL node (sharing nonce state) for the few tests that fund via a non-default node.dsl/funder.goanddsl/faucet.godeleted.sysgo / presets / stack
sysgo.FunderKey(keys)exported; all faucet-service wiring removed (startFaucets,startFaucetsForRPCs,FaucetServicefields). Genesis prefunding unchanged.FunderXfields are now*dsl.EOA(built via a sharednewFunderEOAhelper);FaucetXfields removed. The ~142sys.FunderX.NewFundedEOA(...)call sites are unchanged.stack.Faucet, the preset faucet frontend, andop-service/sources/faucet_client.goremoved.The
op-faucet/package itself (and its Docker image) is untouched here and will be removed in a follow-up PR.Testing
go build ./...andgo vetpass across the module. Ran acceptance tests covering every distinct funding path:base/TestTransferNewFundedEOAcustom_gas_token/…ValueTransferPaysGasInTokeninterop/message/TestRandomDirectedGraphNewFundedEOAs(nonce safety)isthmus/operator_fee/TestOperatorFeeFund+FundAtLeast+NewFundedEOA(0)Notes
NewFundingEOA).🤖 Generated with Claude Code