Content thumbnail A Self-Amending Crypto-Ledger Position Paper

2.2 Network Shell Tezos separates those three protocols. The transaction protocol and the con- sensus protocol are implemented in an isolated module plugged into a generic network shell responsible for maintaining the blockchain. In order for the protocol to remain generic, we define the following interface. Wewantour blockchain to represent the current “state” of the economy, which we call in Tezos the Context. This could include the balances of the various accounts and other informations such as the current block number. Blocks are seen as operators that transform an old state into a new state. In this respect, a protocol can be described by only two functions: - apply which takes a Context and a block and returns either a valid Con- text or an invalid result (should the block be invalid) - score which takes a Context and returns a score allowing us to compare various leafs of the blockchain to determine the canonical one. In Bitcoin, we would simply record the total difficulty or the chain inside the Context and return this value. Strikingly, these two functions alone can implement any blockchain based crypto-ledger. In addition, we attach those functions to the context itself and expose the following two functions to the protocol: - set test protocol which replaces the protocol used in the test-net with a new protocol (typically one that has been adopted through a stakeholder voter). - promote test protocol which replaces the current protocol with the protocol currently being tested These two procedures allow the protocol to validate its own replacement. While the seed protocol relies on a simple super-majority rule with a quorum, more complex rules can be adopted in the future. For instance, the stakeholders could vote to require certain properties to be respected by any future protocol. This could be achieved by integrating a proof checker within the protocol and requiring that every amendment include a proof of constitutionality. 3 Proof-of-Stake Tezos can implement any type of blockchain algorithm: proof-of-work, proof-of- stake, or even centralized. Due to the shortcomings of the proof-of-work mech- anism, the Tezos seed protocol implements a proof-of-stake system. There are considerable theoretical hurdles to designing a working proof-of-stake systems, 6 we will explain our way of dealing with them. 6Afull, technical, description of our proof-of-stake system is given in the Tezos white paper. 12

A Self-Amending Crypto-Ledger Position Paper - Page 14 A Self-Amending Crypto-Ledger Position Paper Page 13 Page 15