orchestrator

package
v1.0.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyPeersTable = errors.New("empty peers table")
	ErrSignalChanNotif = errors.New("signal channel sent notification to stop")
)

Functions

func ValidatorPartOfValset

func ValidatorPartOfValset(members []celestiatypes.BridgeValidator, evmAddr string) bool

Types

type Broadcaster

type Broadcaster struct {
	BlobstreamDHT *p2p.BlobstreamDHT
}

func NewBroadcaster

func NewBroadcaster(blobStreamDHT *p2p.BlobstreamDHT) *Broadcaster

func (Broadcaster) ProvideDataCommitmentConfirm

func (b Broadcaster) ProvideDataCommitmentConfirm(ctx context.Context, nonce uint64, confirm types.DataCommitmentConfirm, dataRootTupleRoot string) error

func (Broadcaster) ProvideValsetConfirm

func (b Broadcaster) ProvideValsetConfirm(ctx context.Context, nonce uint64, confirm types.ValsetConfirm, signBytes string) error

type Orchestrator

type Orchestrator struct {
	Logger tmlog.Logger // maybe use a more general interface

	EvmKeyStore *keystore.KeyStore
	EvmAccount  *accounts.Account

	AppQuerier  *rpc.AppQuerier
	TmQuerier   *rpc.TmQuerier
	P2PQuerier  *p2p.Querier
	Broadcaster *Broadcaster
	Retrier     *helpers.Retrier
}

func New

func New(
	logger tmlog.Logger,
	appQuerier *rpc.AppQuerier,
	tmQuerier *rpc.TmQuerier,
	p2pQuerier *p2p.Querier,
	broadcaster *Broadcaster,
	retrier *helpers.Retrier,
	evmKeyStore *keystore.KeyStore,
	evmAccount *accounts.Account,
) *Orchestrator

func (Orchestrator) EnqueueMissingEvents

func (orch Orchestrator) EnqueueMissingEvents(
	ctx context.Context,
	queue chan<- uint64,
	signalChan <-chan struct{},
) error

func (Orchestrator) Process

func (orch Orchestrator) Process(ctx context.Context, nonce uint64) error

func (Orchestrator) ProcessDataCommitmentEvent

func (orch Orchestrator) ProcessDataCommitmentEvent(
	ctx context.Context,
	dc celestiatypes.DataCommitment,
	dataRootTupleRoot ethcmn.Hash,
) error

func (Orchestrator) ProcessNonces

func (orch Orchestrator) ProcessNonces(
	ctx context.Context,
	noncesQueue <-chan uint64,
	signalChan chan<- struct{},
) error

func (Orchestrator) ProcessValsetEvent

func (orch Orchestrator) ProcessValsetEvent(ctx context.Context, valset celestiatypes.Valset) error

func (Orchestrator) Start

func (orch Orchestrator) Start(ctx context.Context)

func (Orchestrator) StartNewEventsListener

func (orch Orchestrator) StartNewEventsListener(
	ctx context.Context,
	queue chan<- uint64,
	signalChan <-chan struct{},
) error

Jump to

Keyboard shortcuts

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