diff --git a/docs/app-dev/abci-spec.md b/docs/app-dev/abci-spec.md index 770740b86..69b8620dd 100644 --- a/docs/app-dev/abci-spec.md +++ b/docs/app-dev/abci-spec.md @@ -111,14 +111,16 @@ See below for more details on the message types and how they are used. - `Time (google.protobuf.Timestamp)`: Genesis time. - `ChainID (string)`: ID of the blockchain. - `ConsensusParams (ConsensusParams)`: Initial consensus-critical parameters. - - `Validators ([]Validator)`: Initial genesis validators. + - `Validators ([]ValidatorUpdate)`: Initial genesis validators. - `AppStateBytes ([]byte)`: Serialized initial application state. Amino-encoded JSON bytes. - **Response**: - `ConsensusParams (ConsensusParams)`: Initial consensus-critical parameters. - - `Validators ([]Validator)`: Initial validator set. + - `Validators ([]ValidatorUpdate)`: Initial validator set. - **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). ### Query @@ -161,9 +163,10 @@ See below for more details on the message types and how they are used. - `Hash ([]byte)`: The block's hash. This can be derived from the block header. - `Header (struct{})`: The block header. - - `LastCommitInfo (LastCommitInfo)`: Info about the last commit. + - `LastCommitInfo (LastCommitInfo)`: Info about the last commit, including the + round, and the list of validators and which ones signed the last block. - `ByzantineValidators ([]Evidence)`: List of evidence of - validators that acted maliciously + validators that acted maliciously. - **Response**: - `Tags ([]cmn.KVPair)`: Key-Value tags for filtering and indexing - **Usage**: @@ -237,7 +240,7 @@ See below for more details on the message types and how they are used. - **Request**: - `Height (int64)`: Height of the block just executed. - **Response**: - - `ValidatorUpdates ([]Validator)`: Changes to validator set (set + - `ValidatorUpdates ([]ValidatorUpdate)`: Changes to validator set (set voting power to 0 to remove). - `ConsensusParamUpdates (ConsensusParams)`: Changes to consensus-critical time, size, and other parameters. @@ -246,7 +249,6 @@ See below for more details on the message types and how they are used. - Signals the end of a block. - Called prior to each Commit, after all transactions. - Validator set and consensus params are updated with the result. - - Validator pubkeys are expected to be go-wire encoded. ### Commit @@ -271,12 +273,17 @@ See below for more details on the message types and how they are used. - `NumTxs (int32)`: Number of transactions in the block - `TotalTxs (int64)`: Total number of transactions in the blockchain until now - - `LastBlockHash ([]byte)`: Hash of the previous (parent) block + - `LastBlockID (BlockID)`: Hash of the previous (parent) block + - `LastCommitHash ([]byte)`: Hash of the previous block's commit - `ValidatorsHash ([]byte)`: Hash of the validator set for this block + - `NextValidatorsHash ([]byte)`: Hash of the validator set for the next block + - `ConsensusHash ([]byte)`: Hash of the consensus parameters for this block - `AppHash ([]byte)`: Data returned by the last call to `Commit` - typically the Merkle root of the application state after executing the previous block's transactions - - `Proposer (Validator)`: Original proposer for the block + - `LastResultsHash ([]byte)`: Hash of the ABCI results returned by the last block + - `EvidenceHash ([]byte)`: Hash of the evidence included in this block + - `ProposerAddress ([]byte)`: Original proposer for the block - **Usage**: - Provided in RequestBeginBlock - Provides important context about the current state of the blockchain - @@ -288,16 +295,27 @@ See below for more details on the message types and how they are used. - **Fields**: - `Address ([]byte)`: Address of the validator (hash of the public key) + - `Power (int64)`: Voting power of the validator +- **Usage**: + - Validator identified by address + - Used in RequestBeginBlock as part of VoteInfo + - Does not include PubKey to avoid sending potentially large quantum pubkeys + over the ABCI + +### ValidatorUpdate + +- **Fields**: - `PubKey (PubKey)`: Public key of the validator - `Power (int64)`: Voting power of the validator - **Usage**: - - Provides all identifying information about the validator + - Validator identified by PubKey + - Used to tell Tendermint to update the validator set -### SigningValidator +### VoteInfo - **Fields**: - `Validator (Validator)`: A validator - - `SignedLastBlock (bool)`: Indicated whether or not the validator signed + - `SignedLastBlock (bool)`: Indicates whether or not the validator signed the last block - **Usage**: - Indicates whether a validator signed the last block, allowing for rewards @@ -330,6 +348,6 @@ See below for more details on the message types and how they are used. ### LastCommitInfo - **Fields**: - - `CommitRound (int32)`: Commit round. - - `Validators ([]SigningValidator)`: List of validators in the current - validator set and whether or not they signed a vote. + - `Round (int32)`: Commit round. + - `Votes ([]VoteInfo)`: List of validators addresses in the last validator set + with their voting power and whether or not they signed a vote. diff --git a/docs/spec/software/abci.md b/docs/spec/software/abci.md index 093f3ac1c..4323d3948 100644 --- a/docs/spec/software/abci.md +++ b/docs/spec/software/abci.md @@ -52,14 +52,13 @@ objects in the `ResponseBeginBlock`: ``` message Validator { - bytes address = 1; - PubKey pub_key = 2; - int64 power = 3; + PubKey pub_key + int64 power } message PubKey { - string type = 1; - bytes data = 2; + string type + bytes data } ``` @@ -99,9 +98,6 @@ If the list is not empty, Tendermint will adopt it for the validator set. This way the application can determine the initial validator set for the blockchain. -Note that if addressses are included in the returned validators, they must match -the address of the public key. - ResponseInitChain also includes ConsensusParams, but these are presently ignored.