Extend IBC specification
This commit is contained in:
parent
9be287ced1
commit
e42aca05eb
|
@ -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
|
### IBC Module
|
||||||
|
|
||||||
|
* handles message processing
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
type IBCOutMsg struct {
|
type IBCOutMsg struct {
|
||||||
IBCTransfer
|
IBCTransfer
|
||||||
|
@ -23,14 +35,46 @@ type IBCTransfer struct {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Relayer
|
### Relayer
|
||||||
|
|
||||||
**Packets**
|
**Packets**
|
||||||
- Connect to 2 Tendermint RPC endpoints
|
* 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)
|
* Query for IBC outgoing `IBCOutMsg` queue (can poll on a certain time
|
||||||
- For any new `IBCOutMsg`, build `IBCInMsg` and post to destination chain
|
interval, or check after each new block, etc)
|
||||||
|
* For any new `IBCOutMsg`, build `IBCInMsg` and post to destination chain
|
||||||
|
|
||||||
## CLI
|
### CLI
|
||||||
|
|
||||||
- Load relay process
|
* Load relay process
|
||||||
- Execute `IBCOutMsg`
|
* 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
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
```
|
|
Loading…
Reference in New Issue