Skip to content

Commit

Permalink
First stab at ICS3 connection handshake protocol (message processing …
Browse files Browse the repository at this point in the history
…logic) (informalsystems#188)

* First processing logic for ICS 03 (#160).

* Fix for temporary pick_version().

* First attempt at the process_try_msg function.

* Sketch for proof verification in process_try_msg. Removed Connection* traits.

* Added logic for the Try message.

* Logic for processing ICS3 confirm msg. Cosmetic improvements

* Adapting code to new architecture based on contexts.

* Refactored, new terminology, added events.

* WIP: Adding tests

* Higher-level interface for the context.

* One chunk of proof verification is done

* Implementation of ics3 verify_proofs done.

* Addressing Romain's concerns.

* Tests for conn open init message processing.

* Fixes for integration tests: PartialEq for identifiers.

* More changes cf adr003 and code reorg

* Move info to new  context and context_mock modules

* migrate conn-open-init to new infra

* Refine client and connection mock context

* Fix conn_open_try handler

* Create new mock_client

* remove mocks.rs

* Add global chain context

* Uncomment tests

* Cleanup

* Started to fill client verification functions.

Started TryFromRaw for connection messages.

Some work on commitment prefix, path, root.

* Add try_from for connection messages and remove new()

* Add test for try dispatch

* Some changes to mock context setup

* Some cleanup

* Review comments

* Mark mocks as `#[cfg(test)]

* Fix clippy warnings

* Remove use of clone in a Debug impl

Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Co-authored-by: Romain Ruetschi <romain@informal.systems>
  • Loading branch information
3 people authored Sep 3, 2020
1 parent a6e7d70 commit 1f49991
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions relayer-cli/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use ibc::ics03_connection::connection::ConnectionEnd;
use ibc::ics03_connection::connection::State as ConnectionState;
use ibc::ics04_channel::channel::{ChannelEnd, Order, State as ChannelState};
use ibc::ics23_commitment::CommitmentPrefix;
use ibc::ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId};
use ibc::ics24_host::Path::{ChannelEnds, ClientConnections, Connections};
use relayer::chain::{Chain, CosmosSDKChain};
Expand Down Expand Up @@ -61,10 +60,7 @@ fn query_connection_id() {
assert_eq!(query.client_id(), "clientidone");
assert_eq!(query.counterparty().client_id(), "clientidtwo");
assert_eq!(query.counterparty().connection_id(), "connectionidtwo");
assert_eq!(
query.counterparty().prefix(),
&CommitmentPrefix::new(b"prefix".to_vec())
);
assert_eq!(query.counterparty().prefix(), &b"prefix".to_vec().into());
assert_eq!(
query.versions(),
vec!["(1,[ORDER_ORDERED,ORDER_UNORDERED])"]
Expand Down

0 comments on commit 1f49991

Please sign in to comment.