Skip to content

Updates to Blocks and ABCI #338

@ebuchman

Description

@ebuchman
  • Add these fields to Block.Header:

    • TotalTxs int64 - total number of txs sent up until this block (ie TotalTxs(H) = TotalTxs(H-1) + NumTxs(H-1))
    • LastResultsHash []byte - merkle hash of the {code, data} of the previous block's tx results
    • EvidenceHash []byte - merkle hash of the evidence included in the Block.Data.
  • Add these fields to Block.Data:

    • Evidence []ProofOfMalice- list of proofs of double signing or lock violation
  • Save this structure with every block:

type BlockExtra struct {
  Proposal *Proposal
  TxResults Results
  ValidatorChanges []*tmsp.Validator
}

  • Add a new rpc call at /block_extra?block=X

  • Modify BeginBlock to take a VoteInfo type so the app can punish Byzantine validators and effect consequences when commits don't contain votes from all validators:

    • BeginBlock(hash []byte, header Header, voteInfo VoteInfo)
type VoteInfo struct {
      // list of addresses of validators in the block.Evidence
     ByzantineValidators [][]byte 
     
     // bit-array of validators who do not have a vote in the LastCommit
     AbsentValidators *BitArray   
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions