Skip to content

Commit

Permalink
Merkle root is 32 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
markspanbroek committed Nov 22, 2023
1 parent efafa43 commit b625f0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contracts/Requests.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit b625f0d

Please sign in to comment.