A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> A new digital signature based only on a conventional encryption function (such as DES) is described which is as secure as the underlying encryption function -- the security does not depend on the difficulty of factoring and the high computational costs of modular arithmetic are avoided. The signature system can sign an unlimited number of messages, and the signature size increases logarithmically as a function of the number of messages signed. Signature size in a 'typical' system might range from a few hundred bytes to a few kilobytes, and generation of a signature might require a few hundred to a few thousand computations of the underlying conventional encryption function. <s> BIB001 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> The state machine approach is a general method for implementing fault-tolerant services in distributed systems. This paper reviews the approach and describes protocols for two different failure models—Byzantine and fail stop. Systems reconfiguration techniques for removing faulty components and integrating repaired components are also discussed. <s> BIB002 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> Our growing reliance on online services accessible on the Internet demands highly available systems that provide correct service without interruptions. Software bugs, operator mistakes, and malicious attacks are a major cause of service interruptions and they can cause arbitrary behavior, that is, Byzantine faults. This article describes a new replication algorithm, BFT, that can be used to build highly available systems that tolerate Byzantine faults. BFT can be used in practice to implement real services: it performs well, it is safe in asynchronous environments such as the Internet, it incorporates mechanisms to defend against Byzantine-faulty clients, and it recovers replicas proactively. The recovery mechanism allows the algorithm to tolerate any number of faults over the lifetime of the system provided fewer than 1/3 of the replicas become faulty within a small window of vulnerability. BFT has been implemented as a generic program library with a simple interface. We used the library to implement the first Byzantine-fault-tolerant NFS file system, BFS. The BFT library and BFS perform well because the library incorporates several important optimizations, the most important of which is the use of symmetric cryptography to authenticate messages. The performance results show that BFS performs 2p faster to 24p slower than production implementations of the NFS protocol that are not replicated. This supports our claim that the BFT library can be used to build practical systems that tolerate Byzantine faults. <s> BIB003 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> Bitcoin cryptocurrency demonstrated the utility of global consensus across thousands of nodes, changing the world of digital transactions forever. In the early days of Bitcoin, the performance of its probabilistic proof-of-work (PoW) based consensus fabric, also known as blockchain, was not a major issue. Bitcoin became a success story, despite its consensus latencies on the order of an hour and the theoretical peak throughput of only up to 7 transactions per second. <s> BIB004 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> Motivated by the recent explosion of interest around blockchains, we examine whether they make a good fit for the Internet of Things (IoT) sector. Blockchains allow us to have a distributed peer-to-peer network where non-trusting members can interact with each other without a trusted intermediary, in a verifiable manner. We review how this mechanism works and also look into smart contracts—scripts that reside on the blockchain that allow for the automation of multi-step processes. We then move into the IoT domain, and describe how a blockchain-IoT combination: 1) facilitates the sharing of services and resources leading to the creation of a marketplace of services between devices and 2) allows us to automate in a cryptographically verifiable manner several existing, time-consuming workflows. We also point out certain issues that should be considered before the deployment of a blockchain network in an IoT setting: from transactional privacy to the expected value of the digitized assets traded on the network. Wherever applicable, we identify solutions and workarounds. Our conclusion is that the blockchain-IoT combination is powerful and can cause significant transformations across several industries, paving the way for new business models and novel, distributed applications. <s> BIB005 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> We introduce a new class of protocols called Proofs of Work or Knowledge PoWorKs. In a PoWorK, a prover can convince a verifier that she has either performed work or that she possesses knowledge of a witness to a public statement without the verifier being able to distinguish which of the two has taken place. We formalize PoWorK in terms of three properties, completeness, f-soundness and indistinguishability where f is a function that determines the tightness of the proof of work aspect and present a construction that transforms 3-move HVZK protocols into 3-move public-coin PoWorKs. To formalize the work aspect in a PoWorKi¾?protocol we define cryptographic puzzles that adhere to certain uniformity conditions, which may also be of independent interest. We instantiate our puzzles in the random oracle RO model as well as via constructing "dense" versions of suitably hard one-way functions. ::: ::: We then showcase PoWorKi¾?protocols by presenting a number of applications. We first show how non-interactive PoWorKs can be used to reduce spam email by forcing users sending an e-mail to either prove to the mail server they are approved contacts of the recipient or to perform computational work. As opposed to previous approaches that applied proofs of work to this problem, our proposal of using PoWorKs is privacy-preserving as it hides the list of the receiver's approved contacts from the mail server. Our second application, shows how PoWorK can be used to compose cryptocurrencies that are based on proofs of work "Bitcoin-like" with cryptocurrencies that are based on knowledge relations these include cryptocurrencies that are based on "proof of stake", and others. The resulting PoWorK-based cryptocurrency inherits the robustness properties of the underlying two systems while PoWorK-indistinguishability ensures a uniform population of miners. Finally, we show that PoWorKi¾?protocols imply straight-line quasi-polynomial simulatable arguments of knowledge and based on our construction we obtain an efficient straight-line concurrent 3-move statistically quasi-polynomial simulatable argument of knowledge. <s> BIB006 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> Smart contracts are computer programs that can be correctly executed by a network of mutually distrusting nodes, without the need of an external trusted authority. Since smart contracts handle and transfer assets of considerable value, besides their correct execution it is also crucial that their implementation is secure against attacks which aim at stealing or tampering the assets. We study this problem in Ethereum, the most well-known and used framework for smart contracts so far. We analyse the security vulnerabilities of Ethereum smart contracts, providing a taxonomy of common programming pitfalls which may lead to vulnerabilities. We show a series of attacks which exploit these vulnerabilities, allowing an adversary to steal money or cause other damage. <s> BIB007 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> 5G Network Slice Broker concept aims to enable mobile virtual network operators, over-the-top providers, and industry vertical market players to request and lease resources from infrastructure providers dynamically according to needs. In the future digital factory, the leasing of resources could also happen autonomously by manufacturing equipment. This paper presents Blockchain Slice Leasing Ledger Concept and analysis of its applicability in the Factory of the Future. The novel concept utilizes 5G Network Slice Broker in a Blockchain to reduce service creation time and enable manufacturing equipment autonomously and dynamically acquire the slice needed for more efficient operations. <s> BIB008 </s> A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks <s> A. Overview of Blockchain Network Protocols <s> During the last years, researche'rs have proposed solutions to help smartphones improve execution time and reduce energy consumption by offloading heavy tasks to remote entities. Lately, inspired by the promising results of message forwarding in opportunistic networks, many researchers have proposed strategies for task offloading towards nearby mobile devices, giving birth to the Device-to-Device offloading paradigm. None of these strategies, though, offers any mechanism that considers selfish users and, most importantly, that motivates and defrays the participating devices who spend their resources. In this paper, we address these problems and propose the design of a framework that integrates an incentive scheme and a reputation mechanism. Our proposal follows the principles of the Hidden Market Design approach, which allows users to specify the amount of resources they are willing to sacrifice when participating in the offloading system. The underlying algorithm, that users are not aware of, is based on a truthful auction strategy and a peer-to-peer reputation exchange scheme. Extensive simulations on real traces depict how our designed mechanism achieves higher offloading rate and produces less traffic compared to three benchmark algorithms. Finally, we show how collaborating devices get rewarded for their contribution, while selfish ones get sidelined by others. <s> BIB009
The core task of a blockchain network is to ensure that the trustless nodes in the network reach the agreement upon a single tamper-proof record of transactions. The network is expected to tolerate a portion of the nodes deviating from this canonical record with their local views of data (i.e., replica). From the perspective of system design, a blockchain network can be abstracted into four implementation levels. These levels are the protocols of data and network organization, the protocols of distributed consensus, the framework of autonomous organization relying on smart contracts BIB005 executed in distributed VMs and the implementation of human-machine interfaces (i.e., application). Following the approach of protocol layer definition in the Open Systems Interconnection (OSI) model, we provide in Figure 1 an overview of these layers in blockchain networks and the related ingredient technologies. The data organization protocols provide a number of ingredient cryptographic functionalities BIB001 -  to establish unique and secured node identities in a blockchain network. The protocols also define the approaches to form the cryptographic dependence among all the records, e.g., transaction records and account balances, in a local blockchain replica for ordering and tamper proof. From the perspective of data representation, the term "blockchain" is named as such partly for historical reason. In early networks such as Bitcoin  , the digitally signed transactional records are arbitrarily "packed up" into a cryptographically tamper-evident data structure known as the "block". The blocks are then organized in a chronological order as a "chain of blocks", or more precisely, a linear list of blocks linked by tamper-evident hash pointers. Nevertheless, to improve the processing efficiency, network scalability and security, the linear data organization framework has been expanded into the nonlinear forms such as trees and graphs of blocks  ,  . As in linear blockchains, the partial orders are also determined by the chaining direction between blocks. Furthermore, block-less, nonlinear data structures are also adopted in recent protocol design  . Despite the different forms of block organization, cryptographic data representation provides the fundamental protection of privacy and data integrity for blockchain networks. When compared with conventional database, it also provides more efficient onchain storage without harming the data integrity. On the other hand, the network protocols provide the means of P2P network organization, namely, peer/route discovery and maintenance as well as encrypted data transmission/synchronization over P2P links. Given reliable data synchronization over P2P connections, the consensus layer provides the core functionality to maintain the originality, consistency and order of the blockchain data across the network. From the perspective of distributed system design, the consensus protocols provide Byzantine agreement BIB002 in blockchain networks. More specifically, the nodes in the network expect to agree on a common update, i.e., consensus, of the blockchain state that they copy as the local replicas even in the presence of possible conflicting inputs and arbitrary faulty (Byzantine) behaviors of some nodes. When choosing the permissoned access-control schemes of network functionalities, blockchain networks usually adopt the well-studied Byzantine Faulty-Tolerant (BFT) consensus protocols such as Practical BFT (PBFT) BIB003 for reaching the consensus among a small group of authenticated nodes (e.g., HyperLedger Fabric v0.5  ). On the contrary, in open-access/permissionless blockchain networks, probabilistic Byzantine agreement is achieved by combining a series of cryptographic techniques, e.g., cryptographic puzzle systems  , BIB006 , and incentive mechanism design. As pointed out in BIB004 , permissioned consensus protocols rely on a semi-centralized consensus framework and a higher messaging overhead to provide immediate consensus finality and thus high transaction processing throughput. In contrast, permissionless consensus protocols are more appropriate for a blockchain network with loose control on the synchronization and behaviors of the nodes, but may only guarantee probabilistic finality. In the condition of bounded delay and honest majority, permissionless consensus protocols provide significantly better support for network scalability at the cost of a lower processing efficiency. Provided that the robustness of the consensus protocols is guaranteed, smart contracts are deployed on the distributed virtual computer layer. In brief, this layer abstracts away the details of data organization, information propagation and consensus formation in blockchain networks. As the interoperation layer between the lower-layer protocols and the applications, the virtual computer layer defines the high-level programming language implementation (e.g., Solidity in Ethereum BIB007 ) for encoding smart contracts. It also provides the sandboxed runtime environment (e.g., Ethreum VMs) to ensure the correct execution of the replicated smart contracts on the network level. The virtual computer layer may adopt different levels of Turing-completeness for smart contract implementation, ranging from stateless circuits in Bitcoin  to fully Turingcomplete state machines in Ethereum [36] and HyperLedger Fabric  . Full Turing-completeness enables blockchain networks to perform general-purpose computation in a replicated manner. For this reason, a blockchain network is able to not only provide the services of trusted data recording and timestamping, but also facilitate the functionalities of generalpurpose autonomous organization. Therefore, blockchain networks are able to work as the backbone of autonomous organization systems for managing data or transaction-driven interactions among the decentralized entities in the network. On top of the virtual computer layer, the application layer provides the end-user-visible interfaces such as Distributed Applications (DApps) BIB009 , BIB008 and cryptocurrencies.