Skip to content

Commit 6e2c311

Browse files
authored
Merge pull request #209 from input-output-hk/jpraynaud/179-produce-certificates
Mithril Aggregator produces certificates
2 parents 475a8bd + 10d3e26 commit 6e2c311

File tree

23 files changed

+516
-278
lines changed

23 files changed

+516
-278
lines changed

mithril-aggregator/Cargo.lock

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

mithril-aggregator/src/http_server.rs

Lines changed: 36 additions & 76 deletions
Large diffs are not rendered by default.

mithril-aggregator/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ mod tools;
1111

1212
pub use crate::entities::Config;
1313
pub use crate::http_server::Server;
14-
pub use crate::multi_signer::{
15-
key_decode_hex, MultiSigner, MultiSignerImpl, ProtocolError, ProtocolParameters,
16-
ProtocolPartyId, ProtocolSignerVerificationKey, ProtocolStake,
17-
};
14+
pub use crate::multi_signer::{MultiSigner, MultiSignerImpl, ProtocolError};
1815
pub use crate::snapshot_stores::{RemoteSnapshotStore, SnapshotStore};
1916
pub use beacon_store::{BeaconStoreError, MemoryBeaconStore};
2017
pub use dependency::DependencyManager;

mithril-aggregator/src/main.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ use clap::Parser;
55
use config::{Map, Source, Value, ValueKind};
66
use mithril_aggregator::{
77
AggregatorRuntime, Config, DependencyManager, MemoryBeaconStore, MultiSigner, MultiSignerImpl,
8-
ProtocolPartyId, ProtocolStake, Server,
8+
Server,
99
};
10+
use mithril_common::crypto_helper::ProtocolStakeDistribution;
1011
use mithril_common::fake_data;
1112
use slog::{Drain, Level, Logger};
1213
use slog_scope::debug;
@@ -181,14 +182,9 @@ fn init_multi_signer() -> impl MultiSigner {
181182

182183
// Update stake distribution
183184
let total_signers = 5;
184-
let stakes = fake_data::signers_with_stakes(total_signers)
185-
.iter()
186-
.map(|signer| {
187-
(
188-
signer.party_id as ProtocolPartyId,
189-
signer.stake as ProtocolStake,
190-
)
191-
})
185+
let stakes: ProtocolStakeDistribution = fake_data::signers_with_stakes(total_signers)
186+
.into_iter()
187+
.map(|signer| signer.into())
192188
.collect::<_>();
193189
multi_signer
194190
.update_stake_distribution(&stakes)

0 commit comments

Comments
 (0)