Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
0.11.10 adding pool puzzle / address
Browse files Browse the repository at this point in the history
  • Loading branch information
grayfallstown committed Jul 11, 2021
1 parent d81162a commit 04d1fe4
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ChiaPlotStatus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Authors>grayfallstown</Authors>
<Company>none</Company>
<Version>0.11.8</Version>
<Version>0.11.10</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<WarningLevel>5</WarningLevel>
Expand Down
8 changes: 7 additions & 1 deletion ChiaPlotStatus.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChiaPlotStatusCli", "ChiaPl
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChiaPlotStatusGUI", "ChiaPlotStatusGUI\ChiaPlotStatusGUI.csproj", "{38F6EA6C-7E72-439B-B548-AFB5591DCEE3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChiaPlotStatusLib", "ChiaPlotStatusLib\ChiaPlotStatusLib.csproj", "{1CD172CB-184B-4C41-BB7A-4F68B61E80DE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChiaPlotStatusLib", "ChiaPlotStatusLib\ChiaPlotStatusLib.csproj", "{1CD172CB-184B-4C41-BB7A-4F68B61E80DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChiaPlotStatusGUI2", "ChiaPlotStatusGUI2\ChiaPlotStatusGUI2.csproj", "{91BD97DE-BA91-4BED-97C6-1AC8B306FFA1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -27,6 +29,10 @@ Global
{1CD172CB-184B-4C41-BB7A-4F68B61E80DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1CD172CB-184B-4C41-BB7A-4F68B61E80DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CD172CB-184B-4C41-BB7A-4F68B61E80DE}.Release|Any CPU.Build.0 = Release|Any CPU
{91BD97DE-BA91-4BED-97C6-1AC8B306FFA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91BD97DE-BA91-4BED-97C6-1AC8B306FFA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91BD97DE-BA91-4BED-97C6-1AC8B306FFA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91BD97DE-BA91-4BED-97C6-1AC8B306FFA1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion ChiaPlotStatusCli/ChiaPlotStatusCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ApplicationIcon>Icon - Color changed.ico</ApplicationIcon>
<Authors>grayfallstown</Authors>
<Company>grayfallstown</Company>
<Version>0.11.9</Version>
<Version>0.11.10</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
Expand Down
2 changes: 1 addition & 1 deletion ChiaPlotStatusGUI/ChiaPlotStatusGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Company>grayfallstown</Company>
<Authors>grayfallstown</Authors>
<ApplicationIcon>Icon - Color changed.ico</ApplicationIcon>
<Version>0.11.9</Version>
<Version>0.11.10</Version>
</PropertyGroup>
<ItemGroup>
<AvaloniaResource Include="GUI\Assets\**" />
Expand Down
2 changes: 2 additions & 0 deletions ChiaPlotStatusGUI/GUI/Assets/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Buttons:
Save: "Save"

Columns:
PoolPuzzleHash: "Pool Puzzle / Address"
Tmp1Drive: "Tmp1"
Tmp2Drive: "Tmp2"
DestDrive: "Destination"
Expand Down Expand Up @@ -87,6 +88,7 @@ Columns:


Tooltips:
PoolPuzzleHash: "The Pool Puzzle Hash if you plot with madmax and the pool address if you still use chiapos."
JsonExport: "Export shown data to Json. Check <Raw Export> if you want plain unformatted numbers."
YamlExport: "Export shown data to Yaml. Check <Raw Export> if you want plain unformatted numbers."
CsvExport: "Export shown data to Csv. Check <Raw Export> if you want plain unformatted numbers."
Expand Down
2 changes: 2 additions & 0 deletions ChiaPlotStatusGUI/GUI/Models/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public class Tooltips
public string AvgHeat { get; set; } = "";
public string MaxHeat { get; set; } = "";
public string MinHeat { get; set; } = "";
public string PoolPuzzleHash { get; set; } = "";
}

public class Columns
Expand Down Expand Up @@ -187,5 +188,6 @@ public class Columns
public string AvgHeat { get; set; } = "";
public string MaxHeat { get; set; } = "";
public string MinHeat { get; set; } = "";
public string PoolPuzzleHash { get; set; } = "";
}
}
17 changes: 17 additions & 0 deletions ChiaPlotStatusGUI/GUI/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,23 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn SortMemberPath="PoolPuzzleHash">
<DataGridTemplateColumn.Header>
<Button Content="{Binding ElementName=WindowContext, Path=DataContext.Language.Columns.PoolPuzzleHash}" HorizontalAlignment="Left" Click="LogDataGridHeaderClick"></Button>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate >
<StackPanel>
<ToolTip.Tip>
<StackPanel>
<TextBlock Text="{Binding ElementName=WindowContext, Path=DataContext.Language.Tooltips.PoolPuzzleHash}"></TextBlock>
</StackPanel>
</ToolTip.Tip>
<TextBlock Text="{Binding PoolPuzzleHash}" HorizontalAlignment="Left" ></TextBlock>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn SortMemberPath="LastLogLine">
<DataGridTemplateColumn.Header>
<Button Content="{Binding ElementName=WindowContext, Path=DataContext.Language.Columns.LastLogLine}" HorizontalAlignment="Left" Click="LogDataGridHeaderClick"></Button>
Expand Down
2 changes: 1 addition & 1 deletion ChiaPlotStatusLib/ChiaPlotStatusLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Company>grayfallstown</Company>
<Authors>grayfallstown</Authors>
<Product>ChiaPlotStatusLib</Product>
<Version>0.11.9</Version>
<Version>0.11.10</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CsvHelper" Version="27.0.2" />
Expand Down
1 change: 1 addition & 0 deletions ChiaPlotStatusLib/Logic/Models/Columns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public static Columns Default()
columns.Order.Add("ApproximateWorkingSpace");
columns.Order.Add("FinalFileSize");
columns.Order.Add("LastLogLine");
columns.Order.Add("PoolPuzzleHash");

return columns;
}
Expand Down
1 change: 1 addition & 0 deletions ChiaPlotStatusLib/Logic/Models/PlotLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class PlotLog
public bool CaughtPlottingError { get; set; } = false;
public string LastLogLine { get; set; } = "";
public string Note { get; set; } = "Notice / Tags";
public string PoolPuzzleHash { get; set; } = "";

public virtual void UpdateProgress()
{
Expand Down
2 changes: 2 additions & 0 deletions ChiaPlotStatusLib/Logic/Models/PlotLogReadable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class PlotLogReadable
public string LastLogLine { get; set; } = "";
public bool IsSelected { get; set; } = false;
public string Note { get; set; } = "";
public string PoolPuzzleHash { get; set; } = "";


public PlotLogReadable(PlotLog plotLog)
Expand Down Expand Up @@ -109,6 +110,7 @@ public PlotLogReadable(PlotLog plotLog)
this.Buckets = plotLog.Buckets.ToString();
this.Threads = plotLog.Threads.ToString();
this.Buffer = plotLog.Buffer + " MB";
this.PoolPuzzleHash = plotLog.PoolPuzzleHash;
this.LastLogLine = plotLog.LastLogLine;
if (plotLog.PID != 0)
this.PID = "" + plotLog.PID;
Expand Down
13 changes: 9 additions & 4 deletions ChiaPlotStatusLib/Logic/Parser/CPPlotLogFileParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public CPPlotLogFileParser(string path, bool closeOnEndOfFile)
MatchCollection matches;
switch (line)
{
case var _ when poolPuzzleHashRg.IsMatch(line):
matches = poolPuzzleHashRg.Matches(line);
CurrentPlotLog().PoolPuzzleHash = matches[0].Groups[1].Value;
break;
case var _ when threadsRg.IsMatch(line):
matches = threadsRg.Matches(line);
if (CurrentPlotLog().Threads != 0)
Expand Down Expand Up @@ -495,14 +499,15 @@ private void Close()
closed = true;
}

static Regex poolPuzzleHashRg = new Regex("Pool Puzzle Hash:\\s+(.+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex threadsRg = new Regex("Number of Threads: (\\d+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex bucketsRg = new Regex("Number of Sort Buckets: 2\\^\\d+ \\((\\d+)\\)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex buckets2Rg = new Regex("Number of Buckets P1:\\s*2\\^\\d+ \\((\\d+)\\)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex plotNameRg = new Regex("Plot Name: (.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex tmp1Rg = new Regex("Working Directory:\\s*(.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex tmp2Rg = new Regex("Working Directory 2:\\s*(.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex destRg = new Regex("Final Directory:\\s*(.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex pidRg = new Regex("Process ID:\\s*(\\d+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex tmp1Rg = new Regex("Working Directory:\\s+(.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex tmp2Rg = new Regex("Working Directory 2:\\s+(.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex destRg = new Regex("Final Directory:\\s+(.*)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex pidRg = new Regex("Process ID:\\s+(\\d+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex p1table1Rg = new Regex("\\[P1\\] Table 1 took ([0-9.]+) sec", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex p1table2Rg = new Regex("\\[P1\\] Table 2 took ([0-9.]+) sec, found (\\d+) matches", RegexOptions.Compiled | RegexOptions.IgnoreCase);
static Regex p1table3Rg = new Regex("\\[P1\\] Table 3 took ([0-9.]+) sec, found (\\d+) matches", RegexOptions.Compiled | RegexOptions.IgnoreCase);
Expand Down
5 changes: 4 additions & 1 deletion ChiaPlotStatusLib/Logic/Parser/PlotLogFileParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public PlotLogFileParser(string path, bool closeOnEndOfFile, ref PlotParserCache
case var _ when plotSizeRg.IsMatch(line):
CurrentPlotLog().PlotSize = int.Parse(plotSizeRg.Matches(line)[0].Groups[1].Value);
break;
case var _ when poolPuzzleHashRg.IsMatch(line):
CurrentPlotLog().PoolPuzzleHash = poolPuzzleHashRg.Matches(line)[0].Groups[1].Value;
break;
case var _ when bufferSizeRg.IsMatch(line):
CurrentPlotLog().Buffer = int.Parse(bufferSizeRg.Matches(line)[0].Groups[1].Value);
break;
Expand Down Expand Up @@ -226,8 +229,8 @@ private PlotLog NextPlotLog()
return newPlotLog;
}


// interesting data from logfiles as regex
public static Regex poolPuzzleHashRg = new Regex("pool contract address:\\s+([a-z0-9]+)\\s+", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static Regex plotSizeRg = new Regex("^Plot size is: (\\d+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static Regex bufferSizeRg = new Regex("^Buffer size is: (\\d+)MiB", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public static Regex bucketsRg = new Regex("^Using (\\d+) buckets", RegexOptions.Compiled | RegexOptions.IgnoreCase);
Expand Down
Binary file modified InstallerConfig.ifp
Binary file not shown.

0 comments on commit 04d1fe4

Please sign in to comment.