Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New STM registration procedure #433

Merged
merged 80 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
e8187b4
New STM registration procedure
iquerejeta Aug 18, 2022
8e0a530
Missing non-exhaustive patter
iquerejeta Aug 18, 2022
cfacd6e
New StmInitializer setup
iquerejeta Aug 19, 2022
c04c71e
Use serde feature for KES
iquerejeta Aug 19, 2022
1517046
Serialisation and verification of OpCert
iquerejeta Aug 22, 2022
687fd92
Key reg test vector
iquerejeta Aug 22, 2022
1e7e5e3
PoolID has size 28
iquerejeta Aug 22, 2022
b519ada
lints
iquerejeta Aug 22, 2022
944f7c0
Cargo sort
iquerejeta Aug 22, 2022
3f96f77
Use serde for KES
iquerejeta Aug 31, 2022
325112b
PoolID working with the node
iquerejeta Aug 31, 2022
f80b38c
Some leftover from rebase
iquerejeta Sep 5, 2022
b798b7e
Expose Register and Aggregation errors in mithril-common
iquerejeta Sep 5, 2022
515fb34
Move new kes_compat to mithril-common
iquerejeta Sep 5, 2022
0f44597
Add wrap protocol signer and clerk
iquerejeta Sep 9, 2022
cb91302
Check registration instead of unwrap()
iquerejeta Sep 9, 2022
93986ef
Parse keys and certs from file in JSON format
iquerejeta Sep 12, 2022
bb1877d
Move Cardano related code to submodule
jpraynaud Sep 15, 2022
25e5a49
Harmonize ProtocolPartyId vs PoolId types
jpraynaud Sep 15, 2022
0a9a39a
Add 'skip_signer_certification' feature
jpraynaud Sep 15, 2022
5f9e7a8
remove cardano related errors from mithril-core
iquerejeta Sep 15, 2022
c7b502f
to_file for FromShelleyFile types
iquerejeta Sep 15, 2022
5273684
Remove new_epoch function
iquerejeta Sep 15, 2022
1365c97
KesSig trait missing
iquerejeta Sep 15, 2022
78239af
Add type for encoded keys
jpraynaud Sep 19, 2022
d56391c
Update Signer/SignerWithStakes entities
jpraynaud Sep 19, 2022
a07d5e8
Update OpenAPI specification
jpraynaud Sep 19, 2022
8f2034b
Add test only ProtocolKeyRegistration
jpraynaud Sep 19, 2022
7fdeaa7
Enhance Key Certification
jpraynaud Sep 19, 2022
8fc30a7
Wire ProtocolKeyRegistration in Signer/Aggregator
jpraynaud Sep 19, 2022
495320a
Custom Serialize and Deserialize for OpCert
iquerejeta Sep 20, 2022
6adda5a
Update 'NotCertified' types in 'crypto_helper'
jpraynaud Sep 20, 2022
82c9f88
Wire new ProtocolInitializer in Signer/Aggregator
jpraynaud Sep 20, 2022
206f8fc
Real use of OpCert and KES Signature in Signer
jpraynaud Sep 20, 2022
cb92c26
Make test lab use OpCert & KES secret key
jpraynaud Sep 20, 2022
8317f4d
Make devnet use OpCert & KES secret key
jpraynaud Sep 21, 2022
d28fc9b
Fix devnet computation of poolId
jpraynaud Sep 23, 2022
4cc3ead
Real use of OpCert and KES Signature in Aggregator
jpraynaud Sep 23, 2022
06427f3
Refacto 'allow_skip_signer_certification' feature
jpraynaud Sep 23, 2022
35fe7a5
Enhance error in Cardano codec
jpraynaud Sep 26, 2022
bfdf13b
Add KES period query in Chain Observer
jpraynaud Sep 26, 2022
f63e0d6
Add OpCert hash computation
jpraynaud Sep 26, 2022
55a5c26
Compute KES Period in Signer
jpraynaud Sep 26, 2022
3dc3122
Compute KES Period in Aggregator
jpraynaud Sep 27, 2022
ecda61b
Make test lab test hybrid certification
jpraynaud Sep 27, 2022
5bc94f5
Add OpCert compute poolId
jpraynaud Sep 27, 2022
4b44a6d
Make 'party_id' config optional
jpraynaud Sep 28, 2022
4a8af65
Enhance hybrid mode certification
jpraynaud Sep 29, 2022
5d9dcb8
Repeated setup_new
iquerejeta Sep 30, 2022
6bad138
Add ColdKeyGenerator implementation
jpraynaud Sep 30, 2022
c78d890
Add OpCert factory
jpraynaud Sep 30, 2022
b910419
Implement unit tests with hybrid keys certification
jpraynaud Sep 29, 2022
30f8acf
Remove temp test data files
jpraynaud Sep 30, 2022
43b9863
Remove the wrapper of Clerk and Signer
iquerejeta Sep 30, 2022
a58fb14
Unconditional import of clerk and signer
iquerejeta Sep 30, 2022
b76f8fd
Remove unnecessary 'NotCertified' types
jpraynaud Oct 2, 2022
49e8f94
Fix devnet Docker images
jpraynaud Oct 3, 2022
91238b2
Activate hybrid certification in devnet
jpraynaud Oct 3, 2022
9363e74
Upgrade Doc & Explorer dependencies
jpraynaud Oct 3, 2022
4e5690f
Upgrade Mithril explorer
jpraynaud Oct 3, 2022
04126da
Fix launch Aggregator launch in devnet
jpraynaud Oct 4, 2022
ea1022f
Enhance 'setup_signers' signature
jpraynaud Oct 4, 2022
442d2ec
Fix KES Period usage
jpraynaud Oct 5, 2022
82bb727
Enhance KES Period usage
jpraynaud Oct 5, 2022
b65e89d
Enhance KES Period retrieval in Chain Observer
jpraynaud Oct 6, 2022
e769953
Enhance devnet signers information
jpraynaud Oct 6, 2022
c591230
More intuitive name serde shelley file format
iquerejeta Oct 7, 2022
5c79bbf
Use Keypair structure from Dalek
iquerejeta Oct 7, 2022
c1a6715
Use fixed version for 'kes-summed-ed25519' dependency
jpraynaud Oct 7, 2022
1d39e20
Enhance 'cryto_helper' types
jpraynaud Oct 7, 2022
2c41c2a
Move 'RegisterError::KeyNonExisting' to common
jpraynaud Oct 7, 2022
2569003
Add 'test_only' feature flag in 'mithril-common'
jpraynaud Oct 7, 2022
214abca
Enhance Hex Encoded types
jpraynaud Oct 7, 2022
95c045e
Update documentation
jpraynaud Oct 7, 2022
2d03b4b
Remove unnecessary serde annotations
jpraynaud Oct 10, 2022
30ffa3c
Enhance test lab infrastructure
jpraynaud Oct 10, 2022
ce7522b
Enhance devnet Docker images
jpraynaud Oct 10, 2022
2596a7f
Update mithril-common/src/crypto_helper/cardano/key_certification.rs
iquerejeta Oct 10, 2022
b105a4a
Improve documentation of cardano modules and structures.
iquerejeta Oct 10, 2022
d49cdb4
Update Docker source images
jpraynaud Oct 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 133 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[workspace]

resolver = "2"

members = [
"demo/protocol-demo",
"mithril-aggregator",
Expand Down
2 changes: 1 addition & 1 deletion demo/protocol-demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ base64 = "0.13.0"
clap = { version = "3.1.6", features = ["derive"] }
hex = "0.4.3"
log = "0.4.14"
mithril-common = { path = "../../mithril-common" }
mithril-common = { path = "../../mithril-common", features = ["allow_skip_signer_certification"]}
rand_chacha = "0.3.1"
rand_core = "0.6.3"
serde = { version = "1.0", features = ["derive"] }
Expand Down
15 changes: 8 additions & 7 deletions demo/protocol-demo/src/demonstrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ use std::io::Write;
use std::path;

use mithril_common::crypto_helper::{
key_decode_hex, key_encode_hex, ProtocolClerk, ProtocolInitializer, ProtocolKeyRegistration,
ProtocolMultiSignature, ProtocolParameters, ProtocolPartyId, ProtocolSigner,
ProtocolSignerVerificationKey, ProtocolSingleSignature, ProtocolStake,
key_decode_hex, key_encode_hex, ProtocolClerk, ProtocolInitializerNotCertified,
ProtocolKeyRegistrationNotCertified, ProtocolMultiSignature, ProtocolParameters,
ProtocolPartyId, ProtocolSigner, ProtocolSignerVerificationKey, ProtocolSingleSignature,
ProtocolStake,
};

/// Player artifacts
Expand Down Expand Up @@ -98,15 +99,15 @@ impl Party {
self.party_id, players
);

let mut key_reg = ProtocolKeyRegistration::init();
let mut key_reg = ProtocolKeyRegistrationNotCertified::init();
for (_party_id, stake, verification_key) in players_with_keys {
key_reg.register(*stake, *verification_key).unwrap();
}
let closed_reg = key_reg.close();

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

let mut key_reg = ProtocolKeyRegistration::init();
let mut key_reg = ProtocolKeyRegistrationNotCertified::init();
for (_party_id, stake, verification_key) in players_with_keys {
key_reg.register(*stake, *verification_key).unwrap();
}
Expand Down Expand Up @@ -367,7 +368,7 @@ impl ProtocolDemonstrator for Demonstrator {
let mut players_artifacts = Vec::new();
for (party_id, stake) in players {
let protocol_initializer =
ProtocolInitializer::setup(self.params.unwrap(), stake, &mut rng);
ProtocolInitializerNotCertified::setup(self.params.unwrap(), stake, &mut rng);
let verification_key: ProtocolSignerVerificationKey =
protocol_initializer.verification_key();
players_artifacts.push(PlayerArtifact {
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"clsx": "^1.1.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"redocusaurus": "^1.3.0"
"redocusaurus": "^1.4.0"
},
"browserslist": {
"production": [
Expand Down
4 changes: 3 additions & 1 deletion docs/root/manual/developer-docs/nodes/mithril-signer.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ Here is a list of the available parameters:
| `db_directory` | `--db-directory` | - | `DB_DIRECTORY` | Directory to snapshot from the **Cardano Node** | `/db` | - | :heavy_check_mark: |
| `network` | - | - | `NETWORK` | Cardano network | - | `testnet` or `mainnet` or `devnet` | :heavy_check_mark: |
`network_magic` | - | - | `NETWORK_MAGIC` | Cardano Network Magic number (for `testnet` and `devnet`) | - | `1097911063` or `42` | - |
| `party_id` | - | - | `PARTY_ID` | Party Id of the signer, usually the `PoolId` of the SPO | - | `pool1pxaqe80sqpde7902er5kf6v0c7y0sv6d5g676766v2h829fvs3x` | :heavy_check_mark: |
| `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)
| `run_interval` | - | - | `RUN_INTERVAL` | Interval between two runtime cycles in ms | - | `60000` | :heavy_check_mark: |
| `aggregator_endpoint` | - | - | `AGGREGATOR_ENDPOINT` | Aggregator node endpoint | - | `https://aggregator.api.mithril.network/aggregator` | :heavy_check_mark: |
| `data_stores_directory` | - | - | `DATA_STORES_DIRECTORY` | Directory to store signer data (Stakes, Protocol initializers, ...) | - | `./mithril-signer/stores` | :heavy_check_mark: |
| `store_retention_limit` | - | - | `STORE_RETENTION_LIMIT` | Maximum number of records in stores. If not set, no limit is set. | - | - | - |
| `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) | - | - | - |
| `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) | - | - | - |
Loading