Harry Kalodner, Steven Goldfeder, Alishah Chator, Malte Möser · 5 authors
Analysis of blockchain data is useful for both scientific research and commercial applications. We present BlockSci, an open-source software platform for blockchain analysis. BlockSci is versatile in its support for different blockchains and analysis tasks. It incorporates an in-memory, analytical (rather than transactional) database, making it several hundred times faster than existing tools. We describe BlockSci's design and present four analyses that illustrate its capabilities. This is a working paper that accompanies the first public release of BlockSci, available at https://github.com/citp/BlockSci. We seek input from the community to further develop the software and explore other potential applications.
A blockchain is a public ledger for recording transactions, maintained by<br> many nodes without central authority through a distributed cryptographic<br> protocol. All nodes validate the information to be appended to the<br> blockchain, and a consensus protocol ensures that the nodes agree on a<br> unique order in which entries are appended. Consensus protocols for<br> tolerating Byzantine faults have received renewed attention because they<br> also address blockchain systems. However, amid the current hype around<br> blockchains, cryptocurrencies, fintech startups, and novel consensus<br> mechanisms, it is sometimes overlooked that assessing and gaining<br> confidence in the resilience of a protocol is a difficult task. We argue that developing consensus protocols is similar to engineering<br> cryptographic systems, and that blockchain developers should look towards<br> the established experience in cryptography and security with building<br> trustworthy systems. Otherwise, it might be dangerous to entrust<br> financial value to new protocols. Public discussion, expert reviews,<br> broad validation, and standards recommendations should be employed,<br> following the established practice in cryptography and security.<br>
Abstract—As data is having an increasingly relevant role<br> in dierent business fields, ensuring integrity has become<br> fundamental. Modern databases rely on transaction history<br> written on redo logs to allow for data restore. However, if<br> redo logs are (maliciously) forged, data can actually be lost or<br> altered. Due its strong data integrity guarantees, blockchain<br> technology can be employed to ensure log integrity, but its<br> current performance limitations hinder actual exploitations.<br> In previous work, we proposed a layered blockchain-based<br> architecture for distributed (federated) database redo logs: a<br> fast first layer blockchain, anchored to a secure second layer<br> blockchain, based on proof-of-work to achieve strong integrity.<br> Here, we present an implementation and an experimental<br> evaluation of a prototype of that architecture, which employs a<br> total consensus algorithm on the first layer blockchain. Finally,<br> to improve availability and scalability, we refine our solution<br> by investigating, respectively, a Byzantine Fault Tolerant consensus<br> and a Distributed Hash Table solution to shard the first<br> layer blockchain ledger among available nodes.
Mustafa Al-Bassam, Alberto Sonnino, Shehar Bano, Dave Hrycyszyn · 5 authors
Chainspace is a decentralized infrastructure, known as a distributed ledger, that supports user defined smart contracts and executes user-supplied transactions on their objects. The correct execution of smart contract transactions is verifiable by all. The system is scalable, by sharding state and the execution of transactions, and using S-BAC, a distributed commit protocol, to guarantee consistency. Chainspace is secure against subsets of nodes trying to compromise its integrity or availability properties through Byzantine Fault Tolerance (BFT), and extremely high-auditability, non-repudiation and `blockchain' techniques. Even when BFT fails, auditing mechanisms are in place to trace malicious participants. We present the design, rationale, and details of Chainspace; we argue through evaluating an implementation of the system about its scaling and other features; we illustrate a number of privacy-friendly smart contracts for smart metering, polling and banking and measure their performance.
Cloud computing has become an irreversible trend. Together comes the pressing need for verifiability, to assure the client the correctness of computation outsourced to the cloud. Existing verifiable computation techniques all have a high overhead, thus if being deployed in the clouds, would render cloud computing more expensive than the on-premises counterpart. To achieve verifiability at a reasonable cost, we leverage game theory and propose a smart contract based solution. In a nutshell, a client lets two clouds compute the same task, and uses smart contracts to stimulate tension, betrayal and distrust between the clouds, so that rational clouds will not collude and cheat. In the absence of collusion, verification of correctness can be done easily by crosschecking the results from the two clouds. We provide a formal analysis of the games induced by the contracts, and prove that the contracts will be effective under certain reasonable assumptions. By resorting to game theory and smart contracts, we are able to avoid heavy cryptographic protocols. The client only needs to pay two clouds to compute in the clear, and a small transaction fee to use the smart contracts. We also conducted a feasibility study that involves implementing the contracts in Solidity and running them on the official Ethereum network.
Almost all real world activities have been digitized and there are various client server architecture based systems in place to handle them. These are all based on trust on third parties. There is an active attempt to successfully implement blockchain based systems which ensures that the IT systems are immutable, double spending is avoided and cryptographic strength is provided to them. A successful implementation of blockchain as backbone of existing information technology systems is bound to eliminate various types of fraud and ensure quicker delivery of the item on trade. To adapt IT systems to blockchain architecture, an efficient consensus algorithm need to be designed. Blockchain based on proof of work first came up as the backbone of cryptocurrency. After this, several other methods with variety of interesting features have come up. In this paper, we conduct a survey on existing attempts to achieve consensus in block chain. A federated consensus method and a proof of validation method are being compared.
We’ve seen repeatedly that ideas in the research literature can be gradually forgotten or lie unappreciated, especially if they are ahead of their time, even in popular areas of research. Both practitioners and academics would do well to revisit old ideas to glean insights for present systems. Bitcoin was unusual and successful not because it was on the cutting edge of research on any of its components, but because it combined old ideas from many previously unrelated fields. This is not easy to do, as it requires bridging disparate terminology, assumptions, etc., but it is a valuable blueprint for innovation.
A developing field of interest for the distributed systems and applied cryptography community is that of smart contracts: self-executing financial instruments that synchronize their state, often through a blockchain. One such smart contract system that has seen widespread practical adoption is Ethereum, which has grown to secure approximately 30 billion USD of currency value and in excess of 300,000 daily transactions. \n \nUnfortunately, the rise of these technologies has been marred by a repeated series of security vulnerabilities and high pro file contract failures. To address these failures, the Ethereum community has turned to formal verification and program analysis which show great promise due to the computational simplicity and bounded-time execution inherent to smart contracts. Despite this, no fully formal, rigorous, comprehensive, and executable semantics of the EVM (Ethereum Virtual Machine) currently exists, leaving a lack of rigor on which to base such tools. \n \nIn this work, we present KEVM, the first fully executable formal semantics of the EVM, the bytecode language in which smart contracts are executed. We create this semantics in a framework for executable \nsemantics, the K framework. We show that our semantics not only passes the official 40,683-test stress test suite for EVM implementations, but also reveals ambiguities and potential sources of error in the existing \non-paper formalization of EVM semantics on which our work is based. \n These properties make KEVM an ideal formal reference implementation against which other implementations can be evaluated. \n \nWe proceed to argue for a semantics-first formal verification approach for EVM contracts, and demonstrate its practicality by using KEVM to verify practically important properties over the arithmetic operation of an \nexample smart contract and the correct operation of a token transfer function in a second contract. We show that our approach is feasible and not computationally restrictive. We hope that our work serves as the base for the development of a wide range of useful formally derived tools for Ethereum, including model checkers, certified compilers, and program equivalence checkers.
Bitcoin, a protocol for a new permissionless decentralized digital currency hailed the arrival of a new application domain for computer science. Following Bitcoin's arrival, a series of innovations derived from the state of the art in several fields has been applied to cryptocurrencies, and has been slowly reshaping monetary and financial instruments on public distributed ledgers. It was soon clear however that Bitcoin and similar cryptocurrencies still require additional improvements. This challenging domain presents researchers in the field with new and exciting questions. I provide examples from two main research threads, related to the scalability of the protocol and to its underlying incentives.
Blockchains such as Bitcoin and Ethereum execute payment transactions securely, but their performance is limited by the need for global consensus. Payment networks overcome this limitation through off-chain transactions. Instead of writing to the blockchain for each transaction, they only settle the final payment balances with the underlying blockchain. When executing off-chain transactions in current payment networks, parties must access the blockchain within bounded time to detect misbehaving parties that deviate from the protocol. This opens a window for attacks in which a malicious party can steal funds by deliberately delaying other parties' blockchain access and prevents parties from using payment networks when disconnected from the blockchain. We present Teechain, the first layer-two payment network that executes off-chain transactions asynchronously with respect to the underlying blockchain. To prevent parties from misbehaving, Teechain uses treasuries, protected by hardware trusted execution environments (TEEs), to establish off-chain payment channels between parties. Treasuries maintain collateral funds and can exchange transactions efficiently and securely, without interacting with the underlying blockchain. To mitigate against treasury failures and to avoid having to trust all TEEs, Teechain replicates the state of treasuries using committee chains, a new variant of chain replication with threshold secret sharing. Teechain achieves at least a 33x higher transaction throughput than the state-of-the-art Lightning payment network. A 30-machine Teechain deployment can handle over 1 million Bitcoin transactions per second.
Blockchains such as Bitcoin and Ethereum execute payment transactions securely, but their performance is limited by the need for global consensus. Payment networks overcome this limitation through off-chain transactions. Instead of writing to the blockchain for each transaction, they only settle the final payment balances with the underlying blockchain. When executing off-chain transactions in current payment networks, parties must access the blockchain within bounded time to detect misbehaving parties that deviate from the protocol. This opens a window for attacks in which a malicious party can steal funds by deliberately delaying other parties' blockchain access and prevents parties from using payment networks when disconnected from the blockchain. We present Teechain, the first layer-two payment network that executes off-chain transactions asynchronously with respect to the underlying blockchain. To prevent parties from misbehaving, Teechain uses treasuries, protected by hardware trusted execution environments (TEEs), to establish off-chain payment channels between parties. Treasuries maintain collateral funds and can exchange transactions efficiently and securely, without interacting with the underlying blockchain. To mitigate against treasury failures and to avoid having to trust all TEEs, Teechain replicates the state of treasuries using committee chains, a new variant of chain replication with threshold secret sharing. Teechain achieves at least a 33x higher transaction throughput than the state-of-the-art Lightning payment network. A 30-machine Teechain deployment can handle over 1 million Bitcoin transactions per second.
Blockchains such as Bitcoin and Ethereum execute payment transactions securely, but their performance is limited by the need for global consensus. Payment networks overcome this limitation through off-chain transactions. Instead of writing to the blockchain for each transaction, they only settle the final payment balances with the underlying blockchain. When executing off-chain transactions in current payment networks, parties must access the blockchain within bounded time to detect misbehaving parties that deviate from the protocol. This opens a window for attacks in which a malicious party can steal funds by deliberately delaying other parties' blockchain access and prevents parties from using payment networks when disconnected from the blockchain. We present Teechain, the first layer-two payment network that executes off-chain transactions asynchronously with respect to the underlying blockchain. To prevent parties from misbehaving, Teechain uses treasuries, protected by hardware trusted execution environments (TEEs), to establish off-chain payment channels between parties. Treasuries maintain collateral funds and can exchange transactions efficiently and securely, without interacting with the underlying blockchain. To mitigate against treasury failures and to avoid having to trust all TEEs, Teechain replicates the state of treasuries using committee chains, a new variant of chain replication with threshold secret sharing. Teechain achieves at least a 33x higher transaction throughput than the state-of-the-art Lightning payment network. A 30-machine Teechain deployment can handle over 1 million Bitcoin transactions per second.
A blockchain is a decentralized ledger where all transactions are recorded. For having a reliable blockchain and double-spending prevention, we need a decentralized consensus and agreement on a blockchain. Bitcoin uses proof-of-work (PoW). It is a cryptographic puzzle that is difficult to solve but easy to verify. However, because of significant latency of proof-of-work for transactions confirmation, this consensus mechanism is vulnerable against double-spending. On the other hand, PoW consumes a significant amount of energy that by growing the network, it becomes a major problematic of this consensus mechanism. In this paper, we introduce an alternative to PoW, because of all its major problems and security issues that may lead to collapsing decentralization of the blockchain, while a full decentralized system is the main purpose of using blockchain technology. The approach we introduce is based on a distributed voting process and called "RDV: Register, Deposit, Vote". Since in RDV algorithm, there is no mining process, so it is appropriate for low-level energy devices and Internet of Things (IoT).
Joshua Lind, Christian Priebe, Divya Muthukumaran, Dan O’Keeffe · 12 authors
Trusted execution support in modern CPUs, as offered by Intel SGX enclaves , can protect applications in untrusted environments. While prior work has shown that legacy applications can run in their entirety inside enclaves, this results in a large trusted computing base (TCB). Instead, we explore an approach in which we partition an applica- tion and use an enclave to protect only security-sensitive data and functions, thus obtaining a smaller TCB. We describe Glamdring , the first source-level parti- tioning framework that secures applications written in C using Intel SGX. A developer first annotates security- sensitive application data. Glamdring then automatically partitions the application into untrusted and enclave parts: (i) to preserve data confidentiality, Glamdring uses dataflow analysis to identify functions that may be ex- posed to sensitive data; (ii) for data integrity, it uses back- ward slicing to identify functions that may affect sensitive data. Glamdring then places security-sensitive functions inside the enclave, and adds runtime checks and crypto- graphic operations at the enclave boundary to protect it from attack. Our evaluation of Glamdring with the Mem- cached store, the LibreSSL library, and the Digital Bitbox bitcoin wallet shows that it achieves small TCB sizes and has acceptable performance overheads.
Abstract Blockchains are distributed data structures that are used to achieve consensus in systems for cryptocurrencies (like Bitcoin) or smart contracts (like Ethereum). Although blockchains gained a lot of popularity recently, there are only few logic-based models for blockchains available. We introduce $\mathsf{BCL}$, a dynamic logic to reason about blockchain updates, and show that $\mathsf{BCL}$ is sound and complete with respect to a simple blockchain model.
A blockchain is a distributed ledger for recording transactions, maintained by many nodes without central authority through a distributed cryptographic protocol. All nodes validate the information to be appended to the blockchain, and a consensus protocol ensures that the nodes agree on a unique order in which entries are appended. Consensus protocols for tolerating Byzantine faults have received renewed attention because they also address blockchain systems. This work discusses the process of assessing and gaining confidence in the resilience of a consensus protocols exposed to faults and adversarial nodes. We advocate to follow the established practice in cryptography and computer security, relying on public reviews, detailed models, and formal proofs; the designers of several practical systems appear to be unaware of this. Moreover, we review the consensus protocols in some prominent permissioned blockchain platforms with respect to their fault models and resilience against attacks. The protocol comparison covers Hyperledger Fabric, Tendermint, Symbiont, R3~Corda, Iroha, Kadena, Chain, Quorum, MultiChain, Sawtooth Lake, Ripple, Stellar, and IOTA.
Zhijie Ren, Kelong Cong, Johan Pouwelse, Zekeriya Erkin
Recently, the blockchain technique was put in the spotlight as it introduced a systematic approach for multiple parties to reach consensus without needing trust. However, the application of this technique in practice is severely restricted due to its limitations in throughput. In this paper, we propose a novel consensus model, namely the implicit consensus, with a distinctive blockchain-based distributed ledger in which each node holds its individual blockchain. In our system, the consensus is not on the transactions, but on a special type of blocks called Check Points that are used to validate individual transactions. Our system exploits the ideas of self-interest and spontaneous sharding and achieves unbounded throughput with the transaction reliability that equivalent to traditional Byzantine fault tolerance schemes.
Double spending and blockchain forks are two main issues that the Bitcoin crypto-system is confronted with. The former refers to an adversary's ability to use the very same coin more than once while the latter reflects the occurrence of transient inconsistencies in the history of the blockchain distributed data structure. We present a new approach to tackle these issues: it consists in adding some local synchronization constraints on Bitcoin's validation operations, and in making these constraints independent from the native blockchain protocol. Synchronization constraints are handled by nodes which are randomly and dynamically chosen in the Bitcoin system. We show that with such an approach, content of the blockchain is consistent with all validated transactions and blocks which guarantees the absence of both double-spending attacks and blockchain forks.
Distributed ledger technology, a method of storing and maintaining the integrity of multiple copies of critical data using a massively redundant network of participating machines, has found a “killer application” in blockchain, a type of distributed ledger. A blockchain consists of sequential blocks that may never be modified or reordered, leaving a public, auditable record that is consistent and highly resistant to tampering and deletion. These qualities make blockchain eminently suitable for its most common use, cryptocurrency, and its occasional variants in the form of cryptocurrency tokens, used to represent ownership or some other right to virtual or physical goods and capabilities. Blockchain also enables smart contracts, discrete bodies of software written to serve both as the memorial and the means of execution of an agreement between parties. Smart contracts can have all the elements of a traditional contract, and as jurisdictions legislate or jurists rule on the fine points of enforceability and the acceptability of smart contracts as traditional contracts, applications in nearly every area of commerce have emerged. Digital lawyers may not need to become software developers, but deepening their understanding of the capabilities and limitations of the technology, developing a keen awareness of the issues at the intersection between code and the law, as well as the law’s readiness in this area, will be of great advantage to them and their clients in this rapidly evolving area at the intersection of technology, commerce and law.
Andrew Miller, Iddo Bentov, Surya Bakshi, Ranjit Kumaresan · 5 authors
Bitcoin, Ethereum and other blockchain-based cryptocurrencies, as deployed today, cannot scale for wide-spread use. A leading approach for cryptocurrency scaling is a smart contract mechanism called a payment channel which enables two mutually distrustful parties to transact efficiently (and only requires a single transaction in the blockchain to set-up). Payment channels can be linked together to form a payment network, such that payments between any two parties can (usually) be routed through the network along a path that connects them. Crucially, both parties can transact without trusting hops along the route. In this paper, we propose a novel variant of payment channels, called Sprites, that reduces the worst-case "collateral cost" that each hop along the route may incur. The benefits of Sprites are two-fold. 1) In Lightning Network, a payment across a path of $\ell$ channels requires locking up collateral for $Θ(\ellΔ)$ time, where $Δ$ is the time to commit an on-chain transaction. Sprites reduces this cost to $O(\ell + Δ)$. 2) Unlike prior work, Sprites supports partial withdrawals and deposits, during which the channel can continue to operate without interruption. In evaluating Sprites we make several additional contributions. First, our simulation-based security model is the first formalism to model timing guarantees in payment channels. Our construction is also modular, making use of a generic abstraction from folklore, called the "state channel," which we are the first to formalize. We also provide a simulation framework for payment network protocols, which we use to confirm that the Sprites construction mitigates against throughput-reducing attacks.
Andrew Miller, Iddo Bentov, Ranjit Kumaresan, Christopher Cordi · 5 authors
Bitcoin, Ethereum and other blockchain-based cryptocurrencies, as deployed\ntoday, cannot scale for wide-spread use. A leading approach for cryptocurrency\nscaling is a smart contract mechanism called a payment channel which enables\ntwo mutually distrustful parties to transact efficiently (and only requires a\nsingle transaction in the blockchain to set-up). Payment channels can be linked\ntogether to form a payment network, such that payments between any two parties\ncan (usually) be routed through the network along a path that connects them.\nCrucially, both parties can transact without trusting hops along the route.\n In this paper, we propose a novel variant of payment channels, called\nSprites, that reduces the worst-case "collateral cost" that each hop along the\nroute may incur. The benefits of Sprites are two-fold. 1) In Lightning Network,\na payment across a path of $\\ell$ channels requires locking up collateral for\n$\\Theta(\\ell\\Delta)$ time, where $\\Delta$ is the time to commit an on-chain\ntransaction. Sprites reduces this cost to $O(\\ell + \\Delta)$. 2) Unlike prior\nwork, Sprites supports partial withdrawals and deposits, during which the\nchannel can continue to operate without interruption.\n In evaluating Sprites we make several additional contributions. First, our\nsimulation-based security model is the first formalism to model timing\nguarantees in payment channels. Our construction is also modular, making use of\na generic abstraction from folklore, called the "state channel," which we are\nthe first to formalize. We also provide a simulation framework for payment\nnetwork protocols, which we use to confirm that the Sprites construction\nmitigates against throughput-reducing attacks.\n
Thomas Dickerson, Paul Gazzillo, Maurice Herlihy, Eric Koskinen
Modern cryptocurrency systems, such as Ethereum, permit complex financial transactions through scripts called smart contracts. These smart contracts are executed many, many times, always without real concurrency. First, all smart contracts are serially executed by miners before appending them to the blockchain. Later, those contracts are serially re-executed by validators to verify that the smart contracts were executed correctly by miners. Serial execution limits system throughput and fails to exploit today's concurrent multicore and cluster architectures. Nevertheless, serial execution appears to be required: contracts share state, and contract programming languages have a serial semantics. This paper presents a novel way to permit miners and validators to execute smart contracts in parallel, based on techniques adapted from software transactional memory. Miners execute smart contracts speculatively in parallel, allowing non-conflicting contracts to proceed concurrently, and "discovering" a serializable concurrent schedule for a block's transactions, This schedule is captured and encoded as a deterministic fork-join program used by validators to re-execute the miner's parallel schedule deterministically but concurrently. Smart contract benchmarks run on a JVM with ScalaSTM show that a speedup of of 1.33x can be obtained for miners and 1.69x for validators with just three concurrent threads.
Tyler Crain, Vincent Gramoli, Mikel Larrea, Michel Raynal
This paper presents a new Byzantine consensus algorithm targeting consortium blockchains. To this end, it first revisits the consensus validity property by requiring that the decided value satisfies a predefined predicate, which does not systematically exclude a value proposed only by Byzantine processes, thereby generalizing the validity properties found in the literature. Then, the paper presents a simple and modular Byzantine consensus algorithm that relies neither on a leader, nor on signatures, nor on randomization. It features the fastest multivalued reduction to binary consensus we know of and a time optimal binary Byzantine consensus algorithm. The multivalued reduction runs multiple instances of binary consensus concurrently, which result in a bitmask that is then applied to a vector of multivalued proposals to filter out a valid proposed value that is decided. To ensure eventual decision deterministically, the underlying binary consensus algorithm assumes eventual synchrony.