Technical considerations for blockchain
networks with AWS
José Ángel Corral,
Líder Técnico de Arquitectura de
Soluciones en atSistemas, y
Responsable Técnico del área
Blockchain
Organizador de:
Internet de las Cosas, un mundo conectado
Index
Blockchain services at AWS
• Amazon Quantum Ledger Database
• Amazon Managed Blockchain
BaaS
Custom Deployment
Blockchain services at AWS
• Need for a ledger with centralized trust
• Need for a ledger with decentralized trust
Need for a ledger with centralized trust
DMV
Track vehicle
title history
Manufacturers
Track distribution of a
recalled product
Healthcare
Verify and track hospital
equipment inventory
LEDGERS WITH
CENTRALIZED TRUST
1
Need for a ledger with decentralized trust
2
Financial
institutions
Peer-to-peer payments
Mortgage
lenders
Process syndicated
loans
Supply Chain
Transact with suppliers
and distributers
TRANSACTIONS WITH DECENTRALIZED
TRUST
Blockchain services at AWS
Amazon Quantum Ledger
Database (QLDB)
Amazon Managed
Blockchain
Fully managed ledger database with a
central trusted authority
Amazon Quantum Ledger Database (QLDB)
Challenges customers face
Building Ledgers with traditional databases
Difficult to
manage and scale
Impossible
to verify
Error prone and
incomplete
Resource
intensive
Blockchain approaches
Designed for a
different purpose
Adds unnecessary
complexity
Amazon Quantum Ledger Database (QLDB)
Maintains a sequenced record
of all changes to your data,
which cannot be deleted or
modified; you have the ability
to query and analyze the full
history
Immutable
Uses cryptography to generate
a secure output file of your
data’s history
Cryptographically verifiable
Easy to use, letting you
use familiar database
capabilities like SQL APIs for
querying the data
Easy to useHighly scalable
Executes 2–3X as
many transactions as
ledgers in common
blockchain frameworks
u Fully managed ledger database
u Track and verify history of all changes made to your application’s data
How Amazon QLDB works
Amazon Managed Blockchain
Fully managed blockchain service, supporting both
Hyperledger Fabric and Ethereum frameworks
Blockchain builds trust in a network
Eliminates the need for central authority in business networks
Three main components: distributed ledger, consensus mechanism,
and “smart contract” execution environment
Together these elements allow two parties to transact with one another by ensuring other parties consent to
the transaction and record the transaction. This provides immutability and trust
Challenges with existing blockchain solutions
Complicated to
manage
Setup is hard Hard to scale Expensive
Amazon Managed Blockchain
Quickly create blockchain networks
that span multiple AWS accounts.
Easily add or remove members and
monitor the network
Fully managed Choice of Hyperledger
Fabric or Ethereum
Improves reliabilityScalable and secure
Easily scale your blockchain
network as the usage grows. Also,
Managed Blockchain secures your
network certificates with KMS
Choose the right framework for
your needs, whether you are
building a permissioned or public
network
Managed Blockchain improves the
reliability of the “ordering service,”
by replacing the default technology
with QLDB. This improves
durability
u Easily create and manage scalable blockchain networks
Blockchain Templates
How Amazon Managed Blockchain works
Amazon Managed
Blockchain
Create a network
Choose an open source
blockchain framework, set up a
new blockchain network and
your membership in your AWS
account with
just a few clicks
Invite members
Invite other AWS accounts to
join the network
Add nodes
Create and configure blockchain
peer nodes that store a copy of
the distributed ledger
Deploy applications
Create and deploy decentralized
applications
to your network through your
per nodes. Transact with other
members on
the network
How to create a network (1/5)
How to create a network (2/5)
How to create a network (3/5)
How to create a network (4/5)
How to create a network (5/5)
Operating the network
Some examples…
BaaS (Blockchain as a Service)
BaaS (Blockchain as a Service)
BaaS (Blockchain as a Service)
Custom Deployment (Ethereum)
Nodes:
• bootnode
• miner/sealer
• worker
Consensus Protocol: PoW -> PoA
Hardware:
EC2 t2.micro 8Gb / SO Linux Amazon
Custom Deployment (Process)
Software:
• Golang
• Git
• Go-ethereum
Custom Deployment (Process)
Security Group (inbound):
• 22: SSH
• 8545: RPC TCP
• 8546: RPC WebSocket
• 30301: UDP
• 30303: TCP
Custom Deployment (Process)
geth --datadir /var/data account new
puppeth -> genesis.json
geth --datadir /var/data init ./genesis.json
bootnode --genkey=boot.key
bootnode --nodekey=boot.key -> enode
Custom Deployment (Process)
Sealer
sudo ./build/bin/geth --cache=512 --datadir=/var/data --rpc --
mine --unlock ”0xXX" --password "pass.txt" --bootnodes
enode://XXX@IP:30301
Worker
sudo ./build/bin/geth --cache=512 --datadir=/var/data --rpc
--bootnodes enode://XXX@IP:30301
Custom Deployment
Despliegue de una red blockchain privada en tecnología
Ethereum sobre AWS
Enmilocalfunciona.io
And now, what?
Smart Contracts/Chaincodes
• Development: Solidity/Java/Golang/Nodejs
• Patterns: (OpenZeppelin)
• Compiling and testing: truffle, mocha y chai.js
• Vulnerabilities: Porosity
Middleware: Interaction with SCs using java (web3j), js(web3js) or go
(go-ethereum)
Connection with the nodes: IPC, HTTP or WebSocket
DApp: React/Vue/Angular (web3js) Ej: Metamask (Wallet)
atCoin - Metamask (1/3)
Browser extension to manage your accounts (wallet) and
merging the gap between different blockchain networks
Extension for accessing
Ethereum enabled distributed
applications, or "Dapps" in your
browser! (Chrome, FF, Opera y
Brave)
App iOS y Android en beta
atCoin - Metamask (2/3)
Connection to ‘ATCOIN’ Network (Alastria Node or Private
Network) → customized RPC
atCoin - Metamask (3/3)
Adding a customized token.
Paste the ERC20 Token Contract Address and
automatically symbol and precission are completed.
atCoin - Metamask (Login)
MetaMask is more than an
Ethereum wallet.
Injects the Ethereum web3
API into every website's
javascript context, so that
Dapps can read from the
blockchain.
For example, to login using
our own signature.
atCoin (Store)
atCoin - Metamask (Transferencias)
¡Thank you!
Reference Architecture
Reference Architecture

Technical considerations for Blockchain networks with AWS

  • 1.
    Technical considerations forblockchain networks with AWS
  • 2.
    José Ángel Corral, LíderTécnico de Arquitectura de Soluciones en atSistemas, y Responsable Técnico del área Blockchain Organizador de: Internet de las Cosas, un mundo conectado
  • 3.
    Index Blockchain services atAWS • Amazon Quantum Ledger Database • Amazon Managed Blockchain BaaS Custom Deployment
  • 4.
    Blockchain services atAWS • Need for a ledger with centralized trust • Need for a ledger with decentralized trust
  • 5.
    Need for aledger with centralized trust DMV Track vehicle title history Manufacturers Track distribution of a recalled product Healthcare Verify and track hospital equipment inventory LEDGERS WITH CENTRALIZED TRUST 1
  • 6.
    Need for aledger with decentralized trust 2 Financial institutions Peer-to-peer payments Mortgage lenders Process syndicated loans Supply Chain Transact with suppliers and distributers TRANSACTIONS WITH DECENTRALIZED TRUST
  • 7.
    Blockchain services atAWS Amazon Quantum Ledger Database (QLDB) Amazon Managed Blockchain
  • 8.
    Fully managed ledgerdatabase with a central trusted authority Amazon Quantum Ledger Database (QLDB)
  • 9.
    Challenges customers face BuildingLedgers with traditional databases Difficult to manage and scale Impossible to verify Error prone and incomplete Resource intensive Blockchain approaches Designed for a different purpose Adds unnecessary complexity
  • 10.
    Amazon Quantum LedgerDatabase (QLDB) Maintains a sequenced record of all changes to your data, which cannot be deleted or modified; you have the ability to query and analyze the full history Immutable Uses cryptography to generate a secure output file of your data’s history Cryptographically verifiable Easy to use, letting you use familiar database capabilities like SQL APIs for querying the data Easy to useHighly scalable Executes 2–3X as many transactions as ledgers in common blockchain frameworks u Fully managed ledger database u Track and verify history of all changes made to your application’s data
  • 11.
  • 12.
    Amazon Managed Blockchain Fullymanaged blockchain service, supporting both Hyperledger Fabric and Ethereum frameworks
  • 13.
    Blockchain builds trustin a network Eliminates the need for central authority in business networks Three main components: distributed ledger, consensus mechanism, and “smart contract” execution environment Together these elements allow two parties to transact with one another by ensuring other parties consent to the transaction and record the transaction. This provides immutability and trust
  • 14.
    Challenges with existingblockchain solutions Complicated to manage Setup is hard Hard to scale Expensive
  • 15.
    Amazon Managed Blockchain Quicklycreate blockchain networks that span multiple AWS accounts. Easily add or remove members and monitor the network Fully managed Choice of Hyperledger Fabric or Ethereum Improves reliabilityScalable and secure Easily scale your blockchain network as the usage grows. Also, Managed Blockchain secures your network certificates with KMS Choose the right framework for your needs, whether you are building a permissioned or public network Managed Blockchain improves the reliability of the “ordering service,” by replacing the default technology with QLDB. This improves durability u Easily create and manage scalable blockchain networks
  • 16.
  • 17.
    How Amazon ManagedBlockchain works Amazon Managed Blockchain Create a network Choose an open source blockchain framework, set up a new blockchain network and your membership in your AWS account with just a few clicks Invite members Invite other AWS accounts to join the network Add nodes Create and configure blockchain peer nodes that store a copy of the distributed ledger Deploy applications Create and deploy decentralized applications to your network through your per nodes. Transact with other members on the network
  • 18.
    How to createa network (1/5)
  • 19.
    How to createa network (2/5)
  • 20.
    How to createa network (3/5)
  • 21.
    How to createa network (4/5)
  • 22.
    How to createa network (5/5)
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
    Custom Deployment (Ethereum) Nodes: •bootnode • miner/sealer • worker Consensus Protocol: PoW -> PoA Hardware: EC2 t2.micro 8Gb / SO Linux Amazon
  • 29.
    Custom Deployment (Process) Software: •Golang • Git • Go-ethereum
  • 30.
    Custom Deployment (Process) SecurityGroup (inbound): • 22: SSH • 8545: RPC TCP • 8546: RPC WebSocket • 30301: UDP • 30303: TCP
  • 31.
    Custom Deployment (Process) geth--datadir /var/data account new puppeth -> genesis.json geth --datadir /var/data init ./genesis.json bootnode --genkey=boot.key bootnode --nodekey=boot.key -> enode
  • 32.
    Custom Deployment (Process) Sealer sudo./build/bin/geth --cache=512 --datadir=/var/data --rpc -- mine --unlock ”0xXX" --password "pass.txt" --bootnodes enode://XXX@IP:30301 Worker sudo ./build/bin/geth --cache=512 --datadir=/var/data --rpc --bootnodes enode://XXX@IP:30301
  • 33.
    Custom Deployment Despliegue deuna red blockchain privada en tecnología Ethereum sobre AWS Enmilocalfunciona.io
  • 34.
    And now, what? SmartContracts/Chaincodes • Development: Solidity/Java/Golang/Nodejs • Patterns: (OpenZeppelin) • Compiling and testing: truffle, mocha y chai.js • Vulnerabilities: Porosity Middleware: Interaction with SCs using java (web3j), js(web3js) or go (go-ethereum) Connection with the nodes: IPC, HTTP or WebSocket DApp: React/Vue/Angular (web3js) Ej: Metamask (Wallet)
  • 35.
    atCoin - Metamask(1/3) Browser extension to manage your accounts (wallet) and merging the gap between different blockchain networks Extension for accessing Ethereum enabled distributed applications, or "Dapps" in your browser! (Chrome, FF, Opera y Brave) App iOS y Android en beta
  • 36.
    atCoin - Metamask(2/3) Connection to ‘ATCOIN’ Network (Alastria Node or Private Network) → customized RPC
  • 37.
    atCoin - Metamask(3/3) Adding a customized token. Paste the ERC20 Token Contract Address and automatically symbol and precission are completed.
  • 38.
    atCoin - Metamask(Login) MetaMask is more than an Ethereum wallet. Injects the Ethereum web3 API into every website's javascript context, so that Dapps can read from the blockchain. For example, to login using our own signature.
  • 39.
  • 40.
    atCoin - Metamask(Transferencias)
  • 41.
  • 42.
  • 43.