diff --git a/glide.lock b/glide.lock index 37395bb4..b5209057 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: ff6e6786ec24ffac91df45d4a1cdcefae5280700667ca76b8b9b96f343d78c95 -updated: 2017-12-19T18:45:37.28268356Z +hash: bd982742a0aee39426f3866914a59f7c47e68dc8dedb87219e2099c0d9c19f7e +updated: 2017-12-21T17:45:25.372327218Z imports: - name: github.com/btcsuite/btcd version: 2e60448ffcc6bf78332d1fe590260095f554dd78 @@ -10,7 +10,7 @@ imports: - name: github.com/fsnotify/fsnotify version: 4da3e2cfbabc9f751898f250b49f2439785783a1 - name: github.com/go-kit/kit - version: e3b2152e0063c5f05efea89ecbe297852af2a92d + version: 953e747656a7bbb5e1f998608b460458958b70cc subpackages: - log - log/level @@ -68,7 +68,7 @@ imports: - name: github.com/mitchellh/mapstructure version: 06020f85339e21b2478f756a78e295255ffa4d6a - name: github.com/pelletier/go-toml - version: 4e9e0ee19b60b13eb79915933f44d8ed5f268bdd + version: b8b5e7696574464b2f9bf303a7b37781bb52889f - name: github.com/pkg/errors version: 645ef00459ed84a119197bfb8d8205042c6df63d - name: github.com/rcrowley/go-metrics @@ -88,7 +88,7 @@ imports: - name: github.com/spf13/viper version: 25b30aa063fc18e48662b86996252eabdcf2f0c7 - name: github.com/syndtr/goleveldb - version: adf24ef3f94bd13ec4163060b21a5678f22b429b + version: 34011bf325bce385408353a30b101fe5e923eb6e subpackages: - leveldb - leveldb/cache @@ -103,7 +103,7 @@ imports: - leveldb/table - leveldb/util - name: github.com/tendermint/abci - version: 66296fe11aaa518381c6cd7160bc6318e28c4e02 + version: e4b9f1abe794a2117a59738a1294e09b46d0fa00 subpackages: - client - example/code @@ -144,7 +144,7 @@ imports: - pubsub/query - test - name: golang.org/x/crypto - version: 94eea52f7b742c7cbe0b03b22f0c4c8631ece122 + version: d585fd2cc9195196078f516b69daff6744ef5e84 subpackages: - curve25519 - nacl/box @@ -155,7 +155,7 @@ imports: - ripemd160 - salsa20/salsa - name: golang.org/x/net - version: a8b9294777976932365dabb6640cf1468d95c70f + version: d866cfc389cec985d6fda2859936a575a55a3ab6 subpackages: - context - http2 @@ -165,18 +165,18 @@ imports: - lex/httplex - trace - name: golang.org/x/sys - version: 8b4580aae2a0dd0c231a45d3ccb8434ff533b840 + version: d818ba11af4465e00c1998bd3f8a55603b422290 subpackages: - unix - name: golang.org/x/text - version: 75cc3cad82b5f47d3fb229ddda8c5167da14f294 + version: eb22672bea55af56d225d4e35405f4d2e9f062a0 subpackages: - secure/bidirule - transform - unicode/bidi - unicode/norm - name: google.golang.org/genproto - version: 7f0da29060c682909f650ad8ed4e515bd74fa12a + version: a8101f21cf983e773d0c1133ebc5424792003214 subpackages: - googleapis/rpc/status - name: google.golang.org/grpc @@ -199,7 +199,7 @@ imports: - tap - transport - name: gopkg.in/go-playground/validator.v9 - version: 61caf9d3038e1af346dbf5c2e16f6678e1548364 + version: b1f51f36f1c98cc97f777d6fc9d4b05eaa0cabb5 - name: gopkg.in/yaml.v2 version: 287cf08546ab5e7e37d55a84f7ed3fd1db036de5 testImports: diff --git a/glide.yaml b/glide.yaml index 2b6593a1..3e699b37 100644 --- a/glide.yaml +++ b/glide.yaml @@ -18,7 +18,7 @@ import: - package: github.com/spf13/viper version: v1.0.0 - package: github.com/tendermint/abci - version: feature/enhance-endblock + version: develop subpackages: - client - example/dummy diff --git a/state/execution.go b/state/execution.go index 61806a3d..b2b98b83 100644 --- a/state/execution.go +++ b/state/execution.go @@ -111,11 +111,11 @@ func execBlockOnProxyApp(txEventPublisher types.TxEventPublisher, proxyAppConn p return nil, err } - valSetUpdates := abciResponses.EndBlock.ValidatorSetUpdates + valUpdates := abciResponses.EndBlock.ValidatorUpdates logger.Info("Executed block", "height", block.Height, "validTxs", validTxs, "invalidTxs", invalidTxs) - if len(valSetUpdates) > 0 { - logger.Info("Updates to validator set", "updates", abci.ValidatorsString(valSetUpdates)) + if len(valUpdates) > 0 { + logger.Info("Updates to validators", "updates", abci.ValidatorsString(valUpdates)) } return abciResponses, nil diff --git a/state/state.go b/state/state.go index 381a6301..df6e4437 100644 --- a/state/state.go +++ b/state/state.go @@ -241,8 +241,8 @@ func (s *State) SetBlockAndValidators(header *types.Header, blockPartsHeader typ nextValSet := prevValSet.Copy() // update the validator set with the latest abciResponses - if len(abciResponses.EndBlock.ValidatorSetUpdates) > 0 { - err := updateValidators(nextValSet, abciResponses.EndBlock.ValidatorSetUpdates) + if len(abciResponses.EndBlock.ValidatorUpdates) > 0 { + err := updateValidators(nextValSet, abciResponses.EndBlock.ValidatorUpdates) if err != nil { s.logger.Error("Error changing validator set", "err", err) // TODO: err or carry on? diff --git a/state/state_test.go b/state/state_test.go index 16b1b42f..80bb9341 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -80,7 +80,7 @@ func TestABCIResponsesSaveLoad(t *testing.T) { abciResponses := NewABCIResponses(block) abciResponses.DeliverTx[0] = &abci.ResponseDeliverTx{Data: []byte("foo"), Tags: []*abci.KVPair{}} abciResponses.DeliverTx[1] = &abci.ResponseDeliverTx{Data: []byte("bar"), Log: "ok", Tags: []*abci.KVPair{}} - abciResponses.EndBlock = &abci.ResponseEndBlock{ValidatorSetUpdates: []*abci.Validator{ + abciResponses.EndBlock = &abci.ResponseEndBlock{ValidatorUpdates: []*abci.Validator{ { PubKey: crypto.GenPrivKeyEd25519().PubKey().Bytes(), Power: 10, @@ -264,13 +264,13 @@ func makeHeaderPartsResponses(state *State, height int64, _, val := state.Validators.GetByIndex(0) abciResponses := &ABCIResponses{ Height: height, - EndBlock: &abci.ResponseEndBlock{ValidatorSetUpdates: []*abci.Validator{}}, + EndBlock: &abci.ResponseEndBlock{ValidatorUpdates: []*abci.Validator{}}, } // if the pubkey is new, remove the old and add the new if !bytes.Equal(pubkey.Bytes(), val.PubKey.Bytes()) { abciResponses.EndBlock = &abci.ResponseEndBlock{ - ValidatorSetUpdates: []*abci.Validator{ + ValidatorUpdates: []*abci.Validator{ {val.PubKey.Bytes(), 0}, {pubkey.Bytes(), 10}, }, diff --git a/types/protobuf.go b/types/protobuf.go index c97b5387..e97864fb 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -12,11 +12,11 @@ type tm2pb struct{} func (tm2pb) Header(header *Header) *types.Header { return &types.Header{ - ChainId: header.ChainID, + ChainID: header.ChainID, Height: header.Height, Time: header.Time.Unix(), NumTxs: int32(header.NumTxs), // XXX: overflow - LastBlockId: TM2PB.BlockID(header.LastBlockID), + LastBlockID: TM2PB.BlockID(header.LastBlockID), LastCommitHash: header.LastCommitHash, DataHash: header.DataHash, AppHash: header.AppHash,