mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 22:01:20 +00:00
add warnings about new spec
This commit is contained in:
@ -1,14 +1,24 @@
|
|||||||
# Tendermint Specification
|
# Tendermint Specification
|
||||||
|
|
||||||
This is a markdown specification of the Tendermint blockchain.
|
This is a markdown specification of the Tendermint blockchain.
|
||||||
|
|
||||||
It defines the base data structures used in the blockchain and how they are validated.
|
It defines the base data structures used in the blockchain and how they are validated.
|
||||||
|
|
||||||
It contains the following components:
|
XXX: this spec is a work in progress and not yet complete - see github
|
||||||
|
[isses](https://github.com/tendermint/tendermint/issues) and
|
||||||
|
[pull requests](https://github.com/tendermint/tendermint/pulls)
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
If you find discrepancies between the spec and the code that
|
||||||
|
do not have an associated issue or pull request on github,
|
||||||
|
please submit them to our [bug bounty](https://tendermint.com/security)!
|
||||||
|
|
||||||
|
## Contents
|
||||||
|
|
||||||
|
- [Overview](#overview)
|
||||||
- [Encoding and Digests](encoding.md)
|
- [Encoding and Digests](encoding.md)
|
||||||
- [Blockchain](blockchain.md)
|
- [Blockchain](blockchain.md)
|
||||||
- [State](state.md)
|
- [State](state.md)
|
||||||
|
- [Consensus](consensus.md)
|
||||||
- [P2P](p2p/node.md)
|
- [P2P](p2p/node.md)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@ -56,3 +66,4 @@ We call this the `State`. Block verification also requires access to the previou
|
|||||||
- Light Client
|
- Light Client
|
||||||
- P2P
|
- P2P
|
||||||
- Reactor protocols (consensus, mempool, blockchain, pex)
|
- Reactor protocols (consensus, mempool, blockchain, pex)
|
||||||
|
|
||||||
|
@ -6,6 +6,9 @@ Tendermint aims to encode data structures in a manner similar to how the corresp
|
|||||||
Variable length items are length-prefixed.
|
Variable length items are length-prefixed.
|
||||||
While the encoding was inspired by Go, it is easily implemented in other languages as well given its intuitive design.
|
While the encoding was inspired by Go, it is easily implemented in other languages as well given its intuitive design.
|
||||||
|
|
||||||
|
XXX: This is changing to use real varints and 4-byte-prefixes.
|
||||||
|
See https://github.com/tendermint/go-wire/tree/sdk2.
|
||||||
|
|
||||||
### Fixed Length Integers
|
### Fixed Length Integers
|
||||||
|
|
||||||
Fixed length integers are encoded in Big-Endian using the specified number of bytes.
|
Fixed length integers are encoded in Big-Endian using the specified number of bytes.
|
||||||
@ -94,13 +97,13 @@ encode([]string{"abc", "efg"}) == [0x01, 0x02, 0x01, 0x03, 0x61, 0x62, 0x63, 0x
|
|||||||
```
|
```
|
||||||
|
|
||||||
### BitArray
|
### BitArray
|
||||||
BitArray is encoded as an `int` of the number of bits, and with an array of `uint64` to encode
|
BitArray is encoded as an `int` of the number of bits, and with an array of `uint64` to encode
|
||||||
value of each array element.
|
value of each array element.
|
||||||
|
|
||||||
```
|
```
|
||||||
type BitArray struct {
|
type BitArray struct {
|
||||||
Bits int
|
Bits int
|
||||||
Elems []uint64
|
Elems []uint64
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -192,8 +195,8 @@ MakeParts(object, partSize)
|
|||||||
|
|
||||||
```
|
```
|
||||||
type Part struct {
|
type Part struct {
|
||||||
Index int
|
Index int
|
||||||
Bytes byte[]
|
Bytes byte[]
|
||||||
Proof byte[]
|
Proof byte[]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user