submit_mining_response
submit_mining_response req_id "mining_response_b64" Submit a broker-mined solution against a previously-issued work unit. The payload is a base64-encoded proof::MiningResponse FlatBuffer. The node verifies the FlatBuffer, checks req_id, fills the stored block's PoW blob, regenerates hashPoW, runs QuickVerify, and submits via ProcessNewBlock. Returns structured accept/reject/dedup status. Arguments: 1. req_id (numeric, required) Work-unit identifier returned by create_mining_work_unit. 2. mining_response_b64 (string, required) Base64-encoded proof::MiningResponse FlatBuffer. Result: { (json object) "accepted" : true|false, (boolean) true only when the block is active on the main chain with data "status" : "str", (string) one of: accepted, accepted_pending_connect, rejected, unknown_req_id, already_submitted, invalid_payload, quick_verify_failed "block_hash" : "hex", (string, optional) hex hash of the submitted block when reachable "reject_reason" : "str" (string, optional) validation state or decode error } Examples: > bitcoin-cli submit_mining_response 42 "AAAA..." > curl --user myusername --data-binary '{"jsonrpc":"2.0","id":"curltest","method":"submit_mining_response","params":[42,"AAAA..."]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
submit_mining_response(req_id: number, mining_response_b64: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"submit_mining_response","params":[0,"\"<mining_response_b64>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| req_id | number | yes | Work-unit identifier returned by create_mining_work_unit. |
| mining_response_b64 | string | yes | Base64-encoded proof::MiningResponse FlatBuffer. |
Result
Type: any
{ (json object) "accepted" : true|false, (boolean) true only when the block is active on the main chain with data "status" : "str", (string) one of: accepted, accepted_pending_connect, rejected, unknown_req_id, already_submitted, invalid_payload, quick_verify_failed "block_hash" : "hex", (string, optional) hex hash of the submitted block when reachable "reject_reason" : "str" (string, optional) validation state or decode error }
Source: services/core-node/bcore/src/rpc/mining.cpp:1737
C++ symbol: submit_mining_response