Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.
/ bstream Public archive
forked from streamingfast/bstream

Block streaming Handlers library. Lower level building block of dfuse.

License

Notifications You must be signed in to change notification settings

pinax-network/bstream

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚧 Deprecation Notice

dfuse services will be discontinued on September 25, 2024, as Pinax transitions to more advanced and efficient solutions for Antelope blockchain data sourcing. We encourage all users to migrate to Pinax's new services, including Substreams, Firehose, and comprehensive blockchain data services supporting dozens of chains like EOS, WAX, and Telos. Dfuse users can start building with a FREE Pinax Pro Plan.

Learn more and get started at https://pinax.network.

StreamingFast Blocks Streaming Library

reference License

The bstream package manages flows of blocks and forks in a blockchain through a Handler-based interface similar to net/http.

Usage

Flows are composed by assembling Handlers:

type HandlerFunc func(blk *Block, obj interface{}) error

and are kicked off by passing them to a Source

Overview

All streaming features of streamingfast use this package.

Sources include:

  • FileSource feeds from 100-blocks files in some dstore-based location (some object storage, or local filesystem files)
  • LiveSource streams from a gRPC-based block streamer (fed from instrumented blockchain nodes directly).
  • JoiningSource which bridges a FileSource and a LiveSource transparently, so you can stream from files and then handoff to a real-time stream.

Handlers include:

  • Forkable (in forkable/) which manages chain reorganizations, undos, according to the chain's consensus (longest chain, etc..)
  • SubscriptionHub (in hub/): In-process hub to dispatch blocks from a remote source to all consumers inside a Go process
  • A few gates, that allow the flowing of blocks only upon certain conditions (BlockNumGate, BlockIDGate, RealtimeGate, RealtimeTripper, which can be inclusive or exclusive). See gates.go.

Contributing

Issues and PR in this repo related strictly to the low-level functionalities of bstream

Report any protocol-specific issues in their respective repositories

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

License

Apache 2.0

About

Block streaming Handlers library. Lower level building block of dfuse.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%