Skip to content

Commit 978f15f

Browse files
authored
Merge pull request #433 from input-output-hk/mock_certification
New STM registration procedure
2 parents 329d6fa + d49cdb4 commit 978f15f

File tree

85 files changed

+2973
-1213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2973
-1213
lines changed

Cargo.lock

Lines changed: 133 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[workspace]
22

3+
resolver = "2"
4+
35
members = [
46
"demo/protocol-demo",
57
"mithril-aggregator",

demo/protocol-demo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ base64 = "0.13.0"
99
clap = { version = "3.1.6", features = ["derive"] }
1010
hex = "0.4.3"
1111
log = "0.4.14"
12-
mithril-common = { path = "../../mithril-common" }
12+
mithril-common = { path = "../../mithril-common", features = ["allow_skip_signer_certification"]}
1313
rand_chacha = "0.3.1"
1414
rand_core = "0.6.3"
1515
serde = { version = "1.0", features = ["derive"] }

demo/protocol-demo/src/demonstrator.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ use std::io::Write;
99
use std::path;
1010

1111
use mithril_common::crypto_helper::{
12-
key_decode_hex, key_encode_hex, ProtocolClerk, ProtocolInitializer, ProtocolKeyRegistration,
13-
ProtocolMultiSignature, ProtocolParameters, ProtocolPartyId, ProtocolSigner,
14-
ProtocolSignerVerificationKey, ProtocolSingleSignature, ProtocolStake,
12+
key_decode_hex, key_encode_hex, ProtocolClerk, ProtocolInitializerNotCertified,
13+
ProtocolKeyRegistrationNotCertified, ProtocolMultiSignature, ProtocolParameters,
14+
ProtocolPartyId, ProtocolSigner, ProtocolSignerVerificationKey, ProtocolSingleSignature,
15+
ProtocolStake,
1516
};
1617

1718
/// Player artifacts
@@ -98,15 +99,15 @@ impl Party {
9899
self.party_id, players
99100
);
100101

101-
let mut key_reg = ProtocolKeyRegistration::init();
102+
let mut key_reg = ProtocolKeyRegistrationNotCertified::init();
102103
for (_party_id, stake, verification_key) in players_with_keys {
103104
key_reg.register(*stake, *verification_key).unwrap();
104105
}
105106
let closed_reg = key_reg.close();
106107

107108
let seed = [0u8; 32];
108109
let mut rng = ChaCha20Rng::from_seed(seed);
109-
let p = ProtocolInitializer::setup(self.params.unwrap(), self.stake, &mut rng);
110+
let p = ProtocolInitializerNotCertified::setup(self.params.unwrap(), self.stake, &mut rng);
110111
self.signer = Some(p.new_signer(closed_reg).unwrap());
111112
self.clerk = Some(ProtocolClerk::from_signer(self.signer.as_ref().unwrap()));
112113
}
@@ -237,7 +238,7 @@ impl Verifier {
237238
.collect::<Vec<_>>();
238239
println!("Verifier: protocol keys registration from {:?}", players);
239240

240-
let mut key_reg = ProtocolKeyRegistration::init();
241+
let mut key_reg = ProtocolKeyRegistrationNotCertified::init();
241242
for (_party_id, stake, verification_key) in players_with_keys {
242243
key_reg.register(*stake, *verification_key).unwrap();
243244
}
@@ -367,7 +368,7 @@ impl ProtocolDemonstrator for Demonstrator {
367368
let mut players_artifacts = Vec::new();
368369
for (party_id, stake) in players {
369370
let protocol_initializer =
370-
ProtocolInitializer::setup(self.params.unwrap(), stake, &mut rng);
371+
ProtocolInitializerNotCertified::setup(self.params.unwrap(), stake, &mut rng);
371372
let verification_key: ProtocolSignerVerificationKey =
372373
protocol_initializer.verification_key();
373374
players_artifacts.push(PlayerArtifact {

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"clsx": "^1.1.1",
2121
"react": "^17.0.2",
2222
"react-dom": "^17.0.2",
23-
"redocusaurus": "^1.3.0"
23+
"redocusaurus": "^1.4.0"
2424
},
2525
"browserslist": {
2626
"production": [

docs/root/manual/developer-docs/nodes/mithril-signer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,10 @@ Here is a list of the available parameters:
186186
| `db_directory` | `--db-directory` | - | `DB_DIRECTORY` | Directory to snapshot from the **Cardano Node** | `/db` | - | :heavy_check_mark: |
187187
| `network` | - | - | `NETWORK` | Cardano network | - | `testnet` or `mainnet` or `devnet` | :heavy_check_mark: |
188188
`network_magic` | - | - | `NETWORK_MAGIC` | Cardano Network Magic number (for `testnet` and `devnet`) | - | `1097911063` or `42` | - |
189-
| `party_id` | - | - | `PARTY_ID` | Party Id of the signer, usually the `PoolId` of the SPO | - | `pool1pxaqe80sqpde7902er5kf6v0c7y0sv6d5g676766v2h829fvs3x` | :heavy_check_mark: |
189+
| `party_id` | - | - | `PARTY_ID` | Party Id of the signer, usually the `Pool Id` of the SPO | - | `pool1pxaqe80sqpde7902er5kf6v0c7y0sv6d5g676766v2h829fvs3x` | - | Mandatory in `Pool Id Declaration Mode` where the owner is not verified (soon to be deprecated)
190190
| `run_interval` | - | - | `RUN_INTERVAL` | Interval between two runtime cycles in ms | - | `60000` | :heavy_check_mark: |
191191
| `aggregator_endpoint` | - | - | `AGGREGATOR_ENDPOINT` | Aggregator node endpoint | - | `https://aggregator.api.mithril.network/aggregator` | :heavy_check_mark: |
192192
| `data_stores_directory` | - | - | `DATA_STORES_DIRECTORY` | Directory to store signer data (Stakes, Protocol initializers, ...) | - | `./mithril-signer/stores` | :heavy_check_mark: |
193193
| `store_retention_limit` | - | - | `STORE_RETENTION_LIMIT` | Maximum number of records in stores. If not set, no limit is set. | - | - | - |
194+
| `kes_secret_key_path` | - | - | `KES_SECRET_KEY_PATH` | Path to the `Cardano KES Secret Key` file. Mandatory in `Pool Id Certification Mode` where the owner is verified (experimental, soon to be stable & preferred mode) | - | - | - |
195+
| `operational_certificate_path` | - | - | `OPERATIONAL_CERTIFICATE_PATH` | Path to the `Cardano Operational Certificate` file. Mandatory in `Pool Id Certification Mode` where the owner is verified (experimental, soon to be stable & preferred mode) | - | - | - |

0 commit comments

Comments
 (0)