#handler #block #pool #miner #validate #pay #found

app packetcrypt

PacketCrypt proof of work algorithm

4 releases

0.3.1 Oct 19, 2020
0.1.2 Oct 15, 2020
0.1.1 Oct 15, 2020
0.1.0 Jul 30, 2020

#10 in #pay

LGPL-2.1-only OR LGPL-3.0-only

82KB
2K SLoC

packetcrypt_rs

PacketCrypt implementation in Rust

What exists

PacketCrypt mining is made up of 6 distinct components:

  • Master - provides work and config files to everyone for a given pool
  • Announcement Miner - generates announcements (data which uses bandwidth)
  • Announcement Handler - consumes announcements, checks validity and provides to block miner
  • Block Miner - uses announcements for for mining blocks
  • Block Handler - takes shares from Block Miner and validates them
  • Paymaker - takes messages from Block Handler and Announcement Handler to decide which miners the pool should pay

The Master, Announcement Handler, Block Handler, and Paymaker must be operated by the mining pool, the Announcement Miner and Block Miner can be operated by 3rd parties.

This codebase currently provides the Announcement Handler and Announcement Miner components. All of the others can be found in the C PacketCrypt project.

Install

  • Install rust if you haven't, see: rustup
  • Install using cargo: cargo install packetcrypt

Mine announcements

  • packetcrypt ann <pool url> --paymentaddr <your PKT addr>

For more information packetcrypt help ann

Run an Announcement Handler

If you're running a pool, you can use the Rust announcement handler as follows:

  • packetcrypt ah -C /path/to/pool.toml

See pool.example.toml for information about what should be in your pool.toml file.

For more information packetcrypt help ah

Env vars

  • RUST_LOG=packetcrypt=debug for better logging
  • RUST_BACKTRACE=1 for backtraces on errors (including non-critical ones)

License

LGPL-2.1 or LGPL-3.0, at your option

Dependencies

~39MB
~495K SLoC