[marketplace] Remove nodeId from Request
No longer needed now that we have slots.
This commit is contained in:
parent
9a76c04d45
commit
b3fededbad
|
@ -135,7 +135,6 @@ contract Marketplace is Collateral, Proofs {
|
||||||
struct Erasure {
|
struct Erasure {
|
||||||
uint64 totalChunks; // the total number of chunks in the larger data set
|
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 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 {
|
struct PoR {
|
||||||
|
|
|
@ -15,7 +15,6 @@ const exampleRequest = () => ({
|
||||||
erasure: {
|
erasure: {
|
||||||
totalChunks: 12,
|
totalChunks: 12,
|
||||||
totalNodes: 4,
|
totalNodes: 4,
|
||||||
nodeId: 3,
|
|
||||||
},
|
},
|
||||||
por: {
|
por: {
|
||||||
u: Array.from(randomBytes(480)),
|
u: Array.from(randomBytes(480)),
|
||||||
|
|
|
@ -3,7 +3,7 @@ const { keccak256, defaultAbiCoder } = ethers.utils
|
||||||
|
|
||||||
function requestId(request) {
|
function requestId(request) {
|
||||||
const Ask = "tuple(uint256, uint256, uint256, uint256)"
|
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 PoR = "tuple(bytes, bytes, bytes)"
|
||||||
const Content = "tuple(string, " + Erasure + ", " + PoR + ")"
|
const Content = "tuple(string, " + Erasure + ", " + PoR + ")"
|
||||||
const Request =
|
const Request =
|
||||||
|
@ -16,7 +16,7 @@ function askToArray(ask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function erasureToArray(erasure) {
|
function erasureToArray(erasure) {
|
||||||
return [erasure.totalChunks, erasure.totalNodes, erasure.nodeId]
|
return [erasure.totalChunks, erasure.totalNodes]
|
||||||
}
|
}
|
||||||
|
|
||||||
function porToArray(por) {
|
function porToArray(por) {
|
||||||
|
|
Loading…
Reference in New Issue