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 all 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
36 changes: 35 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# TODO: Add other dependencies (ignite, docker, k8s, etc) here
.PHONY: install_ci_deps
install_ci_deps: ## Installs `mockgen`
install_ci_deps: ## Installs `mockgen` and other go tools
go install "github.com/golang/mock/[email protected]" && mockgen --version
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && golangci-lint --version
go install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -38,6 +38,9 @@
### Checks ###
##############

# TODO_DOCUMENT: All of the `check_` helpers can be installed differently depending
# on the user's OS and enviornment.

Check warning on line 42 in Makefile

View workflow job for this annotation

GitHub Actions / misspell

[misspell] Makefile#L42

"enviornment" is a misspelling of "environment"
Raw output
./Makefile:42:23: "enviornment" is a misspelling of "environment"

.PHONY: check_go_version
# Internal helper target - check go version
check_go_version:
Expand Down Expand Up @@ -102,6 +105,17 @@
fi; \
}

.PHONY: check_jq
# Internal helper target - check if jq is installed
check_jq:
{ \
if ( ! ( command -v jq >/dev/null )); then \
echo "Seems like you don't have jq installed. Make sure you install it before continuing"; \
exit 1; \
fi; \
}


.PHONY: check_node
# Internal helper target - check if node is installed
check_node:
Expand Down Expand Up @@ -214,6 +228,7 @@
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 @@ -540,6 +555,25 @@
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

# TODO_IMPROVE(#322): Improve once we decide how to handle parameter updates
.PHONY: update_tokenomics_params
update_tokenomics_params: ## Update the tokenomics module params
poktrolld --home=$(POKTROLLD_HOME) tx tokenomics update-params 43 --keyring-backend test --from pnf --node $(POCKET_NODE)

.PHONY: query_all_params
query_all_params: check_jq ## 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
10 changes: 8 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"os"
"path/filepath"

// this line is used by starport scaffolding # stargate/app/moduleImport

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
dbm "github.com/cometbft/cometbft-db"
Expand Down Expand Up @@ -218,6 +216,7 @@ var (
servicemoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
applicationmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
gatewaymoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
tokenomicsmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner},
// this line is used by starport scaffolding # stargate/app/maccPerms
}
)
Expand Down Expand Up @@ -347,6 +346,11 @@ func New(
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)

// TODO_BLOCKER(#322): Change this to `authtypes.NewModuleAddress(govtypes.ModuleName)`
// once we figure out the MVP for on-chain parameter governance.
pnfAddress := "pokt1eeeksh2tvkh7wzmfrljnhw4wrhs55lcuvmekkw"
authority := pnfAddress

app := &App{
BaseApp: bApp,
cdc: cdc,
Expand Down Expand Up @@ -646,6 +650,8 @@ func New(
keys[tokenomicsmoduletypes.StoreKey],
keys[tokenomicsmoduletypes.MemStoreKey],
app.GetSubspace(tokenomicsmoduletypes.ModuleName),
app.BankKeeper,
authority,
)
tokenomicsModule := tokenomicsmodule.NewAppModule(appCodec, app.TokenomicsKeeper, app.AccountKeeper, app.BankKeeper)

Expand Down
4 changes: 2 additions & 2 deletions cmd/signals/on_exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
)

// GoOnExitSignal calls the given callback when the process receives an interrupt
// or kill signal.
// or terminate signal.
func GoOnExitSignal(onInterrupt func()) {
go func() {
// Set up sigCh to receive when this process receives an interrupt or
// kill signal.
// terminate signal.
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM)

Expand Down
5 changes: 5 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ accounts:
mnemonic: "baby advance work soap slow exclude blur humble lucky rough teach wide chuckle captain rack laundry butter main very cannon donate armor dress follow"
coins:
- 999999999999999999upokt
# PNF represents the multisig address that acts on behalf of the DAO
- name: pnf
mnemonic: "crumble shrimp south strategy speed kick green topic stool seminar track stand rhythm almost bubble pet knock steel pull flag weekend country major blade"
coins:
- 69000000000000000000042upokt
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
- name: sequencer1
mnemonic: "creek path rule retire evolve vehicle bargain champion roof whisper prize endorse unknown anchor fashion energy club sauce elder parent cotton old affair visa"
coins:
Expand Down
Loading
Loading