Skip to content

perf(evmonly): pipeline Autobahn execution for 5,000-tx blocks - #4087

Draft
codchen wants to merge 2 commits into
mainfrom
codex/evmonly-autobahn-throughput
Draft

perf(evmonly): pipeline Autobahn execution for 5,000-tx blocks#4087
codchen wants to merge 2 commits into
mainfrom
codex/evmonly-autobahn-throughput

Conversation

@codchen

@codchen codchen commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes and provide context

This draft improves the Autobahn EVM-only path for saturated native-transfer workloads:

  • raise the protocol and RPC limits from 2,000 to 5,000 transactions per block
  • add optional ABCI prepared-block support so transaction decoding and sender recovery can run ahead of ordered finalization
  • pipeline prepared blocks in the Giga router while preserving ordered state transitions
  • reduce finalization allocations by hashing native state changes directly and using contiguous ABCI transaction results
  • reuse CheckTx transaction decoding and sender recovery through a bounded, 64-shard cache keyed by the exact raw transaction hash
  • move initial EVM nonce reads outside the producer serialized admission lock and revalidate mempool progress before reserving the nonce
  • fast-path conflict-free OCC validation and merge without materializing intermediate Block-STM prefix state
  • expose localnode tuning for the EVM-only in-memory app and document the load-test setup

AWS E2E results

The latest AWS-tested commit was deployed without Docker to four independent c8i.48xlarge validator instances, with a fifth c8i.48xlarge host running sei-load. Each validator runs seid directly under systemd. All validators converged to the same execution height and transaction count.

  • 240k offered TPS was the best saturation point; 480k overloaded RPC admission and reduced throughput.
  • The bounded-memory PR configuration (GOMAXPROCS=24, GOGC=200) admitted 73.0k TPS and converged at 72.7k executed TPS.
  • With GC disabled for a one-minute ceiling test, the best run admitted 108.8k TPS and converged at 108.4k executed TPS, but retained roughly 155 GiB per validator and is not deployable.
  • 12 Go CPUs reached 93.1k TPS; 24 reached 108.8k TPS; 48 reached 103.1k TPS. More compute did not help.
  • A zero-fee experiment reached 106.7k TPS and did not improve the result; it was reverted.
  • Expanding the prepared-transaction cache reduced sender-recovery CPU but did not improve TPS; it was reverted.

At saturation, received blocks accumulated ahead of ordered execution (height 1,303 received versus 1,236 executed at the end of one run). The best result is about 46.1 ms per 5,000-transaction block. Reaching 200k TPS requires this ordered path to remain below 25 ms per block.

An exact current-revision standalone run on an identical c8i.48xlarge sustained roughly 115-118k full ordered-execution TPS with zero OCC reruns. It did not reproduce a >200k full-execution result; higher standalone figures came from a different configuration or metric, such as preparation or speculative throughput.

Profiling attributed roughly 14 ms per block to ordered OCC validation, 14 ms to merge, and 6 ms to memory-store commit. Commit cca7589ab adds a conflict-free validation and merge fast path. A warmed local standalone A/B improved from 203.8k to 213.4k TPS; a 10% paired-recipient-conflict workload was 1.6% slower and retained identical results through the existing rerun path. AWS validation of this commit is pending because the AWS session token expired.

The remaining useful optimization target is per-transaction allocation and ordered validation/merge/commit work, not additional EC2 compute.

Testing performed to validate your change

  • go test ./giga/... -count=1
  • go test -race ./giga/evmonly -count=1
  • go test ./sei-tendermint/internal/p2p -count=1
  • go test ./sei-tendermint/internal/autobahn/producer -count=1
  • focused race tests for EVM-only finalization and concurrent nonce admission
  • golangci-lint run ./giga/evmonly ./sei-tendermint/internal/p2p ./sei-tendermint/internal/autobahn/producer
  • golangci-lint fmt --diff
  • git diff --check
  • go test ./giga/evmonly -run "^$" -bench "^BenchmarkPrepareTransferBlock$" -benchtime=3x -count=1
  • saturated multi-host AWS E2E runs with 160k, 240k, and 480k offered TPS
  • standalone 2M-transaction ordered-executor runs with 12, 24, and 48 OCC workers
  • conflict-free and 10% paired-recipient-conflict standalone A/B runs

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 3, 2026, 5:19 AM

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.12281% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.27%. Comparing base (7273a43) to head (cca7589).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
giga/evmonly/occ.go 72.34% 15 Missing and 11 partials ⚠️
...ei-tendermint/internal/p2p/evmonly_inmemory_app.go 77.06% 18 Missing and 7 partials ⚠️
sei-tendermint/internal/p2p/giga_router_common.go 59.64% 14 Missing and 9 partials ⚠️
...i-tendermint/internal/autobahn/producer/mempool.go 82.60% 6 Missing and 6 partials ⚠️
...ndermint/internal/p2p/evmonly_prepared_tx_cache.go 72.41% 6 Missing and 2 partials ⚠️
sei-tendermint/internal/proxy/proxy.go 33.33% 8 Missing ⚠️
...dermint/internal/autobahn/pb/autobahn.wireguard.go 20.00% 4 Missing ⚠️
sei-tendermint/internal/rpc/core/mempool.go 0.00% 4 Missing ⚠️
giga/evmonly/parser.go 81.81% 1 Missing and 1 partial ⚠️
giga/evmonly/rpc/server.go 66.66% 1 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4087      +/-   ##
==========================================
- Coverage   61.30%   60.27%   -1.04%     
==========================================
  Files        2178     2071     -107     
  Lines      190788   178596   -12192     
==========================================
- Hits       116968   107640    -9328     
+ Misses      62796    60951    -1845     
+ Partials    11024    10005    -1019     
Flag Coverage Δ
sei-chain-pr 74.62% <74.12%> (?)
sei-db 69.80% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
giga/evmonly/executor.go 87.13% <100.00%> (+0.19%) ⬆️
giga/evmonly/giga_store.go 92.30% <100.00%> (+1.61%) ⬆️
giga/evmonly/memory_store.go 81.84% <100.00%> (+0.77%) ⬆️
giga/evmonly/types.go 81.81% <ø> (ø)
sei-tendermint/abci/types/application.go 47.05% <ø> (ø)
sei-tendermint/autobahn/types/block.go 82.25% <ø> (ø)
...i-tendermint/internal/p2p/giga/pb/api.wireguard.go 100.00% <100.00%> (ø)
sei-tendermint/internal/p2p/giga_router.go 100.00% <ø> (ø)
giga/evmonly/parser.go 93.10% <81.81%> (-2.90%) ⬇️
giga/evmonly/rpc/server.go 32.20% <66.66%> (+1.16%) ⬆️
... and 10 more

... and 108 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant