Skip to content

Commit

Permalink
feat(consensus): reduce consensus bouncer function refresh period fro…
Browse files Browse the repository at this point in the history
…m 3 seconds to 1 second. (#1885)

The combination of 3 seconds refresh period and
[LOOK_AHEAD](https://sourcegraph.com/github.com/dfinity/ic/-/blob/rs/consensus/src/idkg.rs?L236)
being set to 10 heights, means that a node which is lagging behind the
other nodes, will catch up at the rate at most `LOOK_AHEAD /
REFRESH_PERIOD = 10 / 3 = 3.(3)` blocks per second. Since the notary
delay is now set to `0.3s`, some subnets achieve up to `2.5` blocks per
second finalization rate, which is not that far away from the maximum
achievable catch up rate.

Reducing the refresh period to `1s` means that in theory we could catch
up 10 blocks per second.

Note that computing the bouncer function is very fast- 0.0002s on
average according to `consensus_bouncer_update_duration` metric.
  • Loading branch information
kpop-dfinity authored Oct 24, 2024
1 parent 1b17a0f commit c5e9e2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rs/consensus/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ impl<Pool: ConsensusPool> BouncerFactory<ConsensusMessageId, Pool> for Consensus
}

fn refresh_period(&self) -> Duration {
Duration::from_secs(3)
Duration::from_secs(1)
}
}

Expand Down

0 comments on commit c5e9e2a

Please sign in to comment.