Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Global University
Blockchain WorkshopStart your genesis block
2
Join Ontology Today,
Be a Part of the Future• Raise questions and discuss during the course
• Get tech updates at first time
• Meet developers worldwide
• Reach Ontology core developers anytime
Global University Blockchain Workshop
3
THE RUNDOWN
01Final webThe future
02Way to Final WebWay to the future
03What can we doOntology’s solution to the future
04What can you doBe a Part of the Future
05 Q & A
4
FINAL WEBLet’s start from the Web
Final web
5
“The Web as I
envisaged it,
we have not seen
it yet. The future
is still so much
bigger than the
past.” (2009)
– Founder of World Wide Web
Sir Tim Berners-Lee
Who is this
handsome
gentleman?
*Picture resource: Internet
Final web // Web 1.0/2.0
6
1.0
2.0
Web Portal
Social Network
What are the problems
in Web 1.0/2.0 ?
• The truth
• Private data
• Top market
• Etc.
What is Web 1.0/2.0?
Final web // Web 1.0/2.0
7
What might
Web 3.0 be ?
Final web // Web 3.0
8
“Using the WWW
infrastructure to create a
global, decentralized,
weblike mesh of machine-
processable knowledge.”
“Using the WWW
infrastructure to create a
global, decentralized,
weblike mesh of machine-
processable knowledge.”
– Founder of World Wide Web
Sir Tim Berners-Lee
*Picture resource: Internet
Final web // Web 3.0
9
WHY? Decentralized
Knowledge
Final web // Decentralized
10
Distribution of the network
*Picture resource: Internet
Centralised (A) Decentralised (B) Distributed (C)
Final web // Decentralized
11
Decentralized Web*Centralized Web
Centralized
Unclear data ownership
Abuse of resources without permission
Moral trust
Trust process based on third parties
Unquantifiable
Decentralized
Digitized data ownership
Self-sovereign resources
Technical / legal / social trust
Independent trust
Quantifiable
Final web // Decentralized
* Decentralized Web (TRUST Network)
12
WHY? Decentralized
Knowledge
Final web // Knowledge
13
Linked Entropy Reducing
Only Valuable Info is Knowledge
Valuable …
Final web // Knowledge
14
WHAT?Web of Society• Self-sovereign identity & data
• Data privacy & protection
• Web-like linked data
• Transparency on the path of properties-class
Trust
Knowledge
Final web // Web of Society
15
HOW? Decentralized
Knowledge
Final web // How to decentralized
16
Web of Society
• Dynamic
rental service
• Self-sovereign identity &data
• Data privacy & protection
• Web-like linked data
• Transparency on the pathof properties-class
Cloud OntologyBlockchain
• User becomes a
stakeholder
• Trust + Stability
• Benign competitive
business environment
• Traceability &
Transparence
• Self-sovereign
linked data
→ + =
Final web // How to decentralized
17
Web 3.0Final Web
Final web // Final Web
18
WAY TO
FINAL WEB
Way to final web
19
TRUSTInfrastructure
?
Way to final web // Trust Network
20
TRUST NetworkTraditional Web
Centralized trust
Unclear data ownership
Trust process based on third parties
Abuse of resources without permission
Unquantifiable
Decentralized trust
Digitized data ownership
Technical / legal / social trust
Independent trust
Self-sovereign resources
Quantifiable
Moral trust
Way to final web // Trust Network
21
How to TRUST ?
Way to final web // Trust Network
22
TRUST NetworkNetwork Components
Decentralized network
Blockchain infrastructure
Self-sovereign identity
Self-sovereign data token
Distributed data exchange framework
Decentralized trust
Digitized data ownership
Technical / legal / social trust
Independent trust
Self-sovereign resources
Quantifiable
Smart contract mechanism (code is law)
Way to final web // Trust Network
23
Three dimensions of trust infrastructure
NETWORK
Trust the decentralized network for consensus algorithm with certain hypothesis
DATA PROCESSING AND MANAGEMENT
Trust the decentralized applications for the traceability of actions and permission control
on self-sovereign data
IDENTITY
Trust the dApp users for their clear immutable action log with verifiable claims/signatures
of their self-sovereign identities
Way to final web // Three dimensions of trust infrastructure
24
……
Economics
CryptographySociology
TechnologySystematics
A decentralized network infrastructure
Way to final web // A decentralized network infrastructure
25
How to design a blockchain project?
Way to final web // Blockchain project
26
Governance Model
Token Economics Model
Network Hypothesis
Consensus Algorithm
Way to final web // Blockchain project
27
Consensus algorithm
Scalability
SecurityPerformance
Safety
Fault
ToleranceLiveness
Trilemma
Blockchain project
Way to final web // Blockchain project
28
Data =
Credential + Rights
Cross-border
of Traditional Business
Token For Trust
Endorsement
Asset-based
Exchange
Data
AssetizationTrust Asset
Linkable Exchangeable
Economics Token Economics
Way to final web // Blockchain project
29
BUSINESS
The Market
INFRASTRUCTURE
The Market Blockchain
Way to final web // Blockchain project
30
EthereumEOS
*Picture resource: Internet
Way to final web // Blockchain project
31
Ontology
Way to final web // Blockchain project
32
Knowledge – Next Phase of Ontology
Way to final web // Blockchain project
33
WHAT CAN WE DO?
What can we do
34
New Generation of
Multi-Chain Infrastructure
A Distributed
Collaboration Platform
What is Ontology?
// OntologyWay to final web
35
Performance
issues
Different business
requirements
Digital
economy
Real
economy
Way to final web // Ontology
36
200+Core Members
2,000,000+Community Contributors
900+Technical Contributors
19Languages
Way to final web // Ontology
37
TRUST Redefined
Way to final web // Ontology
38
Our Output
ONT ID Cross-chainDDXF Sharding MainNet
Way to final web // Our output
39
DECENTRALIZED IDENTITY
Framework integrates multi-dimensional trust to provide secure, credible and fine-grained identity management.
• Self-sovereign Identity
• Qualification and verification of identities
*Picture resource: Internet
ONT IDTrust the dApp users for their clear immutable action log with verifiable claims/signatures of their self-sovereign identities
Way to final web // ONT ID
40Way to final web // ONT ID
41
Decentralized Data Exchange Framework (DDXF)
Supports cross-system data interoperability, data-based value assessment and
data processing tracking.
SELF-SOVEREIGN DATA
• Off-chain
• Data access tokenization
• Data processing and transaction attestation
DATA INTEROPERABILITY CROSS SYSTEMS
• Resource exchange and data interaction through data pattern change, token
transfer and transaction
Way to final web // DDXF
42Way to final web // DDXF
43
Sharding
// ShardingWay to final web
Ontology Sharding named “Multi-Layered”
44
Root Chain
Contract Contract Contract Contract Contract Contract Contract Contract Contract Contract
SHARD 1 SHARD 2 SHARD 3 SHARD 4 SHARD 5
Contract
range
0 … 20
Contract
range
21 … 40
Contract
range
41 … 60
Contract
range
61 … 80
Contract
range
81 … 100
{#: 11} {#: 32} {#: 54} {#: 68} {#: 95}
Way to final web // Sharding
45
Root Chain
SHARD 1 SHARD 2 SHARD 3 SHARD 4 SHARD 5
SHARD 6SHARD 5 SHARD 7
Support both scale-up and scale-out
• Multi-layer cross-shard service
3-dimens of sharding
• Network sharding
• State sharding
• Transaction sharding
Way to final web // Sharding
46
Why is Ontology Sharding named “Multi-Layered”?
Way to final web // Sharding
47
Sharding
• For scalability
• From one blockchain to multiple parallel blockchains
• Be as safe as one blockchain
// Sharding
48
Sharding – Evolution of Multi-Processor
• For scalability
• From single thread to multiple threads
• The difficulty is from design of
memory system
Way to final web // Sharding
49
contract state
virtual machine virtual machine
contract
state
contract
state
contract
state
Sharding – Evolution of Multi-Processor
• For scalability
• From single blockchain to multiple
parallel shard chains
• The difficulty is from design of
memory system
Way to final web // Sharding
50
How the memory system support parallel shard chains?
Common Miner Set
Contract Contract Contract Contract Contract Contract Contract Contract Contract Contract
SHARD 1 SHARD 2 SHARD 3 SHARD 4 SHARD 5
Contract
range
0 … 20
Contract
range
21 … 40
Contract
range
41 … 60
Contract
range
61 … 80
Contract
range
81 … 100
{#: 11} {#: 32} {#: 54} {#: 68} {#: 95}
Blockchain Sharding
Way to final web // Sharding
51
Sharding Performance
For performance
• maximize parallel part
• minimize serial part
Sharding by smart-contract
• smart-contract
• local state
• transactions to shard contracts
Way to final web // Sharding
52
Blockchain Shard `memory system`
• Defines how blockchain shards interact
with each other.
• Blockchain is durable computing system
Blocks record history, and the history must
be able to be replayed.
• Consensus algorithm defines how to
generate the chain of blocks.
Consensus
• Safety
if (protocol-following) nodes do decide on
values, then they will decide on values that
do not conflict.
• Liveness
any (protocol-following) node will eventually
make a decision that accepts or rejects any
given value.
Way to final web // Sharding
53
CBC: Correct-by-Construction
Properties of Blockchain Consensus
For each of these protocols:
We will define:• Protocol messages
So protocol states and their transitions are defined
(sets of messages with no more than t faults)
• An estimator
So that we can relate protocol states to values of the
consensus
Because that’s all we need to satisfy the cbc framwork
Way to final web // Sharding
54
Safety of CBC Estimator
Estimate Safety:
• A proposition p is safe at protocol state 𝜎, if it holds for the estimator for all future protocol states 𝜎’.
Safety Oracle
• If:
– There is an e-clique in 𝜎 of non-Equivocating nodes with total weight We
– The total weight of all validators is Wt
Then:
• Clique e is safe in 𝜎 for a protocol with fault tolerance t < 2 * We - Wt
• The estimator will agree with the largest majority of latest messages. (e.g. GHOST)
Way to final web // Sharding
55
Messages among Shards
• Ordering of xshard messages, to keep
blockchain replay-able
• Validation of cross-shard messages
• Reasonable message passing latency
Way to final web // Sharding
56
Safety of CBC Shard Block Estimator
`Merge blocks`represents atomic-syncing-
blocks among shard chains.
Protocol messages:
Very similar to the blockchain, but:
• There”s chain for every every shard
• They can share “merge blocks”
Way to final web // Sharding
57
Root Shard
Shard-1 Shard-2 Shard-3
Shard-5 Shard-6Shard-4
Ontology Multi-Layered Sharding
• Child shards follow their parent.
• Parent shard is contained in child shards.
• `Merge block` is in the parent’s fork choice.
`Merge block` is atomic
• Child shards are verifiable-randomly
ordered by their parent.
Way to final web // Sharding
58
• Parent shard is contained by its all child shards
• Child shard block must bind with one parent shard block
1002 1003 1004 1005 1006
100 101 102 103 104 105 106
0 1 2 3 4
200 201 202
Estimator Safety:
A proposition p is safe at protocol
state 𝜎, if it holds for the estimator
for all future protocol states 𝜎’.
`Merge Blocks` in Ontology Sharding
Way to final web // Sharding
59
It’s a MULTI-LAYERED consensus system or Hierarchical consensus system.
Why is Ontology Sharding named “Multi-Layered”?
Way to final web // Sharding
60
More about Ontology sharding?
• XShard messaging
• XShard Atomic transaction processing
• XShard Governance (Fee Settlements)
• ...
Way to final web // Sharding
61
• Infinite expansion with chain peers
• Improving TPS bottleneck and reducing storage pressure
• Value anchoring of gas fee throughout chain network
• Secure cross-chain transactions
• Well defined of relayers' incentive mechanism
• Broad business scenarios
Cross-Chain
// Cross-ChainWay to final web
62
DEVELOP WITH ONTOLOGY
Develop with Ontology
63
Decentralized Blockchain Application (dApp)
A dApp is a ‘blockchain enabled’ website, that runs on a peer-to-peer network of computers rather than a
single server, where the Smart Contract is what allows it to connect to the blockchain. It contains both
front-end and back-end and run independently on all nodes.
Back-End Back-End Back-End
Front-End Front-End Front-End
Smart Contracts
Develop with Ontology // dApp
64
• Decentralized
No one controlling power.
• Protocol / Algorithm
Open protocol to everyone.
• Incentive
Crypto tokens are used to reward participants.
• Blockchain
Code / Data stored in a blockchain.
Back-End Back-End Back-End
Front-End Front-End Front-End
Smart Contracts
Key Features of a dApp
Develop with Ontology // dApp
65
How to develop a dApp
Infra
Engineering
Smart contract
mechanism
Design
Governance
model
Token economics
model
Network
hypothesis
Governance
contract
Staking / gasgeneration & circulation
Consensus
Network Infra
dApp(s) Other dApp(s) FT/NFT/PFT
Biz app(s)
Know your project
• Design
Setup the project
• Choose Platform, Framework
• Design UI, Protocol, APIS
Code the application
• Smart-Contract, Front-End, Back-End
Deploy and Test Your dApp
• Make sure fully tested
01
02
03
04
Develop with Ontology // dApp
66
Before we start coding …
Develop with Ontology // Ready to code
67
How dApp run on Ontology blockchain?
How Ontology blockchain run?
Which part of dApp run on Ontology blockchain?
How smart-contract work?
How to interact with smart-contracts on Ontology blockchain?
Develop with Ontology // Ready to code
68
How Ontology blockchain run?
• Decentralized P2P network
• Messages are broadcasted to
all nodes
• Blocks are relayed in network
• Blocks are processed and verified
by all nodes
world state
contracts
world state
contracts
world state
contracts...
Develop with Ontology // Ready to code
69
• Transaction (Message)
- contract address
- input arguments
• Code
- executed by virtual machine
• Data
argument
saddress
..
.
Transaction from network
Address
World state 𝜎t
code storage
Address
World state 𝜎t+1
code storage
Virtual Machine
updated
User Account
Virtual Machine
code
Message
Gas
Refund
Transaction
Gas supply
World state 𝜎t
How smart contract work?
Develop with Ontology // Ready to code
70
• Front-End
• App
• Back-End
• SDK
• Protocol
• Smart Contract ABI
(Application Binary
Interface)
• Blockchain
• Virtual Machine
Address code
storage
App Server
SDK
http
ABIABI
How to interact with smart contracts on Ontology?
Develop with Ontology // Ready to code
71
All you need to Develop with Ontology
Develop with Ontology // Ready to code
72
Smart Contract and VM
VM / Language
Light contract Solidity / EVM; Python / NEO VM
Complex contract WASM (EOS; Ontology; ETH 2.0)
Optimize for Finance Move (Facebook)
VM Language
NEO VM Python
WASM VM C++; Rust
Ontology multi-VM solution
Develop with Ontology
Develop with Ontology // Ready to code
73
• dApp Development Framework (Punica)
http://punica.ont.io/docs/punica/
https://punica.gitbook.io/docs/
http://punica.ont.io/tutorials/
• Online Smart-Contract IDE
https://smartx.ont.io/#/
• Chrome Plugin Wallet (Cyano)
https://github.com/ontio-cyano
• SDKs
https://ontio.github.io/documentation/ontology_over
view_sdks_en.html
https://github.com/ontio/ontology-java-sdk
https://github.com/ontio/ontology-ts-sdk
https://github.com/ontio/ontology-python-sdk
Develop with Ontology
Develop with Ontology // Ready to code
74
Smart contract development using Punica and SmartX – The Basics
Prerequisites
• Punica – Ontology dApp development framework
• SmartX – Ontology’s online smart contract IDE and debugger
• Cyano wallet – Google Chrome extension
• Explorer – Web based public tool used to track blockchain activity and transactions in general
1. Project setup
2. Launching SmartX
3. Start writing the program logic
4. Deployment and testing
Demo
Develop with Ontology // Ready to code
75
Have a try now!
Develop with Ontology // Coding now
76
Setup your Project with Punica
http://punica.ont.io/docs/punica/
Step 1
Develop with Ontology // Coding now
77
Code your Smart-Contract with SmartX
https://smartx.ont.io/
Step 2
Develop with Ontology // Coding now
78
Code, Compile, Deploy, Test
1. Install Cyano
2. Apply Test Ong from https://developer.ont.io/applyOng
3. ABI
4. Deploy https://explorer.ont.io/testnet
5. Test
Step 3
Develop with Ontology // Coding now
79
Build dApp: Interact with Blockchain
http://punica.ont.io/docs/punica/
Step 4
Develop with Ontology // Coding now
80
Try ONT ID now!
Develop with Ontology // ONT ID
81Develop with Ontology
Infra
Engineering
Smart contract mechanism
Design
Governance model
Token economics model
Network hypothesis
Governance contract
Staking / gasgeneration & circulation
Consensus
Network Infra
dApp(s) Other dApp(s) FT/NFT/PFT
Biz app(s)
// ONT ID
82Develop with Ontology
Application
ONT ID Address (wallet) Storage
DataDigital assetProof of the capability
to own the digital asset
BusinessGet ready for
business
Claim
Token
&
DToke
n
TokenizationAssetization
// ONT ID
83Develop with Ontology // ONT ID
84Develop with Ontology
W eb-appO N T ID
Signing SD KSigning server
Account
O N T AuthforEnd user(s)
Trust Anchor
(TA)
C laimFactory
C laim storeSign m achine
O N T ID
O ntology N am e System
(O N S)
Ontology m
ainnet
W eb-appO N T ID
W eb-app
W eb-app
D elegate and get notified for new w eb-apps
O N T ID m anagem entm ap ontology dom ain w ith w eb-app account
claim and proof
anonym ous credential
bring qualified
O ntology m ainnet
Self-sovereignC laim store
R ESTful
R ESTful
// ONT ID
85Develop with Ontology // ONT ID
86Develop with Ontology
W eb-app
O N T IDSigning SD K
Signing server
Account
End user(s)
O N T ID
O ntology N am e System
(O N S)
Ontology m
ainnet
W eb-appO N T ID
O N T ID m anagem entm ap ontology dom ain w ith w eb-app account
R ESTful
generate, m ap and m anage
delegate
Sign api
// ONT ID
87Develop with Ontology // ONT ID
88Develop with Ontology
W eb-app
O N T IDSigning SD K
Signing server
Account
O N T AuthforEnd user(s)
Sign m achineO N T ID
Ontology m
ainnet
R ESTful
D ataD Token and M arketplace
SD K
M arket-place server
R ESTful
R esource Audit SD K
D ata Storage
AuditR ESTful
M arket-place
contract
D Tokencontract
// ONT ID
89Develop with Ontology // ONT ID
90
WHAT CAN YOU DO?
Develop with Ontology
91
Welcome to Blockchain World, Seed Developers!
• Get your ONE & ONLY Certificate
• Scan QR code
• Active it on chain with ONT Auth
• Pass to Klein Bottle Challenge
• Join Ontology
• Start your genesis block
To be part of future // Join Ontology
92
Self-sovereign Identity & Personal Claims Tool
Ontology Authenticator
To be part of future // Join Ontology
93
Ontology Klein Bottle Challenge
• Technical capability and marketing resources
• Full-scale incubation support and global community support
• Investment from Ontology and be a core part of the Ontology ecosystem
$20,000 ONG Rewards Available to Each University
To find out more, please visit ont.io
To be part of future // Join Ontology
94
Part-time
Tech
Contributor
Community
Coordinator
Full-time
Join Ontology today,
be a part of the future
To be part of future // Join Ontology
95
Scan and join Ontology
To be part of future // Join Ontology
96
Ask anything about Ontology now
Q & A
97
TRUST
Redefined
ont.io
OntologyNetwork
ONTnetwork
Ontology
https://discord.gg
/pQRHtbD
OntologyNetwork
OntologyNetwork
OntologyNetwork
Scan to download
ONT AUTH
98
Ask anything about Ontology now
End