Skip to content

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

License

Notifications You must be signed in to change notification settings

goldsky-io/bstream

This branch is 90 commits behind streamingfast/bstream:develop.

Folders and files

NameName
Last commit message
Last commit date
Nov 15, 2022
Dec 1, 2022
Dec 2, 2022
Dec 1, 2022
Sep 16, 2022
Apr 6, 2020
Oct 14, 2022
Apr 6, 2020
Apr 6, 2020
Aug 11, 2021
Jan 19, 2023
Jan 19, 2023
Aug 5, 2022
Aug 5, 2022
Aug 5, 2022
Sep 8, 2021
Jul 7, 2020
Aug 4, 2022
Dec 2, 2022
Dec 2, 2022
Jan 18, 2022
Apr 19, 2022
Aug 10, 2021
Jul 24, 2020
Dec 2, 2022
Nov 16, 2022
Apr 29, 2021
Apr 6, 2020
Jul 7, 2020
Sep 9, 2022
Sep 9, 2022
Aug 2, 2022
Feb 22, 2022
Dec 1, 2022
Dec 2, 2022
Dec 2, 2022
Dec 16, 2021
Mar 7, 2022
Aug 10, 2021
Aug 10, 2021
Aug 9, 2022
Apr 6, 2020
Oct 14, 2022
Oct 14, 2022
Jul 18, 2022
Jul 12, 2022
Jan 20, 2023
Jan 20, 2023
Apr 19, 2022
Apr 6, 2020
Apr 6, 2020
Oct 17, 2022
Oct 17, 2022
Jul 12, 2022
Jul 7, 2020
Apr 6, 2020
Apr 6, 2020
Dec 2, 2022
Jun 23, 2022
Jul 8, 2022
Jul 24, 2020
Oct 11, 2022
Dec 9, 2021
Apr 19, 2022
Apr 19, 2022

Repository files navigation

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%