Remove bench project
DELETE
IndexMain.bin
IndexMain.bin
Binary files a/IndexMain.bin and /dev/null differ

DELETE
WalletWasabi.Bench/ExtPubKeyExplorer.cs
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using NBitcoin;
-using BenchmarkDotNet.Attributes;
-using BenchmarkDotNet.Running;
-using WalletWasabi.Services;
-using WalletWasabi.Backend.Models;
-using System.IO;
-
-namespace WalletWasabi.Benck
-{
- [ClrJob(baseline: true), CoreJob]
- [RPlotExporter, RankColumn]
- public class SearchingUnusedAddresses
- {
- private List<FilterModel> _filters;
-
- [GlobalSetup]
- public void Setup()
- {
- _filters = new List<FilterModel>(500_000);
- using(var file = File.OpenRead("IndexTestNet.bin"))
- while(file.Position < file.Length)
- _filters.Add(FilterModel.FromStream(file, 0));
- }
-
- [Benchmark]
- public void FindFirstUnusedKey()
- {
- var extPubKey = ExtPubKey.Parse("tpubDESeudcLbEHBoH8iw6mL284PXoe2TVmGa3MdQ2gSAkkMj9d1P88LB8wEbVYpigwzurDmDSRsGMKkUsH6vx1anBDCMRzha4YucJfCvEy6z6B");
- var explorer = new ExtPubKeyExplorer(extPubKey, _filters);
- var index = explorer.UnusedKeys().First();
- }
- }
-}
\ No newline at end of file

DELETE
WalletWasabi.Bench/WalletWasabi.Bench.csproj
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.2</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="BenchmarkDotNet" Version="0.11.3" />
- <PackageReference Include="NBitcoin" Version="4.1.1.82" />
- </ItemGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\WalletWasabi\WalletWasabi.csproj" />
- </ItemGroup>
-</Project>

MODIFY
WalletWasabi.Tests/ExtPubKeyExplorerTests.cs
WalletWasabi.Tests/ExtPubKeyExplorerTests.cs
@@ -108,23 +108,6 @@ namespace WalletWasabi.Tests
Assert.Equal(DerivateScript(25_000), unusedKeyIndex);
}
- [Fact]
- public void RealWorldCase()
- {
- var filters = new List<FilterModel>(100_000);
- using(var file = File.OpenRead("../../../../WalletWasabi.Bench/IndexTestNet.bin"))
- while(file.Position < file.Length)
- filters.Add(FilterModel.FromStream(file, 0));
-
- var extPubKey = ExtPubKey.Parse("tpubDESeudcLbEHBoH8iw6mL284PXoe2TVmGa3MdQ2gSAkkMj9d1P88LB8wEbVYpigwzurDmDSRsGMKkUsH6vx1anBDCMRzha4YucJfCvEy6z6B");
- var explorer = new ExtPubKeyExplorer(extPubKey, filters);
- var index = explorer.UnusedKeys().First();
- Console.WriteLine($"first index: m/84'/0'/0'/0/{index}");
- // Review: The Wallet file indicates that the first Locked index is 48, however increasing the chunkSize makes the
- // method to return wrong index.
- }
-
-
private FilterModel CreateFiltersWith(IEnumerable<byte[]> scripts)
{
var keyBuffer = new byte[32];

MODIFY
WalletWasabi/Services/ExtPubKeyExplorer.cs
WalletWasabi/Services/ExtPubKeyExplorer.cs
@@ -22,7 +22,7 @@ namespace WalletWasabi.Services
_generator = DerivateNext().GetEnumerator();
_filters = filters.Where(x=>x.Filter != null).ToArray();
if(_filters.Length == 0)
- throw new ArgumentException(nameof(filters), "There is not filter to match.");
+ throw new ArgumentException(nameof(filters), "There is no filter to match.");
}
public IEnumerable<byte[]> UnusedKeys()

Remove bench project