Add `InputRegistrationStart` to calculate remaining time
MODIFY
WalletWasabi/Crypto/StrobeProtocol/StrobeHasher.cs
WalletWasabi/Crypto/StrobeProtocol/StrobeHasher.cs
@@ -26,6 +26,9 @@ namespace WalletWasabi.Crypto.StrobeProtocol
public StrobeHasher Append(string fieldName, IBitcoinSerializable serializable)
=> Append(fieldName, serializable.ToBytes());
+ public StrobeHasher Append(string fieldName, DateTimeOffset dateTime)
+ => Append(fieldName, dateTime.ToUnixTimeMilliseconds());
+
public StrobeHasher Append(string fieldName, TimeSpan time)
=> Append(fieldName, time.Ticks);

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
@@ -141,6 +141,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
private uint256 CalculateHash()
=> RoundHasher.CalculateHash(
+ InputRegistrationStart,
InputRegistrationTimeout,
ConnectionConfirmationTimeout,
OutputRegistrationTimeout,

MODIFY
WalletWasabi/WabiSabi/Crypto/RoundHasher.cs
WalletWasabi/WabiSabi/Crypto/RoundHasher.cs
@@ -11,6 +11,7 @@ namespace WalletWasabi.WabiSabi.Crypto
public static class RoundHasher
{
public static uint256 CalculateHash(
+ DateTimeOffset inputRegistrationStart,
TimeSpan inputRegistrationTimeout,
TimeSpan connectionConfirmationTimeout,
TimeSpan outputRegistrationTimeout,
@@ -29,6 +30,7 @@ namespace WalletWasabi.WabiSabi.Crypto
CredentialIssuerParameters amountCredentialIssuerParameters,
CredentialIssuerParameters vsizeCredentialIssuerParameters)
=> StrobeHasher.Create(ProtocolConstants.RoundStrobeDomain)
+ .Append(ProtocolConstants.RoundInputRegistrationStartStrobeLabel, inputRegistrationStart)
.Append(ProtocolConstants.RoundInputRegistrationTimeoutStrobeLabel, inputRegistrationTimeout)
.Append(ProtocolConstants.RoundConnectionConfirmationTimeoutStrobeLabel, connectionConfirmationTimeout)
.Append(ProtocolConstants.RoundOutputRegistrationTimeoutStrobeLabel, outputRegistrationTimeout)

MODIFY
WalletWasabi/WabiSabi/Models/RoundState.cs
WalletWasabi/WabiSabi/Models/RoundState.cs
@@ -15,6 +15,7 @@ namespace WalletWasabi.WabiSabi.Models
FeeRate FeeRate,
Phase Phase,
bool WasTransactionBroadcast,
+ DateTimeOffset InputRegistrationStart,
TimeSpan InputRegistrationTimeout,
TimeSpan ConnectionConfirmationTimeout,
TimeSpan OutputRegistrationTimeout,
@@ -36,6 +37,7 @@ namespace WalletWasabi.WabiSabi.Models
round.FeeRate,
round.Phase,
round.WasTransactionBroadcast,
+ round.InputRegistrationStart,
round.InputRegistrationTimeout,
round.ConnectionConfirmationTimeout,
round.OutputRegistrationTimeout,
@@ -60,6 +62,7 @@ namespace WalletWasabi.WabiSabi.Models
private uint256 CalculateHash() =>
RoundHasher.CalculateHash(
+ InputRegistrationStart,
InputRegistrationTimeout,
ConnectionConfirmationTimeout,
OutputRegistrationTimeout,

MODIFY
WalletWasabi/WabiSabi/ProtocolContants.cs
WalletWasabi/WabiSabi/ProtocolContants.cs
@@ -25,6 +25,7 @@ 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 RoundInputRegistrationStartStrobeLabel = "input-registration-start";
public const string RoundInputRegistrationTimeoutStrobeLabel = "input-registration-timeout";
public const string RoundConnectionConfirmationTimeoutStrobeLabel= "connection-confirmation-timeout";
public const string RoundOutputRegistrationTimeoutStrobeLabel= "output-registration-timeout";

Add `InputRegistrationStart` to calculate remaining time