Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ethereumの最新動向2018年8月

974 views

Published on

Sharding + CasperとなったEthereum2.0を中心に, Hybrid Casper FFGの解説とその後でてきたBeacon Chainの現状の解説を試みました.
すぐ古くなってしまうのと, 正しく理解できてないところもあると思うので, 参考までに.

Published in: Engineering
  • Be the first to comment

Ethereumの最新動向2018年8月

  1. 1. BLOCKCHAIN Ethereum 2018 / 08 / 28 @zigen - Casper Sharding -
  2. 2. zigen P R O F I L E • • L I K E BLOCKPARTY • •
  3. 3. E t h e r e u m • • BLOCKPARTY S h a r d i n g + C a s p e r = E t h 2 . 0 • •
  4. 4. C a s p e r t h e F r i e n d l y F i n a l i t y G a d g e t • Proof of Stake-based Finality • Hybrid Casper / PoS on PoW / Vitalik's Casper • New Fork Choice Rule • EIP-1011(deprecated) BLOCKPARTY C a s p e r C a s p e r t h e F r i e n d l y G h o s t • A Correct By Construction • Full Casper / Vlad's Casper •
  5. 5. CasperFFG https://www.slideshare.net/teramotokentaro/inside-casper
  6. 6. • Casper Contract • Validator • Client/Miner BLOCKPARTY C a s p e r F F G github.com/ethereum/casper github.com/karlfloersch/pyethereum gitHub.com/paritytech/parity-ethereum
  7. 7. 1. Casper Contract 2. Validator Casper Contract , 1500Eth 3. 1 (50Block) Validator Vote 4. Casper Contract Vote , slash/reward 5. Miner Casper Contract Fork 6. Validator logout Casper Contract 7. ( ) , Validator logout , BLOCKPARTY C a s p e r F F G
  8. 8. BLOCKPARTY C a s p e r F F G Block1 Block2 Block3Block0 Block49 Block50 Epoch 0 Epoch 1 Checkpoint: validator vote • Epoch 50Block • validator Epoch vote
  9. 9. BLOCKPARTY C a s p e r F F G Block1 Block2 Block3Block0 Block49 Block50 Epoch 0 • Fork , Validator checkpoint Block3' Block49' Block50 Validators Vote
  10. 10. BLOCKPARTY C a s p e r F F G Block1 Block2 Block3Block0 Block49 Block50 Epoch 0 • 2/3 vote Justified Block3' Block49' Block50 Validators Vote Justified
  11. 11. BLOCKPARTY C a s p e r F F G Block0 Block49 Block50 Epoch 0 • Epoch vote • 2/3 vote Block49' Block50' Validators Vote Justified Block99 Block99' Epoch 1
  12. 12. BLOCKPARTY C a s p e r F F G Block0 Block49 Block50 Epoch 0 • Justified Checkpoint Justified • , Justified Checkpoint , Finalize Block49' Block50' Validators Finalized Block99 Block99' Epoch 1 Justified
  13. 13. BLOCKPARTY C a s p e r F F G Block0 Block49 Block50 Epoch 0 , Checkpoint Justified Block49' Finalized Block49' Block50' Validators Justified Block99 Block99' Epoch 1 Justified
  14. 14. BLOCKPARTY C a s p e r F F G Block0 Block49 Block50 Epoch 0 vote validator Block49' Block50' Validators Justified Block99 Block99' Epoch 1 Justified
  15. 15. Validator Registration
  16. 16. BLOCKPARTY C a s p e r F F G - v a l i d a t o r r e g i s t r a t i o n - Casper Contract Validator Valcode Purity checker
  17. 17. BLOCKPARTY C a s p e r F F G - v a l i d a t o r r e g i s t r a t i o n - Casper Contract Validator Valcode Purity checker Ether (Stake) checkpoint vote
  18. 18. BLOCKPARTY C a s p e r F F G - v a l i d a t o r r e g i s t r a t i o n - Casper Contract Validator Valcode Purity checker Validator msg signature
  19. 19. BLOCKPARTY C a s p e r F F G - v a l i d a t o r r e g i s t r a t i o n - Casper Contract Validator Valcode Purity checker Validator , vote ,
  20. 20. BLOCKPARTY C a s p e r F F G - v a l i d a t o r r e g i s t r a t i o n - Casper Contract Validator Valcode Purity checker Validator deploy Valcode contract
  21. 21. BLOCKPARTY C a s p e r F F G - v a l i d a t o r r e g i s t r a t i o n - Casper Contract Validator 2. Deposit(valcode_addr) Valcode 1. Deploy validation contract 3. Register Validator 8. Log validator index 4. raw_call(valcode_addr) Purity checker 5. Fetch bytecode6. Purity check 7. Return result
  22. 22. Vote
  23. 23. BLOCKPARTY C a s p e r F F G - v o t e - Casper Contract Validator Valcode Message Hasher Vote msg hash Contract
  24. 24. BLOCKPARTY C a s p e r F F G - v o t e - Casper Contract Validator 1. Vote(msg) Valcode 8. Process reward/slash 2. raw_call(msg) Message Hasher 5. raw_call(msg, sig, hash) 3. Hash 4. Msg Hash 6. Verify msg 7. Result
  25. 25. BLOCKPARTY V o t e M e s s a g e Block0 Block49 Block50 Epoch 0 Block49' Block50' Vote Block99 Block99' Epoch 1 • Validator Index • Target Hash • Target Epoch • Source Epoch • Signature N Hash(Block99') 1 0 Sig(Msg) Source Target
  26. 26. Casper ❤ Sharding Deprecating EIP 1011 in favor of a Casper+Sharding design https://medium.com/@djrtwo/casper-%EF%B8%8F-sharding-28a90077f121
  27. 27. Casper FFG , 

  28. 28. BLOCKPARTY S h a r d i n g + C a s p e r • Sharding CasperFFG https://twitter.com/VitalikButerin/status/1029905990085357568
  29. 29. Casper+Sharding v2.1 - Work in progress @ 2018, 8/28 - https://notes.ethereum.org/SCIg8AH5SA-O4C1G1LYZHQ?view
  30. 30. S h a s p e r BLOCKPARTY 01 02 03 Shard , Decentralized Security shard validator , , Scalabilty
  31. 31. C a s p e r + S h a r i n g BLOCKPARTY 01 02 03 Main PoS Chain / Sharding Manager Contract (Validator Shuffling) Main PoW Chain Peg Full PoS Casper FFG / IMD GHOST Recursive Proximity to Justification: "RPJ" ShardChain Account State Transaction PoS 1024 Beacon Chain
  32. 32. Beacon Chain
  33. 33. BLOCKPARTY B e a c o n C h a i n • Full Proof of Stake Casper FFG • Main PoW Chain Peg • Validator Block Main PoW Chain BeaconBlock 1 2 3 Beacon Chain63 1slot(8sec) 1cycle(64slot)
  34. 34. BLOCKPARTY B e a c o n C h a i n B l o c k • Slot Number • Active State Root • Crystallized State Root • PoW Chain Ref • Parent Hash • Randao Reveal Block Main PoW Chain BeaconBlock 1 2 3 Beacon Chain63 1slot(8sec) 1cycle(64slot)
  35. 35. Active State Crystallized State • Slot Number • Active State Root • Crystallized State Root • Randao Reveal • PoW Chain Ref • Parent Hash BLOCKPARTY B e a c o n C h a i n B l o c k • Pending Attestations • Recent Block Hashes 128 Block Hash Parent Beacon Chain BlockPoW Block • Validators • Last State Recalc Crystallized State slot • Indices For Slots Validator Slot , Shard • Last Justified Slot • Justified Streak Justifed • Last Finalized Slot • Crosslinking Start Shard • CrosslinkRecords 1Cycle 1Block
  36. 36. BLOCKPARTY B e a c o n C h a i n Block Main Chain (PoW) BeaconBlock Beacon Chain (PoS) Shard Chain (PoS)Block
  37. 37. IMD GHOST https://ethresear.ch/t/immediate-message-driven-ghost-as-ffg-fork-choice-rule/2561
  38. 38. BLOCKPARTY I m m e d i a t e - M e s s a g e - D r i v e n G H O S T • IMD GHOST Fork Choice Rule • Hybrid Casper FFG • • RPJ 1 2 3 4 2' 3' 4'
  39. 39. BLOCKPARTY I m m e d i a t e - M e s s a g e - D r i v e n G H O S T • Validator vote Validators
  40. 40. BLOCKPARTY I m m e d i a t e - M e s s a g e - D r i v e n G H O S T • Validator vote • , vote 15 16 65 55 56 Validators Canonical
  41. 41. BLOCKPARTY I m m e d i a t e - M e s s a g e - D r i v e n G H O S T Fork Tree , vote Canonical 15 16 65 55 56 Validators Canonical
  42. 42. BLOCKPARTY I m m e d i a t e - M e s s a g e - D r i v e n G H O S T Fork Tree , vote Canonical 15 51 65 20 Validators Canonical
  43. 43. BLOCKPARTY I m m e d i a t e - M e s s a g e - D r i v e n G H O S T Hybrid CasperFFG , Finalized/Justified . , . 15 51 65 20 Validators Canonical
  44. 44. Role
  45. 45. BLOCKPARTY R o l e Validator: VRC 32ETH Proposer: Validator Attester: / Validator Validators
  46. 46. BLOCKPARTY V a l i d a t o r R e g i s t r a t i o n C o n t r a c t : " V R C " Main PoW Chain VRC 32ETH Beacon Chain watch Validator Main PoW Chain Beacon Chain VRC Event Deposit pubkey, 32ETH
  47. 47. Beacon Chain BLOCKPARTY B e a c o n C h a i n S t a t e Beacon Chain Validator Shard Crystallized State , Validator Slot Shard Validator Main PoW Chain VRC Shard Chain 1 Shard Chain 2 Shard Chain 3 Shard Chain N
  48. 48. Beacon Chain BLOCKPARTY B e a c o n C h a i n S t a t e Shard Validator , Shard CrossLink CrossLink dynasty shard_block_hash CrossLink CrystallizedState Validator Main PoW Chain VRC Shard Chain 1 Shard Chain 2 Shard Chain 3 Shard Chain N CrossLink
  49. 49. Beacon Chain BLOCKPARTY B e a c o n C h a i n S t a t e Attester CrossLink Shard , AttestationRecord ActiveState beacon chain Attester Proposer Validator Main PoW Chain VRC Shard Chain 1 Shard Chain 2 Shard Chain 3 Shard Chain N CrossLink https://notes.ethereum.org/SCIg8AH5SA-O4C1G1LYZHQ?view#Per-block-processing
  50. 50. BLOCKPARTY s p e c • Validator Login/Logout • Shard Chain , • Shard Chain • Canonical Chain vote Slash • Slashing Condition • Shard • Validator Shard •
  51. 51. BLOCKPARTY • VRC ETH Shard • Attester Proposer •
  52. 52. Implementation
  53. 53. BLOCKPARTY E t h e r e u m 2 . 0 • Prysm • Nimbus • Diamond Drops • Lighthouse • Loadstar • Harmony github.com/prysmaticlabs/prysm github.com/status-im/nimbus github.com/Drops-of-Diamond/diamond_drops github.com/sigp/lighthouse github.com/ChainSafeSystems/lodestar_chain github.com/ethereum/ethereumj Go Nim Rust Rust JS Java
  54. 54. P r y s m b y P r y s m a t i c L a b s • • Discord • Geth , • github.com/prysmaticlabs/prysm
  55. 55. https://docs.google.com/drawings/d/1ZzzV7BNTZUl5jXkyPAXpyeW1pt7Dtz_m6KD9usQQ0o4/edit?usp=sharing Prysm
  56. 56. • Ethereum sharding general introduction (deprecated) -- March 19th • Ethereum2.0 -- July 6th • what you can do for ethereum2.0 a.k.a. sharding -- June 12th • Sharding FAQ • github.com/ethereum/sharding (deprecated) • Epoch-less CasperFFG Liveness/Safety argument • Simple synchronous cross shard transaction protocol • Discussion p2p message serialization standard • CBC Casper in the face of the new PoS Sharding plasns on Ethereum • Prysmatic Labs Biweekly Development updates • Immediate-Message-Driven-GHOST as FFG Fork choice rule • Beacon Chain Casper FFG RPJ mini spec https://notes.ethereum.org/9MMuzWeFTTSg-3Tz_YeiBA?view# hwwhww ethresearch , gitter ethereum/sharding

×