diff --git a/docs/docs/build/modules/02-provider.md b/docs/docs/build/modules/02-provider.md index 699a7e096b..0e625be1f7 100644 --- a/docs/docs/build/modules/02-provider.md +++ b/docs/docs/build/modules/02-provider.md @@ -951,7 +951,7 @@ simd query provider --help ##### Consumer Genesis -The `consumer-genesis` command allows to query for consumer chain genesis state by consumer id +The `consumer-genesis` command allows to query for consumer chain genesis state by consumer id. ```bash interchain-security-pd query provider consumer-genesis [consumer-id] [flags] @@ -1073,7 +1073,7 @@ interchain-security-pd query provider list-consumer-chains 3 Example Output: -``` +```bash chains: - allow_inactive_vals: true allowlist: [] @@ -1098,21 +1098,28 @@ pagination: ##### Validator Consumer Key Assignment -The `validator-consumer-key` command allows to query assigned validator consensus public key for a consumer chain +The `validator-consumer-key` command allows to query assigned validator consensus public key for a consumer chain. ```bash -interchain-security-pd query provider validator-consumer-key [consumerId] [provider-validator-address] [flags] +interchain-security-pd query provider validator-consumer-key [consumer-id] [provider-validator-address] [flags] ``` Example: ```bash -interchain-security-pd query provider validator-consumer-key 3 cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6 +interchain-security-pd query provider validator-consumer-key 0 cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6 ``` +Example Output: + + ```bash +consumer_address: cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk + ``` + + ##### Validator Provider Key -The `validator-provider-key` command allows to query validator consensus public key for the provider chain +The `validator-provider-key` command allows to query validator consensus public key for the provider chain. ```bash @@ -1122,19 +1129,19 @@ interchain-security-pd query provider validator-provider-key [consumer-id] [cons Example: ```bash -interchain-security-pd query provider validator-provider-key 0 cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6 +interchain-security-pd query provider validator-provider-key 0 cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk ``` Example Output: ```bash -consumer_address: cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk +provider_address: cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj ``` ##### Throttle State -The `throttle-state` command allows to query on-chain state relevant to slash packet throttling +The `throttle-state` command allows to command on-chain state relevant to slash packet throttling. ```bash @@ -1157,7 +1164,7 @@ slash_meter_allowance: "1511" ##### Registered Consumer Reward Denoms -The `registered-consumer-reward-denoms` command allows to query registered consumer reward denoms +The `registered-consumer-reward-denoms` command allows to query registered consumer reward denoms. ```bash interchain-security-pd query provider registered-consumer-reward-denoms [flags] @@ -1179,7 +1186,7 @@ denoms: ##### All Pairs Valconsensus Address -The `all-pairs-valconsensus-address` command allows to query all pairs of valconsensus address by consumer ID. +The `all-pairs-valconsensus-address` command allows to query all pairs of valconsensus address by consumer id. ```bash interchain-security-pd query provider all-pairs-valconsensus-address [consumer-id] [flags] @@ -1187,17 +1194,13 @@ interchain-security-pd query provider all-pairs-valconsensus-address [consumer-i Example: -```bash -interchain-security-pd query provider all-pairs-valconsensus-address [consumer-id] -``` - ```bash interchain-security-pd query provider all-pairs-valconsensus-address 0 ``` Example Output: -``` +```bash pair_val_con_addr: - consumer_address: cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk consumer_key: @@ -1207,7 +1210,7 @@ pair_val_con_addr: ##### Provider Parameters -The `params` command allows to query provider parameters information +The `params` command allows to query provider parameters information. ```bash interchain-security-pd query provider params [flags] @@ -1292,7 +1295,7 @@ trusting_period_fraction: "0.66" ##### Consumer Opted In Validators -The `consumer-opted-in-validators` command allows to query opted-in validators for a given consumer chain +The `consumer-opted-in-validators` command allows to query opted-in validators for a given consumer chain. ```bash interchain-security-pd query provider consumer-opted-in-validators [consumer-id] [flags] @@ -1315,7 +1318,7 @@ validators_provider_addresses: ##### Consumer Validators -The `consumer-validators` command allows to query the last set consumer-validator set for a given consumer chain +The `consumer-validators` command allows to query the last set consumer-validator set for a given consumer chain. ```bash interchain-security-pd query provider consumer-validators [consumer-id] [flags] @@ -1329,7 +1332,7 @@ interchain-security-pd query provider consumer-validators 0 Example Output: -``` +```bash validators: - consumer_commission_rate: "0.100000000000000000" consumer_key: @@ -1375,7 +1378,7 @@ validators: ##### Has to Validate -The `has-to-validate` command allows to query the consumer chains list a given validator has to validate +The `has-to-validate` command allows to query the consumer chains list a given validator has to validate. ```bash interchain-security-pd query provider has-to-validate [provider-validator-address] [flags] @@ -1397,7 +1400,7 @@ consumer_ids: ##### Validator Consumer Commission Rate -The `validator-consumer-commission-rate` command allows to query the consumer commission rate a validator charges on a consumer chain +The `validator-consumer-commission-rate` command allows to query the consumer commission rate a validator charges on a consumer chain. ```bash interchain-security-pd query provider validator-consumer-commission-rate [consumer-id] [provider-validator-address] [flags] @@ -1406,7 +1409,7 @@ interchain-security-pd query provider validator-consumer-commission-rate [consum Example: ```bash -interchain-security-pd query provider validator-consumer-commission-rate 3 cosmoscons1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj +interchain-security-pd query provider validator-consumer-commission-rate 0 cosmoscons1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj ``` Example Output: @@ -1437,7 +1440,7 @@ blocks_until_next_epoch: "286" ##### Consumer Id From Client Id -The `consumer-id-from-client-id` command allows to query the consumer id of the chain associated with the provided client id +The `consumer-id-from-client-id` command allows to query the consumer id of the chain associated with the provided client id. ```bash interchain-security-pd query provider consumer-id-from-client-id [client-id] [flags] @@ -1457,7 +1460,7 @@ consumer_id: "0" ##### Consumer Chain -The `consumer-chain` command allows to query the consumer chain associated with the consumer id +The `consumer-chain` command allows to query the consumer chain associated with the consumer id. ```bash interchain-security-pd query provider consumer-chain [consumer-id] [flags] @@ -1521,7 +1524,7 @@ interchain-security-pd tx provider assign-consensus-key [consumer-id] [consumer- Example ```bash -interchain-security-pd tx provider assign-consensus-key 3 \ +interchain-security-pd tx provider assign-consensus-key 0 \ '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}' \ --chain-id provider \ --from mykey \ @@ -1552,6 +1555,7 @@ interchain-security-pd tx provider create-consumer path/to/create-consumer-msg.j --gas-prices="0.025stake" \ --from=mykey ``` + where `create-consumer-msg.json` contains: ```json @@ -1635,7 +1639,7 @@ interchain-security-pd tx provider remove-consumer [consumer-id] [flags] Example: ```bash -interchain-security-pd tx provider remove-consumer 3 +interchain-security-pd tx provider remove-consumer 0 ``` ##### Opt In @@ -1649,7 +1653,7 @@ interchain-security-pd tx provider opt-in [consumer-id] [consumer-pubkey] [flags Example: ```bash -interchain-security-pd tx provider opt-in 3 \ +interchain-security-pd tx provider opt-in 0 \ '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}' \ --chain-id provider \ --from mykey \ @@ -1670,7 +1674,7 @@ interchain-security-pd tx provider opt-out [consumer-id] [flags] Example: ```bash -interchain-security-pd tx provider opt-out 3 \ +interchain-security-pd tx provider opt-out 0 \ --chain-id provider \ --from mykey \ --gas="auto" \ @@ -1690,7 +1694,7 @@ interchain-security-pd tx provider set-consumer-commission-rate [consumer-id] [c Example: ```bash -interchain-security-pd tx provider set-consumer-commission-rate 3 0.5 \ +interchain-security-pd tx provider set-consumer-commission-rate 0 0.5 \ --chain-id provider \ --from mykey \ --gas="auto" \ @@ -1710,7 +1714,7 @@ interchain-security-pd tx provider submit-consumer-double-voting [consumer-id] [ Example: ```bash -interchain-security-pd tx provider submit-consumer-double-voting 3 path/to/evidence.json path/to/infraction_header.json \ +interchain-security-pd tx provider submit-consumer-double-voting 0 path/to/evidence.json path/to/infraction_header.json \ --chain-id provider \ --from mykey \ --gas="auto" \ @@ -1776,7 +1780,7 @@ where `infraction_header.json` contains: "block": "11", "app": "0" }, - "chain_id": "consu", + "chain_id": "pion-1", "height": "59", "time": "2024-09-26T09:34:45.945436342Z", "last_block_id": { @@ -1885,7 +1889,7 @@ interchain-security-pd tx provider submit-consumer-misbehaviour [consumer-id] [m Example: ```bash -interchain-security-pd tx provider submit-consumer-misbehaviour 3 path/to/consumer-misbehaviour.json +interchain-security-pd tx provider submit-consumer-misbehaviour 0 path/to/consumer-misbehaviour.json --chain-id provider \ --from mykey \ --gas="auto" \ @@ -1906,7 +1910,7 @@ where `consumer-misbehaviour.json` contains: "block": "11", "app": "0" }, - "chain_id": "consu", + "chain_id": "pion-1", "height": "95", "time": "2024-09-26T09:15:52.845591095Z", "last_block_id": { @@ -2229,7 +2233,7 @@ interchain_security.ccv.provider.v1.Query/QueryConsumerChains Example: ```bash -grpcurl -plaintext -d '{"phase": "1"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChains``` +grpcurl -plaintext -d '{"phase": "1"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChains ``` Example Output: @@ -2278,7 +2282,7 @@ interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr Example: ```bash -grpcurl -plaintext -d '{"consumer_id": "0", "provider_address": ""}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr +grpcurl -plaintext -d '{"consumer_id": "0", "provider_address": "cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr ``` Example Output: @@ -2300,15 +2304,15 @@ interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr Example: ```bash -grpcurl -plaintext -d '{"consumer_id": "0", "provider_address": ""}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr +grpcurl -plaintext -d '{"consumer_id": "0", "provider_address": "cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr ``` Example Output: ```json { - "providerAddress": "cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj" -} + "consumerAddress": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk" + } ``` #### Throttle State @@ -2346,7 +2350,7 @@ interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms Example: ```bash -grpcurl -plaintext interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms +grpcurl -plaintext localhost:9090 interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms ``` Example Output: @@ -2372,29 +2376,37 @@ interchain_security.ccv.provider.v1.Query/QueryAllPairsValConsAddrByConsumer Example: ```bash -grpcurl -plaintext interchain_security.ccv.provider.v1.Query/QueryAllPairsValConsAddrByConsumer +grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryAllPairsValConsAddrByConsumer ``` Example Output: -```bash -denoms: -- ibc/3C3D7B3BE4ECC85A0E5B52A3AEC3B7DFC2AA9CA47C37821E57020D6807043BE9 -- ibc/D549749C93524DA1831A4B3C850DFC1BA9060261BEDFB224B3B0B4744CD77A70 +```json +{ + "pairValConAddr": [ + { + "providerAddress": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6", + "consumerAddress": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk", + "consumerKey": { + "ed25519": "Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=" + } + } + ] +} ``` #### Provider Parameters -The `params` endpoint queries all current values of provider parameters. +The `QueryParams` endpoint queries all current values of provider parameters. ```bash -"/interchain_security/ccv/provider/params" +interchain_security.ccv.provider.v1.Query/QueryParams ``` Example: ```bash -curl http://localhost:1317/interchain_security/ccv/provider/params +grpcurl -plaintext localhost:9090 interchain_security.ccv.provider.v1.Query/QueryParams ``` Example Output: @@ -2472,16 +2484,16 @@ Example Output: #### Consumer Opted In Validators -The `opted_in_validators` endpoint queries opted-in validators for a given consumer chain +The `QueryConsumerChainOptedInValidators` endpoint queries opted-in validators for a given consumer chain. ```bash -/interchain_security/ccv/provider/opted_in_validators/{consumer_id} +interchain_security.ccv.provider.v1.Query/QueryConsumerChainOptedInValidators ``` Example: ```bash -curl http://localhost:1317/interchain_security/ccv/provider/opted_in_validators/0 + grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChainOptedInValidators ``` Example Output: @@ -2502,13 +2514,13 @@ The `consumer_validators` endpoint queries the latest set consumer-validator set Note that this does not necessarily mean that the consumer chain is using this validator set at this exact moment because a VSCPacket could be delayed to be delivered on the consumer chain. ```bash -/interchain_security/ccv/provider/consumer_validators/{consumer_id} +interchain_security.ccv.provider.v1.Query/QueryConsumerValidators ``` Example: ```bash -curl http://localhost:1317/interchain_security/ccv/provider/consumer_validators/0 +grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerValidators ``` Example Output: @@ -2576,16 +2588,16 @@ Example Output: #### Has to Validate -The `consumer_chains_per_validator` endpoint queries a list of consumer chains that a given validator must validate. +The `QueryConsumerChainsValidatorHasToValidate` endpoint queries a list of consumer chains that a given validator must validate. ```bash -/interchain_security/ccv/provider/consumer_chains_per_validator/{provider_address} +interchain_security.ccv.provider.v1.Query/QueryConsumerChainsValidatorHasToValidate ``` Example: ```bash -curl curl http://localhost:1317/interchain_security/ccv/provider/consumer_chains_per_validator/cosmosvalcons1znhu88l6dsvexunfem4u0392kwqyvdkrj66wph +grpcurl -plaintext -d '{"provider_address": "cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChainsValidatorHasToValidate ``` Example Output: @@ -2601,113 +2613,116 @@ Example Output: #### Validator Consumer Commission Rate -The `consumer_commission_rate` endpoint queries the consumer commission rate a validator charges on a consumer chain. +The `QueryValidatorConsumerCommissionRate` endpoint queries the consumer commission rate a validator charges on a consumer chain. ```bash -/interchain_security/ccv/provider/consumer_commission_rate/{consumer_id}/{provider_address} +interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerCommissionRate ``` Example: ```bash -curl http://localhost:1317/interchain_security/ccv/provider/consumer_commission_rate/0/cosmosvalcons1znhu88l6dsvexunfem4u0392kwqyvdkrj66wph +grpcurl -plaintext -d '{"consumer_id": "0", "provider_address": "cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerCommissionRate ``` Example Output: ```json { - "rate": "0.750000000000000000" + "rate": "750000000000000000" } ``` #### Blocks Until Next Epoch -The `blocks_until_next_epoch` command allows to query the number of blocks until the next epoch begins and validator updates are sent to consumer chains +The `QueryBlocksUntilNextEpoch` endpoint allows to query the number of blocks until the next epoch begins and validator updates are sent to consumer chains ```bash -/interchain_security/ccv/provider/blocks_until_next_epoch +interchain_security.ccv.provider.v1.Query/QueryBlocksUntilNextEpoch ``` Example: ```bash -interchain-security-pd query provider blocks-until-next-epoch +grpcurl -plaintext localhost:9090 interchain_security.ccv.provider.v1.Query/QueryBlocksUntilNextEpoch ``` Example Output: ```json { - "blocks_until_next_epoch":"1" + "blocks_until_next_epoch":"4" } ``` #### Consumer Id From Client Id -The `consumer-id-from-client-id` command allows to query the consumer id of the chain associated with the provided client id +The `QueryConsumerIdFromClientId` endpoint allows to query the consumer id of the chain associated with the provided client id ```bash -interchain-security-pd query provider consumer-id-from-client-id [client-id] [flags] +interchain_security.ccv.provider.v1.Query/QueryConsumerIdFromClientId ``` Example: ```bash -interchain-security-pd query provider consumer-id-from-client-id 07-tendermint-0 +grpcurl -plaintext -d '{"client_id":"07-tendermint-0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerIdFromClientId ``` Example Output: ```bash -consumer_id: "0" +{ + "consumerId": "0" +} ``` #### Consumer Chain -The `consumer-chain` command allows to query the consumer chain associated with the consumer id +The `QueryConsumerChain` command allows to query the consumer chain associated with the consumer id. ```bash -interchain-security-pd query provider consumer-chain [consumer-id] [flags] +interchain_security.ccv.provider.v1.Query/QueryConsumerChain ``` Example: ```bash -interchain-security-pd query provider consumer-chain 0 +grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChain ``` -```bash -chain_id: pion-1 -consumer_id: "0" -init_params: - binary_hash: YmluX2hhc2g= - blocks_per_distribution_transmission: "1000" - ccv_timeout_period: 2419200s - consumer_redistribution_fraction: "0.75" - distribution_transmission_channel: "" - genesis_hash: Z2VuX2hhc2g= - historical_entries: "10000" - initial_height: - revision_height: "1" - revision_number: "0" - spawn_time: "2024-09-26T06:55:14.616054Z" - transfer_timeout_period: 3600s - unbonding_period: 1209600s -metadata: - description: description of your chain and all other relevant information - metadata: some metadata about your chain - name: pion-1 -owner_address: cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn -phase: CONSUMER_PHASE_LAUNCHED -power_shaping_params: - allow_inactive_vals: false - allowlist: [] - denylist: [] - min_stake: "0" - top_N: 100 - validator_set_cap: 0 - validators_power_cap: 0 +```json +{ + "consumerId": "0", + "chainId": "pion-1", + "ownerAddress": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", + "phase": "CONSUMER_PHASE_LAUNCHED", + "metadata": { + "name": "description of your chain and all other relevant information", + "description": "some metadata about your chain", + "metadata": "pion-1" + }, + "initParams": { + "initialHeight": { + "revisionHeight": "1" + }, + "genesisHash": "2D5C2110941DA54BE07CBB9FACD7E4A2E3253E79BE7BE3E5A1A7BDA518BAA4BE", + "binaryHash": "2D5C2110941DA54BE07CBB9FACD7E4A2E3253E79BE7BE3E5A1A7BDA518BAA4BE", + "spawnTime": "2023-03-11T17:02:14.718477Z", + "unbondingPeriod": "2419200s", + "ccvTimeoutPeriod": "2419200s", + "transferTimeoutPeriod": "3600s", + "consumerRedistributionFraction": "0.75", + "blocksPerDistributionTransmission": "1500", + "historicalEntries": "1000" + }, + "powerShapingParams": { + "topN": 100, + "validatorSetCap": 50, + "minStake": "1000", + "allowInactiveVals": true + } +} ``` ### REST @@ -2717,7 +2732,7 @@ A user can query the `provider` module using REST endpoints. #### Consumer Genesis -The `consumer_genesis` endpoint queries a consumer chain genesis state by consumer id. +The `QueryConsumerGenesis` endpoint queries a consumer chain genesis state by consumer id. ```bash interchain_security.ccv.provider.v1.Query/QueryConsumerGenesis @@ -2726,12 +2741,11 @@ interchain_security.ccv.provider.v1.Query/QueryConsumerGenesis Example: ```bash -curl http://localhost:1317/interchain_security/ccv/provider/consumer_genesis/0 +grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerGenesis ``` Example Output: - ```json { "genesisState": { @@ -2838,7 +2852,7 @@ Example Output: #### List Consumer Chains -The `QueryConsumerChains` endpoint queries consumer chains supported by the provider chain. +The `consumer_chains` endpoint queries consumer chains supported by the provider chain. An optional integer parameter can be passed for phase filtering of consumer chains, (Registered=1|Initialized=2|Launched=3|Stopped=4|Deleted=5).` ```bash @@ -2956,7 +2970,7 @@ Example Output: #### Registered Consumer Reward Denoms -The `registered_consumer_reward_denoms` command allows to query registered consumer reward denoms +The `registered_consumer_reward_denoms` endpoint allows to query registered consumer reward denoms ```bash interchain_security/ccv/provider/registered_consumer_reward_denoms @@ -2996,24 +3010,32 @@ curl http://localhost:1317/interchain_security/ccv/provider/address_pairs/0 Example Output: -```bash -denoms: -- ibc/3C3D7B3BE4ECC85A0E5B52A3AEC3B7DFC2AA9CA47C37821E57020D6807043BE9 -- ibc/D549749C93524DA1831A4B3C850DFC1BA9060261BEDFB224B3B0B4744CD77A70 +```json +{ + "pairValConAddr": [ + { + "providerAddress": "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6", + "consumerAddress": "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk", + "consumerKey": { + "ed25519": "Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is=" + } + } + ] +} ``` #### Provider Parameters -The `QueryParams` endpoint queries all current values of provider parameters +The `params` endpoint queries all current values of provider parameters ```bash -interchain_security.ccv.provider.v1.Query/QueryParams +interchain_security/ccv/provider/params ``` Example: ```bash -grpcurl -plaintext interchain_security.ccv.provider.v1.Query/QueryParams +curl http://localhost:1317/interchain_security/ccv/provider/params ``` Example Output: @@ -3091,16 +3113,16 @@ Example Output: #### Consumer Opted In Validators -The `QueryConsumerChainOptedInValidators` endpoint queries opted-in validators for a given consumer chain +The `opted_in_validators` endpoint queries opted-in validators for a given consumer chain ```bash -interchain_security.ccv.provider.v1.Query/QueryConsumerChainOptedInValidators +/interchain_security/ccv/provider/opted_in_validators/{consumer_id} ``` Example: ```bash -grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChainOptedInValidators +curl http://localhost:1317/interchain_security/ccv/provider/opted_in_validators/0 ``` Example Output: @@ -3117,17 +3139,17 @@ Example Output: #### Consumer Validators -The `QueryConsumerValidators` endpoint queries the latest set consumer-validator set for a given consumer ID +The `consumer_validators` endpoint queries the latest set consumer-validator set for a given consumer ID Note that this does not necessarily mean that the consumer chain is using this validator set at this exact moment because a VSCPacket could be delayed to be delivered on the consumer chain. ```bash -interchain_security.ccv.provider.v1.Query/QueryConsumerValidators +/interchain_security/ccv/provider/consumer_validators/{consumer_id} ``` Example: ```bash -grpcurl -plaintext -d '{"consumer_id": "0"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerValidators +curl http://localhost:1317/interchain_security/ccv/provider/consumer_validators/0 ``` Example Output: @@ -3195,16 +3217,16 @@ Example Output: #### Has to Validate -The `QueryConsumerChainsValidatorHasToValidate` endpoint queries a list of consumer chains that a given validator must validate. +The `consumer_chains_per_validator` endpoint queries a list of consumer chains that a given validator must validate. ```bash -interchain_security.ccv.provider.v1.Query/QueryConsumerChainsValidatorHasToValidate +interchain_security/ccv/provider/consumer_chains_per_validator/{provider_address} ``` Example: ```bash -grpcurl -plaintext -d '{"provider_address": "cosmosvalcons1znhu88l6dsvexunfem4u0392kwqyvdkrj66wph"}' localhost:9090 interchain_security.ccv.provider.v1.Query/QueryConsumerChainsValidatorHasToValidate +curl http://localhost:1317/interchain_security/ccv/provider/consumer_chains_per_validator/cosmosvalcons1znhu88l6dsvexunfem4u0392kwqyvdkrj66wph ``` Example Output: @@ -3220,109 +3242,114 @@ Example Output: #### Validator Consumer Commission Rate -The `QueryValidatorConsumerCommissionRate` endpoint queries the consumer commission rate a validator charges on a consumer chain. +The `consumer_commission_rate` endpoint queries the consumer commission rate a validator charges on a consumer chain. ```bash -interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerCommissionRate +/interchain_security/ccv/provider/consumer_commission_rate/{consumer_id}/{provider_address} ``` Example: ```bash -grpcurl -plaintext -d '{"consumer_id": "0", "provider_address": "cosmosvalcons1h7zs5nwruzvhyzkktvhwypfuxlch6nrrw4jjmj"}' localhost:29190 interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerCommissionRate +curl http://localhost:1317/interchain_security/ccv/provider/consumer_commission_rate/0/cosmosvalcons1znhu88l6dsvexunfem4u0392kwqyvdkrj66wph ``` Example Output: ```json { - "rate": "750000000000000000" + "rate": "0.100000000000000000" } ``` #### Blocks Until Next Epoch -The `blocks-until-next-epoch` command allows to query the number of blocks until the next epoch begins and validator updates are sent to consumer chains +The `blocks_until_next_epoch` endpoint allows to query the number of blocks until the next epoch begins and validator updates are sent to consumer chains ```bash -interchain-security-pd query provider blocks-until-next-epoch [flags] +interchain_security/ccv/provider/blocks_until_next_epoch ``` Example: ```bash -interchain-security-pd query provider blocks-until-next-epoch +curl http://localhost:1317/interchain_security/ccv/provider/blocks_until_next_epoch ``` Example Output: -```bash -blocks_until_next_epoch: "286" +```json +{ + "blocks_until_next_epoch":"3" +} ``` #### Consumer Id From Client Id -The `consumer-id-from-client-id` command allows to query the consumer id of the chain associated with the provided client id +The `consumer_id` endpoint allows to query the consumer id of the chain associated with the provided client id ```bash -interchain-security-pd query provider consumer-id-from-client-id [client-id] [flags] +/interchain_security/ccv/provider/consumer_id/{client_id} ``` Example: ```bash -interchain-security-pd query provider consumer-id-from-client-id 07-tendermint-0 +curl http://localhost:1317/interchain_security/ccv/provider/consumer_id/07-tendermint-0 ``` Example Output: -```bash -consumer_id: "0" +```json +{ + "consumer_id":"0" +} ``` #### Consumer Chain -The `consumer-chain` command allows to query the consumer chain associated with the consumer id +The `consumer_chain` endpoint allows to query the consumer chain associated with the consumer id. ```bash -interchain-security-pd query provider consumer-chain [consumer-id] [flags] +interchain_security/ccv/provider/consumer_chain/{consumer_id} ``` Example: ```bash -interchain-security-pd query provider consumer-chain 0 +curl http://localhost:1317/interchain_security/ccv/provider/consumer_chain/0 ``` -```bash -chain_id: pion-1 -consumer_id: "0" -init_params: - binary_hash: YmluX2hhc2g= - blocks_per_distribution_transmission: "1000" - ccv_timeout_period: 2419200s - consumer_redistribution_fraction: "0.75" - distribution_transmission_channel: "" - genesis_hash: Z2VuX2hhc2g= - historical_entries: "10000" - initial_height: - revision_height: "1" - revision_number: "0" - spawn_time: "2024-09-26T06:55:14.616054Z" - transfer_timeout_period: 3600s - unbonding_period: 1209600s -metadata: - description: description of your chain and all other relevant information - metadata: some metadata about your chain - name: pion-1 -owner_address: cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn -phase: CONSUMER_PHASE_LAUNCHED -power_shaping_params: - allow_inactive_vals: false - allowlist: [] - denylist: [] - min_stake: "0" - top_N: 100 - validator_set_cap: 0 - validators_power_cap: 0 +```json +{ + "consumerId": "0", + "chainId": "pion-1", + "ownerAddress": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", + "phase": "CONSUMER_PHASE_LAUNCHED", + "metadata": { + "name": "description of your chain and all other relevant information", + "description": "some metadata about your chain", + "metadata": "pion-1" + }, + "initParams": { + "initialHeight": { + "revisionHeight": "1" + }, + "genesisHash": "2D5C2110941DA54BE07CBB9FACD7E4A2E3253E79BE7BE3E5A1A7BDA518BAA4BE", + "binaryHash": "2D5C2110941DA54BE07CBB9FACD7E4A2E3253E79BE7BE3E5A1A7BDA518BAA4BE", + "spawnTime": "2023-03-11T17:02:14.718477Z", + "unbondingPeriod": "2419200s", + "ccvTimeoutPeriod": "2419200s", + "transferTimeoutPeriod": "3600s", + "consumerRedistributionFraction": "0.75", + "blocksPerDistributionTransmission": "1500", + "historicalEntries": "1000" + }, + "powerShapingParams": { + "topN": 100, + "validatorSetCap": 50, + "minStake": "1000", + "allowInactiveVals": true + } +} ``` \ No newline at end of file