v0.7.0 release brings high-performance dynamic Tail maintenance for Syncer, also known as header pruning.
Notable Changes
Syncer
These new fields were introduced to Syncer's config:
// PruningWindow defines the duration within which headers are retained before being pruned.
// Default is 337 hours.
PruningWindow time.Duration
// SyncFromHash is the hash of the header from which Syncer should start syncing.
// Zero value to disable. Value updates up and down the chain are gracefully handled by Syncer.
//
// By default, Syncer maintains PruningWindow number of headers. SyncFromHash overrides this default,
// allowing any user to specify a custom starting point.
//
// SyncFromHash has higher priority than SyncFromHeight.
SyncFromHash string
// SyncFromHeight is the height of the header from which Syncer should start syncing.
// Zero value to disable. Value updates up and down the chain are gracefully handled by Syncer.
//
// By default, Syncer maintains PruningWindow number of headers. SyncFromHeight overrides this default,
// allowing any user to specify a custom starting point.
//
// SyncFromHeight has lower priority than SyncFromHash.
SyncFromHeight uint64
Store
store.Store.DeleteTo
method (#275)store.Store.OnDelete
method, which allows users to register individual header deletion handlers. This will enable users to execute farewell logic when headers are removed, e.g., cleanup data committed in the header but stored separately. (#320)- Unsafe store recovery tools (#325)
Breaks
store.Store.Init
andstore.Init
were removed. Initialization is now performed lazily using the first header given tostore.Append
(#274)
What's Changed
- chore(CODEOWNERS): remove @cristaloleg by @cristaloleg in #288
- chore(sync): improve bifurcation logs by @Wondertan in #291
- Pruning Meta PR by @Wondertan in #292
- fix(store): support intermittent writes for batch by @Wondertan in #296
- fix(store): Tail aware HasAt by @Wondertan in #298
- fix(sync): move tail only if head changes by @Wondertan in #293
- chore: bump deps by @Wondertan in #299
- chore: bump libp2p by @Wondertan in #300
- fix(syncer): check tail hash via len by @Wondertan in #309
- fix(headertest): correctly initialize Tail by @Wondertan in #308
- feat(store)!: OnDelete method by @Wondertan in #304
- chore(store|sync): error wrappings by @Wondertan in #310
- fix(test): fix minor race in tests by @Wondertan in #314
- fix(sync): stall headersub until Syncer has started by @Wondertan in #317
- fix(syncer): fix time comparison and improve estimation accuraccy by @Wondertan in #319
- fix(sync): prevent concurrent tail movements by @Wondertan in #313
- refactor(sync)!:
SyncFromHash
as string by @Wondertan in #311 - chore(syncer): improved logging by @Wondertan in #315
- perf(store): almost readless parallel deletes by @Wondertan in #320
- fix(store): stop long receding/advancing on Stop by @Wondertan in #326
- misc(store): various fixes and chores by @Wondertan in #330
- perf(store): pass batch through context by @Wondertan in #328
- feat(store): allow partial init by @Wondertan in #327
- fix(sync): subj init death loop by @Wondertan in #324
- fix(sync): allow estimation errors by @Wondertan in #329
- perf(store): batch reads by @Wondertan in #331
- feat(store): store recovery tools by @Wondertan in #325
Full Changelog: v0.6.5...v0.7.0