From b3fededbad7c7b7c962ffc2343eb86df9dc87171 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 20 Jul 2022 10:36:22 +0200 Subject: [PATCH] [marketplace] Remove nodeId from Request No longer needed now that we have slots. --- contracts/Marketplace.sol | 1 - test/examples.js | 1 - test/ids.js | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index 51f8420..461d4f5 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -135,7 +135,6 @@ contract Marketplace is Collateral, Proofs { struct Erasure { uint64 totalChunks; // the total number of chunks in the larger data set uint64 totalNodes; // the total number of nodes that store the data set - uint64 nodeId; // index of this node in the list of total nodes } struct PoR { diff --git a/test/examples.js b/test/examples.js index 1e88077..4bf224e 100644 --- a/test/examples.js +++ b/test/examples.js @@ -15,7 +15,6 @@ const exampleRequest = () => ({ erasure: { totalChunks: 12, totalNodes: 4, - nodeId: 3, }, por: { u: Array.from(randomBytes(480)), diff --git a/test/ids.js b/test/ids.js index cbd8395..1125554 100644 --- a/test/ids.js +++ b/test/ids.js @@ -3,7 +3,7 @@ const { keccak256, defaultAbiCoder } = ethers.utils function requestId(request) { const Ask = "tuple(uint256, uint256, uint256, uint256)" - const Erasure = "tuple(uint64, uint64, uint64)" + const Erasure = "tuple(uint64, uint64)" const PoR = "tuple(bytes, bytes, bytes)" const Content = "tuple(string, " + Erasure + ", " + PoR + ")" const Request = @@ -16,7 +16,7 @@ function askToArray(ask) { } function erasureToArray(erasure) { - return [erasure.totalChunks, erasure.totalNodes, erasure.nodeId] + return [erasure.totalChunks, erasure.totalNodes] } function porToArray(por) {