Developer Guide - Bitcoin
BETA: This documentation has not been extensively reviewed by Bitcoin experts and so likely contains numerous errors. Please use the Issue and Edit links on the bottom left menu to help us improve. Click here to close this disclaimer. X The Developer Guide aims to provide the information you need to understandBitcoin and start building Bitcoin-based applications, but it is not aspecification . To make the best use ofthis documentation, you may want to install the current version of BitcoinCore, either from source or from a pre-compiled executable . Questions about Bitcoin development are best asked in one of the Bitcoin development communities .Errors or suggestions related todocumentation on Bitcoin.org can be submitted as an issue or posted to the bitcoin-documentation mailing list . In the following documentation, some strings have been shortened or wrapped: indicates extra data was removed, and lines ending in a single backslash \are continued below. If you hover your mouse over a paragraph, cross-referencelinks will be shown in blue. If you hover over a cross-reference link, a briefdefinition of the term will be displayed in a tooltip. The block chain provides Bitcoins public ledger, an ordered and timestamped recordof transactions. This system is used to protect against double spending and modification of previous transaction records. Each full node in the Bitcoin network independently stores a block chain containing only blocks validated by that node . When several nodes allhave the same blocks in their block chain , they are considered to be in consensus . The validation rules these nodes follow to maintain consensus are called consensusrules . This section describes many ofthe consensus rules used by Bitcoin Core. The illustration above shows a simplified ve Continue reading >>
How Does A Blockchain Prevent Spoofed Transactions?
How does a blockchain prevent spoofed transactions? Hi, simple question here. I understand bitcoin (etc.) uses signed messages to verify that a given account owns the funds it is sending to another public key. But what is it that prevents the blockchain from accepting or propagating a false transaction generated by (or with the assistance of) a corrupt miner? For example, let's say I made up a fake public key with a modified client, and submitted a bogus transaction, "1MickeyMouse34fg4... sending 10,000 BTC to 1YVEndj8D..." (where the latter is my real public key). Let's say I collude with a miner who mines the next block. (Maybe he's using modified mining software that doesn't check the validity of the senders' key.) What is it that makes it impossible for this transaction to make it into the blockchain? Or if placed in, what keeps it from being propagated and accepted? I know that in principle every satoshi should be traced back to a mined block through the records in the blockchain, but what is it that *forces* this to be true, against any attempt at hacking? Quote from: ebliever on June 05, 2015, 05:28:58 PM Hi, simple question here. I understand bitcoin (etc.) uses signed messages to verify that a given account owns the funds it is sending to another public key. But what is it that prevents the blockchain from accepting or propagating a false transaction generated by (or with the assistance of) a corrupt miner? For example, let's say I made up a fake public key with a modified client, and submitted a bogus transaction, "1MickeyMouse34fg4... sending 10,000 BTC to 1YVEndj8D..." (where the latter is my real public key). Let's say I collude with a miner who mines the next block. (Maybe he's using modified mining software that doesn't check the validity of the senders' Continue reading >>
8 Answers - Where Is The Blockchain Ledger Of Bitcoin Transactions Stored And How Is It Being Backed Up? - Quora
Where is the blockchain ledger of bitcoin transactions stored and how is it being backed up? The answer to this question is what basically makes blockchains so popular/revolutionary. The ledger i.e. blockchain is stored on every computer (node) that partakes in the network. As such there is no central hub that manages everything; it is a decentralized network that cannot be taken down at any specific point; it cannot be 'muted'. To partake in the network you could just download the Core ( Open source P2P money ) or a Bitcoin wallet. Thus the beauty of this system is that it is backed up by every single participant in the network. That is the point of blockchains, really; they record events and engrave them into digital, unerodable rock. Blockchain is stored on all the computers running Bitcoin node. There are thousands of computers running full node. Each of these node record every new transaction in the blockchain. All of these nodes run as backup for the blockchain. You can also run a Bitcoin node and backup it in your computer: Go to Start -> Run (or press WinKey+R) and run this: Bitcoin's data folder will open. For most users, this is the following locations: C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7) "AppData" and "Application data" are hidden by default. You can also store Bitcoin data files in any other drive or folder. By default Bitcoin will put its data here: You need to do a "ls -a" to see directories that start with a dot. If that's not it, you can do a search like this: find / -name wallet.dat -print 2>/dev/null By default Bitcoin will put its data here: Content Director For Cryptosomniac (Cryptocurrencies) #1 Cryptocurrency FaceBook Group: Log into Facebook | Facebook Continue reading >>
Please Explain Network Propagation With Unconfirmed Transactions (blockchain.info)
I am wondering if someone could explain why two transactions have different network propagation values... and what does it even mean considering they are both unconfirmed transactions.Do the transactions propagate through the nodes without being confirmed? Network propagation is the number of nodes (computers running a bitcoin client) that have heard about your transaction. Confirmations is how many blocks have included your transaction and how many blocks have linked onto that block. 1 confirmation means your transaction was included in a block, 2 confirmations means that another block linked onto that first one, and so on. Until a transaction has been included in a block, it isn't considered to have really happened, regardless of how many nodes have heard about it. Propagation needs to happen before a confirmation can occur, as a mining node needs to be aware of the transaction to include it in a block. As of this moment, both of your transactions you linked are now showing as having 1 confirmation after being included in block 228337. As for why it took so long to get a confirmation (468 minutes for the first one), no real idea. Might be something regarding some miners dislike for satshoidice. For example, the Eligius pool is configured to exclude any Satoshidice transactions from their block s, as they view them as spam. Continue reading >>
If We Lived In A Bitcoin Future, How Big Would The Blockchain Have Tobe?
If we lived in a Bitcoin future, how big would the blockchain have tobe? Lets imagine Bitcoin has accomplished the unthinkable its become the one true currency used for peer-to-peer payments around the world. In this Bitcoin Valhalla, lets imagine that all non-cash payments are conducted with Bitcoin. Instead of credit cards, people whip out their favourite Bitcoin hardware or mobile wallets in coffee shops and hair salons across the world. Just how many of these non-cash payments would there be in this perfect world? Today, non-cash payments account for approximately 522 billion transactions per year worldwide , and that number seems to be increasing in quadratic fashion, meaning itll be a lot bigger by the time we get to Bitcoin Valhalla. Theres no predicting when exactly well get there, so lets imagine that Bitcoin has taken over as the dominant currency today. Where we stand in terms of non-cash transactions across the world, source: worldpaymentsreport.com Now of course, Bitcoin has to make sure its system can accommodate the enormous number of transactions here without bottlenecking. So lets dive into the source code and flick the scalability switch that appeared to be there all along lets increase the size of the block enough to account for our 522 billion transactions. Lets do some napkin math to see just how big our new block is. 522 billion transactions a year translates to 1.4 billion transactions a day. This is equivalent to 9,722,220 transactions every 10 minutes, which coincides with how often blocks are published to the Bitcoin blockchain. Assuming transaction sizes stay around the same size, at 250 bytes , this means that every block would hold about 2.4 gigabytes of data. This transaction volume would generate about 350 gigabytes on the blockchain ever Continue reading >>
O(1) Block Propagation Github
Bitcoin miners want their newly-found blocks to propagate across the networkas quickly as possible, because every millisecond of delay increases thechances that another block, found at about the same time, wins the "block race." With today's p2p protocol, this gives miners an incentive to limit thenumber of transactions included in their blocks. A transaction must pay morefees to the miner than they are statistically likely to losedue to the increased chance of losing a block race, since new block announcementsinclude all of the data for all of the transactions in the block. This isinefficient (transaction data is transmitted across the network twice, usingtwice as much bandwidth) and artificially increases transaction fees to be muchhigher than they need to be. Each fully-validating node on the Bitcoin network maintains a transactionmemory pool, which is a list of valid but unconfirmed transactions.Transactions are added to nodes' memory pools as they are relayed acrossthe network, and are removed from memory pools when new blocks are found.Mining nodes select a subset of memory pool transactions to include in theirnew blocks. If memory pools were perfectly synchronized and all miners had exactly the samepolicy for choosing which transactions to include in their blocks and in whatorder to include them, then miners could just announce new blocks as the fixed80-byte block header and the coinbase transaction; there would be no need toinclude any transaction data at all, it could be reconstructed from theirpeers' memory pools. In the real world, memory pools are not perfectly synchronized. However,they tend to be very similar, and we can take advantage of that similarity tooptimize the amount of information that needs to be transmittedwhen a new block is found. Set reconc Continue reading >>
How Does The Blockchain Work?
The blockchain technology explained in simplewords The blockchain technology is probably the best invention since the internet itself. It allows value exchange without the need for trust or for a central authority. Imagine you and I bet $50 on tomorrows weather in San Francisco. I bet it will be sunny, you that it will rain. Today we have three options to manage this transaction: We can trust each other. Rainy or sunny, the losing one will give $50 to the winner. If we are friends, this could be a good way of managing it. However, friends or strangers, one can easily not pay the other. We can turn the bet into a contract. With a contract in place both parties will be more prone to pay, however, should any of the two decide not to pay, the winner will have to pay additional money to cover legal expenses and the verdict might take a long time. Especially for a small amount of cash, this doesnt seem the optimal way of managing the transaction. We can involve a neutral third party. Each of us gives $50 to a third party, she then will give the total amount to the winner. But hey, she could also run away with all our money. So we end up in one of the first two options: trust or contract. Both trust and contract arent optimal solutions: we cant trust strangers and enforcing a contract requires time and money. The blockchain technology is interesting because it offers us a third option which is secure, quick and cheap. Blockchain allows us to write a few lines of code, a program running on the blockchain, to which both of us send $50. This program will keep the $100 safe and check tomorrows weather automatically on several data sources. Sunny or rainy it will transfer automatically the whole amount to the winner. Each party can check the contract logic, and once its running on Continue reading >>
How Are Transactions Propagated Throughout The Bitcoin Network? : Bitcoin
Do not use URL shortening services: always submit the real link. Begging/asking for bitcoins is absolutely not allowed, no matter how badly you need the bitcoins. Only requests for donations to large, recognized charities are allowed, and only if there is good reason to believe that the person accepting bitcoins on behalf of the charity is trustworthy. News articles that do not contain the word "Bitcoin" are usually off-topic. This subreddit is not about general financial news. Submissions that are mostly about some other cryptocurrency belong elsewhere. For example, /r/CryptoCurrency is a good place to discuss all cryptocurrencies. Promotion of client software which attempts to alter the Bitcoin protocol without overwhelming consensus is not permitted. Trades should usually not be advertised here. For example, submissions like "Buying 100 BTC" or "Selling my computer for bitcoins" do not belong here. /r/Bitcoin is primarily for news and discussion. Please avoid repetition /r/bitcoin is a subreddit devoted to new information and discussion about Bitcoin and its ecosystem. New merchants are welcome to announce their services for Bitcoin, but after those have been announced they are no longer news and should not be re-posted. Aside from new merchant announcements, those interested in advertising to our audience should consider Reddit's self-serve advertising system . Do not post your Bitcoin address unless someone explicitly asks you to. Be aware that Twitter, etc. is full of impersonation. Continue reading >>
Bitcoin Transaction: How Does It Work?
In the previous article we had a quick introduction to the blockchain technology. In this article we are going to see whats happening behind a bitcoin transaction. Lets take a simple example: Robert and his friends went to the Bit&Beer pub where bitcoin payments are accepted. After the whole night of drinking and having fun its time to pay the bill! The waiter takes out a smartphone and shows the QR code to Robert for the payment of the bill. Robert takes out his smartphone as well, opens his bitcon app, scans the QR code, checks if the payment details are correct and presses the PAY button. The QR code is a kind of a bar code but more complex, it contains several types of information, like: the ewallet of the receiver (in our case Bit&Beer) general information (like the name of the receiver) When Robert presses the PAY button he creates a new transaction which contains the senders ewallet (Robert) and the receivers ewallet (Bit&Beer) details, the amount of bitcoins and a small fee. The fee however is not mandatory: the sender can decide whether or not to include the fee (transactions with a higher fee have a higher priority). The transaction is propagated in the bitcoin network (phase #1 of the scheme); the waiter of Bit&Beer can see Roberts payment on his phone almost instantly, the status however is NOT CONFIRMED. Who decides whether a transaction is valid or not? The transaction is considered valid when special nodes in the network (called Miner) will append this transaction into a block in the blockchain. This process is called Mining (phase #2 of the chart) and it has the following purposes: to validate the transaction (referring to consensus protocol) or to reject an invalid transaction. The process of Mining is the essential phase where the transactions are sto Continue reading >>
The Blockchain Immutability Myth
May 9, 2017 at 11:00 UTC|UpdatedMay 9, 2017 at 22:27 UTC Dr Gideon Greenspan is the founder and CEO of Coin Sciences, the company behind the MultiChain platform for private blockchains. In this opinion piece, Greenspan attacks the idea that true immutability can be achievedin blockchain systems, arguing a more relative definition of this featurebetter encapsulates what's the technology can achieve. "The highest good, than which there is no higher, is the blockchain, and consequently it is immutably good, hence truly eternal and truly immortal." -- Saint Augustine, De natura boni, i, 405 C.E. (with minor edits) If you ask someone well-informed about the characteristics of blockchains, the word 'immutable' will invariably appear in the response. In plain English, this word is used to denote something which can never be modified or changed. In a blockchain, it refers to the global log of transactions , which is created by a consensus between the chain's participants. The basic notion is this: once a blockchain transaction has received a sufficient level of validation, some cryptography ensures that it can never be replaced or reversed. This marks blockchains as different from regular files or databases, in which information can be edited and deleted at will. Or so the theory goes. In the raucous arena of blockchain debate, immutability has become a quasi-religious doctrine - a core belief that must not be shaken or questioned. And just like the doctrines in mainstream religions, members of opposing camps use immutability as a weapon of derision and ridicule. The past year has witnessed two prominent examples: For one, cryptocurrency advocates claim that immutability can only be achieved through decentralized economic mechanisms such as proof-of-work . From this perspectiv Continue reading >>
Blog | Tradeblock
The timely propagation of data within the bitcoin network is essential to the functioning of the ecosystem. Propagation speed can be measured by connecting to a large number of nodes in the network and collecting/storing data on a real-time basis. TradeBlock maintains an extensive bitcoin network data architecture with multiple nodes across geographies. With the ability to view and record every message broadcast to the network, including those that are not extensively relayed, unique insights regarding the network may be derived. The chart above shows the average block propagation speed in 2015. This is measured by tracking when each node on the bitcoin network relays the block data, and then calculating the time between the very first relay and all subsequent relays. In this piece we explore various aspects of data propagation within the network, how it could change with larger block sizes, and the impact on miner incentives and behavior. When two or more miners solve a block at similar times, the network is presented with two (or more) alternatives to serve as a reference when solving the next block. Since miners focus their hashing power on the chain with the most work, which generally means the longest chain by number of blocks,speed of propagation is vital during such situations. Generally speaking, the block with greater number of node relays has higher chances of winning the race when it is built on by the next found block. Moreover, the block that is rejected, known as orphan block, is not referenced by following blocks and the miner associated with that block does not receive the coinbase reward. The chart below shows the number of orphan blocks mined each day since mid-April. The average equates to 1.3 blocks per day, which translates to an orphan rate of rou Continue reading >>
An Introduction To Blockchain, Bitcoin, & Ethereum
Home / Insights / How Blockchain Works An Introduction to Blockchain, Bitcoin, & Ethereum How Blockchain Works An Introduction to Blockchain, Bitcoin, & Ethereum Blockchain is still an emerging technology, so it is hard to understand how itworks without looking into the code or getting deep into computer science concepts. To help with that, this introduction shouldget you started. A blockchain is distributed database, shared by all nodes in the blockchain network. In practical terms, this means that all nodes run on the same software, have a local copy of the whole database, and constantly talk to each other to propagate data and validate it. The Bitcoin blockchain is the most popular public blockchain network, with around 10K nodes (although these numbers vary wildly on a daily basis). Many cryptocurrencies are built on top of it, with the most popular being Bitcoin. As a comparison, the Ethereum blockchain has been growing to around 7K nodes. In its basic form, any user who wants to write to the blockchain needs a public address and a private key. Every transaction should be signed with the private key, which is used to encrypt the message. Every time you buy or sell Bitcoin, a record is added to the Bitcoin blockchain and propagated to every node in the network. The system is safe becausethe information is duplicated thousands of times throughout different systems. A hackerwould need to control 51% of the nodes to modify an existing record, which is considered unfeasible. The so-called miners run nodes and process transactions for the network (how they do that is quite involved), and when they do, they get Bitcoin in exchange for it. This process isslightly different in Ethereum: Whoever submits the transaction pays for it using Ether (gas for the transaction). Ethe Continue reading >>
Bitcoin Blockchain Dynamics: The Selfish-mine Strategy In The Presence Of Propagation Delay
Bitcoin Blockchain Dynamics: the Selfish-Mine Strategy in the Presence of Propagation Delay In the context of the selfish-mine strategy proposed by Eyal and Sirer, we study the effect of propagation delay on the evolution of the Bitcoin blockchain. First, we use a simplified Markov model that tracks the contrasting states of belief about the blockchain of a small pool of miners and the rest of the community to establish that the use of block-hiding strategies, such as selfish-mine, causes the rate of production of orphan blocks to increase. Then we use a spatial Poisson process model to study values of Eyal and Sirers parameter , which denotes the proportion of the honest community that mine on a previously-secret block released by the pool in response to the mining of a block by the honest community. Finally, we use discrete-event simulation to study the behaviour of a network of Bitcoin miners, a proportion of which is colluding in using the selfish-mine strategy, under the assumption that there is a propagation delay in the communication of information between miners. Continue reading >>
Bitcoin Blockchaindynamics: The Selfish-mine Strategy In The Presence Of Propagation Delay
Bitcoin blockchaindynamics: The selfish-mine strategy in the presence of propagation delay a Department of Informatics, University of Hamburg, 22527 Hamburg, Germany b Department of Mathematical Sciences, Stellenbosch University, 7600 Stellenbosch, South Africa c School of Mathematics and Statistics, University of Melbourne, Vic 3010, Australia Received 8 June 2015, Revised 12 July 2016, Accepted 13 July 2016, Available online 20 July 2016 In the context of the selfish-mine strategy proposed by Eyal and Sirer, we study the effect of communication delay on the evolution of the Bitcoin blockchain. First, we use a simplified Markov model that tracks the contrasting states of belief about the blockchainof a small pool of dishonest miners and the rest of the community to establish that the use of block-hiding strategies, such as selfish-mine, causes the rate of production of orphan blocks to increase. Then we use a spatial Poisson process model to study values of Eyal and Sirers parameter , which denotes the proportion of the honest community that mines on a previously-secret block released by the pool in response to the mining of a block by the honest community. Finally, we use discrete-event simulation to study the behaviour of a network of Bitcoin miners, a proportion of which is colluding in using the selfish-mine strategy, under the assumption that there is a delay in the communication of information between miners. The models indicate that both the dishonest and the honest miners were worse off than they would have been if no dishonest mining were present, and that it is possible for the mining community to detect block-hiding behaviour, such as that used in selfish-mine, by monitoring the rate of production of orphan blocks. 2016 Elsevier B.V. All rights reserved. Jo Continue reading >>
On Relay: How Different Bitcoin Developers Are Speeding Up The Network (part 1)
Bitcoin is designed as a peer-to-peer network, where nodes randomly connect to other nodes. Transactions and blocks are transmitted over this network by these nodes, until each has received all. This works quite well, as the distributed model makes Bitcoin relatively censorship-resistant; there is no central point of control to shut down or pressure into compliance. But it also has a significant downside: The peer-to-peer network is relatively slow. As such, miners (and pools) sometimes waste hash power mining on top of an old block while a newer block is finding its way through the network. Transmission delay, therefore, benefits pooled mining as well as geographic clustering of miners, incentivizing a more centralized mining topology. This is generally considered one of the bottlenecks for scalability, as larger blocks (which can include more transactions) propagate even more slowly. Over the past years, therefore, several projects have been in development to increase the speed of block propagation. These projects focus on roughly two main issues: block compression to limit the amount of data that needs to be propagated over the network, and relay speed to cut the time it takes for blocks to propagate. This two-part series provides an overview of these projects. Part 1 will cover block compression. Each Bitcoin block has a block header, which refers to all data in that block. A hash of this block header must be included in the subsequent block in order for that next block to be valid. That's how all blocks on the blockchain are chained. When a miner finds a block, it sends out the block header first quickly followed by the rest of the block. This header, as well as the rest of the block, is checked for validity by receiving nodes. If valid, miners will mine on top of Continue reading >>