The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- BREAKING Removed the
bstream.Block
object completely: thepbbstream.Block
takes its place. - BREAKING Moved the
pbbstream
package from github.com/streamingfast/pbgo to here, undersf.bstream.v1.Block
- BREAKING Removed
bstream.Block.PreviousRef
method 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()
onTracker
object.Tracker
object 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.JoiningSourceWithTracker
to avoid joining to live when live and file sources are very far apart.HeadBlockRefGetter
andLIBBlockRefGetter
that targets aHeadInfo
service, and satisfies theTracker
BlockRefGetter 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
HeadBlockRefGetter
toStreamHeadBlockRefGetter
andNetworkHeadBlockRefGetter
. Choose what you need. - Renamed
LIBBlockRefGetter
toStreamLIBBlockRefGetter
andNetworkLIBBlockRefGetter
. Choose what you need. - Renamed
Tracker.ResolveRelativeBlock
toTracker.GetRelativeBlock
, to avoid confusion with theAddResolver
function, 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
Source
must now implement aSetLogger(logger *zap.Logger)
method. - BREAKING Removed all
Name
,SetName
, and*Name
options on all source and acrossbstream
. Replaced by a proper*zap.Logger
instance 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:
JoiningSourceRateLimit
now takes atime.Duration
as a second argument, instead of anint
amount 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()