In-depth analysis of what are the special features of Polkadot and Ethereum 2.0?

This article is approximately 1655 words,and reading the entire article takes about 3 minutes
Comprehensive analysis of the differences between Polkadot and Ethereum 2.0.

Polkadot Knowledge GraphPolkadot Knowledge Graph

It is our entry-level article on Polkadot from zero to one. We try to start from the most basic part of Polkadot and provide you with a comprehensive understanding of Polkadot. Challenges, but we hope that through such efforts, everyone can correctly understand Polkadot, and people who do not know Polkadot can easily and quickly grasp Polkadot-related knowledge. Today is the 41st issue of this column, and we will introduce Polkadot in an all-round way. What are the characteristics of Ethereum 2.0.

Since Polkadot’s white paper was officially released in 2016, after several years of low-key testing and development, Polkadot’s core function development and ecological development have made significant progress, and parachain slot Auction has become the norm.

Ethereum, which came out in 2014, can be said to be the leading representative of the public chain. In the course of 8 years of development, Ethereum is undergoing rapid changes.At present, Ethereum is working on completing the upgrade of Ethereum 2.0, and it took a week to prepare for the upgrade in the last month

, and Ethereum will also transition from a Proof of Work (PoW) consensus mechanism to a Proof of Stake (PoS).

The competition of the public chain has always received a lot of attention. In the past, since Dr. Gavin was the co-founder of Ethereum and later created Polkadot, Polkadot and Ethereum were regarded as strong rivals to each other.

Both Polkadot and Ethereum 2.0 are sharded blockchain protocols. Therefore, they provide scalability by executing transactions in separate shards and providing a protocol for sending messages between shards.

Model

Model

Shards in Ethereum 2.0 all have the same state transition function (STF), like the rules governing how the blockchain changes state with each block.

This STF provides an interface for the execution of smart contracts. Contracts exist on a single shard and can send asynchronous messages between shards.

Similarly, in Polkadot, each shard carries the core logic, the shards are executed in parallel, and Polkadot can send cross-shard asynchronous messages

However, each Polkadot shard (i.e. parachain) has a unique STF. Applications can exist either in a single shard, or across multiple shards through compositional logic.

Polkadot uses WebAssembly (Wasm) as a meta-protocol. As long as the validators on Polkadot can execute in the Wasm environment, the STF of the shard can be abstracted. Polkadot will support smart contracts through parachains.

On Polkadot, smart contracts will be able to call each other synchronously in the same parachain, and call each other asynchronously between parachains.

architecture

architecture

Ethereum 2.0The main chain of Ethereum 2.0 is called Beacon Chain (beacon chain).

The main load on the beacon chain is attestations, i.e. votes on the availability of shard data and the validity of the beacon chain

Each shard in Ethereum 2.0 is just a blockchain with an Ethereum Wasm (eWasm) interface.

Ethereum 2.0 launched Phase 0 of its multi-phase deployment in December 2020, running in parallel with the traditional Ethereum 1.0 chain:

Phase 0 provides the beacon chain, accepts deposits from validators and enables proof-of-stake consensus, eventually across many shards.The first phase launches 64 shards as a simple chain to test the finality of the beacon chain.

Each shard submits a crosslink to the beacon chain, which contains information that finalizes the shards data

Phase 1.5 integrates Eth 1 into a shard, finalizing the blocks of the proof-of-work chain.

In-depth analysis of what are the special features of Polkadot and Ethereum 2.0?

Phase 2 implements the eWasm interface, phasing out proof-of-work, and finally making the system safe for end users.

After launching the Beacon Chain in Phase 0, the roadmap changed to prioritize transitioning the traditional Ethereum 1.0 chain from Proof-of-Work to Ethereum 2.0’s Proof-of-Stake consensus before rolling out shards on the network.

Polkadot

The network will also have sidechains that interact with chains that are not part of the final ethereum 2.0 protocol.

Like Ethereum 2.0, Polkadot also has a main chain, called the relay chain, with multiple shards, called parachains. Parachains are not limited to a single interface like eWasm.

Instead, they can define their own logic and interface, as long as they provide the STF to the Relay Chain validators in order to enforce it.

Polkadot now exists as a relay chain, and only plans to launch the ability to verify 20 shards per block, gradually expanding to 100 shards per block

In addition to parachains that are scheduled to execute every block, Polkadot also has parathreads that are scheduled to execute on a dynamic basis.

In order to interact with chains that want to use their own finalization process (such as Bitcoin), Polkadot has bridge chains that provide two-way compatibility.

consensus

consensus

Both Ethereum 2.0 and Polkadot use a hybrid consensus model where both block production and finality have their own protocols.

The finality protocols—Ethereum 2.0’s Casper FFG and Polkadot’s GRANDPA—are both based on GHOST, and both can finalize batches of blocks in one round.For block production, both protocols use a slot-based protocol that randomly assigns validators to slots and provides fork selection rules for unfinalized blocks

—— RandDAO/LMD of Ethereum 2.0 and BABE of Polkadot.

There are two main differences between Ethereum 2.0 and Polkadot consensus:

Ethereum 2.0 completes batches of blocks based on time periods called epochs. The current plan is to have 32 blocks per epoch and complete all blocks in one round. Since the estimated block time is 12 seconds, this means that the expected completion time is 6 minutes (maximum 12 minutes).

Polkadot’s finality protocol, GRANDPA, finalizes a batch of blocks based on availability and validity checks that occur as the proposed chain grows.

The time to finalize varies depending on the number of checks that need to be performed (invalid reports lead to agreement requiring additional checks). Estimated completion time is 12-60 seconds.

Ethereum 2.0 requires a large number of validators per shard to provide strong validity guarantees. Polkadot can provide stronger guarantees by using fewer validators per shard

Polkadot achieves this by having validators distribute erasure codes to all validators in the system, so that anyone — not just a shard’s validator — can reconstruct a parachain’s blocks and test their validity.

Randomly selected validator assignments and secondary checks performed by randomly selected validators make it impossible for small groups of validators on each parachain to collude with each other.

Staking mechanism

Ethereum 2.0 is a proof-of-stake network, and each validator instance requires 32 ETH for proof of stake. Validators run a main beacon chain node and multiple validator clients - one validator for every 32 ETH.

These validators are assigned to committees, which are randomly selected groups that validate shards in the network.Ethereum 2.0 relies on a large validator pool to provide availability and validity guarantees:Each shard requires at least 111 validators to run the network, and each shard requires 256 validators to complete all shards within one epoch

In-depth analysis of what are the special features of Polkadot and Ethereum 2.0?

. For 64 shards, thats 16384 validators (256 validators per shard).

Polkadot plans to have 1,000 validators by the end of its first year of operation, and each parachain in the network needs about 10 validators.

Fragmentation

Fragmentation

Every shard in Ethereum 2.0 has the same STF. Each shard will submit a crosslink to the beacon chain and implement an eWasm execution environment.EWasm is a restricted subset of Wasm for Ethereum contracts

. The eWasm interface provides a method that can be used in contracts. There should be a similar set of development tools such as Truffle and Ganache to develop for eWasm.

Polkadot has a Substrate development framework, which allows full-spectrum configurability using a set of modules, combining and extending these modules to develop the STF of the chain.

messaging

messaging

Shards in Ethereum 2.0 can access each others state through their crosslinks and proofs of state.In the Ethereum 2.0 model with 64 shards, each shard publishes a crosslink for each block in the beacon chain,This means that a shard can contain logic that executes based on some light client transaction proofs on another shard

. Ethereum 2.0 has not released a specification for nodes to pass messages between shards.

Polkadot uses the cross-consensus messaging format (XCM) to allow parachains to send arbitrary messages to each other. Parachains open connections with each other and can send messages over their established channels.

Given that collators also need to be full nodes of the relay chain, they will be connected and able to relay messages from parachain A to parachain B.Messages are not passed through the relay chain, only postings and proofs of channel operations (opening, closing, etc.) enter the relay chain

In-depth analysis of what are the special features of Polkadot and Ethereum 2.0?

Polkadot will add a protocol called SPREE, which provides shared logic for cross-chain messages. Messages sent via SPREE carry additional guarantees about the origin and interpretation of the sink chain.

governance

governance

Ethereum 2.0 governance is still unresolved. Ethereum currently uses GitHub discussions, all core developer calls, and off-chain governance procedures such as Ethereum Magicians to decide on the protocol.Polkadot uses on-chain governance and a multi-institutional system. There are multiple avenues for issuing proposals, such as on-chain councils, technical committees, or the public

. All proposals eventually pass a referendum, with the majority of tokens always controlling the outcome.

Decisions are made on-chain, binding and autonomous.

upgrade

upgrade

The upgrade to Ethereum 2.0 will follow the normal hard fork process, requiring validators to upgrade their nodes to implement protocol changes.. Anything in the STF, transaction queue, or off-chain workers can be upgraded without forking the chain.

in conclusion

Both Ethereum 2.0 and Polkadot use a sharding model, where shard chains (shards in Ethereum 2.0 and parachains/parathreads in Polkadot) are secured by the main chain. By connecting the shard state to the blocks of the main chain. The two protocols differ in a few major areas.

first,first,

All shards in Ethereum 2.0 have the same STF, while Polkadot makes shards have an abstract STF

Secondly, the governance process in Ethereum 2.0 is planned to be carried out off-chain, so hard forks need to be coordinated to make governance decisions, while in Polkadot, decisions are made on-chain and autonomously.

Welcome everyone to join our Telegram of Polkadot Ecological Research Institute: https://t.me/polkadot_eri

Welcome everyone to join our Telegram of Polkadot Ecological Research Institute: https://t.me/polkadot_eri

Welcome everyone to visit the Mirror address of Polkadot Ecological Research Institute: https://mirror.xyz/0x9A259b3a2316281Cc948cE2Cf1Ac610a79844f05

Original article, author:Polkadot生态研究院。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks