Skip to content

Commit a43f869

Browse files
committed
docs: update certificate chain design page
1 parent c6d3de5 commit a43f869

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

docs/website/root/mithril/advanced/mithril-protocol/certificates.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ Where the following notations have been used:
3737
- `VK(n)`: Verification key at epoch `n`
3838
- `AVK(n)`: Aggregrate verification key at epoch `n` such as `AVK(n) = MKT_ROOT(SD(n) || VK(n))`
3939
- `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)`)
4143
- `METADATA(p,n)`: Metadata of the certificate at trigger `p` and epoch `n`
4244
- `MSG(p,n)`: Message of the certificate at trigger `p` and epoch `n`
4345
- `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:
9294
- **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
9395
- **Step 3**: Get the `previous_hash` of the `previous_certificate` by reading its value in the `current_certificate`
9496
- **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).
107114

108115
## The coexistence of multiple certificate chains
109116

-15.5 KB
Loading

0 commit comments

Comments
 (0)