logo

Mastering Bitcoin

PDF Publication Title:

Mastering Bitcoin ( mastering-bitcoin )

Previous Page View | Next Page View | Return to Search List

Text from PDF Page: 207

The calculation can be seen in function GetBlockValue in the Bitcoin Core client: Example 8-5. Calculating the block reward - Function GetBlockValue, Bitcoin Core Client, main.cpp, line 1305 int64_t GetBlockValue(int nHeight, int64_t nFees) { int64_t nSubsidy = 50 * COIN; int halvings = nHeight / Params().SubsidyHalvingInterval(); // Force block reward to zero when right shift is undefined. if (halvings >= 64) return nFees; // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years. nSubsidy >>= halvings; return nSubsidy + nFees; } The initial subsidy is calculated in satoshis by multiplying 50 with the COIN constant (100,000,000 satoshis). This sets the initial reward (nSubsidy) at 5 billion satoshis. Next, the function calculates the number of halvings that have occurred by dividing the current block height by the halving interval (SubsidyHalvingInterval). In the case of block 277,316, with a halving interval every 210,000 blocks, the result is 1 halving. The maximum number of halvings allowed is 64, so the code imposes a zero reward (return only the fees) if the 64 halvings is exceeded. Next, the function uses the binary-right-shift operator to divide the reward (nSubsi dy) by 2 for each round of halving. In the case of block 277,316 this would binary-right- shift the reward of 5 billion satoshis once (one halving) and result in 2.5 billion satoshis, or 25 bitcoin. The binary-right-shift operator is used because it is more efficient for division by 2 than integer or floating point division. Finally, the coinbase reward (nSubsidy) is added to the transaction fees (nFees), and the sum is returned. Structure of the Generation Transaction With these calculations, Jing’s node then constructs the generation transaction to pay himself 25.09094928 bitcoin. The generation transaction is the first transaction in the block, so we can see it in more detail using the Bitcoin Core command-line interface: As you can see in Example 8-4, the generation transaction has a special format. Instead of a transaction input specifying a previous UTXO to spend, it has a “coinbase” input. We examined transaction inputs in Table 5-3. Let’s compare a regular transaction input with a generation transaction input. A regular transaction looks like this: 188 | Chapter 8: Mining and Consensus

PDF Image | Mastering Bitcoin

mastering-bitcoin-207

PDF Search Title:

Mastering Bitcoin

Original File Name Searched:

05db7df4f31840f0a873d6ea14dcc28d.pdf

DIY PDF Search: Google It | Yahoo | Bing

NFT (Non Fungible Token): Buy our tech, design, development or system NFT and become part of our tech NFT network... More Info

IT XR Project Redstone NFT Available for Sale: NFT for high tech turbine design with one part 3D printed counter-rotating energy turbine. Be part of the future with this NFT. Can be bought and sold but only one design NFT exists. Royalties go to the developer (Infinity) to keep enhancing design and applications... More Info

Infinity Turbine IT XR Project Redstone Design: NFT for sale... NFT for high tech turbine design with one part 3D printed counter-rotating energy turbine. Includes all rights to this turbine design, including license for Fluid Handling Block I and II for the turbine assembly and housing. The NFT includes the blueprints (cad/cam), revenue streams, and all future development of the IT XR Project Redstone... More Info

Infinity Turbine ROT Radial Outflow Turbine 24 Design and Worldwide Rights: NFT for sale... NFT for the ROT 24 energy turbine. Be part of the future with this NFT. This design can be bought and sold but only one design NFT exists. You may manufacture the unit, or get the revenues from its sale from Infinity Turbine. Royalties go to the developer (Infinity) to keep enhancing design and applications... More Info

Infinity Supercritical CO2 10 Liter Extractor Design and Worldwide Rights: The Infinity Supercritical 10L CO2 extractor is for botanical oil extraction, which is rich in terpenes and can produce shelf ready full spectrum oil. With over 5 years of development, this industry leader mature extractor machine has been sold since 2015 and is part of many profitable businesses. The process can also be used for electrowinning, e-waste recycling, and lithium battery recycling, gold mining electronic wastes, precious metals. CO2 can also be used in a reverse fuel cell with nafion to make a gas-to-liquids fuel, such as methanol, ethanol and butanol or ethylene. Supercritical CO2 has also been used for treating nafion to make it more effective catalyst. This NFT is for the purchase of worldwide rights which includes the design. More Info

NFT (Non Fungible Token): Buy our tech, design, development or system NFT and become part of our tech NFT network... More Info

Infinity Turbine Products: Special for this month, any plans are $10,000 for complete Cad/Cam blueprints. License is for one build. Try before you buy a production license. May pay by Bitcoin or other Crypto. Products Page... More Info

CONTACT TEL: 608-238-6001 Email: greg@infinityturbine.com | RSS | AMP