You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.0 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. # Tendermint Specification
  2. This is a markdown specification of the Tendermint blockchain.
  3. It defines the base data structures used in the blockchain and how they are validated.
  4. XXX: this spec is a work in progress and not yet complete - see github
  5. [isses](https://github.com/tendermint/tendermint/issues) and
  6. [pull requests](https://github.com/tendermint/tendermint/pulls)
  7. for more details.
  8. If you find discrepancies between the spec and the code that
  9. do not have an associated issue or pull request on github,
  10. please submit them to our [bug bounty](https://tendermint.com/security)!
  11. ## Contents
  12. - [Overview](#overview)
  13. - [Encoding and Digests](encoding.md)
  14. - [Blockchain](blockchain.md)
  15. - [State](state.md)
  16. - [Consensus](consensus.md)
  17. - [P2P](p2p/node.md)
  18. ## Overview
  19. Tendermint provides Byzantine Fault Tolerant State Machine Replication using
  20. hash-linked batches of transactions. Such transaction batches are called "blocks".
  21. Hence Tendermint defines a "blockchain".
  22. Each block in Tendermint has a unique index - its Height.
  23. A block at `Height == H` can only be committed *after* the
  24. block at `Height == H-1`.
  25. Each block is committed by a known set of weighted Validators.
  26. Membership and weighting within this set may change over time.
  27. Tendermint guarantees the safety and liveness of the blockchain
  28. so long as less than 1/3 of the total weight of the Validator set
  29. is malicious.
  30. A commit in Tendermint is a set of signed messages from more than 2/3 of
  31. the total weight of the current Validator set. Validators take turns proposing
  32. blocks and voting on them. Once enough votes are received, the block is considered
  33. committed. These votes are included in the *next* block as proof that the previous block
  34. was committed - they cannot be included in the current block, as that block has already been
  35. created.
  36. Once a block is committed, it can be executed against an application.
  37. The application returns results for each of the transactions in the block.
  38. The application can also return changes to be made to the validator set,
  39. as well as a cryptographic digest of its latest state.
  40. Tendermint is designed to enable efficient verification and authentication
  41. of the latest state of the blockchain. To achieve this, it embeds
  42. cryptographic commitments to certain information in the block "header".
  43. This information includes the contents of the block (eg. the transactions),
  44. the validator set committing the block, as well as the various results returned by the application.
  45. Note, however, that block execution only occurs *after* a block is committed.
  46. Thus, application results can only be included in the *next* block.
  47. Also note that information like the transaction results and the validator set are never
  48. directly included in the block - only their cryptographic digests (Merkle roots) are.
  49. Hence, verification of a block requires a separate data structure to store this information.
  50. We call this the `State`. Block verification also requires access to the previous block.
  51. ## TODO
  52. - Light Client
  53. - P2P
  54. - Reactor protocols (consensus, mempool, blockchain, pex)