Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
spell and render
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Jun 14, 2023
1 parent de363a5 commit 2e2ade6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"counterparty"
]
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ Asynchronous acknowledgements are utilized for atomic multi-hop packet flows. Th
The packet-forward-middleware is an IBC middleware module built for Cosmos blockchains utilizing the IBC protocol. A chain which incorporates the
packet-forward-middleware is able to route incoming IBC packets from a source chain to a destination chain. As the Cosmos SDK/IBC become commonplace in the
blockchain space more and more zones will come online, these new zones joining are noticing a problem: they need to maintain a large amount of infrastructure
(archive nodes and relayers for each counterparty chain) to connect with all the chains in the ecosystem, a number that is continuing to increase quickly. Luckly
this problem has been anticipated and IBC has been architected to accomodate multi-hop transactions. However, a packet forwarding/routing feature was not in the
(archive nodes and relayers for each counterparty chain) to connect with all the chains in the ecosystem, a number that is continuing to increase quickly. Luckily
this problem has been anticipated and IBC has been architected to accommodate multi-hop transactions. However, a packet forwarding/routing feature was not in the
initial IBC release.

## Sequence diagrams

### Multi-hop A->B->C->D success
```
```ascii
channel-0 channel-1 channel-2 channel-3 channel-4 channel-5
┌───────┐ ibc ┌───────┐ ibc ┌───────┐ ibc ┌───────┐
│Chain A│◄────────────────►│Chain B│◄────────────────►│Chain C│◄────────────────►│Chain D│
Expand All @@ -27,7 +27,7 @@ initial IBC release.
```

### Multi-hop A->B->C->D, C->D `recv_packet` error, refund back to A
```
```ascii
channel-0 channel-1 channel-2 channel-3 channel-4 channel-5
┌───────┐ ibc ┌───────┐ ibc ┌───────┐ ibc ┌───────┐
│Chain A│◄────────────────►│Chain B│◄────────────────►│Chain C│◄────────────────►│Chain D│
Expand All @@ -39,7 +39,7 @@ initial IBC release.
```

### Forward A->B->C with 1 retry, max timeouts occurs, refund back to A
```
```ascii
channel-0 channel-1 channel-2 channel-3
┌───────┐ ibc ┌───────┐ ibc ┌───────┐
│Chain A│◄────────────────►│Chain B│◄────────────────►│Chain C│
Expand All @@ -63,7 +63,7 @@ Utilizing the packet `memo` field, instructions can be encoded as JSON for multi
- The packet-forward-middleware integrated on Chain B.
- The packet `memo` is included in `MsgTransfer` by user on Chain A.

```
```json
{
"forward": {
"receiver": "chain-c-bech32-address",
Expand All @@ -84,7 +84,7 @@ In the case of a timeout after 10 minutes for either forward, the packet would b
`next` is the `memo` to pass for the next transfer hop. Per `memo` intended usage of a JSON string, it should be either JSON which will be Marshaled retaining key order, or an escaped JSON string which will be passed directly.

`next` as JSON
```
```json
{
"forward": {
"receiver": "chain-c-bech32-address",
Expand All @@ -106,7 +106,7 @@ In the case of a timeout after 10 minutes for either forward, the packet would b
```

`next` as escaped JSON string
```
```json
{
"forward": {
"receiver": "chain-c-bech32-address",
Expand Down

0 comments on commit 2e2ade6

Please sign in to comment.