Pbft blockchain api


Tendermint is software for securely and consistently replicating an application on many machines. By consistently, we mean that every non-faulty machine sees the same transaction log and computes the same state.

Secure and consistent replication is a fundamental problem in distributed systems; it plays a critical role in the fault tolerance of a broad range of applications, from currencies, to elections, to infrastructure orchestration, and beyond.

The ability to tolerate machines failing in arbitrary ways, including becoming malicious, is known as Byzantine fault tolerance BFT. Blockchain technology is just a reformalization of BFT in a more modern setting, with emphasis on peer-to-peer networking and cryptographic authentication. The name derives from the way transactions pbft blockchain api batched in blocks, where each block contains a cryptographic hash of the previous one, forming a chain.

In practice, the blockchain data structure actually optimizes BFT design. Tendermint consists of two chief technical components: The consensus engine, called Tendermint Core, ensures that the same transactions are recorded on every machine in the same order.

Unlike other blockchain and consensus pbft blockchain api, which come pre-packaged with built in state machines like a fancy key-value store, or a quirky scripting languagedevelopers can use Tendermint for BFT state machine replication of applications written in 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. Tendermint is broadly similar to two classes of software.

The first class consists of distributed key-value stores, like Zookeeper, etcd, and consul, which use non-BFT consensus. Zookeeper, etcd, and consul are all implementations of a key-value store atop a classical, non-BFT consensus algorithm.

Zookeeper uses a version of Paxos called Zookeeper Atomic Broadcast, while etcd and consul use the Raft consensus algorithm, which is much younger and simpler. Each offering provides a slightly different implementation of a featureful key-value store, but all are generally focused around providing basic services to distributed systems, such as dynamic configuration, service discovery, locking, leader-election, and so on.

Tendermint pbft blockchain api in essence similar software, but with two key differences: The layout of this Tendermint website content is also ripped directly and without shame from pbft blockchain api.

Tendermint emerged in the tradition of cryptocurrencies like Bitcoin, Ethereum, etc. 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. Indeed, we did that with Ethereum. 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 the Cosmos network. It uses an implementation of PBFT. 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. 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 maintenance procedures for forks of the codebase.

Another problem with monolithic design is that it limits you to the language of the blockchain pbft blockchain api or vice versa. In the case of Ethereum which supports a Turing-complete bytecode virtual-machine, it limits you to languages that compile down to that bytecode; today, those are Serpent and Solidity.

In contrast, our approach is to decouple the consensus engine and P2P layers from the details of the application state of the particular blockchain application. We do this by abstracting away the details of the application to an interface, which is implemented as a socket protocol.

To draw an analogy, lets talk about a well-known cryptocurrency, Bitcoin. Tendermint is able to pbft blockchain api the blockchain design by offering a very simple API ie. 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: 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 pbft blockchain api with the DeliverTx message against the current state, application protocol, and the cryptographic pbft blockchain api 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.

For instance, an application may check an incrementing sequence number in the transaction and return an error upon CheckTx if the sequence number is old. Alternatively, they might use a capabilities based system that requires capabilities to be renewed with every transaction. The Commit message is used to compute pbft blockchain api cryptographic commitment to the current application state, to be placed into the next block header.

This has some handy properties. Inconsistencies in updating that state will now appear as blockchain forks which catches a whole class of programming errors. This also simplifies the development of secure lightweight clients, as Merkle-hash proofs can be verified by checking against the block hash, and that the block hash is signed pbft blockchain api a quorum.

There can be multiple ABCI socket connections to an application. Tendermint Core creates three ABCI connections to the application; one for the validation of transactions when broadcasting in the mempool, one for the consensus engine to run block proposals, and one more for querying the application state. The pbft blockchain api below illustrates the flow of messages via ABCI.

The logic for blockchain transaction processing must be deterministic. Solidity on Ethereum is a great language of choice for blockchain applications because, among other reasons, it is a completely deterministic programming language.

Game programmers and blockchain developers are already familiar with creating deterministic programs by avoiding sources of non-determinism such as:.

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. Tendermint is an easy-to-understand, mostly asynchronous, Pbft blockchain api consensus protocol. The protocol follows a simple state machine that looks like this:.

Participants in the protocol are called validators ; they take turns proposing blocks of transactions and voting on them. Blocks are pbft blockchain api in a chain, with one block at each height. A block may fail to be committed, in which case the protocol moves to the next roundand a new validator gets to propose a block for that height.

Two stages of voting are required to successfully commit a block; we call them pbft blockchain api and pre-commit. There is a picture of a couple doing the polka because validators are doing something like a polka dance. When more than two-thirds of the validators pre-vote for the same block, we call that a polka. Every pbft blockchain api must be justified by a polka in the same round.

Validators may fail to commit a block for a number of reasons; the current proposer may be offline, or the network may be slow. Tendermint allows them to establish that a validator should be skipped. Validators wait a small amount of time to receive a complete proposal block from the proposer before voting to move to the next round.

This reliance on a timeout is what makes Tendermint a weakly synchronous protocol, rather than an asynchronous one. However, pbft blockchain api rest of the protocol is asynchronous, and validators only make progress after hearing pbft blockchain api more than two-thirds of the validator set. A simplifying element of Tendermint is that it uses the same mechanism to commit a block as it does to skip to the next round.

Assuming less than one-third of the validators are Byzantine, Tendermint guarantees that safety will never be violated - that is, validators will never commit conflicting blocks at the same height. To do this it introduces a few locking rules which modulate which paths can be followed in the flow diagram.

Pbft blockchain api a validator precommits a pbft blockchain api, it is locked on that block. Thus, we are not so much interested in one-third or two-thirds of the validators, but in those proportions of the total voting power, which may not be uniformly distributed across individual validators. Since Tendermint can replicate arbitrary applications, it is possible to define a currency, and denominate the voting power in that currency.

When voting power is denominated in a native currency, the system is often referred to as Proof-of-Stake. This adds an economic element to the security of the protocol, allowing one to quantify the cost of violating the assumption that less pbft blockchain api one-third of voting power is Byzantine. The following diagram is Tendermint in a technical nutshell. See here for high resolution pbft blockchain api. Introduction What is Tendermint? Pbft blockchain api Software Zookeeper, etcd, consul Bitcoin, Ethereum, etc.

This is the best place to start if you are new to Tendermint. Game programmers and blockchain developers are already familiar with creating deterministic programs by pbft blockchain api sources of non-determinism such as: The protocol follows a simple state machine that looks like this: Read the Docs v:

Hyperledger Fabric is a platform for distributed ledger solutions pbft blockchain api by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility and scalability. It is designed to support pluggable implementations of different components and accommodate the complexity and intricacies that exist across the economic ecosystem.

Hyperledger Fabric delivers a uniquely elastic and extensible architecture, distinguishing it from alternative blockchain solutions. Planning for the future of enterprise blockchain requires building on top of a fully vetted, open-source pbft blockchain api Hyperledger Fabric is your starting point. We recommend first-time users begin by going through the rest of the introduction below in order to gain familiarity with how blockchains work and with the specific features and components of Hyperledger Fabric.

At the heart of a blockchain network is a distributed ledger that records all the transactions that take place on the network. A blockchain ledger is often described as decentralized because it is replicated across many network participants, each of pbft blockchain api collaborate in its maintenance. In addition to being decentralized and collaborative, the pbft blockchain api recorded to a blockchain is append-only, using cryptographic techniques that guarantee that once a transaction pbft blockchain api been added to the ledger it cannot be modified.

This property of immutability makes it simple to determine the provenance of information because participants can be sure information has not been changed after the fact.

To support the consistent update of information — and to enable pbft blockchain api whole host of ledger functions transacting, querying, etc — a blockchain network uses smart contracts to provide controlled access to the ledger. Smart contracts are not only a key mechanism for encapsulating information and keeping it simple across the network, they can also be written to allow participants to execute certain aspects of transactions automatically.

A smart contract can, for example, be written to stipulate the cost of shipping an item that changes depending on when it arrives. With the terms agreed to by both parties and written pbft blockchain api the ledger, the appropriate funds change hands automatically when the item is received.

The process of keeping the ledger transactions synchronized across the network — to ensure that ledgers update only when transactions are approved by the appropriate participants, and that when ledgers do update, they update with the same transactions in the same order — is called consensus. The transactional networks of today are little more than slightly updated versions of networks that have existed since business records have been kept. The members of a business network transact with each other, but they maintain separate records of their transactions.

Modern technology has taken this process from stone tablets and paper folders to hard drives and cloud platforms, but the underlying structure is the same. Unified systems for managing the pbft blockchain api of network participants do not exist, establishing provenance is so laborious it takes days to clear securities transactions the world volume of which is numbered in the many trillions of dollarscontracts must be signed and pbft blockchain api manually, and every database in the system contains unique information and therefore represents a single point of failure.

What if establishing the provenance of an asset could be determined by looking through a list of transactions that, once written, cannot be changed, and can therefore be trusted? This is a blockchain network, wherein every participant has their own replicated copy of the ledger.

In addition to ledger information pbft blockchain api shared, the processes which update the ledger are also shared. With the ability to coordinate their business network through a shared ledger, blockchain networks can reduce the time, cost, and risk associated with private information and processing while improving trust and visibility. There are a lot of other details that are important, but they all relate to these fundamental ideas of the sharing of information and processes.

The Linux Foundation founded Hyperledger in to advance cross-industry blockchain technologies. Rather than declaring a single blockchain standard, it encourages a collaborative approach to developing blockchain technologies via a community process, with pbft blockchain api property rights that encourage open pbft blockchain api and the adoption of key standards over time.

Hyperledger Fabric is one of the pbft blockchain api projects within Hyperledger. Like other blockchain technologies, it has a ledger, uses smart contracts, and is a system by which participants manage their transactions. Where Hyperledger Fabric breaks from some other blockchain systems is that it pbft blockchain api private and permissioned.

Rather than an open permissionless system that allows unknown identities to participate in the network requiring protocols like Proof of Work to validate transactions and secure the networkthe members of a Hyperledger Fabric network enroll through a trusted Membership Service Pbft blockchain api MSP. Hyperledger Fabric also offers several pluggable options. Ledger data can be stored in multiple formats, consensus mechanisms can be swapped in and out, and different MSPs are supported.

Hyperledger Fabric also offers the ability to create channelsallowing pbft blockchain api group of participants to create a separate ledger of transactions. If two participants form a channel, then those participants — and pbft blockchain api others — have copies of the ledger for that channel.

Hyperledger Fabric has a ledger subsystem comprising two components: Each participant has a copy of the ledger to every Hyperledger Fabric network they belong to. The world state component describes the state of the ledger at a given point in time. The ledger, then, is a combination of the world state database and the transaction log history. The ledger has a replaceable data store for pbft blockchain api world state. By default, this is a LevelDB key-value store database.

The transaction log pbft blockchain api not need to be pluggable. It simply records the before and after values of the ledger database being used by the blockchain network. Hyperledger Fabric smart contracts are written in chaincode and are invoked by an application external to the blockchain when that application needs to interact with the ledger. In most cases, chaincode interacts only with the database component of the ledger, the pbft blockchain api state querying it, for exampleand not the transaction log.

Chaincode can be implemented in several programming languages. The currently supported chaincode pbft blockchain api is Go with support for Java and other languages coming in future releases.

Depending on the needs of a network, participants in a Business-to-Business B2B network might be extremely sensitive about how much information they share. For other networks, privacy will not be a top concern. Hyperledger Fabric supports networks where privacy using channels is a key operational requirement as well as networks that are comparatively open. Transactions must be written to the ledger in the order in which they occur, even though they might be between different sets of participants within the network.

For this to happen, the order of transactions must be established and a method for rejecting bad transactions that have been inserted into the ledger in error or maliciously must be put into place. This pbft blockchain api a thoroughly researched area of computer science, and there are many ways to pbft blockchain api it, each with different trade-offs. For example, PBFT Practical Byzantine Fault Tolerance can provide a mechanism for file replicas to communicate with each other to keep each copy consistent, even in the event of corruption.

Alternatively, in Bitcoin, ordering happens through a process called mining where competing computers race to solve a cryptographic puzzle which defines the order that all processes subsequently build pbft blockchain api. Hyperledger Fabric has been designed to allow network starters to choose a consensus mechanism that best represents the relationships that exist between participants. As with privacy, there is a spectrum of needs; from networks that are highly structured in their relationships to those pbft blockchain api are more peer-to-peer.

We pbft blockchain api provide tutorials for those of you thinking of operating a blockchain network using Hyperledger Fabric. A deeper look at the components and concepts brought up in this introduction as pbft blockchain api as a few others and describes how they work together in a sample transaction flow. Why is a Blockchain useful?

What is Hyperledger Fabric? Where can I learn more? What is a Blockchain? Smart Contracts To support the consistent update of information — and to enable a whole host of ledger functions transacting, querying, etc — a blockchain network uses smart contracts to provide controlled access to the ledger. Consensus The process of keeping the ledger transactions synchronized across the network — to ensure that ledgers update only when transactions are approved by the appropriate participants, and that when ledgers do update, they update with the same transactions in the same order — is called consensus.

That business network would look more like this: Shared Ledger Hyperledger Fabric has a ledger subsystem comprising two components: Smart Contracts Hyperledger Fabric smart contracts are written in chaincode and are invoked by an application external to the blockchain when that application needs to interact with the ledger.

Privacy Depending on the needs of a network, participants in a Business-to-Business B2B network might be extremely sensitive about how much information they share. Consensus Transactions must be written to the ledger in the order in which they occur, even though they might be between different sets of participants within the network.

Hyperledger Fabric Model A deeper look at the components and concepts brought up in this introduction as well as a few others and describes how they work together in a sample transaction flow.

Read the Docs v: