Documentation ¶
Index ¶
- Constants
- Variables
- func ValidatorPartOfValset(members []celestiatypes.BridgeValidator, evmAddr string) bool
- type Broadcaster
- func (b Broadcaster) ProvideDataCommitmentConfirm(ctx context.Context, nonce uint64, confirm types.DataCommitmentConfirm, ...) error
- func (b Broadcaster) ProvideLatestValset(ctx context.Context, latestValset types.LatestValset) error
- func (b Broadcaster) ProvideValsetConfirm(ctx context.Context, nonce uint64, confirm types.ValsetConfirm, ...) error
- type Orchestrator
- func (orch Orchestrator) EnqueueMissingEvents(ctx context.Context, queue chan<- uint64, signalChan <-chan struct{}) error
- func (orch Orchestrator) MaybeRequeue(ctx context.Context, requeueQueue chan<- uint64, nonce uint64)
- func (orch Orchestrator) Process(ctx context.Context, nonce uint64) error
- func (orch Orchestrator) ProcessDataCommitmentEvent(ctx context.Context, dc celestiatypes.DataCommitment, ...) error
- func (orch Orchestrator) ProcessNonces(ctx context.Context, noncesQueue chan uint64, requeueQueue chan uint64, ...) error
- func (orch Orchestrator) ProcessValsetEvent(ctx context.Context, valset celestiatypes.Valset) error
- func (orch Orchestrator) Start(ctx context.Context)
- func (orch Orchestrator) StartNewEventsListener(ctx context.Context, queue chan<- uint64, signalChan <-chan struct{}) error
Constants ¶
View Source
const RequeueWindow = 50
RequeueWindow the number of nonces that we want to re-enqueue if we can't process them even after retry. After this window is elapsed, the nonce is discarded.
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) ProvideLatestValset ¶
func (b Broadcaster) ProvideLatestValset(ctx context.Context, latestValset types.LatestValset) 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 Meters *telemetry.OrchestratorMeters }
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, meters *telemetry.OrchestratorMeters, ) *Orchestrator
func (Orchestrator) EnqueueMissingEvents ¶
func (orch Orchestrator) EnqueueMissingEvents( ctx context.Context, queue chan<- uint64, signalChan <-chan struct{}, ) error
func (Orchestrator) MaybeRequeue ¶ added in v1.1.0
func (orch Orchestrator) MaybeRequeue(ctx context.Context, requeueQueue chan<- uint64, nonce uint64)
MaybeRequeue requeue the nonce to be re-processed subsequently if it's recent.
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 (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
Click to show internal directories.
Click to hide internal directories.