Browse Source

spec: revert event hashing (#132)

pull/7804/head
Erik Grinaker 4 years ago
committed by GitHub
parent
commit
e96921822d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 11 deletions
  1. +2
    -5
      spec/abci/abci.md
  2. +3
    -6
      spec/core/data_structures.md

+ 2
- 5
spec/abci/abci.md View File

@ -506,7 +506,7 @@ via light client.
- `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
- `LastResultsHash ([]byte)`: Root hash of `BeginBlock` events, root hash of all results from the txs from the previous block, and `EndBlock` events
- `LastResultsHash ([]byte)`: Root hash of all results from the txs from the previous block.
- `EvidenceHash ([]byte)`: Hash of the evidence included in this block
- `ProposerAddress ([]byte)`: Original proposer for the block
- **Usage**:
@ -515,10 +515,7 @@ via light client.
especially height and time.
- Provides the proposer of the current block, for use in proposer-based
reward mechanisms.
- `LastResultsHash` is the root hash of a Merkle tree w/ 3 leafs:
proto-encoded `ResponseBeginBlock#Events`, root hash of a Merkle tree build
from `ResponseDeliverTx` responses (Log, Info and Codespace fields are
ignored), and proto-encoded `ResponseEndBlock#Events`.
- `LastResultsHash` is the root hash of a Merkle tree built from `ResponseDeliverTx` responses (`Log`, `Info`, `Codespace` and `Events` fields are ignored).
### Version


+ 3
- 6
spec/core/data_structures.md View File

@ -54,7 +54,7 @@ type Header struct {
NextValidatorsHash []byte // validators for the next block
ConsensusHash []byte // consensus params for current block
AppHash []byte // state after txs from the previous block
LastResultsHash []byte // root hash of BeginBlock events, root hash of all results from the txs from the previous block, and EndBlock events
LastResultsHash []byte // root hash of all results from the txs from the previous block
// consensus info
EvidenceHash []byte // evidence included in the block
@ -413,13 +413,10 @@ The first block has `block.Header.AppHash == []byte{}`.
### LastResultsHash
```go
block.LastResultsHash == MerkleRoot(ResponseBeginBlock.Events, MerkleRoot([]ResponseDeliverTx), ResponseEndBlock.Events)
block.LastResultsHash == MerkleRoot([]ResponseDeliverTx)
```
`LastResultsHash` is the root hash of a Merkle tree w/ 3 leafs: proto-encoded
`ResponseBeginBlock#Events`, root hash of a Merkle tree build from
`ResponseDeliverTx` responses (Log, Info and Codespace fields are ignored), and
proto-encoded `ResponseEndBlock#Events`.
`LastResultsHash` is the root hash of a Merkle tree built from `ResponseDeliverTx` responses (`Log`,`Info`, `Codespace` and `Events` fields are ignored).
The first block has `block.Header.ResultsHash == []byte{}`.


Loading…
Cancel
Save