Skip to content

nooschain v0.1.0


nooschain / snapshots/snapshot-archive / importSnapshotArchive

Function: importSnapshotArchive()

importSnapshotArchive(db, archivePath, options): Promise<{ archive: { staging: Record<string, { copyMs: number; rows: number; stagingTable: string; }>; }; checkpointId: string; height: string; rowsImported: Partial<Record<"state_leaves" | SnapshotTableName, number>>; snapshotHash: string; stateRoot: string; timingsMs: { archiveCopyByTableMs: Partial<Record<"state_leaves" | SnapshotTableName, number>>; archiveCopyToStagingMs: number; archiveVerifyMs: number; finalizeByTableMs: Partial<Record<"state_leaves" | SnapshotTableName, number>>; finalizeTablesMs: number; importTablesMs: number; rebuildSmtMs: number; recordIndexConstraintCreateMs: number; recordIndexConstraintDropMs: number; recordIndexConstraintsDropped: string[]; recordIndexCreateMs: number; recordIndexDropMs: number; recordIndexRebuildMs: number; stateLeafCopyMs: number; stateLeafMaterializeMs: number; totalMs: number; verifyMs: number; }; }>

Defined in: snapshots/snapshot-archive.ts:802

Parameters

db

Kysely<Database>

archivePath

string

options

SnapshotImportOptions & object

Returns

Promise<{ archive: { staging: Record<string, { copyMs: number; rows: number; stagingTable: string; }>; }; checkpointId: string; height: string; rowsImported: Partial<Record<"state_leaves" | SnapshotTableName, number>>; snapshotHash: string; stateRoot: string; timingsMs: { archiveCopyByTableMs: Partial<Record<"state_leaves" | SnapshotTableName, number>>; archiveCopyToStagingMs: number; archiveVerifyMs: number; finalizeByTableMs: Partial<Record<"state_leaves" | SnapshotTableName, number>>; finalizeTablesMs: number; importTablesMs: number; rebuildSmtMs: number; recordIndexConstraintCreateMs: number; recordIndexConstraintDropMs: number; recordIndexConstraintsDropped: string[]; recordIndexCreateMs: number; recordIndexDropMs: number; recordIndexRebuildMs: number; stateLeafCopyMs: number; stateLeafMaterializeMs: number; totalMs: number; verifyMs: number; }; }>

Audience-first NOOSChain documentation.