1 / 64

Atomicity in Blockchains

This lecture explores the concepts of atomicity, consistency, isolation, and durability in distributed computing and blockchain systems. It delves into the challenges of achieving these properties in cross-chain transactions and smart contracts.

brownsean
Download Presentation

Atomicity in Blockchains

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Atomicity in Blockchains CS1951 L Spring 2019 21 March 2019 Maurice Herlihy Brown University

  2. timing Hello World! crashes omission Byzantine Now solve consensus Classical Adversary

  3. meltdown Привет мир!! spectre re-entrancy zero-day Now hold a free and fair election Modern Adversary

  4. This Lecture Rethink Distributed Computing

  5. This Lecture Rethink Correctness Linearizability ??? Atomicity “ACID” properties

  6. C Carol has wants

  7. A Alice has wants

  8. B Bob has wants

  9. A B C

  10. Classical Distributed Computing versus trusted central coordinator Crash failures, Lost messages …

  11. A B C DB DB DB

  12. A B C Lock your assets! DB DB DB

  13. A B C Lock your assets! DB DB DB

  14. A B C Prepare your transfers! DB DB DB

  15. A B C Prepare your transfers! OK OK DB DB OK DB

  16. A B C Commit! Done! Done! DB DB Done! DB

  17. “ACID” Properties Atomicity Consistency Isolation Durability

  18. “ACID” Properties Atomicity Consistency All or nothing: either Alice, Bob, Carol trade, or no one trades Isolation Durability

  19. “ACID” Properties Atomicity Consistency Each transaction preserves invariants: no money created or destroyed, et cetera Isolation Durability

  20. “ACID” Properties Atomicity Consistency Isolation No transaction sees another’s intermediate states: money once promised can’t be spent Durability

  21. “ACID” Properties Atomicity Consistency Isolation Transaction effects survive system crashes Durability

  22. Future Distributed Computing versus Blockchain & smart contracts Trust (almost) no one

  23. Abstraction:Distributed Ledger Append-only list of events Not just financial Everyone agrees on content Tamper-proof!

  24. Smart Contracts Not contracts, not smart … Turing-complete scripting language

  25. Hashlock Secret s Hashlock H(s) Contract Escrows asset, Knows H(s), Transfers asset when s provided

  26. Hashed Timelock Contract But if secret not provided within time k, refunds for everyone! time to publish & notice contract

  27. A B C Cross-Chain Swap Protocol altcoin blockchain bitcoin blockchain car title blockchain

  28. A B C Alice Has a Secret s H(s)

  29. A B C Alice Publishes Contract with Bob contract altcoin blockchain Transfer altcoins to Bob hashlock Time: t

  30. A B C Bob Publishes Contract with Carol contract Transfe bitcoins to Carol hashlock contract bitcoin blockchain Time: t

  31. A B C Carol Publishes Contract with Alice contract Transfer Cadillac title hashlock contract car title blockchain contract Time: t

  32. A B C Phase Two contract contract contract Time: t

  33. A B C Alice Triggers Contract with Carol contract contract reveal contract Time: t

  34. A B C Alice Triggers Contract with Carol contract contract reveal contract Time: t

  35. A B C Alice Triggers Contract with Carol contract contract reveal contract Time: t

  36. A B C Carol Triggers Contract with Bob contract contract contract Time: t

  37. A B C Carol Triggers Contract with Bob contract contract reveal contract Time: t

  38. A B C Carol Triggers Contract with Bob contract contract reveal contract Time: t

  39. A B C Bob Triggers Contract with Alice contract reveal contract contract Time: t

  40. A B C Bob Triggers Contract with Alice contract reveal contract contract Time: t

  41. A B C Bob Triggers Contract with Alice contract contract everyone happy! contract Time: t

  42. “ACID” Properties I laugh at your inadequate notions of correctness Atomicity Consistency Isolation Durability

  43. “ACID” Properties Atomicity Consistency Isolation All or nothing property impossible to guarantee Durability

  44. A B C Irrational Behavior Reveal s prematurely No Cadillac for you!

  45. If all parties conform, all swaps take place Done! Done! Done! Done!

  46. Even If some parties deviate, no conforming party is“worse off” I’m OK I’m OK I’m OK ??? Expressing correctness requires a little game theory

  47. Even If some parties deviate, no conforming party is“worse off” Defining what this means is a research project!

  48. New “ACID” Properties Atomicity Consistency Isolation If all conform, swaps happen, otherwise, conforming parties “no worse off” Durability

  49. “ACID” Properties Atomicity Consistency Isolation What does this mean for cross-blockchain transactions? Durability

  50. Strong Nash Equilibrium Everyone follows one strategy … But if a coalition deviates… It won’t improve its payoff

More Related