Marketplace test fails: submitted proof is invalid.
This commit is contained in:
parent
f757e64ba4
commit
32f56e8213
|
@ -9,8 +9,7 @@ namespace CodexPlugin
|
||||||
{
|
{
|
||||||
private readonly MarketplaceStarter marketplaceStarter = new MarketplaceStarter();
|
private readonly MarketplaceStarter marketplaceStarter = new MarketplaceStarter();
|
||||||
|
|
||||||
private const string DefaultDockerImage = "thatbenbierens/nim-codex:prover2";
|
private const string DefaultDockerImage = "codexstorage/nim-codex:sha-ba0e7d9-dist-tests";
|
||||||
//"codexstorage/nim-codex:latest-dist-tests";
|
|
||||||
public const string ApiPortTag = "codex_api_port";
|
public const string ApiPortTag = "codex_api_port";
|
||||||
public const string ListenPortTag = "codex_listen_port";
|
public const string ListenPortTag = "codex_listen_port";
|
||||||
public const string MetricsPortTag = "codex_metrics_port";
|
public const string MetricsPortTag = "codex_metrics_port";
|
||||||
|
|
|
@ -181,17 +181,6 @@ namespace CodexPlugin
|
||||||
WaitForStorageContractState(timeout, "finished");
|
WaitForStorageContractState(timeout, "finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Wait for contract to start. Max timeout depends on contract filesize. Allows more time for larger files.
|
|
||||||
/// </summary>
|
|
||||||
public void WaitForStorageContractStarted(ByteSize contractFileSize)
|
|
||||||
{
|
|
||||||
var filesizeInMb = contractFileSize.SizeInBytes / (1024 * 1024);
|
|
||||||
var maxWaitTime = TimeSpan.FromSeconds(filesizeInMb * 10.0);
|
|
||||||
|
|
||||||
WaitForStorageContractStarted(maxWaitTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void WaitForStorageContractStarted(TimeSpan timeout)
|
public void WaitForStorageContractStarted(TimeSpan timeout)
|
||||||
{
|
{
|
||||||
WaitForStorageContractState(timeout, "started");
|
WaitForStorageContractState(timeout, "started");
|
||||||
|
|
|
@ -66,8 +66,7 @@ namespace CodexTests.BasicTests
|
||||||
.WithStorageQuota(11.GB())
|
.WithStorageQuota(11.GB())
|
||||||
.EnableMarketplace(geth, contracts, initialEth: 10.Eth(), initialTokens: sellerInitialBalance, s => s
|
.EnableMarketplace(geth, contracts, initialEth: 10.Eth(), initialTokens: sellerInitialBalance, s => s
|
||||||
.AsStorageNode()
|
.AsStorageNode()
|
||||||
.AsValidator())
|
.AsValidator()));
|
||||||
.WithSimulateProofFailures(failEveryNProofs: 3));
|
|
||||||
|
|
||||||
AssertBalance(contracts, seller, Is.EqualTo(sellerInitialBalance));
|
AssertBalance(contracts, seller, Is.EqualTo(sellerInitialBalance));
|
||||||
seller.Marketplace.MakeStorageAvailable(
|
seller.Marketplace.MakeStorageAvailable(
|
||||||
|
@ -91,9 +90,10 @@ namespace CodexTests.BasicTests
|
||||||
requiredCollateral: 10.TestTokens(),
|
requiredCollateral: 10.TestTokens(),
|
||||||
minRequiredNumberOfNodes: 1,
|
minRequiredNumberOfNodes: 1,
|
||||||
proofProbability: 5,
|
proofProbability: 5,
|
||||||
duration: TimeSpan.FromMinutes(5));
|
duration: TimeSpan.FromMinutes(5),
|
||||||
|
expiry: TimeSpan.FromMinutes(4));
|
||||||
|
|
||||||
purchaseContract.WaitForStorageContractStarted(fileSize);
|
purchaseContract.WaitForStorageContractStarted(TimeSpan.FromMinutes(4));
|
||||||
|
|
||||||
AssertBalance(contracts, seller, Is.LessThan(sellerInitialBalance), "Collateral was not placed.");
|
AssertBalance(contracts, seller, Is.LessThan(sellerInitialBalance), "Collateral was not placed.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue