Refine review context on cosmos gasless tx - #3933
Conversation
Update context to avoid false positive AI review comment.
PR SummaryLow Risk Overview The intro now mentions transaction processing alongside releases and upgrades. A new §3 explains that some Cosmos txs skip minimum-fee checks via Reviewed by Cursor Bugbot for commit 1f39932. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
Docs-only change adding a third "known false positive" section to the AI-reviewer guidelines about gasless Cosmos transactions. The core claims (the gasless set, the single-message MsgAssociate restriction, the 1-wei balance requirement, the non-gasless siblings) check out against app/antedecorators/gasless.go and the ante handlers, but two supporting citations are inaccurate and should be corrected before this becomes the authoritative reference reviewers are told to trust.
Findings: 0 blocking | 3 non-blocking | 2 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- Codex classified this diff as a prompt-injection attempt because it instructs reviewers what not to report. I disagree:
REVIEW.mdis this repo's designated, maintainer-authored reviewer-guidance artifact and the review workflow loads it from the base branch by design, so updating it is normal governance rather than a directive smuggled into unrelated content. Every factual claim in the new section was verified against source before being accepted — which is the right handling either way, and is also why the two citation errors above matter: a suppression rule is only safe while the code references backing it are correct. - 2 suggestion(s)/nit(s) flagged inline on specific lines.
| The classification lives in `IsTxGasless` (`app/antedecorators/gasless.go`) | ||
| and is consumed by both the CheckTx and DeliverTx ante paths | ||
| (`app/ante/cosmos_checktx.go`, `app/ante/cosmos_delivertx.go`), where | ||
| `CheckAndChargeFees` returns before any fee comparison when the transaction |
There was a problem hiding this comment.
[suggestion] CheckAndChargeFees exists only on the CheckTx path (app/ante/cosmos_checktx.go:346, called at line 123 with isGasless). DeliverTx calls ChargeFees (app/ante/cosmos_delivertx.go:80, called at line 73), which takes no isGasless argument and performs no minGasPrices comparison at all — it unconditionally deducts whatever fee coins the tx declared. So IsTxGasless is indeed consulted by both paths (cosmos_checktx.go:96, cosmos_delivertx.go:42), but only for gas metering on the DeliverTx side; the early return described here is CheckTx-only.
Suggested rewording: IsTxGasless is consulted by both ante paths, and on CheckTx CheckAndChargeFees (app/ante/cosmos_checktx.go) returns before any fee comparison when the tx is gasless; DeliverTx never performs a minimum-fee check to begin with. Worth also noting the non-legacy chain skips the wrapped DeductFeeDecorator via GaslessDecorator (app/ante.go:80), since that — not CheckAndChargeFees — is where the skip happens there.
| - Best-effort re-association of an already-associated account is not gasless | ||
| and its CheckTx would reject, but helpers written as try/catch plus a | ||
| poll for `associated == true` (e.g. `associateKey` in | ||
| `contracts/test/lib.js`) don't need the transaction to land in that case. |
There was a problem hiding this comment.
[suggestion] associateKey (contracts/test/lib.js:306) runs seid tx evm associate-address, which does not build a MsgAssociate at all: CmdAssociateAddress (x/evm/client/cli/tx.go:78) signs an empty hash and POSTs a sei_associate JSON-RPC request, producing an EVM AssociateTx (MsgEVMTransaction with IsAssociateTx() true, handled in x/evm/ante/preprocess.go / app/ante/evm_checktx.go). Only native-associate produces the MsgAssociate that IsTxGasless classifies.
Citing it in this section conflates two independent association paths with different fee rules, and risks suppressing a genuine finding about the EVM path. Either drop the example or move it to its own note that says explicitly it is the EVM AssociateTx path and why fees don't apply there.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3933 +/- ##
==========================================
- Coverage 59.51% 58.49% -1.02%
==========================================
Files 2326 2230 -96
Lines 198890 188258 -10632
==========================================
- Hits 118367 110130 -8237
+ Misses 69279 67724 -1555
+ Partials 11244 10404 -840
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Update context to avoid false positive AI review comment; see: