Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
add extra hash (more powerful than just wasm)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-bousfield committed Apr 30, 2024
1 parent 707e3d4 commit a51e769
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/state/Deserialize.sol
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,20 @@ library Deserialize {
ModuleMemory memory mem;
bytes32 tablesMerkleRoot;
bytes32 functionsMerkleRoot;
bytes32 extraHash;
uint32 internalsOffset;
(globalsMerkleRoot, offset) = b32(proof, offset);
(mem, offset) = moduleMemory(proof, offset);
(tablesMerkleRoot, offset) = b32(proof, offset);
(functionsMerkleRoot, offset) = b32(proof, offset);
(extraHash, offset) = b32(proof, offset);
(internalsOffset, offset) = u32(proof, offset);
mod = Module({
globalsMerkleRoot: globalsMerkleRoot,
moduleMemory: mem,
tablesMerkleRoot: tablesMerkleRoot,
functionsMerkleRoot: functionsMerkleRoot,
extraHash: extraHash,
internalsOffset: internalsOffset
});
}
Expand Down
2 changes: 2 additions & 0 deletions src/state/Module.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct Module {
ModuleMemory moduleMemory;
bytes32 tablesMerkleRoot;
bytes32 functionsMerkleRoot;
bytes32 extraHash;
uint32 internalsOffset;
}

Expand All @@ -26,6 +27,7 @@ library ModuleLib {
mod.moduleMemory.hash(),
mod.tablesMerkleRoot,
mod.functionsMerkleRoot,
mod.extraHash,
mod.internalsOffset
)
);
Expand Down

0 comments on commit a51e769

Please sign in to comment.