Skip to content

Summary of Header Changes #952

@ebuchman

Description

@ebuchman

This summarizes the following issues:

We want to make the following changes:

Tx Results

  • add LastResultsHash data.Bytes to the header
  • It should be the merkle root of the {code, data} of the results from the previous block.
  • add extra methods to the BlockStore for storing all the results for a given block.
  • Then, to prove a result, we can make one call to the blockstore to load the BlockResults and easily compute the merkle proof
  • Expose modifications to RPC to make it easy for users to see which transactions in a block were invalid

Note this means the invalid txs are not accessible directly in the header, they need to be queried from the RPC, but the result of the query is verifiable using the merkle root in the header

Consensus Params

Note this functions similar to the validator set itself: the hash is always in the header, but the contents are only stored in the State, and changes are propagated via ResponseEndBlock

TotalTx

  • add TotalTx int64 to the header. This is the total number of txs in the blockchain

It's a useful thing to easily be able to know how many transactions have been sent and also provides every transaction a global integer index

Versioning

  • add TendermintVersion string to the header - contains the Tendermint version
  • add AppVersion string to the header - contains the App version
  • when serializing a block, prefix the go-wire encoding with a version byte. This byte can later be used to determine which data structure we should be deserializing into

Evidence

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions