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

add(rpc): Add a tonic server in zebra-rpc #8674

Merged
merged 9 commits into from
Jul 16, 2024
Merged

Conversation

arya2
Copy link
Contributor

@arya2 arya2 commented Jul 12, 2024

Motivation

We want to implement the indexer RPC methods in a tonic server to stream responses to its clients.

Closes #8618.

Solution

  • Adds a tonic server similar to the one in zebra-grpc
  • Implements a simple chain_tip_change method which notifies clients when the best chain tip in Zebra changes

Tests

Tests that the server starts and the chain_tip_change method notifies the client when the best chain tip changes.

Follow-up Work

Implement the rest of the chain_tip_change method

PR Author's Checklist

  • The PR name will make sense to users.
  • The PR provides a CHANGELOG summary.
  • The solution is tested.
  • The documentation is up to date.
  • The PR has a priority label.

PR Reviewer's Checklist

  • The PR Author's checklist is complete.
  • The PR resolves the issue.

@arya2 arya2 added A-rpc Area: Remote Procedure Call interfaces P-Medium ⚡ labels Jul 12, 2024
@arya2 arya2 added this to the Zebra can replace `zcashd` milestone Jul 12, 2024
@arya2 arya2 self-assigned this Jul 12, 2024
@arya2 arya2 requested a review from a team as a code owner July 12, 2024 18:06
@arya2 arya2 requested review from oxarbitrage and removed request for a team July 12, 2024 18:06
@arya2 arya2 force-pushed the zebra-rpc-tonic-server branch from 21eee5c to a5261e6 Compare July 15, 2024 18:58
oxarbitrage
oxarbitrage previously approved these changes Jul 15, 2024
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just some comment in the default port chosen.

zebra-rpc/src/config.rs Outdated Show resolved Hide resolved
zebra-rpc/src/config.rs Outdated Show resolved Hide resolved
mergify bot added a commit that referenced this pull request Jul 16, 2024
@mergify mergify bot merged commit 14463a7 into main Jul 16, 2024
192 checks passed
@mergify mergify bot deleted the zebra-rpc-tonic-server branch July 16, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: Remote Procedure Call interfaces P-Medium ⚡
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a tonic RPC server to zebra-rpc with a read state service
2 participants