Documentation ¶
Index ¶
- func InitFromConfig(ctx context.Context, p *Proposer, cfg *Config) (err error)
- type Config
- type Proposer
- func (p *Proposer) Close()
- func (p *Proposer) InitFromCli(ctx context.Context, c *cli.Context) error
- func (p *Proposer) L2SuggestedFeeRecipient() common.Address
- func (p *Proposer) Name() string
- func (p *Proposer) ProposeEmptyBlockOp(ctx context.Context) error
- func (p *Proposer) ProposeOp(ctx context.Context) error
- func (p *Proposer) ProposeTxList(ctx context.Context, meta *encoding.MxcL1BlockMetadataInput, ...) error
- func (p *Proposer) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { L1Endpoint string L1HTTPEndpoint string L2Endpoint string MxcL1Address common.Address MxcL2Address common.Address L1ProposerPrivKey *ecdsa.PrivateKey L2SuggestedFeeRecipient common.Address ProposeInterval *time.Duration CommitSlot uint64 LocalAddresses []common.Address ProposeEmptyBlocksInterval *time.Duration MinBlockGasLimit uint64 MaxProposedTxListsPerEpoch uint64 ProposeBlockTxGasLimit *uint64 BlockedAddresses []common.Address }
Config contains all configurations to initialize a Taiko proposer.
func NewConfigFromCliContext ¶
NewConfigFromCliContext initializes a Config instance from command line flags.
type Proposer ¶
type Proposer struct { // Only for testing purposes CustomProposeOpHook func() error AfterCommitHook func() error // contains filtered or unexported fields }
Proposer keep proposing new transactions from L2 execution engine's tx pool at a fixed interval.
func (*Proposer) InitFromCli ¶
New initializes the given proposer instance based on the command line flags.
func (*Proposer) L2SuggestedFeeRecipient ¶
L2SuggestedFeeRecipient returns the L2 suggested fee recipient of the current proposer.
func (*Proposer) ProposeEmptyBlockOp ¶
ProposeEmptyBlockOp performs a proposing one empty block operation.
func (*Proposer) ProposeOp ¶
ProposeOp performs a proposing operation, fetching transactions from L2 execution engine's tx pool, splitting them by proposing constraints, and then proposing them to MxcL1 contract.