Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Make authorship soft deadline configurable. #10125

Merged
merged 5 commits into from
Nov 18, 2021

Conversation

tomusdrw
Copy link
Contributor

A follow up on discussion in #9663 (comment)

The idea is to expose some public functions so that the soft deadline can actually be configured as a percentage of the hard deadline. Before it was hardcoded to 50%, now it's just the default and can be changed by the downstream projects.

This is especially useful for parachains, which have a pretty low absolute deadline (333ms). Note however that changing this parameter has security implications and setting it too high might end up opening a DoS vector, where block producers are forced to create & push empty blocks.

@tomusdrw tomusdrw added A0-please_review Pull request needs code review. B3-apinoteworthy labels Oct 30, 2021
@tomusdrw tomusdrw requested a review from bkchr October 30, 2021 13:47
@tomusdrw tomusdrw added C1-low PR touches the given topic and has a low impact on builders. D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit. and removed D2-notlive 💤 PR contains changes in a runtime directory that is not deployed to a chain that requires an audit. labels Oct 30, 2021
@crystalin
Copy link
Contributor

@tomusdrw thank you for taking care of this !! :)

telemetry,
client,
include_proof_in_block_size_estimation: false,
_phantom: PhantomData,
}
}

/// Set soft deadline percentage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be moved into the impl block below in line 177.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Done.

@librelois
Copy link
Contributor

@tomusdrw we are really interested in this PR, do you know if it will be merged soon?

@tomusdrw
Copy link
Contributor Author

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot
Copy link

Merge cancelled due to error. Error: Checks failed for a18a243

@bkchr
Copy link
Member

bkchr commented Nov 18, 2021

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot paritytech-processbot bot merged commit 80bc4a0 into master Nov 18, 2021
@paritytech-processbot paritytech-processbot bot deleted the td-soft-deadline-conf branch November 18, 2021 20:12
grishasobol pushed a commit to gear-tech/substrate that referenced this pull request Mar 28, 2022
* Make soft deadline configurable.

* cargo +nightly fmt --all

* Move setter where it belongs.
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Make soft deadline configurable.

* cargo +nightly fmt --all

* Move setter where it belongs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants