docs: rst-ify the intro
This commit is contained in:
parent
dc54fc707e
commit
9d12e485e5
|
@ -1,9 +1,8 @@
|
|||
Introduction
|
||||
============
|
||||
|
||||
Welcome to the Tendermint guide! This is the best place to start if you're new
|
||||
to Tendermint. If you're already familiar with the basics of Tendermint and
|
||||
ABCI, find more details in the [documentation](/docs).
|
||||
Welcome to the Tendermint guide! This is the best place to start if you are new
|
||||
to Tendermint.
|
||||
|
||||
What is Tendermint?
|
||||
-------------------
|
||||
|
@ -32,7 +31,7 @@ or a quirky scripting language), developers can use Tendermint for BFT state mac
|
|||
whatever programming language and development environment is right for them.
|
||||
|
||||
Tendermint is designed to be easy-to-use, simple-to-understand, highly performant, and useful
|
||||
for a wide variety of distributed applications. [Get started with Tendermint](/download) today!
|
||||
for a wide variety of distributed applications.
|
||||
|
||||
Tendermint vs. X
|
||||
----------------
|
||||
|
@ -68,7 +67,7 @@ it focuses on arbitrary state machine replication, so developers can build the a
|
|||
that's right for them, from key-value store to cryptocurrency to e-voting platform and beyond.
|
||||
|
||||
The layout of this Tendermint website content is also ripped directly and without shame from
|
||||
[consul.io](https://www.consul.io/) and the other [Hashicorp sites](https://www.hashicorp.com/#tools).
|
||||
`consul.io <https://www.consul.io/>`__ and the other `Hashicorp sites <https://www.hashicorp.com/#tools>`__.
|
||||
|
||||
Bitcoin, Ethereum, etc.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -82,34 +81,35 @@ this is what made Tendermint a Proof-of-Stake algorithm.
|
|||
Since then, Tendermint has evolved to be a general purpose blockchain consensus engine that can host arbitrary application states.
|
||||
That means it can be used as a plug-and-play replacement for the consensus engines of other blockchain software.
|
||||
So one can take the current Ethereum code base, whether in Rust, or Go, or Haskell, and run it as a ABCI application
|
||||
using Tendermint consensus. Indeed, [we did that](https://github.com/tendermint/ethermint).
|
||||
using Tendermint consensus. Indeed, `we did that with Ethereum <https://github.com/tendermint/ethermint>`__.
|
||||
And we plan to do the same for Bitcoin, ZCash, and various other deterministic applications as well.
|
||||
|
||||
Another example of a cryptocurrency application built on Tendermint is [Cosmos](http://cosmos.network)
|
||||
Another example of a cryptocurrency application built on Tendermint is `the Cosmos network <http://cosmos.network>`__.
|
||||
|
||||
## Fabric, Burrow
|
||||
Fabric, Burrow
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
[Fabric](https://github.com/hyperledger/fabric), takes a similar approach to Tendermint, but is more opinionated about how the state is managed,
|
||||
`Fabric <https://github.com/hyperledger/fabric>`__, takes a similar approach to Tendermint, but is more opinionated about how the state is managed,
|
||||
and requires that all application behaviour runs in potentially many docker containers, modules it calls "chaincode".
|
||||
It uses an implementation of [PBFT](http://pmg.csail.mit.edu/papers/osdi99.pdf)
|
||||
It uses an implementation of `PBFT <http://pmg.csail.mit.edu/papers/osdi99.pdf>`__.
|
||||
from a team at IBM that is
|
||||
[augmented to handle potentially non-deterministic chaincode](https://www.zurich.ibm.com/~cca/papers/sieve.pdf)
|
||||
`augmented to handle potentially non-deterministic chaincode <https://www.zurich.ibm.com/~cca/papers/sieve.pdf>`__
|
||||
It is possible to implement this docker-based behaviour as a ABCI app in Tendermint,
|
||||
though extending Tendermint to handle non-determinism remains for future work.
|
||||
|
||||
[Burrow](https://github.com/hyperledger/burrow) is an implementation of the Ethereum Virtual Machine and Ethereum transaction mechanics,
|
||||
`Burrow <https://github.com/hyperledger/burrow>`__ is an implementation of the Ethereum Virtual Machine and Ethereum transaction mechanics,
|
||||
with additional features for a name-registry, permissions, and native contracts, and an alternative blockchain API.
|
||||
It uses Tendermint as its consensus engine, and provides a particular application state.
|
||||
|
||||
ABCI Overview
|
||||
-------------
|
||||
|
||||
The Application BlockChain Interface (ABCI) allows for Byzantine Fault Tolerant replication of applications written in any programming language.
|
||||
The `Application BlockChain Interface (ABCI) <https://github.com/tendermint/abci>`__ allows for Byzantine Fault Tolerant replication of applications written in any programming language.
|
||||
|
||||
Motivation
|
||||
~~~~~~~~~~
|
||||
|
||||
Thus far, all blockchains "stacks" (such as [Bitcoin](https://github.com/bitcoin/bitcoin)) have had a monolithic design. That is, each blockchain stack is a single program that handles all the concerns of a decentralized ledger; this includes P2P connectivity, the "mempool" broadcasting of transactions, consensus on the most recent block, account balances, Turing-complete contracts, user-level permissions, etc.
|
||||
Thus far, all blockchains "stacks" (such as `Bitcoin <https://github.com/bitcoin/bitcoin>`__) have had a monolithic design. That is, each blockchain stack is a single program that handles all the concerns of a decentralized ledger; this includes P2P connectivity, the "mempool" broadcasting of transactions, consensus on the most recent block, account balances, Turing-complete contracts, user-level permissions, etc.
|
||||
|
||||
Using a monolithic architecture is typically bad practice in computer science.
|
||||
It makes it difficult to reuse components of the code, and attempts to do so result in complex maintanence procedures for forks of the codebase.
|
||||
|
@ -125,8 +125,8 @@ Thus we have an interface, the Application BlockChain Interface (ABCI), and its
|
|||
Intro to ABCI
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
[Tendermint Core](https://github.com/tendermint/tendermint) (the "consensus engine") communicates with the application via a socket protocol that
|
||||
satisfies the [ABCI](https://github.com/tendermint/abci).
|
||||
`Tendermint Core <https://github.com/tendermint/tendermint>`__ (the "consensus engine") communicates with the application via a socket protocol that
|
||||
satisfies the `ABCI <https://github.com/tendermint/abci>`__.
|
||||
|
||||
To draw an analogy, lets talk about a well-known cryptocurrency, Bitcoin. Bitcoin is a cryptocurrency blockchain where each node maintains a fully audited Unspent Transaction Output (UTXO) database. If one wanted to create a Bitcoin-like system on top of ABCI, Tendermint Core would be responsible for
|
||||
|
||||
|
@ -144,7 +144,7 @@ Tendermint is able to decompose the blockchain design by offering a very simple
|
|||
|
||||
The ABCI consists of 3 primary message types that get delivered from the core to the application. The application replies with corresponding response messages.
|
||||
|
||||
The messages are specified here: [ABCI Message Types](https://github.com/tendermint/abci#message-types)
|
||||
The messages are specified here: `ABCI Message Types <https://github.com/tendermint/abci#message-types>`__.
|
||||
|
||||
The `DeliverTx` message is the work horse of the application. Each transaction in the blockchain is delivered with this message. The application needs to validate each transaction received with the `DeliverTx` message against the current state, application protocol, and the cryptographic credentials of the transaction. A validated transaction then needs to update the application state — by binding a value into a key values store, or by updating the UTXO database, for instance.
|
||||
|
||||
|
@ -169,7 +169,7 @@ Solidity on Ethereum is a great language of choice for blockchain applications b
|
|||
* race conditions on threads (or avoiding threads altogether)
|
||||
* the system clock
|
||||
* uninitialized memory (in unsafe programming languages like C or C++)
|
||||
* [floating point arithmetic](http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/)
|
||||
* `floating point arithmetic <http://gafferongames.com/networking-for-game-programmers/floating-point-determinism/>`__.
|
||||
* language features that are random (e.g. map iteration in Go)
|
||||
|
||||
While programmers can avoid non-determinism by being careful, it is also possible to create a special linter or static analyzer for each language to check for determinism. In the future we may work with partners to create such tools.
|
||||
|
@ -224,11 +224,9 @@ Validators can be forced, by logic in the application,
|
|||
to "bond" their currency holdings in a security deposit that can be destroyed if they're found to misbehave in the consensus protocol.
|
||||
This adds an economic element to the security of the protocol, allowing one to quantify the cost of violating the assumption that less than one-third of voting power is Byzantine.
|
||||
|
||||
The [Cosmos Network](http://cosmos.network) is designed to use this Proof-of-Stake mechanism across an array of cryptocurrencies implemented as ABCI applications.
|
||||
The `Cosmos Network <http://cosmos.network>`__ is designed to use this Proof-of-Stake mechanism across an array of cryptocurrencies implemented as ABCI applications.
|
||||
|
||||
|
||||
|
||||
|
||||
- Inspect the following diagram for [Tendermint in a (technical) nutshell](https://github.com/mobfoundry/hackatom/blob/master/tminfo.pdf)
|
||||
- View the following diagram for [Tendermint in a (technical) nutshell](https://github.com/mobfoundry/hackatom/blob/master/tminfo.pdf)
|
||||
|
||||
<img src="../assets/images/tm-transaction-flow.png">
|
||||
|
|
Loading…
Reference in New Issue