Skip to content

Commit

Permalink
docs: fix block.Header.Time description (tendermint#3529)
Browse files Browse the repository at this point in the history
It's not proposer local time anymore, but a weighted median

Fixes tendermint#3514
  • Loading branch information
melekes authored and Stumble committed Jul 25, 2019
1 parent 08f653a commit bb68831
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@

### BUG FIXES:
- [p2p] \#2716 Check if we're already connected to peer right before dialing it (@melekes)
- [docs] \#3514 Fix block.Header.Time description (@melekes)
6 changes: 4 additions & 2 deletions docs/spec/abci/abci.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,10 @@ Commit are included in the header of the next block.
- `Version (Version)`: Version of the blockchain and the application
- `ChainID (string)`: ID of the blockchain
- `Height (int64)`: Height of the block in the chain
- `Time (google.protobuf.Timestamp)`: Time of the block. It is the proposer's
local time when block was created.
- `Time (google.protobuf.Timestamp)`: Time of the previous block.
For heights > 1, it's the weighted median of the timestamps of the valid
votes in the block.LastCommit.
For height == 1, it's genesis time.
- `NumTxs (int32)`: Number of transactions in the block
- `TotalTxs (int64)`: Total number of transactions in the blockchain until
now
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/blockchain/blockchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ The height is an incrementing integer. The first block has `block.Header.Height
### Time
```
block.Header.Timestamp >= prevBlock.Header.Timestamp + 1 ms
block.Header.Timestamp >= prevBlock.Header.Timestamp + state.consensusParams.Block.TimeIotaMs
block.Header.Timestamp == MedianTime(block.LastCommit, state.LastValidators)
```
Expand Down

0 comments on commit bb68831

Please sign in to comment.