host

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT, MIT Imports: 24 Imported by: 0

Documentation

Index

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 Main added in v1.0.6

func Main(logger log.Logger, cfg *config.Config) error

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

type L2Client struct {
	*sources.L2Client
	// contains filtered or unexported fields
}

func NewL2Client added in v1.1.4

func NewL2Client(client client.RPC, log log.Logger, metrics caching.Metrics, config *L2ClientConfig) (*L2Client, error)

func (*L2Client) OutputByRoot added in v1.1.4

func (s *L2Client) OutputByRoot(ctx context.Context, l2OutputRoot common.Hash) (eth.Output, error)

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 NewL2Source(ctx context.Context, logger log.Logger, config *config.Config) (*L2Source, error)

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

func (l *L2Source) CodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)

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 (l *L2Source) ExperimentalEnabled() bool

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

func (l *L2Source) NodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)

NodeByHash implements prefetcher.L2Source.

func (*L2Source) OutputByRoot added in v1.9.5

func (l *L2Source) OutputByRoot(ctx context.Context, root common.Hash) (eth.Output, error)

OutputByRoot implements prefetcher.L2Source.

type Prefetcher added in v1.9.3

type Prefetcher interface {
	Hint(hint string) error
	GetPreimage(ctx context.Context, key common.Hash) ([]byte, error)
}

type PrefetcherCreator added in v1.9.3

type PrefetcherCreator func(ctx context.Context, logger log.Logger, kv kvstore.KV, cfg *config.Config) (Prefetcher, error)

type ProgramOpt added in v1.9.3

type ProgramOpt func(c *creatorsCfg)

func WithPrefetcher added in v1.9.3

func WithPrefetcher(creator PrefetcherCreator) ProgramOpt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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