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

Verify that the zcashd configuration enables the "lightwalletd" indices #375

Open
LarryRuane opened this issue Dec 20, 2021 · 0 comments
Open
Assignees
Labels
good first issue Good for newcomers

Comments

@LarryRuane
Copy link
Collaborator

The instance of zcashd that a lightwalletd uses is required to have either lightwalletd or insightexplorer configuration options enabled. Currently, lightwalletd doesn't check that one of these options is enabled. It could easily do so by executing the getexperimentalfeatures RPC during startup and checking the returned result for either of these two options. Here's an example of what this RPC returns using the CLI:

$ src/zcash-cli getexperimentalfeatures
[
  "lightwalletd"
]

It would be very easy for lightwalletd to execute this RPC, parse the result to look for either option being present, and if not, print a helpful error message and exit.

An alternate approach is to note that lightwalletd opens and parses the zcash.conf file, and these options may be specified there. But they may instead be specified on the zcashd command line, in which case lightwalletd will think neither option is enabled when it actually is. So it's more reliable to use the RPC.

A possible future problem that may arise is if these options are moved out of the "experimental" category. (They probably could be even now.) If that happens, a possible solution is to add an entry to the JSON result of the getinfo RPC (which lightwalletd calls during startup already).

@LarryRuane LarryRuane added the good first issue Good for newcomers label Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant