Component: storage
The storage component manages the storage of accounts and requests, verifying their Merkle proofs against the root of each storage. It executes the state-transition function and updates the storage roots accordingly.
Inputs
storage (Vec<ContractStorage>)
: A vector ofContractStorage
objects, which represent the storage data for the accounts and requests.
state_root (B256)
: The root of the storage state, which is used to verify the integrity of the storage data.
Outputs
proof_outputs (StorageProofOutputs)
: The output of the storage program, which contains the state root and the storage slots with their proofs. It is later passed as an argument to theupdateStorageSlot
function in the SP1Helios contract.
Expected behavior
Invoke the
verify_storage_slot_proofs
function to verify the proofs of the storage slots.Verify the contract's account node in the global MPT.
Verify the storage slots against the contract's storage root.
Generate the
StorageProofOutputs
with the verified state root and storage slots.