SlideShare a Scribd company logo
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptocurrency 101 & 201
Kristen Stone
Product Manager
Coinbase
S e s s i o n I D
Jake Craige
Senior Engineer
Coinbase
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Cryptocurrency 101:
• Why do blockchains matter?
• A short history of Blockchain Technology
Cryptocurrency 201:
• Crash course in blockchain technology
• Consensus Algorithms
• Data models
• Programmability
Decentralizing currency
provides new opportunities
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
< / >
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
110M
Records
143M
Records
76M
Records
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
< / > < / >
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
A short history of Crypto
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2008:
Bitcoin white paper
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2008:
Bitcoin white paper
2012:
Coinbase founded
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2008:
Bitcoin white paper
2012:
Coinbase founded
2014:
Merchant Payments
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2008:
Bitcoin white paper
2012:
Coinbase founded
2014:
Merchant Payments
2015:
Private Blockchain initiatives
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2008:
Bitcoin white paper
2012:
Coinbase founded
2014:
Merchant Payments
2015:
Private Blockchain initiatives
2016:
Emerging asset class
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
2008:
Bitcoin white paper
2012:
Coinbase founded
2014:
Merchant Payments
2015:
Private Blockchain initiatives
2016:
Emerging asset class
2017:
Smart Contracts
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptocurrency 201
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What makes up a blockchain?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What makes up a blockchain?
Economic
Incentives
Distributed
Consensus
Algorithms
Cryptography
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Hashing
Hello world SHA256
64ec88ca00b268e5
ba1a35678a1b5316
d212f4f366b24772
32534a8aeca37f3c
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Hashing
300 bits HashFn 256 bits
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Hashing
300 bits HashFn 256 bits
3M bits HashFn 256 bits
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Hashing
00000000 SHA256
5feceb66ffc86f38d952786c
6d696c79c2dbc239dd4e91b
46729d73a27fb57e9
00000100 SHA256
2c624232cdd221771294dfb
b310aca000a0df6ac8b66b6
96d90ef06fdefb64a3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Hashing
Cryptographically Secure
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Public-key Cryptography
• Asymmetric cryptography
• Private & public key pair
• Public key uses
• Hiding data with encryption
• Verifying signatures
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cryptography: Signatures
Sign(data, private key) Signature
Verify(data, signature, public key) Is valid?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
So what’s a blockchain?
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Blocks and Transactions
Block 1
Transaction
Transaction
Transaction
Previous Block Hash
Hash
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Blocks and Transactions
Block 1
Transaction
Transaction
Transaction
Previous Block Hash
Hash
Block 2
Transaction
Transaction
Transaction
Previous Block Hash
Hash
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Blocks and Transactions
Block 1
Transaction
Transaction
Transaction
Previous Block Hash
Hash
Block 2
Transaction
Transaction
Transaction
Previous Block Hash
Hash
Block 3
Transaction
Transaction
Transaction
Previous Block Hash
Hash
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Blocks and Transactions
Block 1
Transaction
Transaction
Transaction
Previous Block Hash
Hash
Block 2
Transaction
Transaction
Transaction
Previous Block Hash
Hash
Block 3
Transaction
Transaction
Transaction
Previous Block Hash
Hash
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sending a Transaction
Signed
Transaction
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sending a Transaction
Signed
Transaction
Node
Tx
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sending a Transaction
Signed
Transaction
Node
Miner
Node
Node
Tx
Tx
Tx
Tx
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sending a Transaction
Signed
Transaction
Node
Miner
Node
Node
Tx Tx
Tx
Block
Tx
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sending a Transaction
Signed
Transaction
Node
Miner
Node
Node
Block
Tx
Block
Tx
Block
Tx
Block
Tx
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols
• Proof of Work
• Proof of Stake
• And more…
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
• Computationally expensive to create a block
• Verifying the computation is efficient
• Chain with “most work” is the canonical chain
• Probabilistic finality
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
Difficulty:
A value determined by the network selected to make creating a block take
T time on average
Nonce:
An arbitrary value used to change the block hash
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
Block 1
Transactions
Previous Block Hash
Nonce
Difficulty = 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
Block 1
Transactions
Previous Block Hash
Nonce
Difficulty = 3
Set Nonce = 0 Hash(block) a8h36v37
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
Block 1
Transactions
Previous Block Hash
Nonce
Difficulty = 3
Set Nonce = 0 Hash(block) a8h36v37
Set Nonce = 1 Hash(block) 7y91h81g
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
Block 1
Transactions
Previous Block Hash
Nonce
Difficulty = 3
Set Nonce = 0 Hash(block) a8h36v37
Set Nonce = 1 Hash(block) 7y91h81g
Set Nonce = 3 Hash(block) 000cja01
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
oa912Height 0
Height 1
Height 2
Height 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
oa912
k19bc
Height 0
Height 1
Height 2
Height 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
oa912
k19bc 9sl18
Height 0
Height 1
Height 2
Height 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
oa912
k19bc 9sl18
o19bf
Height 0
Height 1
Height 2
Height 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
oa912
k19bc 9sl18
o19bf
8djb1
Height 0
Height 1
Height 2
Height 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Work
• Benefits
• Simple
• Battle-tested
• Problems
• Uses a lot of energy
• Probabilistic Finalization
• Security dependent on decentralized hash rate
• Slower blocks
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Stake
• Participants deposit and lock up funds in the system. This is called
“staking”
• A participant is randomly selected from this pool to produce a block
and publish it
• Other nodes receive it and validate it
• The block producer is punished for attempting to cheat and rewarded
for good blocks
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Stake
• Multiple versions of Proof of Stake
• Popular
• Delegated PoS (EOS, Tezos, Steem)
• Casper FFG/CBC PoS (Ethereum)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Consensus Protocols: Proof of Stake
• Benefits
• Faster blocks
• More energy efficient
• Punishments explicitly defined
• Problems
• Less-battle tested
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: UTXOs
• Transaction Inputs & Outputs
• UTXO is an “Unspent Transaction Output”
• No in-protocol concept of a “balance” for an address
• Used by:
• Bitcoin
• Monero
• Zcash
• Cardano
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: UTXOs
Transaction
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: UTXOs
Transaction
5 BTC
Inputs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: UTXOs
Transaction
5 BTC 3 BTC
1 BTC
Destination
Change
Inputs Outputs
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: UTXOs
Transaction
5 BTC 3 BTC
1 BTC
Destination
Change
Inputs Outputs
1 BTC fee
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: Accounts
• Like a bank account
• Account balance is changed over time from transactions
• Used by:
• Ethereum
• EOS
• Tezos
• Stellar
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: Accounts
Transaction
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: Accounts
Transaction
Account Balance
Miner 0 ETH
Alice 5 ETH
Bob 0 ETH
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: Accounts
Transaction
From Alice
To Bob
Value 3 ETH
Fee 1 ETH
Account Balance
Miner 0 ETH
Alice 5 ETH
Bob 0 ETH
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Models: Accounts
Transaction
From Alice
To Bob
Value 3 ETH
Fee 1 ETH
Account Balance
Miner 0 ETH
Alice 5 ETH
Bob 0 ETH
Account Balance
Miner 1 ETH
Alice 1 ETH
Bob 3 ETH
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script
• Script is simple, stack-based, and processed from left to right. It is
intentionally not Turing-complete, with no loops.
• Outputs include a partially complete script
• Inputs include the other half to complete it
• Script must evaluate to true for the output to be spent
• Protocol defines standard supported scripts
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Type: pay-to-pubkey-hash (p2pkh)
scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
scriptSig: <sig> <pubKey>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey>
<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey>
<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA>
OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> <pubKeyHash>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey>
<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA>
OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> <pubKeyHash>
OP_CHECKSIG<sig> <pubKey>
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Bitcoin Script (P2PKH)
Stack Script
<sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey>
<pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA>
OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> <pubKeyHash>
OP_CHECKSIG<sig> <pubKey>
true
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Ethereum VM
• Turing complete virtual machine
• Stateful “smart contracts” are deployed to the network
• Operations are metered and cost “gas” to prevent DoS attacks
• Complex computations cost more
• Higher level languages (Solidity, Vyper)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Ethereum VM (ERC-20)
interface IPartialERC20 {
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
// other details omitted
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Ethereum VM (ERC-20)
contract PartialERC20 {
mapping (address => uint256) private _balances;
function transfer(address to, uint256 value) public returns (bool) {
_balances[msg.sender] = _balances[msg.sender].sub(value);
_balances[to] = _balances[to].add(value);
return true;
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Ethereum VM (ERC-20)
contract PartialERC20 {
mapping (address => uint256) private _balances;
function transfer(address to, uint256 value) public returns (bool) {
_balances[msg.sender] = _balances[msg.sender].sub(value);
_balances[to] = _balances[to].add(value);
return true;
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Programmability: Ethereum VM (ERC-20)
contract PartialERC20 {
mapping (address => uint256) private _balances;
function transfer(address to, uint256 value) public returns (bool) {
_balances[msg.sender] = _balances[msg.sender].sub(value);
_balances[to] = _balances[to].add(value);
return true;
}
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
And more…
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kristen Stone Jake Craige Please join our Coinbase Crypto
Happy Hour starting right after this!
We’ll have hor d’oeuvres and a fully
hosted bar.

More Related Content

Similar to re:Invent 2018 - Cryptocurrency 101/201 by Kristen Stone and Jake Craige

Scaling Push Messaging for Millions of Netflix Devices
Scaling Push Messaging for Millions of Netflix DevicesScaling Push Messaging for Millions of Netflix Devices
Scaling Push Messaging for Millions of Netflix Devices
Susheel Aroskar
 
Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...
Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...
Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...
Amazon Web Services
 
Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018
Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018
Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018
Amazon Web Services
 
Blockchain on AWS
Blockchain on AWSBlockchain on AWS
Blockchain on AWS
Amazon Web Services
 
Keynote - Chaos Engineering: Why breaking things should be practiced
Keynote - Chaos Engineering: Why breaking things should be practicedKeynote - Chaos Engineering: Why breaking things should be practiced
Keynote - Chaos Engineering: Why breaking things should be practiced
AWS User Group Bengaluru
 
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
Amazon Web Services
 
AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018
AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018
AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018
Amazon Web Services Korea
 
Workshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data LakeWorkshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data Lake
Amazon Web Services
 
Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...
Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...
Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...
Amazon Web Services
 
The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...
The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...
The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...
Amazon Web Services
 
Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...
Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...
Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...
Amazon Web Services
 
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksLife of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Amazon Web Services
 
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
Amazon Web Services Japan
 
Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...
Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...
Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...
Amazon Web Services
 
Building Highly Scalable Retail Order Management Systems with Serverless
Building Highly Scalable Retail Order Management Systems with ServerlessBuilding Highly Scalable Retail Order Management Systems with Serverless
Building Highly Scalable Retail Order Management Systems with Serverless
Amazon Web Services
 
Come scalare da zero ai tuoi primi 10 milioni di utenti.pdf
Come scalare da zero ai tuoi primi 10 milioni di utenti.pdfCome scalare da zero ai tuoi primi 10 milioni di utenti.pdf
Come scalare da zero ai tuoi primi 10 milioni di utenti.pdf
Amazon Web Services
 
Keynote
KeynoteKeynote
Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams
Amazon Web Services
 
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
Amazon Web Services
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Amazon Web Services
 

Similar to re:Invent 2018 - Cryptocurrency 101/201 by Kristen Stone and Jake Craige (20)

Scaling Push Messaging for Millions of Netflix Devices
Scaling Push Messaging for Millions of Netflix DevicesScaling Push Messaging for Millions of Netflix Devices
Scaling Push Messaging for Millions of Netflix Devices
 
Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...
Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...
Exploring Blockchain Technology, Risks, and Emerging Trends - ARC313 - re:Inv...
 
Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018
Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018
Chaos Engineering and Scalability at Audible.com (ARC308) - AWS re:Invent 2018
 
Blockchain on AWS
Blockchain on AWSBlockchain on AWS
Blockchain on AWS
 
Keynote - Chaos Engineering: Why breaking things should be practiced
Keynote - Chaos Engineering: Why breaking things should be practicedKeynote - Chaos Engineering: Why breaking things should be practiced
Keynote - Chaos Engineering: Why breaking things should be practiced
 
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
The Theory and Math Behind Data Privacy and Security Assurance (SEC301) - AWS...
 
AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018
AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018
AWS를 활용한 상품 추천 서비스 구축::김태현:: AWS Summit Seoul 2018
 
Workshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data LakeWorkshop: Architecting a Serverless Data Lake
Workshop: Architecting a Serverless Data Lake
 
Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...
Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...
Introduction to Amazon Route 53 Resolver for Hybrid Cloud (NET215) - AWS re:I...
 
The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...
The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...
The Quest for Continuous ATO: A Case Study Featuring the US Intelligence Comm...
 
Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...
Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...
Lessons Learned from a Large-Scale Legacy Migration with Sysco (STG311) - AWS...
 
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech TalksLife of a Code Change to a Tier 1 Service - AWS Online Tech Talks
Life of a Code Change to a Tier 1 Service - AWS Online Tech Talks
 
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
20180724 AWS Black Belt Online Seminar Amazon Elastic Container Service for K...
 
Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...
Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...
Globalizing Player Accounts at Riot Games While Maintaining Availability (ARC...
 
Building Highly Scalable Retail Order Management Systems with Serverless
Building Highly Scalable Retail Order Management Systems with ServerlessBuilding Highly Scalable Retail Order Management Systems with Serverless
Building Highly Scalable Retail Order Management Systems with Serverless
 
Come scalare da zero ai tuoi primi 10 milioni di utenti.pdf
Come scalare da zero ai tuoi primi 10 milioni di utenti.pdfCome scalare da zero ai tuoi primi 10 milioni di utenti.pdf
Come scalare da zero ai tuoi primi 10 milioni di utenti.pdf
 
Keynote
KeynoteKeynote
Keynote
 
Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams Amazon CI-CD Practices for Software Development Teams
Amazon CI-CD Practices for Software Development Teams
 
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
AWS, I Choose You: Pokemon's Battle against the Bots (SEC402-R1) - AWS re:Inv...
 
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
Shift-Left SRE: Self-Healing with AWS Lambda Functions (DEV313-S) - AWS re:In...
 

Recently uploaded

introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
ravindarpurohit26
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
Ratnakar Mikkili
 
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
skuxot
 
This is my Environmental physics presentation
This is my Environmental physics presentationThis is my Environmental physics presentation
This is my Environmental physics presentation
ZainabHashmi17
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
zwunae
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
obonagu
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
bhadouriyakaku
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 

Recently uploaded (20)

introduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdfintroduction to solar energy for engineering.pdf
introduction to solar energy for engineering.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Exception Handling notes in java exception
Exception Handling notes in java exceptionException Handling notes in java exception
Exception Handling notes in java exception
 
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
一比一原版(UC Berkeley毕业证)加利福尼亚大学|伯克利分校毕业证成绩单专业办理
 
This is my Environmental physics presentation
This is my Environmental physics presentationThis is my Environmental physics presentation
This is my Environmental physics presentation
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单专业办理
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.pptPROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
PROJECT FORMAT FOR EVS AMITY UNIVERSITY GWALIOR.ppt
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 

re:Invent 2018 - Cryptocurrency 101/201 by Kristen Stone and Jake Craige

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptocurrency 101 & 201 Kristen Stone Product Manager Coinbase S e s s i o n I D Jake Craige Senior Engineer Coinbase
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Cryptocurrency 101: • Why do blockchains matter? • A short history of Blockchain Technology Cryptocurrency 201: • Crash course in blockchain technology • Consensus Algorithms • Data models • Programmability
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. < / >
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 110M Records 143M Records 76M Records
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. < / > < / >
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. A short history of Crypto
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2008: Bitcoin white paper
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2008: Bitcoin white paper 2012: Coinbase founded
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2008: Bitcoin white paper 2012: Coinbase founded 2014: Merchant Payments
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2008: Bitcoin white paper 2012: Coinbase founded 2014: Merchant Payments 2015: Private Blockchain initiatives
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2008: Bitcoin white paper 2012: Coinbase founded 2014: Merchant Payments 2015: Private Blockchain initiatives 2016: Emerging asset class
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. 2008: Bitcoin white paper 2012: Coinbase founded 2014: Merchant Payments 2015: Private Blockchain initiatives 2016: Emerging asset class 2017: Smart Contracts
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptocurrency 201
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What makes up a blockchain?
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. What makes up a blockchain? Economic Incentives Distributed Consensus Algorithms Cryptography
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Hashing Hello world SHA256 64ec88ca00b268e5 ba1a35678a1b5316 d212f4f366b24772 32534a8aeca37f3c
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Hashing 300 bits HashFn 256 bits
  • 21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Hashing 300 bits HashFn 256 bits 3M bits HashFn 256 bits
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Hashing 00000000 SHA256 5feceb66ffc86f38d952786c 6d696c79c2dbc239dd4e91b 46729d73a27fb57e9 00000100 SHA256 2c624232cdd221771294dfb b310aca000a0df6ac8b66b6 96d90ef06fdefb64a3
  • 23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Hashing Cryptographically Secure
  • 24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Public-key Cryptography • Asymmetric cryptography • Private & public key pair • Public key uses • Hiding data with encryption • Verifying signatures
  • 25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cryptography: Signatures Sign(data, private key) Signature Verify(data, signature, public key) Is valid?
  • 26. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. So what’s a blockchain?
  • 27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Blocks and Transactions Block 1 Transaction Transaction Transaction Previous Block Hash Hash
  • 28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Blocks and Transactions Block 1 Transaction Transaction Transaction Previous Block Hash Hash Block 2 Transaction Transaction Transaction Previous Block Hash Hash
  • 29. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Blocks and Transactions Block 1 Transaction Transaction Transaction Previous Block Hash Hash Block 2 Transaction Transaction Transaction Previous Block Hash Hash Block 3 Transaction Transaction Transaction Previous Block Hash Hash
  • 30. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Blocks and Transactions Block 1 Transaction Transaction Transaction Previous Block Hash Hash Block 2 Transaction Transaction Transaction Previous Block Hash Hash Block 3 Transaction Transaction Transaction Previous Block Hash Hash
  • 31. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Sending a Transaction Signed Transaction
  • 32. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Sending a Transaction Signed Transaction Node Tx
  • 33. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Sending a Transaction Signed Transaction Node Miner Node Node Tx Tx Tx Tx
  • 34. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Sending a Transaction Signed Transaction Node Miner Node Node Tx Tx Tx Block Tx
  • 35. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Sending a Transaction Signed Transaction Node Miner Node Node Block Tx Block Tx Block Tx Block Tx
  • 36. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols
  • 37. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols • Proof of Work • Proof of Stake • And more…
  • 38. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work • Computationally expensive to create a block • Verifying the computation is efficient • Chain with “most work” is the canonical chain • Probabilistic finality
  • 39. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work Difficulty: A value determined by the network selected to make creating a block take T time on average Nonce: An arbitrary value used to change the block hash
  • 40. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work Block 1 Transactions Previous Block Hash Nonce Difficulty = 3
  • 41. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work Block 1 Transactions Previous Block Hash Nonce Difficulty = 3 Set Nonce = 0 Hash(block) a8h36v37
  • 42. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work Block 1 Transactions Previous Block Hash Nonce Difficulty = 3 Set Nonce = 0 Hash(block) a8h36v37 Set Nonce = 1 Hash(block) 7y91h81g
  • 43. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work Block 1 Transactions Previous Block Hash Nonce Difficulty = 3 Set Nonce = 0 Hash(block) a8h36v37 Set Nonce = 1 Hash(block) 7y91h81g Set Nonce = 3 Hash(block) 000cja01
  • 44. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work oa912Height 0 Height 1 Height 2 Height 3
  • 45. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work oa912 k19bc Height 0 Height 1 Height 2 Height 3
  • 46. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work oa912 k19bc 9sl18 Height 0 Height 1 Height 2 Height 3
  • 47. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work oa912 k19bc 9sl18 o19bf Height 0 Height 1 Height 2 Height 3
  • 48. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work oa912 k19bc 9sl18 o19bf 8djb1 Height 0 Height 1 Height 2 Height 3
  • 49. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Work • Benefits • Simple • Battle-tested • Problems • Uses a lot of energy • Probabilistic Finalization • Security dependent on decentralized hash rate • Slower blocks
  • 50. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Stake • Participants deposit and lock up funds in the system. This is called “staking” • A participant is randomly selected from this pool to produce a block and publish it • Other nodes receive it and validate it • The block producer is punished for attempting to cheat and rewarded for good blocks
  • 51. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Stake • Multiple versions of Proof of Stake • Popular • Delegated PoS (EOS, Tezos, Steem) • Casper FFG/CBC PoS (Ethereum)
  • 52. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Consensus Protocols: Proof of Stake • Benefits • Faster blocks • More energy efficient • Punishments explicitly defined • Problems • Less-battle tested
  • 53. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models
  • 54. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: UTXOs • Transaction Inputs & Outputs • UTXO is an “Unspent Transaction Output” • No in-protocol concept of a “balance” for an address • Used by: • Bitcoin • Monero • Zcash • Cardano
  • 55. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: UTXOs Transaction
  • 56. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: UTXOs Transaction 5 BTC Inputs
  • 57. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: UTXOs Transaction 5 BTC 3 BTC 1 BTC Destination Change Inputs Outputs
  • 58. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: UTXOs Transaction 5 BTC 3 BTC 1 BTC Destination Change Inputs Outputs 1 BTC fee
  • 59. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: Accounts • Like a bank account • Account balance is changed over time from transactions • Used by: • Ethereum • EOS • Tezos • Stellar
  • 60. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: Accounts Transaction
  • 61. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: Accounts Transaction Account Balance Miner 0 ETH Alice 5 ETH Bob 0 ETH
  • 62. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: Accounts Transaction From Alice To Bob Value 3 ETH Fee 1 ETH Account Balance Miner 0 ETH Alice 5 ETH Bob 0 ETH
  • 63. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Models: Accounts Transaction From Alice To Bob Value 3 ETH Fee 1 ETH Account Balance Miner 0 ETH Alice 5 ETH Bob 0 ETH Account Balance Miner 1 ETH Alice 1 ETH Bob 3 ETH
  • 64. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability
  • 65. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script • Script is simple, stack-based, and processed from left to right. It is intentionally not Turing-complete, with no loops. • Outputs include a partially complete script • Inputs include the other half to complete it • Script must evaluate to true for the output to be spent • Protocol defines standard supported scripts
  • 66. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Type: pay-to-pubkey-hash (p2pkh) scriptPubKey: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG scriptSig: <sig> <pubKey>
  • 67. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty
  • 68. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey>
  • 69. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey>
  • 70. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA>
  • 71. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> <pubKeyHash>
  • 72. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> <pubKeyHash> OP_CHECKSIG<sig> <pubKey>
  • 73. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Bitcoin Script (P2PKH) Stack Script <sig> <pubKey> OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIGEmpty OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubKey> <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> OP_EQUALVERIFY OP_CHECKSIG<sig> <pubKey> <pubHashA> <pubKeyHash> OP_CHECKSIG<sig> <pubKey> true
  • 74. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Ethereum VM • Turing complete virtual machine • Stateful “smart contracts” are deployed to the network • Operations are metered and cost “gas” to prevent DoS attacks • Complex computations cost more • Higher level languages (Solidity, Vyper)
  • 75. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Ethereum VM (ERC-20) interface IPartialERC20 { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); // other details omitted }
  • 76. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Ethereum VM (ERC-20) contract PartialERC20 { mapping (address => uint256) private _balances; function transfer(address to, uint256 value) public returns (bool) { _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); return true; } }
  • 77. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Ethereum VM (ERC-20) contract PartialERC20 { mapping (address => uint256) private _balances; function transfer(address to, uint256 value) public returns (bool) { _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); return true; } }
  • 78. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Programmability: Ethereum VM (ERC-20) contract PartialERC20 { mapping (address => uint256) private _balances; function transfer(address to, uint256 value) public returns (bool) { _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); return true; } }
  • 79. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. And more…
  • 80. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kristen Stone Jake Craige Please join our Coinbase Crypto Happy Hour starting right after this! We’ll have hor d’oeuvres and a fully hosted bar.