github.com/koko1123/flow-go-1@v0.29.6/module/updatable_configs.go (about)

     1  package module
     2  
     3  // SealingConfigsGetter is an interface for the actual updatable configs module.
     4  // but only exposes its getter methods to return the config values without exposing
     5  // its setter methods.
     6  // SealingConfigs contains three configs:
     7  // - RequireApprovalsForSealingConstruction (updatable)
     8  // - RequireApprovalsForSealingVerification (not-updatable)
     9  // - ChunkAlpha (not-updatable)
    10  // - EmergencySealingActive (not-updatable)
    11  // - ApprovalRequestsThreshold (not-updatable)
    12  type SealingConfigsGetter interface {
    13  	// updatable fields
    14  	RequireApprovalsForSealConstructionDynamicValue() uint
    15  
    16  	// not-updatable fields
    17  	ChunkAlphaConst() uint
    18  	RequireApprovalsForSealVerificationConst() uint
    19  	EmergencySealingActiveConst() bool
    20  	ApprovalRequestsThresholdConst() uint64
    21  }
    22  
    23  // SealingConfigsSetter is an interface that allows the caller to update updatable configs
    24  type SealingConfigsSetter interface {
    25  	SealingConfigsGetter
    26  	// SetRequiredApprovalsForSealingConstruction takes a new config value and updates the config
    27  	// if the new value is valid.
    28  	// Returns ValidationError if the new value results in an invalid sealing config.
    29  	SetRequiredApprovalsForSealingConstruction(newVal uint) error
    30  }