daemon-rpc: doc undocumented fields #2340
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 Cuprate/cuprate#244 and may add more docs then.
Fixes
Table of fixes in this PR, originally tracked here: Cuprate/cuprate#159.
Request fields
These endpoints/methods have undocumented request fields.
get_block_header_by_hash
hashes
. This field lets you specify multiple block hashes.hard_fork_info
version
. This field lets you specify which hardfork info to retrieve.get_output_distribution
top_hash
,credits
/get_blocks.bin
requested_info
,no_miner_tx
,pool_info_since
/send_raw_transaction
do_sanity_checks
/get_peer_list
public_only
,include_blocked
/out_peers
set
Response fields
These endpoints/methods have undocumented response fields.
get_block_header_by_hash
block_headers
. This method will return ablock_header
ANDblock_headers
if the request only provided ahashes
. Theblock_header
struct is a bunch of default values (0
, "", false).get_block_header_by_height
top_hash
,credits
get_output_distribution
struct output_distribution
:cumulative
get_connections
struct connection_info
:address_type
,rpc_port
,rpc_credits_per_hash
,pruning_seed
set_bans
untrusted
get_version
current_height
,hard_forks
,target_height
sync_info
untrusted
get_txpool_backlog
blob_size
->weight
get_output_distribution
top_hash
,credits
add_aux_pow
status
,untrusted
/get_blocks.bin
daemon_time
,credits
,top_hash
/get_blocks_by_height.bin
credits
,top_hash
/get_hashes_fast.bin
credits
,top_hash
/get_o_indexes.bin
credits
,top_hash
/get_transactions
credits
,confirmations
/send_raw_transaction
nonzero_unlock_time
,sanity_check_failed
,too_few_outputs
,tx_extra_too_big
/get_peer_list
untrusted
/stop_daemon
untrusted
submit_block
block_id
,status
,untrusted
Other
The
get_output_distribution
method has 2 undocumented fields,binary
andcompress
. The current documentation is also incorrect as the output is not an array ofdistribution
JSON objects, but rather, either raw binary or a JSON byte array. This may change with monero-project/monero#9422 so it is not changed in this PR.