diff --git a/docs/private-networks/how-to/index.md b/docs/private-networks/how-to/index.md index 0115cd0a1e..f334b3137d 100644 --- a/docs/private-networks/how-to/index.md +++ b/docs/private-networks/how-to/index.md @@ -13,7 +13,6 @@ The following features are shared with [public networks](../../public-networks/i - Configure and manage: - [Use a configuration file](../../public-networks/how-to/configure-besu/index.md) - [Configure high availability](../../public-networks/how-to/configure-ha/index.md) - - [Configure mining](../../public-networks/how-to/use-pow/mining.md) - [Use the Besu API](../../public-networks/how-to/use-besu-api/index.md): - [Use JSON-RPC over HTTP, WS, and IPC](../../public-networks/how-to/use-besu-api/json-rpc.md) - [Use RPC Pub/Sub over WS](../../public-networks/how-to/use-besu-api/rpc-pubsub.md) diff --git a/docs/public-networks/how-to/use-pow/_category_.json b/docs/public-networks/how-to/use-pow/_category_.json deleted file mode 100644 index 1381dd9fc6..0000000000 --- a/docs/public-networks/how-to/use-pow/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Use proof of work", - "position": 10 -} diff --git a/docs/public-networks/how-to/use-pow/mining.md b/docs/public-networks/how-to/use-pow/mining.md deleted file mode 100644 index 8fe410ceab..0000000000 --- a/docs/public-networks/how-to/use-pow/mining.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Configure mining -sidebar_position: 1 -description: Using Besu for PoW CPU mining -tags: - - public networks - - private networks ---- - -# Configure mining (Deprecated) - -:::caution - -PoW consensus is deprecated in Besu version 24.11.0 and later. Please read this [blog post](https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu) for more context on the rationale behind this decision as well as alternative options. - -::: - -Besu supports CPU mining, which is configured using command line options. - -## Configure CPU mining - -To enable CPU mining, start Besu with the following options: - -```bash -besu --rpc-http-api=ETH,MINER --miner-enabled --miner-coinbase= -``` - -Where `` is the account you pay mining rewards to. For example, `fe3b557e8fb62b89f4916b721be55ceb828dbd73`. - -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. - -## Mining APIs - -The JSON-RPC API methods for mining are: - -- [`miner_start`](../../reference/api/index.md#miner_start-deprecated) to start mining. -- [`miner_stop`](../../reference/api/index.md#miner_stop-deprecated) to stop mining. -- [`eth_mining`](../../reference/api/index.md#eth_mining-deprecated) to determine whether the client is actively mining new blocks. -- [`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. - -## Troubleshoot - -### Check block creation - -On mining nodes, log messages indicate block creation. - -```bash -2019-05-08 20:28:27.026+10:00 | pool-10-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=660, Round=0}, hash=0x759afaba4e923d89175d850ceca4b8ef81f7d9c727b0b0b8e714b624a4b8e8cc -2019-05-08 20:28:29.020+10:00 | pool-10-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=661, Round=0}, hash=0x5443e504256765f06b3cebfbee82276a034ebcc8d685b7c3d1a6010fd4acfa14 -``` - -On non-mining nodes, log messages indicate importing blocks. - -```bash -2019-05-08 20:28:29.026+10:00 | EthScheduler-Workers-1 | INFO | BlockPropagationManager | Imported #661 / 0 tx / 0 om / 0 (0.0%) gas / (0x5443e504256765f06b3cebfbee82276a034ebcc8d685b7c3d1a6010fd4acfa14) in 0.000s. -2019-05-08 20:28:31.031+10:00 | EthScheduler-Workers-0 | INFO | BlockPropagationManager | Imported #662 / 0 tx / 0 om / 0 (0.0%) gas / (0x0ead4e20123d3f1433d8dec894fcce386da4049819b24b309963ce7a8a0fcf03) in 0.000s. -``` - -To confirm the block number is increasing, use the [`eth_blockNumber`](../../reference/api/index.md#eth_blocknumber) JSON-RPC API method. - -If there's no block creation in [Clique](../../../private-networks/how-to/configure/consensus/clique.md#extra-data) or [IBFT 2.0](../../../private-networks/how-to/configure/consensus/ibft.md#extra-data) networks, ensure the validator addresses in the genesis file match running nodes. - -### No mined transactions - -If you add a transaction to the [transaction pool](../../concepts/transactions/pool.md) and the transaction hash returns, but the transaction is never mined, check the [`--min-gas-price`](../../reference/cli/options.md#min-gas-price) option on mining nodes. If the `gasPrice` on a [transaction](../send-transactions.md) is lower than the `min-gas-price` for the mining node, the transaction will never mine. - -In [free gas networks](../../../private-networks/how-to/configure/free-gas.md), you must set [`--min-gas-price`](../../reference/cli/options.md#min-gas-price) to zero. diff --git a/docs/public-networks/reference/api/index.md b/docs/public-networks/reference/api/index.md index 9ab55b46d2..3c9855200b 100644 --- a/docs/public-networks/reference/api/index.md +++ b/docs/public-networks/reference/api/index.md @@ -4306,143 +4306,7 @@ curl -X POST -H "Content-Type: application/json" --data '{"query": "{logs(filter - -### `eth_getMinerDataByBlockHash` (Deprecated) - -Returns miner data for the specified block. - -#### Parameters - -`hash`: _string_ - 32-byte block hash - -#### Returns - -`result`: _object_ - [miner data object](objects.md#miner-data-object) - - - - - -```bash -curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getMinerDataByBlockHash","params": ["0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"],"id": 1}' http://127.0.0.1:8545/ -H "Content-Type: application/json" -``` - - - - - -```json -{ - "jsonrpc": "2.0", - "method": "eth_getMinerDataByBlockHash", - "params": [ - "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7" - ], - "id": 1 -} -``` - - - - - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "netBlockReward": "0x47c6f3739f3da800", - "staticBlockReward": "0x4563918244f40000", - "transactionFee": "0x38456548220800", - "uncleInclusionReward": "0x22b1c8c1227a000", - "uncleRewards": [ - { - "hash": "0x2422d43b4f72e19faf4368949a804494f67559405046b39c6d45b1bd53044974", - "coinbase": "0x0c062b329265c965deef1eede55183b3acb8f611" - } - ], - "coinbase": "0xb42b6c4a95406c78ff892d270ad20b22642e102d", - "extraData": "0xd583010502846765746885676f312e37856c696e7578", - "difficulty": "0x7348c20", - "totalDifficulty": "0xa57bcfdd96" - } -} -``` - - - - - -### `eth_getMinerDataByBlockNumber` - -Returns miner data for the specified block. - -#### Parameters - -`blockNumber`: _string_ - hexadecimal or decimal integer representing a block number, or one of -the string tags `latest`, `earliest`, `pending`, `finalized`, or `safe`, as described in -[block parameter](../../how-to/use-besu-api/json-rpc.md#block-parameter). - -:::note -`pending` returns the same value as `latest`. -::: - -#### Returns - -`result`: _object_ - [miner data object](objects.md#miner-data-object) - - - - - -```bash -curl -X POST --data '{"jsonrpc":"2.0","method": "eth_getMinerDataByBlockNumber","params": ["0x7689D2"],"id": 1}' http://127.0.0.1:8545/ -H "Content-Type: application/json" -``` - - - - - -```json -{ - "jsonrpc": "2.0", - "method": "eth_getMinerDataByBlockNumber", - "params": ["0x7689D2"], - "id": 1 -} -``` - - - - - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "netBlockReward": "0x47c6f3739f3da800", - "staticBlockReward": "0x4563918244f40000", - "transactionFee": "0x38456548220800", - "uncleInclusionReward": "0x22b1c8c1227a000", - "uncleRewards": [ - { - "hash": "0x2422d43b4f72e19faf4368949a804494f67559405046b39c6d45b1bd53044974", - "coinbase": "0x0c062b329265c965deef1eede55183b3acb8f611" - } - ], - "coinbase": "0xb42b6c4a95406c78ff892d270ad20b22642e102d", - "extraData": "0xd583010502846765746885676f312e37856c696e7578", - "difficulty": "0x7348c20", - "totalDifficulty": "0xa57bcfdd96" - } -} -``` - - - - - + ### `eth_getProof` Returns the account and storage values of the specified account, including the Merkle proof. @@ -6638,60 +6502,6 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"miner_getMinPriorityFee","params -### `miner_setCoinbase` - -Sets the coinbase, the address for the mining rewards. - -:::note - -You can also use `miner_setEtherbase` as an alternative method. They both work the same way. Etherbase is a historic name for coinbase. - -::: - -#### Parameters - -`coinbase`: _string_ - Account address you pay mining rewards to - -#### Returns - -`result`: _boolean_ - `true` when address is set - - - - - -```bash -curl -X POST --data '{"jsonrpc":"2.0","method":"miner_setCoinbase","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"],"id":1}' http://127.0.0.1:8545/ -H "Content-Type: application/json" -``` - - - - - -```json -{ - "jsonrpc": "2.0", - "method": "miner_setCoinbase", - "params": ["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], - "id": 1 -} -``` - - - - - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": true -} -``` - - - - ### `miner_setExtraData` @@ -6849,7 +6659,11 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"miner_setMinPriorityFee","params ### `miner_start` (Deprecated) Starts the mining process. -To start mining, you must first specify a miner coinbase using the [`--miner-coinbase`](../cli/options.md#miner-coinbase) command line option or using [`miner_setCoinbase`](#miner_setcoinbase). + +:::note + +Systems that still support mining set a default fee recipient address, the deprecated miner coinbase. +::: #### Parameters diff --git a/docs/public-networks/reference/api/objects.md b/docs/public-networks/reference/api/objects.md index f0ab1596ff..84b3212812 100644 --- a/docs/public-networks/reference/api/objects.md +++ b/docs/public-networks/reference/api/objects.md @@ -119,22 +119,6 @@ Returned by [`eth_getFilterChanges`](index.md#eth_getfilterchanges) and [`priv_g | `data` | Data | Non-indexed arguments of the log. | | `topics` | Array of Data, 32 bytes each | [Event signature hash](../../concepts/events-and-logs.md#event-signature-hash) and 0 to 3 [indexed log arguments](../../concepts/events-and-logs.md#event-parameters). | -## Miner data object - -Returned by [`eth_getMinerDataByBlockHash`](index.md#eth_getminerdatabyblockhash-deprecated) and [`eth_getMinerDataByBlockNumber`](index.md#eth_getminerdatabyblocknumber). - -| Key | Type | Value | -| --- | :-: | --- | -| `netBlockReward` | Quantity, Integer | The net block reward, in Wei, is `staticBlockReward + transactionFee + uncleInclusionReward`. | -| `staticBlockReward` | Quantity, Integer | The static block reward, in Wei, is preset on a hard fork. | -| `transactionFee` | Quantity, Integer | The transaction fee, in Wei, is `sum of upfront cost - refund amount for all transactions`. | -| `uncleInclusionReward` | Quantity, Integer | The uncle inclusion reward, in Wei, is `static block reward * number of ommers/32`. | -| `uncleRewards` | Map | Map of uncle block hashes and uncle miner coinbase addresses. | -| `coinbase` | Data, 20 bytes | Coinbase address. | -| `extraData` | Data | Extra data field for this block. The first 32 bytes is vanity data you can set using the [`--miner-extra-data`](../cli/options.md#miner-extra-data) command line option. | -| `difficulty` | Quantity, Integer | Difficulty of this block. | -| `totalDifficulty` | Quantity, Integer | Total difficulty of the chain until this block. | - ## Pending transaction object Returned by [`txpool_besuPendingTransactions`](index.md#txpool_besupendingtransactions).