fix: use baseFee*2 for feeCap and distribute tx submissions across all clients#207
Merged
pk910 merged 2 commits intoethpandaops:masterfrom Mar 16, 2026
Conversation
…l clients Two bugs in submitTransaction caused alternating full/empty blocks: 1. Fee calculation: GetSuggestedFees used eth_gasPrice (baseFee + tipCap) as maxFeePerGas, providing zero headroom for baseFee increases. After a full block, baseFee rises 12.5% making ALL pending transactions underpriced — producing an empty block. BaseFee then drops, tx become valid, next block is overfull, and the cycle repeats. Fix: compute feeCap as baseFee*2 + tipCap using the pool's tracked baseFee (updated every block). The 2x multiplier survives ~6 consecutive full blocks of baseFee increases. Actual fee paid is still baseFee + tipCap — the higher feeCap just prevents underpricing. 2. Client distribution: redundant submissions (SubmitCount=3) always used SelectClientByIndex(i + ClientsStartOffset) where ClientsStartOffset was always 0. This sent every transaction's redundant copies to clients at index 1 and 2, giving those clients 100% of transactions while other clients received only ~12.5%. Fix: derive startOffset from tx hash bytes for both submitTransaction and rebroadcastTransaction, distributing submissions uniformly. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
pk910
approved these changes
Mar 16, 2026
4 tasks
qu0b
added a commit
to qu0b/spamoor
that referenced
this pull request
Mar 19, 2026
Restore original fee calculation as default (use provided fees or fetch from network via eth_gasPrice). Move the dynamic headroom + normal distribution fee calculation behind --fee-strategy adaptive flag. This collapses the fee changes from PR ethpandaops#207 and the dynamic headroom commit into a single opt-in strategy, keeping the client distribution fix from ethpandaops#207 untouched. Also fix EIP-1559 violation in adaptive mode where feeCap could be lower than tipCap due to normal distribution sampling. Configuration examples: # CLI (single scenario) spamoor eoatx --fee-strategy adaptive -h http://localhost:8545 # CLI (yaml multi-scenario) spamoor run config.yaml --fee-strategy adaptive # Daemon spamoor-daemon --fee-strategy adaptive -h http://localhost:8545 # Kurtosis (spamoor_params) spamoor_params: extra_args: - --fee-strategy=adaptive Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
5 tasks
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
Fee calculation fix:
GetSuggestedFeesusedeth_gasPrice(baseFee + tipCap) asmaxFeePerGas, giving zero headroom for baseFee increases. After a full block (+12.5% baseFee), ALL pending tx become underpriced → empty block → baseFee drops → tx valid → overfull block → repeat. Now usesbaseFee * 1.25 + tipCap— just enough to prevent the oscillation (survives 1 full block increase), but low enough that tx start becoming underpriced after 2 consecutive full blocks, preserving EIP-1559's self-regulating baseFee behavior when throughput exceeds the 50% gas target.Client distribution fix: Redundant submissions (
SubmitCount=3) always targeted clients at index 1 and 2 due toClientsStartOffsetdefaulting to 0 and never being set. Clients 1 & 2 received 100% of tx while others got ~12.5%. Now derives offset fromtx.Hash()for uniform distribution across all clients. Same fix applied torebroadcastTransaction.Test plan
go build ./...,go vet ./...— both passgo test ./...— all pass--base-feeflag that user-specified fees still override the new default🤖 Generated with Claude Code