Tag Archives: blockchain

How does Bitcoin work?

How does Bitcoin work?

This is a question that often causes confusion. Here's a quick explanation!

The basics for a new user

As a new user, you can get started with Bitcoin without understanding the technical details. Once you have installed a Bitcoin wallet on your computer or mobile phone, it will generate your first Bitcoin address and you can create more whenever you need one. You can disclose your addresses to your friends so that they can pay you or vice versa. In fact, this is pretty similar to how email works, except that Bitcoin addresses should only be used once.

Balances – block chain

The block chain is a shared public ledger on which the entire Bitcoin network relies. All confirmed transactions are included in the block chain. This way, Bitcoin wallets can calculate their spendable balance and new transactions can be verified to be spending bitcoins that are actually owned by the spender. The integrity and the chronological order of the block chain are enforced with cryptography.

Block Chain

The blockchain provides Bitcoin’s public ledger, an ordered and timestamped record of 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 all have the same blocks in their blockchain, they are considered to be in consensus. The validation rules these nodes follow to maintain consensus are called consensus rules. This section describes many of the consensus rules used by Bitcoin Core.

Block Chain Overview

A block of one or more new transactions is collected into the transaction data part of a block. Copies of each transaction are hashed, and the hashes are then paired, hashed, paired again, and hashed again until a single hash remains, the Merkle root of a Merkle tree. The Merkle root is stored in the block header. Each block also stores the hash of the previous block’s header, chaining the blocks together. This ensures a transaction cannot be modified without modifying the block that records it and all following blocks.

Transactions are also chained together. Bitcoin wallet software gives the impression that satoshis are sent from and to wallets, but bitcoins really move from transaction to transaction. Each transaction spends the satoshis previously received in one or more earlier transactions, so the input of one transaction is the output of a previous transaction.

A single transaction can create multiple outputs, as would be the case when sending to multiple addresses, but each output of a particular transaction can only be used as an input once in the block chain. Any subsequent reference is a forbidden double spend—an attempt to spend the same satoshis twice. Outputs are tied to transaction identifiers (TXIDs), which are the hashes of signed transactions.

Because each output of a particular transaction can only be spent once, the outputs of all transactions included in the block chain can be categorized as either Unspent Transaction Outputs (UTXOs) or spent transaction outputs. For a payment to be valid, it must only use UTXOs as inputs.

Ignoring coin based transactions (described later), if the value of a transaction’s outputs exceeds its inputs, the transaction will be rejected—but if the inputs exceed the value of the outputs, any difference in value may be claimed as a transaction fee by the Bitcoin miner who creates the block containing that transaction. For example, in the illustration above, each transaction spends 10,000 satoshis fewer than it receives from its combined inputs, effectively paying a 10,000 satoshi transaction fee.

Transactions – private keys

A transaction is a transfer of value between Bitcoin wallets that gets included in the block chain. Bitcoin wallets keep a secret piece of data called a private key or seed, which is used to sign transactions, providing a mathematical proof that they have come from the owner of the wallet. The signature also prevents the transaction from being altered by anybody once it has been issued. All transactions are broadcast between users and usually begin to be confirmed by the network in the following 10 minutes, through a process called mining.

Processing – mining

Mining is a distributed consensus system that is used to confirm a waiting transactions by including them in the block chain. It enforces a chronological order in the block chain, protects the neutrality of the network, and allows different computers to agree on the state of the system. To be confirmed, transactions must be packed in a block that fits very strict cryptographic rules that will be verified by the network. These rules prevent previous blocks from being modified because doing so would invalidate all following blocks. Mining also creates the equivalent of a competitive lottery that prevents any individual from easily adding new blocks consecutively in the block chain. This way, no individuals can control what is included in the block chain or replace parts of the blockchain to roll back their own spends.

Going down the rabbit hole

This is only a very short and concise summary of the system.

Chuck Reynolds


Bitcoin Developer Guide

Bitcoin Developer Guide

Find detailed information about the Bitcoin protocol and related specifications.

The Developer Guide aims to provide the information you need to understand Bitcoin and start building Bitcoin-based applications, but it is not a specification. To make the best use of this documentation, you may want to install the current version of Bitcoin Core, 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 to documentation 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-reference links will be shown in blue. If you hover over a cross-reference link, a brief definition of the term will be displayed in a tooltip.

Proof Of Work

The block chain is collaboratively maintained by anonymous peers on the network, so Bitcoin requires that each block prove a significant amount of work was invested in its creation to ensure that untrustworthy peers who want to modify past blocks have to work harder than honest peers who only want to add new blocks to the block chain. Chaining blocks together makes it impossible to modify transactions included in any block without modifying all following blocks. As a result, the cost to modify a particular block increases with every new block added to the block chain, magnifying the effect of the proof of work.

The proof of work used in Bitcoin takes advantage of the apparently random nature of cryptographic hashes. A good cryptographic hash algorithm converts arbitrary data into a seemingly-random number. If the data is modified in any way and the hash re-run, a new seemingly-random number is produced, so there is no way to modify the data to make the hash number predictable. To prove you did some extra work to create a block, you must create a hash of the block header which does not exceed a certain value. For example, if the maximum possible hash value is 2256 − 1, you can prove that you tried up to two combinations by producing a hash value less than 2255.

In the example given above, you will produce a successful hash on average every other try. You can even estimate the probability that a given hash attempt will generate a number below the target threshold. Bitcoin assumes a linear probability that the lower it makes the target threshold, the more hash attempts (on average) will need to be tried.

New blocks will only be added to the block chain if their hash is at least as challenging as a difficulty value expected by the consensus protocol. Every 2,016 blocks, the network uses timestamps stored in each block header to calculate the number of seconds elapsed between generation of the first and last of those last 2,016 blocks. The ideal value is 1,209,600 seconds (two weeks).

  • If it took fewer than two weeks to generate the 2,016 blocks, the expected difficulty value is increased proportionally (by as much as 300%) so that the next 2,016 blocks should take exactly two weeks to generate if hashes are checked at the same rate.

  • If it took more than two weeks to generate the blocks, the expected difficulty value is decreased proportionally (by as much as 75%) for the same reason.

(Note: an off-by-one error in the Bitcoin Core implementation causes the difficulty to be updated every 2,016 blocks using timestamps from only 2,015 blocks, creating a slight skew.)

Because each block header must hash to a value below the target threshold, and because each block is linked to the block that preceded it, it requires (on average) as much hashing power to propagate a modified block as the entire Bitcoin network expended between the time the original block was created and the present time. Only if you acquired a majority of the network’s hashing power could you reliably execute such a 51 percent attack against transaction history (although, it should be noted, that even less than 50% of the hashing power still has a good chance of performing such attacks).

The block header provides several easy-to-modify fields, such as a dedicated nonce field, so obtaining new hashes doesn’t require waiting for new transactions. Also, only the 80-byte block header is hashed for proof-of-work, so including a large volume of transaction data in a block does not slow down hashing with extra I/O, and adding additional transaction data only requires the recalculation of the ancestor hashes in the merkle tree.

Block Height And Forking

Any Bitcoin miner who successfully hashes a block header to a value below the target threshold can add the entire block to the block chain (assuming the block is otherwise valid). These blocks are commonly addressed by their block height—the number of blocks between them and the first Bitcoin block (block 0, most commonly known as the genesis block). For example, block 2016 is where difficulty could have first been adjusted.

Multiple blocks can all have the same block height, as is common when two or more miners each produce a block at roughly the same time. This creates an apparent fork in the block chain, as shown in the illustration above. When miners produce simultaneous blocks at the end of the block chain, each node individually chooses which block to accept. In the absence of other considerations, discussed below, nodes usually use the first block they see.

Eventually a miner produces another block which attaches to only one of the competing simultaneously-mined blocks. This makes that side of the fork stronger than the other side. Assuming a fork only contains valid blocks, normal peers always follow the the most difficult chain to recreate and throw away stale blocks belonging to shorter forks. (Stale blocks are also sometimes called orphans or orphan blocks, but those terms are also used for true orphan blocks without a known parent block.)

Long-term forks are possible if different miners work at cross-purposes, such as some miners diligently working to extend the block chain at the same time other miners are attempting a 51 percent attack to revise transaction history. Since multiple blocks can have the same height during a block chain fork, block height should not be used as a globally unique identifier. Instead, blocks are usually referenced by the hash of their header (often with the byte order reversed, and in hexadecimal).

Transaction Data

Every block must include one or more transactions. The first one of these transactions must be a coinbase transaction, also called a generation transaction, which should collect and spend the block reward (comprised of a block subsidy and any transaction fees paid by transactions included in this block).

The UTXO of a coinbase transaction has the special condition that it cannot be spent (used as an input) for at least 100 blocks. This temporarily prevents a miner from spending the transaction fees and block reward from a block that may later be determined to be stale (and therefore the coinbase transaction destroyed) after a block chain fork. Blocks are not required to include any non-coinbase transactions, but miners almost always do include additional transactions in order to collect their transaction fees.

All transactions, including the coinbase transaction, are encoded into blocks in binary rawtransaction format. The raw transaction format is hashed to create the transaction identifier (txid). From these txids, the merkle tree is constructed by pairing each txid with one other txid and then hashing them together. If there are an odd number of txids, the txid without a partner is hashed with a copy of itself. The resulting hashes themselves are each paired with one other hash and hashed together. Any hash without a partner is hashed with itself. The process repeats until only one hash remains, the merkle root.

For example, if transactions were merely joined (not hashed), a five-transaction merkle tree would look like the following text diagram:

       ABCDEEEE .......Merkle root
   ABCD        EEEE
  /          /
 AB    CD    EE .......E is paired with itself
/    /    /
A  B  C  D  E .........Transactions

As discussed in the Simplified Payment Verification (SPV) subsection, the merkle tree allows clients to verify for themselves that a transaction was included in a block by obtaining the merkle root from a block header and a list of the intermediate hashes from a full peer. The full peer does not need to be trusted: it is expensive to fake block headers and the intermediate hashes cannot be faked or the verification will fail.

For example, to verify transaction D was added to the block, an SPV client only needs a copy of the C, AB, and EEEE hashes in addition to the merkle root; the client doesn’t need to know anything about any of the other transactions. If the five transactions in this block were all at the maximum size, downloading the entire block would require over 500,000 bytes—but downloading three hashes plus the block header requires only 140 bytes.

Note: If identical txids are found within the same block, there is a possibility that the merkle tree may collide with a block with some or all duplicates removed due to how unbalanced merkle trees are implemented (duplicating the lone hash). Since it is impractical to have separate transactions with identical txids, this does not impose a burden on honest software, but must be checked if the invalid status of a block is to be cached; otherwise, a valid block with the duplicates eliminated could have the same merkle root and block hash, but be rejected by the cached invalid outcome, resulting in security bugs such as CVE-2012-2459.

Chuck Reynolds


Blockchain’s R-Word (And Other Trends for 2017)

Blockchain's R-Word (And Other Trends for 2017)

In this CoinDesk 2016 in Review special feature, Taylor discusses what he sees as the challenges (and opportunities) ahead for enterprise applications of distributed ledger tech.

  revenue, laptop

2016 has been a rollercoaster year for those of us following blockchain and distributed ledger tech.

Whether it was bitcoin pushing toward $1,000, a consortium of banks open-sourcing software with R3's Corda, or government and central banks supporting blockchain experimentations, you can't deny the subject has been everywhere. While some have grown tired of the endless press releases and bickering about ledger designs, in the background, real progress is being made, and major organizations are already placing their bets.

In 2017, I’m watching for maturity in the active projects both from startups and blockchain communities, as well as the incumbent financial services companies. Evolution and revolution are necessary, and I believe we can learn from both. But, if you're new to this space, it may not be obvious where you should invest your time or resources. To help you make those decisions, I've identified four macro trends I see happening in 2017.

"Where is the end product?"

Revenue becomes the big question

My projection is, this will be a common question this year as executives and mainstream media look but fail to see the traction being made. But for the first time, 2017 might see it answered as the launch of the first real distributed ledger products go live, likely with a focus on gold trading. Right when you think you don't have to do anything, real-world, scalable financial products hit the financial markets.

So while the 'end product' question will emerge (and go away), others will debut. As 2017 is unlikely to be the year DLT scales for corporates, many will begin to ask, 'Where's the revenue?' The business cases are out there, they’re just not obvious from 30,000 ft.

The beginning of 'new businesses'

While everyone is obsessed with who's in what consortium, what's more, interesting is what systems people are building and what that will mean. We're seeing the beginnings of real structural change in financial markets. If you imagine financial markets today as being 100% centralized, with bitcoin being 100% decentralized, then financial markets are taking baby steps away from centralized power. Over time, any shift in the first number is significant.

My guess is that as banks talk more about "smart contracts" and DLT instead of "blockchain". The market will recognize that these corporate things are neither shared databases nor blockchains, but some new interesting thing. For now, this has been given the label "DLT", but likely needs a more accurate one.

Yet, in financial markets, where new asset classes or financial agreements become revenue opportunities for banks and financial market participants, a new narrative must emerge. One that moves away from "cost and efficiency" only.

Bitcoin goes enterprise

I’ve long been an advocate of mainstreaming bitcoin and (outside of rising interest in DLT) I predict mainstream attitudes are starting to change about bitcoin. Companies like PwC, Deloitte and others are making major plays in bitcoin and ethereum, and companies like Bloq and Blockstream have started to resemble the early days of Linux enterprise companies, making open-source "wild" software tame and consumable for large corporates.

In this environment, institutional investors may start to leverage bitcoin’s infrastructure and even go deeper into bitcoin investing. Given that the line between the bitcoin world and the banking world could start blurring (as new business models emerge beyond payments and remittances, and wallets are released) this seems even more likely to occur.

It will be very small at first, but projects like t0 are the types of things we may look back on in 25 years as a watershed moment.

Experimentation will continue

The current experimentation environment is super interesting to watch, and new business models will emerge. However, there will be failures, as well. We might have one, maybe two, smaller DAO-like failures in the public blockchain space. As we go through this learning and experimentation, a more useable, more robust framework for token or smart contract-based businesses compatible with local laws will start to emerge.

There is no good reason why you couldn’t build a business this way now, it’s just much harder than a bog-standard token sale. There has been some good legal advice on how to do token sales well, but the idea that these “products” should be pre-sold to fund these efforts needs rethinking.

It seems we'll begin to see more creativity beyond the ICO as we know it today.

Chuck Reynolds


Green Fire On The Blockchain

Green Fire On The Blockchain

Green Fire has decided to change the world as you know it. We are moving together onto the blockchain. We have chosen “Green Fire Gold” (GFG) as the blockchain application name. GFG will be the first to take landfill mining and reclamation on to the blockchain.

GFG is designed with next generation high load blockchain protocols, utilizing a blockchain design that improves functionality with each additional user, maximizing scalability and load performance.

GFG includes your own private universal wallet that allows for immediate trading and exchange between all currencies and investment markets.

The GFG blockchain is designed by the best in cryptocurrency development to create a coin and mainstream payment network usable by everyone in the world.

The GFG universal wallet/coin combo can be used to manage your entire life and assets. Inside are a Universal Dapp store (decentralized application store), micro-services, micro-payments, smart contracts, universal exchange, universal payment system, and custom template decentralized app building, just to name a few.

Understanding blockchain

The Blockchain has become the default backbone for most new financial and business development.

In essence, blockchain is a distributed database, or "timestamp server," as it was called by the mysterious Satoshi Nakamoto in the paper that proposed bitcoin.

The blockchain consists of blocks of data — each block is a timestamped batch of valid individual transactions and the hash of the previous block, creating a link between the two. Because each timestamp includes the previous timestamp in its hash, it forms a chain. Each new transaction must be authenticated across the distributed network of computers that form the blockchain before it can form the next block in the chain.

GFG is developing a fully decentralized, leaderless DAO*, a Decentralized Autonomous Organization, and a fully distributed financial platform, OWNED BY THE PEOPLE WHO USE IT.

GFG is using the MyCryptoWorld development platform to construct the GFG DAO. This platform develops on an advanced Ethereum blockchain.

For the determination phase of implementation an interdisciplinary team of cryptocurrency, marketing and software veterans/enthusiasts around the globe have already started determining the intelligence that operates GFG.

As soon the business determination is finished the whole system will be completely community/user driven and owned. From this point on the further evolution will be in the hands of all owners, using e-Governance/voting and other cutting edge tools to create consensus and run decisions.

The GFG DAO is a digital decentralized autonomous organization and a form of investor-directed venture capital fund.

The GFG DAO has an objective to provide a new decentralized business model for organizing both international commerce and social marketing. It will be on the Ethereum blockchain, and will have no conventional management structure or board of directors.

The GFG DAO is stateless, and not tied to any particular nation state. As a result, many questions of how government regulators would deal with a stateless fund are yet to be dealt with.

The GFG DAO is being crowdfunded via a token sale. A similar crowdfunding campaign in May 2016. It set the record for the largest crowdfunding campaign in history


The Landfill Pickers and the Women Informal Workers will own GFG. GFG will be governed by consensus.

Consensus in a distributed system is determined by entities checking each other's work and providing a stamp of approval as to transactions and activities allowed. This is accomplished through a distributed network, one might say, a “social neural network”.

Smart Contracts

GFG Blockchain also leverages a technology called "smart contracts," which are bits of executable code that only act when specific conditions within the blockchain are met. This allows a blockchain to automate activity like payment transfers when a task is completed, or even a partial payment when a milestone is achieved.

By providing a way to record transactions as automated trusted activity among digitally networked peers, audit and professional services firm Ernst & Young believes "blockchain technology has the potential to streamline and accelerate business processes, increase cybersecurity and reduce or eliminate the roles of trusted intermediaries (or centralized authorities) in industry after industry."

Blockchains have proven that they reduce cost and increase trust in financial transactions. It is becoming apparent that we can expect financial services firms to abandon existing transaction-processing technologies in favor of blockchain technologies.

We are developing the GFG DAO on the blockchain with a unique crypto token (coin) and its own brand of distributed manufacturing and ecommerce.

Green Fire is taking the Landfill Mining operations and the Children of the Landfill project and wrapping them in a blockchain application.

This will provide these “invisible workers” the very poorest of the poor the most unique democratic environment that is yet to prevail for them. They will be the next global cultural warriors to emerge from the shadows.

Mike Prettyman,
Chief Information Officer at Green Fire Engineered Reclamation
For more information come to the website

Children of the Landfill Project

Green Fire Engineered Reclamation

Join our active groups on Markethive

Children of the Landfill
Green Fire Engineered Reclamation