Skip to content

Use legacy transaction decoder for historical height#2234

Merged
codchen merged 2 commits intomainfrom
tony/rpc-fix-10
Jul 24, 2025
Merged

Use legacy transaction decoder for historical height#2234
codchen merged 2 commits intomainfrom
tony/rpc-fix-10

Conversation

@codchen
Copy link
Copy Markdown
Collaborator

@codchen codchen commented Jul 14, 2025

Describe your changes and provide context

In upgrade v6.0.6, we added a limit on how many recursions the transaction decoder can go through to prevent certain type of attacks. However this made historical blocks with transactions that were encoded with higher number of recursions unable to decode, so we reintroduced the old decoder only for usage on historical queries.

Testing performed to validate your change

unit tests

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 14, 2025

Codecov Report

Attention: Patch coverage is 85.98131% with 15 lines in your changes missing coverage. Please review.

Project coverage is 60.09%. Comparing base (b16814c) to head (34bf366).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
app/app.go 7.69% 12 Missing ⚠️
evmrpc/association.go 60.00% 2 Missing ⚠️
evmrpc/simulate.go 92.85% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2234      +/-   ##
==========================================
- Coverage   60.12%   60.09%   -0.04%     
==========================================
  Files         309      309              
  Lines       29995    30026      +31     
==========================================
+ Hits        18035    18043       +8     
- Misses      10685    10704      +19     
- Partials     1275     1279       +4     
Files with missing lines Coverage Δ
app/encoding.go 100.00% <100.00%> (ø)
app/upgrades.go 29.41% <ø> (ø)
evmrpc/block.go 74.11% <100.00%> (ø)
evmrpc/filter.go 73.79% <100.00%> (ø)
evmrpc/info.go 69.26% <100.00%> (ø)
evmrpc/net.go 33.33% <100.00%> (ø)
evmrpc/send.go 42.85% <100.00%> (ø)
evmrpc/server.go 87.20% <100.00%> (ø)
evmrpc/tests/utils.go 66.06% <100.00%> (-0.21%) ⬇️
evmrpc/tracers.go 39.82% <100.00%> (ø)
... and 5 more

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

app/app.go Outdated
return app.encodingConfig.TxConfig
}
// use current for post v6.0.6 heights
if height >= 175827094 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did we get this height from? When I spot checked explorer info for the upgrade proposals, it says v6.1.0 (the upgrade following v6.0.6) was height 153_240_070 https://sei.explorers.guru/proposal/102

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated - I pasted the wrong height. We want it to be v6.0.6's upgrade height

app/app.go Outdated
return app.encodingConfig.TxConfig
}
// use current for post v6.0.6 heights
if height >= 151573570 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - can we name this int v6.0.6UpgradeHeight

@codchen codchen enabled auto-merge (squash) July 24, 2025 03:50
@codchen codchen merged commit d060134 into main Jul 24, 2025
61 of 63 checks passed
@codchen codchen deleted the tony/rpc-fix-10 branch July 24, 2025 03:59
yzang2019 added a commit that referenced this pull request Jul 24, 2025
* main:
  Optimization: CreateAccount only clears state if code hash exists (#2255)
  chore: bump btcec to v2.3.2, x/crypto to v0.31.0 (#2238)
  Use legacy transaction decoder for historical height (#2234)
  Make flushing receipt synchronous (#2250)
  [SEI-9824][SEI-9825] Update oracle MidBlock logic (#2251)
  Fix data race in price-feeder websocket controller (#2256)
  Add tests for price feeder providers (#2253)
  remove arm64 target from CI due to slow running (#2254)
  Harden solo precompile (#2236)
  Add CODEOWNERS (#2237)
  Require MsgClaim sender to match signer (#2232)
  Remove writeset estimation to alleviate AccAddress mutex contention (#2239)
philipsu522 pushed a commit that referenced this pull request Jul 25, 2025
* Use legacy tx decoder when appropriate

* bump
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.

4 participants