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

Fix broken integration test(s) at 80d146a #79

Closed
jtremback opened this issue Apr 29, 2022 · 8 comments
Closed

Fix broken integration test(s) at 80d146a #79

jtremback opened this issue Apr 29, 2022 · 8 comments
Assignees
Labels
scope: testing Code review, testing, making sure the code is following the specification.

Comments

@jtremback
Copy link
Contributor

Currently, the integration tests are failing because the distribution module beginblocker is crashing, because the distribution module needs to be disabled on consumer chains. This would be permanently solved by #77, but it should also be possible to solve it temporarily by taking the distribution module beginblocker out of the beginblocker order in the exposed module manager (@rigelrozanski can maybe explain how to do this)

@mpoke mpoke moved this to Todo in Replicated Security Apr 30, 2022
@mpoke mpoke moved this from Todo to Next in Replicated Security Apr 30, 2022
@mpoke mpoke added the ccv label Apr 30, 2022
@mpoke
Copy link
Contributor

mpoke commented May 5, 2022

Will be solved by #77.

@mpoke
Copy link
Contributor

mpoke commented May 13, 2022

Related to #98

@mpoke
Copy link
Contributor

mpoke commented May 19, 2022

See #98 (comment)

@mpoke mpoke added the mvcc label Jun 8, 2022
@sainoe
Copy link
Contributor

sainoe commented Jun 16, 2022

Solved by #139 however the integration tests are still failing due to the states checker.
The error can be reproduced using this WIP MVCC branch.
@danwt

@danwt
Copy link
Contributor

danwt commented Jun 16, 2022

@sainoe thanks for the info. I checked out the WIP MVCC branch and ran the integration tests 3 times. Each time I get the same error

main.StartConsumerChainAction{consumerChain:0x1, providerChain:0x0, validators:[]main.StartChainValidator{main.StartChainValidator{id:0x2, allocation:0x2540be400, stake:0x1dcd6500}, main.StartChainValidator{id:0x0, allocation:0x2540be400, stake:0x1dcd6500}, main.StartChainValidator{id:0x1, allocation:0x2540be400, stake:0x1dcd6500}}}
2022/06/16 13:42:02 exit status 1
Error: unknown command "provider" for "query"

it's from this code

func (s System) startConsumerChain(
action StartConsumerChainAction,
verbose bool,
) {
bz, err := exec.Command("docker", "exec", s.containerConfig.instanceName, s.chainConfigs[action.consumerChain].binaryName,
"query", "provider", "consumer-genesis",
s.chainConfigs[action.consumerChain].chainId,
`--node`, s.getValidatorNode(action.providerChain, s.getValidatorNum(action.providerChain)),
`-o`, `json`,
).CombinedOutput()

I cannot actually replicate the failed states checker execution.

I don't know why this unknown command "provider" for "query" happens. The code to implement the query seems to exist

func NewQueryCmd() *cobra.Command {
cmd := &cobra.Command{
Use: types.ModuleName,

@danwt
Copy link
Contributor

danwt commented Jun 16, 2022

@sainoe the query problem in the previous comment seems to be fixed in

https://github.com/cosmos/interchain-security/tree/sainoe/mvcc-integration-tests-fix

but now I'm getting

main.AddIbcChannelAction{chainA:0x1, chainB:0x0, connectionA:0x0, portA:"consumer", portB:"provider", order:"ordered"}
addIBCChannel: 2022-06-16T14:03:04.163523Z  INFO ThreadId(01) using default configuration from '/root/.hermes/config.toml'
addIBCChannel: Error: missing chain for id (connection-0) in configuration file
{}
main.RelayPacketsAction{chain:0x0, port:"provider", channel:0x0}
2022/06/16 15:03:04 exit status 1
2022-06-16T14:03:04.336735Z  INFO ThreadId(01) using default configuration from '/root/.hermes/config.toml'
Error: supervisor error: channel provider/channel-0 on chain provider is not open
exit status 1

which still doesn't seem exactly the same.

@sainoe sainoe moved this from Next to In Progress in Replicated Security Jun 17, 2022
@mpoke mpoke assigned danwt and unassigned rigelrozanski and sainoe Jun 24, 2022
@danwt danwt changed the title Integration tests failing because of consumer chain Fix broken integration test(s) at 80d146a Jun 26, 2022
@danwt danwt added the scope: testing Code review, testing, making sure the code is following the specification. label Jun 26, 2022
@danwt
Copy link
Contributor

danwt commented Jun 26, 2022

Debugging, the first sendTokens on the consumer that occurs after starting the consumer chain but before relaying any packets between consumer and provider does not work as expected

{
action: SendTokensAction{
chain: 1,
from: 0,
to: 1,
amount: 1,
},
state: State{
1: ChainState{
ValBalances: &map[uint]uint{
0: 9999999999,
1: 10000000001,
},
},
},
},

Leads to

main.SendTokensAction{chain:0x1, from:0x0, to:0x1, amount:0x1}
"actual state"
{1: {ValBalances: {0: 10000000000,
                   1: 10000000000},
     Proposals:   nil,
     ValPowers:   nil}}
"model state"
{1: {ValBalances: {0: 9999999999,
                   1: 10000000001},
     Proposals:   nil,
     ValPowers:   nil}}
2022/06/26 14:21:47 actual state (-) not equal to model state (+):  {
  1: {
   ValBalances: {
-   0: 10000000000,
-   1: 10000000000,
+   0: 9999999999,
+   1: 10000000001,
   },
   Proposals: nil,
   ValPowers: nil,
  },
 }
exit status 1

raised here

log.Fatal(`actual state (-) not equal to model state (+): ` + pretty.Compare(actualState, modelState))

@danwt
Copy link
Contributor

danwt commented Jun 26, 2022

Closed as not fine grained enough. See new issues

@danwt danwt closed this as completed Jun 26, 2022
Repository owner moved this from In Progress to Done in Replicated Security Jun 26, 2022
ThanhNhann pushed a commit to decentrio/interchain-security that referenced this issue Jan 3, 2024
* update main to latest commit of SDK

* bump to SDK commit 0c2d4a86fd3b2acb7bda7f09b9a68bab67a566ee

* fix build/tests

* update SDK commit and fix simapp

* use sdk v0.43.0-alpha1 release

* update SDK version to commit '711976e'

* fix build

* bump SDK commit to 'e3e89f52607b9d205e1ddea4af2d47e98e0ff2b1'

* add SDK change into migrations
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
No open projects
Status: Done
Development

No branches or pull requests

5 participants