From 4d1a423fee7c17085777f9925f5f97db7a3a032d Mon Sep 17 00:00:00 2001 From: Daniel Olshansky Date: Tue, 29 Oct 2024 17:51:07 -0400 Subject: [PATCH 1/2] [Docs] Assign owners to all `TODO_BETA` (#898) ## Summary Assign owners to all `TODO_BETA` ```bash export EXCLUDE_GREP="--exclude-dir={.git,vendor,./docusaurus,.vscode,.idea} --exclude= grep -r ${EXCLUDE_GREP} TODO_BETA . | grep -v 'TODO_BETA()' | wc -l 44 ``` ## Issue NA --- .github/workflows/label-actions.yml | 2 +- Tiltfile | 1 - app/upgrades/historical.go | 2 +- app/volatile/constants.go | 2 +- config.yml | 8 +++---- .../develop/contributing/observability.md | 2 +- .../develop/developer_guide/debug_tips.md | 16 ++++++------- .../docs/develop/packages/client_package.md | 4 ++-- docusaurus/docs/explore/rpc.md | 4 ++-- .../docs/operate/run_a_node/appgate_server.md | 4 +--- .../operate/run_a_node/full_node_docker.md | 3 +-- .../docs/operate/run_a_node/relay_miner.md | 4 ++-- .../primitives/claim_and_proof_lifecycle.md | 2 +- e2e/tests/0_settlement.feature | 2 +- e2e/tests/session.feature | 2 +- localnet/kubernetes/anvil.yaml | 2 +- .../config/appgate_configs_reader.go | 2 +- pkg/appgateserver/server.go | 4 ++-- pkg/client/query/sharedquerier.go | 24 +++++++++---------- pkg/crypto/rings/client.go | 4 ++-- pkg/polylog/interface.go | 4 ++-- pkg/relayer/config/types.go | 2 +- pkg/relayer/proxy/relay_verifier.go | 4 ++-- pkg/relayer/session/claim.go | 4 ++-- pkg/relayer/session/proof.go | 4 ++-- .../service/relay_mining_difficulty_test.go | 2 +- x/application/keeper/auto_undelegate.go | 2 +- .../keeper/msg_server_stake_application.go | 2 +- .../keeper/msg_server_unstake_application.go | 3 ++- x/application/module/simulation.go | 12 +++++----- .../simulation/delegate_to_gateway.go | 2 +- x/application/simulation/stake_application.go | 2 +- .../simulation/transfer_application.go | 2 +- .../simulation/undelegate_from_gateway.go | 2 +- .../simulation/unstake_application.go | 2 +- x/application/simulation/update_param.go | 2 +- x/application/types/params.go | 4 ++-- .../keeper/msg_server_unstake_gateway.go | 2 +- x/gateway/module/simulation.go | 6 ++--- x/gateway/module/tx.go | 2 +- x/gateway/simulation/stake_gateway.go | 2 +- x/gateway/simulation/unstake_gateway.go | 2 +- x/gateway/simulation/update_param.go | 2 +- x/proof/keeper/msg_server_create_claim.go | 4 ++-- x/proof/keeper/msg_server_submit_proof.go | 12 +++++----- .../keeper/msg_server_submit_proof_test.go | 2 +- x/proof/keeper/proof_requirement_test.go | 2 +- x/proof/keeper/proof_validation.go | 2 +- x/proof/keeper/session.go | 2 +- x/proof/module/simulation.go | 6 ++--- x/proof/module/tx_create_claim.go | 2 +- x/proof/module/tx_submit_proof.go | 2 +- x/proof/simulation/create_claim.go | 2 +- x/proof/simulation/submit_proof.go | 2 +- x/proof/simulation/update_param.go | 2 +- x/proof/types/shared_query_client.go | 6 ++--- x/service/keeper/msg_server_add_service.go | 2 +- x/service/module/simulation.go | 2 +- x/service/module/tx_add_service.go | 4 ++-- x/service/simulation/add_service.go | 2 +- x/service/types/params.go | 2 +- x/service/types/relay.go | 2 +- x/session/keeper/session_hydrator.go | 7 +++--- x/session/module/module.go | 2 +- x/shared/module/simulation.go | 2 +- x/shared/simulation/update_param.go | 2 +- x/shared/types/service_configs.go | 2 +- x/shared/types/session.go | 8 +++---- .../keeper/msg_server_stake_supplier.go | 2 +- x/supplier/module/abci.go | 2 +- x/supplier/module/query.go | 2 +- x/supplier/module/simulation.go | 6 ++--- x/supplier/module/tx.go | 2 +- x/supplier/simulation/stake_supplier.go | 4 ++-- x/supplier/simulation/unstake_supplier.go | 2 +- x/supplier/simulation/update_param.go | 2 +- x/supplier/types/genesis.go | 2 +- .../keeper_settle_pending_claims_test.go | 2 +- x/tokenomics/keeper/settle_pending_claims.go | 2 +- x/tokenomics/keeper/token_logic_modules.go | 17 +++++++------ x/tokenomics/module/abci.go | 2 +- x/tokenomics/module/simulation.go | 2 +- x/tokenomics/module/tx_update_params.go | 2 +- x/tokenomics/simulation/update_param.go | 2 +- 84 files changed, 148 insertions(+), 153 deletions(-) diff --git a/.github/workflows/label-actions.yml b/.github/workflows/label-actions.yml index 00be8e40b..2b85941dc 100644 --- a/.github/workflows/label-actions.yml +++ b/.github/workflows/label-actions.yml @@ -18,5 +18,5 @@ jobs: action: runs-on: ubuntu-latest steps: - # TODO: switch to `dessant/label-actions@v3` when https://github.com/dessant/label-actions/pull/29 is merged. + # TODO_TECHDEBT: switch to `dessant/label-actions@v3` when https://github.com/dessant/label-actions/pull/29 is merged. - uses: okdas/label-actions@patch-1 diff --git a/Tiltfile b/Tiltfile index 6b701bd8a..cd9b4a177 100644 --- a/Tiltfile +++ b/Tiltfile @@ -47,7 +47,6 @@ localnet_config_defaults = { "count": 1, "delve": {"enabled": False}, }, - # TODO_BLOCKER(@red-0ne, #511): Add support for `REST` and enabled this. "ollama": { "enabled": False, "model": "qwen:0.5b", diff --git a/app/upgrades/historical.go b/app/upgrades/historical.go index 0c9d83861..2c0740652 100644 --- a/app/upgrades/historical.go +++ b/app/upgrades/historical.go @@ -4,7 +4,7 @@ package upgrades // separate file, and then move them to `historical.go` after a successful upgrade so the new nodes can still sync from // the genesis. -// TODO_CONSIDERATION: after we verify `State Sync` is fully functional, we can hypothetically remove old upgrades from +// TODO_TECHDEBT(@okdas): after we verify `State Sync` is fully functional, we can hypothetically remove old upgrades from // the codebase, as the nodes won't have to execute upgrades and will download the "snapshot" instead. Some other // blockchain networks do that (such as `evmos`: https://github.com/evmos/evmos/tree/main/app/upgrades). // Note that this may inhibit a full state sync from genesis. diff --git a/app/volatile/constants.go b/app/volatile/constants.go index 169e3789e..1c3033312 100644 --- a/app/volatile/constants.go +++ b/app/volatile/constants.go @@ -2,5 +2,5 @@ // re-organized or removed in future work. package volatile -// TODO_CLEANUP: Find a way to centralize the use of `upokt` throughout the codebase +// TODO_TECHDEBT: Find a way to centralize the use of `upokt` throughout the codebase const DenomuPOKT = "upokt" diff --git a/config.yml b/config.yml index 942614aca..73ea3a945 100644 --- a/config.yml +++ b/config.yml @@ -87,7 +87,7 @@ validators: app: # DEV_NOTE: Ignite does not carry over all defaults, so we are going to match `minimum-gas-prices` with `cmd/config.go`. # See the enhancement request here: https://github.com/ignite/cli/issues/4340 - # TODO(#794): turn on `minimum-gas-prices` back + # TODO_MAINNET(#794): turn on `minimum-gas-prices` back # minimum-gas-prices: 0.000000001upokt telemetry: enabled: true @@ -124,7 +124,7 @@ genesis: staking: params: bond_denom: upokt - # TODO_MAINNET(@Olshansk): Figure out what this should be on Shannon + # TODO_MAINNET: Figure out what this should be on Shannon # re-genesis. We're setting it to 1 for Alpha TestNet #1 so Grove # maintains the only validator until Alpha TestNet #2. max_validators: 1 @@ -235,8 +235,8 @@ genesis: params: # TODO_MAINNET: Determine realistic amount for minimum gateway stake amount. min_stake: - amount: "1000000" # 1 POKT - denom: upokt + amount: "1000000" # 1 POKT + denom: upokt gatewayList: - address: pokt15vzxjqklzjtlz7lahe8z2dfe9nm5vxwwmscne4 stake: diff --git a/docusaurus/docs/develop/contributing/observability.md b/docusaurus/docs/develop/contributing/observability.md index 8c5bb91c8..a1883b0e1 100644 --- a/docusaurus/docs/develop/contributing/observability.md +++ b/docusaurus/docs/develop/contributing/observability.md @@ -111,7 +111,7 @@ func (k msgServer) CreateClaim(...) (_ *types.MsgCreateClaimResponse, err error) ### Histogram -TODO: Add a code example, link to usage, and screenshot of the output. +TODO_DOCUMENT: Add a code example, link to usage, and screenshot of the output. ## Logs diff --git a/docusaurus/docs/develop/developer_guide/debug_tips.md b/docusaurus/docs/develop/developer_guide/debug_tips.md index 0ce4f0658..629fb97bd 100644 --- a/docusaurus/docs/develop/developer_guide/debug_tips.md +++ b/docusaurus/docs/develop/developer_guide/debug_tips.md @@ -14,11 +14,11 @@ If you have a tip you'd like to share with others, please open a PR to add it he - [`itest` - Investigating Flaky Tests](#itest---investigating-flaky-tests) - [`itest` Usage](#itest-usage) - [`itest` Example](#itest-example) - - [TODO: pprof](#todo-pprof) - - [TODO: dlv](#todo-dlv) - [`poktrolld query tx` - Investigating Failed Transactions](#poktrolld-query-tx---investigating-failed-transactions) - [`poktrolld query tx` Example](#poktrolld-query-tx-example) - + - [TODO_DOCUMENT: pprof](#todo_document-pprof) + - [TODO_DOCUMENT: dlv](#todo_document-dlv) + ## `itest` - Investigating Flaky Tests We developed a tool called `itest` to help with debugging flaky tests. It runs @@ -43,11 +43,11 @@ make itest 5 10 ./pkg/client/tx/... -- -run TxClient_SignAndBroadcast_Succeeds ## `poktrolld query tx` - Investigating Failed Transactions -_tl;dr Submitted Transaction != Committed Transaction_ +_tl;dr Submitted Transaction != Committed Transaction_ After a transaction (e.g. staking a new service) is successfully sent to an RPC node, we have to wait until the next block, when a proposer will try to commit to the network's state, to see if its valid. -If the transaction's (TX) state transition is invalid, it will not be committed. +If the transaction's (TX) state transition is invalid, it will not be committed. In other words, receiving a transaction (TX) hash from the `poktrolld` CLI doesn't mean it was committed. However, the transaction (TX) hash can be used to investigate the failed transaction. @@ -91,7 +91,7 @@ state transition. :::note -If you are reading this and the `9E4CA...` hash is no longer valid, we may have done a re-genesis of +If you are reading this and the `9E4CA...` hash is no longer valid, we may have done a re-genesis of TestNet at this point. Please consider updating with a new one! ::: @@ -115,6 +115,6 @@ The above command will produce the following output: ::: -### TODO: pprof +### TODO_DOCUMENT: pprof -### TODO: dlv +### TODO_DOCUMENT: dlv diff --git a/docusaurus/docs/develop/packages/client_package.md b/docusaurus/docs/develop/packages/client_package.md index cb2947d70..fe5e7ec33 100644 --- a/docusaurus/docs/develop/packages/client_package.md +++ b/docusaurus/docs/develop/packages/client_package.md @@ -118,13 +118,13 @@ go get github.com/pokt-network/poktroll/pkg/client ### Basic Example ```go -// TODO: Code example showcasing the use of TxClient or any other primary interface. +// TODO_DOCUMENT: Code example showcasing the use of TxClient or any other primary interface. ``` ### Advanced Usage ```go -// TODO: Example illustrating advanced features or edge cases of the package. +// TODO_DOCUMENT: Example illustrating advanced features or edge cases of the package. ``` ### Configuration diff --git a/docusaurus/docs/explore/rpc.md b/docusaurus/docs/explore/rpc.md index db5284514..4d1f7ec3d 100644 --- a/docusaurus/docs/explore/rpc.md +++ b/docusaurus/docs/explore/rpc.md @@ -29,8 +29,8 @@ poktrolld query block --type=height 0 --node https://shannon-testnet-grove-seed- ### gRPC -_TODO: Add a gRPC example_ +_TODO_TECHDEBT: Add a gRPC example_ ### REST -_TODO: Add a REST example_ +_TODO_TECHDEBT: Add a REST example_ diff --git a/docusaurus/docs/operate/run_a_node/appgate_server.md b/docusaurus/docs/operate/run_a_node/appgate_server.md index cf40e54cb..e0b63cbc5 100644 --- a/docusaurus/docs/operate/run_a_node/appgate_server.md +++ b/docusaurus/docs/operate/run_a_node/appgate_server.md @@ -39,8 +39,6 @@ Please see the [Hardware Requirements](./hardware_requirements.md#appgate-server Please refer to the `Deploying an AppGate Server` section in [poktroll-docker-compose-example](https://github.com/pokt-network/poktroll-docker-compose-example#deploying-an-appgate-server) GitHub repository on how to deploy an AppGate Server using `docker-compose`. -_TODO: Move over the relevant information from the `poktroll-docker-compose-example` repository into the docs_ - ## Kubernetes Example -_TODO: Provide an example using [strangelove-ventures/cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator)._ +_TODO_DOCUMENT: Provide an example using [strangelove-ventures/cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator)._ diff --git a/docusaurus/docs/operate/run_a_node/full_node_docker.md b/docusaurus/docs/operate/run_a_node/full_node_docker.md index aee02e3a8..13087c06e 100644 --- a/docusaurus/docs/operate/run_a_node/full_node_docker.md +++ b/docusaurus/docs/operate/run_a_node/full_node_docker.md @@ -20,7 +20,6 @@ In blockchain networks, a Full Node retains a complete copy of the ledger. You can visit the [Cosmos SDK documentation](https://docs.cosmos.network/main/user/run-node/run-node) for more information on Full Nodes. - ## Roles & Responsibilities It is usually responsible for: @@ -62,4 +61,4 @@ on how to deploy a Full Node using `docker-compose`. ## Kubernetes Example -_TODO: Provide an example using [strangelove-ventures/cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator)._ +_TODO_DOCUMENT: Provide an example using [strangelove-ventures/cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator)._ diff --git a/docusaurus/docs/operate/run_a_node/relay_miner.md b/docusaurus/docs/operate/run_a_node/relay_miner.md index 58e4b6014..b1f59be9d 100644 --- a/docusaurus/docs/operate/run_a_node/relay_miner.md +++ b/docusaurus/docs/operate/run_a_node/relay_miner.md @@ -38,8 +38,8 @@ Please see the [Hardware Requirements](./hardware_requirements.md#relayminer) pa Please refer to the `Deploying a RelayMiner` section in [poktroll-docker-compose-example](https://github.com/pokt-network/poktroll-docker-compose-example#deploying-a-relay-miner) GitHub repository on how to deploy an AppGate Server using `docker-compose`. -_TODO: Move over the relevant information from the `poktroll-docker-compose-example` repository into the docs_ +_TODO_DOCUMENT: Move over the relevant information from the `poktroll-docker-compose-example` repository into the docs_ ## Kubernetes Example -_TODO: Provide an example using [strangelove-ventures/cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator)._ +_TODO_DOCUMENT: Provide an example using [strangelove-ventures/cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator)._ diff --git a/docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md b/docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md index bac50f471..7617b5ce7 100644 --- a/docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md +++ b/docusaurus/docs/protocol/primitives/claim_and_proof_lifecycle.md @@ -374,7 +374,7 @@ deep cryptographic validations needed: :::note -TODO: Link to tokenomics and data integrity checks for discussion once they are written. +TODO_DOCUMENT: Link to tokenomics and data integrity checks for discussion once they are written. ::: diff --git a/e2e/tests/0_settlement.feature b/e2e/tests/0_settlement.feature index 94c4de9cc..fb3e228d6 100644 --- a/e2e/tests/0_settlement.feature +++ b/e2e/tests/0_settlement.feature @@ -74,7 +74,7 @@ Feature: Tokenomics Namespace Then the account balance of "supplier1" should be "449" uPOKT "more" than before And the "application" stake of "app1" should be "420" uPOKT "less" than before - # TODO_ADDTEST: Implement the following scenarios + # TODO_TEST: Implement the following scenarios # Scenario: Supplier revenue shares are properly distributed # Scenario: TLM Mint=Burn when a valid claim is outside Max Limits # - Ensure over serviced event is submitted diff --git a/e2e/tests/session.feature b/e2e/tests/session.feature index d1c3ca1d4..df5f3f66a 100644 --- a/e2e/tests/session.feature +++ b/e2e/tests/session.feature @@ -22,7 +22,7 @@ Feature: Session Namespace And the user should wait for the "proof" module "ProofSubmitted" tx event to be broadcast Then the claim created by supplier "supplier1" for service "anvil" for application "app1" should be successfully settled -# TODO_BLOCKER(@red-0ne): Make sure to implement and validate this test +# TODO_MAINNET(@red-0ne): Make sure to implement and validate this test # One way to exercise this behavior is to close the `RelayMiner` port to prevent # the `RelayRequest` from being received and processed then reopen it after the # the defined number of blocks has passed. diff --git a/localnet/kubernetes/anvil.yaml b/localnet/kubernetes/anvil.yaml index 9b890ca75..551d39b2b 100644 --- a/localnet/kubernetes/anvil.yaml +++ b/localnet/kubernetes/anvil.yaml @@ -13,7 +13,7 @@ spec: labels: app: anvil spec: - # TODO: Add resource limits + # TODO_IMPROVE: Add resource limits containers: - name: anvil image: ghcr.io/foundry-rs/foundry:nightly-3fa02706ca732c994715ba42d923605692062375 diff --git a/pkg/appgateserver/config/appgate_configs_reader.go b/pkg/appgateserver/config/appgate_configs_reader.go index 1936835ab..29c8c8f20 100644 --- a/pkg/appgateserver/config/appgate_configs_reader.go +++ b/pkg/appgateserver/config/appgate_configs_reader.go @@ -7,7 +7,7 @@ import ( ) // YAMLAppGateServerConfig is the structure used to unmarshal the AppGateServer config file -// TODO_BETA: Rename self_signing parameter to `sovereign` in code, configs +// TODO_BETA(@red-0ne): Rename self_signing parameter to `sovereign` in code, configs // and documentation type YAMLAppGateServerConfig struct { ListeningEndpoint string `yaml:"listening_endpoint"` diff --git a/pkg/appgateserver/server.go b/pkg/appgateserver/server.go index 29d3af1ee..ede1be059 100644 --- a/pkg/appgateserver/server.go +++ b/pkg/appgateserver/server.go @@ -120,9 +120,9 @@ func NewAppGateServer( app.signingInformation.AppAddress = appAddress.String() } - // TODO_CONSIDERATION: Use app.listeningEndpoint scheme to determine which + // TODO_IMPROVE: Use app.listeningEndpoint scheme to determine which // kind of server to create (HTTP, HTTPS, TCP, UNIX, etc...) - // TODO_RESEARCH(#590): Currently, the communication between the AppGateServer and the + // TODO_IMPROVE(#590): Currently, the communication between the AppGateServer and the // RelayMiner uses HTTP. This could be changed to a more generic and performant // one, such as pure TCP. app.server = &http.Server{Addr: app.listeningEndpoint.Host} diff --git a/pkg/client/query/sharedquerier.go b/pkg/client/query/sharedquerier.go index d3f3308d9..06e0ed90a 100644 --- a/pkg/client/query/sharedquerier.go +++ b/pkg/client/query/sharedquerier.go @@ -60,10 +60,10 @@ func (sq *sharedQuerier) GetParams(ctx context.Context) (*sharedtypes.Params, er // GetClaimWindowOpenHeight returns the block height at which the claim window of // the session that includes queryHeight opens. // -// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. +// TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. -// TODO_BLOCKER(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, +// TODO_MAINNET(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, // we should be using the value that the params had for the session which includes queryHeight. func (sq *sharedQuerier) GetClaimWindowOpenHeight(ctx context.Context, queryHeight int64) (int64, error) { sharedParams, err := sq.GetParams(ctx) @@ -76,10 +76,10 @@ func (sq *sharedQuerier) GetClaimWindowOpenHeight(ctx context.Context, queryHeig // GetProofWindowOpenHeight returns the block height at which the proof window of // the session that includes queryHeight opens. // -// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. +// TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. -// TODO_BLOCKER(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, +// TODO_MAINNET(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, // we should be using the value that the params had for the session which includes queryHeight. func (sq *sharedQuerier) GetProofWindowOpenHeight(ctx context.Context, queryHeight int64) (int64, error) { sharedParams, err := sq.GetParams(ctx) @@ -94,10 +94,10 @@ func (sq *sharedQuerier) GetProofWindowOpenHeight(ctx context.Context, queryHeig // The grace period is the number of blocks after the session ends during which relays // SHOULD be included in the session which most recently ended. // -// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. +// TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. -// TODO_BLOCKER(@bryanchriswhite, #543): We also don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We also don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session which includes queryHeight. func (sq *sharedQuerier) GetSessionGracePeriodEndHeight( ctx context.Context, @@ -113,10 +113,10 @@ func (sq *sharedQuerier) GetSessionGracePeriodEndHeight( // GetEarliestSupplierClaimCommitHeight returns the earliest block height at which a claim // for the session that includes queryHeight can be committed for a given supplier. // -// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. +// TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. -// TODO_BLOCKER(@bryanchriswhite, #543): We also don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We also don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session which includes queryHeight. func (sq *sharedQuerier) GetEarliestSupplierClaimCommitHeight(ctx context.Context, queryHeight int64, supplierOperatorAddr string) (int64, error) { sharedParams, err := sq.GetParams(ctx) @@ -146,10 +146,10 @@ func (sq *sharedQuerier) GetEarliestSupplierClaimCommitHeight(ctx context.Contex // GetEarliestSupplierProofCommitHeight returns the earliest block height at which a proof // for the session that includes queryHeight can be committed for a given supplier. // -// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. +// TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. -// TODO_BLOCKER(@bryanchriswhite, #543): We also don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We also don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session which includes queryHeight. func (sq *sharedQuerier) GetEarliestSupplierProofCommitHeight(ctx context.Context, queryHeight int64, supplierOperatorAddr string) (int64, error) { sharedParams, err := sq.GetParams(ctx) @@ -175,10 +175,10 @@ func (sq *sharedQuerier) GetEarliestSupplierProofCommitHeight(ctx context.Contex // GetComputeUnitsToTokensMultiplier returns the multiplier used to convert compute units to tokens. // -// TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. +// TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. -// TODO_BLOCKER(@bryanchriswhite, #543): We also don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We also don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session which includes queryHeight. func (sq *sharedQuerier) GetComputeUnitsToTokensMultiplier(ctx context.Context) (uint64, error) { sharedParams, err := sq.GetParams(ctx) diff --git a/pkg/crypto/rings/client.go b/pkg/crypto/rings/client.go index c33d5832e..8373be876 100644 --- a/pkg/crypto/rings/client.go +++ b/pkg/crypto/rings/client.go @@ -269,10 +269,10 @@ func (rc *ringClient) GetRingAddressesAtBlock( app *apptypes.Application, blockHeight int64, ) ([]string, error) { - // TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. + // TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last` method // to get the most recently (asynchronously) observed (and cached) value. - // TODO_BLOCKER(@bryanchriswhite, #543): We also don't really want to use the current value of the params. + // TODO_MAINNET(@bryanchriswhite, #543): We also don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session given by blockHeight. sharedParams, err := rc.sharedQuerier.GetParams(ctx) if err != nil { diff --git a/pkg/polylog/interface.go b/pkg/polylog/interface.go index b4ef28457..4f52edbbd 100644 --- a/pkg/polylog/interface.go +++ b/pkg/polylog/interface.go @@ -133,7 +133,7 @@ type Event interface { // To customize the key name, use the appropriate option from the respective // package when constructing a logger. // - // TODO_UPNEXT(@bryanchriswhite): ensure implementations' godoc examples cover + // TODO_POST_MAINNET(@bryanchriswhite): ensure implementations' godoc examples cover // options. Err(err error) Event @@ -141,7 +141,7 @@ type Event interface { // with the "time" key. To customize the key name, use the appropriate option // from the respective package when constructing a Logger. // - // TODO_UPNEXT(@bryanchriswhite): ensure implementations' godoc examples cover + // TODO_POST_MAINNET(@bryanchriswhite): ensure implementations' godoc examples cover // options. // // NOTE: It won't dedupe the "time" key if the Event (or *Context) has one diff --git a/pkg/relayer/config/types.go b/pkg/relayer/config/types.go index ba1411b14..8f72b0ff0 100644 --- a/pkg/relayer/config/types.go +++ b/pkg/relayer/config/types.go @@ -6,7 +6,7 @@ type RelayMinerServerType int const ( RelayMinerServerTypeHTTP RelayMinerServerType = iota - // TODO: Support other RelayMinerServerType: + // TODO_FUTURE: Support other RelayMinerServerType: // RelayMinerServerTypeHTTPS // RelayMinerServerTypeTCP // RelayMinerServerTypeUDP diff --git a/pkg/relayer/proxy/relay_verifier.go b/pkg/relayer/proxy/relay_verifier.go index f3b998c0f..a2df0f73a 100644 --- a/pkg/relayer/proxy/relay_verifier.go +++ b/pkg/relayer/proxy/relay_verifier.go @@ -102,10 +102,10 @@ func (rp *relayerProxy) getTargetSessionBlockHeight( currentHeight := rp.blockClient.LastBlock(ctx).Height() sessionEndHeight := relayRequest.Meta.SessionHeader.GetSessionEndBlockHeight() - // TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. + // TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. - // TODO_BLOCKER(@bryanchriswhite, #543): We also don't really want to use the current value of the params. + // TODO_MAINNET(@bryanchriswhite, #543): We also don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session given by sessionEndHeight. sharedParams, err := rp.sharedQuerier.GetParams(ctx) if err != nil { diff --git a/pkg/relayer/session/claim.go b/pkg/relayer/session/claim.go index ea508d1d8..61892f24c 100644 --- a/pkg/relayer/session/claim.go +++ b/pkg/relayer/session/claim.go @@ -104,10 +104,10 @@ func (rs *relayerSessionsManager) waitForEarliestCreateClaimsHeight( logger := rs.logger.With("session_end_height", sessionEndHeight) - // TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. + // TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. - // TODO_BLOCKER(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, + // TODO_MAINNET(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, // we should be using the value that the params had for the session which includes queryHeight. sharedParams, err := rs.sharedQueryClient.GetParams(ctx) if err != nil { diff --git a/pkg/relayer/session/proof.go b/pkg/relayer/session/proof.go index 9a1b61b03..f71341382 100644 --- a/pkg/relayer/session/proof.go +++ b/pkg/relayer/session/proof.go @@ -89,10 +89,10 @@ func (rs *relayerSessionsManager) waitForEarliestSubmitProofsHeightAndGeneratePr logger := rs.logger.With("session_end_height", sessionEndHeight) - // TODO_TECHDEBT(#543): We don't really want to have to query the params for every method call. + // TODO_MAINNET(#543): We don't really want to have to query the params for every method call. // Once `ModuleParamsClient` is implemented, use its replay observable's `#Last()` method // to get the most recently (asynchronously) observed (and cached) value. - // TODO_BLOCKER(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, + // TODO_MAINNET(@bryanchriswhite,#543): We also don't really want to use the current value of the params. Instead, // we should be using the value that the params had for the session which includes queryHeight. sharedParams, err := rs.sharedQueryClient.GetParams(ctx) if err != nil { diff --git a/tests/integration/service/relay_mining_difficulty_test.go b/tests/integration/service/relay_mining_difficulty_test.go index ffec64912..b907fa9fb 100644 --- a/tests/integration/service/relay_mining_difficulty_test.go +++ b/tests/integration/service/relay_mining_difficulty_test.go @@ -60,7 +60,7 @@ func TestUpdateRelayMiningDifficulty_NewServiceSeenForTheFirstTime(t *testing.T) trie := prepareSMST(t, sdkCtx, integrationApp, session, expectedNumRelays) // Compute the number of blocks to wait between different events - // TODO_BLOCKER(@bryanchriswhite): See this comment: https://github.com/pokt-network/poktroll/pull/610#discussion_r1645777322 + // TODO_BETA(@bryanchriswhite): See this comment: https://github.com/pokt-network/poktroll/pull/610#discussion_r1645777322 sessionEndHeight := session.Header.SessionEndBlockHeight earliestSupplierClaimCommitHeight := sharedtypes.GetEarliestSupplierClaimCommitHeight( &sharedParams, diff --git a/x/application/keeper/auto_undelegate.go b/x/application/keeper/auto_undelegate.go index e21ab2b4f..743bd7233 100644 --- a/x/application/keeper/auto_undelegate.go +++ b/x/application/keeper/auto_undelegate.go @@ -10,7 +10,7 @@ import ( // EndBlockerAutoUndelegateFromUnstakedGateways is called every block and handles // Application auto-undelegating from unstaked gateways. -// TODO_BLOCKER: Gateway unstaking should be delayed until the current block's +// TODO_BETA(@bryanchriswhite): Gateway unstaking should be delayed until the current block's // session end height to align with the application's pending undelegations. func (k Keeper) EndBlockerAutoUndelegateFromUnstakedGateways(ctx cosmostypes.Context) error { sdkCtx := cosmostypes.UnwrapSDKContext(ctx) diff --git a/x/application/keeper/msg_server_stake_application.go b/x/application/keeper/msg_server_stake_application.go index 49defb88b..2a6634a40 100644 --- a/x/application/keeper/msg_server_stake_application.go +++ b/x/application/keeper/msg_server_stake_application.go @@ -73,7 +73,7 @@ func (k msgServer) StakeApplication(ctx context.Context, msg *types.MsgStakeAppl // MUST ALWAYS have at least minimum stake. minStake := k.GetParams(ctx).MinStake - // TODO_CONSIDERATION: If we support multiple native tokens, we will need to + // TODO_POST_MAINNET: If we support multiple native tokens, we will need to // start checking the denom here. if msg.Stake.Amount.LT(minStake.Amount) { err = fmt.Errorf("application %q must stake at least %s", msg.GetAddress(), minStake) diff --git a/x/application/keeper/msg_server_unstake_application.go b/x/application/keeper/msg_server_unstake_application.go index e77f9a900..9a515c13f 100644 --- a/x/application/keeper/msg_server_unstake_application.go +++ b/x/application/keeper/msg_server_unstake_application.go @@ -12,7 +12,8 @@ import ( apptypes "github.com/pokt-network/poktroll/x/application/types" ) -// TODO(#489): Determine if an application needs an unbonding period after unstaking. +// UnstakeApplication kicks off the application unbonding process, at the end +// of which, it'll be fully unstaked. func (k msgServer) UnstakeApplication( ctx context.Context, msg *apptypes.MsgUnstakeApplication, diff --git a/x/application/module/simulation.go b/x/application/module/simulation.go index 1497b58b9..d78af4c66 100644 --- a/x/application/module/simulation.go +++ b/x/application/module/simulation.go @@ -24,27 +24,27 @@ var ( const ( opWeightMsgStakeApplication = "op_weight_msg_stake_application" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgStakeApplication int = 100 opWeightMsgUnstakeApplication = "op_weight_msg_unstake_application" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUnstakeApplication int = 100 opWeightMsgDelegateToGateway = "op_weight_msg_delegate_to_gateway" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgDelegateToGateway int = 100 opWeightMsgUndelegateFromGateway = "op_weight_msg_undelegate_from_gateway" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUndelegateFromGateway int = 100 opWeightMsgTransferApplication = "op_weight_msg_transfer_application" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgTransferApplication int = 100 opWeightMsgUpdateParam = "op_weight_msg_update_param" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUpdateParam int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/application/simulation/delegate_to_gateway.go b/x/application/simulation/delegate_to_gateway.go index f8230ef75..96d6efc0e 100644 --- a/x/application/simulation/delegate_to_gateway.go +++ b/x/application/simulation/delegate_to_gateway.go @@ -25,7 +25,7 @@ func SimulateMsgDelegateToGateway( GatewayAddress: simGatewayAccount.Address.String(), } - // TODO: Handling the DelegateToGateway simulation + // TODO_TECHDEBT: Handling the DelegateToGateway simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "DelegateToGateway simulation not implemented"), nil, nil } diff --git a/x/application/simulation/stake_application.go b/x/application/simulation/stake_application.go index 9e5c94ca3..36d773fde 100644 --- a/x/application/simulation/stake_application.go +++ b/x/application/simulation/stake_application.go @@ -23,7 +23,7 @@ func SimulateMsgStakeApplication( Address: simAccount.Address.String(), } - // TODO: Handling the StakeApplication simulation + // TODO_TECHDEBT: Handling the StakeApplication simulation // See the documentation here to simulate application staking: https://docs.cosmos.network/main/learn/advanced/simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(stakeMsg), "StakeApplication simulation not implemented"), nil, nil diff --git a/x/application/simulation/transfer_application.go b/x/application/simulation/transfer_application.go index ddd37d19c..9d99629d2 100644 --- a/x/application/simulation/transfer_application.go +++ b/x/application/simulation/transfer_application.go @@ -25,7 +25,7 @@ func SimulateMsgTransferApplication( DestinationAddress: simDstAppAccount.Address.String(), } - // TODO: Handling the TransferApplication simulation + // TODO_TECHDEBT: Handling the TransferApplication simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "TransferApplication simulation not implemented"), nil, nil } diff --git a/x/application/simulation/undelegate_from_gateway.go b/x/application/simulation/undelegate_from_gateway.go index 5f6badb68..f778b2504 100644 --- a/x/application/simulation/undelegate_from_gateway.go +++ b/x/application/simulation/undelegate_from_gateway.go @@ -25,7 +25,7 @@ func SimulateMsgUndelegateFromGateway( GatewayAddress: simGatewayAccount.Address.String(), } - // TODO: Handling the UndelegateFromGateway simulation + // TODO_TECHDEBT: Handling the UndelegateFromGateway simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UndelegateFromGateway simulation not implemented"), nil, nil } diff --git a/x/application/simulation/unstake_application.go b/x/application/simulation/unstake_application.go index 80e337110..fceba04b3 100644 --- a/x/application/simulation/unstake_application.go +++ b/x/application/simulation/unstake_application.go @@ -23,7 +23,7 @@ func SimulateMsgUnstakeApplication( Address: simAccount.Address.String(), } - // TODO: Handling the UnstakeApplication simulation + // TODO_TECHDEBT: Handling the UnstakeApplication simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UnstakeApplication simulation not implemented"), nil, nil } diff --git a/x/application/simulation/update_param.go b/x/application/simulation/update_param.go index 9910027e8..cbaefadb7 100644 --- a/x/application/simulation/update_param.go +++ b/x/application/simulation/update_param.go @@ -23,7 +23,7 @@ func SimulateMsgUpdateParam( Authority: simAccount.Address.String(), } - // TODO: Handling the UpdateParam simulation + // TODO_TECHDEBT: Handling the UpdateParam simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil } diff --git a/x/application/types/params.go b/x/application/types/params.go index 240c7ecd2..526b9d6cd 100644 --- a/x/application/types/params.go +++ b/x/application/types/params.go @@ -12,11 +12,11 @@ var ( KeyMaxDelegatedGateways = []byte("MaxDelegatedGateways") ParamMaxDelegatedGateways = "max_delegated_gateways" - // TODO_MAINNET: Determine the default value + // TODO_MAINNET(@olshansk): Determine the default value DefaultMaxDelegatedGateways uint64 = 7 KeyMinStake = []byte("MinStake") ParamMinStake = "min_stake" - // TODO_MAINNET: Determine the default value + // TODO_MAINNET(@olshansk): Determine the default value DefaultMinStake = cosmostypes.NewInt64Coin(volatile.DenomuPOKT, 1000000) // 1 POKT ) diff --git a/x/gateway/keeper/msg_server_unstake_gateway.go b/x/gateway/keeper/msg_server_unstake_gateway.go index 7aab1dc2f..2e09bec19 100644 --- a/x/gateway/keeper/msg_server_unstake_gateway.go +++ b/x/gateway/keeper/msg_server_unstake_gateway.go @@ -12,7 +12,7 @@ import ( "github.com/pokt-network/poktroll/x/gateway/types" ) -// TODO_BLOCKER(#489): Apps & gateways unbonding periods +// TODO_MAINNET(@bryanchriswhite): Implement Gateway unbonding periods func (k msgServer) UnstakeGateway( goCtx context.Context, msg *types.MsgUnstakeGateway, diff --git a/x/gateway/module/simulation.go b/x/gateway/module/simulation.go index 9b69e5bd0..7bc893005 100644 --- a/x/gateway/module/simulation.go +++ b/x/gateway/module/simulation.go @@ -24,15 +24,15 @@ var ( const ( opWeightMsgStakeGateway = "op_weight_msg_stake_gateway" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgStakeGateway int = 100 opWeightMsgUnstakeGateway = "op_weight_msg_unstake_gateway" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUnstakeGateway int = 100 opWeightMsgUpdateParam = "op_weight_msg_update_param" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUpdateParam int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/gateway/module/tx.go b/x/gateway/module/tx.go index a6b9cea86..1792814fa 100644 --- a/x/gateway/module/tx.go +++ b/x/gateway/module/tx.go @@ -10,7 +10,7 @@ import ( ) // GetTxCmd returns the transaction commands for this module -// TODO_MAINNET(#370): remove if custom query commands are consolidated into AutoCLI. +// TODO_TECHDEBT(#370): remove if custom query commands are consolidated into AutoCLI. func (am AppModule) GetTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, diff --git a/x/gateway/simulation/stake_gateway.go b/x/gateway/simulation/stake_gateway.go index d7a818c5b..4c6b42b51 100644 --- a/x/gateway/simulation/stake_gateway.go +++ b/x/gateway/simulation/stake_gateway.go @@ -23,7 +23,7 @@ func SimulateMsgStakeGateway( Address: simAccount.Address.String(), } - // TODO: Handling the StakeGateway simulation + // TODO_TECHDEBT: Handling the StakeGateway simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(stakeMsg), "StakeGateway simulation not implemented"), nil, nil } diff --git a/x/gateway/simulation/unstake_gateway.go b/x/gateway/simulation/unstake_gateway.go index 0f1f2f29c..9aa51cd59 100644 --- a/x/gateway/simulation/unstake_gateway.go +++ b/x/gateway/simulation/unstake_gateway.go @@ -23,7 +23,7 @@ func SimulateMsgUnstakeGateway( Address: simAccount.Address.String(), } - // TODO: Handling the UnstakeGateway simulation + // TODO_TECHDEBT: Handling the UnstakeGateway simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UnstakeGateway simulation not implemented"), nil, nil } diff --git a/x/gateway/simulation/update_param.go b/x/gateway/simulation/update_param.go index ec392f99a..f33530e95 100644 --- a/x/gateway/simulation/update_param.go +++ b/x/gateway/simulation/update_param.go @@ -23,7 +23,7 @@ func SimulateMsgUpdateParam( Authority: simAccount.Address.String(), } - // TODO: Handling the UpdateParam simulation + // TODO_TECHDEBT: Handling the UpdateParam simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil } diff --git a/x/proof/keeper/msg_server_create_claim.go b/x/proof/keeper/msg_server_create_claim.go index 6bfa498d5..01a5f509a 100644 --- a/x/proof/keeper/msg_server_create_claim.go +++ b/x/proof/keeper/msg_server_create_claim.go @@ -126,7 +126,7 @@ func (k msgServer) CreateClaim( Claim: &claim, NumRelays: numRelays, NumClaimedComputeUnits: numClaimComputeUnits, - // TODO_FOLLOWUP: Add NumEstimatedComputeUnits and ClaimedAmountUpokt + // TODO_BETA(@red-0ne): Add NumEstimatedComputeUnits and ClaimedAmountUpokt }, ) case false: @@ -135,7 +135,7 @@ func (k msgServer) CreateClaim( Claim: &claim, NumRelays: numRelays, NumClaimedComputeUnits: numClaimComputeUnits, - // TODO_FOLLOWUP: Add NumEstimatedComputeUnits and ClaimedAmountUpokt + // TODO_BETA(@red-0ne): Add NumEstimatedComputeUnits and ClaimedAmountUpokt }, ) } diff --git a/x/proof/keeper/msg_server_submit_proof.go b/x/proof/keeper/msg_server_submit_proof.go index 625c29e68..6496a3f30 100644 --- a/x/proof/keeper/msg_server_submit_proof.go +++ b/x/proof/keeper/msg_server_submit_proof.go @@ -143,7 +143,7 @@ func (k msgServer) SubmitProof( Proof: &proof, NumRelays: numRelays, NumClaimedComputeUnits: numClaimComputeUnits, - // TODO_FOLLOWUP: Add NumEstimatedComputeUnits and ClaimedAmountUpokt + // TODO_BETA(@red-0ne): Add NumEstimatedComputeUnits and ClaimedAmountUpokt }, ) case false: @@ -153,7 +153,7 @@ func (k msgServer) SubmitProof( Proof: &proof, NumRelays: numRelays, NumClaimedComputeUnits: numClaimComputeUnits, - // TODO_FOLLOWUP: Add NumEstimatedComputeUnits and ClaimedAmountUpokt + // TODO_BETA(@red-0ne): Add NumEstimatedComputeUnits and ClaimedAmountUpokt }, ) } @@ -212,7 +212,7 @@ func (k Keeper) deductProofSubmissionFee(ctx context.Context, supplierOperatorAd // ProofRequirementForClaim checks if a proof is required for a claim. // If it is not, the claim will be settled without a proof. // If it is, the claim will only be settled if a valid proof is available. -// TODO_BLOCKER(@olshansk, #419): Document safety assumptions of the probabilistic proofs mechanism. +// TODO_BETA(@olshansk): Document safety assumptions of the probabilistic proofs mechanism. func (k Keeper) ProofRequirementForClaim(ctx context.Context, claim *types.Claim) (_ types.ProofRequirementReason, err error) { logger := k.logger.With("method", "proofRequirementForClaim") @@ -241,9 +241,9 @@ func (k Keeper) ProofRequirementForClaim(ctx context.Context, claim *types.Claim } // Require a proof if the claim's compute units meets or exceeds the threshold. - // TODO_MAINNET(@olshansk, @red-0ne): Should the threshold be dependant on the stake as well + // TODO_BETA(@red-0ne): Should the threshold be dependant on the stake as well // so we slash proportional to the compute units? - // TODO_IMPROVE(@red-0ne): It might make sense to include whether there was a proof + // TODO_BETA(@red-0ne): It might make sense to include whether there was a proof // submission error downstream from here. This would require a more comprehensive metrics API. if claimeduPOKT.Amount.GTE(proofParams.GetProofRequirementThreshold().Amount) { requirementReason = types.ProofRequirementReason_THRESHOLD @@ -309,7 +309,7 @@ func (k Keeper) getProofRequirementSeedBlockHash( proofWindowOpenHeight := sharedtypes.GetProofWindowOpenHeight(sharedParams, sessionEndHeight) proofWindowOpenBlockHash := k.sessionKeeper.GetBlockHash(ctx, proofWindowOpenHeight) - // TODO_TECHDEBT(@red-0ne): Update the method header of this function to accept (sharedParams, Claim, BlockHash). + // TODO_BETA(@red-0ne): Update the method header of this function to accept (sharedParams, Claim, BlockHash). // After doing so, please review all calling sites and simplify them accordingly. earliestSupplierProofCommitHeight := sharedtypes.GetEarliestSupplierProofCommitHeight( sharedParams, diff --git a/x/proof/keeper/msg_server_submit_proof_test.go b/x/proof/keeper/msg_server_submit_proof_test.go index a0ba84b44..3e6193e9d 100644 --- a/x/proof/keeper/msg_server_submit_proof_test.go +++ b/x/proof/keeper/msg_server_submit_proof_test.go @@ -238,7 +238,7 @@ func TestMsgServer_SubmitProof_Success(t *testing.T) { require.EqualValues(t, &proofs[0], proofSubmittedEvent.GetProof()) require.Equal(t, uint64(numRelays), proofSubmittedEvent.GetNumRelays()) require.Equal(t, uint64(numClaimComputeUnits), proofSubmittedEvent.GetNumClaimedComputeUnits()) - // TODO_FOLLOWUP: Add NumEstimatedComputeUnits and ClaimedAmountUpokt assertions + // TODO_BETA(@red-0ne): Add NumEstimatedComputeUnits and ClaimedAmountUpokt assertions }) } } diff --git a/x/proof/keeper/proof_requirement_test.go b/x/proof/keeper/proof_requirement_test.go index fb413e564..054080c0e 100644 --- a/x/proof/keeper/proof_requirement_test.go +++ b/x/proof/keeper/proof_requirement_test.go @@ -34,7 +34,7 @@ func TestKeeper_IsProofRequired(t *testing.T) { numTrueSamples atomic.Int64 ) - // TODO_BETA(@bryanchriswhite): This test is periodically flaky but theoretically shouldn't be. + // TODO_TECHDEBT(@bryanchriswhite): This test is periodically flaky but theoretically shouldn't be. // What can we do to increase it's consistency without diving tolerance by 2? sampleSize := poktrand.RequiredSampleSize(float64(probability), tolerance/2, confidence) diff --git a/x/proof/keeper/proof_validation.go b/x/proof/keeper/proof_validation.go index 46a0af656..614c5cf03 100644 --- a/x/proof/keeper/proof_validation.go +++ b/x/proof/keeper/proof_validation.go @@ -246,7 +246,7 @@ func (k Keeper) validateClosestPath( // be received before proceeding. proofPathSeedBlockHash := k.sessionKeeper.GetBlockHash(ctx, earliestSupplierProofCommitHeight-1) - // TODO_BETA: Investigate "proof for the path provided does not match one expected by the on-chain protocol" + // TODO_BETA(@red-0ne): Investigate "proof for the path provided does not match one expected by the on-chain protocol" // error that may occur due to block height differing from the off-chain part. k.logger.Info("E2E_DEBUG: height for block hash when verifying the proof", earliestSupplierProofCommitHeight, sessionHeader.GetSessionId()) diff --git a/x/proof/keeper/session.go b/x/proof/keeper/session.go index 0d8bb446a..9d33d76c6 100644 --- a/x/proof/keeper/session.go +++ b/x/proof/keeper/session.go @@ -105,7 +105,7 @@ func (k Keeper) validateClaimWindow( currentHeight := sdkCtx.BlockHeight() // Ensure the current block height is ON or AFTER the supplier's earliest claim commit height. - // TODO_BLOCKER(@bryanchriswhite, @red-0ne): Enforce an additional "latest + // TODO_MAINNET(@bryanchriswhite, @red-0ne): Enforce an additional "latest // supplier claim/proof commit offset" such that all suppliers have the same // "supplier claim/proof commit window" size. // See: https://github.com/pokt-network/poktroll/pull/620/files#r1656548473. diff --git a/x/proof/module/simulation.go b/x/proof/module/simulation.go index ff38e4758..3cc2a02f3 100644 --- a/x/proof/module/simulation.go +++ b/x/proof/module/simulation.go @@ -24,15 +24,15 @@ var ( const ( opWeightMsgCreateClaim = "op_weight_msg_create_claim" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgCreateClaim int = 100 opWeightMsgSubmitProof = "op_weight_msg_submit_proof" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgSubmitProof int = 100 opWeightMsgUpdateParam = "op_weight_msg_update_param" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUpdateParam int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/proof/module/tx_create_claim.go b/x/proof/module/tx_create_claim.go index b2d57615c..32622041c 100644 --- a/x/proof/module/tx_create_claim.go +++ b/x/proof/module/tx_create_claim.go @@ -14,7 +14,7 @@ import ( sessiontypes "github.com/pokt-network/poktroll/x/session/types" ) -// TODO(@bryanchriswhite): Add unit tests for the CLI command when implementing the business logic. +// TODO_TEST(@bryanchriswhite): Add unit tests for the CLI command when implementing the business logic. func CmdCreateClaim() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/proof/module/tx_submit_proof.go b/x/proof/module/tx_submit_proof.go index d1b161052..72aa20d00 100644 --- a/x/proof/module/tx_submit_proof.go +++ b/x/proof/module/tx_submit_proof.go @@ -15,7 +15,7 @@ import ( sessiontypes "github.com/pokt-network/poktroll/x/session/types" ) -// TODO(@bryanchriswhite): Add unit tests for the CLI command when implementing the business logic. +// TODO_TECHDEBT(@bryanchriswhite): Add unit tests for the CLI command when implementing the business logic. var _ = strconv.Itoa(0) diff --git a/x/proof/simulation/create_claim.go b/x/proof/simulation/create_claim.go index 0f6bd5419..a953935ef 100644 --- a/x/proof/simulation/create_claim.go +++ b/x/proof/simulation/create_claim.go @@ -22,7 +22,7 @@ func SimulateMsgCreateClaim( SupplierOperatorAddress: simAccount.Address.String(), } - // TODO: Handling the CreateClaim simulation + // TODO_TECHDEBT: Handling the CreateClaim simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "CreateClaim simulation not implemented"), nil, nil } diff --git a/x/proof/simulation/submit_proof.go b/x/proof/simulation/submit_proof.go index b7261296c..84b4acef4 100644 --- a/x/proof/simulation/submit_proof.go +++ b/x/proof/simulation/submit_proof.go @@ -22,7 +22,7 @@ func SimulateMsgSubmitProof( SupplierOperatorAddress: simAccount.Address.String(), } - // TODO: Handling the SubmitProof simulation + // TODO_TECHDEBT: Handling the SubmitProof simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "SubmitProof simulation not implemented"), nil, nil } diff --git a/x/proof/simulation/update_param.go b/x/proof/simulation/update_param.go index 3f7198f1c..3f617a169 100644 --- a/x/proof/simulation/update_param.go +++ b/x/proof/simulation/update_param.go @@ -22,7 +22,7 @@ func SimulateMsgUpdateParam( Authority: simAccount.Address.String(), } - // TODO: Handling the UpdateParam simulation + // TODO_TECHDEBT: Handling the UpdateParam simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil } diff --git a/x/proof/types/shared_query_client.go b/x/proof/types/shared_query_client.go index df05ec113..574735e7e 100644 --- a/x/proof/types/shared_query_client.go +++ b/x/proof/types/shared_query_client.go @@ -42,7 +42,7 @@ func (sqc *SharedKeeperQueryClient) GetParams( // The grace period is the number of blocks after the session ends during which relays // SHOULD be included in the session which most recently ended. // -// TODO_BLOCKER(@bryanchriswhite, #543): We don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session given by blockHeight. func (sqc *SharedKeeperQueryClient) GetSessionGracePeriodEndHeight( ctx context.Context, @@ -55,7 +55,7 @@ func (sqc *SharedKeeperQueryClient) GetSessionGracePeriodEndHeight( // GetClaimWindowOpenHeight returns the block height at which the claim window of // the session that includes queryHeight opens. // -// TODO_BLOCKER(@bryanchriswhite, #543): We don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session given by blockHeight. func (sqc *SharedKeeperQueryClient) GetClaimWindowOpenHeight( ctx context.Context, @@ -68,7 +68,7 @@ func (sqc *SharedKeeperQueryClient) GetClaimWindowOpenHeight( // GetProofWindowOpenHeight returns the block height at which the proof window of // the session that includes queryHeight opens. // -// TODO_BLOCKER(@bryanchriswhite, #543): We don't really want to use the current value of the params. +// TODO_MAINNET(@bryanchriswhite, #543): We don't really want to use the current value of the params. // Instead, we should be using the value that the params had for the session given by blockHeight. func (sqc *SharedKeeperQueryClient) GetProofWindowOpenHeight( ctx context.Context, diff --git a/x/service/keeper/msg_server_add_service.go b/x/service/keeper/msg_server_add_service.go index 6df0bb60c..52fe8365e 100644 --- a/x/service/keeper/msg_server_add_service.go +++ b/x/service/keeper/msg_server_add_service.go @@ -47,7 +47,7 @@ func (k msgServer) AddService( ) } return nil, types.ErrServiceAlreadyExists.Wrapf( - "TODO(@adshmh): This is an ephemeral state of the code. Once we s/AddService/UpdateService/g, add the business logic here for updates here.", + "TODO_MAINNET(@red-0ne): This is an ephemeral state of the code. Once we s/AddService/UpdateService/g, add the business logic here for updates here.", ) } diff --git a/x/service/module/simulation.go b/x/service/module/simulation.go index 770624242..6853680b2 100644 --- a/x/service/module/simulation.go +++ b/x/service/module/simulation.go @@ -24,7 +24,7 @@ var ( const ( opWeightMsgAddService = "op_weight_msg_add_service" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgAddService int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/service/module/tx_add_service.go b/x/service/module/tx_add_service.go index dc5b6c911..e0e85fa1d 100644 --- a/x/service/module/tx_add_service.go +++ b/x/service/module/tx_add_service.go @@ -1,6 +1,6 @@ package service -// TODO_BETA: Add `UpdateService` or modify `AddService` to `UpsertService` to allow service owners +// TODO_MAINNET(@red-0ne): Add `UpdateService` or modify `AddService` to `UpsertService` to allow service owners // to update parameters of existing services. This will requiring updating `proto/poktroll/service/tx.proto` and // all downstream code paths. import ( @@ -18,7 +18,7 @@ import ( var _ = strconv.Itoa(0) -// TODO_UPNEXT: Change `add-service` to `update-service` so the source owner can +// TODO_MAINNET(@red-0ne): Change `add-service` to `update-service` so the source owner can // update the compute units per relay for an existing service. Make it possible // to update a service (e.g. update # of compute units per relay). This will require // search for all variations of `AddService` in the codebase (filenames, helpers, etc...), diff --git a/x/service/simulation/add_service.go b/x/service/simulation/add_service.go index dc9a13c30..022a81e9a 100644 --- a/x/service/simulation/add_service.go +++ b/x/service/simulation/add_service.go @@ -23,7 +23,7 @@ func SimulateMsgAddService( OwnerAddress: simAccount.Address.String(), } - // TODO: Handling the AddService simulation + // TODO_TECHDEBT: Handling the AddService simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "AddService simulation not implemented"), nil, nil } diff --git a/x/service/types/params.go b/x/service/types/params.go index a454d86f1..b9bc3026b 100644 --- a/x/service/types/params.go +++ b/x/service/types/params.go @@ -10,7 +10,7 @@ import ( // DefaultAddServiceFee is the default value for the add service fee // parameter in the genesis state of the service module. -// TODO_BETA: Revisit default param values for service fee +// TODO_MAINNET: Revisit default param values for service fee var ( _ paramtypes.ParamSet = (*Params)(nil) diff --git a/x/service/types/relay.go b/x/service/types/relay.go index 1200c6697..2824538de 100644 --- a/x/service/types/relay.go +++ b/x/service/types/relay.go @@ -82,7 +82,7 @@ func (res RelayResponse) GetSignableBytesHash() ([protocol.RelayHasherSize]byte, // and SupplierOperatorSignature fields. // TODO_TEST: Add tests for RelayResponse validation func (res *RelayResponse) ValidateBasic() error { - // TODO: if a client gets a response with an invalid/incomplete + // TODO_POST_MAINNET: if a client gets a response with an invalid/incomplete // SessionHeader, consider sending an on-chain challenge, lowering their // QoS, or other future work. diff --git a/x/session/keeper/session_hydrator.go b/x/session/keeper/session_hydrator.go index bde2f6dbf..5f259aa78 100644 --- a/x/session/keeper/session_hydrator.go +++ b/x/session/keeper/session_hydrator.go @@ -60,7 +60,6 @@ func NewSessionHydrator( // GetSession implements of the exposed `UtilityModule.GetSession` function // TECHDEBT(#519,#348): Add custom error types depending on the type of issue that occurred and assert on them in the unit tests. -// TODO_BETA: Consider returning an error if the application's stake has become very low. func (k Keeper) HydrateSession(ctx context.Context, sh *sessionHydrator) (*types.Session, error) { logger := k.Logger().With("method", "hydrateSession") @@ -102,8 +101,8 @@ func (k Keeper) hydrateSessionMetadata(ctx context.Context, sh *sessionHydrator) ) } - // TODO_BLOCKER(@bryanchriswhite, #543): If the num_blocks_per_session param has ever been changed, - // this function may cause unexpected behavior for historical sessions. + // TODO_MAINNET(@bryanchriswhite, #543): If the num_blocks_per_session param + // has ever been changed, this function may cause unexpected behavior for historical sessions. sharedParams := k.sharedKeeper.GetParams(ctx) sh.session.NumBlocksPerSession = int64(sharedParams.NumBlocksPerSession) sh.session.SessionNumber = sharedtypes.GetSessionNumber(&sharedParams, sh.blockHeight) @@ -220,7 +219,7 @@ func (k Keeper) hydrateSessionSuppliers(ctx context.Context, sh *sessionHydrator return nil } -// TODO_BETA: We are using a `Go` native implementation for a pseudo-random +// TODO_MAINNET: We are using a `Go` native implementation for a pseudo-random // number generator. In order for it to be language agnostic, a general purpose // algorithm MUST be used. pseudoRandomSelection returns a random subset of the // candidates. diff --git a/x/session/module/module.go b/x/session/module/module.go index 3738b5331..86c88be84 100644 --- a/x/session/module/module.go +++ b/x/session/module/module.go @@ -149,7 +149,7 @@ func (am AppModule) BeginBlock(_ context.Context) error { // EndBlock contains the logic that is automatically triggered at the end of each block. // The end block implementation is optional. -// TODO_TECHDEBT( @red-0ne): Add unit/integration tests for this. +// TODO_TEST( @red-0ne): Add unit/integration tests for this. func (am AppModule) EndBlock(ctx context.Context) error { logger := am.keeper.Logger().With("EndBlock", "SessionModuleEndBlock") sdkCtx := sdk.UnwrapSDKContext(ctx) diff --git a/x/shared/module/simulation.go b/x/shared/module/simulation.go index a01d2077e..4e580e541 100644 --- a/x/shared/module/simulation.go +++ b/x/shared/module/simulation.go @@ -24,7 +24,7 @@ var ( const ( opWeightMsgUpdateParam = "op_weight_msg_update_param" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUpdateParam int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/shared/simulation/update_param.go b/x/shared/simulation/update_param.go index 6ea20fe4e..983e35eff 100644 --- a/x/shared/simulation/update_param.go +++ b/x/shared/simulation/update_param.go @@ -23,7 +23,7 @@ func SimulateMsgUpdateParam( Authority: simAccount.Address.String(), } - // TODO: Handling the UpdateParam simulation + // TODO_TECHDEBT: Handling the UpdateParam simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil } diff --git a/x/shared/types/service_configs.go b/x/shared/types/service_configs.go index 2538d3152..122a10241 100644 --- a/x/shared/types/service_configs.go +++ b/x/shared/types/service_configs.go @@ -72,7 +72,7 @@ func ValidateSupplierServiceConfigs(services []*SupplierServiceConfig) error { return fmt.Errorf("endpoint.RpcType is not a valid RPCType: %v", serviceConfig) } - // TODO_MAINNET(@okdas)/TODO_DISCUSS: Either add validation for `endpoint.Configs` (can be a part of + // TODO_MAINNET(@okdas): Either add validation for `endpoint.Configs` (can be a part of // `parseEndpointConfigs`), or change the config structure to be more clear about what is expected here // as currently, this is just a map[string]string, when values can be other types. // if endpoint.Configs == nil { diff --git a/x/shared/types/session.go b/x/shared/types/session.go index 6aedd87e5..ea75a0e3b 100644 --- a/x/shared/types/session.go +++ b/x/shared/types/session.go @@ -11,7 +11,7 @@ func GetSessionStartHeight(sharedParams *Params, queryHeight int64) int64 { numBlocksPerSession := int64(sharedParams.GetNumBlocksPerSession()) - // TODO_BLOCKER(@bryanchriswhite, #543): If the num_blocks_per_session param has ever been changed, + // TODO_BETA(@bryanchriswhite, #543): If the num_blocks_per_session param has ever been changed, // this function may cause unexpected behavior. return queryHeight - ((queryHeight - 1) % numBlocksPerSession) } @@ -44,7 +44,7 @@ func GetSessionNumber(sharedParams *Params, queryHeight int64) int64 { numBlocksPerSession := int64(sharedParams.GetNumBlocksPerSession()) - // TODO_BLOCKER(@bryanchriswhite, #543): If the num_blocks_per_session param has ever been changed, + // TODO_MAINNET(@bryanchriswhite, #543): If the num_blocks_per_session param has ever been changed, // this function may cause unexpected behavior. return ((queryHeight - 1) / numBlocksPerSession) + 1 } @@ -99,7 +99,7 @@ func GetProofWindowCloseHeight(sharedParams *Params, queryHeight int64) int64 { // GetEarliestSupplierClaimCommitHeight returns the earliest block height at which a claim // for the session that includes queryHeight can be committed for a given supplier // and the passed sharedParams. -// TODO_CLEANUP_DELETE(@red-0ne, @olshansk): Having claim distribution windows was +// TODO_TECHDEBT(@red-0ne): Having claim distribution windows was // a requirement that was never determined to be necessary, but implemented regardless. // We are keeping around the functions but TBD whether it is deemed necessary. The results // of #711 are tengentially related to this requirement, after which the functions, @@ -126,7 +126,7 @@ func GetEarliestSupplierClaimCommitHeight( // GetEarliestSupplierProofCommitHeight returns the earliest block height at which a proof // for the session that includes queryHeight can be committed for a given supplier // and the passed sharedParams. -// TODO_CLEANUP_DELETE(@red-0ne, @olshansk): Having proof distribution windows was +// TODO_TECHDEBT(@red-0ne): Having proof distribution windows was // a requirement that was never determined to be necessary, but implemented regardless. // We are keeping around the functions but TBD whether it is deemed necessary. The results // of #711 are tengentially related to this requirement, after which the functions, diff --git a/x/supplier/keeper/msg_server_stake_supplier.go b/x/supplier/keeper/msg_server_stake_supplier.go index f8eb5f548..a23392fd6 100644 --- a/x/supplier/keeper/msg_server_stake_supplier.go +++ b/x/supplier/keeper/msg_server_stake_supplier.go @@ -228,7 +228,7 @@ func (k msgServer) updateSupplier( // Update activation height for services update. New services are activated at the // end of the current session, while existing ones keep their activation height. - // TODO_CONSIDERAION: Service removal should take effect at the beginning of the + // TODO_MAINNET: Service removal should take effect at the beginning of the // next session, otherwise sessions that are fetched at their start height may // still include Suppliers that no longer provide the services they removed. // For the same reason, any SupplierEndpoint change should take effect at the diff --git a/x/supplier/module/abci.go b/x/supplier/module/abci.go index 86e463ea5..095e33501 100644 --- a/x/supplier/module/abci.go +++ b/x/supplier/module/abci.go @@ -8,7 +8,7 @@ import ( // EndBlocker is called every block and handles supplier related updates. func EndBlocker(ctx sdk.Context, k keeper.Keeper) error { - // TODO_IMPROVE(@red-0ne): Add logs and/or telemetry on the number of unbonded suppliers. + // TODO_IMPROVE: Add logs and/or telemetry on the number of unbonded suppliers. if err := k.EndBlockerUnbondSuppliers(ctx); err != nil { return err } diff --git a/x/supplier/module/query.go b/x/supplier/module/query.go index 7802db00e..b49ebf142 100644 --- a/x/supplier/module/query.go +++ b/x/supplier/module/query.go @@ -10,7 +10,7 @@ import ( ) // GetQueryCmd returns the cli query commands for this module -// TODO_MAINNET(#370): remove if custom query commands are consolidated into AutoCLI. +// TODO_TECHDEBT(#370): remove if custom query commands are consolidated into AutoCLI. func (am AppModule) GetQueryCmd() *cobra.Command { // Group supplier queries under a subcommand cmd := &cobra.Command{ diff --git a/x/supplier/module/simulation.go b/x/supplier/module/simulation.go index 3f0c913e2..16a45c896 100644 --- a/x/supplier/module/simulation.go +++ b/x/supplier/module/simulation.go @@ -24,15 +24,15 @@ var ( const ( opWeightMsgStakeSupplier = "op_weight_msg_stake_supplier" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgStakeSupplier int = 100 opWeightMsgUnstakeSupplier = "op_weight_msg_unstake_supplier" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUnstakeSupplier int = 100 opWeightMsgUpdateParam = "op_weight_msg_update_param" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUpdateParam int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/supplier/module/tx.go b/x/supplier/module/tx.go index 78d16f011..50bd4dde2 100644 --- a/x/supplier/module/tx.go +++ b/x/supplier/module/tx.go @@ -10,7 +10,7 @@ import ( ) // GetTxCmd returns the transaction commands for this module -// TODO_MAINNET(#370): remove if custom query commands are consolidated into AutoCLI. +// TODO_TECHDEBT: remove if custom query commands are consolidated into AutoCLI. func (am AppModule) GetTxCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, diff --git a/x/supplier/simulation/stake_supplier.go b/x/supplier/simulation/stake_supplier.go index 144236c9c..3b01e55bd 100644 --- a/x/supplier/simulation/stake_supplier.go +++ b/x/supplier/simulation/stake_supplier.go @@ -21,10 +21,10 @@ func SimulateMsgStakeSupplier( simAccount, _ := simtypes.RandomAcc(r, accs) msg := &types.MsgStakeSupplier{ OperatorAddress: simAccount.Address.String(), - // TODO: Update all stake message fields + // TODO_TECHDEBT: Update all stake message fields } - // TODO: Handling the StakeSupplier simulation + // TODO_TECHDEBT: Handling the StakeSupplier simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "StakeSupplier simulation not implemented"), nil, nil } diff --git a/x/supplier/simulation/unstake_supplier.go b/x/supplier/simulation/unstake_supplier.go index 16843fb06..00619bffd 100644 --- a/x/supplier/simulation/unstake_supplier.go +++ b/x/supplier/simulation/unstake_supplier.go @@ -23,7 +23,7 @@ func SimulateMsgUnstakeSupplier( OperatorAddress: simAccount.Address.String(), } - // TODO: Handling the UnstakeSupplier simulation + // TODO_TECHDEBT: Handling the UnstakeSupplier simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UnstakeSupplier simulation not implemented"), nil, nil } diff --git a/x/supplier/simulation/update_param.go b/x/supplier/simulation/update_param.go index cf9b8aa8e..03a062849 100644 --- a/x/supplier/simulation/update_param.go +++ b/x/supplier/simulation/update_param.go @@ -23,7 +23,7 @@ func SimulateMsgUpdateParam( Authority: simAccount.Address.String(), } - // TODO: Handling the UpdateParam simulation + // TODO_TECHDEBT: Handling the UpdateParam simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil } diff --git a/x/supplier/types/genesis.go b/x/supplier/types/genesis.go index d63612fd1..95524ca95 100644 --- a/x/supplier/types/genesis.go +++ b/x/supplier/types/genesis.go @@ -32,7 +32,7 @@ func (gs GenesisState) Validate() error { // Check that the stake value for the suppliers is valid for _, supplier := range gs.SupplierList { - // TODO_MAINNET: Consider creating shared helpers across the board for stake validation, + // TODO_TECHDEBT: Consider creating shared helpers across the board for stake validation, // similar to how we have `ValidateAppServiceConfigs` below if supplier.Stake == nil { return ErrSupplierInvalidStake.Wrapf("nil stake amount for supplier") diff --git a/x/tokenomics/keeper/keeper_settle_pending_claims_test.go b/x/tokenomics/keeper/keeper_settle_pending_claims_test.go index aebde6324..4f49ed939 100644 --- a/x/tokenomics/keeper/keeper_settle_pending_claims_test.go +++ b/x/tokenomics/keeper/keeper_settle_pending_claims_test.go @@ -43,7 +43,7 @@ func init() { cmd.InitSDKConfig() } -// TODO_TECHDEBT(@olshansk): Consolidate the setup for all tests that use TokenomicsModuleKeepers +// TODO_TECHDEBT: Consolidate the setup for all tests that use TokenomicsModuleKeepers type TestSuite struct { suite.Suite diff --git a/x/tokenomics/keeper/settle_pending_claims.go b/x/tokenomics/keeper/settle_pending_claims.go index e4d0a7814..fd314d9b2 100644 --- a/x/tokenomics/keeper/settle_pending_claims.go +++ b/x/tokenomics/keeper/settle_pending_claims.go @@ -128,7 +128,7 @@ func (k Keeper) SettlePendingClaims(ctx sdk.Context) ( // If the proof is missing or invalid -> expire it if expirationReason != tokenomicstypes.ClaimExpirationReason_EXPIRATION_REASON_UNSPECIFIED { - // TODO_BETA(@red-0ne, @olshansk): Slash the supplier in proportion + // TODO_BETA(@red-0ne): Slash the supplier in proportion // to their stake. Consider allowing suppliers to RemoveClaim via a new // message in case it was sent by accident diff --git a/x/tokenomics/keeper/token_logic_modules.go b/x/tokenomics/keeper/token_logic_modules.go index c50cb0f92..6272d33d3 100644 --- a/x/tokenomics/keeper/token_logic_modules.go +++ b/x/tokenomics/keeper/token_logic_modules.go @@ -27,7 +27,7 @@ import ( var ( // Governance parameters for the TLMGlobalMint module - // TODO_UPNEXT(@olshansk, #732): Make this a governance parameter and give it a non-zero value + tests. + // TODO_BETA(@red-0ne): Make this a governance parameter and give it a non-zero value + tests. MintPerClaimedTokenGlobalInflation = 0.1 ) @@ -115,7 +115,7 @@ func init() { panic("mint allocation percentages do not add to 1.0") } - // TODO_UPNEXT(@Olshansk): Ensure that if `TLMGlobalMint` is present in the map, + // TODO_BETA(@red-0ne): Ensure that if `TLMGlobalMint` is present in the map, // then TLMGlobalMintReimbursementRequest will need to be there too. } @@ -292,8 +292,7 @@ func (k Keeper) ProcessTokenLogicModules( logger.Info(fmt.Sprintf("Finished TLM processing: %q", tlm)) } - // TODO_CONSIDERATION: If we support multiple native tokens, we will need to - // start checking the denom here. + // TODO_POST_MAINNET: If we support multiple native tokens, we will need to start checking the denom here. sessionEndHeight := sharedtypes.GetSessionEndHeight(&sharedParams, cosmostypes.UnwrapSDKContext(ctx).BlockHeight()) if application.Stake.Amount.LT(apptypes.DefaultMinStake.Amount) { // Mark the application as unbonding if it has less than the minimum stake. @@ -406,7 +405,7 @@ func (k Keeper) TokenLogicModuleGlobalMint( logger := k.Logger().With("method", "TokenLogicModuleGlobalMint") if MintPerClaimedTokenGlobalInflation == 0 { - // TODO_UPNEXT(@olshansk): Make sure to skip GMRR TLM in this case as well. + // TODO_BETA(@red-0ne): Make sure to skip GMRR TLM in this case as well. logger.Warn("global inflation is set to zero. Skipping Global Mint TLM.") return nil } @@ -567,7 +566,7 @@ func (k Keeper) ensureClaimAmountLimits( ) { logger = logger.With("helper", "ensureClaimAmountLimits") - // TODO_BETA_OR_MAINNET(@red-0ne): The application stake gets reduced with every claim + // TODO_BETA(@red-0ne): The application stake gets reduced with every claim // settlement. Relay miners use the appStake at the beginning of a session to determine // the maximum amount they can claim. We need to somehow access and propagate this // value (via context?) so it is the same for all TLM processors for each claim. @@ -668,7 +667,7 @@ func (k Keeper) distributeSupplierRewardsToShareHolders( // the settlement amount for a particular claim(s) or session(s). func calculateGlobalPerClaimMintInflationFromSettlementAmount(settlementCoin sdk.Coin) (sdk.Coin, big.Float) { // Determine how much new uPOKT to mint based on global per claim inflation. - // TODO_MAINNET: Consider using fixed point arithmetic for deterministic results. + // TODO_MAINNET(@red-0ne): Consider using fixed point arithmetic for deterministic results. settlementAmtFloat := new(big.Float).SetUint64(settlementCoin.Amount.Uint64()) newMintAmtFloat := new(big.Float).Mul(settlementAmtFloat, big.NewFloat(MintPerClaimedTokenGlobalInflation)) // DEV_NOTE: If new mint is less than 1 and more than 0, ceil it to 1 so that @@ -683,7 +682,7 @@ func calculateGlobalPerClaimMintInflationFromSettlementAmount(settlementCoin sdk // calculateAllocationAmount does big float arithmetic to determine the absolute // amount from amountFloat based on the allocation percentage provided. -// TODO_MAINNET(@bryanchriswhite): Measure and limit the precision loss here. +// TODO_MAINNET(@red-0ne): Measure and limit the precision loss here. func calculateAllocationAmount( amountFloat *big.Float, allocationPercentage float64, @@ -704,7 +703,7 @@ func GetShareAmountMap( totalDistributed := uint64(0) shareAmountMap = make(map[string]uint64, len(serviceRevShare)) for _, revShare := range serviceRevShare { - // TODO_MAINNET: Consider using fixed point arithmetic for deterministic results. + // TODO_MAINNET(@red-0ne): Consider using fixed point arithmetic for deterministic results. sharePercentageFloat := big.NewFloat(float64(revShare.RevSharePercentage) / 100) amountToDistributeFloat := big.NewFloat(float64(amountToDistribute)) shareAmount, _ := big.NewFloat(0).Mul(amountToDistributeFloat, sharePercentageFloat).Uint64() diff --git a/x/tokenomics/module/abci.go b/x/tokenomics/module/abci.go index c74e22737..8140263c9 100644 --- a/x/tokenomics/module/abci.go +++ b/x/tokenomics/module/abci.go @@ -66,7 +66,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) (err error) { expiredResult.NumComputeUnits, err, ) - // TODO_IMPROVE(#observability): Add a counter for expired compute units. + // TODO_POST_MAINNET: Add a counter for expired compute units. }() // Update the relay mining difficulty for every service that settled pending diff --git a/x/tokenomics/module/simulation.go b/x/tokenomics/module/simulation.go index 34b5d53d0..8c1da6012 100644 --- a/x/tokenomics/module/simulation.go +++ b/x/tokenomics/module/simulation.go @@ -24,7 +24,7 @@ var ( const ( opWeightMsgUpdateParam = "op_weight_msg_update_param" - // TODO: Determine the simulation weight value + // TODO_TECHDEBT: Determine the simulation weight value defaultWeightMsgUpdateParam int = 100 // this line is used by starport scaffolding # simapp/module/const diff --git a/x/tokenomics/module/tx_update_params.go b/x/tokenomics/module/tx_update_params.go index 7ae94faed..43aae6072 100644 --- a/x/tokenomics/module/tx_update_params.go +++ b/x/tokenomics/module/tx_update_params.go @@ -13,7 +13,7 @@ import ( var _ = strconv.Itoa(0) -// TODO_BLOCKER(@bryanchriswhite, #322): Update the CLI once we determine settle on how to maintain and update parameters. +// TODO_POST_MAINNET(@bryanchriswhite, #322): Update the CLI once we determine settle on how to maintain and update parameters. func CmdUpdateParams() *cobra.Command { cmd := &cobra.Command{ Use: "update-params", diff --git a/x/tokenomics/simulation/update_param.go b/x/tokenomics/simulation/update_param.go index fbf4bd7a6..2ee6dfc83 100644 --- a/x/tokenomics/simulation/update_param.go +++ b/x/tokenomics/simulation/update_param.go @@ -23,7 +23,7 @@ func SimulateMsgUpdateParam( Authority: simAccount.Address.String(), } - // TODO: Handling the UpdateParam simulation + // TODO_TECHDEBT: Handling the UpdateParam simulation return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "UpdateParam simulation not implemented"), nil, nil } From 2bd72405fa1e95af1ec50169513459bba60bd97d Mon Sep 17 00:00:00 2001 From: Redouane Lakrache Date: Wed, 30 Oct 2024 19:17:12 +0100 Subject: [PATCH 2/2] chore: Address review change requests --- x/tokenomics/keeper/token_logic_modules.go | 14 ++++++++------ x/tokenomics/keeper/token_logic_modules_test.go | 12 ++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/x/tokenomics/keeper/token_logic_modules.go b/x/tokenomics/keeper/token_logic_modules.go index db3b48dbb..8eca626a9 100644 --- a/x/tokenomics/keeper/token_logic_modules.go +++ b/x/tokenomics/keeper/token_logic_modules.go @@ -525,6 +525,7 @@ func (k Keeper) TokenLogicModuleGlobalMintReimbursementRequest( // This should THEORETICALLY NEVER fall below zero. // `ensureClaimAmountLimits` should have already checked and adjusted the settlement // amount so that the application stake covers the global inflation. + // TODO_POST_MAINNET: Consider removing this since it should never happen just to simplify the code if err != nil { return err } @@ -715,10 +716,10 @@ func (k Keeper) ensureClaimAmountLimits( // and assume maxClaimableAmt will be settled in session 2. // - Guarantee no over-servicing at the cost of higher application stake requirements. maxClaimableAmt := appStake.Amount.Quo(math.NewInt(sessionkeeper.NumSupplierPerSession)) - maxClaimSettlementAmt := stakeShareToMaxSettlementAmount(maxClaimableAmt) + maxClaimSettlementAmt := supplierAppStakeToMaxSettlementAmount(maxClaimableAmt) // Check if the claimable amount is capped by the max claimable amount. - // As per the Relay Mining paper, the Supplier claim MUST NO exceed the application's + // As per the Relay Mining paper, the Supplier claim MUST NOT exceed the application's // allocated stake. If it does, the claim is capped by the application's allocated stake // and the supplier is effectively "overserviced". if minRequiredAppStakeAmt.GT(maxClaimableAmt) { @@ -726,7 +727,7 @@ func (k Keeper) ensureClaimAmountLimits( supplier.GetOperatorAddress(), application.GetAddress(), maxClaimableAmt, claimSettlementCoin.Amount)) minRequiredAppStakeAmt = maxClaimableAmt - maxClaimSettlementAmt = stakeShareToMaxSettlementAmount(minRequiredAppStakeAmt) + maxClaimSettlementAmt = supplierAppStakeToMaxSettlementAmount(minRequiredAppStakeAmt) } // Nominal case: The claimable amount is within the limits set by Relay Mining. @@ -831,14 +832,15 @@ func CalculateGlobalPerClaimMintInflationFromSettlementAmount(settlementCoin sdk return mintAmtCoin, *newMintAmtFloat } -// stakeShareToMaxSettlementAmount calculates the max amount of uPOKT to that the supplier -// can claim based on the stake share and the global inflation allocation percentage. +// supplierAppStakeToMaxSettlementAmount calculates the max amount of uPOKT the supplier +// can claim based on the stake allocated to the supplier and the global inflation +// allocation percentage. // This is the inverse of CalculateGlobalPerClaimMintInflationFromSettlementAmount: // stake = maxSettlementAmt + globalInflationAmt // stake = maxSettlementAmt + (maxSettlementAmt * MintPerClaimedTokenGlobalInflation) // stake = maxSettlementAmt * (1 + MintPerClaimedTokenGlobalInflation) // maxSettlementAmt = stake / (1 + MintPerClaimedTokenGlobalInflation) -func stakeShareToMaxSettlementAmount(stakeShare math.Int) math.Int { +func supplierAppStakeToMaxSettlementAmount(stakeShare math.Int) math.Int { stakeSahreFloat := big.NewFloat(0).SetInt(stakeShare.BigInt()) maxSettlementAmountFloat := big.NewFloat(0).Quo(stakeSahreFloat, big.NewFloat(1+GlobalInflationPerClaim)) diff --git a/x/tokenomics/keeper/token_logic_modules_test.go b/x/tokenomics/keeper/token_logic_modules_test.go index 817442d01..db5aa8320 100644 --- a/x/tokenomics/keeper/token_logic_modules_test.go +++ b/x/tokenomics/keeper/token_logic_modules_test.go @@ -649,16 +649,16 @@ func TestProcessTokenLogicModules_InvalidClaim(t *testing.T) { } } -func TestProcessTokenLogicModules_AppStakeMissingGlobalInflationAmount(t *testing.T) { - t.Skip("TODO: Test application stake that does not cover the global inflation amount") +func TestProcessTokenLogicModules_AppStakeInsufficientToCoverGlobalInflationAmount(t *testing.T) { + t.Skip("TODO_MAINNET(@red-0ne): Test application stake that is insufficient to cover the global inflation amount, for reimbursment and the max claim should scale down proportionally") } -func TestProcessTokenLogicModules_ZeroAppStakeShareDueToPrecisionLoss(t *testing.T) { - t.Skip("TODO: Test application stake that is low enough to have a zero share due to precision loss") +func TestProcessTokenLogicModules_AppStakeTooLowRoundingToZero(t *testing.T) { + t.Skip("TODO_MAINNET(@red-0ne): Test application stake that is too low which results in stake/num_suppliers rounding down to zero") } -func TestProcessTokenLogicModules_AppStakeGoesBelowMinStake(t *testing.T) { - t.Skip("TODO: Test application stake that goes min stake") +func TestProcessTokenLogicModules_AppStakeDropsBelowMinStakeAfterSession(t *testing.T) { + t.Skip("TODO_MAINNET(@red-0ne): Test that application stake being auto-unbonding after the stake drops below the required minimum when settling session accounting") } // prepareTestClaim uses the given number of relays and compute unit per relay in the