common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SigData

func SigData(instanceUID InstanceUID, batchID t.BatchID) [][]byte

SigData is the binary data that should be signed for forming a certificate.

Types

type InstanceUID

type InstanceUID []byte

InstanceUID is used to uniquely identify an instance of multisig collector. It is used to prevent cross-instance signature replay attack and should be unique across all executions.

func (InstanceUID) Bytes

func (uid InstanceUID) Bytes() []byte

Bytes returns the binary representation of the InstanceUID.

type ModuleConfig

type ModuleConfig struct {
	Self    t.ModuleID // id of this module
	Mempool t.ModuleID
	BatchDB t.ModuleID
	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
	F           int        // the maximum number of failures tolerated. Must be less than (len(AllNodes)-1) / 2
}

ModuleParams sets the values for the parameters of an instance of the protocol. All replicas are expected to use identical module parameters.

Jump to

Keyboard shortcuts

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