common

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 2 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
	Certs       []*mscpbtypes.Cert // the list of generated certificates
	Limit       int                // the maximum number of certificates to generate before a request is completed
	MaxRequests int                // the maximum number of requests to be provided by this module
}

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