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/learn/learn-collator.md
+20-23Lines changed: 20 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,16 @@ description: Understand the role of collators in Polkadot, including block produ
8
8
9
9
## Collators' Role
10
10
11
-
Collators maintain parachains by collecting parachain transactions from users and producing state
12
-
transition proofs for relay chain validators. In other words, collators aggregate parachain transactions into parachain block candidates and produce state transition
11
+
### Rollup Maintainers
12
+
13
+
Collators maintain rollup chains (parachains) by collecting user transactions and producing state transition proofs for Polkadot's validators. In other words, collators aggregate transactions into parachain block candidates and produce state transition
13
14
proofs (Proof-of-Validity, PoV) for validators.
14
15
15
-
Collators maintain a full node for the relay chain and a full node for their particular parachain;
16
-
meaning they retain all necessary information to be able to author new blocks and execute
17
-
transactions in much the same way as miners do on PoW blockchains. Under normal circumstances, they
18
-
will collate and execute transactions to create an unsealed block and provide it, together with a
19
-
PoV, to one or more validators responsible for proposing a parachain block.
16
+
Collators maintain a full node for the relay chain and a full node for their particular parachain, meaning they retain all necessary information to author new parablocks and execute transactions like miners do on PoW blockchains. Under normal circumstances, they
17
+
will collate and execute transactions to create an unsealed block and provide it with a PoV to one or more validators on a Polkadot core.
20
18
21
-
Collators are similar to validators on any other blockchain but they do not need to provide security
22
-
guarantees because the relay chain provides those. If a parachain block is invalid, it will get
19
+
Collators are similar to validators on any other blockchain. Still, they do not need to provide security
20
+
guarantees because the relay chain provides those as a service to them via coretime. If a parachain block is invalid, it will get
23
21
rejected by validators. The validators are required to check the validity of submitted candidates,
24
22
followed by issuing and collecting statements about the validity of candidates to other validators.
25
23
This process is known as **candidate backing**. Validators receive an arbitrary number of parachain
@@ -32,29 +30,29 @@ The validator must successfully verify the following conditions in the following
32
30
33
31
2. The signature of the collator is valid.
34
32
35
-
3. Validate the candidate by executing the parachain Runtime.
33
+
3. Validate the candidate by executing the parachain Runtime stored on the relay chain.
36
34
37
-
Once a candidate meets a specified criteria for inclusion, the selected relay chain block author
38
-
then chooses any of the backable candidates for each parachain and includes those into the relay
35
+
Once a candidate meets the criteria for inclusion, the selected relay chain block author
36
+
chooses any backable candidates for each parachain and includes them in the relay
39
37
chain block. We say the candidate blocks are _backed_.
40
38
41
-
The assumption that having more collators is better or more secure is not correct. On the contrary,
42
-
too many collators may slow down the network. The only nefarious power collators have is transaction
43
-
censorship. To prevent censorship, a parachain only needs to ensure that there are some neutral
44
-
collators - but not necessarily a majority. Theoretically, the censorship problem is solved by
39
+
### Rollup Censorship
40
+
41
+
The assumption that having more collators is better or more secure is incorrect. On the contrary, too many collators may slow down the network. The only power collators have is transaction censorship. To prevent censorship, a parachain only needs to ensure the collators set is sufficiently decentralized and that there are some neutral
42
+
collators, but not necessarily a majority. Theoretically, the censorship problem is solved by
45
43
having just one honest collator.
46
44
47
-
##XCM
45
+
### Cross-consenus Messaging
48
46
49
47
Collators are a key element of the [XCM (Cross-Consensus Message Passing Format)](learn-xcm.md). By
50
48
being full nodes of the relay chain, they are all aware of each other as peers. This makes it
51
49
possible for them to send messages from parachain A to parachain B.
52
50
53
51
## Taking the Case for One Parachain
54
52
55
-
A start of a new block candidate is initiated with a block creation time. The collator aggregates
53
+
The start of a new block candidate is initiated with a block creation time. The collator aggregates
56
54
all new transactions at the end of the process. When doing so, the collator signs the _parachain
57
-
block candidate_ and produces state transition proofs (Proof-of-Validity, PoV), which are a summary
55
+
block candidate_ and produces state transition proofs (Proof-of-Validity, PoV), a summary
58
56
of the final account balances caused by the transactions in the candidate block. The collator sends
59
57
the candidate block and PoV to the parachain validators, so-called para-validators. The
60
58
para-validators verify the transactions within the parachain block candidate. Upon verification, and
@@ -66,12 +64,12 @@ with the relay chain.
66
64
The validators on the relay chain will try to reach a consensus on the block candidate. Upon
67
65
reaching consensus, the now validated block candidate is shared with the validators and collators,
68
66
and the process repeats for new transactions. A collator cannot continue building blocks on a
69
-
parachain until the block candidate they proposed to the relay chain validators have been validated.
67
+
parachain until the block candidate they proposed to the relay chain validators has been validated.
70
68
A block is produced every 6 seconds.
71
69
72
70
## Collators in the Wild
73
71
74
-
Blockchains that are built using Substrate are unable to hook onto the relay chain on their own. The
72
+
Blockchains built using Substrate cannot hook onto the relay chain on their own. The
75
73
Parity team built the
76
74
[Cumulus library](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/) to address this.
77
75
Collators are being used on the [Paseo](https://docs.polkadot.com/develop/parachains/testing/) testnet,
@@ -84,5 +82,4 @@ Rust documentation. More information can be found under the
84
82
85
83
-[Tutorial covering Cumulus and Collators](https://docs.polkadot.com/develop/toolkit/parachains/spawn-chains/zombienet/get-started/)
0 commit comments