mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
- Delete DeprecatedConfig/NewFromDeprecated in syncer (49 lines) - Delete ChainVMWithNetwork/ChainVMWithHealth type aliases - Delete QBlock, newSignerWithThreshold, VMState aliases - Delete GetNetID (returned empty string) - Remove all "In production" / "For now" / "placeholder" comments - Fix examples: NewSimpleModel API, big.NewInt overflow - Published deps for all examples (consensus v1.22.84, dex v1.4.1)
32 lines
703 B
Go
32 lines
703 B
Go
package config
|
|
|
|
// FPCConfig represents Firing Photon Cannon configuration
|
|
type FPCConfig struct {
|
|
// Enable indicates whether FPC is enabled (default: true)
|
|
Enable bool
|
|
|
|
// Rounds is the number of FPC rounds to run
|
|
Rounds int
|
|
|
|
// Threshold is the confidence threshold for FPC
|
|
Threshold float64
|
|
|
|
// SampleSize is the number of nodes to sample per round
|
|
SampleSize int
|
|
}
|
|
|
|
// DefaultFPC returns the default FPC configuration
|
|
func DefaultFPC() FPCConfig {
|
|
return FPCConfig{
|
|
Enable: true, // FPC enabled by default
|
|
Rounds: 10,
|
|
Threshold: 0.8,
|
|
SampleSize: 20,
|
|
}
|
|
}
|
|
|
|
// WithFPC adds FPC configuration to Parameters
|
|
func (p Parameters) WithFPC(fpc FPCConfig) Parameters {
|
|
return p
|
|
}
|