BAMFS
Protocol

Cross-chain

Telling one chain that a BAMFS root exists on another. Designed and tested, not shipped.

Not shipped. Nothing here runs in production. CrossChainRegistry is deployed on Base Sepolia and covered by tests, but no bridge adapter has been wired to a real bridge and nothing is deployed on Base. Treat this page as a design record.

BAMFS is per-chain by default: a root CID — directory or single file — exists only on the chain where it was written. Two mechanisms are designed to tell other chains that a given root exists somewhere.

Proof of IPFS-CID parity

A root's canonical IPFS CID is derived on the source chain by IpfsCidResolver. The same derivation is re-executed inside a zero-knowledge guest, and the resulting proof is verified on the destination chain:

source chain                        destination chain
┌────────────────────┐   prover    ┌───────────────────┐
│ IpfsCidResolver    │ ──────────▶ │ IpfsCidVerifier   │
│ computes IPFS CID  │   proof     │ └─ IZkVerifier    │
└────────────────────┘             └───────────────────┘

IpfsCidVerifier.verifyAndStore(rootCid, sourceChainId, ipfsCid, proof) delegates to its verifier, then ABI-decodes the returned journal — the public outputs the guest committed to — and asserts every field matches the call arguments before recording anything. A host cannot forge any of the three values without producing a journal that fails that decode.

See ZK proofs for the proving stack.

Bridge-authenticated existence claims

Where a canonical bridge already exists, CrossChainRegistry records (cid, sourceChainId) on the destination chain on the authority of an IBridgeAdapter. This trusts the bridge; the ZK path does not. It is the cheaper option where that trust is already assumed.

Kind-agnostic by design

Both surfaces work identically for directory roots and single-file roots. The guest dispatches on a tagged Directory | File input internally, but no kind flag is recorded on the destination chain — (rootCid, sourceChainId) already pins down exactly one kind, resolvable on the source chain through DirectoryStore or FileStore.

The content layer is the authority on what a root is, whether or not a project token points at it.

What a destination chain does and does not learn

A verified record says: this root, on that chain, resolves to this IPFS CID.

It does not make the bytes readable on the destination chain. Nothing is mirrored. Resolving the content still means reading the source chain or fetching the IPFS CID from a node that holds it.

On this page