outputs

package
v1.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGetStepData = errors.New("GetStepData not supported")
	ErrIndexTooBig = errors.New("trace index is greater than max uint64")
)

Functions

func NewOutputAlphabetTraceAccessor added in v1.4.2

func NewOutputAlphabetTraceAccessor(
	ctx context.Context,
	logger log.Logger,
	m metrics.Metricer,
	cfg *config.Config,
	gameDepth uint64,
	splitDepth uint64,
	prestateBlock uint64,
	poststateBlock uint64,
) (*trace.Accessor, error)

func NewOutputCannonTraceAccessor added in v1.4.2

func NewOutputCannonTraceAccessor(
	ctx context.Context,
	logger log.Logger,
	m metrics.Metricer,
	cfg *config.Config,
	l2Client cannon.L2HeaderSource,
	contract cannon.L1HeadSource,
	dir string,
	gameDepth uint64,
	prestateBlock uint64,
	poststateBlock uint64,
) (*trace.Accessor, error)

func OutputRootSplitAdapter added in v1.4.2

func OutputRootSplitAdapter(topProvider *OutputTraceProvider, creator ProposalTraceProviderCreator) split.ProviderCreator

Types

type OutputRollupClient

type OutputRollupClient interface {
	OutputAtBlock(ctx context.Context, blockNum uint64) (*eth.OutputResponse, error)
}

type OutputTraceProvider

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

OutputTraceProvider is a types.TraceProvider implementation that uses output roots for given L2 Blocks as a trace.

func NewTraceProvider

func NewTraceProvider(ctx context.Context, logger log.Logger, rollupRpc string, gameDepth, prestateBlock, poststateBlock uint64) (*OutputTraceProvider, error)

func NewTraceProviderFromInputs

func NewTraceProviderFromInputs(logger log.Logger, rollupClient OutputRollupClient, gameDepth, prestateBlock, poststateBlock uint64) *OutputTraceProvider

func (*OutputTraceProvider) AbsolutePreStateCommitment

func (o *OutputTraceProvider) AbsolutePreStateCommitment(ctx context.Context) (hash common.Hash, err error)

AbsolutePreStateCommitment returns the absolute prestate at the configured prestateBlock.

func (*OutputTraceProvider) BlockNumber added in v1.4.2

func (o *OutputTraceProvider) BlockNumber(pos types.Position) (uint64, error)

func (*OutputTraceProvider) Get

func (*OutputTraceProvider) GetStepData

func (o *OutputTraceProvider) GetStepData(_ context.Context, _ types.Position) (prestate []byte, proofData []byte, preimageData *types.PreimageOracleData, err error)

GetStepData is not supported in the OutputTraceProvider.

type ProposalTraceProviderCreator added in v1.4.2

type ProposalTraceProviderCreator func(ctx context.Context, localContext common.Hash, agreed contracts.Proposal, claimed contracts.Proposal) (types.TraceProvider, error)

type ProviderCache added in v1.4.2

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

func NewProviderCache added in v1.4.2

func NewProviderCache(m caching.Metrics, metricsLabel string, creator ProposalTraceProviderCreator) *ProviderCache

func (*ProviderCache) GetOrCreate added in v1.4.2

func (c *ProviderCache) GetOrCreate(ctx context.Context, localContext common.Hash, agreed contracts.Proposal, claimed contracts.Proposal) (types.TraceProvider, error)

Jump to

Keyboard shortcuts

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