Documentation ¶
Index ¶
- Variables
- type Commander
- type Config
- type Engine
- func (e *Engine) ReloadConf(config Config)
- func (e *Engine) SetupEthereumEngine(client ethereum.Client, forwarder ethereum.Forwarder, config ethereum.Config, ...) error
- func (e *Engine) Start()
- func (e *Engine) Stop()
- func (e *Engine) UpdateMultisigControlStartingBlock(b uint64)
- func (e *Engine) UpdateStakingStartingBlock(b uint64)
- type Forwarder
- func (f *Forwarder) Ack(evt *commandspb.ChainEvent) bool
- func (f *Forwarder) Forward(ctx context.Context, evt *commandspb.ChainEvent, pubkey string) error
- func (f *Forwarder) ForwardFromSelf(evt *commandspb.ChainEvent)
- func (f *Forwarder) GetState(k string) ([]byte, []types.StateProvider, error)
- func (f *Forwarder) HasChanged(k string) bool
- func (f *Forwarder) Keys() []string
- func (f *Forwarder) LoadState(ctx context.Context, p *types.Payload) ([]types.StateProvider, error)
- func (f *Forwarder) Namespace() types.SnapshotNamespace
- func (f *Forwarder) OnTick(ctx context.Context, t time.Time)
- func (f *Forwarder) ReloadConf(cfg Config)
- func (f *Forwarder) Stopped() bool
- type NoopEngine
- func (e *NoopEngine) ReloadConf(_ Config)
- func (e *NoopEngine) SetupEthereumEngine(_ ethereum.Client, _ ethereum.Forwarder, _ ethereum.Config, ...) error
- func (e *NoopEngine) Start()
- func (e *NoopEngine) Stop()
- func (e *NoopEngine) UpdateMultisigControlStartingBlock(b uint64)
- func (e *NoopEngine) UpdateStakingStartingBlock(b uint64)
- type TimeService
- type ValidatorTopology
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEvtAlreadyExist we have already handled this event. ErrEvtAlreadyExist = errors.New("event already exist") // ErrPubKeyNotAllowlisted this pubkey is not part of the allowlist. ErrPubKeyNotAllowlisted = errors.New("pubkey not allowlisted") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Level specifies the logging level of the Event Forwarder engine. Level encoding.LogLevel `long:"log-level"` RetryRate encoding.Duration `long:"retry-rate"` // a list of allowlisted blockchain queue public keys BlockchainQueueAllowlist []string `long:"blockchain-queue-allowlist" description:" "` // Ethereum groups the configuration related to Ethereum implementation of // the Event Forwarder. Ethereum ethereum.Config `group:"Ethereum" namespace:"ethereum"` }
Config represents governance specific configuration.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) ReloadConf ¶
ReloadConf updates the internal configuration of the Event Forwarder engine.
func (*Engine) SetupEthereumEngine ¶
func (*Engine) UpdateMultisigControlStartingBlock ¶
func (*Engine) UpdateStakingStartingBlock ¶
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder receive events from the blockchain queue and will try to send them to the vega chain. this will select a node in the network to forward the event.
func New ¶
func New(log *logging.Logger, cfg Config, cmd Commander, timeService TimeService, top ValidatorTopology) *Forwarder
New creates a new instance of the event forwarder.
func (*Forwarder) Ack ¶
func (f *Forwarder) Ack(evt *commandspb.ChainEvent) bool
Ack will return true if the event is newly acknowledged. If the event already exist and was already acknowledged, this will return false.
func (*Forwarder) Forward ¶
func (f *Forwarder) Forward(ctx context.Context, evt *commandspb.ChainEvent, pubkey string) error
Forward will forward a ChainEvent to the tendermint network. We expect the pubkey to be an ed25519, hex encoded, key.
func (*Forwarder) ForwardFromSelf ¶
func (f *Forwarder) ForwardFromSelf(evt *commandspb.ChainEvent)
ForwardFromSelf will forward event seen by the node itself, not from an external service like the eef for example.
func (*Forwarder) HasChanged ¶
func (*Forwarder) Namespace ¶
func (f *Forwarder) Namespace() types.SnapshotNamespace
func (*Forwarder) ReloadConf ¶
ReloadConf updates the internal configuration of the Event Forwarder engine.
type NoopEngine ¶
type NoopEngine struct {
// contains filtered or unexported fields
}
NoopEngine can be use as a stub for the Engine. It does nothing.
func NewNoopEngine ¶
func NewNoopEngine(log *logging.Logger, config Config) *NoopEngine
func (*NoopEngine) ReloadConf ¶
func (e *NoopEngine) ReloadConf(_ Config)
func (*NoopEngine) SetupEthereumEngine ¶
func (*NoopEngine) Start ¶
func (e *NoopEngine) Start()
func (*NoopEngine) Stop ¶
func (e *NoopEngine) Stop()
func (*NoopEngine) UpdateMultisigControlStartingBlock ¶
func (e *NoopEngine) UpdateMultisigControlStartingBlock(b uint64)
func (*NoopEngine) UpdateStakingStartingBlock ¶
func (e *NoopEngine) UpdateStakingStartingBlock(b uint64)