Round hash commits to timeouts
MODIFY
WalletWasabi/Crypto/StrobeProtocol/StrobeHasher.cs
WalletWasabi/Crypto/StrobeProtocol/StrobeHasher.cs
@@ -23,6 +23,9 @@ namespace WalletWasabi.Crypto.StrobeProtocol
public StrobeHasher Append(string fieldName, IBitcoinSerializable serializable)
=> Append(fieldName, serializable.ToBytes());
+ public StrobeHasher Append(string fieldName, TimeSpan time)
+ => Append(fieldName, time.Ticks);
+
public StrobeHasher Append(string fieldName, Money money)
=> Append(fieldName, money.Satoshi);

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
@@ -52,6 +52,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
public bool IsBlameRound => RoundParameters.IsBlameRound;
public ISet<OutPoint> BlameWhitelist => RoundParameters.BlameWhitelist;
+ public TimeSpan InputRegistrationTimeout => IsBlameRound ? RoundParameters.BlameInputRegistrationTimeout : RoundParameters.StandardInputRegistrationTimeout;
public TimeSpan ConnectionConfirmationTimeout => RoundParameters.ConnectionConfirmationTimeout;
public TimeSpan OutputRegistrationTimeout => RoundParameters.OutputRegistrationTimeout;
public TimeSpan TransactionSigningTimeout => RoundParameters.TransactionSigningTimeout;
@@ -141,6 +142,10 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
private uint256 CalculateHash()
=> StrobeHasher.Create(ProtocolConstants.RoundStrobeDomain)
+ .Append(ProtocolConstants.RoundInputRegistrationTimeoutStrobeLabel, InputRegistrationTimeout)
+ .Append(ProtocolConstants.RoundConnectionConfirmationTimeoutStrobeLabel, ConnectionConfirmationTimeout)
+ .Append(ProtocolConstants.RoundOutputRegistrationTimeoutStrobeLabel, OutputRegistrationTimeout)
+ .Append(ProtocolConstants.RoundTransactionSigningTimeoutStrobeLabel, TransactionSigningTimeout)
.Append(ProtocolConstants.RoundMinRegistrableAmountStrobeLabel, MinRegistrableAmount)
.Append(ProtocolConstants.RoundMaxRegistrableAmountStrobeLabel, MaxRegistrableAmount)
.Append(ProtocolConstants.RoundMaxRegistrableVsizeStrobeLabel, MaxRegistrableVsize)

MODIFY
WalletWasabi/WabiSabi/ProtocolContants.cs
WalletWasabi/WabiSabi/ProtocolContants.cs
@@ -18,6 +18,10 @@ namespace WalletWasabi.WabiSabi
public const string RoundAmountCredentialIssuerParametersStrobeLabel = "amount-credential-issuer-parameters";
public const string RoundVsizeCredentialIssuerParametersStrobeLabel = "vsize-credential-issuer-parameters";
public const string RoundFeeRateStrobeLabel = "fee-rate";
+ public const string RoundInputRegistrationTimeoutStrobeLabel= "input-registration-timeout";
+ public const string RoundConnectionConfirmationTimeoutStrobeLabel= "connection-confirmation-timeout";
+ public const string RoundOutputRegistrationTimeoutStrobeLabel= "output-registration-timeout";
+ public const string RoundTransactionSigningTimeoutStrobeLabel= "transaction-signing-timeout";
// Alice hashing labels
public const string AliceStrobeDomain = "alice-parameters";

Round hash commits to timeouts