PlotNG - plotting utility for Chia.Net

PlotNG - plotting utility for Chia.Net

This utility consisted of server backend and UI which manages the chia plot creation.
It uses the chia command line interface to start the plot.
It will schedule new plots when a plot finishes as specified by the configuration file. The server backend does a cycle every minute and check if the configuration file has been changed, if it detects that it has been changed then it reloads the configuration file. Once a valid configuration file has been loaded then it will start one new plot per cycle.

Donation: XCH xch1wzvlj0ncv9uhjzcz43clkk0r84t6p2vp8k3yg762pglx6ufycmrsqnxj4v

Installation

Please download the latest release Pre-built binaries available for 64-bits Linux, Windows and MacOS (I've only tested Linux version, although other users confirmed it is working on Windows and MacOS)

Advance Installation from Source Code

go get github.com/maded2/plotng
cd plotng
go install plotng/cmd/plotng

Running Server (runs on the plotter)

plotng -config -port

Please note: chia enviornment should be activated before starting plotng

Running Monitoring UI (run anywhere)

PlotNG UI

The UI can run on any host and point back to the server using the host and port parameter

` plotng -ui -host

eg. plotng -ui -host plotter1:8484,plotter2,plotter3:8485 `

Configuration File (JSON format)

{
    "Fingerprint": "",
    "FarmerPublicKey": "",
    "PoolPublicKey": "",
    "Threads": 0,
    "Buffers": 0,
    "NumberOfParallelPlots": 1,
    "TempDirectory": ["/media/eddie/tmp1", "/media/eddie/tmp2", "/media/eddie/tmp3"],
    "TargetDirectory": ["/media/eddie/target1", "/media/eddie/target2"],
    "StaggeringDelay": 5,
    "ShowPlotLog": false,
    "DiskSpaceCheck": false,
    "DelaysBetweenPlot": 0,
    "MaxActivePlotPerTarget": 0,
    "DisableBitField": false,
    "MaxActivePlotPerTemp": 0,
    "MaxActivePlotPerPhase1": 0,
    "UseTargetForTmp2": false,
    "BucketSize": 0,
    "SavePlotLogDir": "",
    "PlotSize": 32
}

Please note for Windows, please use capital drive letter and '/' eg. "D:/temp"

Settings

  • Fingerprint : fingerprint passed to the chia command line tool (you can either use the fingerprint if the private has been installed on the plotter or use the following farmer/pool public key instead)
  • FarmerPublicKey : Farmer Public Key passed to the chia command line tool
  • PoolPublicKey : Pool Public Key passed to the chia command line tool
  • Threads : number of threads use by the chia command line tool. If the value is zero or missing then chia will use the default
  • Buffers : number of buffers use by the chia command line tool. If the value is zero or missing then chia will use the default
  • DisableBitField : With BitField your plotting almost always gets faster. Set true if your CPU designed before 2010.
  • NumberOfParallelPlots : number of parallel plots to create. Set to zero for orderly shutdown
  • TempDirectory : list of plot directories / drives. The server process will choose the next directory path on the list and wraps to the beginning when it reaches the end.
  • TargetDirectory : list destination directories / drives. The server process will choose the next directory path on the list and wraps to the beginning when it reaches the end.
  • StaggeringDelay : when the TargetDirectory wraps to the beginning, it will delays the next plot create by the specified minutes.
  • ShowPlotLog : shows the last 10 lines of the plot logs in the server log output.
  • DiskSpaceCheck : check if destination directories have enough disk space to hold a new plot (only tested on Linux, may not work on MacOS / Windows)
  • DelaysBetweenPlot : Delays in mins between starting a new plot (minimum is 1 min)
  • MaxActivePlotPerTarget : Maximum active plots per target directory (default: 0 - no limit)
  • MaxActivePlotPerPhase1 : Maximum active plots per Phase 1 (default: 0 - no limit)
  • UseTargetForTmp2 : use target directory for tmp2
  • BucketSize : specify custom busket size (default: 0 - use chia default)
  • SavePlotLogDir : saves plotting logs to this directory. logs are not saved if no directory is provided (default: "")
  • PlotSize : plot size, default to k32 is not set. If set then it also pick sensible buffers for the given size.

Please note PlotNG now skips any destination directory which have less than 105GB of disk space, if you set DiskSpaceCheck to true.

Owner
Eddie Chan @maded2
Passion for Coding, Gaming & Formula1
Eddie Chan @maded2
Comments
  • No GUI in windows just wall of text

    No GUI in windows just wall of text

    Hello, Im plotting in windows and it looks like regualr plotting, wall of text, it looks Nothing like the screenshot posted by the dev.

    Am i doing something wrong? I run it from CMD, should it be run from PowerShell? wall

    Thanks

  • question: no `-2` (temp2) configuration ?

    question: no `-2` (temp2) configuration ?

    Perhaps I am missing something, but I cannot find any configuration for a separate "temp2" directory (configured with the -2 switch in the chia command line. Did I just miss it somewhere ? - thanks ! 😄

  • Move Between Sections in UI?

    Move Between Sections in UI?

    Hi - first, thank you for this great tool!

    Is there a way to move between sections in the UI so we can scroll down beyond what is displayed? For example, I have 39 "Archived Plots" but I can only see the most recent 7.

  • Tidying up

    Tidying up

    This PR is mostly over industry standards for Go code. Feel free to cherry pick.

    I used go-lint and tackled as many warnings as I could. The remaining warning are about doc comments. Example: exported type Client should have comment or be unexported

    Fix: Replace fmt.Sprintf with log.Printf for plot log file creation error Change: Replace fmt.Printf with log.Printf at internal/server.go:57

    Everything else

    • Ran go mod tidy. Removed unused github.com/gdamore/tcell v1.4.0 from go.mod.
    • Unexport Items. Items that were exported but unused externally have been renamed. ActivePlot => activePlot
    • Rename Id to ID. PlotId => PlotID
    • Removed a commented line of debugging code.
    • Refactored unnecessary else blocks at internal/client.go:76.
  • [Feature Request] Copy plot files from buffer SSD to HDD's one by one.

    [Feature Request] Copy plot files from buffer SSD to HDD's one by one.

    Hello, I would like to suggest a feature.

    For the plotng to copy created plots in orderly manner one by one to designated HDD or HDD's.

    Right now many people use an SSD as "buffer" to speed up plotting [TargetDirectory], when plot files created they saved to this SSD [saves up to 20 minutes per p lot] Also when bunch of parallel plots finish their jobs together and start copying to HDD [most people fill one HDD at time] it creates a bottleneck and slows the speed even more, but if you have an SSD, it doesnt really that big of a diffrence if its one file or 3 files copied to it, its still plenty fast.

    Up till now I was manually copying the plot file from the "buffer" SSD to the HDD.

    Also if its posible to RENAME the plot files while it copies, becuase the Chia Farming has a bug when you copy file it sees it as defective untill you restart the farming gui. To solve this, i just rename .plot files to .pl before I copy, and when they copied i rename back to .plot.

  • Issue with Installing

    Issue with Installing

    (venv) [root@chia ~]# go install plotng/cmd/plotng
    go install: version is required when current directory is not in a module
            Try 'go install plotng/cmd/plotng@latest' to install the latest version
    

    I'm not sure what I've done wrong, but this issue appears when following your instructions.

  • Bind PlotNG to specific interface/address

    Bind PlotNG to specific interface/address

    Hi. I would prefer to not have plotng getting Internet traffic and would much prefer to bind it to localhost only, can you please add support for that? Thanks :)

  • [Feature Request] Dont Plot Into Same Folder/Drive as Phase 1

    [Feature Request] Dont Plot Into Same Folder/Drive as Phase 1

    Hello, Can this feature be considered please? Example 7 Parallel plots on 7 drives staggered 3 times, with Maximum Phase1 plots set to 7

    When one of the first 7 plots finished a new staggered one should start on the drive that Finished Phase 1. Right now it will start on the next drive on the list, which is the first one since list restarted.

    Regards

  • Feature request: abbreviate plot IDs to allow more useful info on narrow screens

    Feature request: abbreviate plot IDs to allow more useful info on narrow screens

    I run PlotNG UI on a portrait ultrawide monitor, and it'd be nice to be able to see the full stats in this scenario - right now, post multi-host-ui (which is wonderful BTW, thank you), my screen cuts off around the middle of "end time" in archived plots, preventing me from seeing durations of archived plots.

    If the Plot ID, which is mostly irrelevant anyway, was visually truncated, say to 10 characters (which is more than enough to uniquely ID a plot using file search or whatever, in normal usage), I could almost definitely see everything at once on even this narrow screen.

  • combined temp/temp2/target folders?

    combined temp/temp2/target folders?

    I'm plotting on hdds, which can each manage one simultaneous plot. Currently, I'm running one plotng instance per hdd, because if I add each hdd as both temp folder and target folder, a plot might be split over two hdd, causing slowdown. Unfortunately this doesn't allow plotng's awesome staggering/delaying to be applied?

    Would it be possible to allow plotting to a single drive as both tmp and target, but having multiple of those?

  • How to do continuous parallel plotting?

    How to do continuous parallel plotting?

    plotng is working great for me. I'm using it to do 3 plots in parallel with a 30m stagger. Over time, the plotting looks like this:

    #####    #####    #####    #####
      #####    #####    #####    #####
        #####    #####    #####    #####
    

    As that diagram shows, there's wasted time/resources at the beginning and end of each cycle where it's only doing 1 or 2 plots in parallel. Ideally, I'd like plotng to do this…

    ##### ##### ##### ##### ##### #####
      ##### ##### ##### ##### ##### #####
        ##### ##### ##### ##### ##### #####
    

    …but I haven't figured out the combination of settings that would keep 3 plots going at all time. Is anyone doing this, and if so how did you configure it?

  • madmax don't wait for copy before continuing?

    madmax don't wait for copy before continuing?

    madmax has the option -w, --waitforcopy

    I don't see a way to pass that option in plotng?

    Right now in the madmax windows port it looks like it's waiting for the copy to finish before starting again. and that is effectively a penalty of 10 or 20 minutes in my case when copying across network.

  • Feature request: replot to pools

    Feature request: replot to pools

    Official pooling protocol wil be released soon™. I'd like the feature to automatically replot from the old plots to the new ones (delete the old format plot, create a new one in it's place, repeat).

  • No logfiles since 0.23 release

    No logfiles since 0.23 release

    I've trying to see the recent log files, but there are no log files since Version 0.23, the latest is from june 11th. I've tried writing a "/" at the end of the path, but it didn't work. This happened in my both plotting machines. Both running windows.

  • Test -alternate-mouse on a mac

    Test -alternate-mouse on a mac

    If someone has access to a mac and can test the client with -alternate-mouse, and confirms that the mouse still works, we can make it the default behavior and remove the flag and workaround.

    I guess that means testing in iterm and iterm2? I'm not sure what the common terminals are for mac.

  • Graceful Exit

    Graceful Exit

    Just a suggestion, feel free to delete if this isn't inline with your thinking.

    Premise:

    • Everybody will need to do maintenance sometime.
    • Nobody wants to lose the plots currently in progress.

    Suggestion: A command line option to stop creating new plots at a designated time.

    MVP 1 would be just that. A command to prevent new plots from being created while letting in-progess plots continue. When sent it will stop new plots from being created. User waits until all plots are complete, can shutdown safely and resume after maintenance.

    MVP 2 could take it a step further and allow scheduling for 1 time, daily, weekly (ex. chron scheme).

    To hit a particular point in time it could use avg. plot time + margin of error.

    EX: If avg. plot time is 5 hours and scheduled maintenance is 6pm then stop new plotting at 12:30pm for an (arbitrary) 10% margin of error. Ideally the percentage would be just enough to ensure the last plot can complete prior to scheduled time, but 99% of us would probably be happy enough just to be assured all our plots are done prior to maintenance and not worry as much about the 20-30 minutes lost.

A repository for plotting and visualizing data

Gonum Plot gonum/plot is the new, official fork of code.google.com/p/plotinum. It provides an API for building and drawing plots in Go. Note that this

Jun 3, 2021
chia-bls-signature in go, chia bls 签名工具go实现(WIP)

chia-bls-go go版本chia签名, 参考python-impl实现部分功能,并非bls的完全实现 主要功能 生成私钥 助记词 seed hexString bytes 签名 验签 多签 多签验证 区块签名(WIP) 交易签名(WIP) 安装说明 go get github.com/chu

Dec 19, 2022
Simply realtime chia log analyzer for chia coin (XCH) farmers
Simply realtime chia log analyzer for chia coin (XCH) farmers

Chia log analyzer Simply realtime chia log analyzer Howto run on Linux Download binary from the releases assets (chia-log-analyzer.go-linux-amd64 ) Yo

Jul 30, 2022
A repository for plotting and visualizing data

Gonum Plot gonum/plot is the new, official fork of code.google.com/p/plotinum. It provides an API for building and drawing plots in Go. Note that this

Dec 27, 2022
A repository for plotting and visualizing data

gonum/plot is the new, official fork of code.google.com/p/plotinum. It provides an API for building and drawing plots in Go

Jan 5, 2023
A repository for plotting and visualizing data

Gonum Plot gonum/plot is the new, official fork of code.google.com/p/plotinum. It provides an API for building and drawing plots in Go. Note that this

Jun 3, 2021
Prometheus exporter for Chia node metrics

chia_exporter Prometheus metric collector for Chia nodes, using the local RPC API Building and Running With the Go compiler tools installed: go build

Sep 19, 2022
CLI Tool to remove unwanted connections from your Chia Node based on Geo IP Location.

chia-bouncer Tiny CLI tool to remove unwanted connections from your Chia Node based on the Geo IP Location (Country). The Tool is written in golang an

Jun 25, 2021
chia-blockchain some function implement in golang

gochia chia-blockchain some function implement in golang Package bls-signatures implement blspy Usage? Now we can use it to generate plot memo and id,

May 27, 2022
generate a chia address by public key, chia公钥生成地址

chia-address-generator This repo is a hack way to generate an address from publicKey. So it's not a good enough way to use it in prod, use it just for

Mar 9, 2022
Goal: Learn a Go plotting library and track my Electricity costs
Goal: Learn a Go plotting library and track my Electricity costs

Goal: Learn a Go plotting library and track my Electricity costs Findings https:

Jan 2, 2022
A brief demo of real-time plotting with Plotly, Go, and server-sent events
A brief demo of real-time plotting with Plotly, Go, and server-sent events

Golang SSE Demo A brief demo of real-time plotting with Plotly, Go, and server-side events. Overview I first learned about Server-Sent Events from @mr

Nov 28, 2022
Go package to simulate bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces

lossy Go package to simulate bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces. Its main usage is to test robustness of ap

Oct 14, 2022
Capdns is a network capture utility designed specifically for DNS traffic. This utility is based on tcpdump.
Capdns is a network capture utility designed specifically for DNS traffic. This utility is based on tcpdump.

Capdns is a network capture utility designed specifically for DNS traffic. This utility is based on tcpdump. Some of its features include: Unde

Feb 26, 2022
Reflectionless data binding for Go's net/http (not actively maintained)
Reflectionless data binding for Go's net/http (not actively maintained)

binding Reflectionless data binding for Go's net/http Features HTTP request data binding Data validation (custom and built-in) Error handling Benefits

Nov 18, 2022
.NET LINQ capabilities in Go

go-linq A powerful language integrated query (LINQ) library for Go. Written in vanilla Go, no dependencies! Complete lazy evaluation with iterator pat

Jan 7, 2023
Lightweight web framework based on net/http.

Goweb Light weight web framework based on net/http. Includes routing middleware logging easy CORS (experimental) Goweb aims to rely only on the standa

Dec 21, 2022
a golang web mvc framework, like asp.net mvc.

goku goku is a Web Mvc Framework for golang, mostly like ASP.NET MVC. doc & api Installation To install goku, simply run go get github.com/QLeelulu/go

Dec 7, 2022
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

fasthttp Fast HTTP implementation for Go. Currently fasthttp is successfully used by VertaMedia in a production serving up to 200K rps from more than

Jan 5, 2023
xlog is a logger for net/context aware HTTP applications
xlog is a logger for net/context aware HTTP applications

⚠️ Check zerolog, the successor of xlog. HTTP Handler Logger xlog is a logger for net/context aware HTTP applications. Unlike most loggers, xlog will

Sep 26, 2022