The Nuts and Bolts
of Blockchain
ROB BEGLEY AND JONATHAN BUSHELL
Building understanding
1. What is Blockchain?
2. How does it work?
3. Different types of Blockchain
1. What is Blockchain?
(in plain English)
1. What is Blockchain?
The ‘Blockchain’ is a way of storing data
Or to put it simply…
It’s a database
1. Database with a difference
The database is decentralized
Multiple copies linked together in a network
No ‘master’ version
Stored data is immutable
Add Data
Amend or Delete Data
1. Immutability and trust
Immutability builds trust
Proof that data hasn’t been tampered with or changed
This could be useful for
Records of transactions Health records
Deeds or contracts Identification
But could also be risky
What about Retention? What about GDPR?
2. How does it work?
(The core principles)
2. A distributed database
‘Traditional’ Database
Client-server model
Distributed Database
Peer-to-peer model
2. Adding data
End User
Blockchain Network
Data
Block
2. With us so far?
So the Blockchain is a database,
and there are multiple copies (‘nodes’), spread across a network.
Users send data to the network,
and it gets automatically added to the database.
…but how does that work exactly?
2. Achieving Consensus
2. Updating the Blockchain
So one ‘node’ is chosen at random by an algorithm,
and that ‘node’ processes the new Block of data.
The ‘node’ updates its own copy of the Blockchain database,
and then sends that update out to all the other ‘nodes’.
…but what exactly is a Block?
2. The Block – a visual guide
01/10/2019
13:23
s8Fb4X1…
Link to previous ‘block’
Timestamp
Unique ID
New Block
Existing Blockchain
2. The Block in a nutshell
So a Block stores my data in an immutable container,
With timestamp metadata.
Every block has a unique identifier,
Which is used to link Blocks together in a Chain.
…So where does the unique identifier come from?
2. Cryptographic Hashing
098f6bcd
4621d373
cade4e83
2627b4f6
Hashing is not new
MD5 Checksum = a hash
2. Hashing made simple
So every Block is run through a hashing algorithm.
This generates a unique identifier for every Block,
Which is used to link Blocks together to form a Blockchain.
So, just one final question…
…What is the point of it all?
2. How the Blockchain protects data
a58iB9
4C8iB9…
Let’s suppose I tamper with the
data in this Block…
v2
If I change the data in the Block, the
Unique ID hash of the Block also
changes
8i
4C
Now this link no longer works;
the Chain is broken!
Most importantly:
My copy of the Blockchain no longer matches all the others on the network
I can’t continue to use the Blockchain unless I restore a correct version from the network!
2. Trusted data
So if you alter the data in a Block,
The links between Blocks will break.
This Blockchain no longer matches the other copies in the network,
So it’s obvious the data has been altered and cannot be trusted!
And that’s how Blockchain works! Simple, right?
3. Types of Blockchain Network
(Different Blocks for different folks)
3. Public and Permissioned Blockchains
Public Blockchains Permissioned Blockchains
Anyone can join
Participants can be anonymous
Adding data is slow and expensive
Enables ‘trustless’ transactions
(i.e. Cryptocurrencies)
Only for invited participants
Members are not anonymous
Adding data is faster and cheaper
‘Enterprise’ use cases
(e.g. FinTech)
Private Blockchains
Controlled by a single entity or organisation
Utterly pointless!
3. Smart Contracts
Computer code that can be stored on the Blockchain
Automatically carries out some action when triggered
3. Types of Blockchain
So Public Blockchains are open to everyone, and enable anonymous
transactions.
Permissioned Blockchains are only open to invited participants, and
support enterprise applications.
Smart Contracts can automate processes.
So just one more question…
4. Do we actually need a
Blockchain?
(Probably not)
Do you need a shared database?
Do you want your data to be
immutable and time-stamped?
Are there trust issues or competing
interests among participants?
You don’t need a Blockchain!
It offers you no benefits.
No
No
No
Yes
Yes
Are you planning to store data that
will need amending or deleting?
Are you planning to store sensitive
or personal data?
Consider not using Blockchain
Only store digital signatures (hashes)
Yes
Yes
You might have a valid use
case for Blockchain
Yes
No No
Reading List
Lemieux - ‘Blockchain Technology & Recordkeeping’, ARMA 2019
◦ Http://armaedfoundation.org/research-program_menu/research-reports/
Pelz-Sharpe, Begley & Bushell - ‘Records Management &
Blockchain - Proceed but with caution’ Deep-Analysis.net 2018
◦ https://docs.wixstatic.com/ugd/74369c_83ae4fe781914ab2ab6872cc9986769a.pdf
Jonathan Bushell
Jonathan.bushell@royalsociety.org
Rob Begley
irmrjb@gmail.com

The Nuts and Bolts of Blockchain

  • 1.
    The Nuts andBolts of Blockchain ROB BEGLEY AND JONATHAN BUSHELL
  • 2.
    Building understanding 1. Whatis Blockchain? 2. How does it work? 3. Different types of Blockchain
  • 3.
    1. What isBlockchain? (in plain English)
  • 4.
    1. What isBlockchain? The ‘Blockchain’ is a way of storing data Or to put it simply… It’s a database
  • 5.
    1. Database witha difference The database is decentralized Multiple copies linked together in a network No ‘master’ version Stored data is immutable Add Data Amend or Delete Data
  • 6.
    1. Immutability andtrust Immutability builds trust Proof that data hasn’t been tampered with or changed This could be useful for Records of transactions Health records Deeds or contracts Identification But could also be risky What about Retention? What about GDPR?
  • 7.
    2. How doesit work? (The core principles)
  • 8.
    2. A distributeddatabase ‘Traditional’ Database Client-server model Distributed Database Peer-to-peer model
  • 9.
    2. Adding data EndUser Blockchain Network Data Block
  • 10.
    2. With usso far? So the Blockchain is a database, and there are multiple copies (‘nodes’), spread across a network. Users send data to the network, and it gets automatically added to the database. …but how does that work exactly?
  • 11.
  • 12.
    2. Updating theBlockchain So one ‘node’ is chosen at random by an algorithm, and that ‘node’ processes the new Block of data. The ‘node’ updates its own copy of the Blockchain database, and then sends that update out to all the other ‘nodes’. …but what exactly is a Block?
  • 13.
    2. The Block– a visual guide 01/10/2019 13:23 s8Fb4X1… Link to previous ‘block’ Timestamp Unique ID New Block Existing Blockchain
  • 14.
    2. The Blockin a nutshell So a Block stores my data in an immutable container, With timestamp metadata. Every block has a unique identifier, Which is used to link Blocks together in a Chain. …So where does the unique identifier come from?
  • 15.
  • 16.
    2. Hashing madesimple So every Block is run through a hashing algorithm. This generates a unique identifier for every Block, Which is used to link Blocks together to form a Blockchain. So, just one final question… …What is the point of it all?
  • 17.
    2. How theBlockchain protects data a58iB9 4C8iB9… Let’s suppose I tamper with the data in this Block… v2 If I change the data in the Block, the Unique ID hash of the Block also changes 8i 4C Now this link no longer works; the Chain is broken! Most importantly: My copy of the Blockchain no longer matches all the others on the network I can’t continue to use the Blockchain unless I restore a correct version from the network!
  • 18.
    2. Trusted data Soif you alter the data in a Block, The links between Blocks will break. This Blockchain no longer matches the other copies in the network, So it’s obvious the data has been altered and cannot be trusted! And that’s how Blockchain works! Simple, right?
  • 19.
    3. Types ofBlockchain Network (Different Blocks for different folks)
  • 20.
    3. Public andPermissioned Blockchains Public Blockchains Permissioned Blockchains Anyone can join Participants can be anonymous Adding data is slow and expensive Enables ‘trustless’ transactions (i.e. Cryptocurrencies) Only for invited participants Members are not anonymous Adding data is faster and cheaper ‘Enterprise’ use cases (e.g. FinTech) Private Blockchains Controlled by a single entity or organisation Utterly pointless!
  • 21.
    3. Smart Contracts Computercode that can be stored on the Blockchain Automatically carries out some action when triggered
  • 22.
    3. Types ofBlockchain So Public Blockchains are open to everyone, and enable anonymous transactions. Permissioned Blockchains are only open to invited participants, and support enterprise applications. Smart Contracts can automate processes. So just one more question…
  • 23.
    4. Do weactually need a Blockchain? (Probably not)
  • 24.
    Do you needa shared database? Do you want your data to be immutable and time-stamped? Are there trust issues or competing interests among participants? You don’t need a Blockchain! It offers you no benefits. No No No Yes Yes Are you planning to store data that will need amending or deleting? Are you planning to store sensitive or personal data? Consider not using Blockchain Only store digital signatures (hashes) Yes Yes You might have a valid use case for Blockchain Yes No No
  • 25.
    Reading List Lemieux -‘Blockchain Technology & Recordkeeping’, ARMA 2019 ◦ Http://armaedfoundation.org/research-program_menu/research-reports/ Pelz-Sharpe, Begley & Bushell - ‘Records Management & Blockchain - Proceed but with caution’ Deep-Analysis.net 2018 ◦ https://docs.wixstatic.com/ugd/74369c_83ae4fe781914ab2ab6872cc9986769a.pdf Jonathan Bushell Jonathan.bushell@royalsociety.org Rob Begley irmrjb@gmail.com

Editor's Notes

  • #2 ROB Welcome, introduce us both
  • #3 ROB Outline of talk
  • #4 ROB
  • #5 ROB
  • #6 ROB Introduce these ideas, explain that we’ll cover them as the talk goes on. Keeping multiple copies of the database keeps all users honest -> If you tamper with your own copy, it’s immediately clear that you no longer match all the other copies. Immutability prevents data being overwritten or changed. Data cannot be tampered with or accidentally changed -> promotes trust in the accuracy and quality of the data. Prevents unauthorized / deliberate manipulation of the data.
  • #7 ROB
  • #8 ROB “So, Jon, how does it actually work? And keep it simple, please!”
  • #9 JON <Click> Traditional database model <Click> Distributed model Blockchain doesn’t have a single master database that all users connect to Multiple copies Stored across a network of computers (nodes) Could be run by an individual, or an organization
  • #10 JON So, let’s say I have some data. Could be a transaction record, or a PDF, or an image file, or many image files, or a huge video file – in theory, the sky is the limit! So if I want to add this data to a Blockchain database, as an end user all I need is some way to start the process Might have to upload it or submit it through a piece of software, might be as simple as saving it to a specific location. Sent to the Blockchain network for processing.
  • #11 ROB
  • #12 JON 1. One network ‘node’ is chosen by an algorithm Various algorithms (Proof of Work, Proof of Stake, Practical Byzantine Fault Tolerance, etc.) 2. This ‘node’ then processes the new block by adding some metadata to it Adds the timestamp Adds link to previous block Generates unique ID 3. ‘Node’ verifies that the block has been processed correctly 4. Adds block to copy of Blockchain 5. Sends out an update to all other copies on the network
  • #13 ROB
  • #14 JON So first, here is our existing Blockchain database. <Click for Timestamp> Timestamp metadata is added – exact record of when the block was added to the chain. <Click for Unique ID> Unique identifier Based on all the data in the block (including the contents and all the metadata) Used to link to this block It adds a link to the most recent Block in the database. Each block links to the one immediately before it. So that’s what my new block of data looks like on the Blockchain. Obviously when the next block is added, it goes after my block, and links back to it, like so <click to hide labels and bring up new block>
  • #15 ROB
  • #16 JON A hashing algorithm takes any data (like a word document) and uses it to generate a unique identifier i.e. a string of random numbers and letters unique to that data Can be used to verify the integrity of data If you change the data, even a little bit, The algorithm produces a very different hash value This is a one-way encryption process So you’ll get the same result every time you hash the same data But you can never turn a hash back into the original data used to generate it Not a new concept – e.g. may be familiar with MD5 Checksums, often used to check integrity of downloaded files
  • #17 ROB
  • #18 JON
  • #19 ROB
  • #20 ROB “How many Blockchains are there? Is it all on one network, or are there loads of them? Are they all the same?”
  • #21 JON
  • #22 JON Self-verifiable Self-executable Tamper Proof So if we record copyright assets and copyright ownership on the Blockchain, for instance, Smart Contracts could be used to automate licencing payments. So I publish a new paper containing a copyright image Smart contract is triggered Rights holder is transferred the appropriate fee All happening automatically – but obviously requires a lot of different systems to be talking to each other and working together!
  • #23 ROB
  • #24 ROB
  • #25 JON
  • #26 ROB