Mining/miner/proxy/doc/STRATUM_EXT.md
snider 69376b886f feat: Rebrand xmrig to miner and vendor XMRig ecosystem
Complete rebranding of all components:
- Core miner: xmrig -> miner (binary, version.h, CMakeLists.txt)
- Proxy: xmrig-proxy -> miner-proxy
- CUDA plugin: xmrig-cuda -> miner-cuda
- Heatmap: xmrig-nonces-heatmap -> miner-nonces-heatmap
- Go CLI wrapper: miner-cli -> miner-ctrl

Vendored XMRig ecosystem into miner/ directory:
- miner/core - XMRig CPU/GPU miner
- miner/proxy - Stratum proxy
- miner/cuda - NVIDIA CUDA plugin
- miner/heatmap - Nonce visualization tool
- miner/config - Configuration UI
- miner/deps - Pre-built dependencies

Updated dev fee to use project wallet with opt-out (kMinimumDonateLevel=0)
Updated branding to Lethean (domain, copyright, version 0.1.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 19:43:02 +00:00

83 lines
2.4 KiB
Markdown

# Stratum protocol extensions
## 1. Mining algorithm negotiation
Subset of protocol extensions, used to negotiate algorithm between miner and pool/proxy. All extensions is backward compatible with standart stratum protocol.
### 1.1. Miner defined algorithms list
Miner should send list of [algorithms](#14-algorithm-names-and-variants) supported. Multiple algorithms in list meant miner can switch algorithms in runtime.
```json
{
"id": 1, "jsonrpc": "2.0", "method": "login",
"params": {
"login": "...", "pass": "...", "agent": "...",
"algo": ["cn", "cn/0", "cn/1", "cn/xtl"]
}
}
```
In case if miner not support dynamic algorithm change, miner should send list with one item, for example `"algo": ["cn-heavy"]`, pool/proxy should provide work for selected algorithm or send error.
### 1.2. Extended job object
To each `job` object pool/proxy should add additional field `algo`.
```json
{
"id": 1, "jsonrpc": "2.0", "error": null,
"result": {
"id": "...",
"job": {
"blob": "...", "job_id": "...", "target": "...", "id": "...",
"algo": "cn/r"
},
"status": "OK"
}
}
```
```json
{
"jsonrpc": "2.0", "method": "job",
"params": {
"blob": "...", "job_id": "...", "target": "b88d0600", "id": "...",
"algo": "cn/r"
}
}
```
If miner not support algorithm connection should be closed by miner to initiate switch to backup pool.
### 1.3. Algo extension
This extension is backward compatible with xmr-stak [extended mining statistics](#extended-mining-statistics).
First, pool should add `algo` to extensions list:
```json
{
"id": 1, "jsonrpc": "2.0", "error": null,
"result": {
"id": "...",
"job": {
"blob": "...", "job_id": "...", "target": "...", "id": "...",
"algo": "cn", "variant": 1
},
"extensions" : ["algo"],
"status": "OK"
}
}
```
Second, miner add fields `algo` to submit request.
```json
{
"id": 2, "jsonrpc": "2.0", "method": "submit",
"params": {
"id": "...", "job_id": "...", "nonce": "...", "result": "...",
"algo": "cn/1"
}
}
```
### 1.4 Algorithm names and variants
* https://github.com/xmrig/xmrig/blob/master/doc/ALGORITHMS.md#algorithm-names
## Rig identifier
User defined rig identifier. Optional field `rigid` in `login` request. More details: https://github.com/fireice-uk/xmr-stak/issues/849
## Extended mining statistics
More details: https://github.com/fireice-uk/xmr-stak/issues/66