Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

fix: patch CheckTx handler for MEVCheckTxHandler #592

Closed

Conversation

crnbarr93
Copy link

These changes fix an issue with the CheckTx function in the MEVCheckTxHandler struct. In the recovery handler for the function the error log was being assigned to err before being returned as an actual error value rather than a request response as expected.

This was causing the CListMempool handler for CheckTx in CometBFT to panic here, which when called from Reactor via a gossiped transaction would cause the entire node to panic.

This produced the following panic as an example:

Jan 28 21:09:12 osmosisd[1890649]: 9:09PM ERR panic in check tx handler err="Block (unix) time must never be empty or negative " module=server
Jan 28 21:09:12 osmosisd[1890649]: panic: CheckTx request for tx [3 239 186 250 113 194 109 146 101 179 30 66 199 179 85 138 170 18 218 138 135 64 46 171 203 233 51 254 186 47 85 186] failed: panic in check tx handler: Block (unix) time must never be empty or negative
Jan 28 21:09:12 osmosisd[1890649]: goroutine 400 [running]:
Jan 28 21:09:12 osmosisd[1890649]: github.com/cometbft/cometbft/mempool.(*CListMempool).CheckTx(0xc001da6a80, {0xc132950000, 0x5e5, 0x5e5}, 0x0, {0x0?, {0xc24dcbf1d0?, 0x0?}})

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (release/v2.x.x@1ea62f3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
abci/checktx/mev_check_tx.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/v2.x.x     #592   +/-   ##
=================================================
  Coverage                  ?   45.40%           
=================================================
  Files                     ?       62           
  Lines                     ?     3625           
  Branches                  ?        0           
=================================================
  Hits                      ?     1646           
  Misses                    ?     1841           
  Partials                  ?      138           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crnbarr93 crnbarr93 closed this Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant