11email: {bonnet,defago}@c.titech.ac.jp 22institutetext: ICUBE, University of Strasbourg, CNRS, France
22email: [email protected] (corresponding author)
Stateless Distributed Ledgers††thanks: This research is partly supported by Japan Science and Technology Agency (JST) OPERA Grant Number JY280149.
Abstract
In public distributed ledger technologies (DLTs), such as Blockchains, nodes can join and leave the network at any time. A major challenge occurs when a new node joining the network wants to retrieve the current state of the ledger. Indeed, that node may receive conflicting information from honest and Byzantine nodes, making it difficult to identify the current state.
In this paper, we are interested in protocols that are stateless, i.e., a new joining node should be able to retrieve the current state of the ledger just using a fixed amount of data that characterizes the ledger (such as the genesis block in Bitcoin).
We define three variants of stateless DLTs: weak, strong, and probabilistic. Then, we analyze this property for DLTs using different types of consensus.
Keywords:
Distributed Ledger Technology Blockchain Consensus.1 Introduction
Distributed Ledger Technologies (DLTs) are usually partitioned depending on the type of consensus used to order incoming transactions. Here, we consider the three most used classes of technologies: Byzantine agreement, Proof of Work, and Proof of Stake.
Byzantine agreement protocols [7] are used to maintain consistent states replicated over multiple servers. It can tolerate crash or Byzantine faults, up to a number that depends on the synchrony assumption of the communications. Such protocols are executed by known servers in a fixed network environment, a setting called permissioned. They can easily be used by nodes to maintain a ledger of transactions. Every insertion in the ledger is the result of a consensus among participating nodes.
Blockchains based on Proof of Work (PoW) are the first distributed ledger technologies that work in an environment where nodes can join and leave and any node can participate to the protocol. Nodes are elected randomly proportionally to their computational power, and an elected node can append transactions to the ledger. All current PoW Blockchains, including Bitcoin, work with synchronous communications, and assume correct nodes to have strictly more computational power than Byzantine nodes.
Blockchains based on Proof of Stake (PoS) are similar to the PoW based ones, but nodes are elected proportionally to the amount of tokens they own in the blockchain itself. In protocols based on PoS, a well-known concern is called long-range attacks [2], where a group of nodes create an alternative chain extending an old block. This is made possible because block generation is not computationally heavy, and if a node can extend a block at a given time, nothing prevents it from extending the same block in a different way at a later time. This attack becomes even worse when the nodes owning a majority of tokens at a previous time, do not have stake at the current time. Performing such attacks could be appealing as they have nothing to lose. This problem is known as posterior corruption [1].
Existing Proof of Stake based protocols such as SnowWhite [1], Algorand [4], Ouroboros [6], have identified such risks. The main solution proposed is to have some sort of checkpointing mechanism to avoid considering past majorities of stake holders. A variant of this attack is called stake-bleeding attacks [3]. It uses other mechanisms such as block rewards and transaction fees to allow even a past minority of stake holders to execute long-range attacks.
Contributions.
In this paper we aim at defining a general model to capture the main difference between various kind of Distributed Ledger Technologies (DLTs). Our model is abstract enough to be independent of the implementation and capture only the main mechanisms of the DLTs. Then, we focus on one property that we call the Stateless Property. We define this property in our general DLT model and show whether existing technologies satisfies it or not. In particular the fact that Proof of Stake based DLTs are not Stateless implies the existence of the long-range attack vulnerability.
We believe that our model could be use independently to capture other properties and compare technologies in an abstract way.
2 Model
We consider that time is discrete and at each time , represents the set of nodes in the network. We consider that communication is instantaneous and there is a communication link between any two nodes in the network at any given time. We also assume that each node is identified, and is able to securely sign messages.
A distributed ledger is a data structure with an “append” function. It is maintained by a set of processing nodes. The network receives events and the nodes react to the events according to the distributed ledger protocol. Each time the ledger is updated, a new time instant begins. Formally, a DLT is characterized by its initial state and a state transition function that takes a current state , the events , and the network containing all the nodes that are online at least once before the next “append”. Then returns a new state when the “append” function is called at time . A state can be seen as a sequence of “append” and we write when state is a prefix of state , i.e., can be obtained from by appending data. The state denotes the truncated state where the last occurrences of “append” of are omitted.
Given a DLT , a sequence of of networks and a sequence of events, we can construct the sequence of states in the following way and .
Stateless DLT.
When a new node joins the network, it obtains the current state from the other nodes in the network. Informally, we say a DLT is stateless if a new joining node is able to deduce what is the current state of the DLT from the information received from the current network and by knowing the initial state.
At a given time , each node has a local state . For a correct node, the local state is exactly the current state (communications are supposed instantaneous so all correct nodes agree on the current state at any time). For Byzantine nodes, the local state is constructed by an adversary. The set of pairs for all nodes in is denoted i.e., .
Definition 1 (Weakly Stateless DLT)
A DLT is weakly stateless if there exists a function such that .
Definition 2 (Strongly Stateless DLT)
A DLT is strongly stateless if there exists a function such that and, for any subset , or .
Definition 3 (Probabilistically Stateless DLT)
A DLT is probabilistically stateless if there exists a function such that , with , with probability greater than for some constant .
3 Examples of Stateless DLTs
3.0.1 Byzantine Agreement Protocols
It is well-known that, in a fixed network of known nodes where communication is synchronous, consensus is possible and can tolerate up to Byzantine nodes [7].
We denote by the transition function of a Byzantine agreement protocol among the nodes in . represents the fact that, at time , the nodes in perform a Byzantine agreement to order the transactions received in and update the state accordingly to obtain . In the Byzantine agreement protocol, we consider that the state contains the information about the set of nodes participating in the consensus protocol.
Interestingly, when a majority of nodes in are correct, any node outside can ask the nodes in for the current state. Then, the current state is the one received by a majority of nodes in , and is guaranteed to be correct. From this we deduce the following theorem:
Theorem 3.1
For a set of nodes and an initial state (which contains the information of ), if and at most nodes in are Byzantine, then the DLT is strongly stateless.
Proof
Assuming at most nodes are Byzantine, for any sequence and , all the correct nodes in agree on all the state for any .
The function returns the local state that appears in at least pairs associated with a node in . If no such state exists (if the set of local states is only a subset of ), returns . Formally, we have
if , and otherwise.
∎
3.0.2 Proof of Work Blockchains
In PoW Blockchains, there are no assumptions about the nodes in the network, except that at any time , in , the computational power of the correct nodes is strictly greater than the computational power of the Byzantine nodes. Then, the transition function applies an ordering on the transactions received in (decided by some node in the network) and appends the block of transactions to state resulting in . In addition, from state , one can compute the proof of work performed until time , denoted . So is the sum of and the proof of work corresponding to the last “append”. For the initial state , .
Theorem 3.2
For an initial state , if for all the computational power of correct nodes in is strictly greater than the computational power of Byzantine nodes in , then the DLT is probabilistically stateless.
Proof
Let be the function returning the local state that maximizes the Proof of Work, . Such a local state could have been generated by an adversary. If denotes the number of blocks we have to truncate to obtain a prefix of the correct state , then the probability decreases exponentially fast when tends to infinity. Indeed, let , resp. , be the computational power of the correct nodes, resp. of the adversary, at time . By assumption, . Let .
From [5] (Th.2), we deduce that, at a given time , the probability that an adversary rewrites the last blocks is in with . ∎
4 Impossibility of Stateless Proof of Stake Blockchains
In PoS Blockchains, the consensus at a given time is possible assuming the nodes owning a majority of the tokens are correct. So we can assume that the state transition function is performed by those correct nodes, owning a majority of the tokens, creating a new state from state and incoming events . However nothing prevents the nodes in to create an alternative state after time .
Theorem 4.1
Even if, at each time, all the nodes owning tokens are correct, the PoS DLT is not weakly stateless.
Proof
To simplify, assume that, at some time , all nodes in are owned by the adversary. Indeed, there is no assumption on the correctness of after time . Then, the adversary can simulate an execution of the DLT in a sequence of networks where each node in is owned by the adversary and such that there is a bijection mapping any nodes in to a malicious node , for all ( if is already malicious). Hence, the sequences of networks and differ only in the addresses that identify nodes. The adversary can execute the same DLT using the same sequence of events but in the malicious sequence of networks , which gives a different sequence of states .
At time , the adversary can connect all nodes to the network so that the set of local states is . The set is symmetric as half of the local states contain and the other half contain and both states differ only in the addresses used to identify nodes.
is a valid sequence of states if the sequence of networks was and if the adversary creates symmetrically the state using the sequence of networks . A function should answer in the first case and in the second case, with exactly the same input, which is a contradiction. ∎
One way to make the PoS DLT stateless is to assume that any set of nodes owning a majority of the token at a given time are correct at any time . This is a very strong assumption as for instance, it gives the same kind of trust in the initial set of nodes as in the Byzantine agreement protocol. Indeed, if the nodes in are still connected at time then, they act as a trusted committee. We could even remove the proof of stake entirely and only rely on standard Byzantine agreement between nodes in . In the case where nodes in go offline, they can select replacement nodes (using any method including election or simply one-to-one replacement), and include a signed message that define their choice in the state so that any joining node could identify the current set of trusted nodes. In future work, we plan to identify other sufficient conditions for the existence of Stateless DLTs.
References
- [1] Iddo Bentov, Rafael Pass, and Elaine Shi. Snow white: Provably secure proofs of stake. IACR Cryptology ePrint Archive, 2016(919), 2016.
- [2] Evangelos Deirmentzoglou, Georgios Papakyriakopoulos, and Constantinos Patsakis. A survey on long-range attacks for proof of stake protocols. IEEE Access, 7:28712–28725, 2019.
- [3] Peter Gaži, Aggelos Kiayias, and Alexander Russell. Stake-bleeding attacks on proof-of-stake blockchains. In 2018 Crypto Valley Conference on Blockchain Technology (CVCBT), pages 85–92. IEEE, 2018.
- [4] Yossi Gilad, Rotem Hemo, Silvio Micali, Georgios Vlachos, and Nickolai Zeldovich. Algorand: Scaling byzantine agreements for cryptocurrencies. In Proceedings of the 26th Symposium on Operating Systems Principles, pages 51–68, 2017.
- [5] Cyril Grunspan and Ricardo Pérez-Marco. Double spend races. International Journal of Theoretical and Applied Finance, 21(08):1850053, 2018.
- [6] Aggelos Kiayias, Alexander Russell, Bernardo David, and Roman Oliynykov. Ouroboros: A provably secure proof-of-stake blockchain protocol. In Annual International Cryptology Conference, pages 357–388. Springer, 2017.
- [7] Michel Raynal. Distributed algorithms for message-passing systems, volume 500. Springer, 2013.