Documentation
¶
Overview ¶
Package config reads and writes the configuration of the program.
This package handles both the parameters of the protocol, as well as all the needed keys and committee information.
Index ¶
Constants ¶
const ( // MaxDataBytesPerUnit is the maximal allowed size of data included in a unit, in bytes. MaxDataBytesPerUnit = 2e6 // MaxRandomSourceDataBytesPerUnit is the maximal allowed size of random source data included in a unit, in bytes. MaxRandomSourceDataBytesPerUnit = 1e6 // MaxUnitsInChunk is the maximal number of units in a chunk. MaxUnitsInChunk = 1e6 )
Variables ¶
This section is empty.
Functions ¶
func AddCheck ¶
func AddCheck(c Config, check gomel.UnitChecker)
AddCheck adds a unit checker to the given Config.
func StoreCommittee ¶
StoreCommittee writes the given committee to the writer.
func StoreMember ¶
StoreMember writes the given member to the writer.
func ValidSetup ¶
ValidSetup checks if a given config is in valid state for setup
Types ¶
type Committee ¶
type Committee struct {
// Public keys of all committee members, ordered according to process ids.
PublicKeys []gomel.PublicKey
// PublicKeys of all committee members use for generating keys for p2p communication. Ordered according to process ids.
P2PPublicKeys []*p2p.PublicKey
// Verification keys of all committee members use for RMC, ordered according to process ids.
RMCVerificationKeys []*bn256.VerificationKey
// SetupAddresses of all committee members
SetupAddresses map[string][]string
// Addresses of all committee members
Addresses map[string][]string
}
Committee represents the public data about the committee known before the algorithm starts.
type Config ¶
type Config *conf
Config represents a complete configuration needed for a process to start. Exported type is a pointer type to make sure that we always deal with only one underlying struct.
type Member ¶
type Member struct {
// The process id of this member.
Pid uint16
// The private key of this committee member.
PrivateKey gomel.PrivateKey
// The secret key of this committee member use for RMC.
RMCSecretKey *bn256.SecretKey
// The key for generating keys for p2p communication.
P2PSecretKey *p2p.SecretKey
}
Member represents the private data about a committee member.