integration: remove origDatasetSizeInBlocks

This commit is contained in:
Mark Spanbroek 2024-02-27 11:54:14 +01:00
parent 59a4f648de
commit b4662b0b69
No known key found for this signature in database
GPG Key ID: FBE3E9548D427C00
3 changed files with 8 additions and 18 deletions

View File

@ -60,12 +60,6 @@ template marketplacesuite*(name: string, body: untyped) =
maxCollateral=200.u256
)
proc validateRequest(nodes, tolerance, origDatasetSizeInBlocks: int) =
if nodes > 1:
doAssert(origDatasetSizeInBlocks >= 3,
"dataset size must be greater than or equal to 3 blocks with " &
"more than one node")
proc requestStorage(client: CodexClient,
cid: Cid,
proofProbability = 3,
@ -74,10 +68,7 @@ template marketplacesuite*(name: string, body: untyped) =
collateral = 100.u256,
expiry: uint64 = 4.periods,
nodes = providers().len,
tolerance = 0,
origDatasetSizeInBlocks: int): Future[PurchaseId] {.async.} =
validateRequest(nodes, tolerance, origDatasetSizeInBlocks)
tolerance = 0): Future[PurchaseId] {.async.} =
let expiry = (await ethProvider.currentTime()) + expiry.u256

View File

@ -63,8 +63,7 @@ marketplacesuite "Marketplace payouts":
expiry=expiry,
collateral=collateral,
nodes=5,
tolerance=1,
origDatasetSizeInBlocks=datasetSizeInBlocks
tolerance=1
)
# wait until one slot is filled

View File

@ -46,8 +46,8 @@ marketplacesuite "Hosts submit regular proofs":
let purchaseId = await client0.requestStorage(
cid,
duration=totalPeriods.periods,
origDatasetSizeInBlocks = datasetSizeInBlocks)
duration=duration
)
check eventually client0.purchaseStateIs(purchaseId, "started")
var proofWasSubmitted = false
@ -106,8 +106,8 @@ marketplacesuite "Simulate invalid proofs":
let purchaseId = await client0.requestStorage(
cid,
duration=totalPeriods.periods,
origDatasetSizeInBlocks=datasetSizeInBlocks)
duration=totalPeriods.periods
)
let requestId = client0.requestId(purchaseId).get
check eventually client0.purchaseStateIs(purchaseId, "started")
@ -162,8 +162,8 @@ marketplacesuite "Simulate invalid proofs":
let purchaseId = await client0.requestStorage(
cid,
duration=totalPeriods.periods,
origDatasetSizeInBlocks=datasetSizeInBlocks)
duration=totalPeriods.periods
)
let requestId = client0.requestId(purchaseId).get
check eventually client0.purchaseStateIs(purchaseId, "started")