-
Notifications
You must be signed in to change notification settings - Fork 1.1k
aura/slot_based: Reduce authoring duration of the last produced block #10154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
…t > 1 Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This reverts commit c412c96.
This reverts commit 9b346a2.
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Testing ResultsThis PR was tested on versi-net with 2 collators and 3 cores. Unfortunately, versi-net wouldn't onboard more than 4 validators. The following logs are provided in reverse order. 2 collators 3 coresThe authoring duration got reduced by 1s in the final block. No cores assignedIn this case, the authoring duration remains unchanged. As the deadline until the next block is too far into the future. 1 collatorAlthough the imposed deadline is expected to arrive in 1 second, the authoring duration is not adjusted and remains stable at ~2s. |
sandreim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
cumulus/client/consensus/aura/src/collators/slot_based/slot_timer.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
|
Do you think it's possible to backport this to |
|
@pandres95 Of course, sounds like a plan |
…#10154) This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change. This introduces a safety buffer to prevent blocks from being authored too late for inclusion. - 2s blocks / 3 cores: The authoring duration of the last block is reduced from 2s to 1s. - 500ms blocks / 12 cores: The authoring duration cannot be reduced past 500ms, therefore the last two blocks are no longer authored ### Testing Done Tested on top of: - #9880 ### 3 cores 2s blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.987s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=5.987s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.987s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.991s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=3.991s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.991s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.99s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723041) next_duration_change=1.99s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(990ms) ``` ### 12 cores 500ms blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=1.494s next_slot_change=Slot(293724135) deadline=494ms aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(494ms) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=493ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=993ms next_slot_change=Slot(293724135) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=993ms next_slot_change=Slot(293724135) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724136)) next_slot=Slot(293724137) next_duration_change=494ms next_slot_change=Slot(293724137) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=494ms next_slot_change=Slot(293724137) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration ``` Part of: #9848 --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <eduard@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> (cherry picked from commit 77c0125)
|
Successfully created backport PR for |
…#10154) This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change. This introduces a safety buffer to prevent blocks from being authored too late for inclusion. - 2s blocks / 3 cores: The authoring duration of the last block is reduced from 2s to 1s. - 500ms blocks / 12 cores: The authoring duration cannot be reduced past 500ms, therefore the last two blocks are no longer authored ### Testing Done Tested on top of: - #9880 ### 3 cores 2s blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.987s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=5.987s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.987s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.991s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723040) next_duration_change=3.991s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(1.991s) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=1.99s last_reported_slot=Some(Slot(293723040)) next_slot=Slot(293723041) next_duration_change=1.99s next_slot_change=Slot(293723041) aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(990ms) ``` ### 12 cores 500ms blocks ``` aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=1.494s next_slot_change=Slot(293724135) deadline=494ms aura::cumulus: [Parachain] Adjusted proposal duration. duration=Some(494ms) aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=493ms last_reported_slot=Some(Slot(293724134)) next_slot=Slot(293724134) next_duration_change=993ms next_slot_change=Slot(293724135) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=993ms next_slot_change=Slot(293724135) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration aura::cumulus: [Parachain] Adjusting authoring duration for slot. authoring_duration=2s duration=494ms last_reported_slot=Some(Slot(293724136)) next_slot=Slot(293724137) next_duration_change=494ms next_slot_change=Slot(293724137) deadline=0ns aura::cumulus: [Parachain] Not enough time left in the slot to adjust authoring duration. Skipping block production for the slot. next_duration_change=494ms next_slot_change=Slot(293724137) aura::cumulus: [Parachain] Adjusted proposal duration. duration=None aura::cumulus: [Parachain] Not building block due to insufficient authoring duration ``` Part of: #9848 --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <eduard@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> (cherry picked from commit 77c0125)
|
Successfully created backport PR for |
…ion of the last produced block (#10406) Backport #10154 into `stable2509` from lexnv. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <eduard@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: Egor_P <egor@parity.io>
…ion of the last produced block (#10407) Backport #10154 into `stable2512` from lexnv. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <eduard@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
…ring duration of the last produced block (paritytech#10406) Backport paritytech#10154 into `stable2509` from lexnv. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: eduardspa <eduard@parity.io> Co-authored-by: Sebastian Kunert <skunert49@gmail.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: Egor_P <egor@parity.io>
This PR adjusts the block authoring to stop producing blocks 1 second before the scheduled slot change.
This introduces a safety buffer to prevent blocks from being authored too late for inclusion.
Testing Done
Tested on top of:
3 cores 2s blocks
12 cores 500ms blocks
Part of: #9848