Skip to content

build: bump kwil-db to quiet the reward hook on idle blocks - #1442

Merged
MicBun merged 1 commit into
mainfrom
bump-kwil-db-quiet-reward-hook
Oct 8, 2026
Merged

MicBun merged 1 commit into
mainfrom
bump-kwil-db-quiet-reward-hook

Conversation

@MicBun

@MicBun MicBun commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Part of:

The node pins kwil-db at 806b5b2a. This moves the pin to 6608a4cc, which adds the two commits that landed on kwil-db main since then. Both are under the Goal above:

Why it matters

The ERC-20 reward end-block hook wrote 15 INFO lines and 2 WARNs on every mainnet block. The WARN fired on nearly every block, which teaches operators to ignore warnings. While an epoch waited for a confirmation, or for its empty-epoch grace period to end, the hook also ran the same two queries on every block and got the same answer.

I replayed the same stretch of about 3,000 testnet blocks four times from one snapshot, twice with the build mainnet runs now and twice with these two commits. With the commits, each block applied about 10 ms faster (7%), and the hook's output fell from about 46,000 INFO and 6,165 WARN lines to 12 INFO lines, which are one round of epoch finalizations. The second PR above has the runs and how I set them up.

Worth knowing before the release

An idle block leaves no reward hook lines at INFO. INFO keeps the lines that mark a change: an empty epoch finalized, the Merkle tree of an epoch with rewards, and a new epoch. The per-block lines, such as each instance's current epoch, now show only at level = 'debug'.

Consensus

Nothing the hook writes changes, and neither does the block where an epoch finalizes. The hook skips a query only while its answer would be "wait", and a wait writes nothing. A node that has just restarted has no skip state and runs every check. The tests in the second PR above hold both cases to the same writes, and the replays matched the network's app hash on every block.

Every change since 806b5b2a is in node/exts/erc20-bridge/erc20. kwil-db/core does not change, and its pin moves with the module.

Verification

  • go build ./... and go vet -tags kwiltest ./... are clean, with Go 1.25.3 as the Dockerfile uses.
  • The go.mod diff is the two kwil-db lines, and go mod tidy changed nothing else.
  • The replays ran the second PR above before its last commit. That commit only moved a test helper behind the kwiltest build tag, so the non-test code I replayed is the same as 6608a4cc.

There is no Problem issue for this in node. It delivers work merged under the kwil-db Goal above, so it carries no closing keyword.

Summary by CodeRabbit

  • Chores
    • Updated underlying components. No user-facing changes are included in this release.

@MicBun MicBun self-assigned this Oct 8, 2026
@holdex

holdex Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Time Submission Status

Member # Time Running Total Status Last Update
MicBun 1h ✅ Submitted Oct 8, 2026, 12:15 PM

Submit or update total time with:

@holdex pr submit-time 2h

Add time on top of previous submission with:

@holdex pr add-time 1h30m

See available commands to help comply with our Guidelines.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2fb3f383-306b-423b-b33b-7f6a00d170d2
📥 Commits

Reviewing files that changed from the base of the PR and between b64fe03 and 0972490.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The pull request updates the declared versions of github.com/trufnetwork/kwil-db and github.com/trufnetwork/kwil-db/core to pseudo-versions dated October 7, 2026.

Changes

Kwil DB Dependency Updates

Layer / File(s) Summary
Update Kwil DB dependency versions
go.mod
The declarations for github.com/trufnetwork/kwil-db and github.com/trufnetwork/kwil-db/core now use newer pseudo-versions dated October 7, 2026.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 09724

No concrete regression is established in the dependency updates. The inspected hook skips work only while finalization is blocked or within its grace period, so no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the dependency bump and its purpose: reducing reward-hook output on idle blocks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MicBun

MicBun commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@holdex pr submit-time 1h

@MicBun
MicBun merged commit 6b243eb into main Oct 8, 2026
8 checks passed
@MicBun
MicBun deleted the bump-kwil-db-quiet-reward-hook branch October 8, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant