icon-project / IBC-Integration

Apache License 2.0
17 stars 15 forks source link

[Project] - Hop-chain #760

Open pragyanshrestha-ibriz opened 11 months ago

pragyanshrestha-ibriz commented 11 months ago

Cosmos SDK chains integration with Centauri

ibrizsabin commented 9 months ago

The integration of wasm lightclient with relayer is a bit stuck right now due to incompatibility issue with the proto files declaration on javascore side. Once the proto files align with the cosmos official proto files we should be able to continue with the integration with relay.

ibrizsabin commented 8 months ago

we have some deviations that we discovered during integration with hopchain. One is most of the values are hashed using shaSum instead of keccak. Another one being it tries to verify hash of acknowledgement bytes rather than the value itself . Which results in double hashing of value on light client resulting proof failure. For now i have patched it by trying to verify membership by once hashing the value and once not hashing the value but its not a good solution. To rectify this we would need to apply following changes 1.Make it convention to hash values using shasum rather than keccak in javascore BTPmessage , icon light client and relayer.

  1. While creating btp message for acknowledgement hash the value twice so that it works seamlessly in light client. We would need to verify that this works well with our deployed IBC as well.
ibrizsabin commented 8 months ago

After discussing this issue we have decided that the solution to resolve this properly would be to apply sha256 to acknowledgement and keccak it before generating btp message this will make our implementation closer to ibc spec. On light client side we have to make adjustments for older membership verification that provides raw acknowledgement bytes.