protocol

package
v0.77.7 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: AGPL-3.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = semver.MustParse("0.1.0")

Functions

This section is empty.

Types

type EthCallEngine added in v0.73.0

type EthCallEngine interface {
	Start()
	StartAtHeight(height uint64, timestamp uint64)
	Stop()
	MakeResult(specID string, bytes []byte) (ethcall.Result, error)
	CallSpec(ctx context.Context, id string, atBlock uint64) (ethcall.Result, error)
	GetEthTime(ctx context.Context, atBlock uint64) (uint64, error)
	GetRequiredConfirmations(id string) (uint64, error)
	GetInitialTriggerTime(id string) (uint64, error)
	OnSpecActivated(ctx context.Context, spec datasource.Spec) error
	OnSpecDeactivated(ctx context.Context, spec datasource.Spec)
	EnsureChainID(ctx context.Context, chainID string, blockInterval uint64, confirmWithClient bool)
}

type EventForwarderEngine

type EventForwarderEngine interface {
	ReloadConf(ethereum.Config)
	SetupEthereumEngine(evtfwdeth.Client, evtfwdeth.Forwarder, evtfwdeth.Config, *types.EthereumConfig, evtfwdeth.Assets) error
	SetupSecondaryEthereumEngine(evtfwdeth.Client, evtfwdeth.Forwarder, evtfwdeth.Config, *types.EVMChainConfig, evtfwdeth.Assets) error
	Start()
	Stop()

	// methods used to update starting blocks of the eef
	UpdateCollateralStartingBlock(uint64)
	UpdateStakingStartingBlock(uint64)
	UpdateMultisigControlStartingBlock(uint64)
	VerifyHeartbeat(context.Context, uint64, string, string, uint64) error
	UpdateStartingBlock(string, uint64)
}

type L2EthCallEngines added in v0.74.0

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

func NewL2EthCallEngines added in v0.74.0

func NewL2EthCallEngines(log *logging.Logger, cfg ethcall.Config, isValidator bool, clients *eth.L2Clients, forwarder ethcall.Forwarder, specActivationListener SpecActivationListener) *L2EthCallEngines

func (*L2EthCallEngines) GetOrInstantiate added in v0.74.0

func (v *L2EthCallEngines) GetOrInstantiate(chainID string) (ethverifier.EthCallEngine, error)

func (*L2EthCallEngines) OnEthereumL2ConfigsUpdated added in v0.74.0

func (v *L2EthCallEngines) OnEthereumL2ConfigsUpdated(
	ctx context.Context, ethCfg *types.EthereumL2Configs,
) error

type Protocol

type Protocol struct {
	*processor.App
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	confWatcher *config.Watcher,
	log *logging.Logger,
	cancel func(),
	stopBlockchain func() error,
	nodewallets *nodewallets.NodeWallets,
	primaryEthClient *ethclient.PrimaryClient,
	secondaryEthClient *ethclient.SecondaryClient,
	primaryEthConfirmation *ethclient.EthereumConfirmations,
	secondaryEthConfirmation *ethclient.EthereumConfirmations,
	blockchainClient *blockchain.Client,
	vegaPaths paths.Paths,
	stats *stats.Stats,
	l2Clients *ethclient.L2Clients,
) (proto *Protocol, err error)

func (*Protocol) GetBroker

func (n *Protocol) GetBroker() *broker.Broker

func (*Protocol) GetEventForwarder

func (n *Protocol) GetEventForwarder() *evtforward.Forwarder

func (*Protocol) GetEventService

func (n *Protocol) GetEventService() *subscribers.Service

func (*Protocol) GetPoW

func (n *Protocol) GetPoW() api.ProofOfWorkParams

func (*Protocol) GetPowEngine added in v0.67.0

func (n *Protocol) GetPowEngine() processor.PoWEngine

func (*Protocol) GetProtocolUpgradeService

func (n *Protocol) GetProtocolUpgradeService() *protocolupgrade.Engine

func (*Protocol) GetSpamEngine added in v0.67.0

func (n *Protocol) GetSpamEngine() *spam.Engine

func (*Protocol) GetTimeService

func (n *Protocol) GetTimeService() *vegatime.Svc

func (*Protocol) Protocol

func (n *Protocol) Protocol() semver.Version

func (*Protocol) Start

func (n *Protocol) Start(ctx context.Context) error

Start will start the protocol, this means it's ready to process blocks from the blockchain.

func (*Protocol) Stop

func (n *Protocol) Stop() error

Stop will stop all services of the protocol.

type SpecActivationListener added in v0.74.0

type SpecActivationListener func(listener spec.SpecActivationsListener)

Jump to

Keyboard shortcuts

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