Timeout fast when previous phase failed
MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -169,6 +169,9 @@ public partial class Arena : PeriodicRunner
}
else
{
+ round.OutputRegistrationTimeFrame = TimeFrame.Create(Config.FailFastOutputRegistrationTimeout);
+ round.TransactionSigningTimeFrame = TimeFrame.Create(Config.FailFastTransactionSigningTimeout);
+
// Cliens misbehave when they don't confirm everything.
if (round is BlameRound)
{
@@ -197,8 +200,9 @@ public partial class Arena : PeriodicRunner
try
{
var allReady = round.Alices.All(a => a.ReadyToSign);
+ bool phaseExpired = round.OutputRegistrationTimeFrame.HasExpired(Phase.OutputRegistration);
- if (allReady || round.OutputRegistrationTimeFrame.HasExpired(Phase.OutputRegistration))
+ if (allReady || phaseExpired)
{
var coinjoin = round.Assert<ConstructionState>();
@@ -212,6 +216,11 @@ public partial class Arena : PeriodicRunner
round.CoinjoinState = coinjoin.Finalize();
+ if (!allReady && phaseExpired)
+ {
+ round.TransactionSigningTimeFrame = TimeFrame.Create(Config.FailFastTransactionSigningTimeout);
+ }
+
round.SetPhase(Phase.TransactionSigning);
}
}

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
@@ -60,8 +60,8 @@ public class Round
public Phase Phase { get; private set; } = Phase.InputRegistration;
public TimeFrame InputRegistrationTimeFrame { get; internal set; }
public TimeFrame ConnectionConfirmationTimeFrame { get; private set; }
- public TimeFrame OutputRegistrationTimeFrame { get; private set; }
- public TimeFrame TransactionSigningTimeFrame { get; private set; }
+ public TimeFrame OutputRegistrationTimeFrame { get; set; }
+ public TimeFrame TransactionSigningTimeFrame { get; set; }
public DateTimeOffset End { get; private set; }
public EndRoundState EndRoundState { get; set; }
public int RemainingInputVsizeAllocation => Parameters.InitialInputVsizeAllocation - (InputCount * Parameters.MaxVsizeAllocationPerAlice);

MODIFY
WalletWasabi/WabiSabi/Backend/WabiSabiConfig.cs
WalletWasabi/WabiSabi/Backend/WabiSabiConfig.cs
@@ -70,6 +70,14 @@ public class WabiSabiConfig : ConfigBase
[JsonProperty(PropertyName = "TransactionSigningTimeout", DefaultValueHandling = DefaultValueHandling.Populate)]
public TimeSpan TransactionSigningTimeout { get; set; } = TimeSpan.FromMinutes(1);
+ [DefaultValueTimeSpan("0d 0h 3m 0s")]
+ [JsonProperty(PropertyName = "FailFastOutputRegistrationTimeout", DefaultValueHandling = DefaultValueHandling.Populate)]
+ public TimeSpan FailFastOutputRegistrationTimeout { get; set; } = TimeSpan.FromMinutes(3);
+
+ [DefaultValueTimeSpan("0d 0h 1m 0s")]
+ [JsonProperty(PropertyName = "FailFastTransactionSigningTimeout", DefaultValueHandling = DefaultValueHandling.Populate)]
+ public TimeSpan FailFastTransactionSigningTimeout { get; set; } = TimeSpan.FromMinutes(1);
+
[DefaultValueTimeSpan("0d 0h 5m 0s")]
[JsonProperty(PropertyName = "RoundExpiryTimeout", DefaultValueHandling = DefaultValueHandling.Populate)]
public TimeSpan RoundExpiryTimeout { get; set; } = TimeSpan.FromMinutes(5);

Timeout fast when previous phase failed