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] Post-scaffold cleanup & parameter updates foundation #287

Merged
merged 55 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6f32dac
move protox to the right place
Olshansk Dec 10, 2023
1d4e475
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Dec 20, 2023
86cca4f
Fix proto imports
Olshansk Dec 20, 2023
f317d89
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Dec 21, 2023
2c44d26
Documented the plan for this PR before I forget
Olshansk Dec 22, 2023
4b1d025
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Jan 5, 2024
f2519ea
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Jan 5, 2024
c8b4b6b
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Jan 8, 2024
6364101
Update deps
Olshansk Jan 8, 2024
9620a24
Unit test for updating tokenomic params succeeds
Olshansk Jan 8, 2024
5b4949d
Added a placeholder for SettleSessionAccounting
Olshansk Jan 8, 2024
565195b
Rename Compute to ComputeUnits
Olshansk Jan 8, 2024
ee71f7d
Remove some unused comments
Olshansk Jan 8, 2024
7fe5ecb
Before scaffold
Olshansk Jan 8, 2024
0079a32
Ran the following command to fill in some missing gaps: ignite scaffo…
Olshansk Jan 10, 2024
581c947
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Jan 10, 2024
7939b4c
Incomplete unit tests for parameter update passing
Olshansk Jan 10, 2024
1c32614
Checkpoint for the day
Olshansk Jan 11, 2024
fa80df8
Merge with main
Olshansk Jan 15, 2024
ee787d0
Update /msg_server_update_params_test.go and figurign some stuff out …
Olshansk Jan 15, 2024
4aca865
Unit tests passing
Olshansk Jan 16, 2024
fe9a645
Remove session accounting implementation
Olshansk Jan 16, 2024
e32bc93
Completed self review
Olshansk Jan 16, 2024
398e4d6
Update x/tokenomics/client/cli/tx_update_params.go
Olshansk Jan 18, 2024
cab8bee
change k8s DNS endpoint for celestia secret (#314)
okdas Jan 16, 2024
d95e1f7
[LocalNet] Add sequencer block persistence (#277)
okdas Jan 17, 2024
fd9662c
[Config, Docs] Add supplier staking config documentation (#318)
red-0ne Jan 18, 2024
4eeda85
[Docs] Add AppGateServer config documentation (#317)
red-0ne Jan 18, 2024
6d566eb
[Config, Docs] Add gateway staking config documentation (#321)
red-0ne Jan 18, 2024
eda0816
[Config, Docs] Add application staking config documentation (#320)
red-0ne Jan 18, 2024
629bf6c
Fixed some tests
Olshansk Jan 18, 2024
9a79163
Update proto/pocket/tokenomics/query.proto
Olshansk Jan 19, 2024
fa45776
Update Makefile
Olshansk Jan 19, 2024
f149a74
Update x/tokenomics/client/cli/tx_update_params.go
Olshansk Jan 19, 2024
4b8a5b5
Update x/tokenomics/keeper/keeper.go
Olshansk Jan 19, 2024
de19c54
Reply to some review comments
Olshansk Jan 19, 2024
1871007
Ran make go_imports and make go_lint
Olshansk Jan 19, 2024
526d90e
Merge with main
Olshansk Jan 19, 2024
bdbbcc8
Start multi-lining
Olshansk Jan 19, 2024
d1fcf9b
Renamed some tokenomics errors
Olshansk Jan 19, 2024
23fb106
Reply to PR review comments
Olshansk Jan 19, 2024
7972eef
foundation/pnf
Olshansk Jan 19, 2024
3f92915
Ran make go_imports and make go_lint
Olshansk Jan 19, 2024
d708df0
Fix outdated test
Olshansk Jan 19, 2024
90b5255
Merge with main
Olshansk Jan 19, 2024
9faf89c
Fix log usage
Olshansk Jan 19, 2024
05a8924
Update Makefile
Olshansk Jan 22, 2024
70eea62
fix: add yarn.lock (#334)
bryanchriswhite Jan 22, 2024
4b92864
[Off-chain] Simplify `TxClient` with `EventsQueryClient` (#330)
bryanchriswhite Jan 22, 2024
3e447db
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Jan 22, 2024
39a8209
Merge branch 'main' into issues/243/update_tokenomics_module
Olshansk Jan 23, 2024
3d9505e
Remove TokenomicsKeeperI and follow the same keeper naming convention
Olshansk Jan 23, 2024
a038791
Fix a few refactoring issues
Olshansk Jan 23, 2024
1a39f03
One last minor refactor fix
Olshansk Jan 23, 2024
093ddff
Empty commit
Olshansk Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ go_mockgen: ## Use `mockgen` to generate mocks used for testing purposes of all
go generate ./x/gateway/types/
go generate ./x/supplier/types/
go generate ./x/session/types/
go generate ./x/tokenomics/types/
go generate ./pkg/client/interface.go
go generate ./pkg/miner/interface.go
go generate ./pkg/relayer/interface.go
Expand Down Expand Up @@ -515,6 +516,20 @@ claim_list_height_5: ## List all the claims at height 5
claim_list_session: ## List all the claims ending at a specific session (specified via SESSION variable)
poktrolld --home=$(POKTROLLD_HOME) q supplier list-claims --session-id $(SESSION) --node $(POCKET_NODE)

##############
### Params ###
##############

MODULES := application gateway pocket service session supplier tokenomics

.PHONY: query_all_params
query_all_params: ## Query the params from all available modules
@for module in $(MODULES); do \
echo "~~~ Querying $$module module params ~~~"; \
poktrolld query $$module params --node $(POCKET_NODE) --output json | jq; \
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
echo ""; \
done

######################
### Ignite Helpers ###
######################
Expand Down
12 changes: 8 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ import (
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
solomachine "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine"
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
"github.com/spf13/cast"

appparams "github.com/pokt-network/poktroll/app/params"
"github.com/pokt-network/poktroll/docs"
applicationmodule "github.com/pokt-network/poktroll/x/application"
Expand All @@ -135,6 +133,7 @@ import (
tokenomicsmodule "github.com/pokt-network/poktroll/x/tokenomics"
tokenomicsmodulekeeper "github.com/pokt-network/poktroll/x/tokenomics/keeper"
tokenomicsmoduletypes "github.com/pokt-network/poktroll/x/tokenomics/types"
"github.com/spf13/cast"
)

const (
Expand Down Expand Up @@ -288,7 +287,7 @@ type App struct {

GatewayKeeper gatewaymodulekeeper.Keeper

TokenomicsKeeper tokenomicsmodulekeeper.Keeper
TokenomicsKeeper tokenomicsmodulekeeper.TokenomicsKeeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration

// mm is the module manager
Expand Down Expand Up @@ -347,6 +346,10 @@ func New(
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)

// The `x/gov` address that is primarily responsible for updating module
// parametesr and other transactions
authorirty := authtypes.NewModuleAddress(govtypes.ModuleName).String()

app := &App{
BaseApp: bApp,
cdc: cdc,
Expand Down Expand Up @@ -641,11 +644,12 @@ func New(
supplierModule := suppliermodule.NewAppModule(appCodec, app.SupplierKeeper, app.AccountKeeper, app.BankKeeper)
sessionModule := sessionmodule.NewAppModule(appCodec, app.SessionKeeper, app.AccountKeeper, app.BankKeeper)

app.TokenomicsKeeper = *tokenomicsmodulekeeper.NewKeeper(
app.TokenomicsKeeper = *tokenomicsmodulekeeper.NewTokenomicsKeeper(
appCodec,
keys[tokenomicsmoduletypes.StoreKey],
keys[tokenomicsmoduletypes.MemStoreKey],
app.GetSubspace(tokenomicsmoduletypes.ModuleName),
authorirty,
)
tokenomicsModule := tokenomicsmodule.NewAppModule(appCodec, app.TokenomicsKeeper, app.AccountKeeper, app.BankKeeper)

Expand Down
48 changes: 45 additions & 3 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47931,12 +47931,14 @@ paths:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
- GRPC: gRPC
- WEBSOCKET: WebSocket
- JSON_RPC: JSON-RPC
- REST: REST
configs:
type: array
items:
Expand Down Expand Up @@ -48080,12 +48082,14 @@ paths:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
- GRPC: gRPC
- WEBSOCKET: WebSocket
- JSON_RPC: JSON-RPC
- REST: REST
configs:
type: array
items:
Expand Down Expand Up @@ -48236,7 +48240,7 @@ paths:
/pokt-network/poktroll/tokenomics/params:
get:
summary: Parameters queries the parameters of the module.
operationId: PoktrollTokenomicsParams
operationId: PocketTokenomicsParams
responses:
'200':
description: A successful response.
Expand All @@ -48250,6 +48254,16 @@ paths:
computeToTokensMultiplier:
type: string
format: uint64
title: |-
Ideas:
- RelayToTokensMultiplier
- Application.MaxuPOKTPerRelay
- Application.MinuPOKTPerRelay
- Suppler.MaxuPOKTPerRelay
- Suppler.MinuPOKTPerRelay
- PercentageCutToDAO
- PercentageCutToSequencer
- PercentageCutToOthers?
description: >-
QueryParamsResponse is response type for the Query/Params RPC
method.
Expand Down Expand Up @@ -78032,6 +78046,7 @@ definitions:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
Expand Down Expand Up @@ -78099,6 +78114,7 @@ definitions:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
Expand Down Expand Up @@ -78156,6 +78172,7 @@ definitions:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
Expand Down Expand Up @@ -78227,6 +78244,7 @@ definitions:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
Expand Down Expand Up @@ -78481,12 +78499,14 @@ definitions:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
- GRPC: gRPC
- WEBSOCKET: WebSocket
- JSON_RPC: JSON-RPC
- REST: REST
configs:
type: array
items:
Expand Down Expand Up @@ -78661,12 +78681,14 @@ definitions:
- GRPC
- WEBSOCKET
- JSON_RPC
- REST
default: UNKNOWN_RPC
description: |-
- UNKNOWN_RPC: Undefined RPC type
- GRPC: gRPC
- WEBSOCKET: WebSocket
- JSON_RPC: JSON-RPC
- REST: REST
configs:
type: array
items:
Expand Down Expand Up @@ -78713,14 +78735,24 @@ definitions:
description: params holds all the parameters of this module.
type: object
description: QueryParamsResponse is response type for the Query/Params RPC method.
poktroll.tokenomics.Params:
pocket.tokenomics.Params:
type: object
properties:
computeToTokensMultiplier:
type: string
format: uint64
title: |-
Ideas:
- RelayToTokensMultiplier
- Application.MaxuPOKTPerRelay
- Application.MinuPOKTPerRelay
- Suppler.MaxuPOKTPerRelay
- Suppler.MinuPOKTPerRelay
- PercentageCutToDAO
- PercentageCutToSequencer
- PercentageCutToOthers?
description: Params defines the parameters for the module.
poktroll.tokenomics.QueryParamsResponse:
pocket.tokenomics.QueryParamsResponse:
type: object
properties:
params:
Expand All @@ -78730,4 +78762,14 @@ definitions:
computeToTokensMultiplier:
type: string
format: uint64
title: |-
Ideas:
- RelayToTokensMultiplier
- Application.MaxuPOKTPerRelay
- Application.MinuPOKTPerRelay
- Suppler.MaxuPOKTPerRelay
- Suppler.MinuPOKTPerRelay
- PercentageCutToDAO
- PercentageCutToSequencer
- PercentageCutToOthers?
description: QueryParamsResponse is response type for the Query/Params RPC method.
3 changes: 2 additions & 1 deletion proto/pocket/supplier/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ option go_package = "github.com/pokt-network/poktroll/x/supplier/types";
// Params defines the parameters for the module.
message Params {
option (gogoproto.goproto_stringer) = false;

// TODO_BLOCKER: Add proof related submission window params
// TODO_BLOCKER: Add claim related submission window params
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
syntax = "proto3";
package poktroll.tokenomics;
package pocket.tokenomics;

import "gogoproto/gogo.proto";
import "poktroll/tokenomics/params.proto";
import "pocket/tokenomics/params.proto";

option go_package = "github.com/pokt-network/poktroll/x/tokenomics/types";

// GenesisState defines the tokenomics module's genesis state.
message GenesisState {
// params defines all the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
}
Loading
Loading