Skip to content

Commit d784683

Browse files
authored
Merge pull request #431 from EspressoSystems/ak/dkg-catch-up2
DKG Catchup
2 parents e92862a + 9a63759 commit d784683

File tree

5 files changed

+359
-106
lines changed

5 files changed

+359
-106
lines changed

tests/src/tests/timeboost/block_order.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async fn block_order() {
2727
init_logging();
2828

2929
let num = NonZeroUsize::new(5).unwrap();
30-
let (_enc_key, cfg) = make_configs(num, RECOVER_INDEX);
30+
let (enc_key, cfg) = make_configs(num, RECOVER_INDEX);
3131

3232
let mut rxs = Vec::new();
3333
let mut tasks = JoinSet::new();
@@ -75,14 +75,10 @@ async fn block_order() {
7575
}
7676

7777
// wait until DKG is done
78-
// enc_key.wait().await;
79-
// tracing::info!("DKG done");
78+
enc_key.wait().await;
79+
tracing::info!("DKG done");
8080

81-
// FIXME: (alex) after DKG catchup, we use actual enc_key above
82-
// currently late-joining nodes might never finish its DKG because sailfish vertices are pruned
83-
// thus, we only generate non-encrypted bundles for now
84-
let enc_key_tmp = timeboost_crypto::prelude::ThresholdEncKeyCell::default();
85-
tasks.spawn(gen_bundles(enc_key_tmp, bcast.clone()));
81+
tasks.spawn(gen_bundles(enc_key, bcast.clone()));
8682

8783
// Collect all outputs:
8884
let mut outputs: Vec<Vec<BlockInfo>> = vec![Vec::new(); num.get()];

tests/src/tests/timeboost/transaction_order.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async fn transaction_order() {
2828
init_logging();
2929

3030
let num = NonZeroUsize::new(5).unwrap();
31-
let (_enc_key, cfg) = make_configs(num, RECOVER_INDEX);
31+
let (enc_key, cfg) = make_configs(num, RECOVER_INDEX);
3232

3333
let mut rxs = Vec::new();
3434
let mut tasks = JoinSet::new();
@@ -74,14 +74,10 @@ async fn transaction_order() {
7474
}
7575

7676
// wait until DKG is done
77-
// enc_key.wait().await;
78-
// tracing::info!("DKG done");
77+
enc_key.wait().await;
78+
tracing::info!("DKG done");
7979

80-
// FIXME: (alex) after DKG catchup, we use actual enc_key above
81-
// currently late-joining nodes might never finish its DKG because sailfish vertices are pruned
82-
// thus, we only generate non-encrypted bundles for now
83-
let enc_key_tmp = timeboost_crypto::prelude::ThresholdEncKeyCell::default();
84-
tasks.spawn(gen_bundles(enc_key_tmp, bcast.clone()));
80+
tasks.spawn(gen_bundles(enc_key, bcast.clone()));
8581

8682
for _ in 0..NUM_OF_TRANSACTIONS {
8783
let first = rxs[0].recv().await.unwrap();

0 commit comments

Comments
 (0)