From 57356beab6d18041ab15cab49acf8118137fd85a Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 20 Mar 2017 08:57:15 +0100 Subject: [PATCH 1/9] Use WrapXxx to safelt construct XxxS structs --- cmd/commands/tx.go | 4 ++-- glide.lock | 2 +- plugins/counter/counter_test.go | 2 +- tests/tendermint/main.go | 4 ++-- tests/tmsp/tmsp_test.go | 6 +++--- types/test_helpers.go | 8 ++++---- types/tx.go | 30 ++++++++---------------------- types/tx_test.go | 2 +- 8 files changed, 22 insertions(+), 36 deletions(-) diff --git a/cmd/commands/tx.go b/cmd/commands/tx.go index 2e12be06ec..0fe0cd731b 100644 --- a/cmd/commands/tx.go +++ b/cmd/commands/tx.go @@ -123,7 +123,7 @@ func sendTxCmd(cmd *cobra.Command, args []string) error { // sign that puppy signBytes := tx.SignBytes(chainIDFlag) - tx.Inputs[0].Signature = crypto.SignatureS{privKey.Sign(signBytes)} + tx.Inputs[0].Signature = crypto.WrapSignature(privKey.Sign(signBytes)) fmt.Println("Signed SendTx:") fmt.Println(string(wire.JSONBytes(tx))) @@ -179,7 +179,7 @@ func AppTx(name string, data []byte) error { Data: data, } - tx.Input.Signature = crypto.SignatureS{privKey.Sign(tx.SignBytes(chainIDFlag))} + tx.Input.Signature = crypto.WrapSignature(privKey.Sign(tx.SignBytes(chainIDFlag))) fmt.Println("Signed AppTx:") fmt.Println(string(wire.JSONBytes(tx))) diff --git a/glide.lock b/glide.lock index 4c67c14d60..6d57797f72 100644 --- a/glide.lock +++ b/glide.lock @@ -70,7 +70,7 @@ imports: - name: github.com/tendermint/go-config version: 620dcbbd7d587cf3599dedbf329b64311b0c307a - name: github.com/tendermint/go-crypto - version: 0ca2c6fdb0706001ca4c4b9b80c9f428e8cf39da + version: 8ff4ce222d32c2328ff0d2bf121fcd34254c03c1 - name: github.com/tendermint/go-data version: e7fcc6d081ec8518912fcdc103188275f83a3ee5 - name: github.com/tendermint/go-db diff --git a/plugins/counter/counter_test.go b/plugins/counter/counter_test.go index f7c658a9af..6d8168bd7b 100644 --- a/plugins/counter/counter_test.go +++ b/plugins/counter/counter_test.go @@ -53,7 +53,7 @@ func TestCounterPlugin(t *testing.T) { signBytes := tx.SignBytes(chainID) // t.Logf("Sign bytes: %X\n", signBytes) sig := test1PrivAcc.Sign(signBytes) - tx.Input.Signature = crypto.SignatureS{sig} + tx.Input.Signature = crypto.WrapSignature(sig) // t.Logf("Signed TX bytes: %X\n", wire.BinaryBytes(struct{ types.Tx }{tx})) // Write request diff --git a/tests/tendermint/main.go b/tests/tendermint/main.go index 73ace4ef88..53416c2357 100644 --- a/tests/tendermint/main.go +++ b/tests/tendermint/main.go @@ -67,7 +67,7 @@ func main() { // Sign request signBytes := tx.SignBytes(chainID) sig := root.Sign(signBytes) - tx.Inputs[0].Signature = crypto.SignatureS{sig} + tx.Inputs[0].Signature = crypto.WrapSignature(sig) //fmt.Println("tx:", tx) // Write request @@ -118,7 +118,7 @@ func main() { // Sign request signBytes := tx.SignBytes(chainID) sig := privAccountA.Sign(signBytes) - tx.Inputs[0].Signature = crypto.SignatureS{sig} + tx.Inputs[0].Signature = crypto.WrapSignature(sig) //fmt.Println("tx:", tx) // Write request diff --git a/tests/tmsp/tmsp_test.go b/tests/tmsp/tmsp_test.go index 86b4bfbf24..e78f978b2b 100644 --- a/tests/tmsp/tmsp_test.go +++ b/tests/tmsp/tmsp_test.go @@ -50,7 +50,7 @@ func TestSendTx(t *testing.T) { signBytes := tx.SignBytes(chainID) // t.Log("Sign bytes: %X\n", signBytes) sig := test1PrivAcc.Sign(signBytes) - tx.Inputs[0].Signature = crypto.SignatureS{sig} + tx.Inputs[0].Signature = crypto.WrapSignature(sig) // t.Log("Signed TX bytes: %X\n", wire.BinaryBytes(types.TxS{tx})) // Write request @@ -102,7 +102,7 @@ func TestSequence(t *testing.T) { // Sign request signBytes := tx.SignBytes(chainID) sig := test1PrivAcc.Sign(signBytes) - tx.Inputs[0].Signature = crypto.SignatureS{sig} + tx.Inputs[0].Signature = crypto.WrapSignature(sig) // t.Log("ADDR: %X -> %X\n", tx.Inputs[0].Address, tx.Outputs[0].Address) // Write request @@ -146,7 +146,7 @@ func TestSequence(t *testing.T) { // Sign request signBytes := tx.SignBytes(chainID) sig := privAccountA.Sign(signBytes) - tx.Inputs[0].Signature = crypto.SignatureS{sig} + tx.Inputs[0].Signature = crypto.WrapSignature(sig) // t.Log("ADDR: %X -> %X\n", tx.Inputs[0].Address, tx.Outputs[0].Address) // Write request diff --git a/types/test_helpers.go b/types/test_helpers.go index 81e639ee10..02f96b7814 100644 --- a/types/test_helpers.go +++ b/types/test_helpers.go @@ -12,9 +12,9 @@ import ( func PrivAccountFromSecret(secret string) PrivAccount { privKey := crypto.GenPrivKeyEd25519FromSecret([]byte(secret)) privAccount := PrivAccount{ - PrivKeyS: crypto.PrivKeyS{privKey}, + PrivKeyS: crypto.WrapPrivKey(privKey), Account: Account{ - PubKey: crypto.PubKeyS{privKey.PubKey()}, + PubKey: crypto.WrapPubKey(privKey.PubKey()), }, } return privAccount @@ -31,9 +31,9 @@ func RandAccounts(num int, minAmount int64, maxAmount int64) []PrivAccount { } privKey := crypto.GenPrivKeyEd25519() - pubKey := crypto.PubKeyS{privKey.PubKey()} + pubKey := crypto.WrapPubKey(privKey.PubKey()) privAccs[i] = PrivAccount{ - PrivKeyS: crypto.PrivKeyS{privKey}, + PrivKeyS: crypto.WrapPrivKey(privKey), Account: Account{ PubKey: pubKey, Balance: Coins{Coin{"", balance}}, diff --git a/types/tx.go b/types/tx.go index d4925bbb65..5b0eb84ba5 100644 --- a/types/tx.go +++ b/types/tx.go @@ -104,13 +104,7 @@ func NewTxInput(pubKey crypto.PubKey, coins Coins, sequence int) TxInput { Sequence: sequence, } if sequence == 1 { - // safely wrap if needed - // TODO: extract this as utility function? - ps, ok := pubKey.(crypto.PubKeyS) - if !ok { - ps = crypto.PubKeyS{pubKey} - } - input.PubKey = ps + input.PubKey = crypto.WrapPubKey(pubKey) } return input } @@ -151,25 +145,21 @@ type SendTx struct { func (tx *SendTx) SignBytes(chainID string) []byte { signBytes := wire.BinaryBytes(chainID) sigz := make([]crypto.Signature, len(tx.Inputs)) - for i, input := range tx.Inputs { - sigz[i] = input.Signature.Signature - tx.Inputs[i].Signature.Signature = nil + for i := range tx.Inputs { + sigz[i] = tx.Inputs[i].Signature + tx.Inputs[i].Signature = crypto.Signature{} } signBytes = append(signBytes, wire.BinaryBytes(tx)...) for i := range tx.Inputs { - tx.Inputs[i].Signature.Signature = sigz[i] + tx.Inputs[i].Signature = sigz[i] } return signBytes } func (tx *SendTx) SetSignature(addr []byte, sig crypto.Signature) bool { - sigs, ok := sig.(crypto.SignatureS) - if !ok { - sigs = crypto.SignatureS{sig} - } for i, input := range tx.Inputs { if bytes.Equal(input.Address, addr) { - tx.Inputs[i].Signature = sigs + tx.Inputs[i].Signature = crypto.WrapSignature(sig) return true } } @@ -193,18 +183,14 @@ type AppTx struct { func (tx *AppTx) SignBytes(chainID string) []byte { signBytes := wire.BinaryBytes(chainID) sig := tx.Input.Signature - tx.Input.Signature.Signature = nil + tx.Input.Signature = crypto.WrapSignature(nil) signBytes = append(signBytes, wire.BinaryBytes(tx)...) tx.Input.Signature = sig return signBytes } func (tx *AppTx) SetSignature(sig crypto.Signature) bool { - sigs, ok := sig.(crypto.SignatureS) - if !ok { - sigs = crypto.SignatureS{sig} - } - tx.Input.Signature = sigs + tx.Input.Signature = crypto.WrapSignature(sig) return true } diff --git a/types/tx_test.go b/types/tx_test.go index 71033cc9e7..fb4da2598d 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -109,7 +109,7 @@ func TestSendTxJSON(t *testing.T) { sig := test1PrivAcc.Sign(signBytes) // we handle both raw sig and wrapped sig the same tx.SetSignature(test1PrivAcc.PubKey.Address(), sig) - tx2.SetSignature(test1PrivAcc.PubKey.Address(), crypto.SignatureS{sig}) + tx2.SetSignature(test1PrivAcc.PubKey.Address(), crypto.WrapSignature(sig)) assert.Equal(tx, tx2) // let's marshal / unmarshal this with signature From 0665a2e8a6e18715d8de5db5f3ccb6c36e4fa05c Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Tue, 21 Mar 2017 21:52:42 +0100 Subject: [PATCH 2/9] Clean up all XxxS structs to Xxx --- glide.lock | 4 ++-- state/execution.go | 2 +- types/account.go | 8 ++++---- types/test_helpers.go | 13 +++++++------ types/tx.go | 10 +++++----- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/glide.lock b/glide.lock index 6d57797f72..579db86b76 100644 --- a/glide.lock +++ b/glide.lock @@ -70,9 +70,9 @@ imports: - name: github.com/tendermint/go-config version: 620dcbbd7d587cf3599dedbf329b64311b0c307a - name: github.com/tendermint/go-crypto - version: 8ff4ce222d32c2328ff0d2bf121fcd34254c03c1 + version: 3e1dba7ab762bb689123eec30c468967f077a6a4 - name: github.com/tendermint/go-data - version: e7fcc6d081ec8518912fcdc103188275f83a3ee5 + version: 9fbf0684fefc4fad580992394a0bcf47c1b3d77e - name: github.com/tendermint/go-db version: 9643f60bc2578693844aacf380a7c32e4c029fee - name: github.com/tendermint/go-events diff --git a/state/execution.go b/state/execution.go index eb7f3c6906..f642b80521 100644 --- a/state/execution.go +++ b/state/execution.go @@ -244,7 +244,7 @@ func validateInputAdvanced(acc *types.Account, signBytes []byte, in types.TxInpu return abci.ErrBaseInsufficientFunds.AppendLog(cmn.Fmt("balance is %v, tried to send %v", balance, in.Coins)) } // Check signatures - if !acc.PubKey.VerifyBytes(signBytes, in.Signature.Signature) { + if !acc.PubKey.VerifyBytes(signBytes, in.Signature) { return abci.ErrBaseInvalidSignature.AppendLog(cmn.Fmt("SignBytes: %X", signBytes)) } return abci.OK diff --git a/types/account.go b/types/account.go index b3478fce0c..d1e62d8321 100644 --- a/types/account.go +++ b/types/account.go @@ -7,9 +7,9 @@ import ( ) type Account struct { - PubKey crypto.PubKeyS `json:"pub_key"` // May be nil, if not known. - Sequence int `json:"sequence"` - Balance Coins `json:"coins"` + PubKey crypto.PubKey `json:"pub_key"` // May be nil, if not known. + Sequence int `json:"sequence"` + Balance Coins `json:"coins"` } func (acc *Account) Copy() *Account { @@ -31,7 +31,7 @@ func (acc *Account) String() string { //---------------------------------------- type PrivAccount struct { - crypto.PrivKeyS + crypto.PrivKey Account } diff --git a/types/test_helpers.go b/types/test_helpers.go index 02f96b7814..23e46cdc9b 100644 --- a/types/test_helpers.go +++ b/types/test_helpers.go @@ -10,11 +10,12 @@ import ( // Creates a PrivAccount from secret. // The amount is not set. func PrivAccountFromSecret(secret string) PrivAccount { - privKey := crypto.GenPrivKeyEd25519FromSecret([]byte(secret)) + privKey := crypto.WrapPrivKey( + crypto.GenPrivKeyEd25519FromSecret([]byte(secret))) privAccount := PrivAccount{ - PrivKeyS: crypto.WrapPrivKey(privKey), + PrivKey: privKey, Account: Account{ - PubKey: crypto.WrapPubKey(privKey.PubKey()), + PubKey: privKey.PubKey(), }, } return privAccount @@ -30,10 +31,10 @@ func RandAccounts(num int, minAmount int64, maxAmount int64) []PrivAccount { balance += cmn.RandInt64() % (maxAmount - minAmount) } - privKey := crypto.GenPrivKeyEd25519() - pubKey := crypto.WrapPubKey(privKey.PubKey()) + privKey := crypto.WrapPrivKey(crypto.GenPrivKeyEd25519()) + pubKey := privKey.PubKey() privAccs[i] = PrivAccount{ - PrivKeyS: crypto.WrapPrivKey(privKey), + PrivKey: privKey, Account: Account{ PubKey: pubKey, Balance: Coins{Coin{"", balance}}, diff --git a/types/tx.go b/types/tx.go index 5b0eb84ba5..f8366b0337 100644 --- a/types/tx.go +++ b/types/tx.go @@ -64,11 +64,11 @@ func (p *TxS) UnmarshalJSON(data []byte) (err error) { //----------------------------------------------------------------------------- type TxInput struct { - Address data.Bytes `json:"address"` // Hash of the PubKey - Coins Coins `json:"coins"` // - Sequence int `json:"sequence"` // Must be 1 greater than the last committed TxInput - Signature crypto.SignatureS `json:"signature"` // Depends on the PubKey type and the whole Tx - PubKey crypto.PubKeyS `json:"pub_key"` // Is present iff Sequence == 0 + Address data.Bytes `json:"address"` // Hash of the PubKey + Coins Coins `json:"coins"` // + Sequence int `json:"sequence"` // Must be 1 greater than the last committed TxInput + Signature crypto.Signature `json:"signature"` // Depends on the PubKey type and the whole Tx + PubKey crypto.PubKey `json:"pub_key"` // Is present iff Sequence == 0 } func (txIn TxInput) ValidateBasic() abci.Result { From 787cf0ebac0be52795f71082d5a9b446412fb219 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Tue, 21 Mar 2017 22:50:23 +0100 Subject: [PATCH 3/9] Update to patched go-p2p, tendermint, fix a few tests --- app/genesis_test.go | 2 +- cmd/commands/key.go | 7 ++++--- glide.lock | 4 ++-- plugins/ibc/ibc_test.go | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/genesis_test.go b/app/genesis_test.go index 74ca22e61b..4fec4b6db7 100644 --- a/app/genesis_test.go +++ b/app/genesis_test.go @@ -38,7 +38,7 @@ func TestLoadGenesis(t *testing.T) { assert.EqualValues("blank", acct.Balance[0].Denom) // and public key is parsed properly - apk := acct.PubKey.PubKey + apk := acct.PubKey.Unwrap() require.NotNil(apk) epk, ok := apk.(crypto.PubKeyEd25519) if assert.True(ok) { diff --git a/cmd/commands/key.go b/cmd/commands/key.go index 91678f625f..b2674ca824 100644 --- a/cmd/commands/key.go +++ b/cmd/commands/key.go @@ -75,13 +75,14 @@ func (k *Key) Sign(msg []byte) crypto.Signature { // Generates a new validator with private key. func genKey() *Key { privKey := crypto.GenPrivKeyEd25519() - addrBytes := privKey.PubKey().Address() + pubKey := privKey.PubKey() + addrBytes := pubKey.Address() var addr Address copy(addr[:], addrBytes) return &Key{ Address: addr, - PubKey: crypto.PubKeyS{privKey.PubKey()}, - PrivKey: crypto.PrivKeyS{privKey}, + PubKey: pubKey, + PrivKey: privKey.Wrap(), } } diff --git a/glide.lock b/glide.lock index 579db86b76..493deda79d 100644 --- a/glide.lock +++ b/glide.lock @@ -86,7 +86,7 @@ imports: - name: github.com/tendermint/go-merkle version: 714d4d04557fd068a7c2a1748241ce8428015a96 - name: github.com/tendermint/go-p2p - version: 17124989a93774833df33107fbf17157a7f8ef31 + version: a163fddbdd2541793d22402afb113e6ccb391774 subpackages: - upnp - name: github.com/tendermint/go-rpc @@ -107,7 +107,7 @@ imports: - app - client - name: github.com/tendermint/tendermint - version: 6bcd4242f1f336e2b2ef4f644fabaf56222b34d0 + version: 936e66867aecf92595b1f8615361b2867d9a69e6 subpackages: - blockchain - cmd/tendermint/commands diff --git a/plugins/ibc/ibc_test.go b/plugins/ibc/ibc_test.go index 9439f43784..4b220f1890 100644 --- a/plugins/ibc/ibc_test.go +++ b/plugins/ibc/ibc_test.go @@ -30,7 +30,7 @@ func genGenesisDoc(chainID string, numVals int) (*tm.GenesisDoc, []types.PrivAcc name := cmn.Fmt("%v_val_%v", chainID, i) privAcc := types.PrivAccountFromSecret(name) genDoc.Validators = append(genDoc.Validators, tm.GenesisValidator{ - PubKey: privAcc.PubKey.PubKey, + PubKey: privAcc.PubKey, Amount: 1, Name: name, }) @@ -268,9 +268,9 @@ func TestIBCPluginBadCommit(t *testing.T) { // Update a chain with a broken commit // Modify the first byte of the first signature - sig := commit.Precommits[0].Signature.(crypto.SignatureEd25519) + sig := commit.Precommits[0].Signature.Unwrap().(crypto.SignatureEd25519) sig[0] += 1 - commit.Precommits[0].Signature = sig + commit.Precommits[0].Signature = crypto.WrapSignature(sig) res = ibcPlugin.RunTx(store, ctx, wire.BinaryBytes(struct{ IBCTx }{IBCUpdateChainTx{ Header: header, Commit: commit, From b6ebf9f8b82a4b8f69bc2befaa0f9579b9e64e73 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Mon, 10 Apr 2017 16:32:30 +0200 Subject: [PATCH 4/9] Update to latest go-crypto, adjust code and tests --- cmd/commands/key.go | 6 +++--- cmd/commands/tx.go | 5 ++--- glide.lock | 37 ++++++++++++++------------------- glide.yaml | 2 +- plugins/counter/counter_test.go | 4 +--- plugins/ibc/ibc_test.go | 2 +- tests/tendermint/main.go | 7 +++---- tests/tmsp/tmsp_test.go | 7 +++---- types/test_helpers.go | 6 +++--- types/tx.go | 8 +++---- types/tx_test.go | 4 ++-- 11 files changed, 39 insertions(+), 49 deletions(-) diff --git a/cmd/commands/key.go b/cmd/commands/key.go index b2674ca824..e27a705ed5 100644 --- a/cmd/commands/key.go +++ b/cmd/commands/key.go @@ -62,9 +62,9 @@ func (a *Address) UnmarshalJSON(addrHex []byte) error { } type Key struct { - Address Address `json:"address"` - PubKey crypto.PubKeyS `json:"pub_key"` - PrivKey crypto.PrivKeyS `json:"priv_key"` + Address Address `json:"address"` + PubKey crypto.PubKey `json:"pub_key"` + PrivKey crypto.PrivKey `json:"priv_key"` } // Implements Signer diff --git a/cmd/commands/tx.go b/cmd/commands/tx.go index 0fe0cd731b..73f81c6b18 100644 --- a/cmd/commands/tx.go +++ b/cmd/commands/tx.go @@ -8,7 +8,6 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/basecoin/types" - crypto "github.com/tendermint/go-crypto" client "github.com/tendermint/go-rpc/client" wire "github.com/tendermint/go-wire" @@ -123,7 +122,7 @@ func sendTxCmd(cmd *cobra.Command, args []string) error { // sign that puppy signBytes := tx.SignBytes(chainIDFlag) - tx.Inputs[0].Signature = crypto.WrapSignature(privKey.Sign(signBytes)) + tx.Inputs[0].Signature = privKey.Sign(signBytes) fmt.Println("Signed SendTx:") fmt.Println(string(wire.JSONBytes(tx))) @@ -179,7 +178,7 @@ func AppTx(name string, data []byte) error { Data: data, } - tx.Input.Signature = crypto.WrapSignature(privKey.Sign(tx.SignBytes(chainIDFlag))) + tx.Input.Signature = privKey.Sign(tx.SignBytes(chainIDFlag)) fmt.Println("Signed AppTx:") fmt.Println(string(wire.JSONBytes(tx))) diff --git a/glide.lock b/glide.lock index 493deda79d..0bf033970d 100644 --- a/glide.lock +++ b/glide.lock @@ -1,18 +1,18 @@ -hash: c6e5febc35b5fd1003066820defb8a089db048b407239dad9faf44553fdc15e8 -updated: 2017-04-21T12:55:42.7004558-04:00 +hash: e7876b7cb70f79356bf2809547a78b1074b9f6f032e0ba861a65f8e7a6625832 +updated: 2017-04-10T20:27:50.460915186+02:00 imports: - name: github.com/btcsuite/btcd version: 4b348c1d33373d672edd83fc576892d0e46686d2 subpackages: - btcec - name: github.com/BurntSushi/toml - version: b26d9c308763d68093482582cea63d69be07a0f0 + version: 99064174e013895bbd9b025c31100bd1d9b590ca - name: github.com/ebuchman/fail-test version: 95f809107225be108efcf10a3509e4ea6ceef3c4 - name: github.com/go-stack/stack version: 100eb0c0a9c5b306ca2fb4f165df21d80ada4b82 - name: github.com/golang/protobuf - version: 2bba0603135d7d7f5cb73b2125beeda19c09f4ef + version: 69b215d01a5606c843240eab4937eab3acee6530 subpackages: - proto - ptypes/any @@ -25,15 +25,11 @@ imports: - name: github.com/jmhodges/levigo version: c42d9e0ca023e2198120196f842701bb4c55d7b9 - name: github.com/mattn/go-colorable - version: ded68f7a9561c023e790de24279db7ebf473ea80 + version: acb9493f2794fd0f820de7a27a217dafbb1b65ea - name: github.com/mattn/go-isatty - version: fc9e8d8ef48496124e79ae0df75490096eccf6fe + version: 9622e0cc9d8f9be434ca605520ff9a16808fee47 - name: github.com/pkg/errors - version: ff09b135c25aae272398c51a07235b90a75aa4f0 -- name: github.com/spf13/cobra - version: 10f6b9d7e1631a54ad07c5c0fb71c28a1abfd3c2 -- name: github.com/spf13/pflag - version: 2300d0f8576fe575f71aaa5b9bbe4e1b0dc2eb51 + version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/syndtr/goleveldb version: 8c81ea47d4c41a385645e133e15510fc6a2a74b4 subpackages: @@ -66,13 +62,13 @@ imports: - name: github.com/tendermint/go-clist version: 3baa390bbaf7634251c42ad69a8682e7e3990552 - name: github.com/tendermint/go-common - version: f9e3db037330c8a8d61d3966de8473eaf01154fa + version: 6af2364fa91ef2f3afc8ba0db33b66d9d3ae006c - name: github.com/tendermint/go-config version: 620dcbbd7d587cf3599dedbf329b64311b0c307a - name: github.com/tendermint/go-crypto - version: 3e1dba7ab762bb689123eec30c468967f077a6a4 + version: c410fc5e246e9accf95c6e80cb3c6aca2280755c - name: github.com/tendermint/go-data - version: 9fbf0684fefc4fad580992394a0bcf47c1b3d77e + version: e7fcc6d081ec8518912fcdc103188275f83a3ee5 - name: github.com/tendermint/go-db version: 9643f60bc2578693844aacf380a7c32e4c029fee - name: github.com/tendermint/go-events @@ -86,7 +82,7 @@ imports: - name: github.com/tendermint/go-merkle version: 714d4d04557fd068a7c2a1748241ce8428015a96 - name: github.com/tendermint/go-p2p - version: a163fddbdd2541793d22402afb113e6ccb391774 + version: b5f314ffed65c81bd019ba1dd2bae0e95f3937f3 subpackages: - upnp - name: github.com/tendermint/go-rpc @@ -107,7 +103,7 @@ imports: - app - client - name: github.com/tendermint/tendermint - version: 936e66867aecf92595b1f8615361b2867d9a69e6 + version: c49b331ba8315725d213712ed0410b5c9eb5ba0f subpackages: - blockchain - cmd/tendermint/commands @@ -126,7 +122,7 @@ imports: - types - version - name: golang.org/x/crypto - version: 96846453c37f0876340a66a47f3f75b1f3a6cd2d + version: 40541ccb1c6e64c947ed6f606b8a6cb4b67d7436 subpackages: - curve25519 - nacl/box @@ -137,7 +133,7 @@ imports: - ripemd160 - salsa20/salsa - name: golang.org/x/net - version: c8c74377599bd978aee1cf3b9b63a8634051cec2 + version: d379faa25cbdc04d653984913a2ceb43b0bc46d7 subpackages: - context - http2 @@ -147,7 +143,7 @@ imports: - lex/httplex - trace - name: golang.org/x/sys - version: ea9bcade75cb975a0b9738936568ab388b845617 + version: e48874b42435b4347fc52bdee0424a52abc974d7 subpackages: - unix - name: golang.org/x/text @@ -162,13 +158,12 @@ imports: subpackages: - googleapis/rpc/status - name: google.golang.org/grpc - version: 6914ab1e338c92da4218a23d27fcd03d0ad78d46 + version: 7b399ed358736bc5522021cdc7d79a8ee9ac6f98 subpackages: - codes - credentials - grpclog - internal - - keepalive - metadata - naming - peer diff --git a/glide.yaml b/glide.yaml index 87735c19c9..fb7d64d704 100644 --- a/glide.yaml +++ b/glide.yaml @@ -17,7 +17,7 @@ import: - package: github.com/tendermint/merkleeyes version: develop - package: github.com/tendermint/tendermint - version: develop + version: unstable - package: github.com/tendermint/abci version: develop - package: github.com/gorilla/websocket diff --git a/plugins/counter/counter_test.go b/plugins/counter/counter_test.go index 6d8168bd7b..f1c7d9d354 100644 --- a/plugins/counter/counter_test.go +++ b/plugins/counter/counter_test.go @@ -9,7 +9,6 @@ import ( abci "github.com/tendermint/abci/types" "github.com/tendermint/basecoin/app" "github.com/tendermint/basecoin/types" - crypto "github.com/tendermint/go-crypto" "github.com/tendermint/go-wire" eyescli "github.com/tendermint/merkleeyes/client" ) @@ -52,8 +51,7 @@ func TestCounterPlugin(t *testing.T) { // Sign request signBytes := tx.SignBytes(chainID) // t.Logf("Sign bytes: %X\n", signBytes) - sig := test1PrivAcc.Sign(signBytes) - tx.Input.Signature = crypto.WrapSignature(sig) + tx.Input.Signature = test1PrivAcc.Sign(signBytes) // t.Logf("Signed TX bytes: %X\n", wire.BinaryBytes(struct{ types.Tx }{tx})) // Write request diff --git a/plugins/ibc/ibc_test.go b/plugins/ibc/ibc_test.go index 4b220f1890..16ea283b4e 100644 --- a/plugins/ibc/ibc_test.go +++ b/plugins/ibc/ibc_test.go @@ -270,7 +270,7 @@ func TestIBCPluginBadCommit(t *testing.T) { // Modify the first byte of the first signature sig := commit.Precommits[0].Signature.Unwrap().(crypto.SignatureEd25519) sig[0] += 1 - commit.Precommits[0].Signature = crypto.WrapSignature(sig) + commit.Precommits[0].Signature = sig.Wrap() res = ibcPlugin.RunTx(store, ctx, wire.BinaryBytes(struct{ IBCTx }{IBCUpdateChainTx{ Header: header, Commit: commit, diff --git a/tests/tendermint/main.go b/tests/tendermint/main.go index 53416c2357..fa58b8f009 100644 --- a/tests/tendermint/main.go +++ b/tests/tendermint/main.go @@ -7,8 +7,7 @@ import ( "github.com/gorilla/websocket" "github.com/tendermint/basecoin/types" cmn "github.com/tendermint/go-common" - crypto "github.com/tendermint/go-crypto" - rpcclient "github.com/tendermint/go-rpc/client" + "github.com/tendermint/go-rpc/client" "github.com/tendermint/go-rpc/types" wire "github.com/tendermint/go-wire" _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types @@ -67,7 +66,7 @@ func main() { // Sign request signBytes := tx.SignBytes(chainID) sig := root.Sign(signBytes) - tx.Inputs[0].Signature = crypto.WrapSignature(sig) + tx.Inputs[0].Signature = sig //fmt.Println("tx:", tx) // Write request @@ -118,7 +117,7 @@ func main() { // Sign request signBytes := tx.SignBytes(chainID) sig := privAccountA.Sign(signBytes) - tx.Inputs[0].Signature = crypto.WrapSignature(sig) + tx.Inputs[0].Signature = sig //fmt.Println("tx:", tx) // Write request diff --git a/tests/tmsp/tmsp_test.go b/tests/tmsp/tmsp_test.go index e78f978b2b..606b48e923 100644 --- a/tests/tmsp/tmsp_test.go +++ b/tests/tmsp/tmsp_test.go @@ -9,7 +9,6 @@ import ( "github.com/tendermint/basecoin/app" "github.com/tendermint/basecoin/types" cmn "github.com/tendermint/go-common" - crypto "github.com/tendermint/go-crypto" "github.com/tendermint/go-wire" eyescli "github.com/tendermint/merkleeyes/client" ) @@ -50,7 +49,7 @@ func TestSendTx(t *testing.T) { signBytes := tx.SignBytes(chainID) // t.Log("Sign bytes: %X\n", signBytes) sig := test1PrivAcc.Sign(signBytes) - tx.Inputs[0].Signature = crypto.WrapSignature(sig) + tx.Inputs[0].Signature = sig // t.Log("Signed TX bytes: %X\n", wire.BinaryBytes(types.TxS{tx})) // Write request @@ -102,7 +101,7 @@ func TestSequence(t *testing.T) { // Sign request signBytes := tx.SignBytes(chainID) sig := test1PrivAcc.Sign(signBytes) - tx.Inputs[0].Signature = crypto.WrapSignature(sig) + tx.Inputs[0].Signature = sig // t.Log("ADDR: %X -> %X\n", tx.Inputs[0].Address, tx.Outputs[0].Address) // Write request @@ -146,7 +145,7 @@ func TestSequence(t *testing.T) { // Sign request signBytes := tx.SignBytes(chainID) sig := privAccountA.Sign(signBytes) - tx.Inputs[0].Signature = crypto.WrapSignature(sig) + tx.Inputs[0].Signature = sig // t.Log("ADDR: %X -> %X\n", tx.Inputs[0].Address, tx.Outputs[0].Address) // Write request diff --git a/types/test_helpers.go b/types/test_helpers.go index 23e46cdc9b..381ebda119 100644 --- a/types/test_helpers.go +++ b/types/test_helpers.go @@ -10,8 +10,8 @@ import ( // Creates a PrivAccount from secret. // The amount is not set. func PrivAccountFromSecret(secret string) PrivAccount { - privKey := crypto.WrapPrivKey( - crypto.GenPrivKeyEd25519FromSecret([]byte(secret))) + privKey := + crypto.GenPrivKeyEd25519FromSecret([]byte(secret)).Wrap() privAccount := PrivAccount{ PrivKey: privKey, Account: Account{ @@ -31,7 +31,7 @@ func RandAccounts(num int, minAmount int64, maxAmount int64) []PrivAccount { balance += cmn.RandInt64() % (maxAmount - minAmount) } - privKey := crypto.WrapPrivKey(crypto.GenPrivKeyEd25519()) + privKey := crypto.GenPrivKeyEd25519().Wrap() pubKey := privKey.PubKey() privAccs[i] = PrivAccount{ PrivKey: privKey, diff --git a/types/tx.go b/types/tx.go index f8366b0337..3b45a03646 100644 --- a/types/tx.go +++ b/types/tx.go @@ -104,7 +104,7 @@ func NewTxInput(pubKey crypto.PubKey, coins Coins, sequence int) TxInput { Sequence: sequence, } if sequence == 1 { - input.PubKey = crypto.WrapPubKey(pubKey) + input.PubKey = pubKey } return input } @@ -159,7 +159,7 @@ func (tx *SendTx) SignBytes(chainID string) []byte { func (tx *SendTx) SetSignature(addr []byte, sig crypto.Signature) bool { for i, input := range tx.Inputs { if bytes.Equal(input.Address, addr) { - tx.Inputs[i].Signature = crypto.WrapSignature(sig) + tx.Inputs[i].Signature = sig return true } } @@ -183,14 +183,14 @@ type AppTx struct { func (tx *AppTx) SignBytes(chainID string) []byte { signBytes := wire.BinaryBytes(chainID) sig := tx.Input.Signature - tx.Input.Signature = crypto.WrapSignature(nil) + tx.Input.Signature = crypto.Signature{} signBytes = append(signBytes, wire.BinaryBytes(tx)...) tx.Input.Signature = sig return signBytes } func (tx *AppTx) SetSignature(sig crypto.Signature) bool { - tx.Input.Signature = crypto.WrapSignature(sig) + tx.Input.Signature = sig return true } diff --git a/types/tx_test.go b/types/tx_test.go index fb4da2598d..72bc81ae4d 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - crypto "github.com/tendermint/go-crypto" + cmn "github.com/tendermint/go-common" data "github.com/tendermint/go-data" ) @@ -109,7 +109,7 @@ func TestSendTxJSON(t *testing.T) { sig := test1PrivAcc.Sign(signBytes) // we handle both raw sig and wrapped sig the same tx.SetSignature(test1PrivAcc.PubKey.Address(), sig) - tx2.SetSignature(test1PrivAcc.PubKey.Address(), crypto.WrapSignature(sig)) + tx2.SetSignature(test1PrivAcc.PubKey.Address(), sig) assert.Equal(tx, tx2) // let's marshal / unmarshal this with signature From 1a6fae6af6339ad616f2907df591370996155d5a Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:08:31 -0400 Subject: [PATCH 5/9] update import paths for repo merge --- app/app.go | 2 +- app/genesis.go | 4 ++-- app/genesis_test.go | 4 ++-- app/log.go | 2 +- cmd/commands/ibc.go | 2 +- cmd/commands/init.go | 2 +- cmd/commands/log.go | 2 +- cmd/commands/query.go | 2 +- cmd/commands/start.go | 2 +- cmd/commands/tx.go | 2 +- cmd/commands/utils.go | 4 ++-- plugins/ibc/ibc.go | 4 ++-- plugins/ibc/ibc_test.go | 4 ++-- scripts/print_txs.go | 6 +++--- state/execution.go | 4 ++-- state/log.go | 2 +- state/state.go | 2 +- tests/tendermint/main.go | 6 +++--- tests/tmsp/tmsp_test.go | 2 +- types/kvstore.go | 2 +- types/test_helpers.go | 2 +- types/tx.go | 6 +++--- types/tx_test.go | 4 ++-- 23 files changed, 36 insertions(+), 36 deletions(-) diff --git a/app/app.go b/app/app.go index fe17736697..3a28f7f7ea 100644 --- a/app/app.go +++ b/app/app.go @@ -5,7 +5,7 @@ import ( "strings" abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-wire" eyes "github.com/tendermint/merkleeyes/client" diff --git a/app/genesis.go b/app/genesis.go index ad8b2b6c9e..e4d838de2d 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -5,7 +5,7 @@ import ( "github.com/pkg/errors" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" //tmtypes "github.com/tendermint/tendermint/types" ) @@ -65,7 +65,7 @@ func loadGenesis(filePath string) (*FullGenesisDoc, error) { // tmGenesis := new(tmtypes.GenesisDoc) // err = wire.ReadJSONBytes(bytes, tmGenesis) - // the basecoin genesis go-data :) + // the basecoin genesis go-wire/data :) genDoc := new(FullGenesisDoc) err = json.Unmarshal(bytes, genDoc) if err != nil { diff --git a/app/genesis_test.go b/app/genesis_test.go index 4fec4b6db7..df47827465 100644 --- a/app/genesis_test.go +++ b/app/genesis_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" eyescli "github.com/tendermint/merkleeyes/client" ) @@ -52,7 +52,7 @@ func TestParseGenesisList(t *testing.T) { bytes, err := cmn.ReadFile(genesisFilepath) require.Nil(err, "loading genesis file %+v", err) - // the basecoin genesis go-data :) + // the basecoin genesis go-wire/data :) genDoc := new(FullGenesisDoc) err = json.Unmarshal(bytes, genDoc) require.Nil(err, "unmarshaling genesis file %+v", err) diff --git a/app/log.go b/app/log.go index 52dc2ddfa4..1337bcdfc6 100644 --- a/app/log.go +++ b/app/log.go @@ -1,7 +1,7 @@ package app import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "app") diff --git a/cmd/commands/ibc.go b/cmd/commands/ibc.go index 8b0938826b..bd3efe5ea8 100644 --- a/cmd/commands/ibc.go +++ b/cmd/commands/ibc.go @@ -10,7 +10,7 @@ import ( "github.com/tendermint/basecoin/plugins/ibc" - "github.com/tendermint/go-merkle" + "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" tmtypes "github.com/tendermint/tendermint/types" ) diff --git a/cmd/commands/init.go b/cmd/commands/init.go index f7fae72e6c..acd967dcda 100644 --- a/cmd/commands/init.go +++ b/cmd/commands/init.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" ) //commands diff --git a/cmd/commands/log.go b/cmd/commands/log.go index 720e168b57..3300562c80 100644 --- a/cmd/commands/log.go +++ b/cmd/commands/log.go @@ -1,7 +1,7 @@ package commands import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "commands") diff --git a/cmd/commands/query.go b/cmd/commands/query.go index 7d79c2f1f2..fa96756a42 100644 --- a/cmd/commands/query.go +++ b/cmd/commands/query.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/tendermint/go-merkle" + "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" tmtypes "github.com/tendermint/tendermint/types" ) diff --git a/cmd/commands/start.go b/cmd/commands/start.go index 4578738ceb..340ee46c90 100644 --- a/cmd/commands/start.go +++ b/cmd/commands/start.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/cobra" "github.com/tendermint/abci/server" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" eyes "github.com/tendermint/merkleeyes/client" tmcfg "github.com/tendermint/tendermint/config/tendermint" diff --git a/cmd/commands/tx.go b/cmd/commands/tx.go index 73f81c6b18..d8edcd08e6 100644 --- a/cmd/commands/tx.go +++ b/cmd/commands/tx.go @@ -9,7 +9,7 @@ import ( "github.com/tendermint/basecoin/types" - client "github.com/tendermint/go-rpc/client" + client "github.com/tendermint/tendermint/rpc/client" wire "github.com/tendermint/go-wire" ctypes "github.com/tendermint/tendermint/rpc/core/types" ) diff --git a/cmd/commands/utils.go b/cmd/commands/utils.go index 0f263d82a8..e31847a899 100644 --- a/cmd/commands/utils.go +++ b/cmd/commands/utils.go @@ -14,8 +14,8 @@ import ( "github.com/tendermint/basecoin/types" abci "github.com/tendermint/abci/types" - cmn "github.com/tendermint/go-common" - client "github.com/tendermint/go-rpc/client" + cmn "github.com/tendermint/tmlibs/common" + client "github.com/tendermint/tendermint/rpc/client" wire "github.com/tendermint/go-wire" ctypes "github.com/tendermint/tendermint/rpc/core/types" tmtypes "github.com/tendermint/tendermint/types" diff --git a/plugins/ibc/ibc.go b/plugins/ibc/ibc.go index 25f5a6da86..9f2bac6243 100644 --- a/plugins/ibc/ibc.go +++ b/plugins/ibc/ibc.go @@ -8,8 +8,8 @@ import ( abci "github.com/tendermint/abci/types" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/go-common" - merkle "github.com/tendermint/go-merkle" + cmn "github.com/tendermint/tmlibs/common" + merkle "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" tm "github.com/tendermint/tendermint/types" ) diff --git a/plugins/ibc/ibc_test.go b/plugins/ibc/ibc_test.go index 16ea283b4e..58c7086482 100644 --- a/plugins/ibc/ibc_test.go +++ b/plugins/ibc/ibc_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" abci "github.com/tendermint/abci/types" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" crypto "github.com/tendermint/go-crypto" - "github.com/tendermint/go-merkle" + "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" eyes "github.com/tendermint/merkleeyes/client" tm "github.com/tendermint/tendermint/types" diff --git a/scripts/print_txs.go b/scripts/print_txs.go index 689173a907..bf8ddce362 100644 --- a/scripts/print_txs.go +++ b/scripts/print_txs.go @@ -9,9 +9,9 @@ import ( "time" "github.com/gorilla/websocket" - cmn "github.com/tendermint/go-common" - "github.com/tendermint/go-rpc/client" - "github.com/tendermint/go-rpc/types" + cmn "github.com/tendermint/tmlibs/common" + "github.com/tendermint/tendermint/rpc/client" + "github.com/tendermint/tendermint/rpc/types" "github.com/tendermint/go-wire" _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types ) diff --git a/state/execution.go b/state/execution.go index f642b80521..c950a628e6 100644 --- a/state/execution.go +++ b/state/execution.go @@ -3,8 +3,8 @@ package state import ( abci "github.com/tendermint/abci/types" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/go-common" - "github.com/tendermint/go-events" + cmn "github.com/tendermint/tmlibs/common" + "github.com/tendermint/tmlibs/events" ) // If the tx is invalid, a TMSP error will be returned. diff --git a/state/log.go b/state/log.go index 5b102b5703..0a23513248 100644 --- a/state/log.go +++ b/state/log.go @@ -1,7 +1,7 @@ package state import ( - "github.com/tendermint/go-logger" + "github.com/tendermint/tmlibs/logger" ) var log = logger.New("module", "state") diff --git a/state/state.go b/state/state.go index 68a7c36243..5555dae913 100644 --- a/state/state.go +++ b/state/state.go @@ -3,7 +3,7 @@ package state import ( abci "github.com/tendermint/abci/types" "github.com/tendermint/basecoin/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-wire" eyes "github.com/tendermint/merkleeyes/client" ) diff --git a/tests/tendermint/main.go b/tests/tendermint/main.go index fa58b8f009..137cd6c215 100644 --- a/tests/tendermint/main.go +++ b/tests/tendermint/main.go @@ -6,9 +6,9 @@ import ( "github.com/gorilla/websocket" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/go-common" - "github.com/tendermint/go-rpc/client" - "github.com/tendermint/go-rpc/types" + cmn "github.com/tendermint/tmlibs/common" + "github.com/tendermint/tendermint/rpc/client" + "github.com/tendermint/tendermint/rpc/types" wire "github.com/tendermint/go-wire" _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types ) diff --git a/tests/tmsp/tmsp_test.go b/tests/tmsp/tmsp_test.go index 606b48e923..0efb9143e3 100644 --- a/tests/tmsp/tmsp_test.go +++ b/tests/tmsp/tmsp_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/basecoin/app" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-wire" eyescli "github.com/tendermint/merkleeyes/client" ) diff --git a/types/kvstore.go b/types/kvstore.go index 15088bdfb3..a795d7dd1f 100644 --- a/types/kvstore.go +++ b/types/kvstore.go @@ -4,7 +4,7 @@ import ( "container/list" "fmt" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" ) type KVStore interface { diff --git a/types/test_helpers.go b/types/test_helpers.go index 381ebda119..ccd46074ac 100644 --- a/types/test_helpers.go +++ b/types/test_helpers.go @@ -3,7 +3,7 @@ package types // Helper functions for testing import ( - cmn "github.com/tendermint/go-common" + cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" ) diff --git a/types/tx.go b/types/tx.go index 3b45a03646..7b1b547a0b 100644 --- a/types/tx.go +++ b/types/tx.go @@ -5,9 +5,9 @@ import ( "encoding/json" abci "github.com/tendermint/abci/types" - . "github.com/tendermint/go-common" + . "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" - "github.com/tendermint/go-data" + "github.com/tendermint/go-wire/data" "github.com/tendermint/go-wire" ) @@ -37,7 +37,7 @@ func (_ *AppTx) AssertIsTx() {} var txMapper data.Mapper -// register both private key types with go-data (and thus go-wire) +// register both private key types with go-wire/data (and thus go-wire) func init() { txMapper = data.NewMapper(TxS{}). RegisterImplementation(&SendTx{}, TxNameSend, TxTypeSend). diff --git a/types/tx_test.go b/types/tx_test.go index 72bc81ae4d..092652d1b8 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cmn "github.com/tendermint/go-common" - data "github.com/tendermint/go-data" + cmn "github.com/tendermint/tmlibs/common" + data "github.com/tendermint/go-wire/data" ) var chainID string = "test_chain" From acc9a79daa8f82c5bc33e95a1e5f5fa147c95ec1 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:20:16 -0400 Subject: [PATCH 6/9] glide update --- glide.lock | 136 +++++++++++++++++++++++++++++++---------------------- glide.yaml | 44 ++++++++++++----- 2 files changed, 113 insertions(+), 67 deletions(-) diff --git a/glide.lock b/glide.lock index 0bf033970d..72ae44cf98 100644 --- a/glide.lock +++ b/glide.lock @@ -1,35 +1,68 @@ -hash: e7876b7cb70f79356bf2809547a78b1074b9f6f032e0ba861a65f8e7a6625832 -updated: 2017-04-10T20:27:50.460915186+02:00 +hash: 5c7309b2f219a9bb24b39b57531478ee12341c358d373ee070ff0381fcb92752 +updated: 2017-04-26T01:15:31.969288035-04:00 imports: - name: github.com/btcsuite/btcd version: 4b348c1d33373d672edd83fc576892d0e46686d2 subpackages: - btcec -- name: github.com/BurntSushi/toml - version: 99064174e013895bbd9b025c31100bd1d9b590ca - name: github.com/ebuchman/fail-test version: 95f809107225be108efcf10a3509e4ea6ceef3c4 +- name: github.com/fsnotify/fsnotify + version: 4da3e2cfbabc9f751898f250b49f2439785783a1 - name: github.com/go-stack/stack version: 100eb0c0a9c5b306ca2fb4f165df21d80ada4b82 - name: github.com/golang/protobuf - version: 69b215d01a5606c843240eab4937eab3acee6530 + version: 2bba0603135d7d7f5cb73b2125beeda19c09f4ef subpackages: - proto - ptypes/any - name: github.com/golang/snappy version: 553a641470496b2327abcac10b36396bd98e45c9 - name: github.com/gorilla/websocket - version: 3ab3a8b8831546bd18fd182c20687ca853b2bb13 + version: a91eba7f97777409bc2c443f5534d41dd20c5720 +- name: github.com/hashicorp/hcl + version: 7fa7fff964d035e8a162cce3a164b3ad02ad651b + subpackages: + - hcl/ast + - hcl/parser + - hcl/scanner + - hcl/strconv + - hcl/token + - json/parser + - json/scanner + - json/token - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 - name: github.com/jmhodges/levigo version: c42d9e0ca023e2198120196f842701bb4c55d7b9 +- name: github.com/magiconair/properties + version: 51463bfca2576e06c62a8504b5c0f06d61312647 - name: github.com/mattn/go-colorable - version: acb9493f2794fd0f820de7a27a217dafbb1b65ea + version: ded68f7a9561c023e790de24279db7ebf473ea80 - name: github.com/mattn/go-isatty - version: 9622e0cc9d8f9be434ca605520ff9a16808fee47 + version: fc9e8d8ef48496124e79ae0df75490096eccf6fe +- name: github.com/mitchellh/mapstructure + version: cc8532a8e9a55ea36402aa21efdf403a60d34096 +- name: github.com/pelletier/go-buffruneio + version: c37440a7cf42ac63b919c752ca73a85067e05992 +- name: github.com/pelletier/go-toml + version: fe206efb84b2bc8e8cfafe6b4c1826622be969e3 - name: github.com/pkg/errors - version: 645ef00459ed84a119197bfb8d8205042c6df63d + version: ff09b135c25aae272398c51a07235b90a75aa4f0 +- name: github.com/spf13/afero + version: 9be650865eab0c12963d8753212f4f9c66cdcf12 + subpackages: + - mem +- name: github.com/spf13/cast + version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 +- name: github.com/spf13/cobra + version: 6ed17b5128e8932c9ecd4c3970e8ea5e60a418ac +- name: github.com/spf13/jwalterweatherman + version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66 +- name: github.com/spf13/pflag + version: 2300d0f8576fe575f71aaa5b9bbe4e1b0dc2eb51 +- name: github.com/spf13/viper + version: 0967fc9aceab2ce9da34061253ac10fb99bba5b2 - name: github.com/syndtr/goleveldb version: 8c81ea47d4c41a385645e133e15510fc6a2a74b4 subpackages: @@ -46,7 +79,7 @@ imports: - leveldb/table - leveldb/util - name: github.com/tendermint/abci - version: 56e13d87f4e3ec1ea756957d6b23caa6ebcf0998 + version: c709d3cc857929a8dd36a90da3640122d7e75770 subpackages: - client - example/dummy @@ -57,53 +90,24 @@ imports: subpackages: - edwards25519 - extra25519 -- name: github.com/tendermint/go-autofile - version: 48b17de82914e1ec2f134ce823ba426337d2c518 -- name: github.com/tendermint/go-clist - version: 3baa390bbaf7634251c42ad69a8682e7e3990552 -- name: github.com/tendermint/go-common - version: 6af2364fa91ef2f3afc8ba0db33b66d9d3ae006c -- name: github.com/tendermint/go-config - version: 620dcbbd7d587cf3599dedbf329b64311b0c307a - name: github.com/tendermint/go-crypto - version: c410fc5e246e9accf95c6e80cb3c6aca2280755c -- name: github.com/tendermint/go-data - version: e7fcc6d081ec8518912fcdc103188275f83a3ee5 -- name: github.com/tendermint/go-db - version: 9643f60bc2578693844aacf380a7c32e4c029fee -- name: github.com/tendermint/go-events - version: f8ffbfb2be3483e9e7927495590a727f51c0c11f -- name: github.com/tendermint/go-flowrate - version: a20c98e61957faa93b4014fbd902f20ab9317a6a - subpackages: - - flowrate -- name: github.com/tendermint/go-logger - version: cefb3a45c0bf3c493a04e9bcd9b1540528be59f2 -- name: github.com/tendermint/go-merkle - version: 714d4d04557fd068a7c2a1748241ce8428015a96 -- name: github.com/tendermint/go-p2p - version: b5f314ffed65c81bd019ba1dd2bae0e95f3937f3 - subpackages: - - upnp -- name: github.com/tendermint/go-rpc - version: 559613689d56eaa423b19a3a4158546beb4857de - subpackages: - - client - - server - - types + version: 9b95da8fa4187f6799558d89b271dc8ab6485615 - name: github.com/tendermint/go-wire - version: c1c9a57ab8038448ddea1714c0698f8051e5748c + version: 334005c236d19c632fb5f073f9de3b0fab6a522b + subpackages: + - data - name: github.com/tendermint/log15 version: ae0f3d6450da9eac7074b439c8e1c3cabf0d5ce6 subpackages: - term - name: github.com/tendermint/merkleeyes - version: 9fb76efa5aebe773a598f97e68e75fe53d520e70 + version: 6fd69aa0871a4e685a5570aa7ab3d12e4068a722 subpackages: - app - client + - iavl - name: github.com/tendermint/tendermint - version: c49b331ba8315725d213712ed0410b5c9eb5ba0f + version: 098646c5ff604705b7b082a89227ee78f3547fed subpackages: - blockchain - cmd/tendermint/commands @@ -111,18 +115,36 @@ imports: - consensus - mempool - node + - p2p + - p2p/upnp - proxy - - rpc/core + - rpc + - rpc/client - rpc/core/types - - rpc/grpc + - rpc/server + - rpc/tendermint/core + - rpc/tendermint/core/types + - rpc/tendermint/grpc + - rpc/types - state - state/txindex - state/txindex/kv - state/txindex/null - types - version +- name: github.com/tendermint/tmlibs + version: df250b69416a35a943a6e2a92118667e9ef031d4 + subpackages: + - autofile + - clist + - common + - db + - events + - flowrate + - logger + - merkle - name: golang.org/x/crypto - version: 40541ccb1c6e64c947ed6f606b8a6cb4b67d7436 + version: c7af5bf2638a1164f2eb5467c39c6cffbd13a02e subpackages: - curve25519 - nacl/box @@ -133,7 +155,7 @@ imports: - ripemd160 - salsa20/salsa - name: golang.org/x/net - version: d379faa25cbdc04d653984913a2ceb43b0bc46d7 + version: da118f7b8e5954f39d0d2130ab35d4bf0e3cb344 subpackages: - context - http2 @@ -143,11 +165,11 @@ imports: - lex/httplex - trace - name: golang.org/x/sys - version: e48874b42435b4347fc52bdee0424a52abc974d7 + version: 9f30dcbe5be197894515a338a9bda9253567ea8f subpackages: - unix - name: golang.org/x/text - version: 19e3104b43db45fca0303f489a9536087b184802 + version: a9a820217f98f7c8a207ec1e45a874e1fe12c478 subpackages: - secure/bidirule - transform @@ -158,12 +180,14 @@ imports: subpackages: - googleapis/rpc/status - name: google.golang.org/grpc - version: 7b399ed358736bc5522021cdc7d79a8ee9ac6f98 + version: c73e0165df8e5495c523feb93a8a6c19b9452817 subpackages: - codes - credentials + - grpclb/grpc_lb_v1 - grpclog - internal + - keepalive - metadata - naming - peer @@ -171,9 +195,11 @@ imports: - status - tap - transport +- name: gopkg.in/yaml.v2 + version: cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b testImports: - name: github.com/davecgh/go-spew - version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 + version: 04cdfd42973bb9c8589fd6a731800cf222fde1a9 subpackages: - spew - name: github.com/pmezard/go-difflib @@ -181,7 +207,7 @@ testImports: subpackages: - difflib - name: github.com/stretchr/testify - version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 + version: 4d4bfba8f1d1027c4fdbe371823030df51419987 subpackages: - assert - require diff --git a/glide.yaml b/glide.yaml index fb7d64d704..fd91126b45 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,24 +1,44 @@ package: github.com/tendermint/basecoin import: -- package: github.com/tendermint/go-common +- package: github.com/gorilla/websocket +- package: github.com/pkg/errors +- package: github.com/spf13/cobra +- package: github.com/spf13/pflag +- package: github.com/tendermint/abci version: develop + subpackages: + - server + - types - package: github.com/tendermint/go-crypto version: develop -- package: github.com/tendermint/go-events - version: develop -- package: github.com/tendermint/go-logger - version: develop -- package: github.com/tendermint/go-data - version: develop -- package: github.com/tendermint/go-rpc - version: develop - package: github.com/tendermint/go-wire version: develop + subpackages: + - data - package: github.com/tendermint/merkleeyes version: develop + subpackages: + - client + - iavl - package: github.com/tendermint/tendermint version: unstable -- package: github.com/tendermint/abci + subpackages: + - cmd/tendermint/commands + - config/tendermint + - node + - proxy + - rpc/client + - rpc/core/types + - rpc/types + - types +- package: github.com/tendermint/tmlibs version: develop -- package: github.com/gorilla/websocket - version: v1.1.0 + subpackages: + - common + - events + - logger +testImport: +- package: github.com/stretchr/testify + subpackages: + - assert + - require From 9c391a08a96d9f016b6529cb79856a6cf25cc968 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 26 Apr 2017 01:20:29 -0400 Subject: [PATCH 7/9] fix some imports --- cmd/commands/ibc.go | 4 ++-- cmd/commands/query.go | 4 ++-- cmd/commands/tx.go | 2 +- cmd/commands/utils.go | 2 +- plugins/ibc/ibc_test.go | 8 ++++---- scripts/print_txs.go | 2 +- tests/tendermint/main.go | 2 +- types/test_helpers.go | 4 ++-- types/tx_test.go | 1 - 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/cmd/commands/ibc.go b/cmd/commands/ibc.go index bd3efe5ea8..fa6d4758cc 100644 --- a/cmd/commands/ibc.go +++ b/cmd/commands/ibc.go @@ -10,8 +10,8 @@ import ( "github.com/tendermint/basecoin/plugins/ibc" - "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" + "github.com/tendermint/merkleeyes/iavl" tmtypes "github.com/tendermint/tendermint/types" ) @@ -229,7 +229,7 @@ func ibcPacketPostTxCmd(cmd *cobra.Command, args []string) error { } var packet ibc.Packet - proof := new(merkle.IAVLProof) + proof := new(iavl.IAVLProof) err = wire.ReadBinaryBytes(packetBytes, &packet) if err != nil { diff --git a/cmd/commands/query.go b/cmd/commands/query.go index fa96756a42..1b46a6617a 100644 --- a/cmd/commands/query.go +++ b/cmd/commands/query.go @@ -8,8 +8,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" + "github.com/tendermint/merkleeyes/iavl" tmtypes "github.com/tendermint/tendermint/types" ) @@ -202,7 +202,7 @@ func verifyCmd(cmd *cobra.Command, args []string) error { return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofFlag, err) } - proof, err := merkle.ReadProof(proofBytes) + proof, err := iavl.ReadProof(proofBytes) if err != nil { return errors.Errorf("Error unmarshalling proof: %v\n", err) } diff --git a/cmd/commands/tx.go b/cmd/commands/tx.go index d8edcd08e6..0ee0896b01 100644 --- a/cmd/commands/tx.go +++ b/cmd/commands/tx.go @@ -11,7 +11,7 @@ import ( client "github.com/tendermint/tendermint/rpc/client" wire "github.com/tendermint/go-wire" - ctypes "github.com/tendermint/tendermint/rpc/core/types" + ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" ) //commands diff --git a/cmd/commands/utils.go b/cmd/commands/utils.go index e31847a899..b0e8b2cc89 100644 --- a/cmd/commands/utils.go +++ b/cmd/commands/utils.go @@ -17,7 +17,7 @@ import ( cmn "github.com/tendermint/tmlibs/common" client "github.com/tendermint/tendermint/rpc/client" wire "github.com/tendermint/go-wire" - ctypes "github.com/tendermint/tendermint/rpc/core/types" + ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" tmtypes "github.com/tendermint/tendermint/types" ) diff --git a/plugins/ibc/ibc_test.go b/plugins/ibc/ibc_test.go index 58c7086482..53864e62cf 100644 --- a/plugins/ibc/ibc_test.go +++ b/plugins/ibc/ibc_test.go @@ -9,12 +9,12 @@ import ( "github.com/stretchr/testify/assert" abci "github.com/tendermint/abci/types" "github.com/tendermint/basecoin/types" - cmn "github.com/tendermint/tmlibs/common" crypto "github.com/tendermint/go-crypto" - "github.com/tendermint/merkleeyes/iavl" "github.com/tendermint/go-wire" eyes "github.com/tendermint/merkleeyes/client" + "github.com/tendermint/merkleeyes/iavl" tm "github.com/tendermint/tendermint/types" + cmn "github.com/tendermint/tmlibs/common" ) // NOTE: PrivAccounts are sorted by Address, @@ -192,7 +192,7 @@ func TestIBCPlugin(t *testing.T) { Prove: true, }) assert.Nil(err) - var proof *merkle.IAVLProof + var proof *iavl.IAVLProof err = wire.ReadBinaryBytes(resQuery.Proof, &proof) assert.Nil(err) @@ -379,7 +379,7 @@ func TestIBCPluginBadProof(t *testing.T) { Prove: true, }) assert.Nil(err) - var proof *merkle.IAVLProof + var proof *iavl.IAVLProof err = wire.ReadBinaryBytes(resQuery.Proof, &proof) assert.Nil(err) diff --git a/scripts/print_txs.go b/scripts/print_txs.go index bf8ddce362..de3a2ebd9b 100644 --- a/scripts/print_txs.go +++ b/scripts/print_txs.go @@ -13,7 +13,7 @@ import ( "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/types" "github.com/tendermint/go-wire" - _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types + _ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types ) func main() { diff --git a/tests/tendermint/main.go b/tests/tendermint/main.go index 137cd6c215..0d994d45eb 100644 --- a/tests/tendermint/main.go +++ b/tests/tendermint/main.go @@ -10,7 +10,7 @@ import ( "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/types" wire "github.com/tendermint/go-wire" - _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types + _ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types ) func main() { diff --git a/types/test_helpers.go b/types/test_helpers.go index ccd46074ac..ffd3ce931f 100644 --- a/types/test_helpers.go +++ b/types/test_helpers.go @@ -3,8 +3,8 @@ package types // Helper functions for testing import ( - cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/go-crypto" + cmn "github.com/tendermint/tmlibs/common" ) // Creates a PrivAccount from secret. @@ -100,6 +100,6 @@ func GetTx(seq int, accOut PrivAccount, accsIn ...PrivAccount) *SendTx { func SignTx(chainID string, tx *SendTx, accs ...PrivAccount) { signBytes := tx.SignBytes(chainID) for i, _ := range tx.Inputs { - tx.Inputs[i].Signature = crypto.SignatureS{accs[i].Sign(signBytes)} + tx.Inputs[i].Signature = accs[i].Sign(signBytes) } } diff --git a/types/tx_test.go b/types/tx_test.go index 092652d1b8..79ce9b90a3 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -6,7 +6,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - cmn "github.com/tendermint/tmlibs/common" data "github.com/tendermint/go-wire/data" ) From e4be4dd7ce723cabce58d052cad248c1ad9b23f1 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 27 Apr 2017 16:12:01 +0200 Subject: [PATCH 8/9] Tendermint dependency now latest develop, not unstable --- glide.lock | 8 ++++---- glide.yaml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/glide.lock b/glide.lock index 72ae44cf98..5b75d07098 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 5c7309b2f219a9bb24b39b57531478ee12341c358d373ee070ff0381fcb92752 -updated: 2017-04-26T01:15:31.969288035-04:00 +hash: 782a5a86373a2d9521fc03129ce6c6ee6c7ab7ffcdaf0d0afb7fecc5e2cfdb97 +updated: 2017-04-27T16:08:07.098092597+02:00 imports: - name: github.com/btcsuite/btcd version: 4b348c1d33373d672edd83fc576892d0e46686d2 @@ -107,7 +107,7 @@ imports: - client - iavl - name: github.com/tendermint/tendermint - version: 098646c5ff604705b7b082a89227ee78f3547fed + version: 1781a521470f47872876b031d2c6098be4c9c7e9 subpackages: - blockchain - cmd/tendermint/commands @@ -120,8 +120,8 @@ imports: - proxy - rpc - rpc/client - - rpc/core/types - rpc/server + - rpc/tendermint/client - rpc/tendermint/core - rpc/tendermint/core/types - rpc/tendermint/grpc diff --git a/glide.yaml b/glide.yaml index fd91126b45..1e3270fdd0 100644 --- a/glide.yaml +++ b/glide.yaml @@ -21,14 +21,14 @@ import: - client - iavl - package: github.com/tendermint/tendermint - version: unstable + version: develop subpackages: - cmd/tendermint/commands - config/tendermint - node - proxy - - rpc/client - - rpc/core/types + - rpc/tendermint/core/types + - rpc/tendermint/client - rpc/types - types - package: github.com/tendermint/tmlibs From 525cb4c80b56de52715b80b0766c68aa7be20c31 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 27 Apr 2017 12:52:47 -0400 Subject: [PATCH 9/9] fix tendermint rpc link --- cmd/commands/tx.go | 4 ++-- cmd/commands/utils.go | 4 ++-- glide.lock | 48 +++++++++++++++++++--------------------- glide.yaml | 6 ++--- scripts/print_txs.go | 6 ++--- tests/tendermint/main.go | 6 ++--- 6 files changed, 36 insertions(+), 38 deletions(-) diff --git a/cmd/commands/tx.go b/cmd/commands/tx.go index 0ee0896b01..2982328064 100644 --- a/cmd/commands/tx.go +++ b/cmd/commands/tx.go @@ -9,9 +9,9 @@ import ( "github.com/tendermint/basecoin/types" - client "github.com/tendermint/tendermint/rpc/client" + client "github.com/tendermint/tendermint/rpc/lib/client" wire "github.com/tendermint/go-wire" - ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" ) //commands diff --git a/cmd/commands/utils.go b/cmd/commands/utils.go index b0e8b2cc89..7b43ce9a90 100644 --- a/cmd/commands/utils.go +++ b/cmd/commands/utils.go @@ -15,9 +15,9 @@ import ( abci "github.com/tendermint/abci/types" cmn "github.com/tendermint/tmlibs/common" - client "github.com/tendermint/tendermint/rpc/client" + client "github.com/tendermint/tendermint/rpc/lib/client" wire "github.com/tendermint/go-wire" - ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" tmtypes "github.com/tendermint/tendermint/types" ) diff --git a/glide.lock b/glide.lock index 5b75d07098..f6772847ae 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 782a5a86373a2d9521fc03129ce6c6ee6c7ab7ffcdaf0d0afb7fecc5e2cfdb97 -updated: 2017-04-27T16:08:07.098092597+02:00 +hash: ab7d4136802bfb9c56c25d6c384ce65891adfda2f2fc338fb4532ecc8e85ad40 +updated: 2017-04-27T12:49:42.595893036-04:00 imports: - name: github.com/btcsuite/btcd version: 4b348c1d33373d672edd83fc576892d0e46686d2 @@ -19,9 +19,9 @@ imports: - name: github.com/golang/snappy version: 553a641470496b2327abcac10b36396bd98e45c9 - name: github.com/gorilla/websocket - version: a91eba7f97777409bc2c443f5534d41dd20c5720 + version: 3ab3a8b8831546bd18fd182c20687ca853b2bb13 - name: github.com/hashicorp/hcl - version: 7fa7fff964d035e8a162cce3a164b3ad02ad651b + version: 630949a3c5fa3c613328e1b8256052cbc2327c9b subpackages: - hcl/ast - hcl/parser @@ -42,11 +42,11 @@ imports: - name: github.com/mattn/go-isatty version: fc9e8d8ef48496124e79ae0df75490096eccf6fe - name: github.com/mitchellh/mapstructure - version: cc8532a8e9a55ea36402aa21efdf403a60d34096 + version: 53818660ed4955e899c0bcafa97299a388bd7c8e - name: github.com/pelletier/go-buffruneio version: c37440a7cf42ac63b919c752ca73a85067e05992 - name: github.com/pelletier/go-toml - version: fe206efb84b2bc8e8cfafe6b4c1826622be969e3 + version: 13d49d4606eb801b8f01ae542b4afc4c6ee3d84a - name: github.com/pkg/errors version: ff09b135c25aae272398c51a07235b90a75aa4f0 - name: github.com/spf13/afero @@ -56,13 +56,13 @@ imports: - name: github.com/spf13/cast version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 - name: github.com/spf13/cobra - version: 6ed17b5128e8932c9ecd4c3970e8ea5e60a418ac + version: 10f6b9d7e1631a54ad07c5c0fb71c28a1abfd3c2 - name: github.com/spf13/jwalterweatherman version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66 - name: github.com/spf13/pflag version: 2300d0f8576fe575f71aaa5b9bbe4e1b0dc2eb51 - name: github.com/spf13/viper - version: 0967fc9aceab2ce9da34061253ac10fb99bba5b2 + version: 5d46e70da8c0b6f812e0b170b7a985753b5c63cb - name: github.com/syndtr/goleveldb version: 8c81ea47d4c41a385645e133e15510fc6a2a74b4 subpackages: @@ -107,7 +107,7 @@ imports: - client - iavl - name: github.com/tendermint/tendermint - version: 1781a521470f47872876b031d2c6098be4c9c7e9 + version: 1310c7264750efa8939680536098ded9f9e8df74 subpackages: - blockchain - cmd/tendermint/commands @@ -118,14 +118,13 @@ imports: - p2p - p2p/upnp - proxy - - rpc - - rpc/client - - rpc/server - - rpc/tendermint/client - - rpc/tendermint/core - - rpc/tendermint/core/types - - rpc/tendermint/grpc - - rpc/types + - rpc/core + - rpc/core/types + - rpc/grpc + - rpc/lib + - rpc/lib/client + - rpc/lib/server + - rpc/lib/types - state - state/txindex - state/txindex/kv @@ -144,7 +143,7 @@ imports: - logger - merkle - name: golang.org/x/crypto - version: c7af5bf2638a1164f2eb5467c39c6cffbd13a02e + version: 96846453c37f0876340a66a47f3f75b1f3a6cd2d subpackages: - curve25519 - nacl/box @@ -155,7 +154,7 @@ imports: - ripemd160 - salsa20/salsa - name: golang.org/x/net - version: da118f7b8e5954f39d0d2130ab35d4bf0e3cb344 + version: c8c74377599bd978aee1cf3b9b63a8634051cec2 subpackages: - context - http2 @@ -165,11 +164,11 @@ imports: - lex/httplex - trace - name: golang.org/x/sys - version: 9f30dcbe5be197894515a338a9bda9253567ea8f + version: ea9bcade75cb975a0b9738936568ab388b845617 subpackages: - unix - name: golang.org/x/text - version: a9a820217f98f7c8a207ec1e45a874e1fe12c478 + version: 19e3104b43db45fca0303f489a9536087b184802 subpackages: - secure/bidirule - transform @@ -180,11 +179,10 @@ imports: subpackages: - googleapis/rpc/status - name: google.golang.org/grpc - version: c73e0165df8e5495c523feb93a8a6c19b9452817 + version: 6914ab1e338c92da4218a23d27fcd03d0ad78d46 subpackages: - codes - credentials - - grpclb/grpc_lb_v1 - grpclog - internal - keepalive @@ -199,7 +197,7 @@ imports: version: cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b testImports: - name: github.com/davecgh/go-spew - version: 04cdfd42973bb9c8589fd6a731800cf222fde1a9 + version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 subpackages: - spew - name: github.com/pmezard/go-difflib @@ -207,7 +205,7 @@ testImports: subpackages: - difflib - name: github.com/stretchr/testify - version: 4d4bfba8f1d1027c4fdbe371823030df51419987 + version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 subpackages: - assert - require diff --git a/glide.yaml b/glide.yaml index 1e3270fdd0..e232139b58 100644 --- a/glide.yaml +++ b/glide.yaml @@ -27,9 +27,9 @@ import: - config/tendermint - node - proxy - - rpc/tendermint/core/types - - rpc/tendermint/client - - rpc/types + - rpc/core/types + - rpc/lib/client + - rpc/lib/types - types - package: github.com/tendermint/tmlibs version: develop diff --git a/scripts/print_txs.go b/scripts/print_txs.go index de3a2ebd9b..d31e70ffa5 100644 --- a/scripts/print_txs.go +++ b/scripts/print_txs.go @@ -10,10 +10,10 @@ import ( "github.com/gorilla/websocket" cmn "github.com/tendermint/tmlibs/common" - "github.com/tendermint/tendermint/rpc/client" - "github.com/tendermint/tendermint/rpc/types" + "github.com/tendermint/tendermint/rpc/lib/client" + "github.com/tendermint/tendermint/rpc/lib/types" "github.com/tendermint/go-wire" - _ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types + _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types ) func main() { diff --git a/tests/tendermint/main.go b/tests/tendermint/main.go index 0d994d45eb..1213cc4c57 100644 --- a/tests/tendermint/main.go +++ b/tests/tendermint/main.go @@ -7,10 +7,10 @@ import ( "github.com/gorilla/websocket" "github.com/tendermint/basecoin/types" cmn "github.com/tendermint/tmlibs/common" - "github.com/tendermint/tendermint/rpc/client" - "github.com/tendermint/tendermint/rpc/types" + "github.com/tendermint/tendermint/rpc/lib/client" + "github.com/tendermint/tendermint/rpc/lib/types" wire "github.com/tendermint/go-wire" - _ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types + _ "github.com/tendermint/tendermint/rpc/core/types" // Register RPCResponse > Result types ) func main() {