From e42aca05ebc4f5e4b35cdea6eee90bdd7f354913 Mon Sep 17 00:00:00 2001 From: Adrian Brink Date: Mon, 12 Mar 2018 17:47:07 +0100 Subject: [PATCH] Extend IBC specification --- docs/spec/ibc/ibc.md | 66 +++++++++++++++++++++++++++++++++++-------- docs/spec/ibc/ibc2.md | 31 -------------------- 2 files changed, 55 insertions(+), 42 deletions(-) delete mode 100644 docs/spec/ibc/ibc2.md diff --git a/docs/spec/ibc/ibc.md b/docs/spec/ibc/ibc.md index 2d8f0caacb..a47ad6e406 100644 --- a/docs/spec/ibc/ibc.md +++ b/docs/spec/ibc/ibc.md @@ -1,13 +1,25 @@ -# IBC Spec +# IBC Specification -*This is a living document and should be edited as the IBC spec and implementation change* +*This is a living document and should be edited as the IBC spec and +implementation change* -## MVP1 +## Engineering Philosophy -The initial implementation of IBC will include just enough for simple coin transfers between chains, with safety features such as ACK messages being added later. +The goal is to get the simplest implementation working end-to-end first. Once +the simplest and most insecure and most feature-less use-case is implemented +we can start adding features. Let's get to the end-to-end process first though. + + +## MVP One + +The initial implementation of IBC will include just enough for simple coin +transfers between chains, with safety features such as ACK messages being added +later. ### IBC Module +* handles message processing + ```golang type IBCOutMsg struct { IBCTransfer @@ -23,14 +35,46 @@ type IBCTransfer struct { } ``` -## Relayer +### Relayer **Packets** -- Connect to 2 Tendermint RPC endpoints -- Query for IBC outgoing `IBCOutMsg` queue (can poll on a certain time interval, or check after each new block, etc) -- For any new `IBCOutMsg`, build `IBCInMsg` and post to destination chain +* Connect to 2 Tendermint RPC endpoints +* Query for IBC outgoing `IBCOutMsg` queue (can poll on a certain time + interval, or check after each new block, etc) +* For any new `IBCOutMsg`, build `IBCInMsg` and post to destination chain -## CLI +### CLI -- Load relay process -- Execute `IBCOutMsg` +* Load relay process +* Execute `IBCOutMsg` + + +## MVP2 + +* `IBCUpdate` is added, making it able to prove the header. + +### IBC Module + +```golang +type IBCOutMsg struct { + IBCTransfer +} + +type IBCInMsg struct { + IBCTransfer + Proof merkle.IAVLProof + FromChainID string + FromChainHeight uint64 +} + +// update sync state of other blockchain +type IBCUpdateMsg struct { + Header tm.Header + Commit tm.Commit +} + +type IBCTransfer struct { + Destination sdk.Address + Coins sdk.Coins +} +``` diff --git a/docs/spec/ibc/ibc2.md b/docs/spec/ibc/ibc2.md deleted file mode 100644 index 215600e7b1..0000000000 --- a/docs/spec/ibc/ibc2.md +++ /dev/null @@ -1,31 +0,0 @@ -# IBC Spec - -## MVP2 - -`IBCUpdate` is added, making it able to prove the header. - -### IBC Module - -```golang -type IBCOutMsg struct { - IBCTransfer -} - -type IBCInMsg struct { - IBCTransfer - Proof merkle.IAVLProof - FromChainID string - FromChainHeight uint64 -} - -// update sync state of other blockchain -type IBCUpdateMsg struct { - Header tm.Header - Commit tm.Commit -} - -type IBCTransfer struct { - Destination sdk.Address - Coins sdk.Coins -} -```