source

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegacyProposalData

type LegacyProposalData struct {
	HeadL1      eth.L1BlockRef
	SafeL2      eth.L2BlockRef
	FinalizedL2 eth.L2BlockRef

	// Support legacy metrics when possible
	BlockRef eth.L2BlockRef
}

type Proposal

type Proposal struct {
	// Root is the proposal hash
	Root common.Hash
	// SequenceNum identifies the position in the overall state transition.
	// For output roots this is the L2 block number.
	// For super roots this is the timestamp.
	SequenceNum uint64
	CurrentL1   eth.BlockID

	// Legacy provides data that is only available when retrieving data from a single rollup node.
	// It should only be used for L2OO proposals.
	Legacy LegacyProposalData
}

type ProposalSource

type ProposalSource interface {
	ProposalAtSequenceNum(ctx context.Context, seqNum uint64) (Proposal, error)
	SyncStatus(ctx context.Context) (SyncStatus, error)

	// Close closes the underlying client or clients
	Close()
}

type RollupProposalSource

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

func NewRollupProposalSource

func NewRollupProposalSource(provider dial.RollupProvider) *RollupProposalSource

func (*RollupProposalSource) Close

func (r *RollupProposalSource) Close()

func (*RollupProposalSource) ProposalAtSequenceNum

func (r *RollupProposalSource) ProposalAtSequenceNum(ctx context.Context, blockNum uint64) (Proposal, error)

func (*RollupProposalSource) SyncStatus

func (r *RollupProposalSource) SyncStatus(ctx context.Context) (SyncStatus, error)

type SupervisorClient

type SupervisorClient interface {
	SyncStatus(ctx context.Context) (eth.SupervisorSyncStatus, error)
	SuperRootAtTimestamp(ctx context.Context, timestamp hexutil.Uint64) (eth.SuperRootResponse, error)
	Close()
}

type SupervisorProposalSource

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

func NewSupervisorProposalSource

func NewSupervisorProposalSource(logger log.Logger, clients ...SupervisorClient) *SupervisorProposalSource

func (*SupervisorProposalSource) Close

func (s *SupervisorProposalSource) Close()

func (*SupervisorProposalSource) ProposalAtSequenceNum

func (s *SupervisorProposalSource) ProposalAtSequenceNum(ctx context.Context, timestamp uint64) (Proposal, error)

func (*SupervisorProposalSource) SyncStatus

type SyncStatus

type SyncStatus struct {
	CurrentL1   eth.L1BlockRef
	SafeL2      uint64
	FinalizedL2 uint64
}

Jump to

Keyboard shortcuts

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