Skip to content

Commit 9b5cc28

Browse files
authored
Merge pull request #605 from EspressoSystems/tw/small-fixes
Various small fixes.
2 parents b19327b + cad5828 commit 9b5cc28

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

timeboost-sequencer/src/decrypt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl Decrypter {
402402
k: KeyStore,
403403
) -> StdResult<(), DecrypterDown> {
404404
debug!(node = %self.label, committee = %c.committee().id(), "next committee");
405-
c.update_addresses(|a| a.to_owned().with_offset(DECRYPTER_PORT_OFFSET * 100));
405+
c.update_addresses(|a| a.to_owned().with_offset(DECRYPTER_PORT_OFFSET));
406406
self.worker_tx
407407
.send(Command::NextCommittee(c, k))
408408
.await

timeboost-sequencer/src/lib.rs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -381,26 +381,25 @@ impl Task {
381381

382382
// Process actions and collect deliveries.
383383
while let Some(action) = actions.pop_front() {
384-
if let Action::Deliver(payload) = action {
385-
match payload.data().decode::<MAX_MESSAGE_SIZE>() {
386-
Ok(data) => {
387-
if let Some(dkg) = data.dkg_bundle() {
388-
dkg_bundles.push_back(dkg.clone());
384+
match self.sailfish.execute(action).await {
385+
Ok(Some(CoordinatorEvent::Deliver(payload))) => {
386+
match payload.data().decode::<MAX_MESSAGE_SIZE>() {
387+
Ok(data) => {
388+
if let Some(dkg) = data.dkg_bundle() {
389+
dkg_bundles.push_back(dkg.clone());
390+
}
391+
payloads.push((payload, data));
392+
}
393+
Err(err) => {
394+
warn!(
395+
node = %self.label,
396+
err = %err,
397+
src = %payload.source(),
398+
"failed to deserialize candidate list"
399+
);
389400
}
390-
payloads.push((payload, data));
391-
}
392-
Err(err) => {
393-
warn!(
394-
node = %self.label,
395-
err = %err,
396-
src = %payload.source(),
397-
"failed to deserialize candidate list"
398-
);
399401
}
400402
}
401-
continue;
402-
}
403-
match self.sailfish.execute(action).await {
404403
Ok(Some(CoordinatorEvent::Gc(r))) => {
405404
if let Err(err) = self.decrypter.gc(r.num()).await {
406405
warn!(node = %self.label, %err, "decrypt gc error");
@@ -426,7 +425,7 @@ impl Task {
426425
warn!(node = %self.label, id = %r.committee(), "committee not found");
427426
}
428427
}
429-
Ok(Some(CoordinatorEvent::Deliver(_)) | None) => {}
428+
Ok(None) => {}
430429
Err(err) => {
431430
error!(node = %self.label, %err, "coordinator error");
432431
return Err(err.into());

timeboost/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ impl Timeboost {
191191
comm_info.sailfish_committee(),
192192
comm_info.dkg_key_store()
193193
).await?;
194+
self.certifier
195+
.set_next_committee(comm_info.certifier_committee())
196+
.await?;
194197
} else {
195198
warn!(node = %self.label, committee_id = %new_id, current = %cur, "ignored new CommitteeCreated event");
196199
continue;

0 commit comments

Comments
 (0)