-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tokenomics] Prevent GMR to produce zero values #866
Merged
Merged
Conversation
This file contains 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
The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. You may need to run GCP workloads (requires changing the namespace to 866) |
Olshansk
approved these changes
Oct 8, 2024
bryanchriswhite
added a commit
that referenced
this pull request
Oct 10, 2024
…to issues/612/application/burning * pokt/issues/612/application/staking: Empty commit [Tokenomics] Prevent GMR to produce zero values (#866) Empty commit
bryanchriswhite
added a commit
that referenced
this pull request
Oct 10, 2024
…application * issues/612/application/burning: (94 commits) fix: linter error chore: quick fixes [DifficultyHash] Prepare for difficulty multiplier usage (#836) [Application] Enforce minimum stake when staking (#847) Empty commit [Tokenomics] Prevent GMR to produce zero values (#866) Empty commit chore: regenerate protobufs fix: linter error Empty commit chore: review feedback improvements Empty commit Empty commit fix: linter errors fix: typo chore: review feedback improvements chore: reconcile PreGeneratedAccountIterator#MustNext() chore: add review feedback TODOs Empty commit test: simplify coin equality assertions ... # Conflicts: # x/application/keeper/msg_server_stake_application_test.go # x/application/keeper/msg_server_unstake_application.go # x/application/keeper/msg_server_unstake_application_test.go # x/application/keeper/unbond_applications.go
bryanchriswhite
added a commit
that referenced
this pull request
Oct 14, 2024
* issues/612/shared/refresh: (46 commits) test: supplier up-staking from below min. stake fix: linter error fix: flaky test [Application] Enforce minimum stake when burning (#848) Empty commit chore: review feedback improvements chore: regenerate protobufs chore: review feedback improvements test: fix application min stake integration test chore: review feedback improvements Empty commit fix: linter error chore: quick fixes [DifficultyHash] Prepare for difficulty multiplier usage (#836) [Application] Enforce minimum stake when staking (#847) Empty commit [Tokenomics] Prevent GMR to produce zero values (#866) Empty commit [Application] Add `min_stake` application module param (#845) chore: regenerate protobufs ...
bryanchriswhite
added a commit
that referenced
this pull request
Oct 14, 2024
* issues/612/proof/refresh: (46 commits) test: supplier up-staking from below min. stake fix: linter error fix: flaky test [Application] Enforce minimum stake when burning (#848) Empty commit chore: review feedback improvements chore: regenerate protobufs chore: review feedback improvements test: fix application min stake integration test chore: review feedback improvements Empty commit fix: linter error chore: quick fixes [DifficultyHash] Prepare for difficulty multiplier usage (#836) [Application] Enforce minimum stake when staking (#847) Empty commit [Tokenomics] Prevent GMR to produce zero values (#866) Empty commit [Application] Add `min_stake` application module param (#845) chore: regenerate protobufs ... # Conflicts: # x/service/types/errors.go
bryanchriswhite
added a commit
that referenced
this pull request
Oct 14, 2024
…-uint64 * issues/612/service/refresh: (46 commits) test: supplier up-staking from below min. stake fix: linter error fix: flaky test [Application] Enforce minimum stake when burning (#848) Empty commit chore: review feedback improvements chore: regenerate protobufs chore: review feedback improvements test: fix application min stake integration test chore: review feedback improvements Empty commit fix: linter error chore: quick fixes [DifficultyHash] Prepare for difficulty multiplier usage (#836) [Application] Enforce minimum stake when staking (#847) Empty commit [Tokenomics] Prevent GMR to produce zero values (#866) Empty commit [Application] Add `min_stake` application module param (#845) chore: regenerate protobufs ...
bryanchriswhite
added a commit
that referenced
this pull request
Oct 15, 2024
…ed-params * pokt/main: [On-Chain] Refactor `uint64` type individual param update logic (#863) [Service] Refresh service module params logic (#861) [Proof] Refresh proof module params logic (#851) [Shared] Refresh shared module params logic (#852) [Docs] Fix example of how to set rev share precentage (#877) [Tokenomics] Implement difficulty proportional rewards (#880) [Supplier] Enforce minimum stake when staking (#857) [Supplier] Add `min_stake` supplier module param (#850) [Supplier] Add `MsgUpdateParam` to application module (#849) [Application] Enforce minimum stake when burning (#848) [DifficultyHash] Prepare for difficulty multiplier usage (#836) [Application] Enforce minimum stake when staking (#847) [Tokenomics] Prevent GMR to produce zero values (#866)
bryanchriswhite
added a commit
that referenced
this pull request
Oct 15, 2024
* pokt/main: [On-Chain] Refactor `uint64` type individual param update logic (#863) [Service] Refresh service module params logic (#861) [Proof] Refresh proof module params logic (#851) [Shared] Refresh shared module params logic (#852) [Docs] Fix example of how to set rev share precentage (#877) [Tokenomics] Implement difficulty proportional rewards (#880) [Supplier] Enforce minimum stake when staking (#857) [Supplier] Add `min_stake` supplier module param (#850) [Supplier] Add `MsgUpdateParam` to application module (#849) [Application] Enforce minimum stake when burning (#848) [DifficultyHash] Prepare for difficulty multiplier usage (#836) [Application] Enforce minimum stake when staking (#847) [Tokenomics] Prevent GMR to produce zero values (#866)
okdas
pushed a commit
that referenced
this pull request
Nov 14, 2024
## Summary This PR handles the case where non zero claimed rewards produce zero GMR rewards when the claimed rewards are too low. ## Issue When claimed rewards are too low, they might produce a global mint reward that is non-zero but less that 1. Since the TLM does not exepect a zero value, this might lead to a chain halt like below. ``` ERR error processing token logic modules for claim "af85b9dd2d49f1d5b133347eac2b65e7cd7a1a555fea742adba778f711207c6b": TLM "TLMGlobalMint": mint amount cannot be zero: failed to process TLM [/go/pkg/mod/cosmossdk.io/[email protected]/errors.go:155] module=server num_claim_compute_units=2 num_relays_in_session_tree=2 proof_requirement=NOT_REQUIRED session_id=af85b9dd2d49f1d5b133347eac2b65e7cd7a1a555fea742adba778f711207c6b supplier_operator_address=pokt1ytsx06dfxrp7cgt7t95jkxuyu2m97563zqz5pn ERR could not settle pending claims due to error TLM "TLMGlobalMint": mint amount cannot be zero: failed to process TLM [/go/pkg/mod/cosmossdk.io/[email protected]/errors.go:155] method=EndBlocker module=x/tokenomics ``` https://gist.github.com/okdas/013df312354ca0e7877a41290d94fad2 ## Type of change Select one or more from the following: - [ ] New feature, functionality or library - [ ] Consensus breaking; add the `consensus-breaking` label if so. See #791 for details - [x] Bug fix - [ ] Code health or cleanup - [ ] Documentation - [ ] Other (specify) ## Testing - [x] **Unit Tests**: `make go_develop_and_test` - [x] **LocalNet E2E Tests**: `make test_e2e` - [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR. ## Sanity Checklist - [x] I have tested my changes using the available tooling - [x] I have commented my code - [x] I have performed a self-review of my own code; both comments & source code - [ ] I create and reference any new tickets, if applicable - [ ] I have left TODOs throughout the codebase, if applicable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
devnet
devnet-test-e2e
push-image
CI related - pushes images to ghcr.io
tokenomics
Token Economics - what else do you need?
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.
Summary
This PR handles the case where non zero claimed rewards produce zero GMR rewards when the claimed rewards are too low.
Issue
When claimed rewards are too low, they might produce a global mint reward that is non-zero but less that 1. Since the TLM does not exepect a zero value, this might lead to a chain halt like below.
https://gist.github.com/okdas/013df312354ca0e7877a41290d94fad2
Type of change
Select one or more from the following:
consensus-breaking
label if so. See [Infra] Automatically add theconsensus-breaking
label #791 for detailsTesting
make go_develop_and_test
make test_e2e
devnet-test-e2e
label to the PR.Sanity Checklist