Skip to content

Commit 17ce339

Browse files
authored
docs: Add explanation on how a connection can be manually verified (#838)
doc: Add explanation on how a connection can be manually verified
1 parent 8a30139 commit 17ce339

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

docs/adr/ICON_IBC.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,24 @@ func updateConnectionCommitment(connection):
3434
sendBTPMessage(join(clientKey, clientState));
3535
sendBTPMessage(join(consensusKey, latestConsensusState));
3636
sendBTPMessage(join(connectionKey, connection))
37-
}
37+
3838
```
3939

4040
During connection establishment all self client validation is skipped, and will have to be done manually when opening a new channel.
41+
### Manual connection verification
42+
(These steps can be omitted if the connection was established by a relay that you trust)
43+
To verify that a counterparty has stored the correct clientState or consensus state, find the latest BTP block that should be on the client and compare that to what is on the light client.
44+
Easiest way is to manually verify it on the counterparty client by fetching the client or consensus state directly from the client. But can also be proved through verifyMembership on the lightClient on ICON.
45+
46+
A btp block can be fetched [Block](https://github.com/icon-project/goloop/blob/master/doc/btp2_extension.md) GET request.
47+
Which can then be compared with the states in the light client:
48+
```
49+
GetConsensusState { client_id: String, height: u64 },
50+
#[returns(Vec<u8>)]
51+
GetLatestConsensusState { client_id: String },
52+
#[returns(Vec<u8>)]
53+
GetClientState { client_id: String },
54+
```
4155

4256
## ICS-04
4357
For BTP blocks and the ICON lightclient we have two restrictions:

0 commit comments

Comments
 (0)