SlideShare a Scribd company logo
Blockchain Transactions
Dr. Bastian Blankenburg, UTU Technologies Limited



Nairobi, October 2018
Outline
1. Blockchain components and protocols

1. Recap: blocks and consensus

2. Types of assets

3. Transactions: types and signing

2. Cryptographic methods used in blockchains 

3. Exercise: continue ongoing smart contract development exercise
Blockchain components and protocols
Part 1
Recap: blocks and consensus
Blockchain: creating a fixed order of blocks of transactions using
p2p time-stamping by Proof of Work:

1. Everybody can create blocks + hashes.

2. But: hashing is made difficult.

3. Broadcast blocks to all known nodes (recursively)

4. Consensus: the longest chain always wins.
Sources: Bitcoin: A Peer-to-Peer Electronic Cash System. Nakamoto, 2008, https://bitcoin.org/bitcoin.pdf,

https://en.wikipedia.org/wiki/Blockchain
Byzantine Generals Problem
Source: https://medium.com/@sardorislomov/what-is-byzantine-generals-problem-1f436b49bc23
Byzantine Generals Problem
Source: https://medium.com/@sardorislomov/what-is-byzantine-generals-problem-1f436b49bc23
Crypto Assets
Types of crypto/digital assets:

• “Natively" digital: 

• Crypto currencies like Bitcoin

• Other ditigal entities like cryptokitties

• Representation of a real-world asset

• Land ownership

• Art usage rights

• Concert tickets

• …
Source: https://www.stateofthedapps.com/dapps/cryptokitties
Source: https://blockgeeks.com/guides/smart-contracts/
Tokens
Assets are represented on the blockchain via smart contracts as
tokens. A token

• is issued and transferred via its defining smart contract and

• represents rights and/or obligations to some asset and therefore
has some value.

Source: https://hackernoon.com/the-token-handbook-a80244a6aacb
NB: a crypto currency is the native token of a blockchain, where the blockchain
implementation itself can be viewed as a sort of native smart contract.
Transactions on Bitcoin
Transaction types: depending on the blockchain. 

Bitcoin:

• Pay to PubKey Hash: sending Bitcoin to an
address

• Pay to PubKey: assigning newly mined Bitcoin

• Pay to Script Hash: sends an amount to a
“script hash”, which can then be claimed by
the recipient by providing that script. 

• Multi-Signature: multiple signatures required
to spend

• (a few more exotic ones) Source: https://blockgeeks.com/bitcoin-transactions/
Transactions on Æternity
Æternity: two main types:

1. Data transactions: 

• Spend: transfer of Æ

• Oracle: creation, registration,
responses

• Naming: claiming, updating,
transferring, revoking

• Channels: creation, closing, settling

2. Smart contracts: compile, deploy, call
Source: elixir-node source code
Cryptographic methods used in
blockchains
Part 2
Public/Private Key Cryptography for Signing Transactions
Source: https://www.slideshare.net/easel1/django-cryptography/16-Asymmetric_Nway_encrypt_decrypt_sign
Implementation in elixir-node
Source: elixir-node source code
NB: when using cryptography in application, always use standard crypto libraries
unless you’re learning, doing crypto research or building a crypto library.
Public/Private Key Cryptography Methods
• Mathematical functions which are 

1. easy to compute but

2. hard to compute the reverse.

• Examples:

• Exponentiation over finite fields (Diffie–Hellman, DH),
key agreement only

• Exponentiation modulo a product of 2 large primes
(RSA)

• Discrete logarithm (ElGamal, DSA)

• Elliptic Curve, i.e. discrete logarithm of a random
elliptic curve elements

• more secure, fast, smaller keys 

• widely used in blockchain

https://arstechnica.com/information-technology/2013/10/a-relatively-easy-to-
understand-primer-on-elliptic-curve-cryptography/2/
Merkle Trees
https://hackernoon.com/merkle-trees-181cb4bc30b4
Used to efficiently store and verify many hashes in a block.
Merkle Trees
https://hackernoon.com/merkle-trees-181cb4bc30b4
Used to efficiently store and verify many hashes in a block.
Exercise
Part 3
Exercise: transactions
1. Create and sign transactions,
2. inspect the block chain,
3. manually verify transactions


Exercise: Free for All Contract
1. https://github.com/aeternity/protocol/blob/master/contracts/sophia.md

2. Example: free-for-all account:

contract Test =

record state = {balance : int}
public function init() : state = {balance = 0}
public stateful function add(amount: int) = put(state{balance @ b = b + amount})
public function getBalance() = state.balance
public stateful function withdraw(amount: int) =
if(amount < state.balance)
put(state{balance @ b = b - amount})
amount
else
0

Exercise: Free for All Contract
Exercise: 

1. Use actual tokens transfer instead of just assigning ints

2. Everybody has their own balance and add, getBalance and withdraw
work only for the caller’s balance.
Thank you!

More Related Content

What's hot

Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
Blockchain Council
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
Alex Chepurnoy
 
Presentation about Blockchain technology
Presentation about Blockchain technologyPresentation about Blockchain technology
Presentation about Blockchain technology
Zakaria Hossain
 
Blockchain
BlockchainBlockchain
Blockchain
Soichiro Takagi
 
Security and privacy with blockchain
Security and privacy with blockchainSecurity and privacy with blockchain
Security and privacy with blockchain
Celine George
 
Build your first blockchain
Build your first blockchainBuild your first blockchain
Build your first blockchain
Đoàn Thái Thiên Lộc
 
Blockchain & Cryptocurrency
Blockchain & CryptocurrencyBlockchain & Cryptocurrency
Blockchain & Cryptocurrency
Sumit Rajpal
 
How Blockchain Is Different From Cryptocurrency?
How Blockchain Is Different From Cryptocurrency?How Blockchain Is Different From Cryptocurrency?
How Blockchain Is Different From Cryptocurrency?
Endive Software
 
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Svetlin Nakov
 
02 hello smart contracts
02 hello smart contracts02 hello smart contracts
02 hello smart contracts
BastianBlankenburg
 
Blockchain Programming
Blockchain ProgrammingBlockchain Programming
Blockchain Programming
Rhea Myers
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
Shun Shiku
 
Technical toolkit for a blockchain startup
Technical toolkit for a blockchain startupTechnical toolkit for a blockchain startup
Technical toolkit for a blockchain startup
Portia Burton
 
Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security
Johnson, Chuan Zhang CISM CCSK OSCP
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Svetlin Nakov
 
Overview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsOverview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus Mechanisms
Johannes Ahlmann
 
Front-End Development for dApps on Tezos
Front-End Development for dApps on TezosFront-End Development for dApps on Tezos
Front-End Development for dApps on Tezos
Neven6
 
IDC - Blockchain Threat Model
IDC - Blockchain Threat ModelIDC - Blockchain Threat Model
IDC - Blockchain Threat Model
PeteLind
 
The Future of Security Tokens: Myths and Realities
The Future of Security Tokens: Myths and RealitiesThe Future of Security Tokens: Myths and Realities
The Future of Security Tokens: Myths and Realities
Jesus Rodriguez
 
Block chain
Block chainBlock chain
Block chain
TejashBansal2
 

What's hot (20)

Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
Blockchain And Cryptocurrency : How Blockchain And Cryptocurrency Relate To E...
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
 
Presentation about Blockchain technology
Presentation about Blockchain technologyPresentation about Blockchain technology
Presentation about Blockchain technology
 
Blockchain
BlockchainBlockchain
Blockchain
 
Security and privacy with blockchain
Security and privacy with blockchainSecurity and privacy with blockchain
Security and privacy with blockchain
 
Build your first blockchain
Build your first blockchainBuild your first blockchain
Build your first blockchain
 
Blockchain & Cryptocurrency
Blockchain & CryptocurrencyBlockchain & Cryptocurrency
Blockchain & Cryptocurrency
 
How Blockchain Is Different From Cryptocurrency?
How Blockchain Is Different From Cryptocurrency?How Blockchain Is Different From Cryptocurrency?
How Blockchain Is Different From Cryptocurrency?
 
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
 
02 hello smart contracts
02 hello smart contracts02 hello smart contracts
02 hello smart contracts
 
Blockchain Programming
Blockchain ProgrammingBlockchain Programming
Blockchain Programming
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
Technical toolkit for a blockchain startup
Technical toolkit for a blockchain startupTechnical toolkit for a blockchain startup
Technical toolkit for a blockchain startup
 
Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security
 
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
Multi-Signature Crypto-Wallets: Nakov at Blockchain Berlin 2018
 
Overview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsOverview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus Mechanisms
 
Front-End Development for dApps on Tezos
Front-End Development for dApps on TezosFront-End Development for dApps on Tezos
Front-End Development for dApps on Tezos
 
IDC - Blockchain Threat Model
IDC - Blockchain Threat ModelIDC - Blockchain Threat Model
IDC - Blockchain Threat Model
 
The Future of Security Tokens: Myths and Realities
The Future of Security Tokens: Myths and RealitiesThe Future of Security Tokens: Myths and Realities
The Future of Security Tokens: Myths and Realities
 
Block chain
Block chainBlock chain
Block chain
 

Similar to 03 blockchain transactions

Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
Narudom Roongsiriwong, CISSP
 
Decentralized Application: A Software Engineering Perspective
Decentralized Application: A Software Engineering PerspectiveDecentralized Application: A Software Engineering Perspective
Decentralized Application: A Software Engineering Perspective
Bambang Purnomosidi D. P.
 
Blockchain technology & it's application
Blockchain technology & it's applicationBlockchain technology & it's application
Blockchain technology & it's application
Bhushan Vidhate
 
BCHGraz - Meetup #8 - Intro & Ethereum
 BCHGraz - Meetup #8 - Intro & Ethereum BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & Ethereum
BlockchainHub Graz
 
blockchain.pptx
blockchain.pptxblockchain.pptx
blockchain.pptx
19MEB302SahilAli
 
Blockchain: No Thunder No Wonder
Blockchain: No Thunder No Wonder  Blockchain: No Thunder No Wonder
Blockchain: No Thunder No Wonder
Ali Al-Sherbaz
 
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsUnderstanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Gautam Anand
 
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsBlockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and Applications
Ingo Weber
 
chapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptxchapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptx
AschalewAyele2
 
chapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptxchapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptx
AschalewAyele2
 
The Impact and Potential of Blockchain on the Banking Sector
The Impact and Potential of Blockchain on the Banking SectorThe Impact and Potential of Blockchain on the Banking Sector
The Impact and Potential of Blockchain on the Banking Sector
PECB
 
Blockchain mechanism for IET Mauritius Network
Blockchain mechanism for IET Mauritius NetworkBlockchain mechanism for IET Mauritius Network
Blockchain mechanism for IET Mauritius Network
charles okaformbah
 
Iceic2019 final presented
Iceic2019 final presentedIceic2019 final presented
Iceic2019 final presented
Heung-No Lee
 
Blockchain, Finance & Regulatory Development
Blockchain, Finance & Regulatory DevelopmentBlockchain, Finance & Regulatory Development
Blockchain, Finance & Regulatory Development
Alex Makosz
 
Blockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital TransformationBlockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital Transformation
Dr. Mohamed Torky
 
Blockchain technology.docx
Blockchain technology.docxBlockchain technology.docx
Blockchain technology.docx
aymenabbaci
 
An Investor's Guide to Web3 / Crypto / Blockchain
An Investor's Guide to Web3 / Crypto / BlockchainAn Investor's Guide to Web3 / Crypto / Blockchain
An Investor's Guide to Web3 / Crypto / Blockchain
Bernard Leong
 
Blockchain and Crypto 101 - October 2017
Blockchain and Crypto 101 - October 2017Blockchain and Crypto 101 - October 2017
Blockchain and Crypto 101 - October 2017
🔗Audrey Chaing
 
blockchain .technology.pptx
blockchain .technology.pptxblockchain .technology.pptx
blockchain .technology.pptx
Amit Kumar
 
Lapine blockchain introduction 10/04/2018
Lapine blockchain introduction 10/04/2018Lapine blockchain introduction 10/04/2018
Lapine blockchain introduction 10/04/2018
Chuck Bair
 

Similar to 03 blockchain transactions (20)

Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
Decentralized Application: A Software Engineering Perspective
Decentralized Application: A Software Engineering PerspectiveDecentralized Application: A Software Engineering Perspective
Decentralized Application: A Software Engineering Perspective
 
Blockchain technology & it's application
Blockchain technology & it's applicationBlockchain technology & it's application
Blockchain technology & it's application
 
BCHGraz - Meetup #8 - Intro & Ethereum
 BCHGraz - Meetup #8 - Intro & Ethereum BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & Ethereum
 
blockchain.pptx
blockchain.pptxblockchain.pptx
blockchain.pptx
 
Blockchain: No Thunder No Wonder
Blockchain: No Thunder No Wonder  Blockchain: No Thunder No Wonder
Blockchain: No Thunder No Wonder
 
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) AlgorithmsUnderstanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
Understanding Proof of Work (PoW) and Proof of Stake (PoS) Algorithms
 
Blockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and ApplicationsBlockchain and BPM - Reflections on Four Years of Research and Applications
Blockchain and BPM - Reflections on Four Years of Research and Applications
 
chapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptxchapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptx
 
chapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptxchapter 4 Selected Topics in computer.pptx
chapter 4 Selected Topics in computer.pptx
 
The Impact and Potential of Blockchain on the Banking Sector
The Impact and Potential of Blockchain on the Banking SectorThe Impact and Potential of Blockchain on the Banking Sector
The Impact and Potential of Blockchain on the Banking Sector
 
Blockchain mechanism for IET Mauritius Network
Blockchain mechanism for IET Mauritius NetworkBlockchain mechanism for IET Mauritius Network
Blockchain mechanism for IET Mauritius Network
 
Iceic2019 final presented
Iceic2019 final presentedIceic2019 final presented
Iceic2019 final presented
 
Blockchain, Finance & Regulatory Development
Blockchain, Finance & Regulatory DevelopmentBlockchain, Finance & Regulatory Development
Blockchain, Finance & Regulatory Development
 
Blockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital TransformationBlockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital Transformation
 
Blockchain technology.docx
Blockchain technology.docxBlockchain technology.docx
Blockchain technology.docx
 
An Investor's Guide to Web3 / Crypto / Blockchain
An Investor's Guide to Web3 / Crypto / BlockchainAn Investor's Guide to Web3 / Crypto / Blockchain
An Investor's Guide to Web3 / Crypto / Blockchain
 
Blockchain and Crypto 101 - October 2017
Blockchain and Crypto 101 - October 2017Blockchain and Crypto 101 - October 2017
Blockchain and Crypto 101 - October 2017
 
blockchain .technology.pptx
blockchain .technology.pptxblockchain .technology.pptx
blockchain .technology.pptx
 
Lapine blockchain introduction 10/04/2018
Lapine blockchain introduction 10/04/2018Lapine blockchain introduction 10/04/2018
Lapine blockchain introduction 10/04/2018
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

03 blockchain transactions

  • 1. Blockchain Transactions Dr. Bastian Blankenburg, UTU Technologies Limited
 
 Nairobi, October 2018
  • 2. Outline 1. Blockchain components and protocols 1. Recap: blocks and consensus 2. Types of assets 3. Transactions: types and signing 2. Cryptographic methods used in blockchains 3. Exercise: continue ongoing smart contract development exercise
  • 3. Blockchain components and protocols Part 1
  • 4. Recap: blocks and consensus Blockchain: creating a fixed order of blocks of transactions using p2p time-stamping by Proof of Work: 1. Everybody can create blocks + hashes. 2. But: hashing is made difficult. 3. Broadcast blocks to all known nodes (recursively) 4. Consensus: the longest chain always wins. Sources: Bitcoin: A Peer-to-Peer Electronic Cash System. Nakamoto, 2008, https://bitcoin.org/bitcoin.pdf,
 https://en.wikipedia.org/wiki/Blockchain
  • 5. Byzantine Generals Problem Source: https://medium.com/@sardorislomov/what-is-byzantine-generals-problem-1f436b49bc23
  • 6. Byzantine Generals Problem Source: https://medium.com/@sardorislomov/what-is-byzantine-generals-problem-1f436b49bc23
  • 7. Crypto Assets Types of crypto/digital assets: • “Natively" digital: • Crypto currencies like Bitcoin • Other ditigal entities like cryptokitties • Representation of a real-world asset • Land ownership • Art usage rights • Concert tickets • … Source: https://www.stateofthedapps.com/dapps/cryptokitties Source: https://blockgeeks.com/guides/smart-contracts/
  • 8. Tokens Assets are represented on the blockchain via smart contracts as tokens. A token • is issued and transferred via its defining smart contract and • represents rights and/or obligations to some asset and therefore has some value. Source: https://hackernoon.com/the-token-handbook-a80244a6aacb NB: a crypto currency is the native token of a blockchain, where the blockchain implementation itself can be viewed as a sort of native smart contract.
  • 9. Transactions on Bitcoin Transaction types: depending on the blockchain. 
 Bitcoin: • Pay to PubKey Hash: sending Bitcoin to an address • Pay to PubKey: assigning newly mined Bitcoin • Pay to Script Hash: sends an amount to a “script hash”, which can then be claimed by the recipient by providing that script. • Multi-Signature: multiple signatures required to spend • (a few more exotic ones) Source: https://blockgeeks.com/bitcoin-transactions/
  • 10. Transactions on Æternity Æternity: two main types: 1. Data transactions: • Spend: transfer of Æ • Oracle: creation, registration, responses • Naming: claiming, updating, transferring, revoking • Channels: creation, closing, settling 2. Smart contracts: compile, deploy, call Source: elixir-node source code
  • 11. Cryptographic methods used in blockchains Part 2
  • 12. Public/Private Key Cryptography for Signing Transactions Source: https://www.slideshare.net/easel1/django-cryptography/16-Asymmetric_Nway_encrypt_decrypt_sign
  • 13. Implementation in elixir-node Source: elixir-node source code NB: when using cryptography in application, always use standard crypto libraries unless you’re learning, doing crypto research or building a crypto library.
  • 14. Public/Private Key Cryptography Methods • Mathematical functions which are 1. easy to compute but 2. hard to compute the reverse. • Examples: • Exponentiation over finite fields (Diffie–Hellman, DH), key agreement only • Exponentiation modulo a product of 2 large primes (RSA) • Discrete logarithm (ElGamal, DSA) • Elliptic Curve, i.e. discrete logarithm of a random elliptic curve elements • more secure, fast, smaller keys • widely used in blockchain https://arstechnica.com/information-technology/2013/10/a-relatively-easy-to- understand-primer-on-elliptic-curve-cryptography/2/
  • 15. Merkle Trees https://hackernoon.com/merkle-trees-181cb4bc30b4 Used to efficiently store and verify many hashes in a block.
  • 16. Merkle Trees https://hackernoon.com/merkle-trees-181cb4bc30b4 Used to efficiently store and verify many hashes in a block.
  • 18. Exercise: transactions 1. Create and sign transactions, 2. inspect the block chain, 3. manually verify transactions 

  • 19. Exercise: Free for All Contract 1. https://github.com/aeternity/protocol/blob/master/contracts/sophia.md 2. Example: free-for-all account: contract Test = record state = {balance : int} public function init() : state = {balance = 0} public stateful function add(amount: int) = put(state{balance @ b = b + amount}) public function getBalance() = state.balance public stateful function withdraw(amount: int) = if(amount < state.balance) put(state{balance @ b = b - amount}) amount else 0

  • 20. Exercise: Free for All Contract Exercise: 1. Use actual tokens transfer instead of just assigning ints 2. Everybody has their own balance and add, getBalance and withdraw work only for the caller’s balance.