Skip to content

Commit 7ec0d8a

Browse files
authored
Remove Stratum mining options and APIs. (#1828)
* Remove Stratum mining options and APIs. Signed-off-by: bgravenorst <[email protected]> * Fix link. Signed-off-by: bgravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]>
1 parent d6f37ee commit 7ec0d8a

File tree

3 files changed

+2
-362
lines changed

3 files changed

+2
-362
lines changed

docs/public-networks/how-to/use-pow/mining.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,7 @@ PoW consensus is deprecated in Besu version 24.11.0 and later. Please read this
1515

1616
:::
1717

18-
Besu supports CPU and GPU mining, which are configured using command line options.
19-
20-
GPU mining tests used [Ethminer](https://github.com/ethereum-mining/ethminer) with the `stratum+tcp` and `getwork` schemes.
21-
22-
Ethminer has been used with Besu to mine blocks on the Ropsten testnet, ETC Mainnet (uncle block only) and Mordor ETC testnet.
23-
24-
:::note
25-
- Some mining software supports the `getwork` scheme as the `http` scheme.
26-
- The Ropsten testnet is now deprecated. It transitioned to proof of stake consensus before deprecation.
27-
:::
18+
Besu supports CPU mining, which is configured using command line options.
2819

2920
## Configure CPU mining
3021

@@ -38,33 +29,6 @@ Where `<account>` is the account you pay mining rewards to. For example, `fe3b55
3829

3930
Start and stop mining using the [`miner_start`](../../reference/api/index.md#miner_start-deprecated) and [`miner_stop`](../../reference/api/index.md#miner_stop-deprecated) APIs.
4031

41-
## Configure GPU mining
42-
43-
Besu supports GPU mining, tested using [Ethminer](https://github.com/ethereum-mining/ethminer) with the `stratum+tcp` scheme.
44-
45-
To enable GPU mining, start Besu with the following options:
46-
47-
```bash
48-
besu --rpc-http-api=ETH,MINER --miner-enabled --miner-stratum-enabled --miner-coinbase=<account>
49-
```
50-
51-
Where `<account>` is the account you pay mining rewards to. For example, `fe3b557e8fb62b89f4916b721be55ceb828dbd73`.
52-
53-
Optional command line options are:
54-
55-
- [`--miner-stratum-host`](../../reference/cli/options.md#miner-stratum-host-deprecated) to specify the host of the mining service.
56-
- [`--miner-stratum-port`](../../reference/cli/options.md#miner-stratum-port-deprecated) to specify the port of the mining service.
57-
58-
:::note
59-
60-
Besu also supports the `getwork` scheme. Use the [`--miner-stratum-enabled`](../../reference/cli/options.md#miner-stratum-enabled-deprecated) option and [enable the `ETH` RPCs](../../reference/cli/options.md#rpc-http-api).
61-
62-
The `getwork` scheme is supported as the `http` scheme in certain mining software.
63-
64-
:::
65-
66-
Start and stop mining using the [`miner_start`](../../reference/api/index.md#miner_start-deprecated) and [`miner_stop`](../../reference/api/index.md#miner_stop-deprecated) APIs.
67-
6832
## Mining APIs
6933

7034
The JSON-RPC API methods for mining are:
@@ -73,9 +37,6 @@ The JSON-RPC API methods for mining are:
7337
- [`miner_stop`](../../reference/api/index.md#miner_stop-deprecated) to stop mining.
7438
- [`eth_mining`](../../reference/api/index.md#eth_mining-deprecated) to determine whether the client is actively mining new blocks.
7539
- [`eth_getMinerDataByBlockHash`](../../reference/api/index.md#eth_getminerdatabyblockhash-deprecated) and [`eth_getMinerDataByBlockNumber`](../../reference/api/index.md#eth_getminerdatabyblocknumber) to get the miner data for a specified block.
76-
- [`eth_hashrate`](../../reference/api/index.md#eth_hashrate-deprecated) to get the number of hashes per second with which the node is mining. Not supported for GPU mining.
77-
- [`eth_getWork`](../../reference/api/index.md#eth_getwork-deprecated) to get the hash of the current block, the seed hash, and the target boundary condition. Only used when using the `getwork` scheme.
78-
- [`eth_submitWork`](../../reference/api/index.md#eth_submitwork-deprecated) to submit the PoW solution. Only used when using the `getwork` scheme.
7940

8041
## Troubleshoot
8142

docs/public-networks/reference/api/index.md

Lines changed: 0 additions & 205 deletions
Original file line numberDiff line numberDiff line change
@@ -5574,109 +5574,6 @@ curl -X POST -H "Content-Type: application/json" --data '{ "query": "{block(numb
55745574
55755575
</Tabs>
55765576
5577-
### `eth_getWork` (Deprecated)
5578-
5579-
Returns the hash of the current block, the seed hash, and the required target boundary condition.
5580-
5581-
#### Parameters
5582-
5583-
None
5584-
5585-
#### Returns
5586-
5587-
`result`: _array_ of _strings_ - array with the following items:
5588-
5589-
- `header`: _string_ - 32-byte hash of the current block header (PoW-hash)
5590-
5591-
- `seed`: _string_ - 32-byte seed hash used for the DAG
5592-
5593-
- `target`: _string_ - 32-byte required target boundary condition: 2^256 / difficulty
5594-
5595-
- `blockNumber`: _string_ - hexadecimal integer representing the current block number
5596-
5597-
<Tabs>
5598-
5599-
<TabItem value="curl HTTP request" label="curl HTTP request" default>
5600-
5601-
```bash
5602-
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getWork","params":[],"id":1}' http://127.0.0.1:8545/ -H "Content-Type: application/json"
5603-
```
5604-
5605-
</TabItem>
5606-
5607-
<TabItem value="wscat WS request" label="wscat WS request">
5608-
5609-
```json
5610-
{ "jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1 }
5611-
```
5612-
5613-
</TabItem>
5614-
5615-
<TabItem value="JSON result" label="JSON result">
5616-
5617-
```json
5618-
{
5619-
"jsonrpc": "2.0",
5620-
"id": 1,
5621-
"result": [
5622-
"0xce5e32ca59cb86799a1879e90150b2c3b882852173e59865e9e79abb67a9d636",
5623-
"0x0000000000000000000000000000000000000000000000000000000000000000",
5624-
"0x00a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3",
5625-
"0x42"
5626-
]
5627-
}
5628-
```
5629-
5630-
</TabItem>
5631-
5632-
</Tabs>
5633-
5634-
### `eth_hashrate` (Deprecated)
5635-
5636-
Returns the number of hashes per second with which the node is mining.
5637-
5638-
When the stratum server is enabled, this method returns the cumulative hashrate of all sealers reporting their hashrate.
5639-
5640-
#### Parameters
5641-
5642-
None
5643-
5644-
#### Returns
5645-
5646-
`result`: _string_ - number of hashes per second
5647-
5648-
<Tabs>
5649-
5650-
<TabItem value="curl HTTP request" label="curl HTTP request" default>
5651-
5652-
```bash
5653-
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}' http://127.0.0.1:8545/ -H "Content-Type: application/json"
5654-
```
5655-
5656-
</TabItem>
5657-
5658-
<TabItem value="wscat WS request" label="wscat WS request">
5659-
5660-
```bash
5661-
{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}
5662-
```
5663-
5664-
</TabItem>
5665-
5666-
<TabItem value="JSON result" label="JSON result">
5667-
5668-
```json
5669-
{
5670-
"jsonrpc": "2.0",
5671-
"id": 1,
5672-
"result": "0x12b"
5673-
}
5674-
```
5675-
5676-
</TabItem>
5677-
5678-
</Tabs>
5679-
56805577
### `eth_maxPriorityFeePerGas`
56815578
56825579
Returns an estimate of how much priority fee, in wei, you can pay to get a transaction included in the current block.
@@ -6271,108 +6168,6 @@ curl -X POST --data '{"jsonrpc":"2.0", "method":"eth_simulateV1", "params":[{"bl
62716168
62726169
</Tabs>
62736170
6274-
### `eth_submitHashrate` (Deprecated)
6275-
6276-
Submits the mining hashrate. This is used by mining software such as [Ethminer](https://github.com/ethereum-mining/ethminer).
6277-
6278-
#### Parameters
6279-
6280-
- `hashrate`: _string_ - 32-byte hexadecimal string representation of the hashrate
6281-
6282-
- `id`: _string_ - 32-byte random hexadecimal ID identifying the client
6283-
6284-
#### Returns
6285-
6286-
`result`: _boolean_ - indicates if submission is successful
6287-
6288-
<Tabs>
6289-
6290-
<TabItem value="curl HTTP request" label="curl HTTP request" default>
6291-
6292-
```bash
6293-
curl -X POST --data '{"jsonrpc":"2.0", "method":"eth_submitHashrate", "params":["0x0000000000000000000000000000000000000000000000000000000000500000", "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"],"id":1}' http://127.0.0.1:8545/ -H "Content-Type: application/json"
6294-
```
6295-
6296-
</TabItem>
6297-
6298-
<TabItem value="wscat WS request" label="wscat WS request">
6299-
6300-
```json
6301-
{
6302-
"jsonrpc": "2.0",
6303-
"method": "eth_submitHashrate",
6304-
"params": [
6305-
"0x0000000000000000000000000000000000000000000000000000000000500000",
6306-
"0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"
6307-
],
6308-
"id": 1
6309-
}
6310-
```
6311-
6312-
</TabItem>
6313-
6314-
<TabItem value="JSON result" label="JSON result">
6315-
6316-
```json
6317-
{
6318-
"jsonrpc": "2.0",
6319-
"id": 1,
6320-
"result": true
6321-
}
6322-
```
6323-
6324-
</TabItem>
6325-
6326-
</Tabs>
6327-
6328-
### `eth_submitWork` (Deprecated)
6329-
6330-
Submits a proof of work (Ethash) solution. This is used by mining software such as [Ethminer](https://github.com/ethereum-mining/ethminer).
6331-
6332-
#### Parameters
6333-
6334-
- `nonce`: _string_ - retrieved 8-byte nonce
6335-
6336-
- `header`: _string_ - 32-byte hash of the block header (PoW-hash)
6337-
6338-
- `digest`: _string_ - 32-bytes mix digest
6339-
6340-
#### Returns
6341-
6342-
`result`: _boolean_ - indicates if the provided solution is valid
6343-
6344-
<Tabs>
6345-
6346-
<TabItem value="curl HTTP request" label="curl HTTP request" default>
6347-
6348-
```bash
6349-
curl -X POST --data '{"jsonrpc":"2.0", "method":"eth_submitWork", "params":["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"],"id":1}' http://127.0.0.1:8545/ -H "Content-Type: application/json"
6350-
```
6351-
6352-
</TabItem>
6353-
6354-
<TabItem value="wscat WS request" label="wscat WS request">
6355-
6356-
```bash
6357-
{"jsonrpc":"2.0", "method":"eth_submitWork", "params":["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"],"id":73}
6358-
```
6359-
6360-
</TabItem>
6361-
6362-
<TabItem value="JSON result" label="JSON result">
6363-
6364-
```json
6365-
{
6366-
"id": 1,
6367-
"jsonrpc": "2.0",
6368-
"result": true
6369-
}
6370-
```
6371-
6372-
</TabItem>
6373-
6374-
</Tabs>
6375-
63766171
### `eth_syncing`
63776172
63786173
Returns an object with data about the synchronization status, or `false` if not synchronizing.

0 commit comments

Comments
 (0)