A gentle introduction to blockchain technology

Thanks Marco, I agree there is a lot to think about: no doubt the industry will get things wrong during the teething period, but with a lot of the parts of the system using cryptographic signatures, I am confident we will have more secure and transparent models in the future than we currently do.

Thanks. Simple and easy to follow introduction of blockchain.

Pingback:Redefine, reinvent and disrupt: the Sydney Blockchain Workshops Recordkeeping Roundtable

This entry was posted inblockchain,introductionsand taggedbitcoin,block rewards,blockchain,consensus,cryptography,digital signatures,distributed ledgers,immutable,incentives,longest chain rule,mining,p2p,participation,proof of work. Bookmark thepermalink.

Another way of describing public/private might be permissionless vs permissioned or pseudonymous vs identified participants.

*Well, he can, but only his version of the ledger will have this transactions. Other nodes will reject this, which is why it is important to confirm a transaction across a number of nodes.

The article is awesome and complex Blockchain is explained in simple and easy way. Would you please share the technologies to implement it, is it ethereum + solidity are enough to develop a Blockchain application.

Thanks for finally writing about A gentle introduction to blockchain technology

If the majority of the network (in bitcoin, the majority is determined by computational power) choose to run a new version of the software, then new-style blocks will be created faster than the minority, and the minority will be forced to switch or become irrelevant in a blockchain fork.  So miners with lots of computational power have a good deal of say as to what gets implemented.

If you control the validators in your own network, or they are trusted, then

The double spend attack.

Very nice article. I like the other methods column. I personally think these other methods would need a in-depth analysis by a security expert expecially as the proposed trusted models do not specify how authorization will be implemented in the closed trust model vs. current open trust model used in bitcoin blockchain. Also security controls to protect the new blockchain need to be derived based upon a threat model to identify the attacks and design the controls specifically for securing a client to server blockchain architecture vs. current peer to peer as implemented in bitcoin blockchain

If three miners across the world create Block 81 at roughly the same time, which Block 81 should be considered valid?  Remember that each Block 81 will look slightly different: They will certainly contain a different payment address for the 25 BTC block reward; and they may contain a different set transactions.  Lets call them 81a, 81b, 81c.

That said, lets start with The Bitcoin Blockchain ecosystem, and then try to tease out theblockchainbit from thebitcoinbit.

Treat the first block you see as legitimate.

So you want to use a blockchain for that? Some common misconceptions

Every 2,016 blocks (roughly every 2 weeks), the bitcoin network adjusts the difficulty of the guessing game based on the speed that the blocks have been created.

Reblogged this onMorin Innovationand commented:

How do you make it hard for dishonest miners to create blocks?

A gentle introduction to blockchain technology

Longest chain rule: If you see multiple blocks, treat the longest chain as legitimate.

Similarly in a blockchain block, each block has:

As a primer on bitcoin, it may help to reviewA gentle introduction to bitcoin.

Article trs intressant pour comprendre la technologie blockchain

by certain participants, maybe a wider audience, and

With bitcoin, there are two parts to upgrades.

With thanks to David Moskowitz, Tim Swanson, Roberto Capodieci. Errors, omissions, and simplifications are mine.

A gentle introduction to immutability of blockchains

Blocks in a chain refer to previous blocks, like page numbers in a book.

best description and explanation so far ?

Because of bitcoins public structure, it needs a defence against miscreants and so uses proof of work to make it computationally difficult to add a block (see Defence section).  This hascreated a cost(equipment and running costs) of mining andtherefore a need for incentivisation.

Which block should count as the legit one?

People use the term blockchain technology to mean different things, and it can be confusing.  Sometimes they are talking aboutThe Bitcoin Blockchain, sometimes itsThe Ethereum Blockchain, sometimes its other virtual currencies ordigital tokens, sometimes itssmart contracts.  Most of the time though, they are talking about distributed ledgers, i.e. a list of transactions that is replicated across a number of computers, rather than being stored on a central server.

You are commenting using your Twitter account.(LogOut/Change)

Transaction and block validation is cheap and fast, unless you choose to make it slow and expensive (a la bitcoin).

A gentle introduction to smart contracts

However in a few seconds you may see 81b. If you see this, you keep an eye on it. If later you see 82b, the longest chain rule says that you should regard the longer b chain as the valid one (80, 81b, 82b) and ignore the shorter chain (80, 81a). So you stop trying to make 82a and instead start trying to make 83b:

Very informative article but I personally would have found it more beneficial if the author did not go back and forth between blockchain and Bitcoin.

(you could imagine a change which reduces the mining reward from 25 BTC per block to 0 BTC. Well see just how many miners choose to run that!).

this is definitely the best description for Blockchain for beginners, thank you

Make it hard to generate a fingerprint that satisfies the rules of The Bitcoin Blockchain

Secretly create a longer chain of blocks which excludes the payment to the retailer, and includes the payment to yourself

On the other hand, private or internaldistributed ledgersand blockchains can be deployed to solveother sets of problems.  As ever, there are tradeoffs andpros and consto each solution, and you need to consider these individually for each individual use case.

This article is a gentle introduction to blockchain technology and assumes minimal technical knowledge.  It attempts to describewhat it israther thanwhy should I care, which is something for a future post.

The source code to this Bitcoin core software is published on Github:  If you are so inclined, you can check the code and compile and run it yourself instead of downloading the prepackaged software on .  Or you can even write your own code, so long as it conforms to protocol.

You may want to use blockchain technology in a trusted, private network.  You may not want to publish all the rules of what a valid transaction or block looks like.  You may want to control how the network rules are changed.  It is easier to control a trusted private network than an untrusted, public free-for-all like bitcoin.

The common themes seem to be adata storewhich:

of the block, for example in bitcoin is it the bitcoin transactions, and the miner incentive reward (currently 25 BTC).

Private blockchains.Conversely, a private blockchain network is where the participants are known and trusted: for example, an industry group, or a group of companies owned by an umbrella company.  Many of the mechanisms arent needed or rather they are replaced with legal contracts Youll behave because youve signed this piece of paper..  This changes the technical decisions as to which bricks are used to build the solution.

Attempt to create a longer chain of blocks that make previously accepted blocks become orphans and not part of the main chain

No, blockchain is not a solution looking for a problem

Block by block.With blockchains, each block references the previous block, not by block number, but by the blocks fingerprint, which is cleverer than a page number because the fingerprint itself is determined by the contents of the block.

In the office environment, often data is held on servers, and wherever you log in, you can access the data.  The server holds 100% of the data, and the clients trust that the data is definitive.  Most of the internet is client-server where the website is held on the server, and you are the client when you access it.  This is very efficient, and a traditional model in computing.

This guessing game is calledProof of work. By publishing the block with the fingerprint that is smaller than the target number, you are proving that you did enough guess work to satisfy the network at that point in time.

Replicated databases.The Bitcoin Blockchain ecosystem acts like a network of replicated databases, each containing the same list of past bitcoin transactions.  Important members of the network are called validators or nodes which pass around transaction data (payments) and block data (additions to the ledger).  Each validator independently checks the payment and block data being passed around.  There are rules in place to make the network operate as intended.

*Heres a pieceon immutability in blockchains.

Fill in your details below or click an icon to log in:

For analogy, a book is a chain of pages. Each page in a book contains:

Bitcoin price, gold, and nonsense how not to valuebitcoins

The reference to previous blocks creates a chain of blocks a blockchain!

Worse, in an untrusted peer-to-peer network where you cant necessarily trust any of the peers, how do you ensure that the system cant easily be corrupted by bad peers?

Seethis infographicfor a visualisation of the data in Bitcoins blockchain.

to prove identity, authenticity and enforce read/write access rights

Whats the difference between a distributed ledger and a blockchain?

A gentle introduction to self-sovereign identity

The computation itself is aguessing gamewhere block-makers need to guess a number, which when crunched with the rest of the block data contents, results in a hash / fingerprint that is smaller than a certain number.  That number is related to the difficulty of mining which is related to the total network processing power.  The more computers joining in to process blocks, the harder it gets, in a self-regulating cycle.

A gentle introduction to digital tokens

With blocks, if the miscreant has sufficient block creation power (and this is what it all hinges on), he can delay your transaction by refusing to include it in his blocks.  However, your transaction will still be known by other honest nodes as an unconfirmed transaction, and they will include it in their blocks.

Hi, so how do the miners (or the software they use to build the blocks) verify that you are spending bitcoins you have? To do this they must know how many coins before the transaction which suggests they have to look at the whole chain from the beginning of time (well, the beginning of BitCoin) and look for every transaction relating to your account which must take huge amounts of storage (to store the whole BitCoin chain) and processing power (to either cycle through every single block every time or alternatively keep a record of how many BitCoins every single participant has at any moment in time. The only other alternative that I can imagine is that each transaction includes a start and end balance for both participants, then all you have to do is go back through the chain until you find a previously verified transaction for each participant and validate the start balance for this new transaction matches the end balance for the previous one for each person. I can see that might be the solution as each verified block is being trusted so you dont need to find anything before the previous transaction for each. Sorry as I think I have answered my own question, but only in theory, it ould be nice if you could confirm it for me ? Thanks for a great article and glad it appears to have been written by a fellow Brit who appreciates the benefit a cup of tea has to a readers understanding.

Thanks for writing this article; I am starting to get it about block chain, after hearing the term and reading cryptic characterizations, which were equally baffling in themselves, for years. Id guess most people have had no idea, sort of like me. Still loads and loads of questions in my mind (like who creates a bit coin? How? Isnt the requirement to keep the whole history of all blocks and all bit coins on all the computers of every network node rather overkill just to rid ourselves of the central authority? Seems inefficient. What happens when most of these network nodes get bored with it and switch off their computers? What is the vision of the end of this thing? And other questions) but Ill keep digging and I know Ill reach a level of understanding which satisfies my curiosity.

Longest chain rule.In bitcoin, the conflict is resolved by a rule called the longest chain rule.

I think your article is just excellent. I am citing it in my Masters thesis.

The Bitcoin Blockchainecosystemis actually quite a complex system due to its dual aims: that anyone should be able to write to The Bitcoin Blockchain; and that there shouldnt be any centralised power or control.  Relax these, and you dont need many of the convoluted mechanisms of Bitcoin.

In a private, controlled network where someone has control over upgrades, this is an easy problem to solve: Everyone must upgrade to the new logic by 31 July.

I see blockchain technology as a collection of technologies, a bit like a bag of Lego.  From the bag, you can take out different bricks and put them together in different ways to create different results.

In the bitcoin network, theoretically anyone can download or write some software and start validating transactions and creating blocks.  Simply go to run the Bitcoin core software.

This is all very well in theory, but the more you look into this, the more interesting it gets, and with the bitcoin solution, the incentives may not quite have worked as expected. This is something for another article

A blockchain is just a file.A blockchain by itself is just a data structure.  That is, how data is logically put together and stored. Other data structures are databases (rows, columns, tables), text files, comma separated values (csv), images, lists, and so on.  You can think of a blockchain competing most closely with a database.

Thank you! Im glad its helpful ?

With transactions, the effect a dishonest miner can have is very limited.  If the rest of the network is honest, they will reject any invalid transactions coming from him, and they will hear about valid transactions from other honest nodes, even if he is refusing to pass them on.

You can use other methods such as Well pay people to run validators or People sign a contract to run validators and behave.

A gentle introduction to immutability of blockchains

Ethereum works in a similar way in this respect seea gentle introduction to Ethereum.

Whats the difference between a blockchain a a normal database? Very loosely, a blockchain system is a package which contains a normal database plus some software that adds new rows, validates that new rows conform to pre-agreed rules, and listens and broadcasts new rows to its peers across a network, ensuring that all peers have the same data in their databases.

In peer-to-peer models, its more like a gossip network where each peer has 100% of the data (or as close to it as possible), and updates are shared around.  Peer-to-peer is in some ways less efficient than client-server, as data is replicated many times; once per machine, and each change or addition to the data creates a lot of noisy gossip.  However each peer is more independent, and can continue operating to some extent if it loses connectivity to the rest of the network.  Also peer-to-peer networks are more robust, as there is no central server that can be controlled, so closing down peer-to-peer networks is harder.

Bitcoins complexity comes from its ideology.The aim of bitcoin was to be decentralised, i.e. not have a point of control, and to be relatively anonymous.  This has influenced how bitcoin has developed.  Not all blockchain ecosystems need to have the same mechanisms, especially if participants can be identified and trusted to behave.

Public blockchains.Ledgers can be public in two senses:

Attempt to create blocks that include or exclude specific transactions of his choosing

The upgrade can be downloaded by nodes and block makers (miners) and run,

This is why people sayThe Bitcoin Blockchain isimmutable(can not be changed)*.

You are commenting using your account.(LogOut/Change)

It is useful to understand blockchains in the context of bitcoin, but you should not assume that all blockchain ecosystems need bitcoin mechanisms such astokens,proof of work mining, longest chain rule, etc.  Bitcoin is the first attempt at maintaining a decentralised, public ledger with no formal control or governance.Ethereumis the next iteration of a blockchain withsmart contracts. There are significant challenges involved.

A gentle introduction to bitcoin mining

Heres how bitcoin approaches some of the decisions:

A common conflict is when multiple miners create blocks atroughly the same time.  Because blocks take time to be shared across the network, which one should count as the legit block?

However, with a more centralised or trusted blockchain network, you can make decisions by using a trusted, or senior validator to arbitrate in these cases.

If it gets written into the Bitcoin core software onGithub, it can then form part of an upgrade the next version of Bitcoin core which is the most common reference implementation of the protocol.

The idealised situation in Bitcoin where block rewards are replaced by transaction fees.

Notify me of new comments via email.

First, there is the proposal stage where improvements are proposed, discussed, and written up. A proposal is referred to as a BIP a Bitcoin Improvement Proposal.

Remember, this is only a problem for ledgers where block-makers arent trusted.

When the payment gets added in an honest block, the retailer sends you goods

The original payment to the retailer will be deemed invalid by the honest nodes because those bitcoins have already been spent (in your longer chain)

Rules change.As these rules evolve over time, how will the network participants agree on the changes?  Will there be a situation where half the network thinks one transaction is valid, and the other half doesnt think so because of differences in logic?

Confused by blockchains?  Revolution vs Evolution

Seea gentle introduction to bitcoin miningfor more detail.

Note that you dont need to sign up, log in, or apply to join the network.  You can just go ahead and join in.  Compare this with the SWIFT network, where youcantjust download some software and start listening to SWIFT messages.  In this way, some call bitcoin permissionless vs SWIFT which would be permissioned.

Just as the price of gold determines how much equipment you can spend on a gold mine, bitcoins price determines how much mining power is used to secure the network. The higher the price, the more mining there is, and the more a miscreant has to spend to bully the network.

Seethe pros and cons of internal blockchainsorthe difference between a distributed ledger and a blockchainfor more on this topic.

MAS just released Corda for Central Banks sowhat?

If you own more than $1,000 worth of cryptocurrency then you should definitely be using a hardware wallet instead of keeping coins on exchanges.  I recommend a Trezor which you can buy for €89 directly from theirwebsite.

Internal consistency.By using a fingerprint instead of a timestamp or a numerical sequence, you also get a nice way of validating the data.  In any blockchain, you can generate the block fingerprints yourself by using some algorithms.  If the fingerprints are consistent with the data, and the fingerprints join up in a chain, then you can be sure that the blockchain is internally consistent.  If anyone wants to meddle with any of the data, they have to regenerate all the fingerprints from that point forwards and the blockchain will look different.

A gentle introduction to blockchaintechnology

Your transaction may have found its way into the included block, or if not, it may get included into future blocks. If your transaction was valid in the first place, and the accepted block doesnt do anything to invalidate your transaction (like by including a transaction that spends those coins elsewhere), thenyour transaction will still be included in a future block, so its more like a delay in processing.

Your computer will act as a full node which means:

Example.Lets say all the nodes on the network have synchronised their blockchains, and they are all on block number 80.

Usually, when people talk aboutpublicblockchains, they mean anyone-can-write.

In the example above, you would assume that the first Block 81 you see is valid. Lets say you see 81a first. You can start building the next block on that, trying to create 82a:

A problem with a permissionless, or open networks is that they can be attacked by anyone. So there needs to be a way of making the network-as-a-whole trustworthy, even if specific actors arent.

Page by page.With books, predictable page numbers make it easy to know the order of the pages.  If you ripped out all the pages and shuffled them, it would be easy to put them back into the correct order where the story makes sense.

Create two payments with the same bitcoins: one to an online retailer, the other to yourself (another address you control)

which contains the data about the block.  In bitcoin, the header includes some technical information about the block, a reference to the previous block, and a fingerprint (hash) of the data contained in this block, among other things. This hash is important for ordering.

This means that if it is difficult or slow to create this fingerprint (see the making it hard for baddies to be bad section), then it can also be difficult or slow to re-write a blockchain.

Peer to peer is one way of distributing data in a network.  Another way is client-server.  You may have heard of peer-to-peer file sharing on the BitTorrent network where files are shared between users, without a central server controlling the data.  This is why BitTorrent has remained resilient as a network: there is no central server to shut down.

As a network as a whole, you must agree up front what kind of data is valid to be passed around, and what is not.  With bitcoin, there are technical rules for transactions (Have you filled in all the required data fields?  Is it in the right format?  etc), and there are business rules (Are you trying to spend more bitcoins than you have?  Are you trying to spend the same bitcoins twice?).

You are commenting using your Google+ account.(LogOut/Change)

Hello Sohana I am Tamim. I am doing master thesis on the same topic. It will be very nice to me if you kindly share some ideas with me. Here is my email a

Essentially you want to make it hard, or expensive for baddies to add blocks.  In bitcoin, this is done by making itcomputationally expensiveto add blocks.  Computationally expensive means takes a lot of computer processing power and translates to financially expensive (as computers need to be bought then run and maintained).

This work by licensed under aCreative Commons Attribution-NonCommercial 4.0 International License.Blog at .Post toCancel%dbloggers like this:>

I see blockchain technology as a bag of Lego or bricks

What happen nwith the blocks those are discarded using longest chain rule? Sender has to make the transaction again? Kindly explain.

This is called a double spend because the same bitcoins were spent twice but the second one was the one that became part of the eventual blockchain, and the first one eventually gets rejected.

Because bitcoin is designed as a anyone-can-write blockchain, where participants arent vetted and can add to the ledger without needing approval, it needs ways of arbitrating discrepancies (there is no boss to decide), and defence mechanisms against attacks (anyone can misbehave with relative impunity, if there is a financial incentive to do so).  These create cost and complexity to running this blockchain.

Enter your email address to follow this blog and receive notifications of new posts by email.

There is a big difference in what technologies you need, depending on whether you allowanyoneto write to your blockchain, or known, vetted participants.   Bitcoin in theory allowsanyoneto write to its ledger (but in practice, only about 20 people/groups actually do).

Warning: this section isnt so gentle, as it goes into detail into each of the elements above.  I recommend getting a cup of tea.

Shorter companion pieces to this are:

I aim to write accessible articles about blockchai

: at the top of the page there is usually the title of the book and sometimes the chapter number or title; at the bottom is usually the page number which tells you where you are in the book. This data about data is called meta-data.

A peek inside a blockchain block: the fingerprints are unique to the blocks contents.

, or at least make it easy to detect when someone is trying to do so

You are commenting using your Facebook account.(LogOut/Change)

Refuse to relay valid transactions to other nodes

With peer-to-peer models, even if all peers are trusted, there can be a problem of agreement or consensus if each peer is updating at different speeds and have slightly different states, how do you determine the real or true state of the data?

However in a public, uncontrolled network, its a more challenging problem.

If you have a specific business problem which you think may be solvable with a blockchain, I would love to hear about this: pleasecontact me.

Therefore, if someone wants to re-write parts of The Bitcoin Blockchain, it will take them a long time, and they have to catchup with and overtake the rest of the honest network

Publish the longer chain. If the other nodes are playing by the longest chain rule rule, then they will ignore the honest block with the retailer payment, and continue to build on your longer chain. The honest block is said to be orphaned and does not exist to all intents and purposes.

Only broadcast the payment that pays the retailer

So, miners do lots of mining, increasing the difficulty and raising the walls against network attacks. They are rewarded in bitcoin according to a schedule, and in time, as the block rewards reduce, transaction fees become the incentive that miners collect.

Worse though, is if the miscreant can create a longer chain of blocks than the rest of the network, and invoking the longest chain rule to kick out the shorter chains.  This lets himunwind a transaction.

The longest chain rule is the rule that the bitcoin blockchain ecosystem uses to resolve these conflicts which are common in distributed networks.

Leave a Reply