Skip to content

Feat/Allow the Withdraw Reporter Rewards to Free Floating Balance #1049

Merged
brendaloya merged 10 commits into
mainfrom
feat/withdraw-to-unbonding
Jul 17, 2026
Merged

Feat/Allow the Withdraw Reporter Rewards to Free Floating Balance #1049
brendaloya merged 10 commits into
mainfrom
feat/withdraw-to-unbonding

Conversation

@CJPotter10

Copy link
Copy Markdown
Contributor

Description

Added two transactions to allow for withdrawing reporter rewards to free floating balance. One transaction allows reporters/selectors to withdraw their available tips to the tips_unlock_pool where after the unbonding period has passed they will be sent to free floating balance. The other transaction allows users to cancel pending tip unlocks back to their available tips where they can instead withdraw to their stake if they wish to.

New query for retrieving pending tip unlocks by selector address

Related Issue


Fixes #1038

Type of Change

  • Bug fix
  • [ x ] New feature
  • Documentation update
  • [ x ] State Changes (please describe): created new module account that is written to store in upgrade handler
  • [ x ] Chain Changes (please describe): new transactions and query added
  • Daemon Changes
  • Tests
  • Added Getter

Testing

add unit tests and integration tests

Checklist

  • [ x ] Code follows project style guidelines
  • [ x ] I have added appropriate comments to my code
  • [ x ] I have updated the documentation accordingly
  • [ x ] I have added tests that prove my fix or feature works
  • [ x ] go test ./... is passing locally
  • [ x ] make e2e is passing locally

…hdraw tips directly to an unbonding like state where it will go straight to free floating balance instead of directly to stake
@danflo27

Copy link
Copy Markdown
Contributor

Nice, maybe bound the # of times ProcessMatureTipUnlocks can run in one endblocker ? Could do a fifo queue like ProcessDistributionQueue(ctx, 10), something like:

func (k Keeper) ProcessMatureTipUnlocks(ctx context.Context, limit int) error {
	...
	toProcess := make([]collections.Pair[int64, uint64], 0, limit)
	err := k.TipUnlockQueue.Walk(ctx, rng, func(key ..., _ ...) (bool, error) {
		toProcess = append(toProcess, key)
		return len(toProcess) >= limit, nil // stop iterating — don't load the whole mature set
	})
	...
}

…hdraw tips directly to an unbonding like state where it will go straight to free floating balance instead of directly to stake
@brendaloya
brendaloya enabled auto-merge (squash) July 17, 2026 14:09
@CJPotter10
CJPotter10 disabled auto-merge July 17, 2026 14:25
@CJPotter10
CJPotter10 enabled auto-merge (squash) July 17, 2026 14:25
@brendaloya
brendaloya disabled auto-merge July 17, 2026 14:25
@brendaloya
brendaloya merged commit ecaf4bf into main Jul 17, 2026
82 of 83 checks passed
@brendaloya
brendaloya deleted the feat/withdraw-to-unbonding branch July 17, 2026 14:25
brendaloya pushed a commit that referenced this pull request Jul 17, 2026
) (#1052)

* added 2 new transactions and a query around allowing reporters to withdraw tips directly to an unbonding like state where it will go straight to free floating balance instead of directly to stake

* made lint fixes

* fixed another lint issue

* added 2 new transactions and a query around allowing reporters to withdraw tips directly to an unbonding like state where it will go straight to free floating balance instead of directly to stake

* added an upper iteration bound to the process unlock tips end blocker function

* made lint-fixes

* made the module account creation handle the scenario of someone sending dust to the account before the upgrade

* changed a variable

(cherry picked from commit ecaf4bf)

Co-authored-by: CJPotter10 <91627020+CJPotter10@users.noreply.github.com>
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.

Withdraw Reporter Rewards Straight to unbonding

4 participants