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

Chain Upgrade Test #163

Closed
wants to merge 24 commits into from
Closed

Chain Upgrade Test #163

wants to merge 24 commits into from

Conversation

hannydevelop
Copy link
Contributor

@hannydevelop hannydevelop commented Aug 22, 2022

Closes: #173

Description

Support testing chain upgrades, potentially by integrating with or using ideas from ibctest. Here's a link to more info on what this test entails.

@hannydevelop hannydevelop temporarily deployed to CI August 22, 2022 19:18 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 22, 2022 19:18 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 28, 2022 06:31 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 28, 2022 06:31 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 06:52 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 06:52 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 07:20 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 07:20 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 11:56 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 11:56 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 13:39 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 13:39 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 14:05 Inactive
@hannydevelop hannydevelop temporarily deployed to CI August 29, 2022 14:05 Inactive
@hannydevelop hannydevelop temporarily deployed to CI September 7, 2022 08:08 Inactive
@hannydevelop hannydevelop temporarily deployed to CI September 7, 2022 08:08 Inactive
@hannydevelop hannydevelop marked this pull request as ready for review September 7, 2022 08:24
@hannydevelop hannydevelop requested review from agouin, EricBolten and philipjames44 and removed request for kkennis September 7, 2022 08:25
Copy link
Member

@cbrit cbrit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few items for consideration!

e2e_build_upgrade_images: e2e_clean_slate
@docker pull $(ORCHESTRATOR_IMAGE)
@docker tag $(ORCHESTRATOR_IMAGE) orchestrator:3.1.0
@docker build -t sommelier:4.0.1 -f Dockerfile .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think you meant to use the SOMM_IMAGE (line 410) var here? Something like "SOMM4_IMAGE" may help disambiguate it from SOMMELIER_IMAGE

Copy link
Contributor Author

@hannydevelop hannydevelop Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that, line 410 isn't necessary, I'm removing that in the next commit. As you can see, it's not used here, or anywhere.

@docker pull $(ORCHESTRATOR_IMAGE)
	@docker tag $(ORCHESTRATOR_IMAGE) orchestrator:3.1.0
	@docker build -t sommelier:4.0.1 -f Dockerfile .
	@docker pull $(ETHEREUM_IMAGE)
	@docker tag $(ETHEREUM_IMAGE) ethereum:3.1.0
	@docker pull $(SOMMELIER_IMAGE)
	@docker tag $(SOMMELIER_IMAGE) sommelier:3.1.0

I was using it to debug

hdwallet "github.com/miguelmota/go-ethereum-hdwallet"
)

const DerivationPath = "m/44'/60'/0'/0/0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe name it EthereumDerivationPath so it doesn't get mistakenly used for Cosmos keys in the future?
same for the one in intregation_tests/keys.go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think for better consistency in somm's integration file as well as gravity-bridge, I'll leave this out for now. Thanks for reviewing though, I appreciate

Comment on lines +169 to +171
if err != nil {
return true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like any code after this until the end of the Eventually block is unreachable since line 168 ensures that err != nil

},
})
res, err := s.chain.sendMsgs(*clientCtxs, sendCoin)
s.T().Logf("Send coin response:%s", res)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should only log the response if there is an error? It's a very large object and makes the logs kind of noisy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, was thinking about that too. Will do that

// Submit proposal
s.T().Log("submit proposal upgrading chain")
res, err := s.chain.sendMsgs(*clientCtx, proposalMsg)
s.T().Logf("submit proposal response:%s", res)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thought here about only logging res on error

e2e_upgrade: e2e_clean_upgrade_slate
@E2E_SKIP_CLEANUP=true upgrade_tests/upgrade_tests.test -test.failfast -test.v -test.run UpgradeTestSuite -testify.m TestSommChainUpgrade || make -s fail

fail:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overwrites another task named fail in the integration tests section, resulting in these logs when running the new e2e commands:

Makefile:445: warning: overriding commands for target `fail'
Makefile:390: warning: ignoring old commands for target `fail'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!!

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Oct 24, 2022
@github-actions github-actions bot closed this Oct 31, 2022
@hannydevelop hannydevelop reopened this Oct 31, 2022
@hannydevelop hannydevelop temporarily deployed to CI October 31, 2022 05:26 Inactive
@hannydevelop hannydevelop temporarily deployed to CI October 31, 2022 05:26 Inactive
@hannydevelop hannydevelop temporarily deployed to CI October 31, 2022 05:26 Inactive
@github-actions github-actions bot closed this Nov 7, 2022
@hannydevelop hannydevelop reopened this Nov 9, 2022
@hannydevelop hannydevelop temporarily deployed to CI November 9, 2022 12:54 Inactive
@hannydevelop hannydevelop temporarily deployed to CI November 9, 2022 12:54 Inactive
@hannydevelop hannydevelop temporarily deployed to CI November 9, 2022 12:54 Inactive
@hannydevelop hannydevelop temporarily deployed to CI November 9, 2022 14:45 Inactive
@hannydevelop hannydevelop temporarily deployed to CI November 9, 2022 14:45 Inactive
@hannydevelop hannydevelop temporarily deployed to CI November 9, 2022 14:45 Inactive
@github-actions github-actions bot closed this Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chain upgrade suite
2 participants