-
Notifications
You must be signed in to change notification settings - Fork 662
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
Write e2e tests for channel upgradability #5174
Comments
Hello guys, can I take the issues? TYSM |
Thank you very much, @expertdicer! We are trying to get one happy path test passing first, but we're having some issues in our integration with hermes, as soon as that it solved I think it will be easier to tackle the other tests, so I can ping you back when that happens. |
Hermes was lacking support for channel upgrade cancel, so I implemented that in this PR, so that I could do the following manual tests:
It seems like the relayer submits channel upgrade try to both chains, but then the upgrade doesn't continue any further.
I couldn't complete the test because hermes seems to relay only packets if the channel state is
where {
"title": "Channel upgrade init",
"summary": "Channel upgrade init",
"messages": [
{
"@type": "/ibc.core.channel.v1.MsgChannelUpgradeInit",
"signer": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",
"port_id": "transfer",
"channel_id": "channel-0",
"fields": {
"ordering": "ORDER_UNORDERED",
"connection_hops": ["connection-0"],
"version": "{\"fee_version\":\"ics29-1\",\"app_version\":\"ics20-1\"}"
}
}
],
"metadata": "AQ==",
"deposit": "100005stake"
}
I tested this scenario manually with the following commands chain1 aborts the upgrade on ack and then I was able to relay the cancellation to chain2 and cancel as well the upgrade on its side. These are the commands I used:
where {
"title": "Channel update params",
"summary": "Update channel params",
"messages": [
{
"@type": "/ibc.core.channel.v1.MsgUpdateParams",
"params": {
"upgrade_timeout": {
"height": {
"revision_number": "0",
"revision_height": "0"
},
"timestamp": 5000000000
}
},
"authority":"cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
}
],
"metadata": "AQ==",
"deposit": "100005stake"
} and {
"title": "Channel upgrade init",
"summary": "Channel upgrade init",
"messages": [
{
"@type": "/ibc.core.channel.v1.MsgChannelUpgradeInit",
"signer": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",
"port_id": "transfer",
"channel_id": "channel-0",
"fields": {
"ordering": "ORDER_UNORDERED",
"connection_hops": ["connection-0"],
"version": "{\"fee_version\":\"ics29-1\",\"app_version\":\"ics20-1\"}"
}
}
],
"metadata": "AQ==",
"deposit": "100005stake"
}
I was able to test this locally and after governance executes the cancellation there is an error receipt and relaying cancel to the counterparty does cancel the upgrade on its side as well. These are the commands I used:
where {
"title": "Channel upgrade init",
"summary": "Channel upgrade init",
"messages": [
{
"@type": "/ibc.core.channel.v1.MsgChannelUpgradeInit",
"signer": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",
"port_id": "transfer",
"channel_id": "channel-0",
"fields": {
"ordering": "ORDER_UNORDERED",
"connection_hops": ["connection-0"],
"version": "{\"fee_version\":\"ics29-1\",\"app_version\":\"ics20-1\"}"
}
}
],
"metadata": "AQ==",
"deposit": "100005stake"
} and {
"title": "Channel upgrade cancel",
"summary": "Channel upgrade cancel",
"messages": [
{
"@type": "/ibc.core.channel.v1.MsgChannelUpgradeCancel",
"signer": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",
"port_id": "transfer",
"channel_id": "channel-0"
}
],
"metadata": "AQ==",
"deposit": "100005stake"
} |
Besides the e2e that we have added, there is also a number of test cases covered in hermes using the step functions to set up the right conditions. |
Some tests that we could write. Each can be done in a separate PR.
The start situation for all these tests is: 2 chains with an opened transfer channel that would like to upgrade the channel to use fee middleware. Unless in the crossing hello scenario, chain A executes
ChanUpgradeInit
and chain BChanUpgradeTry
.Tasks
ChanUpgradeAck
fails on chain A because counterparty-specified timeout has elapsed #5531The text was updated successfully, but these errors were encountered: