-
Notifications
You must be signed in to change notification settings - Fork 610
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
e2e: ICS27 interchain accounts x/group integration #2195
Conversation
Co-authored-by: Carlos Rodriguez <[email protected]>
members := []grouptypes.MemberRequest{ | ||
{ | ||
Address: chainAAddress, | ||
Weight: "1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract to const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably a good habit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is a threshold decision policy? What does the weight do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ThresholdDecisionPolicy
defines a weighted threshold that x amount of YES votes must meet in order to succeed. Each group member can carry a different weight which is accounted for in the tally.
I've moved a bunch of fields to consts at the top of file and added godocs (some copy pasted from sdk).
All the e2e tests will fail as the ibctest ibc-go version needs to match the one in our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woot woot!! Superb work! Left some suggestions, will review in detail once it is updated to an alpha tag
members := []grouptypes.MemberRequest{ | ||
{ | ||
Address: chainAAddress, | ||
Weight: "1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably a good habit
members := []grouptypes.MemberRequest{ | ||
{ | ||
Address: chainAAddress, | ||
Weight: "1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is a threshold decision policy? What does the weight do?
…go into damian/2039-e2e-ics27-groups
…go into damian/2039-e2e-ics27-groups
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2195 +/- ##
==========================================
+ Coverage 78.70% 78.74% +0.04%
==========================================
Files 178 178
Lines 12311 12298 -13
==========================================
- Hits 9689 9684 -5
+ Misses 2195 2190 -5
+ Partials 427 424 -3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks, @damiannolan!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! 😎 Super cool to see a test for this. Thanks for handling this work!
@@ -365,8 +379,10 @@ func (s *E2ETestSuite) initGRPCClients(chain *cosmos.CosmosChain) { | |||
ClientQueryClient: clienttypes.NewQueryClient(grpcConn), | |||
ChannelQueryClient: channeltypes.NewQueryClient(grpcConn), | |||
FeeQueryClient: feetypes.NewQueryClient(grpcConn), | |||
ICAQueryClient: intertxtypes.NewQueryClient(grpcConn), | |||
ICAQueryClient: controllertypes.NewQueryClient(grpcConn), | |||
InterTxQueryClient: intertxtypes.NewQueryClient(grpcConn), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should open up an issue to remove all the intertx stuff once v5 is no longer supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can open an issue. When is v5 no longer supported? Like 1 year from now?
}) | ||
|
||
t.Run("verify interchain account registration success", func(t *testing.T) { | ||
interchainAccAddr, err = s.QueryInterchainAccount(ctx, chainA, groupPolicyAddr, ibctesting.FirstConnectionID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you could assert the addr is non empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added as an extra sanity check but I don't think its reachable. Something would be wrong with the query then I think
channels, err := relayer.GetChannels(ctx, s.GetRelayerExecReporter(), chainA.Config().ChainID) | ||
s.Require().NoError(err) | ||
s.Require().Equal(len(channels), 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 transfer channel, 1 ica channel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! Added inline comment 👍
balance, err := chainB.GetBalance(ctx, chainBAddress, chainB.Config().Denom) | ||
s.Require().NoError(err) | ||
|
||
_, err = chainB.GetBalance(ctx, interchainAccAddr, chainB.Config().Denom) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you check that this balance has be subtracted as a sanity check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
* adding x/group to simapp * [WIP] initial groups e2e scaffolding * work in progress * clean * adding interchain account address query to ica controller * adding basic cli query * satisfy linter, aligning recvr var naming * initial passing, register account proposal * successfully passing locally * updating default genesis state with allow all ica msgs, cleanup * reinstate num validators and num full nodes * unpin ibctest * Update e2e/tests/interchain_accounts/groups_test.go Co-authored-by: Carlos Rodriguez <[email protected]> * updating swagger docs * updating e2e to ibc-go/v6 * update deps, remove genesis code, extract consts * code comments and consts * readding intertx query client * fixing godoc * removing json entry in test matracies * adding sanity checks and in-line comment Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit 8abcba0) # Conflicts: # e2e/go.mod # e2e/go.sum # e2e/tests/interchain_accounts/base_test.go # e2e/tests/interchain_accounts/incentivized_test.go # e2e/testsuite/grpc_query.go # e2e/testsuite/testsuite.go
Description
x/group
integration for interchain-accounts.closes: #2039
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes