-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tokenomics] Post-scaffold cleanup & parameter updates foundation (#287)
- Scaffolded the `MsgUpdateParams` in the `tokenomics` module with tests - Researched `x/gov`, `x/upgrade` and `x/authz` to set a pattern that follows Cosmos SDK best practices for governance parameter maintenance - Reviewers: Please look through the description in this ticket to get some context as well #322 - Deferring all imports and lining errors to the tooling we have today: `make go_lint && make go_imports` - A few minor documentation NITs outside the scope of this PR that made it in accidently --- Co-authored-by: Redouane Lakrache <[email protected]> Co-authored-by: Dima Kniazev <[email protected]> Co-authored-by: Bryan White <[email protected]>
- Loading branch information
1 parent
eca7a52
commit 95838cb
Showing
48 changed files
with
1,121 additions
and
178 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ POCKET_ADDR_PREFIX = pokt | |
|
||
# 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 | ||
|
@@ -38,6 +38,9 @@ help: ## Prints all the targets in all the Makefiles | |
### Checks ### | ||
############## | ||
|
||
# TODO_DOCUMENT: All of the `check_` helpers can be installed differently depending | ||
# on the user's OS and enviornment. | ||
|
||
.PHONY: check_go_version | ||
# Internal helper target - check go version | ||
check_go_version: | ||
|
@@ -102,6 +105,17 @@ check_npm: | |
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: | ||
|
@@ -214,6 +228,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 | ||
|
@@ -540,6 +555,25 @@ 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 | ||
|
||
# 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; \ | ||
echo ""; \ | ||
done | ||
|
||
###################### | ||
### Ignite Helpers ### | ||
###################### | ||
|
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
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
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
Oops, something went wrong.