Skip to content

Commit

Permalink
Add period 0 deadline timeout parameter to consensus params. (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalouf authored Dec 7, 2023
1 parent f2b254a commit 939542c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions protocol/config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ type ConsensusParams struct {
// time for nodes to wait for block proposal headers for period = 0, value should be configured to suit best case
// critical path
AgreementFilterTimeoutPeriod0 time.Duration
// Duration of the second agreement step for period=0, value should be configured to suit best case critical path
AgreementDeadlineTimeoutPeriod0 time.Duration

FastRecoveryLambda time.Duration // time between fast recovery attempts

Expand Down Expand Up @@ -707,8 +709,9 @@ func initConsensusProtocols() {
DownCommitteeSize: 10000,
DownCommitteeThreshold: 7750,

AgreementFilterTimeout: 4 * time.Second,
AgreementFilterTimeoutPeriod0: 4 * time.Second,
AgreementFilterTimeout: 4 * time.Second,
AgreementFilterTimeoutPeriod0: 4 * time.Second,
AgreementDeadlineTimeoutPeriod0: Protocol.BigLambda + Protocol.SmallLambda,

FastRecoveryLambda: 5 * time.Minute,

Expand Down Expand Up @@ -1242,11 +1245,20 @@ func initConsensusProtocols() {
// ConsensusFuture is used to test features that are implemented
// but not yet released in a production protocol version.
vFuture := v38

vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{}

vFuture.LogicSigVersion = 10 // When moving this to a release, put a new higher LogicSigVersion here
vFuture.EnableLogicSigCostPooling = true

vFuture.AgreementDeadlineTimeoutPeriod0 = 4 * time.Second

vFuture.StateProofBlockHashInLightHeader = true

// Setting DynamicFilterTimeout in vFuture will impact e2e test performance
// by reducing round time. Hence, it is commented out for now.
// vFuture.DynamicFilterTimeout = true

Consensus[protocol.ConsensusFuture] = vFuture

// vAlphaX versions are an separate series of consensus parameters and versions for alphanet
Expand Down

0 comments on commit 939542c

Please sign in to comment.