monero-site
monero-site copied to clipboard
daemon-rpc: doc undocumented fields
What
Adds documentation for undocumented request/response fields within daemon RPC calls; requires review into monerod
.
Some of these are lacking descriptions as I'm not sure what the behavior is for some of the fields. I will know after https://github.com/Cuprate/cuprate/issues/244 and may add more docs then.
Fixes
Table of fixes in this PR, originally tracked here: https://github.com/Cuprate/cuprate/issues/159.
Request fields
These endpoints/methods have undocumented request fields.
Endpoint/method | Link | Notes |
---|---|---|
get_block_header_by_hash |
rpc/core_rpc_server_commands_defs.h @ 1245 | hashes . This field lets you specify multiple block hashes. |
hard_fork_info |
rpc/core_rpc_server_commands_defs.h @ 1962, rpc/core_rpc_server.cpp @ 2760 | version . This field lets you specify which hardfork info to retrieve. |
get_output_distribution |
rpc/core_rpc_server_commands_defs.h @ 2445..2465 | top_hash , credits |
/get_blocks.bin |
rpc/core_rpc_server_commands_defs.h @ 174..179 | Optional fields: requested_info , no_miner_tx , pool_info_since |
/send_raw_transaction |
rpc/core_rpc_server_commands_defs.h @ 617 | do_sanity_checks |
/get_peer_list |
rpc/core_rpc_server_commands_defs.h @ 1373..1374 | public_only , include_blocked |
/out_peers |
rpc/core_rpc_server_commands_defs.h @ 1909 | set |
Response fields
These endpoints/methods have undocumented response fields.
Endpoint/method | Link | Notes |
---|---|---|
get_block_header_by_hash |
rpc/core_rpc_server_commands_defs.h @ L1260 | block_headers . This method will return a block_header AND block_headers if the request only provided a hashes . The block_header struct is a bunch of default values (0 , "", false). |
get_block_header_by_height |
rpc/core_rpc_server_commands_defs.h @ 1271..1296 | top_hash , credits |
get_output_distribution |
rpc/message_data_structs.h @ 205 | Field in inner struct output_distribution : cumulative |
get_connections |
cryptonote_protocol/cryptonote_protocol_defs.h @ 47..87 | Fields in inner struct connection_info : address_type , rpc_port , rpc_credits_per_hash , pruning_seed |
set_bans |
rpc/core_rpc_server_commands_defs.h @ 2063 | untrusted |
get_version |
rpc/core_rpc_server_commands_defs.h @ 2170..2211 | current_height , hard_forks , target_height |
sync_info |
rpc/core_rpc_server_commands_defs.h @ 2433 | untrusted |
get_txpool_backlog |
diff @ 1567..1575, rpc/core_rpc_server_commands_defs.h @ 1639 | Field rename: blob_size -> weight |
get_output_distribution |
rpc/core_rpc_server_commands_defs.h @ 2445..2465 | top_hash , credits |
add_aux_pow |
rpc/core_rpc_server_commands_defs.h @ 1103 | status , untrusted |
/get_blocks.bin |
rpc/core_rpc_server_commands_defs.h @ 232..240 | daemon_time , credits , top_hash |
/get_blocks_by_height.bin |
rpc/core_rpc_server_commands_defs.h @ 281 | credits , top_hash |
/get_hashes_fast.bin |
rpc/core_rpc_server_commands_defs.h @ 331 | credits , top_hash |
/get_o_indexes.bin |
rpc/core_rpc_server_commands_defs.h @ 505 | credits , top_hash |
/get_transactions |
rpc/core_rpc_server_commands_defs.h @ 418 | credits , confirmations |
/send_raw_transaction |
rpc/core_rpc_server_commands_defs.h @ 640..643 | nonzero_unlock_time , sanity_check_failed , too_few_outputs , tx_extra_too_big |
/get_peer_list |
rpc/core_rpc_server_commands_defs.h @ 1390 | untrusted |
/stop_daemon |
rpc/core_rpc_server_commands_defs.h @ 1827 | untrusted |
submit_block |
rpc/core_rpc_server_commands_defs.h @ 1123 | block_id , status , untrusted |
Other
The get_output_distribution
method has 2 undocumented fields, binary
and compress
. The current documentation is also incorrect as the output is not an array of distribution
JSON objects, but rather, either raw binary or a JSON byte array. This may change with https://github.com/monero-project/monero/issues/9422 so it is not changed in this PR.