selector

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETHFeeEOASelector

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

ETHFeeEOASelector is a prover selector implementation which use ETHs as prover fee and all provers selected must be EOA accounts.

func NewETHFeeEOASelector

func NewETHFeeEOASelector(
	protocolConfigs *bindings.TaikoDataConfig,
	rpc *rpc.Client,
	proposerAddress common.Address,
	taikoL1Address common.Address,
	assignmentHookAddress common.Address,
	tiersFee []encoding.TierFee,
	tierFeePriceBump *big.Int,
	proverEndpoints []*url.URL,
	maxTierFeePriceBumpIterations uint64,
	proposalExpiry time.Duration,
	requestTimeout time.Duration,
) (*ETHFeeEOASelector, error)

NewETHFeeEOASelector creates a new ETHFeeEOASelector instance.

func (*ETHFeeEOASelector) AssignProver

func (s *ETHFeeEOASelector) AssignProver(
	ctx context.Context,
	tierFees []encoding.TierFee,
	txListHash common.Hash,
) (*encoding.ProverAssignment, common.Address, *big.Int, error)

AssignProver tries to pick a prover through the registered prover endpoints.

func (*ETHFeeEOASelector) ProverEndpoints

func (s *ETHFeeEOASelector) ProverEndpoints() []*url.URL

ProverEndpoints returns all registered prover endpoints.

type ProverSelector

type ProverSelector interface {
	AssignProver(
		ctx context.Context,
		tierFees []encoding.TierFee,
		txListHash common.Hash,
	) (assignment *encoding.ProverAssignment, assignedProver common.Address, fee *big.Int, err error)
	ProverEndpoints() []*url.URL
}

Jump to

Keyboard shortcuts

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