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

fix(rpc): use the correct RPC error code for missing blocks #3977

Merged
merged 6 commits into from
Mar 30, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Mar 28, 2022

Motivation

lightwalletd expects a specific RPC error code for missing blocks.

If it doesn't get that error code, it exits with a fatal error.

Specifications

This error code is not documented, but I opened a zcashd ticket here:
zcash/zcash#5758

Solution

  • Return the expected error code for missing blocks
  • Add a unit test
  • Update the lightwalletd integration test

Related changes:

  • Check for some extra RPC failure logs from lightwalletd

Review

Anyone can review this PR.

This fix might be needed for tickets like #3512 (@jvff) and #3926 (@gustavovalverde). Without this fix, lightwalletd exits with a fatal error when it reaches the tip.

Reviewer Checklist

  • Code implements Specs and Designs
  • Tests for Expected Behaviour
  • Tests for Errors

@teor2345 teor2345 added C-bug Category: This is a bug P-High 🔥 I-panic Zebra panics with an internal error message A-rpc Area: Remote Procedure Call interfaces labels Mar 28, 2022
@teor2345 teor2345 requested a review from a team as a code owner March 28, 2022 04:05
@teor2345 teor2345 requested review from dconnolly and removed request for a team March 28, 2022 04:05
@teor2345 teor2345 self-assigned this Mar 28, 2022
zebra-rpc/src/methods.rs Outdated Show resolved Hide resolved
Co-authored-by: Deirdre Connolly <[email protected]>
@teor2345 teor2345 requested a review from dconnolly March 28, 2022 22:07
@teor2345
Copy link
Contributor Author

The tests failed due to #3991, so I restarted them.

mergify bot added a commit that referenced this pull request Mar 30, 2022
@mergify mergify bot merged commit ce51ad0 into main Mar 30, 2022
@mergify mergify bot deleted the getblock-error-code branch March 30, 2022 23:34
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 C-bug Category: This is a bug I-panic Zebra panics with an internal error message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants