-
Notifications
You must be signed in to change notification settings - Fork 190
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
Expose unsafe debug APIs via IPC #2075
Conversation
Question for the last two commits, Has the semantics changed to disallow unsafe APIs via RPC even when the |
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.
@sjnam Seems like debug.traceTransaction
works in the opposite way.
root@EN-0:/# ken attach /klaytn/klay.ipc
> debug.traceTransaction("0x4dd0c11d2430acdd73153a94ab900a025010d113a68097c042511f3768352775", {tracer: '{data: [], step: function(log) {}, result: function() { return this.data; }, fault: function(){}}'})
Error: Only predefined tracers are supported
at web3.js:6810:9(39)
at send (web3.js:5221:62(29))
at <eval>:1:23(6)
root@EN-0:/# ken attach http://localhost:8551
> debug.traceTransaction("0x4dd0c11d2430acdd73153a94ab900a025010d113a68097c042511f3768352775", {tracer: '{data: [], step: function(log) {}, result: function() { return this.data; }, fault: function(){}}'})
[]
Could you have a look?
Tested like below, seems like working as intended.
|
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.
LGTM except adding some comments
Proposed changes
Unsafe debug APIs are
ken attach klay.ipc
) regardless of--rpc.unsafe-debug.disable flag
nor--rpcapi
--rpc.unsafe-debug.disable == false
AND--rpcapi
containsdebug
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...