Experiment no.1
MODIFY
WalletWasabi/WabiSabi/Client/ArenaClient.cs
WalletWasabi/WabiSabi/Client/ArenaClient.cs
@@ -18,18 +18,23 @@ public class ArenaClient
WabiSabiClient amountCredentialClient,
WabiSabiClient vsizeCredentialClient,
string coordinatorIdentifier,
- IWabiSabiApiRequestHandler requestHandler)
+ IWabiSabiApiRequestHandler requestHandler,
+ IWabiSabiApiRequestHandler? requestHandlerSigning = null)
{
+ requestHandlerSigning ??= requestHandler;
+
AmountCredentialClient = amountCredentialClient;
VsizeCredentialClient = vsizeCredentialClient;
CoordinatorIdentifier = coordinatorIdentifier;
RequestHandler = requestHandler;
+ RequestHandlerSigning = requestHandlerSigning;
}
public WabiSabiClient AmountCredentialClient { get; }
public WabiSabiClient VsizeCredentialClient { get; }
public string CoordinatorIdentifier { get; }
public IWabiSabiApiRequestHandler RequestHandler { get; }
+ public IWabiSabiApiRequestHandler RequestHandlerSigning { get; }
public async Task<(ArenaResponse<Guid> ArenaResponse, bool IsPayingZeroCoordinationFee)> RegisterInputAsync(
uint256 roundId,
@@ -200,7 +205,7 @@ public class ArenaClient
throw new InvalidOperationException($"Witness is missing. Reason {nameof(ScriptError)} code: {error}.");
}
- await RequestHandler.SignTransactionAsync(new TransactionSignaturesRequest(roundId, txInput.Index, txInput.WitScript), cancellationToken).ConfigureAwait(false);
+ await RequestHandlerSigning.SignTransactionAsync(new TransactionSignaturesRequest(roundId, txInput.Index, txInput.WitScript), cancellationToken).ConfigureAwait(false);
}
public async Task<RoundStateResponse> GetStatusAsync(RoundStateRequest request, CancellationToken cancellationToken)
@@ -213,7 +218,7 @@ public class ArenaClient
Guid aliceId,
CancellationToken cancellationToken)
{
- await RequestHandler.ReadyToSignAsync(
+ await RequestHandlerSigning.ReadyToSignAsync(
new ReadyToSignRequestRequest(
roundId,
aliceId),

MODIFY
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs
@@ -341,15 +341,18 @@ public class CoinJoinClient
try
{
personCircuit = HttpClientFactory.NewHttpClientWithPersonCircuit(out Tor.Http.IHttpClient httpClient);
+ Tor.Http.IHttpClient httpClientSigning = HttpClientFactory.NewHttpClientWithCircuitPerRequest();
// Alice client requests are inherently linkable to each other, so the circuit can be reused
var arenaRequestHandler = new WabiSabiHttpApiClient(httpClient);
+ var arenaRequestHandlerSigning = new WabiSabiHttpApiClient(httpClientSigning);
var aliceArenaClient = new ArenaClient(
roundState.CreateAmountCredentialClient(SecureRandom),
roundState.CreateVsizeCredentialClient(SecureRandom),
CoordinatorIdentifier,
- arenaRequestHandler);
+ arenaRequestHandler,
+ arenaRequestHandlerSigning);
var aliceClient = await AliceClient.CreateRegisterAndConfirmInputAsync(roundState, aliceArenaClient, coin, KeyChain, RoundStatusUpdater, linkedUnregisterCts.Token, linkedRegistrationsCts.Token, linkedConfirmationsCts.Token).ConfigureAwait(false);

Experiment no.1