Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
Chainspace: A Sharded Smart Contracts Platform
WrittenBy:MustafaAl-Bassam,AlbertoSonnino,SheharBano,DaveHrycyszyn,andGeorgeDanezis
PresentedBy:AaronZhang
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• ImplementationandEvaluation• Limitations• Conclusions
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• ImplementationandEvaluation• Limitations• Conclusions
Modernblockchainsareveryslowwhensignificantvolumeisapplied.
Chainspace
• Chainspaceisadistributedledgerplatformforhigh-integrityandtransparentprocessingoftransactionswithinadecentralizedsystem.• ItavoidsthehighlatencythatEthereumfacedbyshardingthecoinbase.• Supportsanewformofprivacybyseparatingthecodethatexecutescommandsandthosethatcheckthecomputation.
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• ImplementationandEvaluation• Limitations• Conclusions
• ItemsthatholdstateinChainspace.
• Refertotheobjectsasoandasetofobjectsaso∈O.
• ObjectshaveanIDandaType.
• Objectsareeitheractiveorinactive.
Objects
Contracts
• Specialtypeofobjectthathasfunctionsanddataregardingitself.
• AnamespaceforObjectswithinChainspace.
• Refertocontractsasc
Procedures
• Whereanumberofobjectsareprocessedtogeneratesomeoutputofobjects.
• c.p(~w,~r, lpar, spar)→ ~x, lret,sret
Checkers
• Everycontracthasacheckerwhichrecievesaprocedureandthenchecksiftheprocedureisvalid.
• c.v(p,~w,~r,lpar,~x,lret,dep)→{true,false}
• HonestShards• Ashardwherelessthan1/3rdofallnodesarenotcontrolledbyanattacker.
• DishonestShards• Ashardwheremorethan1/3rdorallnodesarecontrolledbyanattacker.
Chainspace supports Security Properties
• Transparency• EverynodeintheChainspacepublishesaMerkleTreetypeobjectwhichprovidesahistoryofchangestothatnodeitself.
• Integrity• Notwonodesintheshardcanhavethesamedata.
• Encapsulation• Shardscannotcommunicatewitheachother.
• Non-repudiation• Ifafailurewouldallowthosetoaddinvalidtransactions,usingtheMerkleTreedata,onecanfindwherethatdatawasaddedandtakeaction.
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• ImplementationandEvaluation• Limitations• Conclusions
• Transactionsareallcompiledinasequenceoftracesoftheproceduresthathavebeenusedtocreatethem.
Two Rules to Modify Nodes within Contracts
• SequenceRule• Thetracelistisonlyvalidifitsobjectsareinsequence
• CheckRule• Onlytransactionsthatpassthecheckerforthecontractmaybeadded.
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• ImplementationandEvaluation• Limitations• Conclusions
Directed Acrylic Graph
• Acombinationofobjects,procedures,andoutputsformaDirectedAcrylicGraphwhichcanbeusedtospeedupablockchain’sprocess.
• Auniqueidentifierisattributedtoeachandeverytraceintheobjectshistoryforquickindexing.
Security Theorem 1
Nosequenceofvalidtransactions,byapolynomialtimeconstrained
adversary,mayre-createanobjectwiththesameidentifierwithan
objectthathasalreadybeenactiveinthesystem.
ProofFortwoobjectstohavethesameID,theymusthavebewithinthesameshard,becreatedbythesameprocedure,andhavethesameinputs.Whenanobjectiscreatedwithatleastoneinput,theactiveinputobjectsareremovedfromthesetandnewnodescreatedwiththesameinputobjectcannotbeadded.
Audits
• PartialAudit• Apartialauditissimplywhentheblockchainreturnsareplywhetherornotthetransactionhasbeenpassed
• FullAudit• Afullauditinvolvesreplayingalltransactionsfromthebeginningoftimesotheusercanunderstandthetracesthatledtothecurrenttransaction.
Security Theorem 2
IfacontractcappearsinanytracewithinatransactionT,thentheconcernednodessetΦ(T)willcontainnodesinashardmanaginganobjectOofatype
fromcontractc
Proof TransactionsTcannotbeplacedwithinanobjectOwithoutpassingthecheckerfunctionwhichonlyworksiftheobjectmatcheswiththesharditself.
S-BAC
• ShardedByzantineAtomicCommit• CombinationoftheByzantineAgreementandanAtomicCommit• ByzantineAgreement
• ensuresthatallhonestmembersofanodesideof3f+1willcometoanagreementdespitedishonestnodesofsizesmallerthanf.
• AtomicCommit• Ifonesharddeniesthecommit,allshardsdenythecommit.
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• SystemandApplicationsSmartContracts• ImplementationandEvaluation• Limitations• Conclusions
Implementation
• ImplementationinJava(Nodes)andPython(Contracts)
• Anodeismadeupoftwoparts• Checker,checkstoseeiftheprocedurematcheswiththenode• Core,whichcanaccessthetracestofindpreviousiterationsofthenodetocompare.
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• SystemandApplicationsSmartContracts• ImplementationandEvaluation• Limitations• Conclusions
Limitations
• Ashardcanbetakenoverifmorethan1/3rdofitsnodesarecontrolledbyanattacker.• Nodesfromothershardscandetectmaliciousshardsbuttakenoaction.• Checkersforeachnodeisverycostlyintime.
Outline
• Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• SystemandApplicationsSmartContracts• ImplementationandEvaluation• Limitations• Conclusions
Conclusion
• Chainspaceisanovelideaforexpeditingthetransactionsforacryptocurrencythathasalargeloadwhileincreasingprivacy.• S-BACisanewwaythatcryptocurrenciescanauthenticatethemselves.
Questions?