Your download will begin in 3 seconds.



How do Bitcoin Transactions Work?


There are three main variables in any bitcoin transaction: an amount, an input and an output. An input is the address from which money is sent, and an output is the address that receives money. Since a wallet can have multiple input addresses, you can send money from one or more inputs to one or more outputs. There is also a data storage part on each transaction, a type of note, which allows you to unambiguously record data on the blockchain.


But the unique thing about bitcoin transactions is that, if you consider a transaction worth less than the total amount in your input, you make your change back to your original output, but not to a new third address under your control. Will get through This means that your wallet is usually containing multiple addresses, and you can draw money from these addresses to make future transactions.


You learned to buy and store your bitcoins, so you already know what public and private keys are, and you need these to issue transactions. To do this, you insert your private key, the amount of bitcoin you send and the output address into the bitcoin software on your computer or smartphone.


The program then generates a signature made from your private key that declares the network for verification to this transaction. The network needs to confirm that you are the owner of transferring bitcoins and you discussed this by examining all previous transactions that are public on the ledger. Once the bitcoin program verifies that your private key actually matches the provided public key (without knowing what your private key is), your transaction is confirmed.


This transaction is now included in a "block" that is linked to the previous block to be added to the blockchain. Each transaction in the blockchain is associated with a specific identifier called a transaction hash (txid), which looks like a 64-character string of random letters and numbers. You can track a particular transaction by typing this txid in the search bar on the blockchain explorer.


Transaction meant undoing or tampering, as it would mean redoing all blocks that followed. This process is not instantaneous. Because the bitcoin blockchain is quite large, it takes a lot of time to process a single transaction between several on the blockchain.


Depending on the traffic on the blockchain and the size of your transaction, the amount of time it takes to confirm a transaction can range anywhere from a few minutes to a few days. Larger transactions with higher fees are accepted by miners as compared to smaller ones. It has been said, once it is confirmed, it is irrevocably lodged forever.



If you want to indulge in some goofy charm, you can sit at your desk and watch a bitcoin transaction. Blockchain.info is good for this, but if you want a hypnotically fun version, try BitBonkers. 


How Bitcoin Mining Works


Similar to gold mining, bitcoins exist in the design of protocols such as gold being underground, but they have yet to be brought to light, as gold was dug until now.


The bitcoin protocol dictates that at some point a maximum of 21 million bitcoins will exist. What the miners do is bring them to light, sometime. Once the miners have minted all of these coins, more coins will run until the bitcoin protocol is changed to allow a larger supply. Transaction fees are paid to the mines to create blocks of legitimate transactions and to incorporate them into the blockchain.



To understand how bitcoin mining works, it is expected to step back a bit and talk about nodes. A node is a powerful computer that runs bitcoin software and fully verifies transactions and blocks. Since the bitcoin network has been decentralized, these nodes are collectively responsible for verifying pending transactions.



Anyone can run a node - you just download the free bitcoin software. The drawback is that it consumes energy and storage space - the network takes hundreds of gigabytes of data at the time of writing. Nodes spread bitcoin transactions around the network. A node will send information to some nodes it knows, which will tell the information to nodes that they know, etc. In this way, pending transactions occur very quickly around the entire network.


Some nodes are mining nodes, commonly referred to as miners. These block the outstanding transactions and add them to the blockchain. How do they do this? By solving a complex mathematical puzzle that is part of a bitcoin program, and including answers in blocks.


The puzzle that needs to be solved is to find a number, when combined with the data in the block and pass through a hash function (which outputs data of any size to a fixed length output Converts to data, a certain result is generated within the range.


For general knowledge lovers, this number is called "non", which is an abbreviation for "number once used". In blockchain, non is an integer between 0 and 4,294,967,296.


How do they find this number? By guessing at random. The hash function makes it impossible to predict what the output will be. So, the miners guess the mystery number and apply the hash function in combination with the data in that approximate number and block. The resulting hash starts with a fixed number of zeros. There is probably no way to know which number will work, because two consecutive integers will give wildly different results. Considering more, there may be many results that give the desired results, or there may be none. In that case, the miners keep trying but with a different block configuration.


The computation difficulty (required number of zeros at the beginning of the hash string) is often adjusted, so that it takes an average of 10 minutes to process the block.


Why 10 minutes? This is the amount of time that bitcoin developers feel is needed for a steady and slow flow of new coins until the maximum number reaches 21 million (expected sometime in 2140).


The first miner to get the resulting hash within the desired range declares its victory in the rest of the network. All other miners immediately stop working on that block and start trying to figure out the mystery number for the next one. As a reward for his work, the victorious miner gets some new bitcoins.


At the time of writing, the reward is 6.25 bitcoins per block, valued at approximately $ 56,000 in June 2020.


However, it is not nearly as high as the throne. A lot of mining nodes are competing for that reward, and the more computing power you have and the more predictable calculations you can make, the luckier you are.


Furthermore, the cost of having a mining node is considerable, not only due to the need for powerful hardware, but also due to the large amount of power consumed by these processors.


And, the number of bitcoins given as a reward for solving the puzzle will decrease. Going 6.25 now, but it gets halved every four years (or expected in the next 2024). The value of bitcoin relative to the cost of electricity and hardware may partially compensate for this decrease over the next few years, but it is not certain.


If I made it too far, congratulations! There is still much to explain about the system, but at least you now have an idea of ​​the broad outline of the genius of programming and concept. For the first time we have a system that allows convenient digital transfers in a decentralized, trust-free and tamper-proof manner.