[marketplace] Remove nodeId from Request

No longer needed now that we have slots.
This commit is contained in:
Mark Spanbroek 2022-07-20 10:36:22 +02:00 committed by markspanbroek
parent 9a76c04d45
commit b3fededbad
3 changed files with 2 additions and 4 deletions

View File

@ -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 {

View File

@ -15,7 +15,6 @@ const exampleRequest = () => ({
erasure: {
totalChunks: 12,
totalNodes: 4,
nodeId: 3,
},
por: {
u: Array.from(randomBytes(480)),

View File

@ -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) {