-
Notifications
You must be signed in to change notification settings - Fork 1
Blockchain
Although the concept of a block chain was pioneered by Satoshi Nakomoto as part of the Bitcoin system, the term "blockchain" has since taken on a more general meaning in the field of computer science. Wikipedia summarizes a blockchain as "a distributed database that is used to maintain a continuously growing list of records, called blocks." However, a blockchain possesses a variety of useful characteristics. It will be instructive to attempt to formalize the definition of a "block chain" along with various related concepts.
A blockchain is a kind of "Distributed Ledger," a.k.a. Distributed Ledger Technology (DLT). A distributed ledger is "a consensus of replicated, shared and synchronized digital data geographically spread across multiple sites, countries and/or insitutions" according to blockchaintechnologies.com. A blockchain is to a distributed ledger as a square is to a rectangle. All blockchains are distributed ledgers, but not all distributed ledgers are blockchains.
A block is an abstract data type comprising at least:
- data in the form of merkle tree containing a group of valid transactions
- a reference to another block, called its predecessor or previous block
- a cryptographic nonce
A block header is a record containing metadata used to [validate a block], including at least:
- the root hash of the block's merkle tree
- the block hash of the previous block
- the block's nonce
A block hash is the hash of a block header.
Note: In theory, a block need not store the header data as a single subordinate structure, instead storing the metadata severally. In practice, however, this is often convenient or architecturally desirable.
A transaction is an atomic operation representing an exchange of resources among parties.
Note: The precise data involved in a transaction depends entirely on the resources being exchanged, the nature of the parties involves, and the economy within which the transactions take place. In Bitcoin, the resource exchanged is digital currency, but in general could be almost anything that can be encoded digitally.
An economy is the system of rules used to manage transactions, specifically dictating:
- cryptographic rules
- how transactions are grouped into blocks (e.g., by quantity, within some time interval, etc.)
- hash function(s) used to hash transaction data, block headers, etc.
- prescribed requirements for block hashes (e.g., Bitcoin imposes a ceiling on integer hashes)
- consensus rules
- how transactions are validated (e.g., proof-of-work, BFT, etc.)
- how trusted nodes are determined (for consortium and private blockchains)
- [TODO what other consensus rules may be needed?]
- domain-specific business logic
- incentive to participation (e.g., reward for mining a new block)
- [TODO identify practical examples]
A miner is a participant in an economy who "mines" a block by computing a nonce for the block in accordance with the rules of the economy.
The mining network for an economy comprises all miners participating in that economy.
An observer of the economy is a participant who can verify whether transactions have been accepted by the mining network, without fully checking the validity of each transaction. This concept is present in the Simple Payment Verification first described by Satoshi.
A proof is an element of a block that an observer can use, in conjunction with the block header to verify the block whose header was present. This proof is an indication of some amount of computational work, e.g. CPU cycles, that a miner performed in accordance with the rules of the economy. Examples include, but are not limited to: proof of work, proof of stake, and proof of space.
Note: Bitcoin uses proof of work. The nonce, in conjunction with the block header, is used to verify the block to which the header belongs. A valid nonce proves a miner performed a significant amount of computations, i.e. incrementing the nonce until finding a valid one.
Participants in an economy who disburse or receive resources through a given transaction are known as parties to the transaction, or simply interested parties.
A block chain is finite sequence of mined blocks representing a particular history of transactions received by a miner.
The blockchain of an economy is that particular block chain agreed by the miners according to the consensus mechanism of the economy
The following characteristics of a blockchain follow naturally from the preceding defintions:
- Blocks are accepted into a chain only if they adhere to the economy's cryptographic rules.
- Accepted blocks are added to the chain in LIFO order.
- Exactly one block, known as the genesis block, does not have a predecessor.
- there may be other unique properties of the genesis block, depending on the economy
- All blocks in the chain following the genesis block satisfy the following relations:
- a block contains the hash of the immediately preceding block
- the block hash adheres to the cryptographic rules of its economy
- [TODO are there other common, generally applicable characteristics of all block chains?]
A public blockchain allows anyone in the world to participate. Anyone can read and send transactions, as well as check if transactions are valid. Anyone can particiapte in the consensus process. Examples include: Bitcoin and Ethereum.
A consortium blockchain uses predetermined trusted nodes for the consensus process. Anyone else may participate by sending and reading transactions, but those set of trusted nodes are the only nodes allowed to forge consensus and validate transactions. A quasi-example is R3's Corda (termed Distributed Ledger Technology rather than Blockchain).
A fully private blockchain has "write permissions" bestowed by an organization or group of organizations. It is up to that organization to determine which 'outsiders' are allowed read access. An example is Ripple.
-
Nakomoto, Satoshi, "Bitcoin: A Peer-to-Peer Electronic Cash System", 2008.
-
Antonopoulos, A., Mastering Bitcoin, O'Reilly Media 2014.
-
"Bitcoin Developer Guide". Bitcoin.org. Last retrieved 2017-06-24.
-
"BitcoinWiki". Last retrieved 2017-06-24.
-
"Blockchain". Wikipedia.org. Last retrieved 2017-06-24.
-
"Blockchain at Berkeley: Workshop 1 - What is Blockchain?" (PDF). Last retrieved 2017-06-26.
-
"Blockchain Technology Explained". BlockchainTechnologies.com. Last retrieved 2017-06-26.
-
"BlockChain Technology: Beyond Bitcoin". Berkeley.edu. Last retrieved 2017-06-24.
-
"Cryptography and Protocols in Hyperledger Fabric" (PDF). Last retrieved 2017-06-24.
-
MIT/Blockchain. Last retrieved 2017-06-24.
-
TODO Add other references here, including to items in the docs folder of this repository!