-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Objective
Enforce MinBlockTime at the replicas level instead of giving full powers to the leader
We could leverage replicas NewRound message delaying to reduce leader's power to delay block production.
Origin Document
Currently a leader of a given round has full control over block production delay. There's nothing enforcing it not to propose a block earlier than what the network agreed on.
If we place the delay at the new round message emission point. All (honest) replicas will delay their new round messages so that the leader could not reach the consensus and build the block earlier. This would mean that each block proposal time is enforced by the whole network instead of by its leader only. We could floor the delay imposed by replicas (eg. -10%) and let the leader that window to fine grain the timer.
A possible issue with this approach, is that it makes reaching NewRound quorum will always a hurry task. As NewRound are released late, there may be problems reaching quorum on time.
An adjustable offset could do the trick and even be dynamic. Also choreographing the replicas to distribute their deadlines over the MinBlockTime period of time may also be worth digging.
This should not be that much of a change. Since at the new round construction level, any node knows if it's the leader of that round or not:
- If it is a leader
- Registers the timer at that exact moment (the earliest a node knows there's a new round and that it's the leader)
- Sends the new round to itself (acts like a replica)
- If it reaches new round quorum it prepares the block by applying the delay logic according to its local timer
- If it's a replica
- Registers the timer at that exact moment (the earliest that replica commits for the new round --should be same as leader)
- Delays broadcasting new round message to the leader by MinBockTime - AdjustableOffset ± (Randomness or distribution function)
This way, for a 15minutes block time the whole network could eg. enforce that a block is proposed no earlier than 14minutes, and leader makes sure it lands at the 15minutes mark
Goals
- Make block time production (
MinBlockTime) enforced by the replicas instead of the leader only
Deliverable
- Move (rename if needed)
DelayBlockPreparationtopacemaker.NewHeight()with checks to delay it only for replicas - Add a configurable option or function/strategy to adjust delay to have an overall 15minutes min block delay
Testing Methodology
- Task specific tests or benchmarks:
make ... - New tests or benchmarks:
make ... - All tests:
make test_all - LocalNet: verify a
LocalNetis still functioning correctly by following the instructions at docs/development/README.md - k8s LocalNet: verify a
k8s LocalNetis still functioning correctly by following the instructions here
Creator: @red-0ne
Metadata
Metadata
Assignees
Labels
Type
Projects
Status