34
Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam, Alberto Sonnino, Shehar Bano, Dave Hrycyszyn, and George Danezis Presented By: Aaron Zhang

Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Chainspace: A Sharded Smart Contracts Platform

WrittenBy:MustafaAl-Bassam,AlbertoSonnino,SheharBano,DaveHrycyszyn,andGeorgeDanezis

PresentedBy:AaronZhang

Page 2: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign•  ImplementationandEvaluation•  Limitations• Conclusions

Page 3: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign•  ImplementationandEvaluation•  Limitations• Conclusions

Page 4: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Modernblockchainsareveryslowwhensignificantvolumeisapplied.

Page 5: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Chainspace

• Chainspaceisadistributedledgerplatformforhigh-integrityandtransparentprocessingoftransactionswithinadecentralizedsystem.•  ItavoidsthehighlatencythatEthereumfacedbyshardingthecoinbase.•  Supportsanewformofprivacybyseparatingthecodethatexecutescommandsandthosethatcheckthecomputation.

Page 6: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign•  ImplementationandEvaluation•  Limitations• Conclusions

Page 7: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

•  ItemsthatholdstateinChainspace.

•  Refertotheobjectsasoandasetofobjectsaso∈O.

•  ObjectshaveanIDandaType.

•  Objectsareeitheractiveorinactive.

Objects

Page 8: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Contracts

•  Specialtypeofobjectthathasfunctionsanddataregardingitself.

• AnamespaceforObjectswithinChainspace.

• Refertocontractsasc

Page 9: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Procedures

• Whereanumberofobjectsareprocessedtogeneratesomeoutputofobjects.

•  c.p(~w,~r, lpar, spar)→ ~x, lret,sret

Page 10: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Checkers

•  Everycontracthasacheckerwhichrecievesaprocedureandthenchecksiftheprocedureisvalid.

•  c.v(p,~w,~r,lpar,~x,lret,dep)→{true,false}

Page 11: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,
Page 12: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

• HonestShards• Ashardwherelessthan1/3rdofallnodesarenotcontrolledbyanattacker.

• DishonestShards• Ashardwheremorethan1/3rdorallnodesarecontrolledbyanattacker.

Page 13: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Chainspace supports Security Properties

•  Transparency•  EverynodeintheChainspacepublishesaMerkleTreetypeobjectwhichprovidesahistoryofchangestothatnodeitself.

•  Integrity•  Notwonodesintheshardcanhavethesamedata.

•  Encapsulation•  Shardscannotcommunicatewitheachother.

• Non-repudiation•  Ifafailurewouldallowthosetoaddinvalidtransactions,usingtheMerkleTreedata,onecanfindwherethatdatawasaddedandtakeaction.

Page 14: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign•  ImplementationandEvaluation•  Limitations• Conclusions

Page 15: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

• Transactionsareallcompiledinasequenceoftracesoftheproceduresthathavebeenusedtocreatethem.

Page 16: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Two Rules to Modify Nodes within Contracts

•  SequenceRule•  Thetracelistisonlyvalidifitsobjectsareinsequence

• CheckRule•  Onlytransactionsthatpassthecheckerforthecontractmaybeadded.

Page 17: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign•  ImplementationandEvaluation•  Limitations• Conclusions

Page 18: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Directed Acrylic Graph

• Acombinationofobjects,procedures,andoutputsformaDirectedAcrylicGraphwhichcanbeusedtospeedupablockchain’sprocess.

• Auniqueidentifierisattributedtoeachandeverytraceintheobjectshistoryforquickindexing.

Page 19: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Security Theorem 1

Nosequenceofvalidtransactions,byapolynomialtimeconstrained

adversary,mayre-createanobjectwiththesameidentifierwithan

objectthathasalreadybeenactiveinthesystem.

Page 20: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

ProofFortwoobjectstohavethesameID,theymusthavebewithinthesameshard,becreatedbythesameprocedure,andhavethesameinputs.Whenanobjectiscreatedwithatleastoneinput,theactiveinputobjectsareremovedfromthesetandnewnodescreatedwiththesameinputobjectcannotbeadded.

Page 21: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Audits

• PartialAudit•  Apartialauditissimplywhentheblockchainreturnsareplywhetherornotthetransactionhasbeenpassed

•  FullAudit•  Afullauditinvolvesreplayingalltransactionsfromthebeginningoftimesotheusercanunderstandthetracesthatledtothecurrenttransaction.

Page 22: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Security Theorem 2

IfacontractcappearsinanytracewithinatransactionT,thentheconcernednodessetΦ(T)willcontainnodesinashardmanaginganobjectOofatype

fromcontractc

Page 23: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Proof TransactionsTcannotbeplacedwithinanobjectOwithoutpassingthecheckerfunctionwhichonlyworksiftheobjectmatcheswiththesharditself.

Page 24: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

S-BAC

•  ShardedByzantineAtomicCommit•  CombinationoftheByzantineAgreementandanAtomicCommit•  ByzantineAgreement

•  ensuresthatallhonestmembersofanodesideof3f+1willcometoanagreementdespitedishonestnodesofsizesmallerthanf.

•  AtomicCommit•  Ifonesharddeniesthecommit,allshardsdenythecommit.

Page 25: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• SystemandApplicationsSmartContracts•  ImplementationandEvaluation•  Limitations• Conclusions

Page 26: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,
Page 27: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Implementation

•  ImplementationinJava(Nodes)andPython(Contracts)

• Anodeismadeupoftwoparts•  Checker,checkstoseeiftheprocedurematcheswiththenode•  Core,whichcanaccessthetracestofindpreviousiterationsofthenodetocompare.

Page 28: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,
Page 29: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,
Page 30: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• SystemandApplicationsSmartContracts•  ImplementationandEvaluation•  Limitations• Conclusions

Page 31: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Limitations

• Ashardcanbetakenoverifmorethan1/3rdofitsnodesarecontrolledbyanattacker.• Nodesfromothershardscandetectmaliciousshardsbuttakenoaction.• Checkersforeachnodeisverycostlyintime.

Page 32: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Outline

•  Introduction• SystemOverview• TheChainspaceApplicationInterface• TheChainspaceSystemDesign• SystemandApplicationsSmartContracts•  ImplementationandEvaluation•  Limitations• Conclusions

Page 33: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Conclusion

• Chainspaceisanovelideaforexpeditingthetransactionsforacryptocurrencythathasalargeloadwhileincreasingprivacy.•  S-BACisanewwaythatcryptocurrenciescanauthenticatethemselves.

Page 34: Chainspace: A Sharded Smart Contracts Platformwebpages.eng.wayne.edu/~fy8421/18fa-csc6991/slides/... · Chainspace: A Sharded Smart Contracts Platform Written By: Mustafa Al-Bassam,

Questions?