Undo renamings
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Models/MultipartyTransactionTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Models/MultipartyTransactionTests.cs
@@ -130,7 +130,6 @@ public class MultipartyTransactionTests
[Fact]
public void WitnessValidation()
{
-
using Key key1 = new();
using Key key2 = new();
@@ -253,9 +252,9 @@ public class MultipartyTransactionTests
// TODO nonstandard input
[Fact]
- public void OnlyAllowedInputScriptTypes()
+ public void OnlyAllowedInputTypes()
{
- var legacyOnly = new ConstructionState(DefaultParameters with { AllowedInputScriptTypes = ImmutableSortedSet.Create<ScriptType>(ScriptType.P2PKH) });
+ var legacyOnly = new ConstructionState(DefaultParameters with { AllowedInputTypes = ImmutableSortedSet.Create<ScriptType>(ScriptType.P2PKH) });
(var coin, var ownershipProof) = WabiSabiFactory.CreateCoinWithOwnershipProof();
ThrowsProtocolException(WabiSabiProtocolErrorCode.ScriptNotAllowed, () => legacyOnly.AddInput(coin, ownershipProof, commitmentData));
}
@@ -303,9 +302,9 @@ public class MultipartyTransactionTests
}
[Fact]
- public void OnlyAllowedOutputScriptTypes()
+ public void OnlyAllowedOutputTypes()
{
- var legacyOnly = new ConstructionState(DefaultParameters with { AllowedOutputScriptTypes = ImmutableSortedSet<ScriptType>.Empty.Add(ScriptType.P2PKH) });
+ var legacyOnly = new ConstructionState(DefaultParameters with { AllowedOutputTypes = ImmutableSortedSet<ScriptType>.Empty.Add(ScriptType.P2PKH) });
var p2wpkh = BitcoinFactory.CreateScript();
ThrowsProtocolException(WabiSabiProtocolErrorCode.ScriptNotAllowed, () => legacyOnly.AddOutput(new TxOut(Money.Coins(1), p2wpkh)));
}

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
WalletWasabi/WabiSabi/Backend/Rounds/Round.cs
@@ -147,9 +147,9 @@ public class Round
OutputRegistrationTimeFrame.Duration,
TransactionSigningTimeFrame.Duration,
Parameters.AllowedInputAmounts,
- Parameters.AllowedInputScriptTypes,
+ Parameters.AllowedInputTypes,
Parameters.AllowedOutputAmounts,
- Parameters.AllowedOutputScriptTypes,
+ Parameters.AllowedOutputTypes,
Parameters.Network,
Parameters.MiningFeeRate.FeePerK,
Parameters.CoordinationFeeRate,

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/RoundParameters.cs
WalletWasabi/WabiSabi/Backend/Rounds/RoundParameters.cs
@@ -21,8 +21,8 @@ public record RoundParameters
int maxInputCountByRound,
MoneyRange allowedInputAmounts,
MoneyRange allowedOutputAmounts,
- ImmutableSortedSet<ScriptType> allowedInputScriptTypes,
- ImmutableSortedSet<ScriptType> allowedOutputScriptTypes,
+ ImmutableSortedSet<ScriptType> allowedInputTypes,
+ ImmutableSortedSet<ScriptType> allowedOutputTypes,
TimeSpan standardInputRegistrationTimeout,
TimeSpan connectionConfirmationTimeout,
TimeSpan outputRegistrationTimeout,
@@ -38,8 +38,8 @@ public record RoundParameters
MaxInputCountByRound = maxInputCountByRound;
AllowedInputAmounts = allowedInputAmounts;
AllowedOutputAmounts = allowedOutputAmounts;
- AllowedInputScriptTypes = allowedInputScriptTypes;
- AllowedOutputScriptTypes = allowedOutputScriptTypes;
+ AllowedInputTypes = allowedInputTypes;
+ AllowedOutputTypes = allowedOutputTypes;
StandardInputRegistrationTimeout = standardInputRegistrationTimeout;
ConnectionConfirmationTimeout = connectionConfirmationTimeout;
OutputRegistrationTimeout = outputRegistrationTimeout;
@@ -60,8 +60,8 @@ public record RoundParameters
public int MaxInputCountByRound { get; init; }
public MoneyRange AllowedInputAmounts { get; init; }
public MoneyRange AllowedOutputAmounts { get; init; }
- public ImmutableSortedSet<ScriptType> AllowedInputScriptTypes { get; init; }
- public ImmutableSortedSet<ScriptType> AllowedOutputScriptTypes { get; init; }
+ public ImmutableSortedSet<ScriptType> AllowedInputTypes { get; init; }
+ public ImmutableSortedSet<ScriptType> AllowedOutputTypes { get; init; }
public TimeSpan StandardInputRegistrationTimeout { get; init; }
public TimeSpan ConnectionConfirmationTimeout { get; init; }
public TimeSpan OutputRegistrationTimeout { get; init; }
@@ -103,8 +103,8 @@ public record RoundParameters
wabiSabiConfig.MaxInputCountByRound,
new MoneyRange(wabiSabiConfig.MinRegistrableAmount, wabiSabiConfig.MaxRegistrableAmount),
new MoneyRange(wabiSabiConfig.MinRegistrableAmount, wabiSabiConfig.MaxRegistrableAmount),
- wabiSabiConfig.AllowedInputScriptTypes,
- wabiSabiConfig.AllowedOutputScriptTypes,
+ wabiSabiConfig.AllowedInputTypes,
+ wabiSabiConfig.AllowedOutputTypes,
wabiSabiConfig.StandardInputRegistrationTimeout,
wabiSabiConfig.ConnectionConfirmationTimeout,
wabiSabiConfig.OutputRegistrationTimeout,

MODIFY
WalletWasabi/WabiSabi/Backend/WabiSabiConfig.cs
WalletWasabi/WabiSabi/Backend/WabiSabiConfig.cs
@@ -142,9 +142,9 @@ public class WabiSabiConfig : ConfigBase
[JsonProperty(PropertyName = "AllowP2trOutputs", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool AllowP2trOutputs { get; set; } = false;
- public ImmutableSortedSet<ScriptType> AllowedInputScriptTypes => GetScriptTypes(AllowP2wpkhInputs, AllowP2trInputs);
+ public ImmutableSortedSet<ScriptType> AllowedInputTypes => GetScriptTypes(AllowP2wpkhInputs, AllowP2trInputs);
- public ImmutableSortedSet<ScriptType> AllowedOutputScriptTypes => GetScriptTypes(AllowP2wpkhOutputs, AllowP2trOutputs);
+ public ImmutableSortedSet<ScriptType> AllowedOutputTypes => GetScriptTypes(AllowP2wpkhOutputs, AllowP2trOutputs);
public Script GetNextCleanCoordinatorScript() => DeriveCoordinatorScript(CoordinatorExtPubKeyCurrentDepth);

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -161,7 +161,7 @@ public class CoinJoinClient
coins = SelectCoinsForRound(coinCandidates, roundParameteers, ConsolidationMode, AnonScoreTarget, RedCoinIsolation, liquidityClue, SecureRandom);
- if (!roundParameteers.AllowedInputScriptTypes.Contains(ScriptType.P2WPKH) || !roundParameteers.AllowedOutputScriptTypes.Contains(ScriptType.P2WPKH))
+ if (!roundParameteers.AllowedInputTypes.Contains(ScriptType.P2WPKH) || !roundParameteers.AllowedOutputTypes.Contains(ScriptType.P2WPKH))
{
excludeRound = currentRoundState.Id;
currentRoundState.LogInfo($"Skipping the round since it doesn't support P2WPKH inputs and outputs.");
@@ -611,7 +611,7 @@ public class CoinJoinClient
var filteredCoins = coins
.Where(x => parameters.AllowedInputAmounts.Contains(x.Amount))
- .Where(x => parameters.AllowedInputScriptTypes.Any(t => x.ScriptPubKey.IsScriptType(t)))
+ .Where(x => parameters.AllowedInputTypes.Any(t => x.ScriptPubKey.IsScriptType(t)))
.Where(x => x.EffectiveValue(parameters.MiningFeeRate) > Money.Zero)
.ToArray();

MODIFY
WalletWasabi/WabiSabi/Crypto/RoundHasher.cs
WalletWasabi/WabiSabi/Crypto/RoundHasher.cs
@@ -16,9 +16,9 @@ public static class RoundHasher
TimeSpan outputRegistrationTimeout,
TimeSpan transactionSigningTimeout,
MoneyRange allowedInputAmounts,
- ImmutableSortedSet<ScriptType> allowedInputScriptTypes,
+ ImmutableSortedSet<ScriptType> allowedInputTypes,
MoneyRange allowedOutputAmounts,
- ImmutableSortedSet<ScriptType> allowedOutputScriptTypes,
+ ImmutableSortedSet<ScriptType> allowedOutputTypes,
Network network,
long feePerK,
CoordinationFeeRate coordinationFeeRate,
@@ -39,9 +39,9 @@ public static class RoundHasher
.Append(ProtocolConstants.RoundOutputRegistrationTimeoutStrobeLabel, outputRegistrationTimeout)
.Append(ProtocolConstants.RoundTransactionSigningTimeoutStrobeLabel, transactionSigningTimeout)
.Append(ProtocolConstants.RoundAllowedInputAmountsStrobeLabel, allowedInputAmounts)
- .Append(ProtocolConstants.RoundAllowedInputScriptTypesStrobeLabel, allowedInputScriptTypes)
+ .Append(ProtocolConstants.RoundAllowedInputTypesStrobeLabel, allowedInputTypes)
.Append(ProtocolConstants.RoundAllowedOutputAmountsStrobeLabel, allowedOutputAmounts)
- .Append(ProtocolConstants.RoundAllowedOutputScriptTypesStrobeLabel, allowedOutputScriptTypes)
+ .Append(ProtocolConstants.RoundAllowedOutputTypesStrobeLabel, allowedOutputTypes)
.Append(ProtocolConstants.RoundNetworkStrobeLabel, network.ToString())
.Append(ProtocolConstants.RoundFeeRateStrobeLabel, feePerK)
.Append(ProtocolConstants.RoundCoordinationFeeRateStrobeLabel, coordinationFeeRate)

MODIFY
WalletWasabi/WabiSabi/Models/MultipartyTransaction/ConstructionState.cs
WalletWasabi/WabiSabi/Models/MultipartyTransaction/ConstructionState.cs
@@ -24,7 +24,7 @@ public record ConstructionState : MultipartyTransactionState
throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.NonStandardInput);
}
- if (!Parameters.AllowedInputScriptTypes.Any(x => prevout.ScriptPubKey.IsScriptType(x)))
+ if (!Parameters.AllowedInputTypes.Any(x => prevout.ScriptPubKey.IsScriptType(x)))
{
throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.ScriptNotAllowed);
}
@@ -90,7 +90,7 @@ public record ConstructionState : MultipartyTransactionState
// Only one OP_RETURN is allowed per standard transaction, but this
// check is not implemented since there is no OP_RETURN ScriptType,
// which means no OP_RETURN outputs can be registered at all.
- if (!Parameters.AllowedOutputScriptTypes.Any(x => output.ScriptPubKey.IsScriptType(x)))
+ if (!Parameters.AllowedOutputTypes.Any(x => output.ScriptPubKey.IsScriptType(x)))
{
throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.ScriptNotAllowed);
}

MODIFY
WalletWasabi/WabiSabi/ProtocolConstants.cs
WalletWasabi/WabiSabi/ProtocolConstants.cs
@@ -14,8 +14,8 @@ public static class ProtocolConstants
public const string RoundAllowedInputAmountsStrobeLabel = "allowed-input-amounts";
public const string RoundAllowedOutputAmountsStrobeLabel = "allowed-output-amounts";
- public const string RoundAllowedInputScriptTypesStrobeLabel = "allowed-input-script-types";
- public const string RoundAllowedOutputScriptTypesStrobeLabel = "allowed-output-script-types";
+ public const string RoundAllowedInputTypesStrobeLabel = "allowed-input-types";
+ public const string RoundAllowedOutputTypesStrobeLabel = "allowed-output-types";
public const string RoundNetworkStrobeLabel = "network";
public const string RoundMaxTransactionSizeStrobeLabel = "max-transaction-size";
public const string RoundMinRelayTxFeeStrobeLabel = "min-relay-tx-fee";

Undo renamings