The submitblock RPC accepts a block, verifies it is a valid addition to the block chain, and broadcasts it to the network. Extra parameters are ignored by Pai Core but may be used by mining pools or other programs.

Parameter #1—the new block in serialized block format as hex

Name Type Presence Description
Block string (hex) Required
(exactly 1)
The full block to submit in serialized block format as hex

Parameter #2—additional parameters

Name Type Presence Description
Parameters object Optional
(0 or 1)
A JSON object containing extra parameters. Not used directly by Pai Core and also not broadcast to the network. This is available for use by mining pools and other software. A common parameter is a workid string

Result—null or error string

Name Type Presence Description
result null/string Required
(exactly 1)
If the block submission succeeded, set to JSON null. If submission failed, set to one of the following strings: duplicate, duplicate-invalid, inconclusive, or rejected. The JSON-RPC error field will still be set to null if submission failed for one of these reasons


Submit the following block with the workid, “test”.

pai-cli -testnet submitblock 02000000df11c014a8d798395b5059c\
650f529332c47646dac00000000 \
'{ "workid": "test" }'

Result (the block above was already on a local block chain):


See also

  • GetBlockTemplate: gets a block template or proposal for use with mining software.