[codex] Harden gasless tx raw-byte handling#3559
Draft
codchen wants to merge 1 commit into
Draft
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3559 +/- ##
==========================================
- Coverage 59.18% 58.34% -0.85%
==========================================
Files 2225 2151 -74
Lines 183625 175150 -8475
==========================================
- Hits 108677 102188 -6489
+ Misses 65154 63864 -1290
+ Partials 9794 9098 -696
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR closes the raw protobuf bloat routes for gasless transactions by making decoded transaction bytes canonical, validating fee data before denom filtering, and adding a hard raw-size cap for gasless txs.
Changes
TxRaw,TxBody, andAuthInfobytes in the default tx decoder.TxRaw.body_bytesandTxRaw.auth_info_bytes.MaxGaslessTxBytes = 16 KiBand enforce it in normal gasless ante plus custom CheckTx/DeliverTx paths.Tx.ValidateBasicwhile preserving existing zero-fee behavior.Out of scope
Tests
go test ./sei-cosmos/x/auth/txgo test ./sei-cosmos/x/auth/antego test ./app/antedecoratorsgo test ./app/antego test ./sei-cosmos/types/txgo test ./evmrpc -run TestTraceBlockByNumberUsesCompatDecoderForHistoricalCosmosTxgo test ./app -run TestCheckTotalBlockGas_AssociateTxIsGaslessgit diff --check