Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICS for 47: assignConsumerPubKeyAction #924

Closed
faddat opened this issue May 7, 2023 · 1 comment
Closed

ICS for 47: assignConsumerPubKeyAction #924

faddat opened this issue May 7, 2023 · 1 comment
Labels
scope: testing Code review, testing, making sure the code is following the specification.

Comments

@faddat
Copy link
Contributor

faddat commented May 7, 2023

Is it possible that a third sdk update is needed? Here's our log output:

startChain: + read -p 'Press Return to Close...'
startChain: done!!!!!!!!
running default: step 2 == submitConsumerAdditionProposalAction 
running default: step 3 == assignConsumerPubKeyAction 
assignConsumerPubKey cmd: /usr/bin/docker exec interchain-security-instance /bin/bash -c interchain-security-pd tx provider assign-consensus-key consu '{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}' --from validatorcarol --chain-id provi --home /provi/validatorcarol --node tcp://7.7.7.6:26658 --gas 900000 --keyring-backend test -b sync -y -o json
=============== default FAILED ===============
FAILED action assignConsumerPubKeyAction
"actual state"
{consu: {ValBalances:             nil,
         Proposals:               nil,
         ValPowers:               nil,
         RepresentativePowers:    nil,
         Params:                  nil,
         Rewards:                 nil,
         ConsumerChains:          nil,
         AssignedKeys:            {carol: ""},
         ProviderKeys:            {carol: ""},
         ConsumerChainQueueSizes: nil,
         GlobalSlashQueueSize:    nil}}
"model state"
{consu: {ValBalances:             nil,
         Proposals:               nil,
         ValPowers:               nil,
         RepresentativePowers:    nil,
         Params:                  nil,
         Rewards:                 nil,
         ConsumerChains:          nil,
         AssignedKeys:            {carol: "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk"},
         ProviderKeys:            {carol: "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6"},
         ConsumerChainQueueSizes: nil,
         GlobalSlashQueueSize:    nil}}
2023/05/07 21:45:38 actual state (-) not equal to model state (+):  {
  consu: {
   ValBalances: nil,
   Proposals: nil,
   ValPowers: nil,
   RepresentativePowers: nil,
   Params: nil,
   Rewards: nil,
   ConsumerChains: nil,
   AssignedKeys: {
-   carol: "",
+   carol: "cosmosvalcons1kswr5sq599365kcjmhgufevfps9njf43e4lwdk",
   },
   ProviderKeys: {
-   carol: "",
+   carol: "cosmosvalcons1ezyrq65s3gshhx5585w6mpusq3xsj3ayzf4uv6",
   },
   ConsumerChainQueueSizes: nil,
   GlobalSlashQueueSize: nil,
  },
 }
@MSalopek MSalopek added question scope: testing Code review, testing, making sure the code is following the specification. labels May 16, 2023
@MSalopek
Copy link
Contributor

Thanks for your concern!

The issue is that the key assignment state check is performed before the assignment Tx was included in a block.

--broadcast-mode block was removed from the CLI so only sync | async are available.

Context:
When submitting transactions with --broadcast-mode block the caller would wait for the tx to be included in a block (waits for CheckTx, DeliverTx, block inclusion, return Tx Result). In sync mode, the Tx is executed and Tx Result is returned, but it is not guaranteed that the Tx is included in a block.

e2e testing framework has waitBlocks function in the e2e suite, so the solution is to just wait for Tx inclusion and then allowing the state check to run.

Closing, as there is no action necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: testing Code review, testing, making sure the code is following the specification.
Projects
None yet
Development

No branches or pull requests

2 participants