6 releases (3 stable)

new 1.2.0 Jan 22, 2025
1.1.0 Jan 15, 2025
0.2.2 Dec 2, 2024
0.2.0 Oct 26, 2024
0.1.0 Oct 11, 2024

#406 in Magic Beans

Download history 89/week @ 2024-10-05 543/week @ 2024-10-12 175/week @ 2024-10-19 378/week @ 2024-10-26 227/week @ 2024-11-02 98/week @ 2024-11-09 109/week @ 2024-11-16 89/week @ 2024-11-23 309/week @ 2024-11-30 90/week @ 2024-12-07 90/week @ 2024-12-14 205/week @ 2024-12-21 36/week @ 2024-12-28 46/week @ 2025-01-04 291/week @ 2025-01-11 496/week @ 2025-01-18

893 downloads per month
Used in ore-cli

Apache-2.0 and LGPL-3.0-only

10KB
100 lines

ORE Pool (beta)

Infrastructure for operating ORE mining pools.

Admin

Must cargo run the admin application before starting server.

Creates the pool and member accounts on-chain which the server expects to exist upon starting. A member account is created because we need an account to write the pool commissions to. You can manage this member account (balance, claim, etc.) from the ore-cli.

# cd ./admin
COMMAND="init" RPC_URL="" KEYPAIR_PATH="/my/path/id.json" POOL_URL="" cargo run --release

Server

Start the server. Parameterized via env vars.

# cd ./server
RPC_URL="" KEYPAIR_PATH="/my/path/id.json" DB_URL="" ATTR_EPOCH="60" HELIUS_AUTH_TOKEN="" OPERATOR_COMMISSION="" RUST_LOG=info cargo run --release

Webhook

The server depends on a Helius webhook, for parsing the mining events asynchronously.

  • You'll need to create the webhook manually in the helius dashboard. It should be of type raw.
  • Also will need to generate an auth token that helius will include in their POST requests to your server. Pass this as an env var to the server.
  • Creating new webhooks requires specifying the account address(es) to listen for. You want to put the proof account pubkey that belongs to the pool. You can find this pubkey by running the proof-account command in the admin server.

Considerations

  • This implementation is still in active development and is subject to breaking changes.
  • The idea is for this to be a reference implementation for operators.
  • Feel free to fork this repo and add your custom logic.
  • Ofc we're accepting PRs / contributions. Please help us reach a solid v1.0.0.
  • This implementation is integrated with the official ore-cli.
  • If you fork and change things, just make sure you serve the same HTTP paths that the ore-cli is interfacing with. If you do that, people should be able to participate in your pool with no additional installs or changes to their client.
  • For reference, you'll find the required HTTP paths here and also the client-side API types here.

Local database

To spin up the database locally:

docker-compose up

Dependencies

~18–27MB
~455K SLoC