relayer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAttestationNotValsetRequest         = errors.New("attestation is not a valset request")
	ErrAttestationNotDataCommitmentRequest = errors.New("attestation is not a data commitment request")
	ErrAttestationNotFound                 = errors.New("attestation not found")
	ErrValidatorSetMismatch                = errors.New("p2p validator set is different from the trusted contract one")
	ErrTransactionStillPending             = errors.New("evm transaction still pending")
)

Functions

This section is empty.

Types

type Relayer

type Relayer struct {
	TmQuerier  *rpc.TmQuerier
	AppQuerier *rpc.AppQuerier
	P2PQuerier *p2p.Querier
	EVMClient  *evm.Client

	Retrier               *helpers.Retrier
	SignatureStore        *badger.Datastore
	RetryTimeout          time.Duration
	IsBackupRelayer       bool
	BackupRelayerWaitTime time.Duration
	Meters                *telemetry.RelayerMeters
	// contains filtered or unexported fields
}

func NewRelayer

func NewRelayer(
	tmQuerier *rpc.TmQuerier,
	appQuerier *rpc.AppQuerier,
	p2pQuerier *p2p.Querier,
	evmClient *evm.Client,
	logger tmlog.Logger,
	retrier *helpers.Retrier,
	sigStore *badger.Datastore,
	retryTimeout time.Duration,
	isBackupRelayer bool,
	backupRelayerWaitTime time.Duration,
	meters *telemetry.RelayerMeters,
) *Relayer

func (*Relayer) ProcessAttestation

func (*Relayer) QueryValsetFromP2PNetworkAndValidateIt

func (r *Relayer) QueryValsetFromP2PNetworkAndValidateIt(ctx context.Context) (*celestiatypes.Valset, error)

QueryValsetFromP2PNetworkAndValidateIt Queries the latest valset from the P2P network and validates it against the validator set hash used in the contract.

func (*Relayer) SaveDataCommitmentSignaturesToStore

func (r *Relayer) SaveDataCommitmentSignaturesToStore(ctx context.Context, att celestiatypes.DataCommitment, dataRootTupleRoot string, confirms []types.DataCommitmentConfirm) error

func (*Relayer) SaveValsetSignaturesToStore

func (r *Relayer) SaveValsetSignaturesToStore(ctx context.Context, att celestiatypes.Valset, confirms []types.ValsetConfirm) error

func (*Relayer) Start

func (r *Relayer) Start(ctx context.Context) error

func (*Relayer) SubmitDataRootTupleRoot

func (r *Relayer) SubmitDataRootTupleRoot(
	opts *bind.TransactOpts,
	dataCommitment celestiatypes.DataCommitment,
	currentValset celestiatypes.Valset,
	commitment string,
	confirms []types.DataCommitmentConfirm,
) (*coregethtypes.Transaction, error)

func (*Relayer) UpdateValidatorSet

func (r *Relayer) UpdateValidatorSet(
	ctx context.Context,
	opts *bind.TransactOpts,
	valset celestiatypes.Valset,
	newThreshold uint64,
	confirms []types.ValsetConfirm,
) (*coregethtypes.Transaction, error)

Jump to

Keyboard shortcuts

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