In some of the previous posts, we did already hit upon the file chainparams.cpp in the source code of the bitcoin reference client. It is interesting to go through this and understand the meaning of the various parameters defined there. One of them should catch your attention: What does this parameter mean? It is in … Continue reading How the number of bitcoins is limited
Tag: Blockchain
Mining bitcoins with Python
In this post, we will learn to build a very simple miner in Python. Of course this miner will be comparatively slow and limited and only be useful in our test network, but it will hopefully help to explain the principles behind mining. When we want to mine a block, we first need some information … Continue reading Mining bitcoins with Python
The difficulty in the bitcoin protocol
Mining is a challenge - a miner has to solve a mathematical puzzle to create a valid block and is rewarded with a certain bitcoin amount (12.5 at the time of writing) for investing electricity and computing power. But technology evolves, and the whole mining process would be pointless if the challenge could not be … Continue reading The difficulty in the bitcoin protocol
Merkle trees
Suppose you are given a long file and wanted to use hashing to verify the integrity of the file. How would you do this in the most efficient way? Of course, the first thing that might come to your mind is to simply take a hash of the entire file. This is very easy, but … Continue reading Merkle trees
Understanding bitcoin blocks
In order to analyse a block, obviously the first thing that we need is - a block. Fortunately, this is not difficult. We can either use the block explorer hosted by blockchain.info to get the second block in the blockchain in raw or JSON or use curl to retrieve the block from the command line, … Continue reading Understanding bitcoin blocks
Bitcoin mining – an overview
In my recent posts in this series, I have walked you in detail through two of the basic objects that make up the bitcoin blockchain - participants, represented by public / private key pairs, and transactions. Time to look at the third major ingredient - blocks. What are blocks and why are they necessary? When … Continue reading Bitcoin mining – an overview
Creating and signing a bitcoin transaction from scratch
In the one of the the last posts in this series, we have been able to successfully verify an existing bitcoin transaction. With the understanding of how this works, we should now be able to conversely create a transaction from scratch, sign it and publish it in the bitcoin network. Given an amount that we … Continue reading Creating and signing a bitcoin transaction from scratch