Professional Documents
Culture Documents
DFINITY
Crypto
Techniques
V1 - 19th May 2017
Threshold Relay
Produce randomness that is incorruptible,
unmanipulable and unpredictable
BACKGROUNDER
Verifier
Signature
SIGN 10101010101
Private 00101101010
10010101010
Key
10010101001
Verifier
Signer’s identity
Public
Signer Key
Verifier
Verifier
Signature
SIGN 10101010101
Private 00101101010
10010101010
Key
10010101001 VERIFY
Verifier
Signer’s identity
Public
Signer Key
Verifier
Verifier
Signature
SIGN 10101010101 DETERMINISTIC
Private 00101101010
RANDOM
10010101010
Key NUMBER
10010101001 VERIFY
Verifier
Signer’s identity
Public
Signer Key
Verifier
Verifier
Signature
SIGN SIGN SIGN COMBINE 10101010101 DETERMINISTIC
00101101010
RANDOM
10010101010
Share 1
Share 2
Share 3
Share 3
01010101010
11010111011
01010101010
Signer Signer Signer 10101001010
Verifier
Signature
Share 4
Share 5
Share 9
Public
Signer Signer Signer Key
Verifier
Verifier
DETERMINISTIC
RANDOM
NUMBER
Verifier
Verifier
Important observations of powerful magic
1. A group identified by its threshold public key can only
produce a single valid output signature on given seed data
DETERMINISTIC
RANDOM
NUMBER
Verifier
Verifier
Important observations of powerful magic
1. A group identified by its threshold public key can only
produce a single valid output signature on given seed data
Verifier
Important observations of powerful magic
1. A group identified by its threshold public key can only
produce a single valid output signature on given seed data
Verifier
Important observations of powerful magic
1. A group identified by its threshold public key can only
produce a single valid output signature on given seed data
PUBKEY 0x1bd1ccf169d755306e077b38cb9aeae28e245351
DEPOSIT: 1000 DFN
PUBKEY 0x9a197453dcface85be2fbe32c8cc19bd30576ee1
DEPOSIT: 1000 DFN
PUBKEY 0x2b197453dcfabe85be2fbe31c8cc19bd30576ed0
DEPOSIT: 1000 DFN
Each client (“process”) belongs to threshold groups
Whose public keys are also registered on the supporting ledger
…
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
0x7de4ac5… 0x8fb251b… 0x1a7234e… 0x2b197453… 0xb6e1a33…
At each height in the sequence, there is a current group…
h
That signs the previous group’s signature…
h+1 h
G = G[ mod |G|]
The relaying between groups is unmanipulable and infinite
This is what Threshold Relay looks like
h 1
SIGNATURE
h 1
The signature created at h-1 selects the group at h
h
=)
h h 1
G = G[ mod |G|]
Group members at h broadcast signature shares
h
BROADCAST
h h
{ p , p 2G }
Collect threshold of shares & create unique group signature…
h
SIGNATURE
h h h
= bls({ p , p 2 G })
That selects the next group, ad infinitum
h+1
=)
h+1 h
G = G[ mod |G|]
Producing a decentralized Verifiable Random Function (VRF)
h 7 h 6 h 5 h 4 h 3 h 2, h 1 h =)
, , , , , ,
COMING UP…
Faulty
(Correct)
10,000
3,000
7,000
1e 17
Probability that a sufficient
Group Size 400 proportion of the group are faulty
Threshold 201 that it cannot produce a signature
…
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
- - - - -
Need setup threshold scheme within 1000 blocks using DKG…
Joint
Feldman
DKG
…
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
- - - - -
Successful groups register their Public Key on the ledger
…
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
- - - 0x2b197453… -
Setup is independent of blockchain progression…
Joint Joint
Feldman Feldman
DKG DKG
…
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
- - - 0x2b197453… -
And occurs asynchronously
…
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
GRP PUBKEY
0x7de4ac5… 0x8fb251b… - 0x2b197453… -
New clients and groups activated in CURRENT_EPOCH + 2
⇠ 3 ⇠ 2 ⇠ 1 ⇠
CHAIN HEAD
Activation…
GROUP
Join tx Join tx 0x2b197453…
GROUP
CLIENT
0x2b197453… 0x6e22e1ba… CLIENT
0x6e22e1ba…
In choosing the epoch length there are a number of considerations. For correctness, an epoch must
minimally contain more blocks than may ever be present in a chain fork. However, since light clients only
require key frame header copies, for reasons of efficiency, epochs may be much longer e.g. one week
Probabilistic Slot Protocol
Extend the Threshold Relay system to produce a more secure
and faster (50X faster than Ethereum) blockchain
At each height, the randomness orders the processes…
VRF
h 3
P0xA19...
P0x9E3...
P0x11F...
P0x402...
At each height, the randomness orders the processes…
VRF
h 3 h 2
P0xA19... P0x8C2...
P0x9E3... P0x398...
P0x11F... P0x2DA...
P0x402... P0x7A5...
At each height, the randomness orders the processes…
VRF
h 3 h 2 h 1
SLOT0
P0xA19... P0x8C2... P0x49B... P0xC6A...
SLOT1
P0x9E3... P0x398... P0x621... P0x03E...
SLOT2
P0x11F... P0x2DA... P0xB0B... P0xD1D...
SLOT3
P0x402... P0x7A5... P0x904... P0x3E1...
...
Value of candidate blocks scored by author’s slot…
VRF
h 3 h 2 h 1 h
1pt
P0xA19... P0x8C2... P0x49B... P0xC6A...
1
pt
2 P0x9E3... P0x398... P0x621... P0x03E...
1
pt
4 P0x11F... P0x2DA... P0xB0B... P0xD1D...
1
pt
8 P0x402... P0x7A5... P0x904... P0x3E1...
Can also introduce block relay rules, e.g. delays
VRF
h 3 h 2 h 1 h
5s 1pt
P0xA19... P0x8C2... P0x49B... P0xC6A...
1
6s pt
2 P0x9E3... P0x398... P0x621... P0x03E...
1
7s pt
4 P0x11F... P0x2DA... P0xB0B... P0xD1D...
1
8s pt
8 P0x402... P0x7A5... P0x904... P0x3E1...
We can create & score blockchains that converge
h 3 h 2 h 1 h
BEST 1
5s 1pt PARENT
3 pts
4
1
6s pt 3pts
2
1
7s pt
4
1
8s pt
8
Very nice. But usual limitations. O no…
Highest
scoring chain
head
When BLOCK_TIME expires, witness by notarizing…
Group members sign until ≥1 blocks receive threshold signature
NO Is YES
Signed valid and
Block @ h Broadcast sig. Sign the best
higher scoring P’s SLOT
received from P share on block blocks seen
chain? ready?
Of course, this faulty process will later be expelled for its provably
Byzantine actions, but why provide room for misbehavior…
1
6s pt
D
EA
2
D
1
7s pt
4
1 Publish immediately or your block loses
8s pt its chance to be notarized
8
and included….
Optimal case. Overwhelming finality in 2 blocks + relay
h 2 h 1 h h+1
5s 1pt
h+1 RELAY
1 G
6s pt
D
EA
2
D
7.5s
SPV
- Equivocation Light client needs only
Merkle root of groups
Relative Performance Copper Release
Average 10 mins
Average 20 secs
Average 5 secs
6 confirmations
37 confirmations
2 confirmations+relay
Low due to
Sybil r Consensus
esistan
io n c e
i d a t Sybil
Va l State storage Validation
Conse resistance
nsus
State storage
TCP/IP
Application
Computer Science should not go out of fashion Transport
Internet
Network Access
“Scale-out” using 3-layer architecture
CONSENSUS
Threshold Relay chain
generates randomness and
records network metadata and
STATE ROOT Validation Tree “state root”.
RANDOM BEACON
DRIVES TREE VALIDATION
Asynchronous “Validation Tree”
composed “Validation Towers”.
Does for state validation what
Merkle tree does for data.
(T X, ReadT X , S) STORAGE
State and updates to state
TX stored on shards. State
transitions passed to
STATE SHARDS Validation Tree.
Near Term Client Releases
The Decentralized
Cloud