Skip to content

Revise RPC Parameter Descriptions #10320

@oxarbitrage

Description

@oxarbitrage

In #10201 we introduced parameter description constants:

pub(super) const PARAM_VERBOSE_DESC: &str =
"Boolean flag to indicate verbosity, true for a json object, false for hex encoded data.";
pub(super) const PARAM_POOL_DESC: &str =
"The pool from which subtrees should be returned. Either \"sapling\" or \"orchard\".";
pub(super) const PARAM_START_INDEX_DESC: &str =
"The index of the first 2^16-leaf subtree to return.";
pub(super) const PARAM_LIMIT_DESC: &str = "The maximum number of subtrees to return.";
pub(super) const PARAM_REQUEST_DESC: &str = "The request object containing the parameters.";
pub(super) const PARAM_INDEX_DESC: &str = "The index of the subtree to return.";
pub(super) const PARAM_RAW_TRANSACTION_HEX_DESC: &str = "The hex-encoded raw transaction bytes.";
#[allow(non_upper_case_globals)]
pub(super) const PARAM__ALLOW_HIGH_FEES_DESC: &str = "Whether to allow high fees.";
pub(super) const PARAM_NUM_BLOCKS_DESC: &str = "The number of blocks to return.";
pub(super) const PARAM_HEIGHT_DESC: &str = "The height of the block to return.";
pub(super) const PARAM_COMMAND_DESC: &str = "The command to execute.";
#[allow(non_upper_case_globals)]
pub(super) const PARAM__PARAMETERS_DESC: &str = "The parameters for the command.";
pub(super) const PARAM_BLOCK_HASH_DESC: &str = "The hash of the block to return.";
pub(super) const PARAM_ADDRESS_DESC: &str = "The address to return.";
pub(super) const PARAM_ADDRESS_STRINGS_DESC: &str = "The addresses to return.";
pub(super) const PARAM_ADDR_DESC: &str = "The address to return.";
pub(super) const PARAM_HEX_DATA_DESC: &str = "The hex-encoded data to return.";
pub(super) const PARAM_TXID_DESC: &str = "The transaction ID to return.";
pub(super) const PARAM_HASH_OR_HEIGHT_DESC: &str = "The block hash or height to return.";
pub(super) const PARAM_PARAMETERS_DESC: &str = "The parameters for the command.";
pub(super) const PARAM_VERBOSITY_DESC: &str = "Whether to include verbose output.";
pub(super) const PARAM_N_DESC: &str = "The output index in the transaction.";
pub(super) const PARAM_INCLUDE_MEMPOOL_DESC: &str =

Given that these constants now provide a single source of truth for parameter documentation, we should consider whether the # Parameters section in the current RPC documentation is still necessary. If the information is already covered by the constants (and reflected in the generated OpenRPC spec), it may be redundant.

We might want to remove the # Parameters section from all RPC methods to avoid duplication and reduce the risk of inconsistencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions