-
Notifications
You must be signed in to change notification settings - Fork 27
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(debug): add APIs to allow forcing exceptions/prints/etc #277
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #277 +/- ##
==========================================
- Coverage 82.41% 82.21% -0.21%
==========================================
Files 149 150 +1
Lines 14116 14220 +104
Branches 2014 2026 +12
==========================================
+ Hits 11634 11691 +57
- Misses 2065 2113 +48
+ Partials 417 416 -1
Continue to review full report at Codecov.
|
I think so, otherwise, if a full-node has its API exposed, someone will be able to crash it. Even with the possibility of blocking requests to the |
Makes sense. I agree. Added |
6d9be29
to
48fb0d8
Compare
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 we should add more protections for those endpoints. We've discussed to allow --test-mode
only with another parameter --unsafe-mode
. Maybe we should do the same here.
I am especially worried about the last two endpoints, the one that exit the full node and corrupts the database and the other that sets storage to None. We have to make sure none of our public nodes have those endpoints available (even if it's private, we need to make sure we won't call this API by mistake in our wallets/explorer nodes).
What do you think?
About the API docs, I like having it, I think this should be as complete as possible, but maybe the public docs could have only the public endpoints, I don't know.
I'm not sure. I think
I agree. Currently I can either register the endpoints or not. Do you think it's worth it to add a mechanism to selectively register endpoints so we can optionally generate a full API doc? Or do you think it's enough for the class to have the OpenAPI description but simply not register it? @pedroferreira1 |
Agree
I think it's enough for now just not to register it. |
c06b044
to
f050479
Compare
f050479
to
946e05d
Compare
Unresolved questions:
--enable-debug-api
)_debug/
OK? I wanted it to look as something clearly made for internal use, that's why the_