diff --git a/client/block.go b/client/block.go new file mode 100644 index 000000000000..2bf3f39a8208 --- /dev/null +++ b/client/block.go @@ -0,0 +1,40 @@ +package client + +import ( + "bytes" + + "github.com/pkg/errors" + + "github.com/tendermint/tendermint/certifiers" + certerr "github.com/tendermint/tendermint/certifiers/errors" + "github.com/tendermint/tendermint/types" +) + +func ValidateBlockMeta(meta *types.BlockMeta, check certifiers.Commit) error { + // TODO: check the BlockID?? + return ValidateHeader(meta.Header, check) +} + +func ValidateBlock(meta *types.Block, check certifiers.Commit) error { + err := ValidateHeader(meta.Header, check) + if err != nil { + return err + } + if !bytes.Equal(meta.Data.Hash(), meta.Header.DataHash) { + return errors.New("Data hash doesn't match header") + } + return nil +} + +func ValidateHeader(head *types.Header, check certifiers.Commit) error { + // make sure they are for the same height (obvious fail) + if head.Height != check.Height() { + return certerr.ErrHeightMismatch(head.Height, check.Height()) + } + // check if they are equal by using hashes + chead := check.Header + if !bytes.Equal(head.Hash(), chead.Hash()) { + return errors.New("Headers don't match") + } + return nil +} diff --git a/client/commands/commits/export.go b/client/commands/commits/export.go index c27826fa7664..b0b1c2a64cc2 100644 --- a/client/commands/commits/export.go +++ b/client/commands/commits/export.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/tendermint/light-client/certifiers/files" + "github.com/tendermint/tendermint/certifiers/files" "github.com/cosmos/cosmos-sdk/client/commands" ) diff --git a/client/commands/commits/import.go b/client/commands/commits/import.go index 936d25b06390..3af3d79e6a4d 100644 --- a/client/commands/commits/import.go +++ b/client/commands/commits/import.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/tendermint/light-client/certifiers/files" + "github.com/tendermint/tendermint/certifiers/files" "github.com/cosmos/cosmos-sdk/client/commands" ) diff --git a/client/commands/commits/show.go b/client/commands/commits/show.go index e9cc6ed28f0c..67152044c900 100644 --- a/client/commands/commits/show.go +++ b/client/commands/commits/show.go @@ -8,8 +8,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/tendermint/light-client/certifiers" - "github.com/tendermint/light-client/certifiers/files" + "github.com/tendermint/tendermint/certifiers" + "github.com/tendermint/tendermint/certifiers/files" "github.com/cosmos/cosmos-sdk/client/commands" ) diff --git a/client/commands/commits/update.go b/client/commands/commits/update.go index c42144b61b85..f522a914a345 100644 --- a/client/commands/commits/update.go +++ b/client/commands/commits/update.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/tendermint/light-client/certifiers" + "github.com/tendermint/tendermint/certifiers" "github.com/cosmos/cosmos-sdk/client/commands" ) diff --git a/client/commands/common.go b/client/commands/common.go index c51dbb469bd1..ff93a05a69c2 100644 --- a/client/commands/common.go +++ b/client/commands/common.go @@ -12,7 +12,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/tendermint/light-client/certifiers" + "github.com/tendermint/tendermint/certifiers" "github.com/tendermint/tmlibs/cli" cmn "github.com/tendermint/tmlibs/common" diff --git a/client/commands/init.go b/client/commands/init.go index 807dd1c0b27c..c290d1e14a6e 100644 --- a/client/commands/init.go +++ b/client/commands/init.go @@ -15,8 +15,8 @@ import ( "github.com/spf13/pflag" "github.com/spf13/viper" - "github.com/tendermint/light-client/certifiers" - "github.com/tendermint/light-client/certifiers/files" + "github.com/tendermint/tendermint/certifiers" + "github.com/tendermint/tendermint/certifiers/files" "github.com/tendermint/tmlibs/cli" cmn "github.com/tendermint/tmlibs/common" diff --git a/client/commands/query/get.go b/client/commands/query/get.go index 7ffc1c1f5d36..59c44c05f8c5 100644 --- a/client/commands/query/get.go +++ b/client/commands/query/get.go @@ -1,6 +1,7 @@ package query import ( + "encoding/hex" "fmt" "io" "os" @@ -11,7 +12,7 @@ import ( wire "github.com/tendermint/go-wire" "github.com/tendermint/go-wire/data" "github.com/tendermint/iavl" - "github.com/tendermint/light-client/proofs" + cmn "github.com/tendermint/tmlibs/common" rpcclient "github.com/tendermint/tendermint/rpc/client" @@ -87,7 +88,8 @@ func ParseHexKey(args []string, argname string) ([]byte, error) { return nil, errors.Errorf("[%s] argument must be non-empty ", argname) } // with tx, we always just parse key as hex and use to lookup - return proofs.ParseHexKey(rawkey) + key, err := hex.DecodeString(cmn.StripHex(rawkey)) + return key, errors.WithStack(err) } // GetHeight reads the viper config for the query height diff --git a/client/common.go b/client/common.go index 5e79b8afbdb3..17ff9a1ba1d3 100644 --- a/client/common.go +++ b/client/common.go @@ -3,12 +3,10 @@ package client import ( "errors" - "github.com/tendermint/light-client/certifiers" - certclient "github.com/tendermint/light-client/certifiers/client" - certerr "github.com/tendermint/light-client/certifiers/errors" - "github.com/tendermint/light-client/certifiers/files" - - "github.com/tendermint/light-client/proofs" + "github.com/tendermint/tendermint/certifiers" + certclient "github.com/tendermint/tendermint/certifiers/client" + certerr "github.com/tendermint/tendermint/certifiers/errors" + "github.com/tendermint/tendermint/certifiers/files" rpcclient "github.com/tendermint/tendermint/rpc/client" ) @@ -49,9 +47,3 @@ func GetCertifier(chainID string, trust certifiers.Provider, cert := certifiers.NewInquiring(chainID, fc, trust, source) return cert, nil } - -// SecureClient uses a given certifier to wrap an connection to an untrusted -// host and return a cryptographically secure rpc client. -func SecureClient(c rpcclient.Client, cert *certifiers.Inquiring) rpcclient.Client { - return proofs.Wrap(c, cert) -} diff --git a/client/errors_test.go b/client/errors_test.go index c561c35b7af8..11a846a6de08 100644 --- a/client/errors_test.go +++ b/client/errors_test.go @@ -9,7 +9,6 @@ import ( func TestErrorNoData(t *testing.T) { e1 := ErrNoData() - e1.Error() assert.True(t, IsNoDataErr(e1)) e2 := errors.New("foobar") diff --git a/client/query.go b/client/query.go index 25b3823d6f53..6a0c3469a90a 100644 --- a/client/query.go +++ b/client/query.go @@ -5,10 +5,12 @@ import ( "github.com/tendermint/go-wire/data" "github.com/tendermint/iavl" - "github.com/tendermint/light-client/certifiers" - certerr "github.com/tendermint/light-client/certifiers/errors" - "github.com/tendermint/tendermint/rpc/client" + "github.com/tendermint/tendermint/certifiers" + "github.com/tendermint/tendermint/certifiers/client" + certerr "github.com/tendermint/tendermint/certifiers/errors" + rpcclient "github.com/tendermint/tendermint/rpc/client" + ctypes "github.com/tendermint/tendermint/rpc/core/types" ) // GetWithProof will query the key on the given node, and verify it has @@ -17,7 +19,7 @@ import ( // If there is any error in checking, returns an error. // If val is non-empty, proof should be KeyExistsProof // If val is empty, proof should be KeyMissingProof -func GetWithProof(key []byte, reqHeight int, node client.Client, +func GetWithProof(key []byte, reqHeight int, node rpcclient.Client, cert certifiers.Certifier) ( val data.Bytes, height uint64, proof iavl.KeyProof, err error) { @@ -26,86 +28,86 @@ func GetWithProof(key []byte, reqHeight int, node client.Client, return } - resp, err := node.ABCIQueryWithOptions("/key", key, - client.ABCIQueryOptions{Height: uint64(reqHeight)}) + resp, proof, err := GetWithProofOptions("/key", key, + rpcclient.ABCIQueryOptions{Height: uint64(reqHeight)}, + node, cert) + if resp != nil { + val, height = resp.Value, resp.Height + } + return val, height, proof, err +} + +// GetWithProofOptions is useful if you want full access to the ABCIQueryOptions +func GetWithProofOptions(path string, key []byte, opts rpcclient.ABCIQueryOptions, + node rpcclient.Client, cert certifiers.Certifier) ( + *ctypes.ResultABCIQuery, iavl.KeyProof, error) { + + resp, err := node.ABCIQueryWithOptions(path, key, opts) if err != nil { - return + return nil, nil, err } // make sure the proof is the proper height if !resp.Code.IsOK() { err = errors.Errorf("Query error %d: %s", resp.Code, resp.Code.String()) - return + return nil, nil, err } if len(resp.Key) == 0 || len(resp.Proof) == 0 { - err = ErrNoData() - return + return nil, nil, ErrNoData() } if resp.Height == 0 { - err = errors.New("Height returned is zero") - return + return nil, nil, errors.New("Height returned is zero") } // AppHash for height H is in header H+1 - var commit *certifiers.Commit - commit, err = GetCertifiedCommit(int(resp.Height+1), node, cert) + commit, err := GetCertifiedCommit(int(resp.Height+1), node, cert) if err != nil { - return + return nil, nil, err } if len(resp.Value) > 0 { // The key was found, construct a proof of existence. - var eproof *iavl.KeyExistsProof - eproof, err = iavl.ReadKeyExistsProof(resp.Proof) + eproof, err := iavl.ReadKeyExistsProof(resp.Proof) if err != nil { - err = errors.Wrap(err, "Error reading proof") - return + return nil, nil, errors.Wrap(err, "Error reading proof") } // Validate the proof against the certified header to ensure data integrity. err = eproof.Verify(resp.Key, resp.Value, commit.Header.AppHash) if err != nil { - err = errors.Wrap(err, "Couldn't verify proof") - return + return nil, nil, errors.Wrap(err, "Couldn't verify proof") } - val = data.Bytes(resp.Value) - proof = eproof - } else { - // The key wasn't found, construct a proof of non-existence. - var aproof *iavl.KeyAbsentProof - aproof, err = iavl.ReadKeyAbsentProof(resp.Proof) - if err != nil { - err = errors.Wrap(err, "Error reading proof") - return - } - // Validate the proof against the certified header to ensure data integrity. - err = aproof.Verify(resp.Key, nil, commit.Header.AppHash) - if err != nil { - err = errors.Wrap(err, "Couldn't verify proof") - return - } - err = ErrNoData() - proof = aproof + return resp, eproof, nil } - height = resp.Height - return + // The key wasn't found, construct a proof of non-existence. + var aproof *iavl.KeyAbsentProof + aproof, err = iavl.ReadKeyAbsentProof(resp.Proof) + if err != nil { + return nil, nil, errors.Wrap(err, "Error reading proof") + } + // Validate the proof against the certified header to ensure data integrity. + err = aproof.Verify(resp.Key, nil, commit.Header.AppHash) + if err != nil { + return nil, nil, errors.Wrap(err, "Couldn't verify proof") + } + return resp, aproof, ErrNoData() } // GetCertifiedCommit gets the signed header for a given height // and certifies it. Returns error if unable to get a proven header. -func GetCertifiedCommit(h int, node client.Client, - cert certifiers.Certifier) (empty *certifiers.Commit, err error) { +func GetCertifiedCommit(h int, node rpcclient.Client, + cert certifiers.Certifier) (empty certifiers.Commit, err error) { // FIXME: cannot use cert.GetByHeight for now, as it also requires // Validators and will fail on querying tendermint for non-current height. // When this is supported, we should use it instead... - client.WaitForHeight(node, h, nil) + rpcclient.WaitForHeight(node, h, nil) cresp, err := node.Commit(&h) if err != nil { return } - commit := certifiers.CommitFromResult(cresp) + commit := client.CommitFromResult(cresp) // validate downloaded checkpoint with our request and trust store. if commit.Height() != h { diff --git a/client/query_test.go b/client/query_test.go index 0320176eb357..3d4a5a387517 100644 --- a/client/query_test.go +++ b/client/query_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/go-wire" - "github.com/tendermint/light-client/certifiers" - certclient "github.com/tendermint/light-client/certifiers/client" + "github.com/tendermint/tendermint/certifiers" + certclient "github.com/tendermint/tendermint/certifiers/client" "github.com/tendermint/tmlibs/log" nm "github.com/tendermint/tendermint/node" diff --git a/client/wrapper.go b/client/wrapper.go new file mode 100644 index 000000000000..3bebd822192a --- /dev/null +++ b/client/wrapper.go @@ -0,0 +1,187 @@ +package client + +import ( + "fmt" + + "github.com/tendermint/go-wire/data" + "github.com/tendermint/tmlibs/events" + + "github.com/tendermint/tendermint/certifiers" + certclient "github.com/tendermint/tendermint/certifiers/client" + rpcclient "github.com/tendermint/tendermint/rpc/client" + ctypes "github.com/tendermint/tendermint/rpc/core/types" + "github.com/tendermint/tendermint/types" +) + +var _ rpcclient.Client = Wrapper{} + +// Wrapper wraps a rpcclient with a Certifier and double-checks any input that is +// provable before passing it along. Allows you to make any rpcclient fully secure. +type Wrapper struct { + rpcclient.Client + cert *certifiers.Inquiring +} + +// SecureClient uses a given certifier to wrap an connection to an untrusted +// host and return a cryptographically secure rpc client. +// +// If it is wrapping an HTTP rpcclient, it will also wrap the websocket interface +func SecureClient(c rpcclient.Client, cert *certifiers.Inquiring) Wrapper { + wrap := Wrapper{c, cert} + // if we wrap http client, then we can swap out the event switch to filter + if hc, ok := c.(*rpcclient.HTTP); ok { + evt := hc.WSEvents.EventSwitch + hc.WSEvents.EventSwitch = WrappedSwitch{evt, wrap} + } + return wrap +} + +// ABCIQueryWithOptions exposes all options for the ABCI query and verifies the returned proof +func (w Wrapper) ABCIQueryWithOptions(path string, data data.Bytes, opts rpcclient.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { + res, _, err := GetWithProofOptions(path, data, opts, w.Client, w.cert) + return res, err +} + +// ABCIQuery uses default options for the ABCI query and verifies the returned proof +func (w Wrapper) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { + return w.ABCIQueryWithOptions(path, data, rpcclient.DefaultABCIQueryOptions) +} + +// Tx queries for a given tx and verifies the proof if it was requested +func (w Wrapper) Tx(hash []byte, prove bool) (*ctypes.ResultTx, error) { + res, err := w.Client.Tx(hash, prove) + if !prove || err != nil { + return res, err + } + check, err := GetCertifiedCommit(res.Height, w.Client, w.cert) + if err != nil { + return res, err + } + err = res.Proof.Validate(check.Header.DataHash) + return res, err +} + +// BlockchainInfo requests a list of headers and verifies them all... +// Rather expensive. +// +// TODO: optimize this if used for anything needing performance +func (w Wrapper) BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error) { + r, err := w.Client.BlockchainInfo(minHeight, maxHeight) + if err != nil { + return nil, err + } + + // go and verify every blockmeta in the result.... + for _, meta := range r.BlockMetas { + // get a checkpoint to verify from + c, err := w.Commit(&meta.Header.Height) + if err != nil { + return nil, err + } + check := certclient.CommitFromResult(c) + err = ValidateBlockMeta(meta, check) + if err != nil { + return nil, err + } + } + + return r, nil +} + +// Block returns an entire block and verifies all signatures +func (w Wrapper) Block(height *int) (*ctypes.ResultBlock, error) { + r, err := w.Client.Block(height) + if err != nil { + return nil, err + } + // get a checkpoint to verify from + c, err := w.Commit(height) + if err != nil { + return nil, err + } + check := certclient.CommitFromResult(c) + + // now verify + err = ValidateBlockMeta(r.BlockMeta, check) + if err != nil { + return nil, err + } + err = ValidateBlock(r.Block, check) + if err != nil { + return nil, err + } + return r, nil +} + +// Commit downloads the Commit and certifies it with the certifiers. +// +// This is the foundation for all other verification in this module +func (w Wrapper) Commit(height *int) (*ctypes.ResultCommit, error) { + rpcclient.WaitForHeight(w.Client, *height, nil) + r, err := w.Client.Commit(height) + // if we got it, then certify it + if err == nil { + check := certclient.CommitFromResult(r) + err = w.cert.Certify(check) + } + return r, err +} + +// WrappedSwitch creates a websocket connection that auto-verifies any info +// coming through before passing it along. +// +// Since the verification takes 1-2 rpc calls, this is obviously only for +// relatively low-throughput situations that can tolerate a bit extra latency +type WrappedSwitch struct { + types.EventSwitch + client rpcclient.Client +} + +// FireEvent verifies any block or header returned from the eventswitch +func (s WrappedSwitch) FireEvent(event string, data events.EventData) { + tm, ok := data.(types.TMEventData) + if !ok { + fmt.Printf("bad type %#v\n", data) + return + } + + // check to validate it if possible, and drop if not valid + switch t := tm.Unwrap().(type) { + case types.EventDataNewBlockHeader: + err := verifyHeader(s.client, t.Header) + if err != nil { + fmt.Printf("Invalid header: %#v\n", err) + return + } + case types.EventDataNewBlock: + err := verifyBlock(s.client, t.Block) + if err != nil { + fmt.Printf("Invalid block: %#v\n", err) + return + } + // TODO: can we verify tx as well? anything else + } + + // looks good, we fire it + s.EventSwitch.FireEvent(event, data) +} + +func verifyHeader(c rpcclient.Client, head *types.Header) error { + // get a checkpoint to verify from + commit, err := c.Commit(&head.Height) + if err != nil { + return err + } + check := certclient.CommitFromResult(commit) + return ValidateHeader(head, check) +} + +func verifyBlock(c rpcclient.Client, block *types.Block) error { + // get a checkpoint to verify from + commit, err := c.Commit(&block.Height) + if err != nil { + return err + } + check := certclient.CommitFromResult(commit) + return ValidateBlock(block, check) +} diff --git a/glide.lock b/glide.lock index e0ea8a99dd39..f25122a5b7a2 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: fbfdd03c0367bb0785ceb81ed34059df219e55d5a9c71c12597e505fbce14165 -updated: 2017-10-25T19:24:51.90002008+02:00 +hash: 809845bf4c18a4abc85cf5d7b5ee7a17e0f437cd377b22e158787c718272261a +updated: 2017-10-26T16:18:37.833408343+02:00 imports: - name: github.com/bgentry/speakeasy version: 4aabc24848ce5fd31929f7d1e4ea74d3709c14cd @@ -11,10 +11,10 @@ imports: version: a368813c5e648fee92e5f6c30e3944ff9d5e8895 - name: github.com/ebuchman/fail-test version: 95f809107225be108efcf10a3509e4ea6ceef3c4 +- name: github.com/ethanfrey/hid + version: f379bda1dbc8e79333b04563f71a12e86206efe5 - name: github.com/ethanfrey/ledger - version: 5e432577be582bd18a3b4a9cd75dae7a317ade36 -- name: github.com/flynn/hid - version: ed06a31c6245d4552e8dbba7e32e5b010b875d65 + version: 3689ce9be93e1a5bef836b1cc2abb18381c79176 - name: github.com/fsnotify/fsnotify version: 4da3e2cfbabc9f751898f250b49f2439785783a1 - name: github.com/go-kit/kit @@ -48,7 +48,7 @@ imports: - name: github.com/gorilla/mux version: 24fca303ac6da784b9e8269f724ddeb0b2eea5e7 - name: github.com/gorilla/websocket - version: 71fa72d4842364bc5f74185f4161e0099ea3624a + version: ea4d1f681babbce9545c9c5f3d5194a789c89f5b - name: github.com/hashicorp/hcl version: 23c074d0eceb2b8a5bfdbb271ab780cde70f05a8 subpackages: @@ -95,7 +95,7 @@ imports: - name: github.com/spf13/pflag version: 97afa5e7ca8a08a383cb259e06636b5e2cc7897f - name: github.com/spf13/viper - version: 8ef37cbca71638bf32f3d5e194117d4cb46da163 + version: 25b30aa063fc18e48662b86996252eabdcf2f0c7 - name: github.com/syndtr/goleveldb version: b89cc31ef7977104127d34c1bd31ebd1a9db2199 subpackages: @@ -112,7 +112,7 @@ imports: - leveldb/table - leveldb/util - name: github.com/tendermint/abci - version: bb9bb4aa465a31fd6a272765be381888e6898c74 + version: a0e38dc58374f485481ea07b23659d85f670a694 subpackages: - client - example/dummy @@ -124,7 +124,7 @@ imports: - edwards25519 - extra25519 - name: github.com/tendermint/go-crypto - version: 0a5b1d979a1bc86200c9ff829fbbcd575799a1b6 + version: db5603e37435933c13665a708055fadd18222f5f subpackages: - bcrypt - keys @@ -134,24 +134,20 @@ imports: - keys/wordlist - nano - name: github.com/tendermint/go-wire - version: 99d2169a1e39c65983eacaa1da867d6f3218e1c9 + version: 3180c867ca52bcd9ba6c905ce63613f8d8e9837c subpackages: - data - data/base58 - name: github.com/tendermint/iavl version: 595f3dcd5b6cd4a292e90757ae6d367fd7a6e653 -- name: github.com/tendermint/light-client - version: 76313d625e662ed7b284d066d68ff71edd7a9fac +- name: github.com/tendermint/tendermint + version: bb6c15b00a07e2aafc7fe245b3acfb33b9c25abe subpackages: + - blockchain - certifiers - certifiers/client - certifiers/errors - certifiers/files - - proofs -- name: github.com/tendermint/tendermint - version: b2d5546cf8f71e0e168072e118d9836862384e6c - subpackages: - - blockchain - cmd/tendermint/commands - config - consensus @@ -177,7 +173,7 @@ imports: - types - version - name: github.com/tendermint/tmlibs - version: 0a652499ead7cd20a57a6a592f0491a2b493bb85 + version: b30e3ba26d4077edeed83c50a4e0c38b0ec9ddb3 subpackages: - autofile - cli @@ -190,6 +186,7 @@ imports: - log - logger - merkle + - test - name: golang.org/x/crypto version: edd5e9b0879d13ee6970a50153d85b8fec9f7686 subpackages: @@ -228,10 +225,9 @@ imports: subpackages: - googleapis/rpc/status - name: google.golang.org/grpc - version: a5986a5c88227370a9c0a82e5277167229c034cd + version: f7bf885db0b7479a537ec317c6e48ce53145f3db subpackages: - balancer - - balancer/roundrobin - codes - connectivity - credentials @@ -243,8 +239,6 @@ imports: - naming - peer - resolver - - resolver/dns - - resolver/passthrough - stats - status - tap diff --git a/glide.yaml b/glide.yaml index 258c028e44f7..97630213545a 100644 --- a/glide.yaml +++ b/glide.yaml @@ -19,18 +19,14 @@ import: version: develop subpackages: - data -- package: github.com/tendermint/light-client - version: develop - subpackages: - - proofs - - certifiers - - certifiers/client - - certifiers/files - package: github.com/tendermint/iavl version: develop - package: github.com/tendermint/tendermint version: develop subpackages: + - certifiers + - certifiers/client + - certifiers/files - config - node - proxy diff --git a/modules/ibc/commands/tx.go b/modules/ibc/commands/tx.go index 292658721cff..f5ed752973ac 100644 --- a/modules/ibc/commands/tx.go +++ b/modules/ibc/commands/tx.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/commands" txcmd "github.com/cosmos/cosmos-sdk/client/commands/txs" "github.com/cosmos/cosmos-sdk/modules/ibc" - "github.com/tendermint/light-client/certifiers" + "github.com/tendermint/tendermint/certifiers" ) // RegisterChainTxCmd is CLI command to register a new chain for ibc diff --git a/modules/ibc/ibc_test.go b/modules/ibc/ibc_test.go index ceb92237fdbf..e491f94a2a95 100644 --- a/modules/ibc/ibc_test.go +++ b/modules/ibc/ibc_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" wire "github.com/tendermint/go-wire" - "github.com/tendermint/light-client/certifiers" + "github.com/tendermint/tendermint/certifiers" "github.com/tendermint/tmlibs/log" sdk "github.com/cosmos/cosmos-sdk" diff --git a/modules/ibc/provider.go b/modules/ibc/provider.go index 712b6ee81daa..a01b7504fd28 100644 --- a/modules/ibc/provider.go +++ b/modules/ibc/provider.go @@ -2,8 +2,8 @@ package ibc import ( wire "github.com/tendermint/go-wire" - "github.com/tendermint/light-client/certifiers" - certerr "github.com/tendermint/light-client/certifiers/errors" + "github.com/tendermint/tendermint/certifiers" + certerr "github.com/tendermint/tendermint/certifiers/errors" "github.com/cosmos/cosmos-sdk/stack" "github.com/cosmos/cosmos-sdk/state" diff --git a/modules/ibc/provider_test.go b/modules/ibc/provider_test.go index 2318f979652e..abdb93faacd7 100644 --- a/modules/ibc/provider_test.go +++ b/modules/ibc/provider_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/state" - "github.com/tendermint/light-client/certifiers" - certerr "github.com/tendermint/light-client/certifiers/errors" + "github.com/tendermint/tendermint/certifiers" + certerr "github.com/tendermint/tendermint/certifiers/errors" ) func assertCommitsEqual(t *testing.T, fc, fc2 certifiers.FullCommit) { diff --git a/modules/ibc/test_helpers.go b/modules/ibc/test_helpers.go index 79960dadfbd1..456e3076f0ee 100644 --- a/modules/ibc/test_helpers.go +++ b/modules/ibc/test_helpers.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/tendermint/iavl" - "github.com/tendermint/light-client/certifiers" + "github.com/tendermint/tendermint/certifiers" "github.com/tendermint/tmlibs/log" sdk "github.com/cosmos/cosmos-sdk" diff --git a/modules/ibc/tx.go b/modules/ibc/tx.go index eae5a38f9425..2686080ce80b 100644 --- a/modules/ibc/tx.go +++ b/modules/ibc/tx.go @@ -3,7 +3,7 @@ package ibc import ( "github.com/tendermint/go-wire/data" "github.com/tendermint/iavl" - "github.com/tendermint/light-client/certifiers" + "github.com/tendermint/tendermint/certifiers" sdk "github.com/cosmos/cosmos-sdk" )