diff --git a/.changelog/unreleased/improvements/provider/1503-query-key-assignment.md b/.changelog/unreleased/improvements/provider/1503-query-key-assignment.md new file mode 100644 index 0000000000..62b505ec01 --- /dev/null +++ b/.changelog/unreleased/improvements/provider/1503-query-key-assignment.md @@ -0,0 +1 @@ +- Add `QueryAllPairsValConAddrByConsumerChainID` method to get list of all pairs `valConsensus` address by `Consummer chainID`. ([\#1503](https://github.com/cosmos/interchain-security/pull/1503)) \ No newline at end of file diff --git a/docs/docs/features/key-assignment.md b/docs/docs/features/key-assignment.md index a44ed8a32a..7ac7d02f48 100644 --- a/docs/docs/features/key-assignment.md +++ b/docs/docs/features/key-assignment.md @@ -65,6 +65,14 @@ gaiad query provider validator-provider-key consumervalcons1 You must use a `valcons` address. You can obtain it by querying your node on the consumer `consumerd tendermint show-address` +OR + +```bash +gaiad query provider all-pairs-valconsensus-address +``` + +You just need to use the `chainId` of consumer to query all pairs valconsensus address with `consumer-pub-key` for each of pair + ## Changing a key To change your key, simply repeat all of the steps listed above. Take note that your old key will be remembered for at least the unbonding period of the consumer chain so any slashes can be correctly applied diff --git a/proto/interchain_security/ccv/provider/v1/query.proto b/proto/interchain_security/ccv/provider/v1/query.proto index d908247480..41d81da04d 100644 --- a/proto/interchain_security/ccv/provider/v1/query.proto +++ b/proto/interchain_security/ccv/provider/v1/query.proto @@ -9,6 +9,7 @@ import "google/protobuf/timestamp.proto"; import "interchain_security/ccv/provider/v1/provider.proto"; import "interchain_security/ccv/v1/shared_consumer.proto"; import "interchain_security/ccv/v1/wire.proto"; +import "tendermint/crypto/keys.proto"; service Query { // ConsumerGenesis queries the genesis state needed to start a consumer chain @@ -90,6 +91,15 @@ service Query { option (google.api.http).get = "/interchain_security/ccv/provider/proposed_consumer_chains"; } + + // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address + // between provider and consumer chain + rpc QueryAllPairsValConAddrByConsumerChainID ( + QueryAllPairsValConAddrByConsumerChainIDRequest) + returns (QueryAllPairsValConAddrByConsumerChainIDResponse) { + option (google.api.http).get = + "/interchain_security/ccv/provider/consumer_chain_id"; + } } message QueryConsumerGenesisRequest { string chain_id = 1; } @@ -208,3 +218,20 @@ message ProposedChain { string chainID = 1; uint64 proposalID = 2; } + +message QueryAllPairsValConAddrByConsumerChainIDRequest { + // The id of the consumer chain + string chain_id = 1; +} + +message QueryAllPairsValConAddrByConsumerChainIDResponse { + repeated PairValConAddrProviderAndConsumer pair_val_con_addr = 1; +} + +message PairValConAddrProviderAndConsumer { + // The consensus address of the validator on the provider chain + string provider_address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; + // The consensus address of the validator on the consumer chain + string consumer_address = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ]; + tendermint.crypto.PublicKey consumer_key = 3; +} diff --git a/tests/e2e/tracehandler_testdata/changeover.json b/tests/e2e/tracehandler_testdata/changeover.json index d569e066a3..d88613ee25 100644 --- a/tests/e2e/tracehandler_testdata/changeover.json +++ b/tests/e2e/tracehandler_testdata/changeover.json @@ -17,6 +17,7 @@ "ValBalances": { "alice": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -43,6 +44,7 @@ "State": { "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -93,6 +95,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -140,6 +143,7 @@ "State": { "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -182,6 +186,7 @@ "State": { "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -237,6 +242,7 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -287,6 +293,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -342,6 +349,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -361,6 +369,7 @@ }, "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -416,6 +425,7 @@ "ValBalances": { "bob": 0 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -442,6 +452,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -461,6 +472,7 @@ }, "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -491,6 +503,7 @@ "State": { "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -523,6 +536,7 @@ "ValBalances": { "bob": 100 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -549,6 +563,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -568,6 +583,7 @@ }, "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -598,6 +614,7 @@ "State": { "sover": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, diff --git a/tests/e2e/tracehandler_testdata/consumer-double-sign.json b/tests/e2e/tracehandler_testdata/consumer-double-sign.json index d6d1fc7086..75a8312e1f 100644 --- a/tests/e2e/tracehandler_testdata/consumer-double-sign.json +++ b/tests/e2e/tracehandler_testdata/consumer-double-sign.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -64,6 +65,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "consu" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -104,6 +108,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -147,6 +152,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -188,6 +194,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -246,6 +253,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -264,6 +272,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -310,6 +319,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -328,6 +338,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -358,6 +369,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -376,6 +388,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 0, @@ -409,6 +422,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 0, @@ -427,6 +441,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 0, diff --git a/tests/e2e/tracehandler_testdata/consumer-misbehaviour.json b/tests/e2e/tracehandler_testdata/consumer-misbehaviour.json index 028637934f..ca529a0063 100644 --- a/tests/e2e/tracehandler_testdata/consumer-misbehaviour.json +++ b/tests/e2e/tracehandler_testdata/consumer-misbehaviour.json @@ -24,6 +24,7 @@ "alice": 9500000000, "bob": 9980000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -58,6 +59,7 @@ "alice": 9489999999, "bob": 9980000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -98,6 +100,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -136,6 +139,7 @@ "alice": 9500000000, "bob": 9980000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -182,6 +186,7 @@ "ValBalances": { "alice": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -199,6 +204,7 @@ "alice": 9500000000, "bob": 9980000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -247,6 +253,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 20 @@ -264,6 +271,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 20 @@ -292,6 +300,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 20 @@ -332,6 +341,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 20 @@ -349,6 +359,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 20 @@ -380,6 +391,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 20 @@ -397,6 +409,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 0, "bob": 20 diff --git a/tests/e2e/tracehandler_testdata/democracy.json b/tests/e2e/tracehandler_testdata/democracy.json index 8259eafb63..64ecbf4efa 100644 --- a/tests/e2e/tracehandler_testdata/democracy.json +++ b/tests/e2e/tracehandler_testdata/democracy.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -65,6 +66,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "democ" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -106,6 +110,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -150,6 +155,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -192,6 +198,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -251,6 +258,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -270,6 +278,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -333,6 +342,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -352,6 +362,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -385,6 +396,7 @@ "alice": 10000000000, "bob": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -411,6 +423,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -444,6 +457,7 @@ "alice": 9999999999, "bob": 10000000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -475,6 +489,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": { "alice": 100000000, @@ -512,6 +527,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -558,6 +574,7 @@ "alice": 9889999998, "bob": 9960000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": [ @@ -610,6 +627,7 @@ "alice": 9899999999, "bob": 9960000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": [ @@ -653,6 +671,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -686,6 +705,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -720,6 +740,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -748,6 +769,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -780,6 +802,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -799,6 +822,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -829,6 +853,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -848,6 +873,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -878,6 +904,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -906,6 +933,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -925,6 +953,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -955,6 +984,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, diff --git a/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json b/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json index 5ddb802437..bdd953bdc9 100644 --- a/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json +++ b/tests/e2e/tracehandler_testdata/democracyRewardsSteps.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -65,6 +66,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "democ" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -106,6 +110,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -150,6 +155,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -192,6 +198,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -251,6 +258,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -270,6 +278,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -333,6 +342,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -352,6 +362,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -385,6 +396,7 @@ "alice": 10000000000, "bob": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -411,6 +423,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -444,6 +457,7 @@ "alice": 9999999999, "bob": 10000000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -475,6 +489,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": { "alice": 100000000, @@ -512,6 +527,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -558,6 +574,7 @@ "alice": 9889999998, "bob": 9960000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": [ @@ -610,6 +627,7 @@ "alice": 9899999999, "bob": 9960000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": [ @@ -653,6 +671,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -686,6 +705,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -720,6 +740,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -748,6 +769,7 @@ "State": { "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -780,6 +802,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -799,6 +822,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -829,6 +853,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -848,6 +873,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -878,6 +904,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -906,6 +933,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -925,6 +953,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -955,6 +984,7 @@ "State": { "democ": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, diff --git a/tests/e2e/tracehandler_testdata/happyPath.json b/tests/e2e/tracehandler_testdata/happyPath.json index f4b7200352..b589208f51 100644 --- a/tests/e2e/tracehandler_testdata/happyPath.json +++ b/tests/e2e/tracehandler_testdata/happyPath.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -65,6 +66,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "consu" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -106,6 +110,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -150,6 +155,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -192,6 +198,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -251,6 +258,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -270,6 +278,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -319,6 +328,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -338,6 +348,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -371,6 +382,7 @@ "alice": 10000000000, "bob": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -397,6 +409,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -430,6 +443,7 @@ "alice": 9999999999, "bob": 10000000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -458,6 +472,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -483,6 +498,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -513,6 +529,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -538,6 +555,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -568,6 +586,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -587,6 +606,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -617,6 +637,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -647,6 +668,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -666,6 +688,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -696,6 +719,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -726,6 +750,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -745,6 +770,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -775,6 +801,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -806,6 +833,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -825,6 +853,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -855,6 +884,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -883,6 +913,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -902,6 +933,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -932,6 +964,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -951,6 +984,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -982,6 +1016,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 60, "bob": 500, @@ -1001,6 +1036,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1031,6 +1067,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1059,6 +1096,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1078,6 +1116,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1108,6 +1147,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1127,6 +1167,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1157,6 +1198,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1185,6 +1227,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1204,6 +1247,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1234,6 +1278,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1262,6 +1307,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1281,6 +1327,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1311,6 +1358,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1339,6 +1387,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1358,6 +1407,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1388,6 +1438,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1416,6 +1467,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1435,6 +1487,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1465,6 +1518,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1484,6 +1538,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1522,6 +1577,7 @@ "ValBalances": { "bob": 9489999999 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -1570,6 +1626,7 @@ "ValBalances": { "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -1611,6 +1668,7 @@ "ValBalances": { "bob": 9489999999 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -1659,6 +1717,7 @@ "ValBalances": { "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, diff --git a/tests/e2e/tracehandler_testdata/multipleConsumers.json b/tests/e2e/tracehandler_testdata/multipleConsumers.json index af7f6a06a4..eb98868e21 100644 --- a/tests/e2e/tracehandler_testdata/multipleConsumers.json +++ b/tests/e2e/tracehandler_testdata/multipleConsumers.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -65,6 +66,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "consu" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -106,6 +110,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -150,6 +155,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -192,6 +198,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -251,6 +258,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -270,6 +278,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -328,6 +337,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "densu" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -369,6 +381,7 @@ "State": { "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -413,6 +426,7 @@ "State": { "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -455,6 +469,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -514,6 +529,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -533,6 +549,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -582,6 +599,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -601,6 +619,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -620,6 +639,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -650,6 +670,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -669,6 +690,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -688,6 +710,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -718,6 +741,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -737,6 +761,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -756,6 +781,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -786,6 +812,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -805,6 +832,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -824,6 +852,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -854,6 +883,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -873,6 +903,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -892,6 +923,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -922,6 +954,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -941,6 +974,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -960,6 +994,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -991,6 +1026,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -1010,6 +1046,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -1029,6 +1066,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1059,6 +1097,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1078,6 +1117,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -1097,6 +1137,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1127,6 +1168,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1146,6 +1188,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1165,6 +1208,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1193,6 +1237,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1212,6 +1257,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1231,6 +1277,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1261,6 +1308,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1280,6 +1328,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1299,6 +1348,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1329,6 +1379,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1348,6 +1399,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1378,6 +1430,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1397,6 +1450,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1425,6 +1479,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1444,6 +1499,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1463,6 +1519,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1493,6 +1550,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1512,6 +1570,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -1531,6 +1590,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1561,6 +1621,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1580,6 +1641,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1599,6 +1661,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1627,6 +1690,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1646,6 +1710,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1665,6 +1730,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1695,6 +1761,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1714,6 +1781,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1733,6 +1801,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1763,6 +1832,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1782,6 +1852,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1801,6 +1872,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1829,6 +1901,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1848,6 +1921,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1867,6 +1941,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1897,6 +1972,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1916,6 +1992,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1935,6 +2012,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1965,6 +2043,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1984,6 +2063,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2003,6 +2083,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2031,6 +2112,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2050,6 +2132,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2069,6 +2152,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2099,6 +2183,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2118,6 +2203,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2137,6 +2223,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2167,6 +2254,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2186,6 +2274,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2205,6 +2294,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2233,6 +2323,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2252,6 +2343,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2271,6 +2363,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2301,6 +2394,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2320,6 +2414,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2339,6 +2434,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2369,6 +2465,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2388,6 +2485,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2407,6 +2505,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2437,6 +2536,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -2456,6 +2556,7 @@ }, "densu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, diff --git a/tests/e2e/tracehandler_testdata/shorthappy.json b/tests/e2e/tracehandler_testdata/shorthappy.json index df0d68d245..b1b9e65823 100644 --- a/tests/e2e/tracehandler_testdata/shorthappy.json +++ b/tests/e2e/tracehandler_testdata/shorthappy.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -65,6 +66,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "consu" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -106,6 +110,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -150,6 +155,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -192,6 +198,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -251,6 +258,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -270,6 +278,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -319,6 +328,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -338,6 +348,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -371,6 +382,7 @@ "alice": 10000000000, "bob": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -397,6 +409,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -430,6 +443,7 @@ "alice": 9999999999, "bob": 10000000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -456,6 +470,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -475,6 +490,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -505,6 +521,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -536,6 +553,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 510, "bob": 500, @@ -555,6 +573,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -585,6 +604,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -613,6 +633,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -632,6 +653,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -662,6 +684,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -681,6 +704,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -711,6 +735,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -739,6 +764,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 0, @@ -758,6 +784,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -788,6 +815,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -816,6 +844,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -835,6 +864,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -865,6 +895,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -893,6 +924,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -912,6 +944,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -942,6 +975,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -970,6 +1004,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -989,6 +1024,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1019,6 +1055,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1038,6 +1075,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 509, "bob": 500, @@ -1076,6 +1114,7 @@ "ValBalances": { "bob": 9489999999 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -1124,6 +1163,7 @@ "ValBalances": { "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -1165,6 +1205,7 @@ "ValBalances": { "bob": 9489999999 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -1213,6 +1254,7 @@ "ValBalances": { "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, diff --git a/tests/e2e/tracehandler_testdata/slashThrottle.json b/tests/e2e/tracehandler_testdata/slashThrottle.json index 447bdaedc2..f48e848c16 100644 --- a/tests/e2e/tracehandler_testdata/slashThrottle.json +++ b/tests/e2e/tracehandler_testdata/slashThrottle.json @@ -30,6 +30,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -65,6 +66,9 @@ "alice": 9489999999, "bob": 9500000000 }, + "ProposedConsumerChains": [ + "consu" + ], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -106,6 +110,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -150,6 +155,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -192,6 +198,7 @@ "alice": 9500000000, "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -251,6 +258,7 @@ "bob": 10000000000, "carol": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -270,6 +278,7 @@ "bob": 9500000000, "carol": 9500000000 }, + "ProposedConsumerChains": [], "ValPowers": null, "StakedTokens": null, "Params": null, @@ -319,6 +328,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 500, "bob": 500, @@ -338,6 +348,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -371,6 +382,7 @@ "alice": 10000000000, "bob": 10000000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -397,6 +409,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -430,6 +443,7 @@ "alice": 9999999999, "bob": 10000000001 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -454,6 +468,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -473,6 +488,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -503,6 +519,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -522,6 +539,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -552,6 +570,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 500, @@ -571,6 +590,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -601,6 +621,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -620,6 +641,7 @@ }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -652,6 +674,7 @@ "State": { "consu": { "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -663,14 +686,106 @@ "ConsumerChains": null, "AssignedKeys": null, "ProviderKeys": null, +<<<<<<< HEAD "ConsumerChainQueueSizes": null, "GlobalSlashQueueSize": null, +======= + "ConsumerPendingPacketQueueSize": 1, "RegisteredConsumerRewardDenoms": null, "ClientsFrozenHeights": null, "Proposals": null }, "provi": { "ValBalances": null, + "ProposedConsumerChains": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "StakedTokens": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerPendingPacketQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "ClientsFrozenHeights": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.WaitTimeAction", + "Action": { + "WaitTime": 30000000000 + }, + "State": { + "consu": { + "ValBalances": null, + "ProposedConsumerChains": null, + "ValPowers": null, + "StakedTokens": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerPendingPacketQueueSize": 1, + "RegisteredConsumerRewardDenoms": null, + "ClientsFrozenHeights": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ProposedConsumerChains": null, + "ValPowers": { + "alice": 511, + "bob": 0, + "carol": 500 + }, + "StakedTokens": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerPendingPacketQueueSize": null, + "RegisteredConsumerRewardDenoms": null, + "ClientsFrozenHeights": null, + "Proposals": null + } + } + }, + { + "ActionType": "main.RelayPacketsAction", + "Action": { + "ChainA": "provi", + "ChainB": "consu", + "Port": "provider", + "Channel": 0 + }, + "State": { + "consu": { + "ValBalances": null, + "ProposedConsumerChains": null, + "ValPowers": null, + "StakedTokens": null, + "Params": null, + "Rewards": null, + "ConsumerChains": null, + "AssignedKeys": null, + "ProviderKeys": null, + "ConsumerPendingPacketQueueSize": 0, +>>>>>>> 56399f6 (feat: Add `QueryAllPairsValConAddrByConsumerChainID` (#1503)) + "RegisteredConsumerRewardDenoms": null, + "ClientsFrozenHeights": null, + "Proposals": null + }, + "provi": { + "ValBalances": null, + "ProposedConsumerChains": null, "ValPowers": { "alice": 511, "bob": 0, @@ -755,6 +870,7 @@ "ValBalances": { "bob": 9489999999 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, @@ -803,6 +919,7 @@ "ValBalances": { "bob": 9500000000 }, + "ProposedConsumerChains": null, "ValPowers": null, "StakedTokens": null, "Params": null, diff --git a/x/ccv/provider/client/cli/query.go b/x/ccv/provider/client/cli/query.go index b1cbb2d9ef..a61d89949f 100644 --- a/x/ccv/provider/client/cli/query.go +++ b/x/ccv/provider/client/cli/query.go @@ -34,6 +34,7 @@ func NewQueryCmd() *cobra.Command { cmd.AddCommand(CmdThrottledConsumerPacketData()) cmd.AddCommand(CmdRegisteredConsumerRewardDenoms()) cmd.AddCommand(CmdProposedConsumerChains()) + cmd.AddCommand(CmdAllPairsValConAddrByConsumerChainID()) return cmd } @@ -384,3 +385,30 @@ $ %s query provider registered-consumer-reward-denoms return cmd } + +func CmdAllPairsValConAddrByConsumerChainID() *cobra.Command { + cmd := &cobra.Command{ + Use: "all-pairs-valconsensus-address", + Short: "Query all pairs of valconsensus address by consumer chainId.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + req := types.QueryAllPairsValConAddrByConsumerChainIDRequest{ChainId: args[0]} + res, err := queryClient.QueryAllPairsValConAddrByConsumerChainID(cmd.Context(), &req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/ccv/provider/keeper/grpc_query.go b/x/ccv/provider/keeper/grpc_query.go index 93837df229..a9680aec44 100644 --- a/x/ccv/provider/keeper/grpc_query.go +++ b/x/ccv/provider/keeper/grpc_query.go @@ -267,3 +267,34 @@ func (k Keeper) QueryProposedConsumerChainIDs(goCtx context.Context, req *types. ProposedChains: chains, }, nil } + +func (k Keeper) QueryAllPairsValConAddrByConsumerChainID(goCtx context.Context, req *types.QueryAllPairsValConAddrByConsumerChainIDRequest) (*types.QueryAllPairsValConAddrByConsumerChainIDResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + if req.ChainId == "" { + return nil, status.Error(codes.InvalidArgument, "empty chainId") + } + + // list of pairs valconsensus addr + pairValConAddrs := []*types.PairValConAddrProviderAndConsumer{} + + ctx := sdk.UnwrapSDKContext(goCtx) + validatorConsumerPubKeys := k.GetAllValidatorConsumerPubKeys(ctx, &req.ChainId) + for _, data := range validatorConsumerPubKeys { + consumerAddr, err := ccvtypes.TMCryptoPublicKeyToConsAddr(*data.ConsumerKey) + if err != nil { + return nil, err + } + pairValConAddrs = append(pairValConAddrs, &types.PairValConAddrProviderAndConsumer{ + ProviderAddress: string(data.ProviderAddr), + ConsumerAddress: string(consumerAddr), + ConsumerKey: data.ConsumerKey, + }) + } + + return &types.QueryAllPairsValConAddrByConsumerChainIDResponse{ + PairValConAddr: pairValConAddrs, + }, nil +} diff --git a/x/ccv/provider/keeper/grpc_query_test.go b/x/ccv/provider/keeper/grpc_query_test.go new file mode 100644 index 0000000000..3246e1fc35 --- /dev/null +++ b/x/ccv/provider/keeper/grpc_query_test.go @@ -0,0 +1,57 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + cryptotestutil "github.com/cosmos/interchain-security/v3/testutil/crypto" + testkeeper "github.com/cosmos/interchain-security/v3/testutil/keeper" + "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" +) + +func TestQueryAllPairsValConAddrByConsumerChainID(t *testing.T) { + chainID := consumer + providerAddr := types.NewProviderConsAddress([]byte("providerAddr")) + + consumerKey := cryptotestutil.NewCryptoIdentityFromIntSeed(1).TMProtoCryptoPublicKey() + consumerAddr, err := ccvtypes.TMCryptoPublicKeyToConsAddr(consumerKey) + require.NoError(t, err) + + pk, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) + defer ctrl.Finish() + + pk.SetValidatorConsumerPubKey(ctx, chainID, providerAddr, consumerKey) + pk.SetKeyAssignmentReplacement(ctx, chainID, providerAddr, consumerKey, 100) + + consumerPubKey, found := pk.GetValidatorConsumerPubKey(ctx, chainID, providerAddr) + require.True(t, found, "consumer pubkey not found") + require.NotEmpty(t, consumerPubKey, "consumer pubkey is empty") + require.Equal(t, consumerPubKey, consumerKey) + + // Request is nil + _, err = pk.QueryAllPairsValConAddrByConsumerChainID(ctx, nil) + require.Error(t, err) + + // Request with chainId is empty + _, err = pk.QueryAllPairsValConAddrByConsumerChainID(ctx, &types.QueryAllPairsValConAddrByConsumerChainIDRequest{}) + require.Error(t, err) + + // Request with chainId is invalid + response, err := pk.QueryAllPairsValConAddrByConsumerChainID(ctx, &types.QueryAllPairsValConAddrByConsumerChainIDRequest{ChainId: "invalidChainId"}) + require.NoError(t, err) + require.Equal(t, []*types.PairValConAddrProviderAndConsumer{}, response.PairValConAddr) + + // Request is valid + response, err = pk.QueryAllPairsValConAddrByConsumerChainID(ctx, &types.QueryAllPairsValConAddrByConsumerChainIDRequest{ChainId: chainID}) + require.NoError(t, err) + + expectedResult := types.PairValConAddrProviderAndConsumer{ + ProviderAddress: "providerAddr", + ConsumerAddress: string(consumerAddr), + ConsumerKey: &consumerKey, + } + require.Equal(t, &consumerKey, response.PairValConAddr[0].ConsumerKey) + require.Equal(t, &expectedResult, response.PairValConAddr[0]) +} diff --git a/x/ccv/provider/types/query.pb.go b/x/ccv/provider/types/query.pb.go index f0d088ba2d..afb2802eb1 100644 --- a/x/ccv/provider/types/query.pb.go +++ b/x/ccv/provider/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -1171,6 +1172,165 @@ func (m *ProposedChain) GetProposalID() uint64 { return 0 } +type QueryAllPairsValConAddrByConsumerChainIDRequest struct { + // The id of the consumer chain + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) Reset() { + *m = QueryAllPairsValConAddrByConsumerChainIDRequest{} +} +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryAllPairsValConAddrByConsumerChainIDRequest) ProtoMessage() {} +func (*QueryAllPairsValConAddrByConsumerChainIDRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{20} +} +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDRequest.Merge(m, src) +} +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDRequest proto.InternalMessageInfo + +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +type QueryAllPairsValConAddrByConsumerChainIDResponse struct { + PairValConAddr []*PairValConAddrProviderAndConsumer `protobuf:"bytes,1,rep,name=pair_val_con_addr,json=pairValConAddr,proto3" json:"pair_val_con_addr,omitempty"` +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) Reset() { + *m = QueryAllPairsValConAddrByConsumerChainIDResponse{} +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryAllPairsValConAddrByConsumerChainIDResponse) ProtoMessage() {} +func (*QueryAllPairsValConAddrByConsumerChainIDResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{21} +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDResponse.Merge(m, src) +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllPairsValConAddrByConsumerChainIDResponse proto.InternalMessageInfo + +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) GetPairValConAddr() []*PairValConAddrProviderAndConsumer { + if m != nil { + return m.PairValConAddr + } + return nil +} + +type PairValConAddrProviderAndConsumer struct { + // The consensus address of the validator on the provider chain + ProviderAddress string `protobuf:"bytes,1,opt,name=provider_address,json=providerAddress,proto3" json:"provider_address,omitempty" yaml:"address"` + // The consensus address of the validator on the consumer chain + ConsumerAddress string `protobuf:"bytes,2,opt,name=consumer_address,json=consumerAddress,proto3" json:"consumer_address,omitempty" yaml:"address"` + ConsumerKey *crypto.PublicKey `protobuf:"bytes,3,opt,name=consumer_key,json=consumerKey,proto3" json:"consumer_key,omitempty"` +} + +func (m *PairValConAddrProviderAndConsumer) Reset() { *m = PairValConAddrProviderAndConsumer{} } +func (m *PairValConAddrProviderAndConsumer) String() string { return proto.CompactTextString(m) } +func (*PairValConAddrProviderAndConsumer) ProtoMessage() {} +func (*PairValConAddrProviderAndConsumer) Descriptor() ([]byte, []int) { + return fileDescriptor_422512d7b7586cd7, []int{22} +} +func (m *PairValConAddrProviderAndConsumer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PairValConAddrProviderAndConsumer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PairValConAddrProviderAndConsumer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PairValConAddrProviderAndConsumer) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairValConAddrProviderAndConsumer.Merge(m, src) +} +func (m *PairValConAddrProviderAndConsumer) XXX_Size() int { + return m.Size() +} +func (m *PairValConAddrProviderAndConsumer) XXX_DiscardUnknown() { + xxx_messageInfo_PairValConAddrProviderAndConsumer.DiscardUnknown(m) +} + +var xxx_messageInfo_PairValConAddrProviderAndConsumer proto.InternalMessageInfo + +func (m *PairValConAddrProviderAndConsumer) GetProviderAddress() string { + if m != nil { + return m.ProviderAddress + } + return "" +} + +func (m *PairValConAddrProviderAndConsumer) GetConsumerAddress() string { + if m != nil { + return m.ConsumerAddress + } + return "" +} + +func (m *PairValConAddrProviderAndConsumer) GetConsumerKey() *crypto.PublicKey { + if m != nil { + return m.ConsumerKey + } + return nil +} + func init() { proto.RegisterType((*QueryConsumerGenesisRequest)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisRequest") proto.RegisterType((*QueryConsumerGenesisResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisResponse") @@ -1196,6 +1356,9 @@ func init() { proto.RegisterType((*QueryProposedChainIDsRequest)(nil), "interchain_security.ccv.provider.v1.QueryProposedChainIDsRequest") proto.RegisterType((*QueryProposedChainIDsResponse)(nil), "interchain_security.ccv.provider.v1.QueryProposedChainIDsResponse") proto.RegisterType((*ProposedChain)(nil), "interchain_security.ccv.provider.v1.ProposedChain") + proto.RegisterType((*QueryAllPairsValConAddrByConsumerChainIDRequest)(nil), "interchain_security.ccv.provider.v1.QueryAllPairsValConAddrByConsumerChainIDRequest") + proto.RegisterType((*QueryAllPairsValConAddrByConsumerChainIDResponse)(nil), "interchain_security.ccv.provider.v1.QueryAllPairsValConAddrByConsumerChainIDResponse") + proto.RegisterType((*PairValConAddrProviderAndConsumer)(nil), "interchain_security.ccv.provider.v1.PairValConAddrProviderAndConsumer") } func init() { @@ -1203,81 +1366,91 @@ func init() { } var fileDescriptor_422512d7b7586cd7 = []byte{ - // 1170 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xf7, 0x26, 0x6d, 0xbe, 0xc9, 0xe4, 0xdb, 0x1f, 0x4c, 0x4b, 0x71, 0x37, 0xc1, 0x2e, 0x5b, - 0x01, 0x69, 0x81, 0xdd, 0xc4, 0xb9, 0xb4, 0x81, 0x34, 0xb1, 0xe3, 0x10, 0xac, 0xb6, 0x6a, 0xd8, - 0x56, 0x20, 0x01, 0x62, 0xd9, 0xec, 0x0e, 0xf6, 0x4a, 0xeb, 0x9d, 0xed, 0xcc, 0xd8, 0x69, 0x54, - 0x71, 0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, 0x84, 0x81, 0x61, 0xba, 0x2e, 0xde, 0x35, 0x3d, 0x0b, 0x71, 0xed, 0x93, 0xfa, - 0xb9, 0x8e, 0x69, 0x39, 0xba, 0x82, 0x5f, 0x82, 0xbc, 0x87, 0x1e, 0x30, 0x83, 0x20, 0xdf, 0x45, - 0x9e, 0x43, 0x1b, 0x86, 0x65, 0x7a, 0x76, 0x20, 0x16, 0xe5, 0x27, 0x79, 0xcd, 0xcb, 0x6a, 0xd8, - 0xf9, 0xd5, 0xa8, 0xf3, 0xab, 0xf7, 0xa2, 0xce, 0x5f, 0x99, 0x0e, 0x7a, 0xd8, 0x93, 0xdf, 0x8a, - 0x92, 0x7e, 0x21, 0x40, 0xd1, 0x23, 0x90, 0x8d, 0x08, 0x43, 0x79, 0x17, 0x5c, 0xe5, 0x92, 0x74, - 0x54, 0x77, 0x28, 0x43, 0x04, 0xd9, 0x9d, 0xd7, 0xb1, 0x6b, 0x12, 0xbb, 0x8a, 0x3c, 0xdc, 0x8c, - 0x9f, 0xe7, 0x26, 0x78, 0x27, 0x93, 0xb5, 0xc8, 0xc8, 0x05, 0x30, 0x65, 0xf3, 0x13, 0xde, 0xf1, - 0x66, 0x74, 0xf1, 0x4d, 0x29, 0x88, 0x1e, 0x1e, 0xbe, 0x3c, 0x64, 0xf3, 0x97, 0x56, 0xab, 0xc6, - 0x61, 0x1e, 0x49, 0xe0, 0xf5, 0x43, 0x0c, 0x04, 0xf2, 0x57, 0xe0, 0xb4, 0x9f, 0xbc, 0x8b, 0x7a, - 0x6a, 0x29, 0x53, 0x03, 0xe8, 0x82, 0x15, 0x8d, 0xbe, 0x07, 0x4f, 0xa9, 0x81, 0x53, 0x5d, 0x66, - 0x30, 0x0f, 0x44, 0xfd, 0x56, 0xbb, 0xcb, 0xb9, 0x0a, 0x0b, 0x00, 0x44, 0x8d, 0xa3, 0x56, 0xe5, - 0x3f, 0xe6, 0x09, 0x3d, 0x71, 0x52, 0xfa, 0xee, 0x15, 0x70, 0x92, 0xcb, 0x81, 0xfb, 0x12, 0x38, - 0x9f, 0x36, 0xbd, 0xe0, 0x7a, 0x26, 0xde, 0x03, 0x46, 0xa6, 0x5c, 0x3e, 0x02, 0x42, 0x98, 0x54, - 0x65, 0xf3, 0xdb, 0x17, 0x7f, 0xfc, 0x38, 0xb1, 0x06, 0x57, 0x87, 0x6f, 0x35, 0xf1, 0xf3, 0x15, - 0xe3, 0x51, 0x7b, 0x18, 0xbd, 0xf5, 0x6f, 0xe0, 0x0b, 0x09, 0x9c, 0x4b, 0x99, 0x83, 0x70, 0x6d, - 0x74, 0x86, 0x5d, 0xf3, 0x55, 0x5e, 0x1f, 0x1f, 0x40, 0x28, 0xbc, 0xce, 0x15, 0x2e, 0xc3, 0xa5, - 0x11, 0x14, 0x86, 0x93, 0x17, 0x3e, 0x9a, 0x00, 0xf9, 0x43, 0xc6, 0x29, 0x85, 0xb7, 0xc6, 0x64, - 0x96, 0x3a, 0xb9, 0xe5, 0xdb, 0xc7, 0x84, 0x26, 0x44, 0x7f, 0xc4, 0x45, 0x57, 0xe0, 0xfa, 0xa8, - 0xa2, 0x83, 0x05, 0x8a, 0x30, 0x23, 0x1e, 0x8a, 0xf0, 0x5f, 0x09, 0xbc, 0x96, 0x3e, 0x9d, 0x29, - 0xbc, 0x39, 0x36, 0xe9, 0xfe, 0x35, 0x40, 0xbe, 0x75, 0x3c, 0x60, 0x22, 0x01, 0x5b, 0x3c, 0x01, - 0x65, 0xb8, 0x36, 0x46, 0x02, 0xb0, 0x9f, 0xd0, 0xff, 0x77, 0x34, 0x00, 0x52, 0x47, 0x29, 0xfc, - 0x30, 0x3b, 0xeb, 0x41, 0x4b, 0x81, 0xbc, 0x75, 0x64, 0x1c, 0x21, 0xbc, 0xcc, 0x85, 0xbf, 0x0f, - 0xaf, 0x67, 0xf8, 0x9b, 0x12, 0x01, 0x19, 0x5d, 0x93, 0x39, 0x45, 0x72, 0x72, 0xc4, 0x8e, 0x25, - 0x39, 0x65, 0x59, 0x18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, 0xc2, 0x02, 0x37, 0x01, 0x0c, 0x11, - 0x00, 0x00, + // 1336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0x8e, 0x93, 0xb6, 0x24, 0x93, 0xfe, 0x62, 0x5a, 0x4a, 0xea, 0x86, 0xdd, 0xd6, 0x15, 0x90, + 0x16, 0xb0, 0x93, 0x8d, 0x90, 0xfa, 0x83, 0x34, 0xdd, 0x4d, 0xda, 0x12, 0xa5, 0x55, 0x83, 0x5b, + 0x8a, 0x04, 0x08, 0x33, 0xb1, 0x87, 0x8d, 0x55, 0xaf, 0xc7, 0x9d, 0x99, 0xdd, 0x76, 0x55, 0x71, + 0x28, 0x07, 0xe8, 0xb1, 0x12, 0x70, 0xe1, 0xd4, 0x0b, 0xff, 0x4b, 0x6f, 0x14, 0xf5, 0xc2, 0xa9, + 0xa0, 0x84, 0x03, 0xe2, 0x84, 0xb8, 0x23, 0x21, 0x8f, 0xc7, 0xde, 0xf5, 0xae, 0xb3, 0xeb, 0xdd, + 0xe4, 0xb6, 0x3b, 0xf3, 0xde, 0xf7, 0xde, 0xf7, 0xe6, 0xcd, 0x9b, 0xcf, 0xc0, 0x70, 0x7d, 0x8e, + 0xa9, 0xbd, 0x81, 0x5c, 0xdf, 0x62, 0xd8, 0xae, 0x53, 0x97, 0x37, 0x0d, 0xdb, 0x6e, 0x18, 0x01, + 0x25, 0x0d, 0xd7, 0xc1, 0xd4, 0x68, 0xcc, 0x19, 0xf7, 0xea, 0x98, 0x36, 0xf5, 0x80, 0x12, 0x4e, + 0xe0, 0xe9, 0x0c, 0x07, 0xdd, 0xb6, 0x1b, 0x7a, 0xec, 0xa0, 0x37, 0xe6, 0xd4, 0xe9, 0x2a, 0x21, + 0x55, 0x0f, 0x1b, 0x28, 0x70, 0x0d, 0xe4, 0xfb, 0x84, 0x23, 0xee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0xdc, 0x94, 0x37, 0x6a, 0x5a, 0x6f, 0x69, 0x17, 0x3d, 0xd2, 0x2e, 0xfa, + 0x5a, 0x7d, 0xdd, 0x73, 0xed, 0x55, 0xdc, 0x34, 0x27, 0x63, 0x8f, 0x55, 0xdc, 0x2c, 0xfd, 0x74, + 0x04, 0xec, 0x15, 0x87, 0x01, 0x37, 0x15, 0x70, 0x34, 0x4b, 0x98, 0xc0, 0xcb, 0xb9, 0xea, 0xdb, + 0x43, 0x0d, 0xa9, 0xe5, 0x1d, 0x20, 0x44, 0xe7, 0xaf, 0x5d, 0xf9, 0xe6, 0xc5, 0x9f, 0xdf, 0x8f, + 0x2e, 0xc2, 0x85, 0xfe, 0x72, 0x36, 0x29, 0x88, 0x54, 0x3e, 0xc6, 0xc3, 0xb8, 0x13, 0xbf, 0x86, + 0x2f, 0x14, 0x70, 0x24, 0x43, 0xe2, 0xc0, 0xc5, 0xc1, 0x33, 0x4c, 0x49, 0x27, 0xf5, 0xf2, 0xf0, + 0x00, 0x92, 0xe1, 0x79, 0xc1, 0x70, 0x1e, 0xce, 0x0d, 0xc0, 0x30, 0x12, 0x55, 0xf0, 0xd1, 0x28, + 0x98, 0xda, 0x46, 0x29, 0x31, 0x78, 0x7d, 0xc8, 0xcc, 0x32, 0x45, 0x99, 0x7a, 0x63, 0x97, 0xd0, + 0x24, 0xe9, 0x0f, 0x05, 0xe9, 0x0a, 0xbc, 0x3c, 0x28, 0xe9, 0x50, 0x1b, 0x53, 0x6e, 0x25, 0x7a, + 0x07, 0xfe, 0xa7, 0x80, 0xd7, 0xb3, 0x85, 0x17, 0x83, 0xab, 0x43, 0x27, 0xdd, 0xad, 0xf0, 0xd4, + 0xeb, 0xbb, 0x03, 0x26, 0x0b, 0x70, 0x4d, 0x14, 0xa0, 0x0c, 0x17, 0x87, 0x28, 0x00, 0x09, 0xda, + 0xf8, 0xff, 0x13, 0xbf, 0xed, 0x99, 0x2a, 0x09, 0x5e, 0xcd, 0x9f, 0x75, 0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0x3c, 0xdf, 0x2c, 0x28, 0x7f, 0x6c, 0x16, 0x94, 0x27, 0x5b, 0x85, 0x91, 0xe7, + 0x5b, 0x85, 0x91, 0xdf, 0xb6, 0x0a, 0x23, 0x9f, 0x2e, 0x54, 0x5d, 0xbe, 0x51, 0x5f, 0xd7, 0x6d, + 0x52, 0x33, 0x6c, 0xc2, 0x6a, 0x84, 0xb5, 0xe1, 0xbf, 0x97, 0xe0, 0x37, 0xe6, 0x8d, 0x07, 0x1d, + 0xb7, 0xaf, 0x19, 0x60, 0xb6, 0xbe, 0x4f, 0x7c, 0x6a, 0xcd, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, + 0x6d, 0xa5, 0x22, 0x70, 0x1c, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1320,6 +1493,9 @@ type QueryClient interface { // QueryProposedConsumerChainIDs returns the chain IDs of the proposed consumer chain addition proposals // that are still in the voting period QueryProposedConsumerChainIDs(ctx context.Context, in *QueryProposedChainIDsRequest, opts ...grpc.CallOption) (*QueryProposedChainIDsResponse, error) + // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address + // between provider and consumer chain + QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, in *QueryAllPairsValConAddrByConsumerChainIDRequest, opts ...grpc.CallOption) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) } type queryClient struct { @@ -1420,6 +1596,15 @@ func (c *queryClient) QueryProposedConsumerChainIDs(ctx context.Context, in *Que return out, nil } +func (c *queryClient) QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, in *QueryAllPairsValConAddrByConsumerChainIDRequest, opts ...grpc.CallOption) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) { + out := new(QueryAllPairsValConAddrByConsumerChainIDResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryAllPairsValConAddrByConsumerChainID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // ConsumerGenesis queries the genesis state needed to start a consumer chain @@ -1450,6 +1635,9 @@ type QueryServer interface { // QueryProposedConsumerChainIDs returns the chain IDs of the proposed consumer chain addition proposals // that are still in the voting period QueryProposedConsumerChainIDs(context.Context, *QueryProposedChainIDsRequest) (*QueryProposedChainIDsResponse, error) + // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address + // between provider and consumer chain + QueryAllPairsValConAddrByConsumerChainID(context.Context, *QueryAllPairsValConAddrByConsumerChainIDRequest) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1486,6 +1674,9 @@ func (*UnimplementedQueryServer) QueryRegisteredConsumerRewardDenoms(ctx context func (*UnimplementedQueryServer) QueryProposedConsumerChainIDs(ctx context.Context, req *QueryProposedChainIDsRequest) (*QueryProposedChainIDsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryProposedConsumerChainIDs not implemented") } +func (*UnimplementedQueryServer) QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, req *QueryAllPairsValConAddrByConsumerChainIDRequest) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryAllPairsValConAddrByConsumerChainID not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1671,6 +1862,24 @@ func _Query_QueryProposedConsumerChainIDs_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _Query_QueryAllPairsValConAddrByConsumerChainID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllPairsValConAddrByConsumerChainIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryAllPairsValConAddrByConsumerChainID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Query/QueryAllPairsValConAddrByConsumerChainID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryAllPairsValConAddrByConsumerChainID(ctx, req.(*QueryAllPairsValConAddrByConsumerChainIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "interchain_security.ccv.provider.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1715,6 +1924,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryProposedConsumerChainIDs", Handler: _Query_QueryProposedConsumerChainIDs_Handler, }, + { + MethodName: "QueryAllPairsValConAddrByConsumerChainID", + Handler: _Query_QueryAllPairsValConAddrByConsumerChainID_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "interchain_security/ccv/provider/v1/query.proto", @@ -2554,6 +2767,122 @@ func (m *ProposedChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PairValConAddr) > 0 { + for iNdEx := len(m.PairValConAddr) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PairValConAddr[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *PairValConAddrProviderAndConsumer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PairValConAddrProviderAndConsumer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PairValConAddrProviderAndConsumer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ConsumerKey != nil { + { + size, err := m.ConsumerKey.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ConsumerAddress) > 0 { + i -= len(m.ConsumerAddress) + copy(dAtA[i:], m.ConsumerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ConsumerAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ProviderAddress) > 0 { + i -= len(m.ProviderAddress) + copy(dAtA[i:], m.ProviderAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProviderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2914,18 +3243,67 @@ func (m *ProposedChain) Size() (n int) { return n } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n } -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PairValConAddr) > 0 { + for _, e := range m.PairValConAddr { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n } -func (m *QueryConsumerGenesisRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 + +func (m *PairValConAddrProviderAndConsumer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProviderAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ConsumerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ConsumerKey != nil { + l = m.ConsumerKey.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryConsumerGenesisRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5022,6 +5400,322 @@ func (m *ProposedChain) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllPairsValConAddrByConsumerChainIDRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllPairsValConAddrByConsumerChainIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryAllPairsValConAddrByConsumerChainIDResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllPairsValConAddrByConsumerChainIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PairValConAddr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PairValConAddr = append(m.PairValConAddr, &PairValConAddrProviderAndConsumer{}) + if err := m.PairValConAddr[len(m.PairValConAddr)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PairValConAddrProviderAndConsumer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PairValConAddrProviderAndConsumer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PairValConAddrProviderAndConsumer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsumerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsumerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsumerKey", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ConsumerKey == nil { + m.ConsumerKey = &crypto.PublicKey{} + } + if err := m.ConsumerKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ccv/provider/types/query.pb.gw.go b/x/ccv/provider/types/query.pb.gw.go index c417c4688c..e3663ede15 100644 --- a/x/ccv/provider/types/query.pb.gw.go +++ b/x/ccv/provider/types/query.pb.gw.go @@ -303,6 +303,42 @@ func local_request_Query_QueryProposedConsumerChainIDs_0(ctx context.Context, ma } +var ( + filter_Query_QueryAllPairsValConAddrByConsumerChainID_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_QueryAllPairsValConAddrByConsumerChainID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllPairsValConAddrByConsumerChainIDRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryAllPairsValConAddrByConsumerChainID_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryAllPairsValConAddrByConsumerChainID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryAllPairsValConAddrByConsumerChainID_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllPairsValConAddrByConsumerChainIDRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryAllPairsValConAddrByConsumerChainID_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryAllPairsValConAddrByConsumerChainID(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -539,6 +575,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryAllPairsValConAddrByConsumerChainID_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryAllPairsValConAddrByConsumerChainID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -780,6 +839,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryAllPairsValConAddrByConsumerChainID_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryAllPairsValConAddrByConsumerChainID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -803,6 +882,8 @@ var ( pattern_Query_QueryRegisteredConsumerRewardDenoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "registered_consumer_reward_denoms"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryProposedConsumerChainIDs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "proposed_consumer_chains"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "consumer_chain_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -825,4 +906,6 @@ var ( forward_Query_QueryRegisteredConsumerRewardDenoms_0 = runtime.ForwardResponseMessage forward_Query_QueryProposedConsumerChainIDs_0 = runtime.ForwardResponseMessage + + forward_Query_QueryAllPairsValConAddrByConsumerChainID_0 = runtime.ForwardResponseMessage )