Merge pull request #818 from cosmos/adrian/ibc

Start prep for IBC standard for Ethereum community
This commit is contained in:
Rigel 2018-04-23 16:42:38 -04:00 committed by GitHub
commit 2cc609fbe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 9 deletions

View File

@ -1,10 +1,17 @@
# IBC Specification
IBC(Inter-Blockchain Communication) protocol is used by multiple zones on Cosmos. Using IBC, the zones can send coins or arbitrary data to other zones.
The IBC (Inter Blockchain Communication) protocol specifies how tokens,
non-fungible assets and complex objects can be moved securely between different
zones (independent blockchains). IBC is conceptually similar to TCP/IP in the
sense that anyone can implement it in order to be able to establish IBC
connections with willing clients.
## Terms
How IBC module treats incoming IBC packets is simillar with how BaseApp treats incoming transactions. Therefore, the components of IBC module have their corresponding pair in BaseApp.
How IBC module treats incoming IBC packets is similar to how BaseApp treats
incoming transactions. Therefore, the components of IBC module have their
corresponding pair in BaseApp.
| BaseApp Terms | IBC Terms |
| ------------- | ---------- |
@ -12,20 +19,27 @@ How IBC module treats incoming IBC packets is simillar with how BaseApp treats i
| Tx | Packet |
| Msg | Payload |
## MVP Specifications
### [MVP1](./mvp1.md)
MVP1 will contain the basic functionalities, including packet generation and packet receivement. There will be no security check for incoming packets.
MVP1 will contain the basic functionalities, including packet generation and
incoming packet processing. There will be no security check for incoming
packets.
### [MVP2](./mvp2.md)
IBC module will be more modular in MVP2. Indivisual modules can register custom handlers to IBC module.
The IBC module will be more modular in MVP2. Individual modules can register
custom handlers on the IBC module.
### [MVP3](./mvp3.md)
Light client verification is added to verify the message from the other chain. Registering chains with their ROT(Root Of Trust) is needed.
Light client verification is added to verify an IBC packet from another chain.
Registering chains with their RoT(Root of Trust) is added as well.
### [MVP4](./mvp4.md)
ACK verification / timeout handler helper functions and messaging queue are implemented to make it failsafe. Callbacks will be registered to the dispatcher to handle failure when they register handlers.
ACK verification / timeout handler helper functions and messaging queues are
implemented to make it safe. Callbacks will be registered to the dispatcher to
handle failure when they register handlers.

View File

@ -10,10 +10,8 @@ import (
"github.com/tendermint/tmlibs/log"
"github.com/cosmos/cosmos-sdk/client/context"
sdk "github.com/cosmos/cosmos-sdk/types"
wire "github.com/cosmos/cosmos-sdk/wire"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/commands"
"github.com/cosmos/cosmos-sdk/x/ibc"
)
@ -84,7 +82,9 @@ func (c relayCommander) runIBCRelay(cmd *cobra.Command, args []string) {
c.loop(fromChainID, fromChainNode, toChainID, toChainNode)
}
func (c relayCommander) loop(fromChainID, fromChainNode, toChainID, toChainNode string) {
func (c relayCommander) loop(fromChainID, fromChainNode, toChainID,
toChainNode string) {
ctx := context.NewCoreContextFromViper()
// get password
passphrase, err := ctx.GetPassphraseFromStdin(ctx.FromAddressName)