Repository navigation
fix(logging): demote per-mint bank log to Debug (mock_balances top-off spam) - #3729
Conversation
…ff spam Every mock_balances account top-off logs "minted coins from module account" at Info, once per funded sender — on a seiload chain that is a log line per fresh account. The mock path used to suppress this with a ctx NopLogger, but the package-level slog migration (#3050) removed ctx-scoped loggers, silently re-enabling the spam. Demote the bank keepers' per-mint Info log to Debug in both copies (sei-cosmos/x/bank, giga/deps/xbank). Block-mint visibility is unaffected: x/mint already logs "Minted coins" at Info per release. Also drop the now-stale NopLogger comment and dead ctx alias in the mock_balances top-off. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR SummaryLow Risk Overview In In both Reviewed by Cursor Bugbot for commit 4d857cb. 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.
A small, low-risk logging change: demotes the bank keeper's per-mint "minted coins from module account" log from Info to Debug in both copies, and removes a now-stale NopLogger comment plus a dead ctx := s.ctx alias in both mock_balances.go top-off paths. No correctness, security, or performance concerns found.
Findings: 0 blocking | 2 non-blocking | 0 posted inline
Blockers
- None at the file/PR level.
Non-blocking
- Cursor's second-opinion review file (cursor-review.md) was empty — that pass produced no output. Codex reported no material findings.
- Both the sei-cosmos and giga/deps copies of the bank keeper, and both mock_balances.go copies, were kept in sync — good. The change is a duplication-prone edit across vendored trees; worth double-checking no third copy of this log line exists that should also be demoted for consistency.
There was a problem hiding this comment.
Straightforward log-level demotion and dead-code cleanup — production behavior unchanged.
Extended reasoning...
Overview
This PR demotes the per-mint minted coins from module account log from Info to Debug in both bank keeper copies (sei-cosmos/x/bank/keeper/keeper.go, giga/deps/xbank/keeper/keeper.go), and removes a stale (use NopLogger to suppress log spam) comment plus the now-dead ctx := s.ctx local alias in both mock_balances.go top-off paths. The event emission (NewCoinMintEvent) is unchanged.
Security risks
None. This is a logging verbosity change plus dead-variable cleanup — no auth, crypto, permissions, or state-transition logic is touched. The mint-event emission that downstream indexers/consumers rely on is preserved.
Level of scrutiny
Low. Two of the four files are gated behind the mock_balances build tag (test/benchmark-only, explicitly refused on pacific-1 mainnet), and the other two are a one-line Info→Debug swap on an already-duplicative log line (block-level Minted coins is still emitted at Info from x/mint/keeper/hooks.go).
Other factors
Bug hunters found nothing. Author verified builds with and without the mock_balances tag, plus a targeted test run. The change matches the upstream cosmos-sdk direction for this log line.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3729 +/- ##
==========================================
- Coverage 59.84% 58.93% -0.92%
==========================================
Files 2278 2191 -87
Lines 189134 179314 -9820
==========================================
- Hits 113195 105672 -7523
+ Misses 65862 64367 -1495
+ Partials 10077 9275 -802
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Problem
On
mock_balancesbuilds, every account top-off emits an Info log —minted coins from module account— once per funded sender. On a seiload chain funding thousands of fresh accounts, this floods node logs with lines that carry no signal (the amount is always the fixed 100 ETH top-off).This wasn't always the case:
topOffAccountused to suppress the bank keeper's mint log by swapping aNopLoggeronto the context. The package-levelslogmigration (#3050) removed ctx-scoped loggers, and with them the suppression — silently re-enabling the spam. The stale(use NopLogger to suppress log spam)comment inmock_balances.gostill pointed at the old mechanism.Change
minted coins from module accountlog from Info to Debug, in both copies (sei-cosmos/x/bank/keeper,giga/deps/xbank/keeper). Per-mint logging is a Debug-level concern; upstream cosmos-sdk made the same move.ctx := s.ctxalias in bothmock_balances.gotop-off paths.Production visibility is unaffected: block minting already logs
Minted coinsat Info fromx/mint/keeper/hooks.go, so the bank-level line was duplicative there; the event emission (NewCoinMintEvent) is unchanged.Verification
go build ./giga/deps/xbank/... ./sei-cosmos/x/bank/...passesgo build -tags mock_balances ./x/evm/state/... ./giga/deps/xevm/state/... ./app/...passesgo test -tags mock_balances ./app/ -run TestMempoolBalanceFloorpasses🤖 Generated with Claude Code