Documentation ¶
Overview ¶
Package orchestrator provides the orchestrator for orchestrating cross-chain transactions
Index ¶
- type Log
- type Orchestrator
- func (oc *Orchestrator) GetPendingCctxsWithinRateLimit(ctx context.Context, foreignChains []chains.Chain) (map[int64][]*types.CrossChainTx, error)
- func (oc *Orchestrator) GetUpdatedChainObserver(appContext *zctx.AppContext, chainID int64) (interfaces.ChainObserver, error)
- func (oc *Orchestrator) GetUpdatedSigner(appContext *zctx.AppContext, chainID int64) (interfaces.ChainSigner, error)
- func (oc *Orchestrator) MonitorCore(ctx context.Context) error
- func (oc *Orchestrator) ScheduleCctxBTC(ctx context.Context, zetaHeight uint64, chainID int64, ...)
- func (oc *Orchestrator) ScheduleCctxEVM(ctx context.Context, zetaHeight uint64, chainID int64, ...)
- func (oc *Orchestrator) StartCctxScheduler(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator wraps the zetacore client, chain observers and signers. This is the high level object used for CCTX scheduling
func NewOrchestrator ¶
func NewOrchestrator( ctx context.Context, zetacoreClient interfaces.ZetacoreClient, signerMap map[int64]interfaces.ChainSigner, observerMap map[int64]interfaces.ChainObserver, logger zerolog.Logger, ts *metrics.TelemetryServer, ) *Orchestrator
NewOrchestrator creates a new orchestrator
func (*Orchestrator) GetPendingCctxsWithinRateLimit ¶
func (oc *Orchestrator) GetPendingCctxsWithinRateLimit( ctx context.Context, foreignChains []chains.Chain, ) (map[int64][]*types.CrossChainTx, error)
GetPendingCctxsWithinRateLimit get pending cctxs across foreign chains within rate limit
func (*Orchestrator) GetUpdatedChainObserver ¶
func (oc *Orchestrator) GetUpdatedChainObserver( appContext *zctx.AppContext, chainID int64, ) (interfaces.ChainObserver, error)
GetUpdatedChainObserver returns chain observer with updated chain parameters
func (*Orchestrator) GetUpdatedSigner ¶
func (oc *Orchestrator) GetUpdatedSigner( appContext *zctx.AppContext, chainID int64, ) (interfaces.ChainSigner, error)
GetUpdatedSigner returns signer with updated chain parameters
func (*Orchestrator) MonitorCore ¶
func (oc *Orchestrator) MonitorCore(ctx context.Context) error
MonitorCore starts the orchestrator for CCTXs
func (*Orchestrator) ScheduleCctxBTC ¶
func (oc *Orchestrator) ScheduleCctxBTC( ctx context.Context, zetaHeight uint64, chainID int64, cctxList []*types.CrossChainTx, observer interfaces.ChainObserver, signer interfaces.ChainSigner, )
ScheduleCctxBTC schedules bitcoin outbound keysign on each ZetaChain block (the ticker) 1. schedule at most one keysign per ticker 2. schedule keysign only when nonce-mark UTXO is available 3. stop keysign when lookahead is reached
func (*Orchestrator) ScheduleCctxEVM ¶
func (oc *Orchestrator) ScheduleCctxEVM( ctx context.Context, zetaHeight uint64, chainID int64, cctxList []*types.CrossChainTx, observer interfaces.ChainObserver, signer interfaces.ChainSigner, )
ScheduleCctxEVM schedules evm outbound keysign on each ZetaChain block (the ticker)
func (*Orchestrator) StartCctxScheduler ¶
func (oc *Orchestrator) StartCctxScheduler(ctx context.Context) error
StartCctxScheduler schedules keysigns for cctxs on each ZetaChain block (the ticker) TODO(revamp): make this function simpler