common

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SigData

func SigData(instanceUID InstanceUID, batchID msctypes.BatchID) *cryptopbtypes.SignedData

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

	BatchDB t.ModuleID
	Crypto  t.ModuleID
	Mempool t.ModuleID
	Net     t.ModuleID
}

ModuleConfig sets the module ids. All replicas are expected to use identical module configurations.

type ModuleParams

type ModuleParams struct {

	// InstanceUID is a unique identifier for this instance used to prevent replay attacks.
	InstanceUID []byte

	// Membership defines the set of nodes participating in a particular instance of the multisig collector.
	Membership *trantorpbtypes.Membership

	// Limit is the maximum number of certificates to generate before a request is completed.
	Limit int

	// MaxRequests is the maximum number of certificate requests to be handled by this module.
	// It prevents the multisig collector from continuing operation (transaction dissemination)
	// after no more certificate requests are going to arrive.
	MaxRequests int

	// EpochNr is the epoch in which the instance of MultisigCollector operates.
	// It is used as the RetentionIndex to associate with all newly stored batches.
	// and batches requested from the mempool.
	EpochNr tt.EpochNr
}

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