-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(rpc): Log unrecognized RPC requests #3860
Conversation
Enable RPC call tracing by default. This is useful for development purposes, and should probably be removed in the future.
A middleware that will print error messages if there are unrecognized RPC requests.
Enable logging of unrecognized RPC requests.
Codecov Report
@@ Coverage Diff @@
## main #3860 +/- ##
==========================================
+ Coverage 78.74% 78.80% +0.05%
==========================================
Files 295 295
Lines 33788 33788
==========================================
+ Hits 26606 26626 +20
+ Misses 7182 7162 -20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change could be really bad for performance, let's try to limit the performance impact?
Also, logging lots of data can cause the acceptance tests to hang.
Instead of reporting it as an error. Co-authored-by: teor <teor@riseup.net>
This reverts commit 6d7f10d.
This might improve performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks great!
We can also add "Received unrecognized RPC request" to the integration test failure strings, after we get all the RPCs implemented.
Motivation
While preparing Zebra to support being a backend for lightwalletd, we should ensure we're not missing any RPCs sent by lightwalletd. One thing that can help is to trace the received RPCs and log errors if unrecognized RPC requests are received.
Closes #3855.
Solution
tracing
filter allowtrace
level output fromjsonrpc-core
Review
Reviewer Checklist
Follow Up Work