Documentation ¶
Index ¶
- Variables
- func CreateLocalContext(pre types.Claim, post types.Claim) common.Hash
- func FetchProposals(ctx context.Context, topProvider *OutputTraceProvider, pre types.Claim, ...) (contracts.Proposal, contracts.Proposal, error)
- func NewOutputAlphabetTraceAccessor(logger log.Logger, m metrics.Metricer, prestateProvider types.PrestateProvider, ...) (*trace.Accessor, error)
- func NewOutputAsteriscTraceAccessor(logger log.Logger, m metrics.Metricer, cfg vm.Config, ...) (*trace.Accessor, error)
- func NewOutputCannonTraceAccessor(logger log.Logger, m metrics.Metricer, cfg vm.Config, ...) (*trace.Accessor, error)
- func OutputRootSplitAdapter(topProvider *OutputTraceProvider, creator ProposalTraceProviderCreator) split.ProviderCreator
- type OutputPrestateProvider
- type OutputRollupClient
- type OutputTraceProvider
- func (o *OutputTraceProvider) ClaimedBlockNumber(pos types.Position) (uint64, error)
- func (o *OutputTraceProvider) Get(ctx context.Context, pos types.Position) (common.Hash, error)
- func (o *OutputTraceProvider) GetL2BlockNumberChallenge(ctx context.Context) (*types.InvalidL2BlockNumberChallenge, error)
- func (o *OutputTraceProvider) GetStepData(_ context.Context, _ types.Position) (prestate []byte, proofData []byte, preimageData *types.PreimageOracleData, ...)
- func (o *OutputTraceProvider) HonestBlockNumber(ctx context.Context, pos types.Position) (uint64, error)
- type ProposalTraceProviderCreator
- type ProviderCache
Constants ¶
This section is empty.
Variables ¶
var ( ErrGetStepData = errors.New("GetStepData not supported") ErrIndexTooBig = errors.New("trace index is greater than max uint64") )
Functions ¶
func CreateLocalContext ¶ added in v1.5.0
func FetchProposals ¶ added in v1.5.0
func NewOutputAlphabetTraceAccessor ¶ added in v1.4.2
func NewOutputAsteriscTraceAccessor ¶ added in v1.7.4
func NewOutputAsteriscTraceAccessor( logger log.Logger, m metrics.Metricer, cfg vm.Config, vmCfg vm.OracleServerExecutor, l2Client utils.L2HeaderSource, prestateProvider types.PrestateProvider, asteriscPrestate string, rollupClient OutputRollupClient, dir string, l1Head eth.BlockID, splitDepth types.Depth, prestateBlock uint64, poststateBlock uint64, ) (*trace.Accessor, error)
func NewOutputCannonTraceAccessor ¶ added in v1.4.2
func NewOutputCannonTraceAccessor( logger log.Logger, m metrics.Metricer, cfg vm.Config, serverExecutor vm.OracleServerExecutor, l2Client utils.L2HeaderSource, prestateProvider types.PrestateProvider, cannonPrestate string, rollupClient OutputRollupClient, dir string, l1Head eth.BlockID, splitDepth types.Depth, prestateBlock uint64, poststateBlock uint64, ) (*trace.Accessor, error)
func OutputRootSplitAdapter ¶ added in v1.4.2
func OutputRootSplitAdapter(topProvider *OutputTraceProvider, creator ProposalTraceProviderCreator) split.ProviderCreator
Types ¶
type OutputPrestateProvider ¶ added in v1.4.2
type OutputPrestateProvider struct {
// contains filtered or unexported fields
}
func NewPrestateProvider ¶ added in v1.4.2
func NewPrestateProvider(rollupClient OutputRollupClient, prestateBlock uint64) *OutputPrestateProvider
func (*OutputPrestateProvider) AbsolutePreStateCommitment ¶ added in v1.4.2
type OutputRollupClient ¶
type OutputTraceProvider ¶
type OutputTraceProvider struct { types.PrestateProvider // 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(logger log.Logger, prestateProvider types.PrestateProvider, rollupProvider OutputRollupClient, l2Client utils.L2HeaderSource, l1Head eth.BlockID, gameDepth types.Depth, prestateBlock, poststateBlock uint64) *OutputTraceProvider
func (*OutputTraceProvider) ClaimedBlockNumber ¶ added in v1.7.2
func (o *OutputTraceProvider) ClaimedBlockNumber(pos types.Position) (uint64, error)
ClaimedBlockNumber returns the block number for a position restricted only by the claimed L2 block number. The returned block number may be after the safe head reached by processing batch data up to the game's L1 head
func (*OutputTraceProvider) GetL2BlockNumberChallenge ¶ added in v1.7.6
func (o *OutputTraceProvider) GetL2BlockNumberChallenge(ctx context.Context) (*types.InvalidL2BlockNumberChallenge, error)
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.
func (*OutputTraceProvider) HonestBlockNumber ¶ added in v1.7.2
func (o *OutputTraceProvider) HonestBlockNumber(ctx context.Context, pos types.Position) (uint64, error)
HonestBlockNumber returns the block number for a position in the game restricted to the minimum of the claimed L2 block number or the safe head reached by processing batch data up to the game's L1 head. This is used when posting honest output roots to ensure that only roots supported by L1 data are posted
type ProposalTraceProviderCreator ¶ added in v1.4.2
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