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

Update getinfo RPC method #8448

Closed
Tracked by #8435
mpguerra opened this issue Apr 24, 2024 · 2 comments · Fixed by #9261 or #9262
Closed
Tracked by #8435

Update getinfo RPC method #8448

mpguerra opened this issue Apr 24, 2024 · 2 comments · Fixed by #9261 or #9262
Assignees

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Apr 24, 2024

Motivation

In order to enable zcashd deprecation, we need to ensure that RPC methods that are used by existing zcashd consumers are implemented in zebra to cater to their usecases.

Specification

zcashd's getinfo RPC method is documented here: https://zcash.github.io/rpc/getinfo.html

Zebra already partially implements the getinfo RPC method, however, it is missing the following fields:

  • version: xxxxx, (numeric) the server version
  • protocolversion: xxxxx, (numeric) the protocol version
  • walletversion: xxxxx, (numeric, optional) the wallet version, if wallet functionality is enabled
  • balance: xxxxxxx, (numeric, optional) the total Zcash balance of the wallet, if wallet functionality is enabled
  • blocks: xxxxxx, (numeric) the current number of blocks processed in the server
  • timeoffset: xxxxx, (numeric) the time offset (deprecated; always 0)
  • connections: xxxxx, (numeric) the number of connections
  • proxy: "host:port", (string, optional) the proxy used by the server
  • difficulty: xxxxxx, (numeric) the current difficulty
  • testnet: true|false, (boolean) if the server is using testnet or not
  • keypoololdest: xxxxxx, (numeric, optional) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool, if wallet functionality is enabled
  • keypoolsize: xxxx, (numeric, optional) how many new keys are pre-generated
  • unlocked_until: ttt, (numeric, optional) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked, if wallet functionality is available and the wallet is encrypted
  • paytxfee: x.xxxx, (numeric) the transaction fee rate set in ZEC per 1000 bytes
  • relayfee: x.xxxx, (numeric) minimum relay fee rate for transactions in ZEC per 1000 bytes
  • errors: "..." (string) message describing the latest or highest-priority error
  • errorstimestamp: "..." (string) timestamp associated with the latest or highest-priority error

We need to:

  1. Check which fields, if any, are needed by existing zcashd consumers.
  2. Implement the required changes to support the relevant usecases.
@github-project-automation github-project-automation bot moved this to New in Zebra Apr 24, 2024
@mpguerra mpguerra added this to the Block Explorer Support milestone Apr 24, 2024
@mpguerra mpguerra moved this from New to Product Backlog in Zebra Apr 24, 2024
@mpguerra mpguerra removed this from the Block Explorer Support milestone Oct 18, 2024
@mpguerra mpguerra moved this from Product Backlog to Sprint Backlog in Zebra Jan 22, 2025
@mpguerra mpguerra moved this from Sprint Backlog to Product Backlog in Zebra Jan 23, 2025
@mpguerra mpguerra moved this from Product Backlog to Sprint Backlog in Zebra Jan 23, 2025
@oxarbitrage
Copy link
Contributor

oxarbitrage commented Feb 11, 2025

I think we can get rid of all the optional wallet fields as Zebra will not be ever (with the current plan) able to provide them. This fields are walletversion, balance, keypoololdest, keypoolsize and unlocked_until.
Additionally, the timeoffset is deprecated so it should be safe to just remove it in Zebra.

@oxarbitrage
Copy link
Contributor

Reference zcashd output:

$ ./src/zcash-cli getinfo
{
  "version": 6010050,
  "build": "v6.1.0-a3435336b",
  "subversion": "/MagicBean:6.1.0/",
  "protocolversion": 170120,
  "walletversion": 60000,
  "balance": 0.00000000,
  "blocks": 4608,
  "timeoffset": 0,
  "connections": 1,
  "proxy": "",
  "difficulty": 145299.3882313141,
  "testnet": false,
  "keypoololdest": 1739448263,
  "keypoolsize": 101,
  "paytxfee": 0.00000000,
  "relayfee": 0.00000100,
  "errors": "",
  "errorstimestamp": 1739448460
}
$ 

@mpguerra mpguerra moved this from Sprint Backlog to In progress in Zebra Feb 17, 2025
@mergify mergify bot closed this as completed in #9261 Feb 18, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in Zebra Feb 18, 2025
@mpguerra mpguerra linked a pull request Feb 18, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants