-
Notifications
You must be signed in to change notification settings - Fork 211
/
config.go
18 lines (16 loc) · 912 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package config
// Config is the configuration of the Hare.
type Config struct {
N int `mapstructure:"hare-committee-size"` // total number of active parties
F int `mapstructure:"hare-max-adversaries"` // number of dishonest parties
RoundDuration int `mapstructure:"hare-round-duration-sec"` // the duration of a single round
WakeupDelta int `mapstructure:"hare-wakeup-delta"` // the wakeup delta after tick
ExpectedLeaders int `mapstructure:"hare-exp-leaders"` // the expected number of leaders
SuperHare bool
LimitIterations int `mapstructure:"hare-limit-iterations"` // limit on number of iterations
LimitConcurrent int `mapstructure:"hare-limit-concurrent"` // limit number of concurrent CPs
}
// DefaultConfig returns the default configuration for the hare.
func DefaultConfig() Config {
return Config{10, 5, 2, 10, 5, false, 1000, 5}
}