Skip to content

Commit 7a4ea02

Browse files
Merge branch 'zkevm/contracts' of https://github.com/0xPolygon/polygon-docs into zkevm/contracts
2 parents eb69d46 + 4a5c3f7 commit 7a4ea02

29 files changed

+271
-310
lines changed

docs/zkEVM/architecture/high-level/smart-contracts/api/CDKValidiumTimelock.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
21
Contract module which acts as a timelocked controller.
3-
This gives time for users of the controlled contract to exit before a potentially dangerous maintenance operation is applied.
4-
If emergency mode of the cdkValidium contract system is active, this timelock have no delay.
2+
It provides time, for users of the controlled contract, to exit before any risky maintenance operation is applied.
3+
4+
However, if the emergency mode of the cdkValidium contract system is active, any timelock is bypassed without delay.
55

66
## Functions
77
### constructor
@@ -16,7 +16,6 @@ If emergency mode of the cdkValidium contract system is active, this timelock ha
1616
```
1717
Constructor of timelock
1818

19-
2019
##### Parameters:
2120
| Name | Type | Description |
2221
| :--- | :--- | :------------------------------------------------------------------- |
@@ -26,7 +25,6 @@ Constructor of timelock
2625
|`admin` | address | optional account to be granted admin role; disable with zero address
2726
|`_cdkValidium` | contract CDKValidium | cdkValidium address
2827

29-
3028
### getMinDelay
3129
```solidity
3230
function getMinDelay(
@@ -35,7 +33,5 @@ Constructor of timelock
3533

3634
Returns the minimum delay for an operation to become valid.
3735

38-
This value can be changed by executing an operation that calls `updateDelay`.
39-
If CDKValidium is on emergency state the minDelay will be 0 instead.
40-
41-
36+
The minimum delay value can be changed by executing any operation that calls `updateDelay`.
37+
If CDKValidium is on emergency state the `minDelay` will be 0 instead.

docs/zkEVM/architecture/high-level/smart-contracts/api/PolygonZkEVMGlobalExitRootV2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Contract responsible for managing the exit roots across multiple networks.
2020

2121
### `updateExitRoot`
2222

23-
Update the exit root of one of the networks and the global exit root.
23+
Updates the exit root of any of the networks and the global exit root.
2424

2525
```solidity
2626
function updateExitRoot(
@@ -36,7 +36,7 @@ Update the exit root of one of the networks and the global exit root.
3636

3737
### `getLastGlobalExitRoot`
3838

39-
Return last global exit root.
39+
Returns last global exit root.
4040

4141
```solidity
4242
function getLastGlobalExitRoot(
@@ -54,7 +54,7 @@ Computes and returns the Merkle root of the `L1InfoTree`.
5454

5555
### `getLeafValue`
5656

57-
Given the leaf data returns the leaf hash.
57+
Given leaf data, it returns the leaf hash.
5858

5959
```solidity
6060
function getLeafValue(
@@ -76,7 +76,7 @@ Given the leaf data returns the leaf hash.
7676

7777
### `UpdateL1InfoTree`
7878

79-
Emitted when the global exit root is updated
79+
Emitted when the global exit root is updated.
8080

8181
```solidity
8282
event UpdateL1InfoTree(

docs/zkEVM/architecture/high-level/smart-contracts/api/consensus/dataComittee/CDKDataCommittee.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
### `setupCommittee`
1111

12-
Allows the admin to setup the members of the committee.
12+
Allows the admin to setup members of the committee.
1313

1414
```solidity
1515
function setupCommittee(
@@ -21,8 +21,8 @@ Allows the admin to setup the members of the committee.
2121

2222
!!! note
2323
- The system requires N/M signatures where N => `_requiredAmountOfSignatures` and M => `urls.length`.
24-
- There must be the same amount of urls than addresses encoded in the `addrsBytes`.
25-
- A member is represented by the url and the address contained in `urls[i]` and `addrsBytes[i*_ADDR_SIZE : i*_ADDR_SIZE + _ADDR_SIZE]`.
24+
- The number of urls must be the same as the addresses encoded in the `addrsBytes`.
25+
- A member is represented by a url and the address contained in `urls[i]` and `addrsBytes[i*_ADDR_SIZE : i*_ADDR_SIZE + _ADDR_SIZE]`.
2626

2727

2828
##### Parameters

docs/zkEVM/architecture/high-level/smart-contracts/api/consensus/dataComittee/PolygonDataComittee.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ Allows a sequencer to send multiple batches.
4343

4444
| Name | Type | Description |
4545
| :--- | :--- | :------------------------------------------------------------------- |
46-
|`batches` | struct PolygonDataComittee.ValidiumBatchData[] | Struct array which holds the necessary data to append new batches to the sequence
46+
|`batches` | struct PolygonDataComittee.ValidiumBatchData[] | Struct array which holds the necessary data to append new batches to a sequence
4747
|`l2Coinbase` | address | Address that will receive the fees from L2
48-
|`dataAvailabilityMessage` | bytes | Byte array containing the signatures and all the addresses of the committee in ascending order
48+
|`dataAvailabilityMessage` | bytes | Byte array containing signatures and all addresses of the committee members in the ascending order
4949
[signature 0, ..., signature requiredAmountOfSignatures -1, address 0, ... address N]
5050
note that each ECDSA signatures are used, therefore each one must be 65 bytes
5151

5252
### `switchSequenceWithDataAvailability`
5353

54-
Allows the admin to turn on the force batches.
54+
Allows the admin to activate force batches.
5555

5656
This action is not reversible.
5757

@@ -69,4 +69,4 @@ This action is not reversible.
6969
)
7070
```
7171

72-
Emitted when switching the ability to sequence with data availability.
72+
Emitted when switching the sequencing functionality from a rollup to a validium, where the data availability committee is in operation.

docs/zkEVM/architecture/high-level/smart-contracts/api/consensus/validium/PolygonDataCommittee.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### `constructor`
44

5-
Disable initializers on the implementation following best practices.
5+
Disables initializers on the implementation, following best practices.
66

77
```solidity
88
function constructor(
@@ -21,9 +21,9 @@ Disable initializers on the implementation following best practices.
2121
Allows the admin to setup the members of the committee.
2222

2323
!!! note
24-
- The system will require `N/M` signatures where `N` => `_requiredAmountOfSignatures` and `M` => `urls.length`.
25-
- There must be the same amount of urls than addresses encoded in the `addrsBytes`.
26-
- A member is represented by the url and the address contained in urls[i] and `addrsBytes. [i*_ADDR_SIZE : i*_ADDR_SIZE + _ADDR_SIZE]`.
24+
- The system requires `N/M` signatures where `N` => `_requiredAmountOfSignatures` and `M` => `urls.length`.
25+
- The number of urls must be the same as addresses encoded in the `addrsBytes`.
26+
- A member is represented by a url and the address contained in urls[i] and `addrsBytes. [i*_ADDR_SIZE : i*_ADDR_SIZE + _ADDR_SIZE]`.
2727

2828
```solidity
2929
function setupCommittee(
@@ -43,7 +43,7 @@ Allows the admin to setup the members of the committee.
4343

4444
### `verifyMessage`
4545

46-
Verifies that the given signedHash has been signed by requiredAmountOfSignatures committee members.
46+
Verifies that the given signedHash has been signed by the requiredAmountOfSignatures committee members.
4747

4848
```solidity
4949
function verifyMessage(
@@ -56,14 +56,14 @@ Verifies that the given signedHash has been signed by requiredAmountOfSignatures
5656

5757
| Name | Type | Description |
5858
| :--- | :--- | :------------------------------------------------------------------- |
59-
|`signedHash` | bytes32 | Hash that must have been signed by requiredAmountOfSignatures of committee members
60-
|`signaturesAndAddrs` | bytes | Byte array containing the signatures and all the addresses of the committee in ascending order
59+
|`signedHash` | bytes32 | Hash that must have been signed by the requiredAmountOfSignatures of committee members
60+
|`signaturesAndAddrs` | bytes | Byte array containing signatures and all addresses of the committee members in ascending order
6161
[signature 0, ..., signature requiredAmountOfSignatures -1, address 0, ... address N]
62-
note that each ECDSA signatures are used, therefore each one must be 65 bytes
62+
note that all signatures are ECDSA, therefore each must be 65 bytes long
6363

6464
### `getAmountOfMembers`
6565

66-
Return the amount of committee members.
66+
Returns the number of committee members.
6767

6868
```solidity
6969
function getAmountOfMembers(

docs/zkEVM/architecture/high-level/smart-contracts/api/consensus/validium/PolygonValidiumEtrog.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,13 @@ Allows a sequencer to send multiple batches.
3838

3939
| Name | Type | Description |
4040
| :--- | :--- | :------------------------------------------------------------------- |
41-
|`batches` | struct PolygonValidiumEtrog.ValidiumBatchData[] | Struct array which holds the necessary data to append new batches to the sequence
42-
|`maxSequenceTimestamp` | uint64 | Max timestamp of the sequence. This timestamp must be inside a safety range (actual + 36 seconds).
43-
This timestamp should be equal or higher of the last block inside the sequence, otherwise this batch will be invalidated by circuit.
44-
|`initSequencedBatch` | uint64 | This parameter must match the current last batch sequenced.
45-
This will be a protection for the sequencer to avoid sending undesired data
46-
|`l2Coinbase` | address | Address that will receive the fees from L2
47-
|`dataAvailabilityMessage` | bytes | Byte array containing the signatures and all the addresses of the committee in ascending order
48-
[signature 0, ..., signature requiredAmountOfSignatures -1, address 0, ... address N]
49-
note that each ECDSA signatures are used, therefore each one must be 65 bytes
50-
note Pol is not a reentrant token
41+
|`batches` | struct PolygonValidiumEtrog.ValidiumBatchData[] | Struct array which holds data necessary for appending new batches to the sequence
42+
|`maxSequenceTimestamp` | uint64 | Max timestamp of the sequence. </br> This timestamp must be within a safety range (actual + 36 seconds). </br> This timestamp should be equal or greater than that of the last block inside the sequence, otherwise this batch is invalidated by the circuit. |
43+
|`initSequencedBatch` | uint64 | This parameter must match the current last batch sequenced. </br> This is a protection mechanism against the sequencer sending undesired data. |
44+
|`l2Coinbase` | address | Address that will receive the fees from L2 |
45+
|`dataAvailabilityMessage` | bytes | Byte array containing signatures and all addresses of the committee members in ascending order </br> [signature 0, ..., signature requiredAmountOfSignatures -1, address 0, ... address N]. </br> Note that all signatures are ECDSA, therefore each must be 65 bytes long. |
46+
47+
Note that POL is not a reentrant token.
5148

5249
### `sequenceBatches`
5350

@@ -66,17 +63,14 @@ Allows a sequencer to send multiple batches.
6663

6764
| Name | Type | Description |
6865
| :--- | :--- | :------------------------------------------------------------------- |
69-
|`batches` | struct PolygonRollupBaseEtrog.BatchData[] | Struct array which holds the necessary data to append new batches to the sequence
70-
|`maxSequenceTimestamp` | uint64 | Max timestamp of the sequence. This timestamp must be inside a safety range (actual + 36 seconds).
71-
This timestamp should be equal or higher of the last block inside the sequence, otherwise this batch will be invalidated by circuit.
72-
|`initSequencedBatch` | uint64 | This parameter must match the current last batch sequenced.
73-
This will be a protection for the sequencer to avoid sending undesired data
74-
|`l2Coinbase` | address | Address that will receive the fees from L2
75-
note Pol is not a reentrant token
66+
|`batches` | struct PolygonRollupBaseEtrog.BatchData[] | Struct array which holds data necessary for appending new batches to the sequence. |
67+
|`maxSequenceTimestamp` | uint64 | Max timestamp of the sequence. This timestamp must be within a safety range (actual + 36 seconds). It should be equal or greater than the last block inside the sequence, otherwise this batch is invalidated by circuit. |
68+
|`initSequencedBatch` | uint64 | This parameter must match the current last batch sequenced. This is a protection mechanism against the sequencer sending undesired data. |
69+
|`l2Coinbase` | address | Address that will receive the fees from L2. Note that POL is not a reentrant token. |
7670

7771
### `setDataAvailabilityProtocol`
7872

79-
Allow the admin to set a new data availability protocol.
73+
Allows the admin to set a new data availability protocol.
8074

8175
```solidity
8276
function setDataAvailabilityProtocol(
@@ -88,11 +82,11 @@ Allow the admin to set a new data availability protocol.
8882

8983
| Name | Type | Description |
9084
| :--- | :--- | :------------------------------------------------------------------- |
91-
|`newDataAvailabilityProtocol` | contract IDataAvailabilityProtocol | Address of the new data availability protocol
85+
|`newDataAvailabilityProtocol` | contract IDataAvailabilityProtocol | Address of the new data availability protocol. |
9286

9387
### `switchSequenceWithDataAvailability`
9488

95-
Allow the admin to switch the sequence with data availability.
89+
Allows the admin to switch the sequencing functionality from a rollup to a validium, where the data availability committee is in operation.
9690

9791
```solidity
9892
function switchSequenceWithDataAvailability(
@@ -104,7 +98,7 @@ Allow the admin to switch the sequence with data availability.
10498

10599
| Name | Type | Description |
106100
| :--- | :--- | :------------------------------------------------------------------- |
107-
|`newIsSequenceWithDataAvailabilityAllowed` | bool | Boolean to switch
101+
|`newIsSequenceWithDataAvailabilityAllowed` | bool | A Boolean to switch sequencing mode. |
108102

109103
## Events
110104

@@ -119,7 +113,7 @@ Emitted when the admin updates the data availability protocol.
119113

120114
### `SwitchSequenceWithDataAvailability`
121115

122-
Emitted when switch the ability to sequence with data availability.
116+
Emitted when switching the sequencing functionality to a validium, a network with a data availability committee.
123117

124118
```solidity
125119
event SwitchSequenceWithDataAvailability(

0 commit comments

Comments
 (0)