proposer

package
v0.0.0-...-06e190c Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT, MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*rpc.ClientConfig
	L1ProposerPrivKey          *ecdsa.PrivateKey
	L2SuggestedFeeRecipient    common.Address
	ExtraData                  string
	ProposeInterval            time.Duration
	LocalAddresses             []common.Address
	LocalAddressesOnly         bool
	MinGasUsed                 uint64
	MinTxListBytes             uint64
	MinTip                     uint64
	MinProposingInternal       time.Duration
	AllowZeroInterval          uint64
	MaxProposedTxListsPerEpoch uint64
	ProposeBlockTxGasLimit     uint64
	IncludeParentMetaHash      bool
	BlobAllowed                bool
	TxmgrConfigs               *txmgr.CLIConfig
	PrivateTxmgrConfigs        *txmgr.CLIConfig
}

Config contains all configurations to initialize a Taiko proposer.

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext initializes a Config instance from command line flags.

type Proposer

type Proposer struct {
	// configurations
	*Config
	// contains filtered or unexported fields
}

Proposer keep proposing new transactions from L2 execution engine's tx pool at a fixed interval.

func (*Proposer) Close

func (p *Proposer) Close(_ context.Context)

Close closes the proposer instance.

func (*Proposer) InitFromCli

func (p *Proposer) InitFromCli(ctx context.Context, c *cli.Context) error

InitFromCli initializes the given proposer instance based on the command line flags.

func (*Proposer) InitFromConfig

func (p *Proposer) InitFromConfig(
	ctx context.Context, cfg *Config,
	txMgr *txmgr.SimpleTxManager,
	privateTxMgr *txmgr.SimpleTxManager,
) (err error)

InitFromConfig initializes the proposer instance based on the given configurations.

func (*Proposer) Name

func (p *Proposer) Name() string

Name returns the application name.

func (*Proposer) ProposeOp

func (p *Proposer) ProposeOp(ctx context.Context) error

ProposeOp performs a proposing operation, fetching transactions from L2 execution engine's tx pool, splitting them by proposing constraints, and then proposing them to TaikoL1 contract.

func (*Proposer) ProposeTxListLegacy

func (p *Proposer) ProposeTxListLegacy(
	ctx context.Context,
	txList types.Transactions,
) error

ProposeTxListLegacy proposes the given transactions list to TaikoL1 smart contract.

func (*Proposer) ProposeTxListOntake

func (p *Proposer) ProposeTxListOntake(
	ctx context.Context,
	txLists []types.Transactions,
) error

ProposeTxListOntake proposes the given transactions lists to TaikoL1 smart contract.

func (*Proposer) ProposeTxLists

func (p *Proposer) ProposeTxLists(ctx context.Context, txLists []types.Transactions) error

ProposeTxList proposes the given transactions lists to TaikoL1 smart contract.

func (*Proposer) Start

func (p *Proposer) Start() error

Start starts the proposer's main loop.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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