Skip to content

Commit 44d14e5

Browse files
committed
This is working
1 parent 64d271c commit 44d14e5

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

ProjectPlugins/CodexContractsPlugin/CodexContractsAccess.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ public ulong GetPeriodNumber(DateTime utc)
146146

147147
public void WaitUntilNextPeriod()
148148
{
149-
log.Log("Waiting until next proof period...");
150149
var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
151150
var periodSeconds = (int)Deployment.Config.Proofs.Period;
152151
var secondsLeft = now % periodSeconds;

ProjectPlugins/CodexContractsPlugin/Marketplace/Marketplace.cs

Lines changed: 12 additions & 1 deletion
Large diffs are not rendered by default.

ProjectPlugins/CodexPlugin/CodexDockerImage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class CodexDockerImage
44
{
5-
private const string DefaultDockerImage = "codexstorage/nim-codex:0.2.3-dist-tests";
5+
private const string DefaultDockerImage = "codexstorage/nim-codex:sha-2e1306a-dist-tests";
66

77
public static string Override { get; set; } = string.Empty;
88

Tests/CodexReleaseTests/MarketTests/FailTest.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ namespace CodexReleaseTests.MarketTests
88
public class FailTest : MarketplaceAutoBootstrapDistTest
99
{
1010
protected override int NumberOfHosts => 4;
11+
private readonly int SlotTolerance;
1112
protected override int NumberOfClients => 1;
1213
protected override ByteSize HostAvailabilitySize => 1.GB();
1314
protected override TimeSpan HostAvailabilityMaxDuration => TimeSpan.FromDays(1.0);
1415

15-
[Ignore("Slots are never freed because proofs are never marked as missing. Issue: https://github.com/codex-storage/nim-codex/issues/1153")]
16+
public FailTest()
17+
{
18+
SlotTolerance = NumberOfHosts / 2;
19+
}
20+
1621
[Test]
1722
[Combinatorial]
1823
public void Fail(
@@ -50,7 +55,8 @@ private void WaitForSlotFreedEvents()
5055
{
5156
var events = GetContracts().GetEvents(GetTestRunTimeRange());
5257
var slotFreed = events.GetSlotFreedEvents();
53-
if (slotFreed.Length == NumberOfHosts)
58+
Log($"SlotFreed events: {slotFreed.Length} - Expected: {SlotTolerance}");
59+
if (slotFreed.Length > SlotTolerance)
5460
{
5561
Log($"{nameof(WaitForSlotFreedEvents)} took {Time.FormatDuration(DateTime.UtcNow - start)}");
5662
return;
@@ -68,7 +74,7 @@ private IStoragePurchaseContract CreateStorageRequest(ICodexNode client)
6874
Duration = HostAvailabilityMaxDuration / 2,
6975
Expiry = TimeSpan.FromMinutes(5.0),
7076
MinRequiredNumberOfNodes = (uint)NumberOfHosts,
71-
NodeFailureTolerance = (uint)(NumberOfHosts / 2),
77+
NodeFailureTolerance = (uint)SlotTolerance,
7278
PricePerBytePerSecond = 100.TstWei(),
7379
ProofProbability = 1, // Require a proof every period
7480
CollateralPerByte = 1.TstWei()

0 commit comments

Comments
 (0)