DEMOCRATIC CONSENSUS - University of New South Wales
Transcript of DEMOCRATIC CONSENSUS - University of New South Wales
DEMOCRATIC CONSENSUS:A COMPARATIVE INTRODUCTION TO THE GRAPHENE BLOCKCHAIN
RYAN R. FOX
https://linkedin.com/in/ryanrfox
RYAN R. FOX
A COMPARATIVE INTRODUCTIONTO GRAPHENE USING BITCOIN AS THE REFERENCE
Will compare:• Genesis State• Participants• P2P network• Consensus algorithm• Objects• Security• Performance
What Graphene Offers:• Democratic Consensus (Stake Voting)• High Performance FinTech Platform• Hierarchical Named Account Authorities• Decentralized Exchange• Smart Coins• User Issued Assets• Pegged Assets• Price Feeds• Referral System• Worker Proposals
HISTORY OF GRAPHENE
• Concept and original design: Daniel Larimer (2010)• Formed company: Invictus Innovations, Inc. (2013)• Distributed Autonomous Corporation DAC (2013)• Mined identity: Keyhotee (2013) • Momentum PoW algorithm: ProtoShares (2013)• Predecessor codebase: BitShares 0.9 (2014)
A BRIEF OVERVIEW OF GRAPHENE
• Toolkit for blockchain development• Developed by Cryptonomex, Inc.• Offered under MIT License• Download: https://github.com/cryptonomex/graphene/
• Derived works:• BitShares 2.0 decentralized exchange (2015)• Steem blogchain (2016)
• PeerPlays decentralized gaming (2016)
DISCLAIMER: RYAN R. FOX DOES NOT REPRESENT CRYPTONOMEX, INC. INFORMATION PRESENTED IS HIS OPINION
GRAPHENE KEY DESIGN INITIATIVESLEARN FROM BITCOIN, RIPPLE, LMAX EXCHANGE, ETHEREUM, ET AL.
• Make PoS secure• Focus on speed and scalability• Make security approachable• Build a financial services platform
GENESIS STATENOTHING | EVERYTHING INCLUDING THE KITCHEN SINK
• Initial stakeholders• Consensus parameters• Reserve Pool
• Puzzle• Rewards• Maximum supply
BLOCKCHAIN PARAMETERSFIXED | DYNAMIC
• Tune running code• Proposal and Vote• Elected Committee
• Rigid coded rules• Hard fork
P2P COMMUNICATIONGOSSIP | PUSH
• Rapid propagation• Receive message• Validate• Forward
• Conversation• Query peer inventory• Request deltas• Validate
CONSENSUS ALGORITHMPOW MINER | DPOS WITNESS
Election
Round
Production
Validation
BLOCK REWARDISSUE NEW BITCOIN | TAP RESERVE POOL
• Blocks Probabilistic
• Inflation Predictable
• Blocks Prescriptive• Deterministic• Predictable
• Inflation Fx ( Recycling Rate )
VALUE REPRESENTATIONADDRESS | NAMES ACCOUNTS & BALANCES
Bitcoin:• Identity and value hashed
into a ScriptSig• Distinct, secured by crypto• Difficult to read, compute
• Balance sum UTXO
Graphene:• Identity is Named Account• Name ref. Account objectID
• Distinct, deterministic• Easy to read, compare
• Balance attribute of Account
STRUCTURE: OBJECTS HASH | OBJECT
Bitcoin:• Calculated hash of script• 2 ScriptSig formats
• P2PK• P2SH
• Examples• P2PK=12C5rBJ7Ev3YGBCbJPY6C8nkGhkUTNqfW9
• P2SH=342ftSRCvFHfCeFFBuz4xwbeqnDw6BGUey
Graphene:• Deterministic assigned Object• Space . Type . Instance
• Space: Defines where used• Type: Classification of object• Instance: Unique Space.Type
• Examples• 1.2.x Users• 1.3.x Assets• 1.11.x Operations
STRUCTURE: OBJECT STORAGEHASH | OBJECT
Bitcoin:• Hashes stored in database• 2 ScriptSig formats
• P2PK = 20-bytes• P2SH = 32-bytes
• Full hash transmitted on wire• 20-bytes or 32-bytes
Graphene:• objectID stored in database• (Space.Type.Instance)=8-bytes• (uInt-8.uInt-8.uInt-48)=64-bits
• Only instantID sent on wire• 6-bytes
TRANSACTION OPERATIONSGRAPHENE TRANSACTION
Op
era
tion
ID
Am
oun
t
Ass
et ID
Am
oun
t
Ass
et ID
Mem
o
AmountOp FeeFr
om
(A
ccoun
t ID
)
To (A
ccoun
t ID
)
Extentions
Signed Transaction
Transfer Operation
STRUCTURE: ACCOUNT & AUTHORITY
Graphene:• Account• Authority Type
• Threshold• Authorities
• Key• Weight
• Hierarchy within Accounts• Owner
• Active
Alice 1.2.12
Balances
1.3.0100.00
Authorities
Owner 100%
GHPDk…
Active
CORE
Weight 100%
Threshold
50%Threshold
1.2.12Alice
GHPYnJ…Weight 25%1.2.12
Carol
GHPLzx…Weight 25%1.2.12
Bob
GHPc8n…Weight 25%1.2.12
Doug
Other Account Attributes
MULTI-SIGNATURE TRANSACTIONM:N | HIERARCHICAL THRESHOLD
Bitcoin:• Assemble multisig address
• M validator addresses• N required signatures
• Pay: to new address• Spend: N signatures on Trx
• Must bring keys together• Must present complete Trx
• Compromise one, rekey all
Graphene:• Assign Authorities
• Assign Weight• Set Threshold
• Pay: to existing named account• Spend: Threshold of Authority
• Propose Trx on chain• Add Signature Operation• If Threshold, Trx valid
• Individual can update their keys• Authority tied to Identity
MULTI-SIGNATURE TRANSACTIONREAL WORLD EXAMPLE
Corp 1.2.37
Active50%
GPHb..
40%
GPHc..
30%
GPHd..
20%
CEO
CFO
Accounting
GPHf..
10%Bookkeeper
CFO 1.2.12
Active100%
GPHc..
90%
GPHd..
20%
CFO
CFO2FA
Account 1.2.12
Active80%
GPHd..
60%Accounting
GPHf..
30%Acct2FA
LIGHT WALLET DESIGN
• Separate wallet Authorization from block Validation• Active Key in wallet• Connect via WebSocket to trusted node(s)• Send signed transaction
A COMPARATIVE INTRODUCTIONTO GRAPHENE USING BITCOIN AS THE REFERENCE
Compared:• Genesis State• Participants• P2P network• Consensus algorithm• Objects• Security• Performance
Future Discussion Topics:• Decentralized Exchange• Smart Coins• User Issued Assets• Pegged Assets• Price Feeds• Referral System• Worker Proposals
DEMOCRATIC CONSENSUS:A COMPARATIVE INTRODUCTION TO THE GRAPHENE BLOCKCHAIN
RYAN R. FOX