PKT development, not intended for production. Use https://github.com/pkt-cash/pktd https://github.com/pkt-cash/pktd/

deepsource-autofix[bot] 88c9287aa9 Format code with black, gofmt, yapf, autopep8, isort, standardrb, standardjs, prettier and rubocop 3 年之前
.github afa7ea4402 Delete trivy-analysis.yml 4 年之前
addrmgr 283823059a mainline/decred: apply code style best practices 4 年之前
blockchain 88c9287aa9 Format code with black, gofmt, yapf, autopep8, isort, standardrb, standardjs, prettier and rubocop 3 年之前
btcec f8d4108d44 Restyled by prettier-markdown 4 年之前
btcjson f8d4108d44 Restyled by prettier-markdown 4 年之前
btcutil 87e6c3e343 Format code with black, gofmt, yapf, autopep8, isort, standardrb, standardjs, prettier and rubocop 4 年之前
chaincfg 8546baca9c Format code with yapf, autopep8, isort, standardrb, prettier, standardjs, rubocop, black and gofmt 4 年之前
cmd 283823059a mainline/decred: apply code style best practices 4 年之前
connmgr 283823059a mainline/decred: apply code style best practices 4 年之前
contrib df98323b50 Update copyright, license, reporting info, docs. 4 年之前
database f8d4108d44 Restyled by prettier-markdown 4 年之前
docs f8d4108d44 Restyled by prettier-markdown 4 年之前
goleveldb f8d4108d44 Restyled by prettier-markdown 4 年之前
integration f8d4108d44 Restyled by prettier-markdown 4 年之前
lightning-onion f8d4108d44 Restyled by prettier-markdown 4 年之前
limits 952c6ec469 Split off txscript error to it's own package 5 年之前
lnd 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
mempool f8d4108d44 Restyled by prettier-markdown 4 年之前
mining f8d4108d44 Restyled by prettier-markdown 4 年之前
netsync 283823059a mainline/decred: apply code style best practices 4 年之前
neutrino f8d4108d44 Restyled by prettier-markdown 4 年之前
peer f8d4108d44 Restyled by prettier-markdown 4 年之前
pktconfig 283823059a mainline/decred: apply code style best practices 4 年之前
pktlog 8546baca9c Format code with yapf, autopep8, isort, standardrb, prettier, standardjs, rubocop, black and gofmt 4 年之前
pktwallet 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
rpcclient 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
txscript f8d4108d44 Restyled by prettier-markdown 4 年之前
wire f8d4108d44 Restyled by prettier-markdown 4 年之前
.deepsource.toml 6c1b0e4ecd Update .deepsource.toml 3 年之前
.gitignore 62d90ec1c9 manual merge 4 年之前
.gitlab-ci.yml a2611f3f43 Update CI/CD configuration 4 年之前
.mergify.yml 0e461fab2b Mergify: configuration update 4 年之前
.pktd_root a0a29f9570 multi: Appease linters, update documentation, etc. 4 年之前
.revive.config.toml c0b5116e3a Add .revive.config.toml: Revive configuration file 4 年之前
.travis.yml 36c5f879e6 Update .travis.yml 4 年之前
.whitesource f5f465fbfa Enable WhiteSource 4 年之前
LICENSE 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
README.md 88c9287aa9 Format code with black, gofmt, yapf, autopep8, isort, standardrb, standardjs, prettier and rubocop 3 年之前
config.go adf2ac5e47 for merge optimization: mainline btcd/decred style 4 年之前
cov_report.sh 004122932b cov: further simplify test/coverage script preMage 4 年之前
do 4a9de9e68f coverage: Simplify coverage script, now <100 LOC. 4 年之前
doc.go 9c415f4291 Remove the special-case support for SOCKS5 proxies 4 年之前
go.mod 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
go.sum df98323b50 Update copyright, license, reporting info, docs. 4 年之前
log.go 415519ec2a Get rid of logger-zoo and replace with single log package which uses stack introspection to decide whether or not to log in a given file 4 年之前
params.go 3c0f5cd2c5 Move some constants to other packages 4 年之前
pktctl c4162ca435 * Corrections to appease local builds & Travis 4 年之前
pktd.go 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
pktd_test_license_test.go 8729acba84 multi: Add proper attributions, fixup imports, etc 4 年之前
rpcadapters.go 952c6ec469 Split off txscript error to it's own package 5 年之前
rpcserver.go dde4805565 Add AMD64 highly parallel optimized SHA-256 hash 4 年之前
rpcserverhelp.go 1c1561af22 gofmt: Apply gofmt across selected sources... 4 年之前
rpcserverhelp_test.go 283823059a mainline/decred: apply code style best practices 4 年之前
rpcwebsocket.go dde4805565 Add AMD64 highly parallel optimized SHA-256 hash 4 年之前
server.go adf2ac5e47 for merge optimization: mainline btcd/decred style 4 年之前
service_windows.go 1d8a04ec8f Fix windows build 4 年之前
signal.go 415519ec2a Get rid of logger-zoo and replace with single log package which uses stack introspection to decide whether or not to log in a given file 4 年之前
signalsigterm.go 044a11c9fc btcd: Simplify shutdown signal handling logic. (#733) 8 年之前
upgrade.go 283823059a mainline/decred: apply code style best practices 4 年之前
upnp.go 283823059a mainline/decred: apply code style best practices 4 年之前

README.md

PKT Cash


A blockchain utilizing PacketCrypt, a new bandwidth-hard proof-of-work algorithm


ISC License PkgGoDev GoReport GitHubRelease GitHubTag LocCount GitHubCodeSize CoverageStatus TickgitTODOs


pktd

pktd is the reference full node PKT Cash implementation, written in Go.

pktd is the primary mainnet node software for the PKT blockchain. It is known to correctly download, validate, and serve the blockchain, using rules for block acceptance based primarily on Bitcoin Core, with the addition of PacketCrypt proofs to provide verification of the unique bandwidth-hard proof-of-work algorithm.

The PKT blockchain provides for a Network Steward, chosen by consensus, who receives a portion of the PKT mined from each block. The role of the Network Steward is to support the PKT blockchain and ecosystem, fighting for enhanced privacy and greater individual autonomy for all. Anyone holding PKT Cash is eligible to cast a vote to choose the Network Steward. The Network Steward's treasury account does not accumulate indefinitely - it "burns" any balance older than 129,600 blocks (~3 months), which encourages the Steward to use their PKT holdings to provide support and funding for worthy projects.

The pktd software is under active development - releases should be considered beta quality software. The unreleased code in the develop branch is highly experimental and of alpha quality - it has not yet been rigorously tested, and should not be used in production environments.

It is recommended that users run the most recent tagged release (or a checkout of the master branch) for production deployments.

The pktd full-node software utilizies peer-to-peer networking to relay newly mined blocks, as well as individual transactions not yet included in a block. It also maintains a local transaction pool, consisting of transactions that have been accepted, based on rules defined by network consensus. Transactions undergo strict checking and filtering based on miner-defined requirements, separating them into two classes: "standard" and "non-standard", allowing them to be processed accordingly.

Unlike most cryptocurrency software, pktd does NOT provide any "built-in" wallet capability. This intentional design decision was made to enhance overall security and software modularity. While this means you cannot make or receive payments using pktd directly; this functionality is provided by the bundled, but separate, pktwallet package. Additional alternative wallet packages are currently under active development.


Requirements

  • Go (Golang), release 1.14.1 or later, running on a supported 64-bit platform.
  • A somewhat recent release of Git (used to clone the repository, and by Go to download dependencies).

Building pktd

  • Using git, clone the project from the repository:
    • git clone -b develop-johnsonjh https://github.com/johnsonjh/pktd
  • Then, use the do script to build pktd, pktwallet, and pktctl:
    • cd pktd && ./do

Optionally, run extended tests and generate code coverage reports:

  • Using go get, install the gocov and gocov-html tools into your GOPATH:
    • GO111MODULES=off go get -t -u github.com/axw/gocov/gocov
    • GO111MODULES=off go get -t -u github.com/matm/gocov-html
  • Then, run the coverage generation script: (zsh, bash, ksh, or mksh required.)
    • PATH=$(go env GOPATH)/bin:${PATH} ./cov_report.sh

Linux Distributions

It is highly recommended to use the official Go toolchain distributed by Google, available for download from the Go homepage.

Software built and packaged for Linux distributions is often compiled with different defaults and non-standard patches, often deviating significantly from the corresponding official upstream release. This usually done to meet distribution-specific policies and requirements, but presents a unique hazard for software software such as pktd, operating on distributed consensus. This class of software is unique, in that it must maintain bug-for-bug compatibility in consensus-critical codepaths. Nodes which incorporate their own changes, even well-intentioned "fixes", may not be able to properly interoperate on the main network, and, in sufficient numbers, these nodes could, unintentionally, create an isolated or 'forked' blockchain, usable only by other similarly broken nodes.

While not currently the source of any known issue, Red Hat will backport cherry-picked updates from unreleased versions (or produce their own patches) to fix specific issues in their releases. They are also known to currently ship a Go distribution with a much different linker configuration than the upstream. Debian is well known for making changes to upstream sources, often extensively, sometimes incorrectly.

For these reasons, support can only be provided for Linux when the software is compiled from unmodified source code, using the official toolchain. If you have any doubts about your installed Go software, Google provides an automated Go installer for Linux.


Documentation

Currently, documentation for pktd, pktwallet, and pktctl is a "work-in-progress".

GoDoc documentation is provided, but is mostly developer-focused at this time. It can be viewed by running godoc -http=:6543 in the directory containing the pktd source code tree, then loading http://localhost:6543/pkg/github.com/johnsonjh/pktd/ in a web browser.

The same GoDoc documentation is also available at pkg.go.dev/github.com/johnsonjh/pktd, which does not require a local copy of the source code, or the godoc tool installed.

There is also documentation in the docs directory of the source tree available for review.


Community

  • PKT.chat is a Matterfoss server providing real-time interaction for the PKT community.
  • Other options are available and listed on the PKT.cash web site.

License

pktd is licensed under the Copyfree ISC License.