Legion Miner

a self-organizing farm miner for Salvium, Veil, and other cpu coins

Legion is a native multi algorithm miner. As a single miner it works like xmrig: it mines to any stratum pool, to p2pool, or solo to a node. On top of that it runs the Legion, where miners on a network find each other and divide the nonce search space among themselves, so no two boxes ever grind the same nonces, with no pool, proxy, or central coordinator.

The Legion

Point a group of boxes at the same network and they self-organize into a farm over a small udp gossip. Each box independently works out the same split, sized to its own hashrate, and claims its slice of the search. Boxes can join or leave at any time and the farm re-divides on its own. There is nothing to configure and nothing in the middle to run.

Miners only pair with others doing the same work. The algorithm and the pool or daemon together decide which farm a box belongs to, so a Salvium farm and a Veil farm on one network stay separate without being told to, and nobody divides a search space they do not share.

It is honest about what that buys you. It does not make any single box hash faster. It stops boxes from wasting effort on nonces another box already tried, so more of the farm's work goes into distinct search. The gain depends on how much overlap your setup had; a farm that was already spread out sees little, a farm that was piling into the same range sees more.

No coordinator

peer to peer over udp, no pool or proxy needs to know or cooperate.

Weighted

each box's slice is sized to its measured hashrate, not an equal cut.

Self-healing

boxes join and leave freely, the partition re-derives with no restart.

Works solo too

coordinates the farm even mining straight to your own node, where a pool-side scheme cannot.

Efficiency

Legion reads the pool's job feed on a dedicated thread and drops a stale template the instant a new one lands, so it almost never submits a share for a job that has already rolled. Swapped onto the same hardware, xmrig ran about 3% rejected shares where Legion runs effectively zero. A rejected share is work the pool throws away, so cutting them is the same watts with more of the result counting. The gain is largest on slow or high latency boxes, where a laptop or phone that was losing 10% or more of its shares to staleness gets nearly all of it back.

Algorithms

One flag picks the algorithm, and every one of them is validated against real blocks from its own chain rather than against published vectors. The tests rebuild a mined block's hashing input and reproduce the proof of work the network accepted, because a miner that hashes plausibly and wrongly looks exactly like bad luck.

Veil

Veil runs three proof of work lanes side by side, each with its own difficulty, and a miner picks one and stays on it. Legion mines all three straight from a Veil node over its rpc, with no pool in between. Pick the lane with the same --algo flag and the node supplies the work.

--algo is REQUIRED on Veil, and the miner exits asking for it rather than choosing. A default would mean somebody with a gpu quietly mines the cpu lane and never learns there was a choice, so it refuses to guess.

Veil is hybrid, and the chain stops accepting proof of work after a run of it until a stake block lands. Legion tracks that run from the tip and stands its workers down until the chain reopens, rather than submitting blocks the node will reject as bad-pow, too many consecutive pow blocks. A miner that does not know the rule reads its own valid work as bad luck.

Gpu

The ProgPoW lane runs on a gpu through Vulkan rather than OpenCL, for a plain reason: Vulkan is already there. A stock Linux desktop ships drivers for amd, intel and nvidia, Windows ships it with the gpu driver, and Android has had it since 7. Nothing has to be installed, which is the usual reason gpu mining does not start.

It is honest about the cost. The dag is 4.71gb, so a gpu box needs that much memory and the same again on disk to cache it, built once every few days and reloaded in seconds after that. --list-gpus reports every device and whether it could actually mine, rather than just listing hardware.

Also

Quick start

Mine to a pool. The Legion is on by default, so a group of boxes on the same network find each other with no extra flags:

legion-miner -p pool.example.com:4444 -u <wallet>

Write a live dashboard a browser can open:

legion-miner -p pool:4444 -u <wallet> --stats-html /var/www/legion.html

Reach a farm on another subnet with a seed peer:

legion-miner -p pool:4444 -u <wallet> --legion-peer other-box:48711

Mine another algorithm, here Veil's asic lane straight to a Veil node:

legion-miner --coin veil --algo sha256d --daemon http://127.0.0.1:8332 \
  --rpc-user <user> --rpc-pass <pass>

Mine Veil's gpu lane instead, and see what a box can do first:

legion-miner --list-gpus
legion-miner --coin veil --algo progpow-gpu --daemon http://127.0.0.1:8332 \
  --rpc-user <user> --rpc-pass <pass>

Mine alone, opting out of the Legion, with condensed xmrig style output:

legion-miner -p pool:4444 -u <wallet> --standalone --clean

Update in place to the latest published build:

legion-miner --check-upgrade  # report if a newer build exists
legion-miner --upgrade        # download, verify, and swap it in

Run legion-miner --help for the full option set.

Download

Prebuilt binaries for Linux, Windows, macOS, arm64, and Android:

GitHub releases GitLab releases

Legion Miner is closed source. The binaries are free to use.