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

Remote ReadStateService #9338

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

Conversation

idky137
Copy link
Contributor

@idky137 idky137 commented Mar 20, 2025

Opens the ReadStateService to remote use, as detailed in #9337.

Motivation

Zebra’s ReadStateService currently only allows local access, limiting its integration with external tools and remote debugging. Enabling remote access would streamline workflows, simplify testing, and support scalable, decentralized deployments—fostering a more modular and community-friendly Zcash ecosystem.

Solution

  1. Add Serde serialization to ReadRequest and ReadResponse.
  1. Add remote_state_call RPC to Zebra's JsonRPC server.
  • Adds new RemoteStateRpc trait to methods.rs and implements for RpcIml.
  • Adds new RPC to server spawn method.
  1. Add RemoteStateService as endpoint to new remote functionality.
  • Adds RemoteStateService struct to service.rs.
  • Implements tower::Service for equivalent functionality to the ReasdStateService.

NOTE: This feature has been added under the "remote_read_state_service" feature flag, this could be removed if this functionality should be enabled by default.

NOTE 2: This feature is now ready for review but is built on zcash/librustzcash#1745. For that reason I have left as draft until that PR lands.

Tests

Currently no new tests have been added, this is largely due to struggling to work out where / how tests should be added for this feature. I am happy to add any tests that are required.

Currently this code is tested in Zaino in the following PR: zingolabs/zaino#247.

Specifications & References

Follow-up Work

PR Checklist

  • The PR name is suitable for the release notes.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.
  • If the PR shouldn't be in the release notes, it has the
    C-exclude-from-changelog label.

@idky137 idky137 requested review from a team as code owners March 20, 2025 14:24
@idky137 idky137 requested review from upbqdn and removed request for a team March 20, 2025 14:24
@idky137 idky137 marked this pull request as draft March 20, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: Remote ReadStateService.
1 participant