Inventory
Production AkashaKV stores already exist for compute, NFT, governance, Tower finality, labor, usernames, GAL, DEX, Nova, contracts, and recovery. The remaining RocksDB surfaces are limited to the legacy block/archive store and thesigil-blockstore-repair repair/import binary.
RocksDB is not a production runtime backend. It may be opened only by binaries built with the legacy-rocksdb-import feature, and only as a legacy read source for migration or repair.
Old layout
Legacy nodes used:data/blocks/: RocksDB block/archive store, including height and hash indexes.- Domain stores (
compute/,nft/,tower/,labor/,username/,gal/,dex/,nova/,contracts/,recovery/): already AkashaKV-backed in current Sigil. - Snapshot payloads could contain
data/blocks/on old archives.
New layout
Fresh and migrated nodes use:data/akashakv/: production block, transaction, receipt, archive query, and migration metadata store.data/weft/: local off-chain Weft artifact store containing canonical manifests, chunks, and availability advertisements.- Existing domain AkashaKV directories remain authoritative for compute, NFT, governance, Tower, labor, usernames, GAL, DEX, Nova, contracts, and recovery.
- Snapshot payloads must contain
data/akashakv/and verify the restored block at the manifest height.
| Prefix | Contents |
|---|---|
blocks/by-height | Canonical block bodies indexed by height. |
blocks/by-hash | Block hash → height lookup. |
tx/by-hash | Transaction envelope storage. |
tx/by-height-index | Per-block transaction index. |
receipts/by-tx | Per-transaction receipts. |
receipts/by-block | Per-block receipts roll-up. |
state/* | Per-partition state (account, nonce, validator, system-contract, dex, labor, compute, nova, username, gal). |
finality/tower | Tower epoch lock state. |
governance/proposal | Governance proposals and votes. |
metadata/migration | Migration manifest and provenance. |
A cannot alias key A+B.
Startup migration
On node boot:- Acquire
data/.akashakv-migration.lock. - If
data/akashakv/exists, validate the migration manifest before serving. - If incomplete
data/akashakv.staging/exists, delete it and restart migration. - If legacy
data/blocks/looks like RocksDB and no final AkashaKV directory exists:- Production binaries fail closed and instruct the operator to use a
legacy-rocksdb-importbuild. - Importer builds open RocksDB read-only, stream records in height order, write AkashaKV staging, flush, verify every copied block by height and hash index from the AkashaKV target, write
migration-manifest.json, and atomically rename staging todata/akashakv/.
- Production binaries fail closed and instruct the operator to use a
- Fresh nodes create
data/akashakv/directly and never createdata/blocks/.
from_backend, to_backend, source height/hash/root, migrated root, AkashaKV revision, timestamps, and migration tool version.
The legacy importer migrates the production block/archive store only. It verifies block bytes, hash indexes, latest height, and the latest block header state root after the AkashaKV write. If an operator has a custom RocksDB state table outside data/blocks/, that table requires an explicit importer before upgrade.
Rollback and crash behaviour
- Legacy RocksDB data is never mutated or deleted by migration.
- If verification fails, startup fails and only incomplete AkashaKV staging is removed.
- If staging exists without a completed manifest, staging is deleted and migration restarts.
- If a completed manifest exists but the final AkashaKV directory is missing, startup fails closed.
- If a manifest source root differs from migrated root, startup fails closed.
- Validators must not sign until storage verification completes.
Weave model
Weave is Sigil’s off-chain artifact and evidence layer; it is not consensus state. Sigil stores only commitments:- Weave CID / content id.
- BLAKE3 hash.
- Byte length.
- Media type.
- Schema.
- Producer DID.
- Signature.
- Created height.
Weft for large artifacts
Weft is the Weave large-blob model for sharded artifact distribution. Sigil commits to canonical Weft manifest bytes withArtifactCommitment and can attach a typed WeftRootCommitment containing the Weft Merkle root, chunk size, chunk count, payload length, and manifest CID.
The production node wires an executable local Weft store at data/weft/:
manifests/<root>.jsonchunks/<chunk-id>.binadvertisements/<root>.json
sigil_weftPublish, sigil_weftPublishFile, sigil_weftFetch, sigil_weftFetchFile, sigil_weftStatus. Each verifies BLAKE3 hash, byte length, and Merkle root before returning bytes.
A DHT-compatible adapter ships under the dht feature with record keys:
/weft/v1/manifest/<root>/weft/v1/chunk/<chunk-id>/weft/v1/availability/<root>
Operator checks
Pre-upgrade verification
Run these tests before upgrading canary or mainnet validators:Upgrade procedure
- Back up the full data directory and current binary.
- Deploy a production binary without
legacy-rocksdb-importto fresh AkashaKV nodes. - For upgraded legacy nodes, run the importer build once (or deploy an importer image), let startup complete migration, and verify
sigil_getStorageStatus. - Replace the importer binary with the normal production binary.
- Confirm
backend = akashakv,migration_status = verified, and the latest verified height/root match the finalised block header. - Only then allow validators to sign.