p9

module
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2022 License: Unlicense

README

The ParallelCoin Pod

This is an all-in one, single binary, monorepo that contains the blockchain node, wallet, miner, CLI RPC client, and GUI for both the current legacy chain, and a substantial upgrade to the protocol that will fork the chain in the near future to bring the network up to date and fix its difficulty adjustment problems, and introduce a new proof of work and multi-interval block schedule that improves the chain's precision in difficulty adjustment.

Building

Please note that the following instructions have been tested and worked on Pop OS 21 (should be the same for ubuntu 21, also should work on ubuntu 20). The generators may not work but the prereqs have been updated to add things that seem to be missing for ubuntu 21 base.

The ParallelCoin Pod is by default dependent on go 1.16 or later. It likely can build on earlier versions but newer is generally better, at least with the Go compiler codebase, unlike with many other languages like Java and C++ where it's a crap shoot whether it's a good idea to upgrade (eg, Goland's linux implementation since the beginning of 2021).

In the prereqs/ folder you can find scripts that will install the needed dependencies on Ubuntu, Fedora and Arch Linux. (apt, rpm and yay, respectively)

To build correctly, so the versions are updated, first you should build the builder script:

cd path/to/repository/root
go install ./pod/podbuild/.

This assumes you have correctly put the $GOBIN environment variable path into your shell's path, as go build has the undesirable behaviour of dropping the binary into the repository filesystem tree. The same applies for the rest of these instructions.

Next, to update all the things (for now just ignore the generator failures relating to the gio shader compilation, they are pre-generated):

podbuild generate

Next, build and install the binary into your $GOBIN folder:

podbuild install

And now, pod will get you started and show you the wallet creation screen, unless you already did that.

If you are building for a headless, server version, such as a chain/wallet for supporting applications using blockchain/wallet data, use the tag headless to leave out the GUI component.

Other platforms

The instructions above basically are the same, except for the differences in how to set up environment variables, on Mac, Windows, and FreeBSD.

To build the android version, you can use the gogio fork found at pkg/gel/gio/gogio. The same tooling should allow also building for iOS devices.

There is a appstore build tag that removes the miner code from the output binaries, as the duopoly of app curation have agreed in concert to ban any mining application, without any exceptions, such as, for example, the fact that 'cpu mining' is one of the 4 primary functions this application performs, and it is not deceptive in this respect.

With the shortage of CPUs, we anticipate that some people will want to install the packages anyway, these non-appstore build tag versions will be made available in binary releases alongside the rest of the versions, including headless for fast deployment.

Design goal of this project:

It is the belief of the ParallelCoin team that a blockchain network that has a 'centre' is defeating the whole purpose of the technology, and as such, the elimination of the utility of special purpose mining hardware is a key goal of this upgrade.

The proof of work is based on long division, which cannot be accelerated any faster with custom silicon of a lower pitch than a modern CPU or GPU. There is currently no implementation of the hash function, tentatively called DivHash, for GPU, however, it must be pointed out that being that GPUs (and mobile CPUs) have 32 bit wide dividers and thus have half the performance per clock cycle. Long division circuits are the largest single processing unit on CPU chips, and the procedure for calculating it is little different than how it is done manually by hand - requiring times tables, and proceeding one digit at a time from most to the least significant digit.

Thus, the state-of-the-art technology for performing this hash function is already the CPU, and implicitly, could not possibly be made faster without the most advanced chip making hardware that is primarily only available for making CPUs due to economics.

The hash function jumbles and concatenates the raw block bytes, splits into two, squares each half, and then multiplies the halves, and finally divides by a jumbled version of the starting bytes. This is then repeated 3 times until a number is produced of the order of 20-40kb in size. It is possible to make this work target even harder, but beyond 3 cycles it starts to demand so much memory transfer that runs lower than one hash per second and 5 cycles produces nearly half a megabyte of data at the end.

The result of the calculation is then hashed using the fast Blake3 hash function, to yield the result. Since there is no realistic way in which with such large numbers it could ever be shortcut, to produce the output value that goes through the hash function, this proof of work should permanently remain impossible to accelerate.

This is very important to containing the tendency towards centralisation, as on the whole, CPUs can perform the calculations at a rate that has not accelerated much faster than the raising of clock speeds, and thus a current model CPU, compared to one 4 years old, is not so dramatically faster, either.

Most of the performance improvements come from larger amounts of on-chip cache memory, which is also the most expensive, and fastest memory there is. Without any easy way to acquire large numbers of processors to perform the work, without heavily competing with a currently (April 2021) very overstretched chip manufacturing industry.

It should ensure that no single miner, or even, as is the case with BTC and ETH, 20-30 miners, can dominate the mining, and thus threaten the security and stability of the network through either monopolistic practices or the incursion of government agencies into the business, in any one country, as the bulk of usable processors are distributed pretty evenly across the world in proportion with the relative size of the national economies.

The miner's primary setup, contrary to standard designs, uses a multicast gossip protocol to deliver new block templates to miner workers, and the sending of solutions back to the nodes, based on a pre-shared key for basic symmetric encryption security.

Directories

Path Synopsis
cmd
ctl
gui
misc/jrnl
This is just a convenient cli command to automatically generate a new file for a journal entry with names based on unix timestamps
This is just a convenient cli command to automatically generate a new file for a journal entry with names based on unix timestamps
node
Package node is a full-node Parallelcoin implementation written in Go.
Package node is a full-node Parallelcoin implementation written in Go.
node/integration/rpctest
Package rpctest provides a pod-specific RPC testing harness crafting and executing integration tests by driving a `pod` instance via the `RPC` interface.
Package rpctest provides a pod-specific RPC testing harness crafting and executing integration tests by driving a `pod` instance via the `RPC` interface.
wallet
Package wallet Copyright (c) 2015-2016 The btcsuite developers
Package wallet Copyright (c) 2015-2016 The btcsuite developers
pkg
addrmgr
Package addrmgr implements concurrency safe Bitcoin address manager.
Package addrmgr implements concurrency safe Bitcoin address manager.
amt
base58
Package base58 provides an API for working with modified base58 and Base58Check encodings.
Package base58 provides an API for working with modified base58 and Base58Check encodings.
blockchain
Package blockchain implements bitcoin block handling and chain selection rules.
Package blockchain implements bitcoin block handling and chain selection rules.
btcjson
Package btcjson provides primitives for working with the bitcoin JSON-RPC
Package btcjson provides primitives for working with the bitcoin JSON-RPC
chaincfg
Package chaincfg defines chain configuration parameters.
Package chaincfg defines chain configuration parameters.
chainhash
Package chainhash provides abstracted hash functionality.
Package chainhash provides abstracted hash functionality.
chainrpc/hashrate
Package hashrate is a message type for Simplebuffers generated by miners to broadcast an IP address, a count and version number and current height of mining work just completed.
Package hashrate is a message type for Simplebuffers generated by miners to broadcast an IP address, a count and version number and current height of mining work just completed.
connmgr
Package connmgr implements a generic Bitcoin network connection manager.
Package connmgr implements a generic Bitcoin network connection manager.
database
Package database provides a block and metadata storage database.
Package database provides a block and metadata storage database.
database/ffldb
Package ffldb implements a driver for the database package that uses leveldb or the backing metadata and flat files for block storage.
Package ffldb implements a driver for the database package that uses leveldb or the backing metadata and flat files for block storage.
ecc
Package btcec implements support for the elliptic curves needed for bitcoin.
Package btcec implements support for the elliptic curves needed for bitcoin.
fec
Package fec implements Reed Solomon 9/3 forward error correction,
Package fec implements Reed Solomon 9/3 forward error correction,
fork
Package fork handles tracking the hard fork status and is used to determine which consensus rules apply on a block
Package fork handles tracking the hard fork status and is used to determine which consensus rules apply on a block
gcm
gcs
Package gcs provides an API for building and using a Golomb-coded set filter.
Package gcs provides an API for building and using a Golomb-coded set filter.
gel
Package gui implements the plan 9 from crypto space Gio GUI theme
Package gui implements the plan 9 from crypto space Gio GUI theme
gel/gio/app
Package app provides a platform-independent interface to operating system functionality for running graphical user interfaces.
Package app provides a platform-independent interface to operating system functionality for running graphical user interfaces.
gel/gio/app/internal/log
Package points standard output, standard error and the standard library package log to the platform logger.
Package points standard output, standard error and the standard library package log to the platform logger.
gel/gio/app/internal/wm
package wm implements platform specific windows and GPU contexts.
package wm implements platform specific windows and GPU contexts.
gel/gio/app/internal/xkb
Package xkb implements a Go interface for the X Keyboard Extension library.
Package xkb implements a Go interface for the X Keyboard Extension library.
gel/gio/app/permission
Package permission includes sub-packages that should be imported by a Gio program or by one of its dependencies to indicate that specific operating-system permissions are required.
Package permission includes sub-packages that should be imported by a Gio program or by one of its dependencies to indicate that specific operating-system permissions are required.
gel/gio/app/permission/bluetooth
Package bluetooth implements permissions to access Bluetooth and Bluetooth Low Energy hardware, including the ability to discover and pair devices.
Package bluetooth implements permissions to access Bluetooth and Bluetooth Low Energy hardware, including the ability to discover and pair devices.
gel/gio/app/permission/camera
Package camera implements permissions to access camera hardware.
Package camera implements permissions to access camera hardware.
gel/gio/app/permission/networkstate
Package networkstate implements permissions to access network connectivity information.
Package networkstate implements permissions to access network connectivity information.
gel/gio/app/permission/storage
Package storage implements read and write storage permissions on mobile devices.
Package storage implements read and write storage permissions on mobile devices.
gel/gio/cmd/gogio
The gogio tool builds and packages Gio programs for Android, iOS/tvOS and WebAssembly.
The gogio tool builds and packages Gio programs for Android, iOS/tvOS and WebAssembly.
gel/gio/f32
Package f32 is a float32 implementation of package image's Point and Rectangle.
Package f32 is a float32 implementation of package image's Point and Rectangle.
gel/gio/font/gofont
Package gofont exports the Go fonts as a text.Collection.
Package gofont exports the Go fonts as a text.Collection.
gel/gio/font/opentype
Package opentype implements text layout and shaping for OpenType files.
Package opentype implements text layout and shaping for OpenType files.
gel/gio/gesture
Package gesture implements common pointer gestures.
Package gesture implements common pointer gestures.
gel/gio/gpu
Package gpu implements the rendering of Gio drawing operations.
Package gpu implements the rendering of Gio drawing operations.
gel/gio/gpu/headless
Package headless implements headless windows for rendering an operation list to an image.
Package headless implements headless windows for rendering an operation list to an image.
gel/gio/gpu/internal/rendertest
Package rendertest is intended for testing of drawing ops only.
Package rendertest is intended for testing of drawing ops only.
gel/gio/internal/byteslice
Package byteslice provides byte slice views of other Go values such as slices and structs.
Package byteslice provides byte slice views of other Go values such as slices and structs.
gel/gio/internal/cocoainit
Package cocoainit initializes support for multithreaded programs in Cocoa.
Package cocoainit initializes support for multithreaded programs in Cocoa.
gel/gio/internal/scene
Package scene encodes and decodes graphics commands in the format used by the compute renderer.
Package scene encodes and decodes graphics commands in the format used by the compute renderer.
gel/gio/internal/stroke
Package stroke implements conversion of strokes to filled outlines.
Package stroke implements conversion of strokes to filled outlines.
gel/gio/io/event
Package event contains the types for event handling.
Package event contains the types for event handling.
gel/gio/io/key
Package key implements key and text events and operations.
Package key implements key and text events and operations.
gel/gio/io/pointer
Package pointer implements pointer events and operations.
Package pointer implements pointer events and operations.
gel/gio/io/profile
Package profiles provides access to rendering profiles.
Package profiles provides access to rendering profiles.
gel/gio/io/router
Package router implements Router, a event.Queue implementation that that disambiguates and routes events to handlers declared in operation lists.
Package router implements Router, a event.Queue implementation that that disambiguates and routes events to handlers declared in operation lists.
gel/gio/io/system
Package system contains events usually handled at the top-level program level.
Package system contains events usually handled at the top-level program level.
gel/gio/layout
Package layout implements layouts common to GUI programs.
Package layout implements layouts common to GUI programs.
gel/gio/op
Package op implements operations for updating a user interface.
Package op implements operations for updating a user interface.
gel/gio/op/clip
Package clip provides operations for clipping paint operations.
Package clip provides operations for clipping paint operations.
gel/gio/op/paint
Package paint provides drawing operations for 2D graphics.
Package paint provides drawing operations for 2D graphics.
gel/gio/unit
Package unit implements device independent units and values.
Package unit implements device independent units and values.
gel/gio/widget
Package widget implements state tracking and event handling of common user interface controls.
Package widget implements state tracking and event handling of common user interface controls.
gel/gio/widget/material
Package material implements the Material design.
Package material implements the Material design.
indexers
Package indexers implements optional block chain indexes.
Package indexers implements optional block chain indexes.
indexers/index
Package indexers implements optional block chain indexes.
Package indexers implements optional block chain indexes.
log
mempool
Package mempool provides a policy-enforced pool of unmined bitcoin transactions.
Package mempool provides a policy-enforced pool of unmined bitcoin transactions.
netsync
Package netsync implements a concurrency safe block syncing protocol.
Package netsync implements a concurrency safe block syncing protocol.
peer
Package peer provides a common base for creating and managing Bitcoin network peers.
Package peer provides a common base for creating and managing Bitcoin network peers.
qu
rpcclient
Package rpcclient implements a websocket-enabled Bitcoin JSON-RPC client.
Package rpcclient implements a websocket-enabled Bitcoin JSON-RPC client.
transport
Package transport provides a listener and sender channel for unicast and multicast UDP IPv4 short message chat protocol with a pre shared key, forward error correction facilities with a nice friendly declaration syntax
Package transport provides a listener and sender channel for unicast and multicast UDP IPv4 short message chat protocol with a pre shared key, forward error correction facilities with a nice friendly declaration syntax
txauthor
Package txauthor provides transaction creation code for wallets.
Package txauthor provides transaction creation code for wallets.
txrules
Package txrules provides transaction rules that should be followed by transaction authors for wide mempool acceptance and quick mining.
Package txrules provides transaction rules that should be followed by transaction authors for wide mempool acceptance and quick mining.
txscript
Package txscript implements the bitcoin transaction script language.
Package txscript implements the bitcoin transaction script language.
txsizes
Package txsizes Copyright (c) 2016 The btcsuite developers
Package txsizes Copyright (c) 2016 The btcsuite developers
util
Package util provides bitcoin-specific convenience functions and types.
Package util provides bitcoin-specific convenience functions and types.
util/hdkeychain
Package hdkeychain provides an API for bitcoin hierarchical deterministic extended keys (BIP0032).
Package hdkeychain provides an API for bitcoin hierarchical deterministic extended keys (BIP0032).
util/helpers
Package helpers provides convenience functions to simplify wallet code.
Package helpers provides convenience functions to simplify wallet code.
util/treap
Package treap implements a treap data structure that is used to hold ordered key/value pairs using a combination of binary search tree and heap semantics.
Package treap implements a treap data structure that is used to hold ordered key/value pairs using a combination of binary search tree and heap semantics.
util/zero
Package zero Copyright (c) 2015 The btcsuite developers
Package zero Copyright (c) 2015 The btcsuite developers
waddrmgr
Package waddrmgr provides a secure hierarchical deterministic wallet address manager.
Package waddrmgr provides a secure hierarchical deterministic wallet address manager.
walletdb
Package walletdb provides a namespaced database interface for btcwallet.
Package walletdb provides a namespaced database interface for btcwallet.
walletdb/bdb
Package bdb implements an instance of walletdb that uses boltdb for the backing datastore.
Package bdb implements an instance of walletdb that uses boltdb for the backing datastore.
walletdb/ci
Package ci provides exported tests that can be imported and consumed by walletdb driver tests to help ensure that drivers confirm to the database driver interface correctly.
Package ci provides exported tests that can be imported and consumed by walletdb driver tests to help ensure that drivers confirm to the database driver interface correctly.
wire
Package wire implements the bitcoin wire protocol.
Package wire implements the bitcoin wire protocol.
wtxmgr
Package wtxmgr provides an implementation of a transaction database handling spend tracking for a bitcoin wallet.
Package wtxmgr provides an implementation of a transaction database handling spend tracking for a bitcoin wallet.
pod
config
Package podopts is a configuration system to fit with the all-in-one philosophy guiding the design of the parallelcoin pod.
Package podopts is a configuration system to fit with the all-in-one philosophy guiding the design of the parallelcoin pod.
config/genopts
This generator reads a podcfg.Configs map and spits out a podcfg.Config struct
This generator reads a podcfg.Configs map and spits out a podcfg.Config struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL