Documentation
¶
Overview ¶
Package pbft is the Practical Byzantine Fault Tolerance algorithm with some simplifications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSimulation ¶
func NewSimulation(config string) (sda.Simulation, error)
NewSimulation returns a pbft simulation
Types ¶
type Finish ¶
type Finish struct {
Done string
}
Finish is just to tell the others node that the protocol is finished
type Protocol ¶
type Protocol struct { // the node we are represented-in *sda.TreeNodeInstance // contains filtered or unexported fields }
Protocol implements sda.Protocol we do basically the same as in http://www.pmg.lcs.mit.edu/papers/osdi99.pdf with the following diffs: there is no client/server request and reply (or first line in Figure 1) instead of MACs we just send around the hash of the block this will make the protocol faster, but the network latency will overweigh this skipped computation anyways
func NewProtocol ¶
func NewProtocol(n *sda.TreeNodeInstance) (*Protocol, error)
NewProtocol returns a new pbft protocol
func (*Protocol) PrePrepare ¶
PrePrepare intializes a full run of the protocol.
type Simulation ¶
type Simulation struct { // sda fields: sda.SimulationBFTree // pbft simulation specific fields: // Blocksize is the number of transactions in one block: Blocksize int }
Simulation implements sda.Simulation interface
func (*Simulation) Run ¶
func (e *Simulation) Run(sdaConf *sda.SimulationConfig) error
Run runs the simulation
func (*Simulation) Setup ¶
func (e *Simulation) Setup(dir string, hosts []string) (*sda.SimulationConfig, error)
Setup implements sda.Simulation interface