This is the latest state I got to near completion before I had to abandon the Parallelcoin project.
This is a commandline/environment args/config file system with a custom atomic configuration values list system that uses a novel combinatorics based linting system to check on programmer errors as well as the standard sanitizers and whatnot.
This is a simple implementation of a Reed Solomon error correction codec used in the multicast miner control system (more on that later).
It's a very simple implementation, each packet has a checksum and the FEC generates the parity shard, if these or the data shards have corruption and the checksum fails it is erased and the FEC codec reconstructs the data shards from the non-corrupted pieces it can find that number to the required minimum shards (more doesn't help).
It's super simple, just generates a cipher to use with a Galois Counter Mode AES encryption with password expansion using argon2.
- https://github.com/l0k18/p9/blob/main/pkg/blockchain/forkplan9.go and https://github.com/l0k18/p9/blob/main/pkg/blockchain/forkhalcyon.go
The first is an EWMA based proportional dynamic adjustment that works with the multi-block-interval (9 with progressive doubling of the interval time and reward for the blocks. It takes overall averages and then also the interval specific averages to generate a difficulty adjustment. Note that it uses floating point math, which is an error, subsequent work I have written the adjustment using pure fixed point math based on signed integers.
This is the main core of an IPC pipe for connecting multiple processes together. It can launch a child process which attaches to stdin/out to implement a simple binary codec transport for the API of the multiple processes.
The miner and for reasons of Go's scheduler not being as much parallel as concurrent, the worker processes are a dual thread with a message handler in a main background process and the foreground is the actual mining work loop which is single threaded.
By making the mining threads into independent kernel processes the performance of the miner was improved by around 20% by shifting scheduling off to the kernel. It may have been possible to schedule it better for parallel operation with some intrusive tweaks in the concurrency architecture but it was simpler to just offload it to the kernel.
This is an alternative version of the widget set you can find at https://gioui.org - the Gio GUI library. This was started by my colleague in Parallelcoin, and I added to this library a scrollbar for the scrolling list widget. I do want to at some point rework this completely, you can find https://github.com/cybriq/pokaz a new attempt to take this further. In Pokaz I am rewriting everything from Gel to split the actual graphics processing queue into mapping first then rendering after so it can make a fully functional viewport with drag scrolling, horizontal and vertical scrollbars, and reworking the entire interface to use Fluent Programming style chained methods and minimize the complexity of specifying an interface, yeah, eventually to write a binary IPC to create a complete windowing system like X or Wayland, in pure Go, that transparently can run on all desktop and mobile platforms.
This is just a simple thing that expands upon simple chan struct{}
for trigger and breaker switching that tolerates panic-inducing events normally but logs errors so the programmer can see they need to not close a channel or to change the queuing or whatever.
This is a github account I made to collect specific things out of the project. It grew mostly out of the pieces referred to in the previous section for p9, the parallelcoin upgraded node.
This is just a simple mirror of https://gioui.org where I have removed all of the layout/widget frameworks in the package as I want this to be separated from the rest.
This is the beginnings of a rewrite to allow pre-render calculation to be separated from the render phase to enable implementation of a fast viewport (scrollable window panel).
- the rest
Most of the rest of the parts are related to elements from p9, the opts
for creating the concurrent safe configuration database, interrupt, which has a mostly working server restart functionality in addition to handling interrupt signals from the OS.
This is a logging system which can be adapted to write logs not just to stderr but any arbitrary writer, which can be used to write to files, or to put through a network connection and streamed to another node via some sort of network transport handler. It captures the code locations for every log and integrated with a version variables library connected to it trims the code locations down to the relative file path and several terminal emulators can be programmed using regex to implement hyperlinking, which I use extensively in my work, either by this library of mine or by adopting the one in the repo (such as ethereum's logger as I was working with Energi's node) which I modified slightly so it put the code locations in a way that my regex was configured to recognise.
It is unfortunately not in a working state but at one point I wrote a server monitor GUI that lets you run a server from the source code repository, it had a scrolling, clickable list of log entries that triggered an arbitrary command execution such as to open code location in Goland, and a tree widget to filter the log by subsystems (package hierarchy).