disseminator

package
v0.0.0-...-4547e52 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: GPL-3.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchBuilder

type BatchBuilder interface {
	Append(block derivation.DerivationBlock, header derivation.HeaderRef) error
	LastAppended() types.BlockID
	Build() (*derivation.BatchAttributes, error)
	Advance()
	Reset(lastAppended types.BlockID)
}

type BatchDisseminator

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

Disseminates batches of L2 blocks via L1.

func NewBatchDisseminator

func NewBatchDisseminator(
	cfg Config,
	batchBuilder BatchBuilder,
	l1TxMgr TxManager,
	l2Client L2Client,
) *BatchDisseminator

func (*BatchDisseminator) Start

func (s *BatchDisseminator) Start(ctx context.Context, eg api.ErrGroup) error

type BuildPayloadResponse

type BuildPayloadResponse = beacon.ForkChoiceResponse

type Config

type Config interface{ GetDisseminationInterval() time.Duration }

type ForkChoiceResponse

type ForkChoiceResponse = beacon.ForkChoiceResponse

type ForkChoiceState

type ForkChoiceState = beacon.ForkchoiceStateV1

type L2Client

type L2Client interface {
	EnsureDialed(ctx context.Context) error
	BlockNumber(ctx context.Context) (uint64, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*ethTypes.Block, error)
	HeaderByTag(ctx context.Context, tag eth.BlockTag) (*ethTypes.Header, error)
}

type L2ReorgDetectedError

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

func (L2ReorgDetectedError) Error

func (e L2ReorgDetectedError) Error() string

type TxManager

type TxManager interface {
	AppendTxBatch(
		ctx context.Context,
		contexts []*big.Int,
		txLengths []*big.Int,
		firstL2BlockNumber *big.Int,
		txBatchVersion *big.Int,
		txBatch []byte,
	) (*ethTypes.Receipt, error)
}

Jump to

Keyboard shortcuts

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