Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(v2.10) missing tx encoder #291

Merged
merged 1 commit into from Mar 22, 2024
Merged

Conversation

javiersuweijie
Copy link
Member

@javiersuweijie javiersuweijie commented Mar 22, 2024

In the logs that validators submit, there was an error whenever the validator proposes the block.

ERR panic recovered in PrepareProposal height=9446424 module=server panic="runtime error: invalid memory address or nil pointer dereference

This is caused by a nil txEncoder.

https://github.com/terra-money/cosmos-sdk/blob/c27c7fcc5cf76253a2cbeba2270736ae432d1478/baseapp/baseapp.go#L882

It panics and gets caught in the abci.go

https://github.com/terra-money/cosmos-sdk/blob/c27c7fcc5cf76253a2cbeba2270736ae432d1478/baseapp/abci.go#L279-L290

And returns the proposal without actually running through the antehandlers for tx validation. Therefore, when preparing a proposal, the txs in it are never actually checked and if any of the transactions fail in ProcessProposal, the proposal is invalid and rejected.

If the same set of invalid transactions are included in the block proposed by most of the validators, the chain halts.

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.46%. Comparing base (1e81e02) to head (41c2ca6).
Report is 1 commits behind head on release/v2.10.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release/v2.10     #291      +/-   ##
=================================================
+ Coverage          70.45%   70.46%   +0.01%     
=================================================
  Files                 45       45              
  Lines               2095     2096       +1     
=================================================
+ Hits                1476     1477       +1     
  Misses               452      452              
  Partials             167      167              
Files Coverage Δ
app/app.go 74.70% <100.00%> (+0.14%) ⬆️

@javiersuweijie javiersuweijie changed the title Fix/v2.10/missing tx encoder fix(v2.10: missing tx encoder Mar 22, 2024
@javiersuweijie javiersuweijie changed the title fix(v2.10: missing tx encoder fix(v2.10) missing tx encoder Mar 22, 2024
@gregnuj gregnuj merged commit fc9d68e into release/v2.10 Mar 22, 2024
8 checks passed
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.

None yet

3 participants