You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pos/architecture/index.md
+57-1Lines changed: 57 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,4 +8,60 @@ Nodes on Polygon are therefore designed with a two-layer implementation represen
8
8
9
9
In particular, and on the execution client side, it delineates on snapshots and state syncing, network configurations, and frequently used commands when running PoS nodes.
10
10
11
-
On the consesus client side, one finds descriptions on how Heimdall handles; authentication of account addresses, management of validators' keys, management of gas limits, enhancement of transaction verifications, balance transfers, staking and general chain management.
11
+
On the consesus client side, one finds descriptions on how Heimdall handles; authentication of account addresses, management of validators' keys, management of gas limits, enhancement of transaction verifications, balance transfers, staking and general chain management.
12
+
13
+
## Architectural overview
14
+
15
+
The Polygon Network is broadly divided into three layers:
16
+
17
+
***Ethereum layer** — a set of contracts on the Ethereum mainnet.
18
+
***Heimdall layer** — a set of proof-of-stake Heimdall nodes running in parallel to the Ethereum mainnet, monitoring the set of staking contracts deployed on the Ethereum mainnet, and committing the Polygon Network checkpoints to the Ethereum mainnet. Heimdall is based on Tendermint.
19
+
***Bor layer** — a set of block-producing Bor nodes shuffled by Heimdall nodes. Bor is based on Go Ethereum.
20
+
21
+

22
+
23
+
## Staking smart contracts on Ethereum
24
+
25
+
To enable the Proof of Stake (PoS) mechanism on Polygon, the system employs a set of staking management contracts on the Ethereum mainnet.
26
+
27
+
The staking contracts implement the following features:
28
+
29
+
* The ability for anyone to stake MATIC tokens on the staking contracts on the Ethereum mainnet and join the system as a validator.
30
+
* Earn staking rewards for validating state transitions on the Polygon Network.
31
+
* Save checkpoints on the Ethereum mainnet.
32
+
33
+
The PoS mechanism also acts as a mitigation to the data unavailability problem for the Polygon sidechains.
34
+
35
+
## Heimdall (validation layer)
36
+
37
+
Heimdall layer handles the aggregation of blocks produced by Bor into a Merkle tree and publishes the Merkle root periodically to the root chain. The periodic publishing of snapshots of Bor are called checkpoints.
38
+
39
+
For every few blocks on Bor, a validator on the Heimdall layer:
40
+
41
+
1. Validates all the blocks since the last checkpoint.
42
+
2. Creates a Merkle tree of the block hashes.
43
+
3. Publishes the Merkle root hash to the Ethereum mainnet.
44
+
45
+
Checkpoints are important for two reasons:
46
+
47
+
1. Providing finality on the root chain.
48
+
2. Providing proof of burn in withdrawal of assets.
49
+
50
+
An overview of the process:
51
+
52
+
* A subset of active validators from the pool is selected to act as block producers for a span. These block producers are responsible for creating blocks and broadcasting the created blocks on the network.
53
+
* A checkpoint includes the Merkle root hash of all blocks created during any given interval. All nodes validate the Merkle root hash and attach their signature to it.
54
+
* A selected proposer from the validator set is responsible for collecting all signatures for a particular checkpoint and committing the checkpoint on the Ethereum mainnet.
55
+
* The responsibility of creating blocks and proposing checkpoints is variably dependent on a validator’s stake ratio in the overall pool.
56
+
57
+
See also [Heimdall architecture](heimdall/index.md).
58
+
<!-- (/docs/pos/design/heimdall/overview). -->
59
+
60
+
## Bor (block producer layer)
61
+
62
+
Bor is Polygon's sidechain block producer — the entity responsible for aggregating transactions into blocks.
63
+
64
+
Bor block producers are a subset of the validators and are shuffled periodically by the Heimdall validators.
This section of the documentation contains requirements for, and information needed about, operating full nodes, becoming a validator, instantiating an execution client, and extra troubleshooting notes.
2
+
3
+
Developers can find guides on how to run a fullnode from binaries or with docker, ansible, packages or GCP instance.
0 commit comments