1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ethereum2.0(Serenity)について

Last updated at Posted at 2019-10-17

# はじめに

先週、devcon5 Osakaに参加してきました。
この中で、最も注目されたのが、Ethereumの次のアップグレードETH2.0(Serenity)の話題でした。これまでの流れを踏まえて、Ethereum2.0(Serenity)について覚書として、まとめてみました。

3.jpeg

ETH2.0の目的

Decentralization(分散性)、Resilience(弾性)、Security(安全性)、Simplicity(シンプルさ)、Longevity(持続性)

Ethereumのリリースこれまでと、これから

2015/05 Olympic testnet
2015/07 Frontier (開発者用)
2016/03 Homestead (smartcontract実装)
2017/10 Metropolis phase 1: Byzantium (zk-SNARKs実装、難易度アルゴリズム)
2019/02 Metropolis phase 2: Constantinople(difficulty bomb)
2019/10 Ethereum1.x Istanbul
Programmatic PoW導入 -> ASIC耐性を高める目的で導入。2.0への橋掛り的な位置付け。
具体的な内容としては、50ブロックごとにPoWアルゴリズムをランダムに変えるetcetc..
2019---> Serenity: Ethereum2.0 (PoS,Sharding,eWASM)
https://docs.ethhub.io/ethereum-roadmap/ethereum-2.0/eth-2.0-phases/
最も大きな課題であるトランザクション処理性能の向上が期待
現状の15TPS -> 少なくともVISAなど決済サービスが行なっている2,000TPS以上へ引き上げが可能?

Ethereum2.0のロードマップ

https://media.consensys.net/the-roadmap-to-serenity-bc25d5807268
Sharding roadmap
https://github.com/ethereum/wiki/wiki/Sharding-roadmap
https://docs.google.com/presentation/d/1G5UZdEL71XAkU5B2v-TC3lmGaRIu2P6QSeF8m3wg6MU/edit#slide=id.p4

Ethereum2.0を支えるアーキテクチャ

POS

PoWは、マイナーが P+イプシロン攻撃に脆弱であると考えられていることなどを問題視していました。
https://blog.ethereum.org/2015/01/28/p-epsilon-attack/

一部の専門家からは、PoSは、未だ、大規模ネットワークに展開されていないため、疑問の声があがっている
(2015年後半、Bitfury Groupが発表したPoSの初期の「ナイーブ」バージョンに対する攻撃ベクトルを調査した資料)
https://bitfury.com/content/downloads/pos-vs-pow-1.0.2.pdf

Casper

Vitalik氏は
最初の論文CaspertheFriendlyFinality Gadgetを発表。
https://github.com/ethereum/research/blob/master/papers/casper-basics/casper_basics.pdf

1990年代の映画「Casperthe Friendly Ghost」の演劇であり、コンセンサスシステムが高レベルでどのように機能するかを説明しています。

2番目の論文、
Casper the Friendly Finality Gadget
https://github.com/ethereum/research/blob/master/papers/casper-economics/casper_economics_basic.pdf
で、インセンティブの設計について説明されています。

ユーザーはバリデーターとして参加するために資金をデポジットしますが、ルール違反によってそれらを取り上げる手法を明らかにしています。
https://www.coindesk.com/markets/2017/02/22/ethereum-economics-gets-spotlight-in-vitalik-buterin-edcon-keynote/

3番目の論文
「AutomatedCensorshipAttackRejection」
https://github.com/ethereum/research/blob/master/papers/censorship_rejection/censorship_rejection.pdf
は、51%の攻撃について書かれています

Beacon Chain

Posを司る役目を果たすチェーンで、PoWMainChainの横で動くCoordinationLayerとして。
実データはShardChainが保有し、Beacon ChainはFinalityを与える役目をする。
BeaconChain自体は、データを保存せず、Attestationと言われるvalidatorのリストのみを保存しており、基本的な状態変更(送金など)は、このハッシュ値に変更のある操作を確認するに留め、実際のデータはシャードを調べるという目的をそれぞれ分割している。シャード変更->validator->ビーコンチェーンに記録という流れで、それぞれのノードとシャードがこのビーコンを介して対話するという意味でビーコンと呼ばれている。

Stores the status of every validator
Handles finality, fork choice
Maintains pseudo-randomness
Stores balance for validators
Stores latest valid ETH 1.0 block hash for deposit contract

(参考)
https://our.status.im/two-point-oh-the-beacon-chain/

ちなみに、フェイズ0では、Beacon Chainのコントラクトに32ETHをデポジット(BETH)することでvalidator nodeになることができる<レガシーチェーン上のETHとBeacon ChainのBETHの2種類のイーサリアムトークンが同時に存在>
さらにフェイズ0を開始するには最低524,288 ETHを新しいチェーンに入れる必要があるが、入金のプロセスが現状では1方向であることに注意が必要で、古いチェーンに引き戻すなどの操作はフェイズ2まではできなくなるとされています。
https://docs.ethhub.io/ethereum-roadmap/ethereum-2.0/eth-1.0-to-2.0-migration/

Casper FFG & Casper CB

最近、"LayerX、日本企業で初めてイーサリアム財団の助成金対象に選定"で有名になったのものこのレイヤーで、
PoS実装のことをCasperという。これらには、2つのCasperが現在考案されている。
https://medium.com/layerx-jp/cbc-casper%E3%81%A8%E5%BD%A2%E5%BC%8F%E7%9A%84%E6%A4%9C%E8%A8%BC-c456fddbd5c5

Casper FFG

Vitalikの提案で、PoW/PoSハイブリッドでブロック承認を行う手法。
提案されたブロックを他ノードが検証し、正しければValidatorは報酬をもらい、間違っていた場合はSlasher(罰金)が課せられるインセンティブ
Casper FFGはConstantinopleで実装予定だったが、Serenityまで延長。

(参考)
Explanation on Casper (outdated):
https://medium.com/coinmonks/a-simplified-look-at-ethereums-casper-4fa9461b245
Casper FFG paper: https://arxiv.org/abs/1710.09437
Casper FFG presentation (outdated): https://2018.edcon.io/assets/ppt/5.5/5.5am/Vitalik%20Buterin-So%20you%20want%20to%20be%20a%20Casper%20validator.pdf

Casper CBC(Correct by Construction)

Vlad Zamfirの提案仕様で、こちらはPoSのみでブロック承認。

(参考)
CBC Casper Tutorial:
https://vitalik.ca/general/2018/12/05/cbc_casper.html

Shard Chains

現状では、LoomnetworkなどSidechainの実装が考案されていますが、Ethereum自体も、2020年に実データをもつチェーンとして、リリースされる予定で、これによって、スケーラビリティの劇的な改善が期待されています。

Cross-Link

ShardとBeaconChainを同期するために存在します。それぞれのshardで承認されたblocksをCross-LinkがBeacon Chainの未承認blockと紐づけます。
それぞれのshardとbeacon chainは独立して承認されていくため、最終的には、これらの未承認blockも承認が行われFinalityされます。

eWASM

2020〜に予定されているもので、現在使われているEVMをeWASMに変更されます。
バイトコードがOPCODEからwasmに変更されることで、Goなどからwasmを出力できるようになり、Solidityのみでしか書けなかったコードが他の言語でも書けるようになります。

Contribute?

Prysm by Prysmatic Labs (Golang): https://github.com/prysmaticlabs/prysm/
Lodestar by ChainSafe (TypeScript): https://github.com/ChainSafeSystems/lodestar
Nimbus by Status (Nim): https://github.com/status-im/nimbus
Harmony (Java): https://github.com/harmony-dev/beacon-chain-java
Artemis by Pegasys (Java): https://github.com/PegaSysEng/artemis
Yeeth (Swift): https://github.com/yeeth/BeaconChain.swift
Shasper by Parity (Rust): https://github.com/paritytech/shasper
Lighthouse (Rust): https://github.com/sigp/lighthouse
EthResearch: https://ethresear.ch/
ETH2.0 Issues: https://github.com/ethereum/eth2.0-specs/issues
Prysmatic Labs Discord: https://discord.gg/6A6Fxwr
Sharding Gitter: https://gitter.im/ethereum/sharding

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?