Block Arrivals in the Bitcoin Blockchain

Block Arrivals in the Bitcoin Blockchain

Block arrivals in the Bitcoin blockchain R. Bowden∗, H.P. Keeler∗, A.E. Krzesinskiy and P.G. Taylor∗ ∗School of Mathematics and Statistics, University of Melbourne, Vic 3010, Australia Email: frhys.bowden,hkeeler,[email protected] yDepartment of Mathematical Sciences, Stellenbosch University, 7600 Stellenbosch, South Africa Email: [email protected] Abstract—Bitcoin is a electronic payment system where pay- to building a consensus about which transactions are included ment transactions are verified and stored in a data structure in the ledger must perform some computational “work”. This called the blockchain. Bitcoin miners work individually to solve work is referred to as Bitcoin mining. a computationally intensive problem, and with each solution a Bitcoin block is generated, resulting in a new arrival to Bitcoin users conduct transactions by cryptographically the blockchain. The difficulty of the computational problem signing messages, which identify who is to be debited, who is is updated every 2,016 blocks in order to control the rate at to be credited, and where the change (if any) is to be deposited. which blocks are generated. In the original Bitcoin paper, it These messages are then propagated through the Bitcoin was suggested that the blockchain arrivals occur according to a network before being added to the blockchain. Each node in homogeneous Poisson process. Based on blockchain block arrival data and stochastic analysis of the block arrival process, we the network keeps a list of valid outstanding transactions called demonstrate that this is not the case. We present a refined the transaction pool and passes it to neighbours in the network. mathematical model for block arrivals, focusing on both the Before a transaction can be included in the blockchain, a new block arrivals during a period of constant difficulty and how block containing that transaction must be mined. A block is the difficulty level evolves over time. a list of transactions, together with metadata including the I. INTRODUCTION current time and a reference to the most recent previous block in the blockchain (hence the name blockchain). A block Bitcoin is an electronic currency and payment system which also includes a field called a nonce. The nonce contains no allows for monetary transactions without a central authority. information, so it can be freely varied in an attempt to find a Bitcoin was first proposed in a white paper [1] in 2008 by valid block that satisfies the requirements of the blockchain. the pseudonymous Satoshi Nakamoto, and as a functioning To find such a block and publish it to the bitcoin network is open source software system in January 2009. Since then it referred to as mining a block. has grown rapidly and now has a market capitalisation of over US$160 billion. A. Bitcoin mining The stated benefits of Bitcoin relative to payment over Mining is a race between all the Bitcoin miners to find the Internet with traditional currencies include immutable a valid block to append to the blockchain. To have a good transactions, relative anonymity, freedom against seizure by chance of winning this race requires substantial computational a central authority, faster and cheaper international currency resources, and the reward for doing so is a bounty of (currently transfer, among others. The technology used in Bitcoin also 12.5) new bitcoins. has potential to be applied to a wider range of applications The requirements for a block to be valid are based on including identity management, distributed certification and Bitcoin’s hash function. In general, a hash function f maps a smart contracts. string s (or equivalently, an integer, if the binary representation Bitcoin employs a peer-to-peer network of nodes, computers arXiv:1801.07447v1 [cs.CR] 23 Jan 2018 of the string is interpreted as an integer in base 2) to another which verify, propagate and store information about bitcoin string (integer) f(s), the hash of s. The key property of transactions. Bitcoin maintains a global ledger of all Bitcoin the hash functions used in Bitcoin is that given any y in transactions ever conducted – the Bitcoin blockchain – dis- the codomain of f it is computationally infeasible to find tributed over the network of BitcoinDRAFT nodes. The problems of any element of f −1(y). Furthermore, the hash functions are maintaining and updating a global ledger without a trusted designed such that any change in the input string s results central authority, while still allowing any owner of bitcoins in a totally different output f(s). That is, f(s1) gives no to spend them as they wish are solved by a series of crypto- information about f(s2) if s1 6= s2, and so to calculate hashes graphic techniques. The technique of central interest for this for a large number of input strings requires calculating each paper is proof-of-work, whereby those who wish to contribute hash separately. This property allows hashes to act as short, The work of Anthony Krzesinski is supported by Telkom SA Limited. tamper-proof summaries of large data files. Calculating the The work of Peter Taylor is supported by the Australian Research Council hashes of large numbers of arguments s is the computational Laureate Fellowship FL130100039 and the ARC Centre of Excellence for work in Bitcoin’s proof-of-work. Mathematical and Statistical Frontiers (ACEMS). A Merkle tree is used to summarise and verify the integrity between adjustments of the target a segment. Let the target in th of the transactions in a block.The Merkle tree is constructed the i segment (X2016(i−1);X2016i) be Li. Then by recursively hashing pairs of transactions until there is only L = L (X − X )=1209600 (1) one hash, called the Merkle root. The block header is formed i+1 i 2016i 2016(i−1) 224 from the Merkle root, metadata (including the hash of the where L0 = 2 . If X2016i − X2016(i−1) is shorter than two previous block) and the nonce. For a block to be valid the weeks, the target L is reduced proportionally, and the average hash of the block header must be less than a certain value L, number of hashes checked to mine a block is increased, referred to as the target. The hash of the candidate block is slowing down mining. A common variable used instead of calculated. In the rare case that the hash is less than the current the target is the difficulty D defined as target L, the block is valid and is appended to the miner’s 2224 1209600 blockchain: the block is said to have been mined. In the far Di = = Di−1 (2) more likely case that the hash is not less than the current Li (X2016i − X2016(i−1) 32 target, the nonce is changed and the hash is recomputed. This so that D0 = 1. The difficulty D is 2 times the average process is repeated (occasionally updating metadata or the list number of hashes required to mine a block (see Equation (22)), of transactions) until some miner finds and publishes a block. and denotes how much harder it is to mine a block than When a block is mined it is broadcast to all the other miners with the original (maximum) target. This difficulty adjustment who append the new block to their blockchains and resume is part of what makes the block arrival process for Bitcoin mining “on top of” the new block. interesting: the adjustment is a change in the block arrival + 256 Bitcoin’s hash function maps Z [ f0g to f0; 1;:::; 2 − rate based on the random block arrival process itself, and the 1g. The computational difficulty in mining arises because adjustment also occurs at a random time. Bitcoin hashes are effectively uniformly distributed in the interval (0; 2256 − 1) while the target L is much much less C. Related work than 2256. Consequently, the checking of a candidate block Nakamoto [1] did not explicitly state that the blocks arrive is a Bernoulli trial with a probability of L=2256 of being according to a homogeneous Poisson process. However, the successful. By design, this probability is at most 2−32. The calculations in [1] are based on the assumption that the number trials are functionally independent, therefore the number of of blocks that an attacker, mining at rate λ1, mines in the hashes that need to be checked before a valid block is found is expected time z/λ2 that it takes for the community to mine 256 a geometric random variable, with a very large mean, 2 =L z blocks at rate λ2, is Poisson with parameter λ1z/λ2, which (≈ 6:2 × 1021 at the time of writing). On the other hand, is essentially equivalent to a Poisson process assumption. computers around the world are currently performing hash Rosenfeld [3] pointed out that, under the assumption that function calculations at a very large rate (≈ 1019 hashes per blocks arrive in a Poisson process, the number of blocks second at the time of writing). The time taken to mine a block created by an attacker in the time that it takes the community is therefore very well-modelled by an exponential random to create a fixed number of blocks is a random variable with variable. Furthermore, over any time interval where we can a negative binomial distribution; see also [4, Section 1.4] take the rate of trials to be constant, the process whose events Rosenfeld also assumed that the block arrival process is a are given by the instants at which blocks are mined should be Poisson process in [5] where he analysed reward structures for well-approximated by a Poisson process, with a rate given by pooled Bitcoin mining with a view to reducing the variance in the product of the number of hashes H calculated per second miner rewards while retaining fairness and preventing miners globally (the global hash rate), the value L of the target, and from being incentivised to hop between pools.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    23 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us