-
Notifications
You must be signed in to change notification settings - Fork 18
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
Slow down consensus (increase timeouts) when vertex store is close to being full #859
base: feature/vertex-store-overflow-mitigations
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ | |
import com.radixdlt.consensus.ProposalLimitsConfig; | ||
import com.radixdlt.consensus.bft.*; | ||
import com.radixdlt.consensus.epoch.EpochsConsensusModule; | ||
import com.radixdlt.consensus.liveness.PacemakerTimeoutCalculatorConfig; | ||
import com.radixdlt.consensus.sync.BFTSyncPatienceMillis; | ||
import com.radixdlt.consensus.vertexstore.VertexStoreConfig; | ||
import com.radixdlt.environment.*; | ||
|
@@ -150,11 +151,16 @@ protected void configure() { | |
.annotatedWith(BFTSyncPatienceMillis.class) | ||
.to(properties.get("bft.sync.patience", 200)); | ||
|
||
// Max timeout = (1.2^8)×3 ~= 13s | ||
bindConstant().annotatedWith(PacemakerBaseTimeoutMs.class).to(3000L); | ||
bindConstant().annotatedWith(PacemakerBackoffRate.class).to(1.2); | ||
bindConstant().annotatedWith(PacemakerMaxExponent.class).to(8); | ||
bindConstant().annotatedWith(AdditionalRoundTimeIfProposalReceivedMs.class).to(30_000L); | ||
/* Default timeouts config: | ||
Max exponential timeout (based on consecutive timeout occurrences) = (1.2^8)×3 ~= 13s | ||
Additionally, when vertex store reaches 2/3 of its max capacity (that is: 2/3*150 = 100 MB by default) | ||
we start multiplying the timeout by a linearly increasing value, up to 10x. | ||
So a maximum theoretical timeout is 130s. */ | ||
bind(PacemakerTimeoutCalculatorConfig.class) | ||
.toInstance(new PacemakerTimeoutCalculatorConfig(3000L, 1.2, 8, 30_000L, 0.66, 10)); | ||
|
||
// Delayed resolution is disabled for now. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might it be worth explaining why in this comment? (i.e. because we cannot create QCs on fallback vertices, because we don't just sign the ledger header, but also the BFT header, which captures the previous certificate chain, and all the nodes have a different certificate chain for their fallback vertex) |
||
// TODO: consider reviving this feature or clean it up | ||
bindConstant().annotatedWith(TimeoutQuorumResolutionDelayMs.class).to(0L); | ||
|
||
final var vertexStoreConfig = | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
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.
I'm finding it a little hard to read this - because all of these don't have names any more.
Perhaps we should have a
PacemakerTimeoutCalculatorConfig::default()
and aPacemakerTimeoutCalculatorConfig::testing()
? And inside those methods, we can label the values with variable names, and then pass the variables into the constructor?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.
For review purposes, these are: