feat(x/provider): withdraw funds from consumer pool address at each block#10
Open
feat(x/provider): withdraw funds from consumer pool address at each block#10
Conversation
…e-payment # Conflicts: # x/vaas/provider/types/params.go
tbruyelle
reviewed
Feb 6, 2026
tbruyelle
reviewed
Feb 6, 2026
tbruyelle
approved these changes
Feb 6, 2026
Contributor
tbruyelle
left a comment
There was a problem hiding this comment.
Some small comments but overall LGTM, thanks !
Pantani
commented
Feb 6, 2026
…e-payment # Conflicts: # x/vaas/provider/types/provider.pb.go
There was a problem hiding this comment.
Pull request overview
Implements per-block fee withdrawal from consumer funding accounts and distribution to provider validators, adding a new fees_per_block parameter to configure the charge (Issue #9).
Changes:
- Add
fees_per_blockto provider params (proto + Go types + validation) and update related tests. - Add per-block fee collection from consumers and proportional distribution to bonded validators.
- Extend expected keeper interfaces + mocks for new staking/bank methods used by fee logic.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| x/vaas/types/expected_keepers.go | Extends staking/bank keeper interfaces for total power, address codec, and module→account sends. |
| proto/vaas/provider/v1/provider.proto | Adds fees_per_block param to proto schema. |
| x/vaas/provider/types/provider.pb.go | Regenerated protobuf output reflecting new params field. |
| x/vaas/provider/types/params.go | Adds default fees, wires param through constructors/defaults, and validates FeesPerBlock. |
| x/vaas/provider/types/params_test.go | Updates params validation tests to include fees and adds a zero-fee invalid case. |
| x/vaas/provider/types/genesis_test.go | Updates genesis tests to pass the new param. |
| x/vaas/provider/module.go | Calls fee collection + distribution in BeginBlock. |
| x/vaas/provider/keeper/params.go | Exposes GetFeesPerBlock from keeper params. |
| x/vaas/provider/keeper/params_test.go | Updates keeper params test to include fees. |
| x/vaas/provider/keeper/fees.go | New keeper logic to collect fees from consumers and distribute to validators. |
| x/vaas/provider/keeper/fees_test.go | New unit tests for fee collection and distribution. |
| testutil/keeper/mocks.go | Regenerates mocks for newly added expected keeper methods. |
| .gitignore | Formatting-only change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
close #9