traces

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader interface {
	// Download traces or returning an error with the failure
	Download(txID common.Hash, blockIO flow.Identifier) (json.RawMessage, error)
}

type Engine

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

Engine is an implementation of the trace downloader engine.

Traces are ethereum transaction execution traces: https://geth.ethereum.org/docs/developers/evm-tracing Currently EVM gateway doesn't produce the traces since it doesn't execute the transactions and is thus relying on the execution node to produce and upload the traces during execution. This engine listens for new transaction events and then downloads and index the traces from the transaction execution.

func NewTracesIngestionEngine

func NewTracesIngestionEngine(
	blocksPublisher *models.Publisher,
	blocks storage.BlockIndexer,
	traces storage.TraceIndexer,
	downloader Downloader,
	logger zerolog.Logger,
	collector metrics.Collector,
) *Engine

NewTracesIngestionEngine creates a new instance of the engine.

func (*Engine) Done

func (e *Engine) Done() <-chan struct{}

func (*Engine) Error added in v0.23.1

func (e *Engine) Error() <-chan error

Error is required by the publisher, and we just return a nil, since the errors are handled gracefully in the indexBlockTraces

func (*Engine) ID added in v0.23.1

func (e *Engine) ID() uuid.UUID

ID is required by the publisher interface and we return a random uuid since the subscription will only happen once by this engine

func (*Engine) Notify

func (e *Engine) Notify(data any)

Notify is a handler that is being used to subscribe for new EVM block notifications. This method should be non-blocking.

func (*Engine) Ready

func (e *Engine) Ready() <-chan struct{}

func (*Engine) Run

func (e *Engine) Run(ctx context.Context) error

func (*Engine) Stop

func (e *Engine) Stop()

type GCPDownloader

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

func NewGCPDownloader

func NewGCPDownloader(bucketName string, logger zerolog.Logger) (*GCPDownloader, error)

func (*GCPDownloader) Download

func (g *GCPDownloader) Download(txID common.Hash, blockID flow.Identifier) (json.RawMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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