Skip to content

Optimize conflict-heavy EVM transfer execution#3405

Open
codchen wants to merge 1 commit into
mainfrom
tony/evm-transfer-optimizations
Open

Optimize conflict-heavy EVM transfer execution#3405
codchen wants to merge 1 commit into
mainfrom
tony/evm-transfer-optimizations

Conversation

@codchen
Copy link
Copy Markdown
Collaborator

@codchen codchen commented May 7, 2026

Summary

  • Reuses the preprocessed derived sender during EVM DeliverTx association to avoid repeating signature recovery work.
  • Reuses an empty cast auth account for EVM association when it is safe, preserving account number/sequence and avoiding extra account-number churn.
  • Skips direct-cast self migration when the cast address and derived Sei address are the same.
  • Detects large simple EVM transfer blocks that all target the same recipient and routes them through sequential execution instead of OCC retry churn. This applies to both the regular V2 path and the Giga path.

This is split out from #3376 so the behavior changes can be reviewed separately from logging and stress tooling.

Test Plan

  • go test ./app ./utils/helpers ./app/ante ./x/evm/ante ./x/evm/types

Note

Medium Risk
Changes EVM DeliverTx signature/association flow, account mapping/migration behavior, and block execution routing between OCC and sequential paths; mistakes here could affect transaction validity, nonce/account state, or block processing performance.

Overview
Improves EVM tx processing in conflict-heavy scenarios by reusing already-computed msg.Derived sender data during DeliverTx, avoiding repeated signature recovery and adding explicit invalid-pubkey rejection.

Adjusts address association to reuse an existing empty “cast” auth account (preserving account number/sequence) when safe, and skips balance migration when the cast address and Sei address are identical.

Adds a heuristic to detect large blocks (>=64) of simple EVM value transfers to a single recipient and forces sequential execution for those blocks (including disabling Giga OCC in that case) to avoid OCC retry churn.

Reviewed by Cursor Bugbot for commit 0203fa4. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 11, 2026, 3:20 AM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 57.50000% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.24%. Comparing base (0543e0e) to head (0203fa4).

Files with missing lines Patch % Lines
app/app.go 50.00% 9 Missing and 2 partials ⚠️
app/ante/evm_delivertx.go 45.45% 3 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3405      +/-   ##
==========================================
- Coverage   59.24%   59.24%   -0.01%     
==========================================
  Files        2110     2110              
  Lines      174149   174188      +39     
==========================================
+ Hits       103175   103197      +22     
- Misses      62041    62053      +12     
- Partials     8933     8938       +5     
Flag Coverage Δ
sei-chain-pr 49.01% <57.50%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
utils/helpers/associate.go 72.72% <100.00%> (+7.34%) ⬆️
app/ante/evm_delivertx.go 67.74% <45.45%> (-4.81%) ⬇️
app/app.go 69.39% <50.00%> (-0.30%) ⬇️
🚀 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.

@codchen codchen force-pushed the tony/evm-transfer-optimizations branch from 7623f7b to 0203fa4 Compare May 11, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant