-
Notifications
You must be signed in to change notification settings - Fork 112
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): Make RPC "incorrect parameters" error code match zcashd
#6066
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
teor2345
added
C-bug
Category: This is a bug
P-High 🔥
A-rpc
Area: Remote Procedure Call interfaces
A-compatibility
Area: Compatibility with other nodes or wallets, or standard rules
labels
Feb 1, 2023
I manually tested this with It got past the stage where it called the initial RPCs, so it seems to work:
|
6 tasks
oxarbitrage
approved these changes
Feb 1, 2023
teor2345
added a commit
that referenced
this pull request
Feb 6, 2023
…6066) - manually delete getblocktemplate-rpcs * Move RPC method constants into their own module * Rename RPC compatibility modules to avoid confusion * Rename RPC middleware to include its new functionality * Use FutureExt::inspect() for logging, and only format on failure * Log all RPC errors at info level * Make "invalid parameters" RPC error code match `zcashd`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-compatibility
Area: Compatibility with other nodes or wallets, or standard rules
A-rpc
Area: Remote Procedure Call interfaces
C-bug
Category: This is a bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Some miners expect specific RPC error codes.
Closes #6054
Solution
I checked the error strings and they already seem to match.
Related changes:
Review
This is on the critical path, so I guess it's a high priority?
Reviewer Checklist
Follow Up Work
The only other error codes I could find are in the payment code, which Zebra doesn't support because it doesn't have a wallet:
https://github.com/s-nomp/s-nomp/blob/8567a4c649ab6f5ea37ac3c3901f2d9c2597199a/libs/paymentProcessor.js#L750