substreams

package module
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

StreamingFast Substreams Banner

Substreams

Substreams is a powerful blockchain indexing technology, developed for The Graph Network.

Substreams enables developers to write Rust modules, composing data streams alongside the community, and provides extremely high performance indexing by virtue of parallelization, in a streaming-first fashion.

Substreams has all the benefits of StreamingFast Firehose, like low-cost caching and archiving of blockchain data, high throughput processing, and cursor-based reorgs handling.

Documentation

Full documentation for installing, running and working with Substreams is available at: https://docs.substreams.dev.

Contributing

Please first refer to the general StreamingFast contribution guide, if you wish to contribute to this code base.

License

Apache 2.0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SQLSchemaProto string

SQLSchemaProto is the annotations file a from-proto SQL sink's schema is declared with.

It is embedded so `substreams tools extract-proto --sql` can write it next to the proto it annotates: the override is parsed with imports resolved from the working directory, so the file has to be on disk, and asking the operator to go and find the right version of it is most of the work the command exists to remove.

Functions

func NewBlockScopedDataInternResponse added in v1.15.9

func NewBlockScopedDataInternResponse(in *pbssinternal.BlockScopedData) *pbssinternal.ProcessRangeResponse

func NewBlockScopedDatasResponse added in v1.18.0

func NewBlockScopedDatasResponse(in *pbsubstreamsrpcv4.BlockScopedDatas) *pbsubstreamsrpcv4.Response

func NewSnapshotComplete added in v0.0.14

func NewSnapshotComplete() *pbsubstreamsrpc.Response

func NewSnapshotData added in v0.0.14

Types

type BlockHook

type BlockHook func(ctx context.Context, clock *pbsubstreams.Clock) error

BlockHooks will always be called with a valid clock

type GrpcClientFactory added in v0.0.14

type GrpcClientFactory func(context.Context) (streamClient pbsubstreamsrpc.StreamClient, closeFunc func() error, opts []grpc.CallOption, err error)

type PostJobHook

type PostJobHook func(ctx context.Context, clock *pbsubstreams.Clock) error

PostJobHooks will be called at the end of a job. The clock can be `nil` in some circumstances, or it can be >= job.StopBlock

type ResponseFromAnyTier added in v1.0.2

type ResponseFromAnyTier interface {
	ProtoMessage()
}

type ResponseFunc

type ResponseFunc func(ResponseFromAnyTier) error

Directories

Path Synopsis
cmd
substreams command
internal
formatx
Package formatx renders values for human consumption — block numbers, counts, rates, durations, sizes.
Package formatx renders values for human consumption — block numbers, counts, rates, durations, sizes.
pb
remotebuild module
sql
sql/db_proto/sql/postgres/pgcopy
Package pgcopy writes the PostgreSQL binary COPY format ("PGCOPY").
Package pgcopy writes the PostgreSQL binary COPY format ("PGCOPY").
sql/db_proto/sql/spool
Package spool holds a from-proto sink's rows on local disk, pre-encoded into whatever the target database can take unchanged, and applies whole segments from a separate goroutine.
Package spool holds a from-proto sink's rows on local disk, pre-encoded into whatever the target database can take unchanged, and applies whole segments from a separate goroutine.
storage
devenv
Package devenv boots a complete local Substreams stack — a dummy blockchain in a container, plus tier1 and tier2 running in-process — against which requests can be issued.
Package devenv boots a complete local Substreams stack — a dummy blockchain in a container, plus tier1 and tier2 running in-process — against which requests can be issued.
bench command
bench/substreams_wasi_go/pb/google/protobuf
Package timestamppb contains generated types for google/protobuf/timestamp.proto.
Package timestamppb contains generated types for google/protobuf/timestamp.proto.
v8

Jump to

Keyboard shortcuts

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