Skip to content

Skip signature event building during Cosmos CheckTx/ReCheckTx#3230

Merged
amir-deris merged 3 commits intomainfrom
amir/plt-261-cosmos-skip-signature-event-building-during-CheckTx-ReCheckTx
Apr 14, 2026
Merged

Skip signature event building during Cosmos CheckTx/ReCheckTx#3230
amir-deris merged 3 commits intomainfrom
amir/plt-261-cosmos-skip-signature-event-building-during-CheckTx-ReCheckTx

Conversation

@amir-deris
Copy link
Copy Markdown
Contributor

@amir-deris amir-deris commented Apr 10, 2026

Summary

  • During CheckTx and ReCheckTx, CheckSignatures was unconditionally building signature events (account sequence formatting, SignatureDataToBz, base64 encoding) even though CosmosCheckTxAnte discards them with _.
  • Added a skipSigEvents guard so this work is skipped when ctx.IsCheckTx() || ctx.IsReCheckTx() — reducing allocations and CPU on the highest-frequency ante path.
  • CosmosDeliverTxAnte is unaffected: its context always has both flags false, so events are still built and emitted normally.

Result

In branch amir/PLT-218-analyze-app-performance, running 4 node cluster and doing sei-chain/loadtest for Cosmos Bank and Staking transaction types, and taking pprof CPU profiles at specific heights, we observe about 15% less CPU usage in CosmosCheckTxAnte.

@amir-deris amir-deris self-assigned this Apr 10, 2026
@amir-deris amir-deris changed the title Amir/plt 261 cosmos skip signature event building during check tx re check tx Skip signature event building during Cosmos CheckTx/ReCheckTx Apr 10, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 14, 2026, 3:01 PM

@github-actions
Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 10, 2026, 10:02 PM

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.96%. Comparing base (b378379) to head (e136599).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/ante/cosmos_checktx.go 75.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3230      +/-   ##
==========================================
- Coverage   59.24%   58.96%   -0.29%     
==========================================
  Files        2069     2065       -4     
  Lines      169659   168968     -691     
==========================================
- Hits       100519    99631     -888     
- Misses      60348    60606     +258     
+ Partials     8792     8731      -61     
Flag Coverage Δ
sei-chain-pr 48.15% <75.00%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
app/ante/cosmos_checktx.go 36.48% <75.00%> (+0.88%) ⬆️

... and 45 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.

@amir-deris amir-deris requested review from bdchatham and masih April 10, 2026 22:11
@amir-deris amir-deris enabled auto-merge April 10, 2026 22:35
@amir-deris amir-deris added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit ec0ec44 Apr 14, 2026
39 checks passed
@amir-deris amir-deris deleted the amir/plt-261-cosmos-skip-signature-event-building-during-CheckTx-ReCheckTx branch April 14, 2026 15:44
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.

3 participants