---
# System prepended metadata

title: Duality relayer
tags: [game-of-chains]

---

---
tags: game-of-chains
---

# Duality relayer


## Connection setup
```
hermes create connection --a-chain duality --a-client 07-tendermint-0 --b-client 07-tendermint-6
2022-11-28T20:59:18.935348Z  INFO ThreadId(01) using default configuration from '/home/hermes/.hermes/config.toml'
2022-11-28T20:59:19.049669Z  INFO ThreadId(01) Creating a new connection with pre-existing clients 07-tendermint-0 and 07-tendermint-6
2022-11-28T20:59:26.636440Z  INFO ThreadId(01) 🥂 duality => OpenInitConnection(OpenInit { Attributes { connection_id: connection-0, client_id: 07-tendermint-0, counterparty_connection_id: None, counterparty_client_id: 07-tendermint-6 } }) at height 0-14
2022-11-28T20:59:51.430431Z  INFO ThreadId(01) 🥂 provider => OpenTryConnection(OpenTry { Attributes { connection_id: connection-19, client_id: 07-tendermint-6, counterparty_connection_id: connection-0, counterparty_client_id: 07-tendermint-0 } }) at height 0-339416
2022-11-28T21:00:17.234523Z  INFO ThreadId(01) 🥂 duality => OpenAckConnection(OpenAck { Attributes { connection_id: connection-0, client_id: 07-tendermint-0, counterparty_connection_id: connection-19, counterparty_client_id: 07-tendermint-6 } }) at height 0-21
2022-11-28T21:00:25.562033Z  INFO ThreadId(01) 🥂 provider => OpenConfirmConnection(OpenConfirm { Attributes { connection_id: connection-19, client_id: 07-tendermint-6, counterparty_connection_id: connection-0, counterparty_client_id: 07-tendermint-0 } }) at height 0-339421
2022-11-28T21:00:28.568621Z  INFO ThreadId(01) connection handshake already finished for Connection { delay_period: 0ns, a_side: ConnectionSide { chain: BaseChainHandle { chain_id: duality }, client_id: 07-tendermint-0, connection_id: connection-0 }, b_side: ConnectionSide { chain: BaseChainHandle { chain_id: provider }, client_id: 07-tendermint-6, connection_id: connection-19 } }
SUCCESS Connection {
    delay_period: 0ns,
    a_side: ConnectionSide {
        chain: BaseChainHandle {
            chain_id: ChainId {
                id: "duality",
                version: 0,
            },
            runtime_sender: Sender { .. },
        },
        client_id: ClientId(
            "07-tendermint-0",
        ),
        connection_id: Some(
            ConnectionId(
                "connection-0",
            ),
        ),
    },
    b_side: ConnectionSide {
        chain: BaseChainHandle {
            chain_id: ChainId {
                id: "provider",
                version: 0,
            },
            runtime_sender: Sender { .. },
        },
        client_id: ClientId(
            "07-tendermint-6",
        ),
        connection_id: Some(
            ConnectionId(
                "connection-19",
            ),
        ),
    },
}
```

## Channel setup
```
hermes create channel --a-chain duality --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1
2022-11-28T21:00:50.808866Z  INFO ThreadId(01) using default configuration from '/home/hermes/.hermes/config.toml'
2022-11-28T21:01:05.940758Z  INFO ThreadId(01) 🎊  duality => OpenInitChannel(OpenInit { port_id: consumer, channel_id: channel-0, connection_id: None, counterparty_port_id: provider, counterparty_channel_id: None }) at height 0-26
2022-11-28T21:01:19.544797Z  INFO ThreadId(01) 🎊  provider => OpenTryChannel(OpenTry { port_id: provider, channel_id: channel-16, connection_id: connection-19, counterparty_port_id: consumer, counterparty_channel_id: channel-0 }) at height 0-339430
2022-11-28T21:01:37.447762Z  INFO ThreadId(01) 🎊  duality => OpenAckChannel(OpenAck { port_id: consumer, channel_id: channel-0, connection_id: connection-0, counterparty_port_id: provider, counterparty_channel_id: channel-16 }) at height 0-30
2022-11-28T21:02:00.727952Z  INFO ThreadId(01) 🎊  provider => OpenConfirmChannel(OpenConfirm { port_id: provider, channel_id: channel-16, connection_id: connection-19, counterparty_port_id: consumer, counterparty_channel_id: channel-0 }) at height 0-339436
2022-11-28T21:02:03.731724Z  INFO ThreadId(01) channel handshake already finished for Channel { ordering: ORDER_ORDERED, a_side: ChannelSide { chain: BaseChainHandle { chain_id: duality }, client_id: 07-tendermint-0, connection_id: connection-0, port_id: consumer, channel_id: channel-0, version: 1 }, b_side: ChannelSide { chain: BaseChainHandle { chain_id: provider }, client_id: 07-tendermint-6, connection_id: connection-19, port_id: provider, channel_id: channel-16, version: 1 }, connection_delay: 0ns }
SUCCESS Channel {
    ordering: Ordered,
    a_side: ChannelSide {
        chain: BaseChainHandle {
            chain_id: ChainId {
                id: "duality",
                version: 0,
            },
            runtime_sender: Sender { .. },
        },
        client_id: ClientId(
            "07-tendermint-0",
        ),
        connection_id: ConnectionId(
            "connection-0",
        ),
        port_id: PortId(
            "consumer",
        ),
        channel_id: Some(
            ChannelId(
                "channel-0",
            ),
        ),
        version: Some(
            Version(
                "1",
            ),
        ),
    },
    b_side: ChannelSide {
        chain: BaseChainHandle {
            chain_id: ChainId {
                id: "provider",
                version: 0,
            },
            runtime_sender: Sender { .. },
        },
        client_id: ClientId(
            "07-tendermint-6",
        ),
        connection_id: ConnectionId(
            "connection-19",
        ),
        port_id: PortId(
            "provider",
        ),
        channel_id: Some(
            ChannelId(
                "channel-16",
            ),
        ),
        version: Some(
            Version(
                "1",
            ),
        ),
    },
    connection_delay: 0ns,
}
```