Skip to content

Refine review context on cosmos gasless tx - #3933

Merged
masih merged 1 commit into
mainfrom
masih/refine-review-context-re-association
Aug 17, 2026
Merged

Refine review context on cosmos gasless tx#3933
masih merged 1 commit into
mainfrom
masih/refine-review-context-re-association

Conversation

@masih

@masih masih commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Update context to avoid false positive AI review comment; see:

Update context to avoid false positive AI review comment.
@masih
masih marked this pull request as ready for review August 17, 2026 11:46
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only change to reviewer guidelines; no runtime or application code.

Overview
Extends REVIEW.md so automated reviewers stop flagging fee-less seid tx calls as broken.

The intro now mentions transaction processing alongside releases and upgrades. A new §3 explains that some Cosmos txs skip minimum-fee checks via IsTxGasless in ante (CheckAndChargeFees returns early on CheckTx/DeliverTx). It lists the gasless cases—first-time MsgAssociate (native-associate) and eligible MsgAggregateExchangeRateVote—and when missing --fees is still a real issue (non-gasless messages or gasless rules that no longer apply, e.g. re-association).

Reviewed by Cursor Bugbot for commit 1f39932. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 17, 2026, 11:47 AM

@alexander-sei
alexander-sei self-requested a review August 17, 2026 11:50

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread REVIEW.md
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread REVIEW.md
- 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@masih
masih merged commit f0faa48 into main Aug 17, 2026
45 of 52 checks passed
@masih
masih deleted the masih/refine-review-context-re-association branch August 17, 2026 11:52
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.49%. Comparing base (46671fb) to head (1f39932).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 96 files 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.

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.

3 participants