Documentation
¶
Index ¶
- type Config
- type DestinationReader
- func (d *DestinationReader) CheckHealth(chain protocol.ChainSelector) error
- func (d *DestinationReader) Close() error
- func (d *DestinationReader) GetCCVSForMessage(ctx context.Context, message protocol.Message) (protocol.CCVAddressInfo, error)
- func (d *DestinationReader) GetExecutionAttempts(ctx context.Context, message protocol.Message) ([]protocol.ExecutionAttempt, error)
- func (d *DestinationReader) GetMessageSuccess(ctx context.Context, message protocol.Message) (bool, error)
- func (d *DestinationReader) GetRMNCursedSubjects(ctx context.Context) ([]protocol.Bytes16, error)
- func (d *DestinationReader) HasHonestAttempt(ctx context.Context, message protocol.Message, ...) (bool, error)
- func (d *DestinationReader) HealthReport() map[string]error
- func (d *DestinationReader) IsReady(chain protocol.ChainSelector) bool
- func (d *DestinationReader) Name() string
- func (d *DestinationReader) Ready() error
- func (d *DestinationReader) Start(ctx context.Context) error
- type StellarExecutionAttemptPoller
- func (p *StellarExecutionAttemptPoller) Close() error
- func (p *StellarExecutionAttemptPoller) GetExecutionAttempts(_ context.Context, message protocol.Message) ([]protocol.ExecutionAttempt, error)
- func (p *StellarExecutionAttemptPoller) HealthReport() map[string]error
- func (p *StellarExecutionAttemptPoller) Name() string
- func (p *StellarExecutionAttemptPoller) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// OffRampContractID is the Stellar contract address of the OffRamp.
OffRampContractID string `toml:"offramp_contract_id"`
// RMNRemoteContractID is the Stellar contract address of the RMN Remote.
RMNRemoteContractID string `toml:"rmn_remote_contract_id"`
}
Config is the configuration required to create a Stellar destination reader.
type DestinationReader ¶
type DestinationReader struct {
// contains filtered or unexported fields
}
DestinationReader reads execution state and CCV data from the Stellar OffRamp contract.
func New ¶
func New( invoker bindings.Invoker, rpcClient *rpcclient.Client, offRampContractID string, rmnRemoteContractID string, lggr *zerolog.Logger, attemptCacheExpiration time.Duration, ) (*DestinationReader, error)
New creates a new Stellar DestinationReader.
func (*DestinationReader) CheckHealth ¶
func (d *DestinationReader) CheckHealth(chain protocol.ChainSelector) error
CheckHealth implements chainaccess.DestinationReader. Currently always returns nil. TODO: Implement this.
func (*DestinationReader) Close ¶
func (d *DestinationReader) Close() error
Close implements services.Service.
func (*DestinationReader) GetCCVSForMessage ¶
func (d *DestinationReader) GetCCVSForMessage(ctx context.Context, message protocol.Message) (protocol.CCVAddressInfo, error)
GetCCVSForMessage returns the cross-chain verification addresses for the message. It queries the OffRamp's source chain config to determine which CCVs are required (lane-mandated) and which are optional (defaults). The Stellar OffRamp quorum logic requires all lane-mandated CCVs plus at least one default CCV to verify.
func (*DestinationReader) GetExecutionAttempts ¶
func (d *DestinationReader) GetExecutionAttempts(ctx context.Context, message protocol.Message) ([]protocol.ExecutionAttempt, error)
GetExecutionAttempts retrieves execution attempts for the given message from the poller cache.
func (*DestinationReader) GetMessageSuccess ¶
func (d *DestinationReader) GetMessageSuccess(ctx context.Context, message protocol.Message) (bool, error)
GetMessageSuccess queries the OffRamp contract for the execution state of a message and returns true if the message has been successfully executed.
func (*DestinationReader) GetRMNCursedSubjects ¶
GetRMNCursedSubjects queries the RMN Remote contract for cursed subjects.
func (*DestinationReader) HasHonestAttempt ¶
func (d *DestinationReader) HasHonestAttempt(ctx context.Context, message protocol.Message, verifierResults []protocol.VerifierResult, ccvAddressInfo protocol.CCVAddressInfo) (bool, error)
HasHonestAttempt implements chainaccess.DestinationReader. Currently always returns false. Returning false means that the offchain will attempt to submit an execution attempt for this message. TODO: Implement this.
func (*DestinationReader) HealthReport ¶
func (d *DestinationReader) HealthReport() map[string]error
HealthReport implements services.Service.
func (*DestinationReader) IsReady ¶
func (d *DestinationReader) IsReady(chain protocol.ChainSelector) bool
IsReady implements chainaccess.DestinationReader. Currently always returns true. TODO: Implement this.
func (*DestinationReader) Name ¶
func (d *DestinationReader) Name() string
Name implements services.Service.
func (*DestinationReader) Ready ¶
func (d *DestinationReader) Ready() error
Ready implements services.Service.
type StellarExecutionAttemptPoller ¶
type StellarExecutionAttemptPoller struct {
// contains filtered or unexported fields
}
StellarExecutionAttemptPoller polls for ExecutionStateChanged events on the Stellar offramp contract and caches the decoded execution attempts by message ID.
func NewStellarExecutionAttemptPoller ¶
func NewStellarExecutionAttemptPoller( rpcClient *rpcclient.Client, offrampContractID string, lggr *zerolog.Logger, attemptCacheExpiration time.Duration, ) (*StellarExecutionAttemptPoller, error)
NewStellarExecutionAttemptPoller creates a new execution attempt poller for the Stellar offramp. On startup the poller performs a backfill over the lookback window, then continues polling for new events at the configured interval.
func (*StellarExecutionAttemptPoller) Close ¶
func (p *StellarExecutionAttemptPoller) Close() error
Close stops the poller and waits for the background goroutine to exit.
func (*StellarExecutionAttemptPoller) GetExecutionAttempts ¶
func (p *StellarExecutionAttemptPoller) GetExecutionAttempts(_ context.Context, message protocol.Message) ([]protocol.ExecutionAttempt, error)
GetExecutionAttempts retrieves cached execution attempts for the given message.
func (*StellarExecutionAttemptPoller) HealthReport ¶
func (p *StellarExecutionAttemptPoller) HealthReport() map[string]error
func (*StellarExecutionAttemptPoller) Name ¶
func (p *StellarExecutionAttemptPoller) Name() string