bcb

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

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.

func DefaultModuleConfig

func DefaultModuleConfig(consumer t.ModuleID) *ModuleConfig

DefaultModuleConfig returns a valid module config with default names for all modules.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL