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

tests: testing ibc transactions on e2e tests #2284

Merged
merged 15 commits into from
Oct 19, 2023
Merged

tests: testing ibc transactions on e2e tests #2284

merged 15 commits into from
Oct 19, 2023

Conversation

gsk967
Copy link
Collaborator

@gsk967 gsk967 commented Oct 16, 2023

Description

In this pull request we are upgraded hermes relayer to v1.6.0 and gaia to v13.0.0 , to make sure all our testing images up to date

  1. We are using hermes image from docker hub

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • added appropriate labels to the PR
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #2284 (c3f3c0d) into main (7f05ad4) will decrease coverage by 4.90%.
Report is 264 commits behind head on main.
The diff coverage is 83.12%.

❗ Current head c3f3c0d differs from pull request most recent head c09028f. Consider uploading reports for the commit c09028f to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2284      +/-   ##
==========================================
- Coverage   75.38%   70.49%   -4.90%     
==========================================
  Files         100      170      +70     
  Lines        8025    12882    +4857     
==========================================
+ Hits         6050     9081    +3031     
- Misses       1589     3198    +1609     
- Partials      386      603     +217     
Files Coverage Δ
ante/ante.go 66.66% <100.00%> (+18.45%) ⬆️
ante/fee.go 80.00% <100.00%> (+1.64%) ⬆️
ante/spam_prevention.go 75.92% <ø> (ø)
app/inflation/inflation.go 100.00% <100.00%> (ø)
util/coin/utoken.go 100.00% <100.00%> (ø)
x/incentive/client/tests/suite.go 100.00% <100.00%> (ø)
x/incentive/client/tests/tests.go 100.00% <100.00%> (ø)
x/incentive/codec.go 47.82% <ø> (+9.89%) ⬆️
x/incentive/genesis.go 92.48% <100.00%> (+79.14%) ⬆️
x/incentive/keeper/bond.go 92.50% <ø> (ø)
... and 44 more

... and 95 files with indirect coverage changes

@gsk967 gsk967 marked this pull request as ready for review October 17, 2023 13:08
@gsk967 gsk967 requested a review from a team as a code owner October 17, 2023 13:08
@gsk967
Copy link
Collaborator Author

gsk967 commented Oct 17, 2023

Note: once it is merged , we need to changehermes relayer and gaia images and we need build new ones and push to ghcr and raise new PR with changing image names on tests
@robert-zaremba @toteki

@gsk967 gsk967 enabled auto-merge October 17, 2023 13:09
@gsk967 gsk967 changed the title tests(WIP): testing ibc transactions on e2e tests tests: testing ibc transactions on e2e tests Oct 17, 2023
@@ -64,31 +64,24 @@ func (s *E2ETest) checkOutflows(umeeAPIEndpoint, denom string, checkWithExcRate
}

func (s *E2ETest) checkSupply(endpoint, ibcDenom string, amount math.Int) {
attempt := 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am removing attempt from here bcause the relayer taking so much time making ibc txn submitting on both sides

@@ -10,5 +12,5 @@ gaiad collect-gentxs
sed -i 's/127.0.0.1:26657/0.0.0.0:26657/g' /root/.gaia/config/config.toml
sed -i -e 's/enable = false/enable = true/g' /root/.gaia/config/app.toml
sed -i -e 's/pruning = "default"/pruning = "nothing"/g' /root/.gaia/config/app.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "300ms"/g' /root/.gaia/config/config.toml
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is too fast 300ms , so relayer needs to catup the blocks height , so I making 1s

port = 3001

[[chains]]
id = '$UMEE_E2E_UMEE_CHAIN_ID'
rpc_addr = 'http://$UMEE_E2E_UMEE_VAL_HOST:26657'
grpc_addr = 'http://$UMEE_E2E_UMEE_VAL_HOST:9090'
websocket_addr = 'ws://$UMEE_E2E_UMEE_VAL_HOST:26657/websocket'
event_source = { mode = 'push', url = 'ws://$UMEE_E2E_UMEE_VAL_HOST:26657/websocket', batch_delay = '500ms' }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

batch_delay 500ms they are recommended with their tests

func() bool {
s.T().Log("We are waiting for channel creation...")
channels, err := s.QueryIBCChannels(s.UmeeREST())
if channels {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to wait for ibc channels creation before making the ibc txn

}
return err == nil
}, 5*time.Second, 200*time.Millisecond, "require tx to be included in block")
// Note: we are cchecking only one side of ibc , we don't know whethever ibc transfer is succeed on one side
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am commenting this LOC, becuase we are checking only one side of ibc txn , we don't know whether ibc is succeed on other side of ibc

Copy link
Member

Choose a reason for hiding this comment

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

was this working before? Why it doesn't work now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, it is not working previously because they check only one side on ibc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Previously When I wrote this , there is no txn checking , we are just waiting around 12 seconds I think for every IBC Txn

return false
},
2*time.Minute,
10*time.Minute,
Copy link
Member

Choose a reason for hiding this comment

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

why do we increase it to 10min? that sounds too much...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't know ibc txn is succeed or not, we only know txn is succceed when that denom exists in supply query

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

10 minutes I know it is too much but that is the maximum time to check the ibc txn because sometimes hermes relayer taking too much time submit the ibc txn on both sides

Copy link
Member

Choose a reason for hiding this comment

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

for e2e tests, 10min is too much. Can we keep it to 2 or 3 min?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't know how much time taking to succeed ibc txn with this new hermes , so I keep maximum 10m , 2minutes or 3 minutes not enough at least it required 6minutes to check the supply (like ibc txn to succeed)

I will update this time in next PR (once cross checking done with go relayer and hermes )

tests/e2e/e2e_ibc_test.go Show resolved Hide resolved
// send $15 ATOM from umee to gaia
sendAtom := mulCoin(atomQuota, "0.15")
sendAtom := mulCoin(atomQuota, "0.05")
Copy link
Member

Choose a reason for hiding this comment

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

why do we change the amount here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just making sure the total sending quota is always less than TotalQuota (120$)

}
return err == nil
}, 5*time.Second, 200*time.Millisecond, "require tx to be included in block")
// Note: we are cchecking only one side of ibc , we don't know whethever ibc transfer is succeed on one side
Copy link
Member

Choose a reason for hiding this comment

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

was this working before? Why it doesn't work now?

}
return channels
},
10*time.Minute,
Copy link
Member

Choose a reason for hiding this comment

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

10min is a lot

@gsk967 gsk967 added this pull request to the merge queue Oct 19, 2023
Merged via the queue into main with commit 52bade8 Oct 19, 2023
20 of 21 checks passed
@gsk967 gsk967 deleted the sai/fix_e2e_ibc branch October 19, 2023 11:24
facundomedica pushed a commit that referenced this pull request Oct 30, 2023
* WIP: testing ibc txn on e2e tests

* using testing docker images of gaia and hermes relayer

* fixing the tests

* fix the calculation on tests

* fix++

* fix++

* fix++

* fix++

* adding default hermes relayer image

* using ghcr gaia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants