From b625f0d519abc9b84cf759868779daa56ceb28c8 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 22 Nov 2023 12:47:31 +0100 Subject: [PATCH] Merkle root is 32 bytes --- contracts/Requests.sol | 2 +- test/ids.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/Requests.sol b/contracts/Requests.sol index 6a96ba3..40a1385 100644 --- a/contracts/Requests.sol +++ b/contracts/Requests.sol @@ -24,7 +24,7 @@ struct Ask { struct Content { string cid; // content id, used to download the dataset - bytes merkleRoot; // merkle root of the dataset, used to verify storage proofs + bytes32 merkleRoot; // merkle root of the dataset, used to verify storage proofs } enum RequestState { diff --git a/test/ids.js b/test/ids.js index 78bdaad..5ef1220 100644 --- a/test/ids.js +++ b/test/ids.js @@ -3,7 +3,7 @@ const { keccak256, defaultAbiCoder } = ethers.utils function requestId(request) { const Ask = "tuple(int64, uint256, uint256, uint256, uint256, uint256, int64)" - const Content = "tuple(string, bytes)" + const Content = "tuple(string, bytes32)" const Request = "tuple(address, " + Ask + ", " + Content + ", uint256, bytes32)" return keccak256(defaultAbiCoder.encode([Request], requestToArray(request)))