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

Confusion about connectionOpenAck in IBCConnection.sol #168

Closed
michwqy opened this issue Apr 13, 2023 · 2 comments · Fixed by #169
Closed

Confusion about connectionOpenAck in IBCConnection.sol #168

michwqy opened this issue Apr 13, 2023 · 2 comments · Fixed by #169
Assignees

Comments

@michwqy
Copy link

michwqy commented Apr 13, 2023

I found that connection.state allowed to be INIT or TRYOPEN in connectionOpenAck function of contracts/core/03-connection/IBCConnection.sol. I don't understand when connection.state is TRYOPEN and connectionOpenAck can be executed successfully. Since connectionOpenAck requires counterparty connection in TRYOPEN state, connectionOpenTry requires conterparty connection in INIT state and there is no way that connection can go to TRYOPEN from INIT, I think connectionOpenAck can't be executed successfully if connection.state is TRYOPEN. Is there any purpose I don't understand?

@bluele
Copy link
Member

bluele commented Apr 14, 2023

Thank you for opening an issue.

In conclusion, this is a bug.

In previous versions(e.g. v1.0.0) of ibc-go, it was possible for a chain that executed ConnOpenInit to execute ConnOpenTry by referencing a previous connection. Consequently, there could be both INIT and TRY_OPEN as a previous connection state on ConnOpenAck.

However, the latest ics-03 does not support referencing a previous connection on ConnOpenTry, so only INIT should be allowed as a previous state on ConnOpenACK. Therefore, ibc-solidity needs to be fixed in the same way.

@bluele bluele self-assigned this Apr 14, 2023
@michwqy
Copy link
Author

michwqy commented Apr 15, 2023

Thanks for your reply.

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 a pull request may close this issue.

2 participants