Skip to content

Backport release/v6.5: Fix pre-v6.5 debug trace tx decoding#3478

Merged
Kbhat1 merged 1 commit into
release/v6.5from
backport-3470-to-release/v6.5
May 21, 2026
Merged

Backport release/v6.5: Fix pre-v6.5 debug trace tx decoding#3478
Kbhat1 merged 1 commit into
release/v6.5from
backport-3470-to-release/v6.5

Conversation

@seidroid
Copy link
Copy Markdown

@seidroid seidroid Bot commented May 20, 2026

Backport of #3470 to release/v6.5.

@seidroid seidroid Bot added the backport label May 20, 2026
@seidroid
Copy link
Copy Markdown
Author

seidroid Bot commented May 20, 2026

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-3470-to-release/v6.5
git worktree add --checkout .worktree/backport-3470-to-release/v6.5 backport-3470-to-release/v6.5
cd .worktree/backport-3470-to-release/v6.5
git reset --hard HEAD^
git cherry-pick -x 5098e5b0e902f51d8966003f33aaa440fde9b0d5
git push --force-with-lease

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 20, 2026, 9:41 PM

- Add a trace-only pre-v6.5 tx decoder that skips the new TxBody bloat
check
- Use it when replaying historical debug_trace* blocks so old Cosmos tx
bytes don’t break tracing
- Add a regression test for an old tx with explicit memo=""; pre-v6.5
trace works, v6.5+ stays strict

- Unit tests
- Verifying on node

(cherry picked from commit 5098e5b)
@Kbhat1 Kbhat1 force-pushed the backport-3470-to-release/v6.5 branch from ae4234d to 01d737e Compare May 20, 2026 21:40
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.32%. Comparing base (fbc0d93) to head (01d737e).

Files with missing lines Patch % Lines
evmrpc/trace_tx_decoder.go 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##           release/v6.5    #3478   +/-   ##
=============================================
  Coverage         58.31%   58.32%           
=============================================
  Files              2093     2094    +1     
  Lines            173231   173261   +30     
=============================================
+ Hits             101018   101050   +32     
+ Misses            63148    63147    -1     
+ Partials           9065     9064    -1     
Flag Coverage Δ
sei-chain-pr 64.17% <94.59%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
evmrpc/simulate.go 72.81% <100.00%> (+0.73%) ⬆️
sei-cosmos/x/auth/tx/config.go 93.10% <100.00%> (+0.51%) ⬆️
sei-cosmos/x/auth/tx/decoder.go 88.34% <100.00%> (+0.59%) ⬆️
sei-cosmos/x/upgrade/keeper/keeper.go 92.79% <100.00%> (+0.09%) ⬆️
evmrpc/trace_tx_decoder.go 87.50% <87.50%> (ø)

... and 1 file 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.

@Kbhat1 Kbhat1 marked this pull request as ready for review May 20, 2026 23:36
@cursor
Copy link
Copy Markdown

cursor Bot commented May 20, 2026

PR Summary

Medium Risk
Changes transaction decoding behavior in evmrpc tracing/simulation paths based on upgrade height; incorrect height detection or decoder selection could break tracing or cause unexpected decode failures for some blocks. Core mempool/DeliverTx decoding remains strict, limiting impact.

Overview
Fixes debug_trace*/block replay failures on pre-v6.5 historical Cosmos SDK transactions by conditionally using a compatibility tx decoder that does not reject protobuf body “bloat” introduced by the v6.5 canonical-size check.

Adds UpgradeKeeper.IsUpgradeActiveAtHeight and exposes TxConfig.ProtoCodec() so evmrpc can select the strict vs compat decoder per block height; updates Backend transaction decoding in GetTransaction, BlockByNumber, StateAtTransaction, and replay logic accordingly. Includes new unit tests covering the compat decoder behavior and ensuring strict decoding still rejects bloated bodies at/after v6.5.

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

@Kbhat1 Kbhat1 merged commit 16a7664 into release/v6.5 May 21, 2026
39 of 40 checks passed
@Kbhat1 Kbhat1 deleted the backport-3470-to-release/v6.5 branch May 21, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants