From a51e769b59bec60556ce1bc317d665843621ef03 Mon Sep 17 00:00:00 2001 From: Rachel Bousfield Date: Mon, 29 Apr 2024 23:57:47 -0600 Subject: [PATCH] add extra hash (more powerful than just wasm) --- src/state/Deserialize.sol | 3 +++ src/state/Module.sol | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/state/Deserialize.sol b/src/state/Deserialize.sol index 04596a4f..7ff2cfad 100644 --- a/src/state/Deserialize.sol +++ b/src/state/Deserialize.sol @@ -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 }); } diff --git a/src/state/Module.sol b/src/state/Module.sol index dc4776c7..07630067 100644 --- a/src/state/Module.sol +++ b/src/state/Module.sol @@ -11,6 +11,7 @@ struct Module { ModuleMemory moduleMemory; bytes32 tablesMerkleRoot; bytes32 functionsMerkleRoot; + bytes32 extraHash; uint32 internalsOffset; } @@ -26,6 +27,7 @@ library ModuleLib { mod.moduleMemory.hash(), mod.tablesMerkleRoot, mod.functionsMerkleRoot, + mod.extraHash, mod.internalsOffset ) );