Documentation ¶
Overview ¶
Package orchestrator provides the orchestrator for orchestrating cross-chain transactions
Index ¶
- func CreateChainObserverMap(ctx context.Context, client interfaces.ZetacoreClient, ...) (map[int64]interfaces.ChainObserver, error)
- func CreateSignerMap(ctx context.Context, tss interfaces.TSSSigner, logger base.Logger, ...) (map[int64]interfaces.ChainSigner, error)
- type Orchestrator
- func (oc *Orchestrator) GetPendingCctxsWithinRateLimit(ctx context.Context, chainIDs []int64) (map[int64][]*types.CrossChainTx, 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) ScheduleCctxSolana(ctx context.Context, zetaHeight uint64, chainID int64, ...)
- func (oc *Orchestrator) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChainObserverMap ¶
func CreateChainObserverMap( ctx context.Context, client interfaces.ZetacoreClient, tss interfaces.TSSSigner, dbpath string, logger base.Logger, ts *metrics.TelemetryServer, ) (map[int64]interfaces.ChainObserver, error)
CreateChainObserverMap creates a map of interfaces.ChainObserver (by chainID) for all chains in the config. - Note (!) that it calls observer.Start() on creation - Note that data race handling is the responsibility of the caller.
func CreateSignerMap ¶
func CreateSignerMap( ctx context.Context, tss interfaces.TSSSigner, logger base.Logger, ts *metrics.TelemetryServer, ) (map[int64]interfaces.ChainSigner, error)
CreateSignerMap creates a map of interfaces.ChainSigner (by chainID) for all chains in the config. Note that signer construction failure for a chain does not prevent the creation of signers for other chains.
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 New ¶
func New( ctx context.Context, client interfaces.ZetacoreClient, signerMap map[int64]interfaces.ChainSigner, observerMap map[int64]interfaces.ChainObserver, tss interfaces.TSSSigner, dbDirectory string, logger base.Logger, ts *metrics.TelemetryServer, ) (*Orchestrator, error)
New creates a new Orchestrator
func (*Orchestrator) GetPendingCctxsWithinRateLimit ¶
func (oc *Orchestrator) GetPendingCctxsWithinRateLimit(ctx context.Context, chainIDs []int64) ( map[int64][]*types.CrossChainTx, error, )
GetPendingCctxsWithinRateLimit get pending cctxs across foreign chains within rate limit
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) ScheduleCctxSolana ¶
func (oc *Orchestrator) ScheduleCctxSolana( ctx context.Context, zetaHeight uint64, chainID int64, cctxList []*types.CrossChainTx, observer interfaces.ChainObserver, signer interfaces.ChainSigner, )
ScheduleCctxSolana schedules solana outbound keysign on each ZetaChain block (the ticker)