[Utility][RPC][CLI] Querying governance parameters (Issue #619)#622
[Utility][RPC][CLI] Querying governance parameters (Issue #619)#622
Conversation
… according to the spec
…owner= protobuf tags to enable easy param owner lookup
…ean up GetParamOwner test
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables for this repo. you could follow readme for more information |
The check succeeded, dismissing the review comment.
|
AI-Generated Summary: This pull request introduces several changes across multiple files, primarily focused on refactoring and improving the retrieval and handling of governance parameters. Key changes include the replacement of specific accessor functions with more generic |
* pokt/main: [Utility][RPC][CLI] Querying governance parameters (Issue #619) (#622) [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue #508 (#652) [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (#654) [PERSISTENCE] SavePoints and Rollbacks design document (Issue #493) (#533) Update reviewpad.yml Added ChatGPT-CodeReview workflow (#649) Update reviewpad.yml Added default reviewpad.yml file (#648) [DevNet] tweaks for remote environments (#601) [Documentation] Swap validator and non-validator triggers when finished synching (#646) [Consensus] Configuration entry point state sync (#528)
…p-modules * pokt/main: [Utility][RPC][CLI] Querying governance parameters (Issue pokt-network#619) (pokt-network#622) [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue pokt-network#508 (pokt-network#652) [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (pokt-network#654) [PERSISTENCE] SavePoints and Rollbacks design document (Issue pokt-network#493) (pokt-network#533) Update reviewpad.yml Added ChatGPT-CodeReview workflow (pokt-network#649) Update reviewpad.yml Added default reviewpad.yml file (pokt-network#648) [DevNet] tweaks for remote environments (pokt-network#601) [Documentation] Swap validator and non-validator triggers when finished synching (pokt-network#646) [Consensus] Configuration entry point state sync (pokt-network#528)
…p-modules * pokt/main: update pocket repo read.me (#667) Update reviewpad.yml [KEYBASE] Add improve comment on keybase config (#665) [E2E] Chore: Doc updates (#663) [E2E] Adds staking, unstaking, and sending tests (#653) [Utility][RPC][CLI] Querying governance parameters (Issue #619) (#622) [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue #508 (#652) [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (#654) [PERSISTENCE] SavePoints and Rollbacks design document (Issue #493) (#533) Update reviewpad.yml Added ChatGPT-CodeReview workflow (#649) Update reviewpad.yml Added default reviewpad.yml file (#648) [DevNet] tweaks for remote environments (#601) [Documentation] Swap validator and non-validator triggers when finished synching (#646) [Consensus] Configuration entry point state sync (#528)
…p-modules * pokt/main: update pocket repo read.me (#667) Update reviewpad.yml [KEYBASE] Add improve comment on keybase config (#665) [E2E] Chore: Doc updates (#663) [E2E] Adds staking, unstaking, and sending tests (#653) [Utility][RPC][CLI] Querying governance parameters (Issue #619) (#622) [Persistence][Utility] Separate all CreateAndApply functions into more functional components - Issue #508 (#652) [Persistence][Utility] Pools Address hack removal + state accessor fix for params and flags (#654) [PERSISTENCE] SavePoints and Rollbacks design document (Issue #493) (#533) Update reviewpad.yml Added ChatGPT-CodeReview workflow (#649) Update reviewpad.yml Added default reviewpad.yml file (#648) [DevNet] tweaks for remote environments (#601) [Documentation] Swap validator and non-validator triggers when finished synching (#646) [Consensus] Configuration entry point state sync (#528)
Description
This PR introduces the ability to query
v1/query/allChainParmaswith aGETrequest in order to retrieve the current values for all governance parameters stored in the node's PostgreSQL database. This is defined in the OpenAPI YAML RPC specification and its logic is implemented inrpc/handlers.goThe CLI endpoint is a subcommand under the
Systemcommand that allows for the querying of this RPC endpoint and is used by the make targetquery_node_paramsto quickly enable the querying of governance parameters on localnet.In addition to this the
GovParamMetadatMaphas been moved toshared/utils/gov_utils.gowhere it is being initialised and used inpersistanceandutility. Theownertags have been added to thegenesis.protofile to show which parameters own which, this allows for an easy lookup and reduces the code footprint of thegetParamOwnerfunction greatly.There has also been a lot of code cleanup in
utilitysimplifying governance parameter accessor functions and their testsIssue
Fixes #619
Type of change
Please mark the relevant option(s):
List of changes
GetAllParams()function to the persistence read interface to retrieve the current value of each parameterv1/query/allChainParamsRPC endpoint to the RPC specification, and implement its logicQuerysubcommand in the CLIAllChainParamssubcommand to the Query CLI endpoint to queryv1/query/allChainParamsmake query_chain_paramstarget to easily query the parameters on a localnetshared/utils/gov.goTesting
make develop_testREADMERequired Checklist
godocformat comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*if I updatedshared/*README(s)