compactcert

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accounts

type Accounts interface {
	Keys(basics.Round) []account.Participation
}

Accounts captures the aspects of the AccountManager that are used by this package.

type Ledger

type Ledger interface {
	Latest() basics.Round
	Wait(basics.Round) chan struct{}
	GenesisHash() crypto.Digest
	BlockHdr(basics.Round) (bookkeeping.BlockHeader, error)
	CompactCertVoters(basics.Round) (*ledger.VotersForRound, error)
}

Ledger captures the aspects of the ledger that are used by this package.

type Network

type Network interface {
	Broadcast(context.Context, protocol.Tag, []byte, bool, network.Peer) error
	RegisterHandlers([]network.TaggedMessageHandler)
}

Network captures the aspects of the gossip network protocol that are used by this package.

type TransactionSender

type TransactionSender interface {
	BroadcastSignedTxGroup([]transactions.SignedTxn) error
}

TransactionSender is an interface that captures the node's ability to broadcast a new transaction.

type Worker

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

Worker builds compact certificates, by broadcasting signatures using this node's participation keys, by collecting signatures sent by others, and by sending out the resulting compact certs in a transaction.

func NewWorker

func NewWorker(db db.Accessor, log logging.Logger, accts Accounts, ledger Ledger, net Network, txnSender TransactionSender) *Worker

NewWorker constructs a new Worker, as used by the node.

func (*Worker) LatestSigsFromThisNode

func (ccw *Worker) LatestSigsFromThisNode() (map[basics.Address]basics.Round, error)

LatestSigsFromThisNode returns information about compact cert signatures from this node's participation keys that are already stored durably on disk. In particular, we return the round nunmber of the latest block signed with each account's participation key. This is intended for use by the ephemeral key logic: since we already have these signatures stored on disk, it is safe to delete the corresponding ephemeral private keys.

func (*Worker) Shutdown

func (ccw *Worker) Shutdown()

Shutdown stops any goroutines associated with this worker.

func (*Worker) Start

func (ccw *Worker) Start()

Start starts the goroutines for the worker.

Jump to

Keyboard shortcuts

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