Skip to content

Allow constructing partial structs from a known root #1966

@igamigo

Description

@igamigo

Today a partial structure (map or vault) effectively needs at least one SMT proof to exist. In the miden-base tests that use lazy loading, partial structs are created by minimizing a full object and keeping a proof by opening the empty value, which preserves the SMT root. This makes it impossible to start from just the root when you do not have any proofs yet.

We should add APIs to instantiate PartialStorageMap and PartialVault from a known SMT root with no proofs loaded, for supporting workflows where we only know the roots at start time and fetch proofs lazily (although I think in the future we'd always want to add at least the fee token proof for the vault specifically).

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions