Crates.io | ore-pool-types |
lib.rs | ore-pool-types |
version | 0.2.2 |
source | src |
created_at | 2024-10-11 19:15:51.529993 |
updated_at | 2024-12-02 20:26:15.103318 |
description | Types for interacting with the API of a pool server |
homepage | https://ore.supply |
repository | https://github.com/regolith-labs/ore-pool |
max_upload_size | |
id | 1405734 |
size | 10,543 |
Infrastructure for operating ORE mining pools.
Must cargo run
the admin application before starting server.
ore-cli
.COMMAND="init" RPC_URL="" KEYPAIR_PATH="" POOL_URL="" cargo run --release
COMMAND="open-stake" MINT="" RPC_URL="" KEYPAIR_PATH="" cargo run --release
There are many parameters that the server supports via env vars. Including which boost accounts to support. How often to attribute members. And the webhook configuration.
RPC_URL="" KEYPAIR_PATH="" DB_URL="" ATTR_EPOCH="60" STAKE_EPOCH="60" BOOST_ONE="" HELIUS_API_KEY="" HELIUS_AUTH_TOKEN="" HELIUS_WEBHOOK_ID="" HELIUS_WEBHOOK_URL="http://your-server.com/webhook/share-account" OPERATOR_COMMISSION="" STAKER_COMMISSION="" RUST_LOG=info cargo run --release
The server depends on two helius webhooks.
You'll need to create both webhooks manually in the helius dashboard. They 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 at least one address to listen for initially. For the share accounts webhook you can put any pubkey there initially,
the server will idempotently PUT to that list as new stakers join the pool (deleting the initial account you put there). For the proof account webhook, 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.
Pass the webhook id for the share accounts to the server as an env var.
One last detail is that testing on devnet the webhook client will set the RPC environment to mainnet. This isn't a problem in production. But if you happen to be testing in devnet, you'll need to manually keep an eye on that. We could fix this by including the RPC env in the PUT body. But we haven't seen that as a supported field, yet.
ore-cli
.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.To spin up the database locally:
docker-compose up