The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
DefaultMergedBlocksBundleSize: new package variable (default100) controlling the number of blocks per merged-blocks file assumed by readers when no explicit size is given. LikeGetProtocolFirstStreamableBlock, it is meant to be set once at process startup.stream.WithMergedBlocksBundleSize: newstreamoption to set the merged-blocks bundle size for a single stream (overrides the process-wide default; used by substreams tier2 which serves multiple chains at once).FileSourcenow fails fast with a clear error when a merged-blocks file contains a block beyond the configured bundle size (store files bigger than the configured size).SanitizeBundleSize: guards the merged-blocks math against a bundle size of0(misconfiguredDefaultMergedBlocksBundleSizeorFileSourceWithBundleSize(0)), which would otherwise divide-by-zero panic in the hub or loop forever inFileSource; falls back to100.
- Hub subscriptions with
with_partials=falseno longer stall on flash/partial-block chains. Previously every block withPartialIndex != 0(including the closingLastPartial) was dropped, so a no-partial subscriber only advanced on separatePartialIndex==0full blocks, which can lag the sealed head by tens of seconds. The subscription now drops only intermediate partials and delivers eachLastPartialas a full block (partial markers cleared on a thin copy that shares the payload; the shared original block is never mutated). FileSourcewithFileSourceErrorOnMissingMergedBlocksFileno longer truncates its output: on a missing file it now drains every already-read block through the ordered stream before surfacing the error, instead of callingShutdown()immediately (which aborted in-flight reader goroutines and discarded blocks).
-
ForkableHubbootstrap now rounds its lowest kept block down to the configured merged-blocks bundle size instead of a hardcoded100. -
BlockTimestampGate: new gate that lets blocks through once a block's timestamp meets or exceeds a giventime.Time, supporting both inclusive and exclusive gate types. -
hub.WithLogger: newForkableHuboption to set the logger used by the hub (and, by default, propagated to its inner forkable). Previously the hub always logged under the package-levelbstreamlogger, making lines such asprocessing blockindistinguishable across components (relayer, firehose, tier1, ...). Callers should pass their component logger.
- Added field
with_partialstosf.bstream.v1.BlockRequestprotobuf message: blockstream no longer sends partial blocks by default.
- Support for partial blocks (e.g., Flash Blocks), with special "StepPartial". These blocks are only sent when they are above the HEAD, and other blocks are never linked to them. They are always eventually replaced by a full block with StepNew.
- New middleware handlers in joining source to allow for user to hook into the stream and perform custom actions.
- BREAKING Removed the
bstream.Blockobject completely: thepbbstream.Blocktakes its place. - BREAKING Moved the
pbbstreampackage from github.com/streamingfast/pbgo to here, undersf.bstream.v1.Block
- BREAKING Removed
bstream.Block.PreviousRefmethod as it was invalid since it was assuming that the previous number is always minus one the current block num which is not true on a lot of supported chains (Solana and NEAR for example).
- BREAKING we now enforce block continuity in filesource while reading merged-blocks: before, a corrupted merged-block-file would have been read as-is and serve wrong blocks.
- Added FileSourceWithSecondaryBlocksStores Option to allow a fallback location
.SetNearBlocksCount(count)and.Clone()onTrackerobject.Trackerobject to streamline queries about different targets (like network head, database lib, relayer blockstream head, whatever other BlockRef tags), ask the question about them being near one another (to select between live mode or catch-up mode). Also streamlines the requests of a start block, with a bunch of different backend implementations that can answer to the questions regarding where to start.JoiningSourceWithTrackerto avoid joining to live when live and file sources are very far apart.HeadBlockRefGetterandLIBBlockRefGetterthat targets aHeadInfoservice, and satisfies theTrackerBlockRefGetter func signature.
- StreamGetter now requires a boolean param to know if it must decode the block
- BREAKING blockstream/v2 server now takes an array of blocksStores, to give the filesource as secondaryBlocksStores option
- Renamed
HeadBlockRefGettertoStreamHeadBlockRefGetterandNetworkHeadBlockRefGetter. Choose what you need. - Renamed
LIBBlockRefGettertoStreamLIBBlockRefGetterandNetworkLIBBlockRefGetter. Choose what you need. - Renamed
Tracker.ResolveRelativeBlocktoTracker.GetRelativeBlock, to avoid confusion with theAddResolverfunction, which has nothing to do withGetRelativeBlock(which usesGet()and the Getters only). - Greatly improve logging behavior of the various source implementations, this should greatly improved debuggability of the library.
- BREAKING All
Sourcemust now implement aSetLogger(logger *zap.Logger)method. - BREAKING Removed all
Name,SetName, and*Nameoptions on all source and acrossbstream. Replaced by a proper*zap.Loggerinstance instead. Re-configure using the logger, you can useSetLogger(zlog.With("name", "my-source-name"))to emulate the old behavior.
- StartBlockResolver: interface for quickly finding out from which block to start (to cover all possible forks before your required start block)
- ParallelStartResolver: implementation of StartBlockResolver to interrogate multiple StartBlockResolvers at once, useful when all dfuse components are not "up" yet.
- SetHeadInfo on BlockStream to allow using GetHeadInfo() before stream actually starts
- WithName option on NewForkable for better logging
- License changed to Apache 2.0
- BREAKING CHANGE:
JoiningSourceRateLimitnow takes atime.Durationas a second argument, instead of anintamount of milliseconds.
forkable.NewWithLIB(...)replaced byforkable.New(forkable.WithExclusiveLIB(...))Forkable.SetFilters()replaced by theforkable.WithFilters()Option, to bassed toNew().Forkable.EnsureBlockFlows()replaced by theforkable.EnsureBlockFlows()Option.Forkable.EnsureAllBlocksTriggerLongestChain()replaced by theforkable.EnsureAllBlocksTriggerLongestChain()Option.
forkable.WithInclusiveLIB()as an Option toforkable.New()