Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModule ¶
func NewModule(mc ModuleConfig, params *ModuleParams, nodeID t.NodeID) modules.PassiveModule
NewModule returns a passive module for the Signed Echo Broadcast from the textbook "Introduction to reliable and secure distributed programming". It serves as a motivating example for the DSL module interface. The pseudocode can also be found in https://dcl.epfl.ch/site/_media/education/sdc_byzconsensus.pdf (Algorithm 4 (Echo broadcast [Rei94]))
Types ¶
type ModuleConfig ¶
type ModuleConfig struct {
Self t.ModuleID // id of this module
Consumer t.ModuleID // id of the module to send the "Deliver" event to
Net t.ModuleID
Crypto t.ModuleID
}
ModuleConfig sets the module ids. All replicas are expected to use identical module configurations.
type ModuleParams ¶
type ModuleParams struct {
InstanceUID []byte // unique identifier for this instance of BCB, used to prevent cross-instance replay attacks
AllNodes []t.NodeID // the list of participating nodes
Leader t.NodeID // the id of the leader of the instance
}
ModuleParams sets the values for the parameters of an instance of the protocol. All replicas are expected to use identical module parameters.
func (*ModuleParams) GetF ¶
func (params *ModuleParams) GetF() int
GetF returns the maximum tolerated number of faulty nodes.
func (*ModuleParams) GetN ¶
func (params *ModuleParams) GetN() int
GetN returns the total number of nodes.