Documentation ¶
Index ¶
- func FaultProofProgram(ctx context.Context, logger log.Logger, cfg *config.Config, opts ...ProgramOpt) error
- func Main(logger log.Logger, cfg *config.Config) error
- func PreimageServer(ctx context.Context, logger log.Logger, cfg *config.Config, ...) error
- type L2Client
- type L2ClientConfig
- type L2Source
- func (l *L2Source) CodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)
- func (l *L2Source) ExecutionWitness(ctx context.Context, blockNum uint64) (*eth.ExecutionWitness, error)
- func (l *L2Source) ExperimentalEnabled() bool
- func (l *L2Source) GetProof(ctx context.Context, address common.Address, storage []common.Hash, ...) (*eth.AccountResult, error)
- func (l *L2Source) InfoAndTxsByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, error)
- func (l *L2Source) NodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)
- func (l *L2Source) OutputByRoot(ctx context.Context, root common.Hash) (eth.Output, error)
- type Prefetcher
- type PrefetcherCreator
- type ProgramOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FaultProofProgram ¶
func FaultProofProgram(ctx context.Context, logger log.Logger, cfg *config.Config, opts ...ProgramOpt) error
FaultProofProgram is the programmatic entry-point for the fault proof program
func PreimageServer ¶ added in v1.0.6
func PreimageServer(ctx context.Context, logger log.Logger, cfg *config.Config, preimageChannel preimage.FileChannel, hintChannel preimage.FileChannel, prefetcherCreator PrefetcherCreator) error
PreimageServer reads hints and preimage requests from the provided channels and processes those requests. This method will block until both the hinter and preimage handlers complete. If either returns an error both handlers are stopped. The supplied preimageChannel and hintChannel will be closed before this function returns.
Types ¶
type L2Client ¶ added in v1.1.4
func NewL2Client ¶ added in v1.1.4
type L2ClientConfig ¶ added in v1.1.4
type L2ClientConfig struct { *sources.L2ClientConfig L2Head common.Hash }
type L2Source ¶
type L2Source struct {
// contains filtered or unexported fields
}
L2Source is a source of L2 data, it abstracts away the details of how to fetch L2 data between canonical and experimental sources. It also tracks metrics for each of the apis. Once experimental sources are stable, this will only route to the "experimental" source.
func NewL2Source ¶ added in v1.9.5
func NewL2SourceWithClient ¶ added in v1.9.5
func NewL2SourceWithClient(logger log.Logger, canonicalL2Client *L2Client, canonicalDebugClient *sources.DebugClient) *L2Source
NewL2SourceWithClient creates a new L2 source with the given client as the canonical client. This doesn't configure the experimental source, but is useful for testing.
func (*L2Source) CodeByHash ¶ added in v1.9.5
CodeByHash implements prefetcher.L2Source.
func (*L2Source) ExecutionWitness ¶ added in v1.9.5
func (l *L2Source) ExecutionWitness(ctx context.Context, blockNum uint64) (*eth.ExecutionWitness, error)
ExecutionWitness implements prefetcher.L2Source.
func (*L2Source) ExperimentalEnabled ¶ added in v1.9.5
func (*L2Source) GetProof ¶ added in v1.9.5
func (l *L2Source) GetProof(ctx context.Context, address common.Address, storage []common.Hash, blockTag string) (*eth.AccountResult, error)
GetProof implements prefetcher.L2Source.
func (*L2Source) InfoAndTxsByHash ¶ added in v1.9.5
func (l *L2Source) InfoAndTxsByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, error)
InfoAndTxsByHash implements prefetcher.L2Source.
func (*L2Source) NodeByHash ¶ added in v1.9.5
NodeByHash implements prefetcher.L2Source.
type Prefetcher ¶ added in v1.9.3
type PrefetcherCreator ¶ added in v1.9.3
type ProgramOpt ¶ added in v1.9.3
type ProgramOpt func(c *creatorsCfg)
func WithPrefetcher ¶ added in v1.9.3
func WithPrefetcher(creator PrefetcherCreator) ProgramOpt