speedup

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

README

IBFT Fast Sync For Current Running Instances

Background

SSV nodes broadcast a change round msg when their internal timeout clock elapses. Timeout are exponential, that is some base timeout to the round x^r (x - base timeout, r - round number).

When there are less than 2f+1 nodes online, existing (and later joining nodes) play a catchup game with the goal of all of them to land on the same round number. There are 2 ways to catchup:

  1. just timeout until you reach a round where 2f+1 nodes are (that's why the timeouts are exponential).
  2. An IBFT "faster" sync protocol that can bump a node to a higher round if f+1 change round msgs are received.

The above helps somewhat but is still very slow as timeouts are exponential and quickly get to very long timeouts (hours and days).

Solution - Fast Sync

A solution is to actively ask other nodes for their latest change rounds when a node boots.
Doing so will bump the node immediately forward, still using the f+1 IBFT speedup but now not needing to wait passively for other nodes to send the change round msg.

This fast sync is a huge time efficiency increase in situations where less than 2f+1 nodes are online.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Speedup

type Speedup struct {
	// contains filtered or unexported fields
}

Speedup enables a fast syncing with a current running instance from peers by actively fetching their latest change round msgs.

func New

func New(
	logger *zap.Logger,
	identifier []byte,
	publicKey []byte,
	seqNumber uint64,
	network network.Network,
	msgValidationPipeline pipeline.Pipeline,
) *Speedup

New returns a new Speedup instance

func (*Speedup) Start

func (s *Speedup) Start() ([]*proto.SignedMessage, error)

Start starts the speedup sync

Jump to

Keyboard shortcuts

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