Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: replace binary string endpoints/types #349

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hinto-janai
Copy link
Contributor

What

Replaces RPC binary string endpoints/types by implementing monero-project/monero#9422 (comment).

This removes the planned deprecated endpoints/types i.e. get_tx_backlog_v2 will work but get_tx_backlog will return error.

RPC API changes

Removed

  • /json_rpc (get_txpool_backlog)
  • /json_rpc (get_output_distribution)

Added

  • /json_rpc (get_txpool_backlog_v2)
  • /json_rpc (get_output_distribution_v2)
  • /get_txpool_backlog.bin

Same as before

  • /get_output_distribution.bin

JSON representation examples

// get_txpool_backlog_v2
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "backlog": [
      {
        "weight": 0,
        "fee": 0,
        "time_in_pool": 0
      }
    ],
    "status": "OK",
    "untrusted": false
  }
}
// get_output_distribution_v2
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "credits": 0,
    "distributions": [
      {
        "start_height": 0,
        "base": 0,
        "distribution": [1000, 2000, 3000],
        // If `compress` is passed the above field instead be something like:
        // "compressed_data": [0, 1, 2],
        "amount": 0,
        "binary": false
      }
    ],
    "status": "OK",
    "top_hash": "",
    "untrusted": false
  }
}

@github-actions github-actions bot added A-test-utils Related to test-utils. A-docs Related to documentation. A-rpc Related to RPC. A-binaries Related to binaries. labels Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-binaries Related to binaries. A-docs Related to documentation. A-rpc Related to RPC. A-test-utils Related to test-utils.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant