From 6dde3205917a4a0e3b963cc5d63fda9f54d35569 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Fri, 17 Aug 2018 10:32:10 -0400 Subject: [PATCH] fixes from review --- docs/app-dev/abci-spec.md | 11 ++++++++--- types/protobuf.go | 8 -------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/app-dev/abci-spec.md b/docs/app-dev/abci-spec.md index 69b8620d..63570f7f 100644 --- a/docs/app-dev/abci-spec.md +++ b/docs/app-dev/abci-spec.md @@ -116,11 +116,16 @@ See below for more details on the message types and how they are used. - **Response**: - `ConsensusParams (ConsensusParams)`: Initial consensus-critical parameters. - - `Validators ([]ValidatorUpdate)`: Initial validator set. + - `Validators ([]ValidatorUpdate)`: Initial validator set (if non empty). - **Usage**: - Called once upon genesis. - - List of validators in the response will be used as the initial validator set - (regardless of what was sent in the request). + - If ResponseInitChain.Validators is empty, the initial validator set will be the RequestInitChain.Validators + - If ResponseInitChain.Validators is not empty, the initial validator set will be the + ResponseInitChain.Validators (regardless of what is in RequestInitChain.Validators). + - This allows the app to decide if it wants to accept the initial validator + set proposed by tendermint (ie. in the genesis file), or if it wants to use + a different one (perhaps computed based on some application specific + information in the genesis file). ### Query diff --git a/types/protobuf.go b/types/protobuf.go index 1363430b..30e74f15 100644 --- a/types/protobuf.go +++ b/types/protobuf.go @@ -209,14 +209,6 @@ func (pb2tm) ValidatorUpdates(vals []abci.ValidatorUpdate) ([]*Validator, error) if err != nil { return nil, err } - // If the app provided an address too, it must match. - // This is just a sanity check. - /*if len(v.Address) > 0 { - if !bytes.Equal(pub.Address(), v.Address) { - return nil, fmt.Errorf("Validator.Address (%X) does not match PubKey.Address (%X)", - v.Address, pub.Address()) - } - }*/ tmVals[i] = NewValidator(pub, v.Power) } return tmVals, nil