Skip to content
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] Implement Global Mint Reimbursement Request #878

Merged
merged 45 commits into from
Oct 30, 2024
Merged

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Oct 14, 2024

Summary

This PR adds

  • GMRR TLM
  • Ensures that the application has enough funds to cover for it.
  • Deducts the total global mint amount from the application's stake.
  • Sends the global mint amount from the application module account to the tokenomics module account to the PNF account.
  • The application still gets its global inflation share sent to its account.

Issue

Type of change

Select one or more from the following:

  • New feature, functionality or library

Testing

  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • 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

@red-0ne red-0ne added application Changes related to the Application actor on-chain On-chain business logic tokenomics Token Economics - what else do you need? labels Oct 14, 2024
@red-0ne red-0ne added this to the Shannon Beta TestNet Launch milestone Oct 14, 2024
Copy link

gitguardian bot commented Oct 25, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
12819930 Triggered Generic Password ba13177 localnet/kubernetes/values-pocketdex-postgres.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could't quite make it to the end of the last file but I got through 90%+. 🔥

image

Great work @red-0ne! 🙌

testutil/keeper/tokenomics.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules_test.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Outdated Show resolved Hide resolved
proto/poktroll/tokenomics/event.proto Outdated Show resolved Hide resolved
tests/integration/application/min_stake_test.go Outdated Show resolved Hide resolved
tests/integration/application/min_stake_test.go Outdated Show resolved Hide resolved
testutil/keeper/tokenomics.go Outdated Show resolved Hide resolved
testutil/keeper/tokenomics.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules_test.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules_test.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules_test.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules_test.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules_test.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/token_logic_modules.go Show resolved Hide resolved
Copy link

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 make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 878)
Grafana network dashboard for devnet-issue-878

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Oct 30, 2024
x/tokenomics/keeper/token_logic_modules.go Outdated Show resolved Hide resolved
@red-0ne red-0ne dismissed bryanchriswhite’s stale review October 30, 2024 20:56

Change requests addressed, Bryan is OOO

@red-0ne red-0ne merged commit ff76430 into main Oct 30, 2024
10 checks passed
bryanchriswhite added a commit that referenced this pull request Nov 4, 2024
…tlement

# By Redouane Lakrache (3) and others
# Via GitHub
* pokt/main:
  [Observability] Foundation for load testing telemetry (#832)
  [Tokenomics] Implement Global Mint Reimbursement Request (#878)
  [Docs] Assign owners to all `TODO_BETA` (#898)
  [Supplier] Add supplier staking fee (#883)
  [Application] Single Service Applications (#886)

# Conflicts:
#	testutil/keeper/tokenomics.go
#	x/tokenomics/keeper/settle_pending_claims.go
#	x/tokenomics/keeper/token_logic_modules.go
#	x/tokenomics/keeper/token_logic_modules_test.go
#	x/tokenomics/module/abci.go
#	x/tokenomics/types/errors.go
bryanchriswhite added a commit that referenced this pull request Nov 4, 2024
# By Redouane Lakrache (3) and others
# Via GitHub
* pokt/main:
  [Observability] Foundation for load testing telemetry (#832)
  [Tokenomics] Implement Global Mint Reimbursement Request (#878)
  [Docs] Assign owners to all `TODO_BETA` (#898)
  [Supplier] Add supplier staking fee (#883)
  [Application] Single Service Applications (#886)

# Conflicts:
#	x/supplier/keeper/msg_server_stake_supplier.go
#	x/supplier/keeper/msg_server_stake_supplier_test.go
#	x/supplier/keeper/msg_server_unstake_supplier_test.go
okdas pushed a commit that referenced this pull request Nov 14, 2024
## Summary

This PR adds
* GMRR TLM
* Ensures that the application has enough funds to cover for it.
* Deducts the total global mint amount from the application's stake.
* Sends the global mint amount from the application module account to
the tokenomics module account to the PNF account.
* The application still gets its global inflation share sent to its
account.

## Issue

- #732 

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library

## 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
- [x] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
bryanchriswhite added a commit that referenced this pull request Nov 14, 2024
…pdates

* pokt/main: (51 commits)
  [RelayMiner] Supplier rate limiting (#895)
  [Tokenomics] refactor: `MintAllocationApplication` var usage to param usage  (#918)
  [Tokenomics] feat: add `mint_allocation_application` param to tokenomics module (#917)
  [Tokenomics] refactor: `MintAllocationSourceOwner` var usage to param usage (#916)
  [Tokenomics] feat: add `mint_allocation_source_owner` param to tokenomics module (#915)
  [Tokenomics] refactor: `MintAllocationSupplier` var usage to param usage (#914)
  [Tokenomics] feat: add `mint_allocation_supplier` param to tokenomics module (#913)
  [Tokenomics] refactor: `MintAllocationProposer` var usage to param usage (#912)
  [Tokenomics] feat: add `mint_allocation_proposer` param to tokenomics module (#911)
  [Tokenomics] refactor: `MintAllocationDao` var usage to param usage (#910)
  [Tokenomics] Add `mint_allocation_dao` tokenomics module param (#909)
  [quick-pr] change full-node.sh script links (#920)
  [Supplier] refactor: `NumSuppliersPerSession` var usage to param usage (#908)
  [Session Params] Add `num_suppliers_per_session` param to session module (#907)
  [Session Params] Add `MsgUpdateParam` to session module (#906)
  Updated some compiled proto files
  [TODOs] Update #2 to `TODO_BETA` to only reflect ACTUAL blockers (#900)
  [Workflow] Enforce `TODO_UPNEXT` comments to have an associated username (#896)
  [Observability] Foundation for load testing telemetry (#832)
  [Tokenomics] Implement Global Mint Reimbursement Request (#878)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application Changes related to the Application actor devnet devnet-test-e2e on-chain On-chain business logic push-image CI related - pushes images to ghcr.io tokenomics Token Economics - what else do you need?
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants