Skip to content

Instantly share code, notes, and snippets.

@pool2win
Created January 31, 2025 09:16
Show Gist options
  • Save pool2win/253e4c4308c0dd874b22abcca35cd365 to your computer and use it in GitHub Desktop.
Save pool2win/253e4c4308c0dd874b22abcca35cd365 to your computer and use it in GitHub Desktop.

Hydra - a FOSS Mining Pool

Hydrapool is a an effort to build a free and open source pool that anyone can run and provide pooling services to miners.

A FOSS bitcoin mining pool will use FOSS components and be available under a FOSS license for improvements by the community as needs arrive.

I want to capture some high level functional requirements here and propose an execution plan to kick off some discussion around building a FOSS pool.

Requirements

  1. Dockerized bitcoind and ckpool.

  2. Secure and scalable database solution to retain shares.

  3. User registration and stratum configurations.

  4. APIs for community to audit the pool.

  5. Continuous integration for confidently improving the software.

  6. Scalability testing to handle 10s of thousands of miners on each Hydra instance.

  7. DDoS prevention and testing.

  8. Support for tor using an onsite proxy.

Using Off The Shelf Components

We need to build the above components and there are a few FOSS components available that we can use to ship this.

Here is a list of components that we can use to put together a working FOSS pool. I highlight the license each of them use.

  1. bitcoind - MIT

  2. ckpool - GPL

  3. Docker CE - Apache 2.0

  4. PostgreSQL - PostgreSQL License (MIT derivative)

  5. Github CI to start off - Free for FOSS projects

Other things we need to build will be licensed as FOSS

  1. Rust web API

  2. A simple web frontend

DDoS Protection

Without depending on centralised services like cloudflare, DDoS protection will be a challenge. The only way around it is to use Tor’s hidden services that offer DDoS protection. Tor will also enable the Hydra to survive longer. However, this will add latency and we need to investigate the impact of the time lost in pushing new blocks out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment