Remove credential retrieval from output registration
MODIFY
WalletWasabi.Backend/Controllers/WabiSabiController.cs
WalletWasabi.Backend/Controllers/WabiSabiController.cs
@@ -43,7 +43,7 @@ namespace WalletWasabi.Backend.Controllers
[HttpPost("output-registration")]
[Idempotent]
- public Task<OutputRegistrationResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellableToken)
+ public Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellableToken)
{
return RequestHandler.RegisterOutputAsync(request, cancellableToken);
}

MODIFY
WalletWasabi.Tests/Helpers/ArenaRequestHandlerAdapter.cs
WalletWasabi.Tests/Helpers/ArenaRequestHandlerAdapter.cs
@@ -25,7 +25,7 @@ namespace WalletWasabi.Tests.Helpers
public Task<InputRegistrationResponse> RegisterInputAsync(InputRegistrationRequest request, CancellationToken cancellationToken)
=> arena.RegisterInputAsync((request));
- public Task<OutputRegistrationResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken)
+ public Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken)
=> arena.RegisterOutputAsync(request);
public Task<ReissueCredentialResponse> ReissueCredentialAsync(ReissueCredentialRequest request, CancellationToken cancellationToken)

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterOutputTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterOutputTests.cs
@@ -26,11 +26,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
await using ArenaRequestHandler handler = new(cfg, new Prison(), arena, new MockRpcClient());
var req = WabiSabiFactory.CreateOutputRegistrationRequest(round);
- var resp = await handler.RegisterOutputAsync(req, CancellationToken.None);
+ await handler.RegisterOutputAsync(req, CancellationToken.None);
Assert.NotEmpty(round.Bobs);
- Assert.NotNull(resp);
- Assert.NotNull(resp.AmountCredentials);
- Assert.NotNull(resp.VsizeCredentials);
await arena.StopAsync(CancellationToken.None);
}

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Models/SerializationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Models/SerializationTests.cs
@@ -86,16 +86,6 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Models
AssertSerialization(message);
}
- [Fact]
- public void OutputRegistrationResponseMessageSerialization()
- {
- var message = new OutputRegistrationResponse(
- CreateCredentialsResponse(),
- CreateCredentialsResponse());
-
- AssertSerialization(message);
- }
-
[Fact]
public void ReissueCredentialRequestMessageSerialization()
{

MODIFY
WalletWasabi/WabiSabi/Backend/PostRequests/ArenaRequestHandler.cs
WalletWasabi/WabiSabi/Backend/PostRequests/ArenaRequestHandler.cs
@@ -57,12 +57,12 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
}
}
- public async Task<OutputRegistrationResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken)
+ public async Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken)
{
DisposeGuard();
using (RunningTasks.RememberWith(RunningRequests))
{
- return await Arena.RegisterOutputAsync(request).ConfigureAwait(false);
+ await Arena.RegisterOutputAsync(request).ConfigureAwait(false);
}
}

MODIFY
WalletWasabi/WabiSabi/Backend/PostRequests/IWabiSabiApiRequestHandler.cs
WalletWasabi/WabiSabi/Backend/PostRequests/IWabiSabiApiRequestHandler.cs
@@ -10,7 +10,7 @@ namespace WalletWasabi.WabiSabi.Backend.PostRequests
Task<ConnectionConfirmationResponse> ConfirmConnectionAsync(ConnectionConfirmationRequest request, CancellationToken cancellationToken);
- Task<OutputRegistrationResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken);
+ Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken);
Task RemoveInputAsync(InputsRemovalRequest request, CancellationToken cancellationToken);

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -396,7 +396,7 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
}
}
- public async Task<OutputRegistrationResponse> RegisterOutputAsync(OutputRegistrationRequest request)
+ public async Task RegisterOutputAsync(OutputRegistrationRequest request)
{
using (await AsyncLock.LockAsync().ConfigureAwait(false))
{
@@ -434,9 +434,8 @@ namespace WalletWasabi.WabiSabi.Backend.Rounds
round.CoinjoinState = newState;
// Issue credentials and mark presented credentials as used.
- return new(
- commitAmountCredentialResponse.Commit(),
- commitVsizeCredentialResponse.Commit());
+ commitAmountCredentialResponse.Commit();
+ commitVsizeCredentialResponse.Commit();
}
}

MODIFY
WalletWasabi/WabiSabi/Client/ArenaClient.cs
WalletWasabi/WabiSabi/Client/ArenaClient.cs
@@ -63,7 +63,7 @@ namespace WalletWasabi.WabiSabi.Client
await RequestHandler.RemoveInputAsync(new InputsRemovalRequest(roundId, aliceId), cancellationToken).ConfigureAwait(false);
}
- public async Task<ArenaResponse> RegisterOutputAsync(
+ public async Task RegisterOutputAsync(
uint256 roundId,
long amount,
Script scriptPubKey,
@@ -86,18 +86,13 @@ namespace WalletWasabi.WabiSabi.Client
vsizeCredentialsToPresent,
cancellationToken);
- var outputRegistrationResponse = await RequestHandler.RegisterOutputAsync(
+ await RequestHandler.RegisterOutputAsync(
new OutputRegistrationRequest(
roundId,
scriptPubKey,
realAmountCredentialRequest,
realVsizeCredentialRequest),
cancellationToken).ConfigureAwait(false);
-
- var realAmountCredentials = AmountCredentialClient.HandleResponse(outputRegistrationResponse.AmountCredentials, realAmountCredentialResponseValidation);
- var realVsizeCredentials = VsizeCredentialClient.HandleResponse(outputRegistrationResponse.VsizeCredentials, realVsizeCredentialResponseValidation);
-
- return new(realAmountCredentials, realVsizeCredentials);
}
public async Task<ArenaResponse> ReissueCredentialAsync(

MODIFY
WalletWasabi/WabiSabi/Client/BobClient.cs
WalletWasabi/WabiSabi/Client/BobClient.cs
@@ -20,7 +20,7 @@ namespace WalletWasabi.WabiSabi.Client
public async Task RegisterOutputAsync(Money amount, Script scriptPubKey, IEnumerable<Credential> amountCredentials, IEnumerable<Credential> vsizeCredentials, CancellationToken cancellationToken)
{
- var response = await ArenaClient.RegisterOutputAsync(
+ await ArenaClient.RegisterOutputAsync(
RoundId,
amount.Satoshi,
scriptPubKey,

MODIFY
WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs
WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs
@@ -40,8 +40,8 @@ namespace WalletWasabi.WabiSabi.Client
public Task<ConnectionConfirmationResponse> ConfirmConnectionAsync(ConnectionConfirmationRequest request, CancellationToken cancellationToken) =>
SendAndReceiveAsync<ConnectionConfirmationRequest, ConnectionConfirmationResponse>(RemoteAction.ConfirmConnection, request, cancellationToken);
- public Task<OutputRegistrationResponse> RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken) =>
- SendAndReceiveAsync<OutputRegistrationRequest, OutputRegistrationResponse>(RemoteAction.RegisterOutput, request, cancellationToken);
+ public Task RegisterOutputAsync(OutputRegistrationRequest request, CancellationToken cancellationToken) =>
+ SendAndReceiveAsync<OutputRegistrationRequest>(RemoteAction.RegisterOutput, request, cancellationToken);
public Task<ReissueCredentialResponse> ReissueCredentialAsync(ReissueCredentialRequest request, CancellationToken cancellationToken) =>
SendAndReceiveAsync<ReissueCredentialRequest, ReissueCredentialResponse>(RemoteAction.ReissueCredential, request, cancellationToken);

DELETE
WalletWasabi/WabiSabi/Models/OutputRegistrationResponse.cs
-using WalletWasabi.WabiSabi.Crypto.CredentialRequesting;
-
-namespace WalletWasabi.WabiSabi.Models
-{
- public record OutputRegistrationResponse(
- CredentialsResponse AmountCredentials,
- CredentialsResponse VsizeCredentials
- );
-}

Remove credential retrieval from output registration