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/website/root/mithril/advanced/mithril-protocol/certificates.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,9 @@ Where the following notations have been used:
37
37
-`VK(n)`: Verification key at epoch `n`
38
38
-`AVK(n)`: Aggregrate verification key at epoch `n` such as `AVK(n) = MKT_ROOT(SD(n) || VK(n))`
39
39
-`MKT_ROOT()`: Merkle-tree root
40
-
-`BEACON(p,n)`: Beacon at trigger `p` and epoch `n`
40
+
-`PPARAMS(n)`: Protocol parameters at epoch `n`
41
+
-`EPOCH(n)`: Epoch `n`
42
+
-`BEACON(p,n)`: Beacon at trigger `p` and epoch `n` (includes `EPOCH(n)`)
41
43
-`METADATA(p,n)`: Metadata of the certificate at trigger `p` and epoch `n`
42
44
-`MSG(p,n)`: Message of the certificate at trigger `p` and epoch `n`
43
45
-`MULTI_SIG(p,n)`: Multi-signature created to the message `H(MSG(p,n) || AVK(n-1))`
@@ -92,18 +94,23 @@ An implementation of the algorithm would work as follows for a certificate:
92
94
-**Step 2**: Verify (or fail) that the `current_hash` of the `current_certificate` is valid by computing it and comparing it with the `hash` field of the certificate
93
95
-**Step 3**: Get the `previous_hash` of the `previous_certificate` by reading its value in the `current_certificate`
94
96
-**Step 4**: Verify (or fail) that the `multi_signature` of the `current_certificate` is valid
95
-
-**Step 5**: Retrieve the `previous_certificate` that has the hash `previous_hash`:
96
-
-**Step 5.1**: If it is not a `genesis_certificate`:
97
-
-**Step 5.1.1**: Verify (or fail) that the `previous_hash` of the `previous_certificate` is valid by computing it and comparing it with the `hash` field of the certificate:
98
-
-**Step 5.1.2**: Verify the `current_avk`:
99
-
-**Step 5.1.2.1**: If the `current_certificate` is the `first_certificate` of the epoch, verify (or fail) that the `current_avk` of the `current_certificate` is part of the message signed by the multi-signature of the `previous_certificate`
100
-
-**Step 5.1.2.2**: Else verify (or fail) that the `current_avk` of the `current_certificate` is the same as the `current_avk` of the `previous_certificate`
101
-
-**Step 5.1.3**: Verify (or fail) that the `multi_signature` of the `previous_certificate` is valid
102
-
-**Step 5.1.4**: Use the `previous_certificate` as `current_certificate` and start again at **Step 2**
103
-
-**Step 5.2**: If it is a `genesis_certificate`:
104
-
-**Step 5.2.1**: Verify (or fail) that the `previous_hash` of the `previous_certificate` is valid by computing it and comparing it with the `hash` field of the certificate
105
-
-**Step 5.2.2**: Verify (or fail) that the `current_avk` of the `current_certificate` is part of the message signed by the genesis signature of the `previous_certificate`
106
-
-**Step 5.2.3**: The certificate is valid (success).
97
+
-**Step 5**: Verify (or fail) that the `current_epoch` of the `current_certificate` is part of the message signed by the multi-signature of the `current_certificate`
98
+
-**Step 6**: Retrieve the `previous_certificate` that has the hash `previous_hash`:
99
+
-**Step 6.1**: If it is not a `genesis_certificate`:
100
+
-**Step 6.1.1**: Verify (or fail) that the `previous_hash` of the `previous_certificate` is valid by computing it and comparing it with the `hash` field of the certificate:
101
+
-**Step 6.1.2**: Verify the `current_avk`:
102
+
-**Step 6.1.2.1**: If the `current_certificate` is the `first_certificate` of the epoch
103
+
-**Step 6.1.2.1.1**: Verify (or fail) that the `current_avk` of the `current_certificate` is part of the message signed by the multi-signature of the `previous_certificate`
104
+
-**Step 6.1.2.1.2**: Verify (or fail) that the `current_protocol_parameters` of the `current_certificate` is part of the message signed by the multi-signature of the `previous_certificate`
105
+
-**Step 6.1.2.2**: Else verify (or fail) that the `current_avk` of the `current_certificate` is the same as the `current_avk` of the `previous_certificate`
106
+
-**Step 6.1.3**: Verify (or fail) that the `multi_signature` of the `previous_certificate` is valid
107
+
-**Step 6.1.4**: Use the `previous_certificate` as `current_certificate` and start again at **Step 2**
108
+
-**Step 6.2**: If it is a `genesis_certificate`:
109
+
-**Step 6.2.1**: Verify (or fail) that the `previous_hash` of the `previous_certificate` is valid by computing it and comparing it with the `hash` field of the certificate
110
+
-**Step 6.2.2**: Verify (or fail) that the `current_epoch` of the `previous_certificate` is part of the message signed by the genesis_certificate of the `previous_certificate`
111
+
-**Step 6.2.3**: Verify (or fail) that the `current_avk` of the `current_certificate` is part of the message signed by the genesis signature of the `previous_certificate`
112
+
-**Step 6.2.4**: Verify (or fail) that the `current_protocol_parameters` of the `current_certificate` is part of the message signed by the genesis signature of the `previous_certificate`
113
+
-**Step 6.2.5**: The certificate is valid (success).
0 commit comments