Remove v3 code
MODIFY
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
@@ -1044,12 +1044,6 @@ namespace WalletWasabi.CoinJoin.Client.Clients
}
private async Task<AliceClientBase> CreateAliceClientAsync(long roundId, RoundStateResponseBase stateParam, List<OutPoint> registrableCoins, (HdPubKey change, IEnumerable<HdPubKey> actives) outputAddresses)
- {
- if (WasabiClient.ApiVersion == 3)
- {
- return await CreateAliceClientV3Async(roundId, stateParam, registrableCoins, outputAddresses);
- }
- else
{
RoundStateResponse4 state = null;
@@ -1109,55 +1103,4 @@ namespace WalletWasabi.CoinJoin.Client.Clients
return await AliceClientBase.CreateNewAsync(roundId, registeredAddresses, signerPubKeys, requesters, Network, outputAddresses.change.GetP2wpkhAddress(Network), blindedOutputScriptHashes, inputProofs, CcjHostUriAction, TorSocks5EndPoint).ConfigureAwait(false);
}
}
-
- private async Task<AliceClientBase> CreateAliceClientV3Async(long roundId, RoundStateResponseBase stateParam, List<OutPoint> registrableCoins, (HdPubKey change, IEnumerable<HdPubKey> actives) outputAddresses)
- {
- var state = stateParam as RoundStateResponse;
- SchnorrPubKey[] schnorrPubKeys = state.SchnorrPubKeys.ToArray();
- List<Requester> requesters = new List<Requester>();
- var blindedOutputScriptHashes = new List<uint256>();
-
- var registeredAddresses = new List<BitcoinAddress>();
- for (int i = 0; i < state.MixLevelCount; i++)
- {
- if (outputAddresses.actives.Count() <= i)
- {
- break;
- }
-
- BitcoinAddress address = outputAddresses.actives.Select(x => x.GetP2wpkhAddress(Network)).ElementAt(i);
-
- SchnorrPubKey schnorrPubKey = schnorrPubKeys[i];
- var outputScriptHash = new uint256(NBitcoin.Crypto.Hashes.SHA256(address.ScriptPubKey.ToBytes()));
- var requester = new Requester();
- uint256 blindedOutputScriptHash = requester.BlindMessage(outputScriptHash, schnorrPubKey);
- requesters.Add(requester);
- blindedOutputScriptHashes.Add(blindedOutputScriptHash);
- registeredAddresses.Add(address);
- }
-
- byte[] blindedOutputScriptHashesByte = ByteHelpers.Combine(blindedOutputScriptHashes.Select(x => x.ToBytes()));
- uint256 blindedOutputScriptsHash = new uint256(NBitcoin.Crypto.Hashes.SHA256(blindedOutputScriptHashesByte));
-
- var inputProofs = new List<InputProofModel>();
- foreach (OutPoint coinReference in registrableCoins)
- {
- SmartCoin coin = State.GetSingleOrDefaultFromWaitingList(coinReference);
- if (coin is null)
- {
- throw new NotSupportedException("This is impossible.");
- }
-
- coin.Secret ??= KeyManager.GetSecrets(SaltSoup(), coin.ScriptPubKey).Single();
- var inputProof = new InputProofModel
- {
- Input = coin.OutPoint,
- Proof = coin.Secret.PrivateKey.SignCompact(blindedOutputScriptsHash)
- };
- inputProofs.Add(inputProof);
- }
-
- return await AliceClientBase.CreateNewAsync(roundId, registeredAddresses, schnorrPubKeys, requesters, Network, outputAddresses.change.GetP2wpkhAddress(Network), blindedOutputScriptHashes, inputProofs, CcjHostUriAction, TorSocks5EndPoint).ConfigureAwait(false);
- }
- }
}

Remove v3 code