Documentation
¶
Index ¶
- func Load(ctx context.Context, cfg *config.Config, logger *slog.Logger, ...) error
- func LoadWithDB(ctx context.Context, cfg *config.Config, logger *slog.Logger, ...) error
- func Run(cfg *config.Config, logger *slog.Logger) error
- func WithBulkLoadPragmas(db *database.Database, logger *slog.Logger) func()
- type Backfill
- type LoadBlobsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadWithDB ¶ added in v0.22.0
func LoadWithDB( ctx context.Context, cfg *config.Config, logger *slog.Logger, immutableDir string, db *database.Database, ) error
LoadWithDB loads immutable DB blocks into the chain. If db is nil, a new database connection is opened (and closed on return).
func WithBulkLoadPragmas ¶ added in v0.22.0
WithBulkLoadPragmas enables bulk-load optimizations on the metadata store if it implements BulkLoadOptimizer. The returned cleanup function restores normal pragmas and must be deferred by the caller.
Types ¶
type Backfill ¶ added in v0.22.0
type Backfill struct {
// contains filtered or unexported fields
}
Backfill replays stored blocks to populate historical metadata. It is triggered automatically during Mithril sync when storageMode is "api".
func NewBackfill ¶ added in v0.22.0
func NewBackfill( db *database.Database, nodeCfg *cardano.CardanoNodeConfig, logger *slog.Logger, ) *Backfill
NewBackfill creates a new Backfill instance.
func (*Backfill) NeedsBackfill ¶ added in v0.22.0
NeedsBackfill checks if there's an incomplete backfill checkpoint. Returns true only when a checkpoint exists and is not yet completed.
type LoadBlobsResult ¶ added in v0.22.0
LoadBlobsResult contains the result of a blob-only ImmutableDB load.
func LoadBlobsWithDB ¶ added in v0.22.0
func LoadBlobsWithDB( ctx context.Context, cfg *config.Config, logger *slog.Logger, immutableDir string, db *database.Database, ) (*LoadBlobsResult, error)
LoadBlobsWithDB copies blocks from an ImmutableDB directory into the blob store without starting the ledger processing pipeline. This is used after a Mithril snapshot import where the ledger state has already been loaded from the snapshot. Returns the number of blocks copied and the immutable tip slot so the caller can update the metadata tip to match.