Missing weight renaming
MODIFY
WalletWasabi.Tests/Helpers/WabiSabiFactory.cs
WalletWasabi.Tests/Helpers/WabiSabiFactory.cs
@@ -274,9 +274,9 @@ namespace WalletWasabi.Tests.Helpers
var (amCredentialRequest, amValid) = amClient.CreateRequest(
new[] { alice?.CalculateRemainingAmountCredentials(round!.FeeRate).Satoshi ?? ProtocolConstants.MaxVsizePerAlice },
zeroPresentables.amountCredentials);
- long startingWeightCredentialAmount = alice?.CalculateRemainingVsizeCredentials(round!.PerAliceVsizeAllocation) ?? ProtocolConstants.MaxVsizePerAlice;
+ long startingVsizeCredentialAmount = alice?.CalculateRemainingVsizeCredentials(round!.PerAliceVsizeAllocation) ?? ProtocolConstants.MaxVsizePerAlice;
var (vsCredentialRequest, weValid) = vsClient.CreateRequest(
- new[] { startingWeightCredentialAmount },
+ new[] { startingVsizeCredentialAmount },
zeroPresentables.vsizeCredentials);
var amResp = amIssuer.HandleRequest(amCredentialRequest);
@@ -299,7 +299,7 @@ namespace WalletWasabi.Tests.Helpers
}
var (realVsizeCredentialRequest, _) = vsClient.CreateRequest(
- new[] { startingWeightCredentialAmount - (long)vsize },
+ new[] { startingVsizeCredentialAmount - (long)vsize },
vsClient.Credentials.Valuable);
return new OutputRegistrationRequest(

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PhaseStepping/StepTransactionSigningTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PhaseStepping/StepTransactionSigningTests.cs
@@ -54,7 +54,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PhaseStepping
var alice2 = round.Alices.Single(x => x.Id == irres2.AliceId);
// Confirm connections.
- var ccresps = new List<(ConnectionConfirmationResponse resp, WabiSabiClient amountClient, WabiSabiClient weightClient, Guid aliceId)>();
+ var ccresps = new List<(ConnectionConfirmationResponse resp, WabiSabiClient amountClient, WabiSabiClient vsizeClient, Guid aliceId)>();
var ccreq1 = WabiSabiFactory.CreateConnectionConfirmationRequest(round, irres1);
var ccresp1 = await arena.ConfirmConnectionAsync(ccreq1.request);
ccresps.Add((ccresp1, ccreq1.amountClient, ccreq1.vsizeClient, irres2.AliceId));

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/ConfirmConnectionTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/ConfirmConnectionTests.cs
@@ -128,7 +128,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
}
[Fact]
- public async Task IncorrectRequestedWeightCredentialsAsync()
+ public async Task IncorrectRequestedVsizeCredentialsAsync()
{
WabiSabiConfig cfg = new();
var round = WabiSabiFactory.CreateRound(cfg);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputFailureTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputFailureTests.cs
@@ -83,7 +83,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
}
[Fact]
- public async Task InputRegistrationFullWeightAsync()
+ public async Task InputRegistrationFullVsizeAsync()
{
WabiSabiConfig cfg = new();
var round = WabiSabiFactory.CreateRound(cfg);
@@ -104,7 +104,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
// try to add an additional input
var req = WabiSabiFactory.CreateInputsRegistrationRequest(key, round);
var ex = await Assert.ThrowsAsync<WabiSabiProtocolException>(async () => await handler.RegisterInputAsync(req));
- Assert.Equal(WabiSabiProtocolErrorCode.TooMuchTotalWeight, ex.ErrorCode);
+ Assert.Equal(WabiSabiProtocolErrorCode.VsizeQuotaExceeded, ex.ErrorCode);
await arena.StopAsync(CancellationToken.None);
}

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RemoveInputTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RemoveInputTests.cs
@@ -39,7 +39,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
req = new InputsRemovalRequest(round.Id, alice.Id);
await handler.RemoveInputAsync(req);
- // Ensure that removing an alice freed up the input weight
+ // Ensure that removing an alice freed up the input vsize
// allocation from the round
Assert.Equal(initialRemaining, round.RemainingInputVsizeAllocation);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Client/ArenaClientTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Client/ArenaClientTests.cs
@@ -160,8 +160,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Client
var rnd = new InsecureRandom();
var amountClient = new WabiSabiClient(round.AmountCredentialIssuerParameters, 2, rnd, 4300000000000ul);
- var weightClient = new WabiSabiClient(round.VsizeCredentialIssuerParameters, 2, rnd, 2000ul);
- var apiClient = new ArenaClient(amountClient, weightClient, coordinator);
+ var vsizeClient = new WabiSabiClient(round.VsizeCredentialIssuerParameters, 2, rnd, 2000ul);
+ var apiClient = new ArenaClient(amountClient, vsizeClient, coordinator);
round.SetPhase(Phase.TransactionSigning);

MODIFY
WalletWasabi/WabiSabi/Backend/Models/WabiSabiProtocolErrorCode.cs
WalletWasabi/WabiSabi/Backend/Models/WabiSabiProtocolErrorCode.cs
@@ -34,6 +34,6 @@ namespace WalletWasabi.WabiSabi.Backend.Models
SizeLimitExceeded,
DustOutput,
UneconomicalInput,
- TooMuchTotalWeight
+ VsizeQuotaExceeded
}
}

MODIFY
WalletWasabi/WabiSabi/Backend/PostRequests/InputRegistrationHandler.cs
WalletWasabi/WabiSabi/Backend/PostRequests/InputRegistrationHandler.cs
@@ -125,7 +125,7 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
if (round.RemainingInputVsizeAllocation < round.PerAliceVsizeAllocation)
{
- throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.TooMuchTotalWeight);
+ throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.VsizeQuotaExceeded);
}
var commitAmountCredentialResponse = round.AmountCredentialIssuer.PrepareResponse(zeroAmountCredentialRequests);
var commitVsizeCredentialResponse = round.VsizeCredentialIssuer.PrepareResponse(zeroVsizeCredentialRequests);

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -266,7 +266,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
Guid roundId,
IDictionary<Coin, byte[]> coinRoundSignaturePairs,
ZeroCredentialsRequest zeroAmountCredentialRequests,
- ZeroCredentialsRequest zeroWeightCredentialRequests)
+ ZeroCredentialsRequest zeroVsizeCredentialRequests)
{
using (await AsyncLock.LockAsync().ConfigureAwait(false))
{
@@ -275,7 +275,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
roundId,
coinRoundSignaturePairs,
zeroAmountCredentialRequests,
- zeroWeightCredentialRequests,
+ zeroVsizeCredentialRequests,
Rounds,
Network);
}
@@ -317,7 +317,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
if (realVsizeCredentialRequests.Delta != alice.CalculateRemainingVsizeCredentials(round.PerAliceVsizeAllocation))
{
- throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.IncorrectRequestedVsizeCredentials, $"Round ({request.RoundId}): Incorrect requested weight credentials.");
+ throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.IncorrectRequestedVsizeCredentials, $"Round ({request.RoundId}): Incorrect requested vsize credentials.");
}
if (realAmountCredentialRequests.Delta != alice.CalculateRemainingAmountCredentials(round.FeeRate))
{
@@ -389,7 +389,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
var vsizeCredentialRequests = request.VsizeCredentialRequests;
if (-vsizeCredentialRequests.Delta != bob.OutputVsize)
{
- throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.IncorrectRequestedVsizeCredentials, $"Round ({request.RoundId}): Incorrect requested weight credentials.");
+ throw new WabiSabiProtocolException(WabiSabiProtocolErrorCode.IncorrectRequestedVsizeCredentials, $"Round ({request.RoundId}): Incorrect requested vsize credentials.");
}
if (round.Phase != Phase.OutputRegistration)

MODIFY
WalletWasabi/WabiSabi/Client/ArenaClient.cs
WalletWasabi/WabiSabi/Client/ArenaClient.cs
@@ -29,10 +29,10 @@ namespace WalletWasabi.WabiSabi.Client
RequestHandler = requestHandler;
}
- public ArenaClient(WabiSabiClient amountCredentialClient, WabiSabiClient weightCredentialClient, IArenaRequestHandler requestHandler)
+ public ArenaClient(WabiSabiClient amountCredentialClient, WabiSabiClient vsizeCredentialClient, IArenaRequestHandler requestHandler)
{
AmountCredentialClient = amountCredentialClient;
- VsizeCredentialClient = weightCredentialClient;
+ VsizeCredentialClient = vsizeCredentialClient;
RequestHandler = requestHandler;
}

Missing weight renaming