SlideShare a Scribd company logo
1 of 50
ZeroLAB
ZeroLab
Blockchain Solution Designer Course
in collaboration with Bocconi University
Part 1 of 6
ZeroLAB
ZeroLAB
Welcome back!
In the last session, we have discussed the basic information and
concepts in blockchain. We hope you enjoy and get excited for the
upcoming session!
For this session will provide you with information about the most
essential concepts in blockchain. Those concepts are extremely
important when you want to learn about development in blockchain or
blockchain in general.
INTRO
ZeroLAB
Blockchain
Development
Essentials
> An introduction to blockchain development
background
By Dr. Alessio Bonti & Jason Pham
ZeroLAB
• Introduction
• Account
• Blockchain Wallet
• Transaction
• Test Network
• Blockchain Client
• Remote Client
• Decentralization
AGENDA
ZeroLAB
Introduction
Account, Wallet, Transaction and what these
concepts mean in blockchain context
ZeroLAB
What is a blockchain
account?
ZeroLAB
ZeroLAB
Blockchain Account is the most
frequent component you will
interact in the blockchain network.
Users use Blockchain Account to:
• Store cryptocurrency, and tokens on
blockchain network
• Deposit and transfer cryptocurrency as
well as token
• Sign transactions
BLOCKCHAIN ACCOUNT
Deposit Cryptocurrency
Transfer Cryptocurrency
ZeroLAB
ZeroLAB
BLOCKCHAIN ACCOUNT
Blockchain account is comprised of a private key and a public key. While
the public key is the cryptographic derivation of the private key, public
address is the cryptographic derivation of the public key.
Blockchain Account
Public Address Public Key Secret Private Key
Validate Messages
Sign Transactions
Encrypt Messages
ZeroLAB
Blockchain Wallet
A digital wallet that allows users to store, manage
and trade their cryptocurrencies or token
ZeroLAB
ZeroLAB
BLOCKCHAIN WALLET
Therefore, it is important to note that account is not a wallet or vice versa.
They are two completely different concepts.
Blockchain Account
Blockchain Wallet
Blockchain Wallet is either a hardware or a software that enables users to hold and
manage their accounts.
Like a blockchain account, there are also a lot cryptographic applications involve in a
blockchain wallet. Some people may confuse between blockchain wallet and
blockchain account.
ZeroLAB
What is a
transaction?
ZeroLAB
ZeroLAB
BLOCKCHAIN TRANSACTION
Among various concepts in blockchain, transaction is always one of the
most important ones.
A transaction can be a transfer of cryptocurrency from one account to another. It can
also be an interaction of an account with a smart contract or between two different
smart contracts.
Transaction
Smart Contract Interaction
Transfer of Cryptocurrency Transaction
ZeroLAB
ZeroLAB
BLOCKCHAIN TRANSACTION EXAMPLE
When Alice transfers 3
Ethers to Bob as a gift, that
action of transferring by
Alice creates a transaction
that will modifies Alice’s
balance to have 3 Ethers
less and Bob’s balance to
have 3 more Ethers. Alice Bob
3 Eths
Transaction
ZeroLAB
ZeroLAB
BLOCKCHAIN TRANSACTION EXAMPLE
In another case, when Alice
buys an NFT from a
marketplace, this action
calls the marketplace smart
contract to transfer the NFT
to Alice’s account. This call
to a smart contract is also a
transaction made by Alice. Alice SC
Contract invocation
Transaction
ZeroLAB
ZeroLAB
The way transactions being processed in blockchain can be
conceptualized by the following diagram. In particular, as soon as
a transaction is submitted:
TRANSACTION LIFECYCLE
Hash Broadcast Bundle
Generate
Verify
Append
ZeroLAB
What is a test
network?
ZeroLAB
Public blockchain usually have multiple
networks running in parallel. Different
networks are provided on which
developers can build and test before
deploying their application on the
main one.
Different blockchains have different
set of networks. They can be identical
replicas of the Mainnet or run different
consensus protocol to provide easy and
quick testing environment. However, in
most cases, cryptocurrencies on these
networks have no monetary value.
TEST NETWORKS
ZeroLAB
ZeroLAB
Using the blockchain testnet, developers are able to avoid costs as
cryptocurrencies do not have economical value. Given the fact that testnet is
also a public blockchain, there are a lot of users and available contracts on the
network.
Thus, developers is enabled to develop on a testing environment that is
extremely close to a real one.
TEST NETWORKS
Available Contracts
Cost Free Other Users
ZeroLAB
Blockchain Client
A magical software that turns a computer to a
blockchain node
ZeroLAB
Blockchain client is a
software implementation
of the blockchain which
enables user to verify
transactions, keep the
network secure and data
accurate by participating
in the consensus.
BLOCKCHAIN CLIENT
ZeroLAB
In order to interact with
blockchain network, we
need a node.
Connecting to a node
gives developers the
ability to access on-chain
data and perform
read/write functionalities.
BLOCKCHAIN CLIENT
ZeroLAB
Remote Client
Remote clients rely on a full client to provide users
with access to blockchain network
ZeroLAB
ZeroLAB
REMOTE CLIENT
Remote client provides users with a number of the functionalities, but not as
many as that when users run a full node. However, those functionalities are
usually more than enough for blockchain development.
Key
Management
Transaction
Setup
Smart Contract
Interactions
DApps Interactions Cryptocurrencies Exchanges
ZeroLAB
Why
decentralization
matters?
ZeroLAB
Blockchain nodes run
decentrally on the
blockchain network. They
participate in the
consensus protocol,
which we will go deeper
in the future session, to
keep the network secure
and moving forward.
DECENTRALIZATION
ZeroLAB
All validations and executions, or
in general transactions, on the
blockchain network are validated
by the decentralized nodes
through a “common agreement”
between them or at least most of
them.
Therefore, the network is owned
and governed by everyone
instead any single central entity.
DECENTRALIZATION
ZeroLAB
Decentralization provides
blockchain users with the
following benefits.
▪ Trustless environment
▪ Data availability and integrity
▪ Network persistance
▪ Optimized resource
accessibility
DECENTRALIZATION BENEFITS
ZeroLAB
Everyone does not need to
trust each other to
collaborate on the
decentralized network.
Identical replicas of data are
stored by each node on the
network as ledgers. If any of
the ledger is tempered, it will
be rejected by other nodes.
TRUSTLESS ENVIRONMENT
ZeroLAB
Decentralized data
storage enables
members to access
real-time data
avoiding data loss
and inaccurate data
being passed around.
DATA AVAILABILITY AND INTEGRITY
ZeroLAB
Decentralization
eliminates the single
point of failure when
a system may be too
dependent on any
particular entities.
NETWORK PERSISTANCE
ZeroLAB
As a result of the above-
mentioned benefits,
decentralization provides
optimized distribution of
resource so that data and
service access are highly
fault tolerant and accurate
reducing the level of risk that
a systematic failure may
occur.
OPTIMIZED RESOURCE DISTRIBUTION
ZeroLAB
Time to build
The second part of the theory is over, time to setup
development environment
(Algorand Sandbox)
ZeroLAB
ZeroLAB
We are at one third of the
journey.
By the end of this practical
session, you will have an
environment setup for
smart contract deployment.
PRACTICAL JOURNEY
Topics
1. Create and fund your account
with testnet funds.
2. Setup your development
environment.
3. Connect account to a Dapp.
4. Write a simple smart contract,
deploy and test.
5. Upload images to IPFS through a
Dapp.
6. Create NFT on the Dapp and
transfer using your wallet.
ZeroLAB
Practical 2
Setup development environment with Algorand
sandbox
ZeroLAB
ZeroLAB
We assume that you already have Git install on
your machine. If not, you can follow the guidelines
from https://git-scm.com/downloads.
If you are a Windows user, you need to install a few
prerequisites:
▪ Docker Desktop
▪ Windows Terminal
▪ Windows Subsystem for Linux (WSL) 2
Prerequisites
ZeroLAB
Prerequisites
Guides to install the prerequisites for Windows
users
ZeroLAB
ZeroLAB
DOCKER DESKTOP INSTALLATION
Go to https://docs.docker.com/desktop/install/windows-install/ > Click on “Docker Desktop for
Windows” (above screenshot) > Run the downloaded Docker Desktop Installer.exe file with all
default choices to install.
ZeroLAB
ZeroLAB
WINDOWS TERMINAL INSTALLATION
Let’s install Windows Terminal:
Open your Microsoft Store App > Search “Windows Terminal” > click Install.
ZeroLAB
ZeroLAB
After Windows Terminal is
installed, run it in
Administrator mode
WINDOWS TERMINAL INSTALLATION
ZeroLAB
ZeroLAB
Enable WSL 2 and install
Ubuntu 20.04 LTS by
running the following
command on the opened
windows terminal.
WSL 2 INSTALLATION
wsl --install -d Ubuntu-20.04
ZeroLAB
ZeroLAB
WSL 2 INSTALLATION
Then, we will have an Ubuntu 20.04 subsystem ready to be used.
ZeroLAB
ZeroLAB
DOCKER DESKTOP CONFIGURATION
After Docker Desktop is installed, we need to configure it to connect to our Ubuntu 20.04
subsystem that we installed in the previous step:
Run Docker Desktop (left) > Go to Settings (top right arrow) > Tick “Use the WSL 2 based engine”
ZeroLAB
ZeroLAB
DOCKER DESKTOP CONFIGURATION
In the left side menu, extend “Resources” > Select “WSL Integration” > Enable “Ubuntu-20.04” >
Click “Apply & Restart”.
Note: Make sure the rectangle on the bottom left corner is green meaning Docker is running.
Make sure this is green
ZeroLAB
ZeroLAB
Verify that Docker is
accessible on the Ubuntu
WSL by running the
following command.
CHECK DOCKER ON WSL 2
// Get docker version
docker -v
ZeroLAB
Algorand Sandbox
From this step, both Mac and Windows users
should follow to download and start the Algorand
sandbox
ZeroLAB
ZeroLAB
Clone the
sandbox repo
from Github to
a folder called
zerolab-prac
by running the
following
commands in
the terminal
DOWNLOAD SANDBOX
// Create a directory called zerolab-prac
mkdir zerolab-prac
// Change to zerolab-prac directory
cd zerolab-prac
// Clone the sandbox repo
git clone https://github.com/jasonhtpham/sandbox.git
// Use change mode command to give permission to all files
chmod -R u=rwx sandbox/
// Change to the sandbox directory
cd sandbox
// List files and directories in the current directory
ls
ZeroLAB
ZeroLAB
Start the sandbox with the
connection to Algorand
Testnet by running the
following command.
The connection to Algorand
testnet enables us to use
the accounts created in
practical 1 in future
activities.
START SANDBOX
// Start the sandbox with
connection to the testnet
./sandbox up testnet -v
ZeroLAB
ZeroLAB
Once the sandbox is up and
running, we can enter the
algod container.
This provides us the ability
to quickly and easily interact
with the blockchain in later
activities.
ENTER THE ALGOD CONTAINER
// Go into the algod container
./sandbox enter algod
ZeroLAB
ZeroLAB
We need to use the goal
command to create a wallet
called test which is used to
hold our accounts in the
future.
We can verify if the wallet is
created by running.
CREATE A WALLET IN THE ALGOD CONTAINER
// Create a wallet called test
and provide a password
goal wallet new test
// List all wallet
goal wallet list
ZeroLAB
We have done setting up the development
environment with the Algorand sandbox, which will
set us ready for the next practical session.
In the next practical session, we will connect an
account to a Dapp using Pera Algo Wallet.
PRACTICAL 2

More Related Content

Similar to 2-ZeroLab_blockchain_dev_essentials-1608.pptx

BLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.pptBLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.ppt
jishnub8
 

Similar to 2-ZeroLab_blockchain_dev_essentials-1608.pptx (20)

[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
[db tech showcase Tokyo 2018] #dbts2018 #B23 『Python, Oracle Cloud, Blockchai...
 
Introducing flow the new blockchain for open worlds
Introducing flow  the new blockchain for open worldsIntroducing flow  the new blockchain for open worlds
Introducing flow the new blockchain for open worlds
 
Getting Started with Blockchain Development: The Complete Guide
Getting Started with Blockchain Development: The Complete GuideGetting Started with Blockchain Development: The Complete Guide
Getting Started with Blockchain Development: The Complete Guide
 
Blockchain on Azure
Blockchain on AzureBlockchain on Azure
Blockchain on Azure
 
BLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.pptBLOCKCHAIN TECHNOLOGY.ppt
BLOCKCHAIN TECHNOLOGY.ppt
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Blockchain development companies in india Dunitech 2022 - Copy.pdf
Blockchain development companies in india  Dunitech  2022 - Copy.pdfBlockchain development companies in india  Dunitech  2022 - Copy.pdf
Blockchain development companies in india Dunitech 2022 - Copy.pdf
 
Blockchain development companies in india Dunitech 2022.pdf
Blockchain development companies in india  Dunitech  2022.pdfBlockchain development companies in india  Dunitech  2022.pdf
Blockchain development companies in india Dunitech 2022.pdf
 
Blockchain development companies in india Dunitech 2022 - Copy.pdf
Blockchain development companies in india  Dunitech  2022 - Copy.pdfBlockchain development companies in india  Dunitech  2022 - Copy.pdf
Blockchain development companies in india Dunitech 2022 - Copy.pdf
 
Block chain 101 what it is, why it matters
Block chain 101  what it is, why it mattersBlock chain 101  what it is, why it matters
Block chain 101 what it is, why it matters
 
Defrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain NetworkDefrag X Keynote: Deploying and managing Global Blockchain Network
Defrag X Keynote: Deploying and managing Global Blockchain Network
 
Defrag x blockchain keynote
Defrag x blockchain keynoteDefrag x blockchain keynote
Defrag x blockchain keynote
 
Top 10 blockchain interview questions & answers
Top 10 blockchain interview questions & answersTop 10 blockchain interview questions & answers
Top 10 blockchain interview questions & answers
 
Block chain technology
Block chain technology Block chain technology
Block chain technology
 
What is The zero knowledge Proofs Protocol System
What is The zero knowledge Proofs Protocol System What is The zero knowledge Proofs Protocol System
What is The zero knowledge Proofs Protocol System
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
 
Eris Industries - American Banker presentation deck.
Eris Industries - American Banker presentation deck. Eris Industries - American Banker presentation deck.
Eris Industries - American Banker presentation deck.
 
How Blockchain & Cryptocurrencies Redefining Financial Instruments in Finance
How Blockchain & Cryptocurrencies Redefining Financial Instruments in Finance How Blockchain & Cryptocurrencies Redefining Financial Instruments in Finance
How Blockchain & Cryptocurrencies Redefining Financial Instruments in Finance
 
Launching a Rollup & Appchain: Everything from Idea to its Implementation
Launching a Rollup & Appchain: Everything from Idea to its ImplementationLaunching a Rollup & Appchain: Everything from Idea to its Implementation
Launching a Rollup & Appchain: Everything from Idea to its Implementation
 
[한국핀테크포럼] 제6회 정기포럼
[한국핀테크포럼] 제6회 정기포럼[한국핀테크포럼] 제6회 정기포럼
[한국핀테크포럼] 제6회 정기포럼
 

More from ClaudioTebaldi2 (12)

BocAlg_LAB_Barcelona.pdf
BocAlg_LAB_Barcelona.pdfBocAlg_LAB_Barcelona.pdf
BocAlg_LAB_Barcelona.pdf
 
Andrea Bonaceto @Bocconi - Copia.pdf
Andrea Bonaceto @Bocconi - Copia.pdfAndrea Bonaceto @Bocconi - Copia.pdf
Andrea Bonaceto @Bocconi - Copia.pdf
 
8_borri.pdf
8_borri.pdf8_borri.pdf
8_borri.pdf
 
6_payne.pdf
6_payne.pdf6_payne.pdf
6_payne.pdf
 
5_Schoenleber - Y.pdf
5_Schoenleber - Y.pdf5_Schoenleber - Y.pdf
5_Schoenleber - Y.pdf
 
4_capponi - AMBocconi.pdf
4_capponi - AMBocconi.pdf4_capponi - AMBocconi.pdf
4_capponi - AMBocconi.pdf
 
3_halaburda_tokens-platforms_A.pdf
3_halaburda_tokens-platforms_A.pdf3_halaburda_tokens-platforms_A.pdf
3_halaburda_tokens-platforms_A.pdf
 
2_bonti_blockchain.pdf
2_bonti_blockchain.pdf2_bonti_blockchain.pdf
2_bonti_blockchain.pdf
 
1_accenture_digital assets.pdf
1_accenture_digital assets.pdf1_accenture_digital assets.pdf
1_accenture_digital assets.pdf
 
6-ZeroLab_decentralized_applications-2008.pptx
6-ZeroLab_decentralized_applications-2008.pptx6-ZeroLab_decentralized_applications-2008.pptx
6-ZeroLab_decentralized_applications-2008.pptx
 
5-ZeroLab_blockchain_token-1908.pptx
5-ZeroLab_blockchain_token-1908.pptx5-ZeroLab_blockchain_token-1908.pptx
5-ZeroLab_blockchain_token-1908.pptx
 
1-ZeroLab_blockchain_101-1608.pptx
1-ZeroLab_blockchain_101-1608.pptx1-ZeroLab_blockchain_101-1608.pptx
1-ZeroLab_blockchain_101-1608.pptx
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Recently uploaded (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

2-ZeroLab_blockchain_dev_essentials-1608.pptx

  • 1. ZeroLAB ZeroLab Blockchain Solution Designer Course in collaboration with Bocconi University Part 1 of 6
  • 2. ZeroLAB ZeroLAB Welcome back! In the last session, we have discussed the basic information and concepts in blockchain. We hope you enjoy and get excited for the upcoming session! For this session will provide you with information about the most essential concepts in blockchain. Those concepts are extremely important when you want to learn about development in blockchain or blockchain in general. INTRO
  • 3. ZeroLAB Blockchain Development Essentials > An introduction to blockchain development background By Dr. Alessio Bonti & Jason Pham
  • 4. ZeroLAB • Introduction • Account • Blockchain Wallet • Transaction • Test Network • Blockchain Client • Remote Client • Decentralization AGENDA
  • 5. ZeroLAB Introduction Account, Wallet, Transaction and what these concepts mean in blockchain context
  • 6. ZeroLAB What is a blockchain account?
  • 7. ZeroLAB ZeroLAB Blockchain Account is the most frequent component you will interact in the blockchain network. Users use Blockchain Account to: • Store cryptocurrency, and tokens on blockchain network • Deposit and transfer cryptocurrency as well as token • Sign transactions BLOCKCHAIN ACCOUNT Deposit Cryptocurrency Transfer Cryptocurrency
  • 8. ZeroLAB ZeroLAB BLOCKCHAIN ACCOUNT Blockchain account is comprised of a private key and a public key. While the public key is the cryptographic derivation of the private key, public address is the cryptographic derivation of the public key. Blockchain Account Public Address Public Key Secret Private Key Validate Messages Sign Transactions Encrypt Messages
  • 9. ZeroLAB Blockchain Wallet A digital wallet that allows users to store, manage and trade their cryptocurrencies or token
  • 10. ZeroLAB ZeroLAB BLOCKCHAIN WALLET Therefore, it is important to note that account is not a wallet or vice versa. They are two completely different concepts. Blockchain Account Blockchain Wallet Blockchain Wallet is either a hardware or a software that enables users to hold and manage their accounts. Like a blockchain account, there are also a lot cryptographic applications involve in a blockchain wallet. Some people may confuse between blockchain wallet and blockchain account.
  • 12. ZeroLAB ZeroLAB BLOCKCHAIN TRANSACTION Among various concepts in blockchain, transaction is always one of the most important ones. A transaction can be a transfer of cryptocurrency from one account to another. It can also be an interaction of an account with a smart contract or between two different smart contracts. Transaction Smart Contract Interaction Transfer of Cryptocurrency Transaction
  • 13. ZeroLAB ZeroLAB BLOCKCHAIN TRANSACTION EXAMPLE When Alice transfers 3 Ethers to Bob as a gift, that action of transferring by Alice creates a transaction that will modifies Alice’s balance to have 3 Ethers less and Bob’s balance to have 3 more Ethers. Alice Bob 3 Eths Transaction
  • 14. ZeroLAB ZeroLAB BLOCKCHAIN TRANSACTION EXAMPLE In another case, when Alice buys an NFT from a marketplace, this action calls the marketplace smart contract to transfer the NFT to Alice’s account. This call to a smart contract is also a transaction made by Alice. Alice SC Contract invocation Transaction
  • 15. ZeroLAB ZeroLAB The way transactions being processed in blockchain can be conceptualized by the following diagram. In particular, as soon as a transaction is submitted: TRANSACTION LIFECYCLE Hash Broadcast Bundle Generate Verify Append
  • 16. ZeroLAB What is a test network?
  • 17. ZeroLAB Public blockchain usually have multiple networks running in parallel. Different networks are provided on which developers can build and test before deploying their application on the main one. Different blockchains have different set of networks. They can be identical replicas of the Mainnet or run different consensus protocol to provide easy and quick testing environment. However, in most cases, cryptocurrencies on these networks have no monetary value. TEST NETWORKS
  • 18. ZeroLAB ZeroLAB Using the blockchain testnet, developers are able to avoid costs as cryptocurrencies do not have economical value. Given the fact that testnet is also a public blockchain, there are a lot of users and available contracts on the network. Thus, developers is enabled to develop on a testing environment that is extremely close to a real one. TEST NETWORKS Available Contracts Cost Free Other Users
  • 19. ZeroLAB Blockchain Client A magical software that turns a computer to a blockchain node
  • 20. ZeroLAB Blockchain client is a software implementation of the blockchain which enables user to verify transactions, keep the network secure and data accurate by participating in the consensus. BLOCKCHAIN CLIENT
  • 21. ZeroLAB In order to interact with blockchain network, we need a node. Connecting to a node gives developers the ability to access on-chain data and perform read/write functionalities. BLOCKCHAIN CLIENT
  • 22. ZeroLAB Remote Client Remote clients rely on a full client to provide users with access to blockchain network
  • 23. ZeroLAB ZeroLAB REMOTE CLIENT Remote client provides users with a number of the functionalities, but not as many as that when users run a full node. However, those functionalities are usually more than enough for blockchain development. Key Management Transaction Setup Smart Contract Interactions DApps Interactions Cryptocurrencies Exchanges
  • 25. ZeroLAB Blockchain nodes run decentrally on the blockchain network. They participate in the consensus protocol, which we will go deeper in the future session, to keep the network secure and moving forward. DECENTRALIZATION
  • 26. ZeroLAB All validations and executions, or in general transactions, on the blockchain network are validated by the decentralized nodes through a “common agreement” between them or at least most of them. Therefore, the network is owned and governed by everyone instead any single central entity. DECENTRALIZATION
  • 27. ZeroLAB Decentralization provides blockchain users with the following benefits. ▪ Trustless environment ▪ Data availability and integrity ▪ Network persistance ▪ Optimized resource accessibility DECENTRALIZATION BENEFITS
  • 28. ZeroLAB Everyone does not need to trust each other to collaborate on the decentralized network. Identical replicas of data are stored by each node on the network as ledgers. If any of the ledger is tempered, it will be rejected by other nodes. TRUSTLESS ENVIRONMENT
  • 29. ZeroLAB Decentralized data storage enables members to access real-time data avoiding data loss and inaccurate data being passed around. DATA AVAILABILITY AND INTEGRITY
  • 30. ZeroLAB Decentralization eliminates the single point of failure when a system may be too dependent on any particular entities. NETWORK PERSISTANCE
  • 31. ZeroLAB As a result of the above- mentioned benefits, decentralization provides optimized distribution of resource so that data and service access are highly fault tolerant and accurate reducing the level of risk that a systematic failure may occur. OPTIMIZED RESOURCE DISTRIBUTION
  • 32. ZeroLAB Time to build The second part of the theory is over, time to setup development environment (Algorand Sandbox)
  • 33. ZeroLAB ZeroLAB We are at one third of the journey. By the end of this practical session, you will have an environment setup for smart contract deployment. PRACTICAL JOURNEY Topics 1. Create and fund your account with testnet funds. 2. Setup your development environment. 3. Connect account to a Dapp. 4. Write a simple smart contract, deploy and test. 5. Upload images to IPFS through a Dapp. 6. Create NFT on the Dapp and transfer using your wallet.
  • 34. ZeroLAB Practical 2 Setup development environment with Algorand sandbox
  • 35. ZeroLAB ZeroLAB We assume that you already have Git install on your machine. If not, you can follow the guidelines from https://git-scm.com/downloads. If you are a Windows user, you need to install a few prerequisites: ▪ Docker Desktop ▪ Windows Terminal ▪ Windows Subsystem for Linux (WSL) 2 Prerequisites
  • 36. ZeroLAB Prerequisites Guides to install the prerequisites for Windows users
  • 37. ZeroLAB ZeroLAB DOCKER DESKTOP INSTALLATION Go to https://docs.docker.com/desktop/install/windows-install/ > Click on “Docker Desktop for Windows” (above screenshot) > Run the downloaded Docker Desktop Installer.exe file with all default choices to install.
  • 38. ZeroLAB ZeroLAB WINDOWS TERMINAL INSTALLATION Let’s install Windows Terminal: Open your Microsoft Store App > Search “Windows Terminal” > click Install.
  • 39. ZeroLAB ZeroLAB After Windows Terminal is installed, run it in Administrator mode WINDOWS TERMINAL INSTALLATION
  • 40. ZeroLAB ZeroLAB Enable WSL 2 and install Ubuntu 20.04 LTS by running the following command on the opened windows terminal. WSL 2 INSTALLATION wsl --install -d Ubuntu-20.04
  • 41. ZeroLAB ZeroLAB WSL 2 INSTALLATION Then, we will have an Ubuntu 20.04 subsystem ready to be used.
  • 42. ZeroLAB ZeroLAB DOCKER DESKTOP CONFIGURATION After Docker Desktop is installed, we need to configure it to connect to our Ubuntu 20.04 subsystem that we installed in the previous step: Run Docker Desktop (left) > Go to Settings (top right arrow) > Tick “Use the WSL 2 based engine”
  • 43. ZeroLAB ZeroLAB DOCKER DESKTOP CONFIGURATION In the left side menu, extend “Resources” > Select “WSL Integration” > Enable “Ubuntu-20.04” > Click “Apply & Restart”. Note: Make sure the rectangle on the bottom left corner is green meaning Docker is running. Make sure this is green
  • 44. ZeroLAB ZeroLAB Verify that Docker is accessible on the Ubuntu WSL by running the following command. CHECK DOCKER ON WSL 2 // Get docker version docker -v
  • 45. ZeroLAB Algorand Sandbox From this step, both Mac and Windows users should follow to download and start the Algorand sandbox
  • 46. ZeroLAB ZeroLAB Clone the sandbox repo from Github to a folder called zerolab-prac by running the following commands in the terminal DOWNLOAD SANDBOX // Create a directory called zerolab-prac mkdir zerolab-prac // Change to zerolab-prac directory cd zerolab-prac // Clone the sandbox repo git clone https://github.com/jasonhtpham/sandbox.git // Use change mode command to give permission to all files chmod -R u=rwx sandbox/ // Change to the sandbox directory cd sandbox // List files and directories in the current directory ls
  • 47. ZeroLAB ZeroLAB Start the sandbox with the connection to Algorand Testnet by running the following command. The connection to Algorand testnet enables us to use the accounts created in practical 1 in future activities. START SANDBOX // Start the sandbox with connection to the testnet ./sandbox up testnet -v
  • 48. ZeroLAB ZeroLAB Once the sandbox is up and running, we can enter the algod container. This provides us the ability to quickly and easily interact with the blockchain in later activities. ENTER THE ALGOD CONTAINER // Go into the algod container ./sandbox enter algod
  • 49. ZeroLAB ZeroLAB We need to use the goal command to create a wallet called test which is used to hold our accounts in the future. We can verify if the wallet is created by running. CREATE A WALLET IN THE ALGOD CONTAINER // Create a wallet called test and provide a password goal wallet new test // List all wallet goal wallet list
  • 50. ZeroLAB We have done setting up the development environment with the Algorand sandbox, which will set us ready for the next practical session. In the next practical session, we will connect an account to a Dapp using Pera Algo Wallet. PRACTICAL 2