Optimize conflict-heavy EVM transfer block execution#3376
Open
Optimize conflict-heavy EVM transfer block execution#3376
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3376 +/- ##
==========================================
- Coverage 59.10% 59.07% -0.03%
==========================================
Files 2101 2102 +1
Lines 173162 173337 +175
==========================================
+ Hits 102344 102402 +58
- Misses 61943 62053 +110
- Partials 8875 8882 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
philipsu522
approved these changes
May 4, 2026
philipsu522
approved these changes
May 4, 2026
ee0266f to
bbf1182
Compare
arajasek
approved these changes
May 5, 2026
- Track per-key conflict counts in OCC scheduler (both sei-cosmos and giga variants); emit a single aggregated log line per block when conflicts occur, showing which store keys were hot - Add ValidateTransactionStateWithKeys to MultiVersionStore interface so conflicting key strings are surfaced alongside conflict indices without breaking existing ValidateTransactionState callers - Add per-section latency logging to x/evm/keeper EndBlock covering tx-hash removal, receipt migration, storage pruning, base fee adjustment, coinbase resolution, deferred info fetch, deferred info processing, surplus distribution, and bloom computation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Log per-block execution-only time (ProcessProposal + FinalizeBlock + Commit) in BaseApp as "execution block time" to complement the block-time monitor in the stress test. Also add the evm_stress.sh script and Go load tester that spins up a local seid node and hammers it with 500 TPS of EVM transfers from rotating fresh accounts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the per-section EndBlock latency instrumentation from x/evm/keeper/abci.go. For the OCC scheduler key conflict log, encode each key as hex before printing so raw store bytes are readable, except for "globalAccountNumber" which is kept as a plain string. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Drop the block-time and TPS console output from the stress tester since those numbers now come from the node logs. Add block_txs to the "execution block time" log line in BaseApp so each block's tx count is visible alongside the timing breakdown. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Always abort optimistic processing immediately so blocks are only ever executed in FinalizeBlock. The completion signal is still sent so FinalizeBlocker does not stall on <-completion. This eliminates the duplicate OCC and execution-block-time log lines that came from the same block being executed twice. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restore the optimistic ProcessBlock goroutine in ProcessProposalHandler (reverts "disable optimistic execution in ProcessProposal"). Fix duplicate log lines in evm_stress.sh: tail -F re-opens the log file by name when it is truncated by a new run, causing stale tail processes from prior runs to re-emit every line. Add a pre-flight pkill to kill lingering watchers, and switch to process-group kill in cleanup so tail and grep children are reliably terminated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
In findConflicts, capture the StoreKey when iterating multiVersionStores and prefix each conflict key as "storeName/rawKey" before accumulating into conflictKeyCounts. In the ProcessAll encoding loop, split on the first "/" to separate the store name from the raw key, then hex-encode only the raw key (keeping "globalAccountNumber" as plain text). Applied to both sei-cosmos/tasks and giga/deps/tasks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the live-funding pipeline with a genesis-based approach: - Generate 50k deterministic sender accounts and bulk-patch genesis.json via an inline Python script (same technique as populate_genesis_accounts.py) before starting seid — no funding transactions sent to the chain. - Each worker pops a fresh key from a pre-filled closed channel and sends exactly one tx (nonce=0), guaranteeing every tx has a distinct sender. - Rate control via a shared time.Ticker at targetTPS Hz across all workers. - Add -dump-sei-addrs flag to main.go for bech32 address generation (uses sei-cosmos/types/bech32 directly, no subprocess calls). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8d84746 to
9a4abc1
Compare
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
sei-cosmos/tasks/scheduler.goandgiga/deps/tasks/scheduler.go, including the store key names and aggregate conflict counts per block.x/evmEndBlocklatency logs for the major sections of end-block processing, plus a total wall-time log.Stress Results
1.5s-3.3sunder OCC, with conflicts onacc/globalAccountNumberand the shared recipient bank keys.0.30s-0.35stotal execution time for ~1k tx blocks, with the conflict-heavy transfer shape avoiding OCC retry churn.Test Plan
go test ./app ./utils/helpers ./app/ante ./x/evm/ante ./x/evm/types./scripts/evm_stress.shlocally and confirmed large same-recipient transfer blocks execute around300ms-350msEndBlocklatency logs are emitted for the intended paths