This repository was archived by the owner on Aug 19, 2024. It is now read-only.
Expose unsafe debug APIs via IPC#2075
Merged
sjnam merged 10 commits intoklaytn:devfrom Jan 5, 2024
sjnam:unsafe-debug
Merged
Conversation
added 2 commits
December 19, 2023 09:49
hyunsooda
previously approved these changes
Dec 20, 2023
added 2 commits
December 21, 2023 08:54
Contributor
|
Question for the last two commits, Has the semantics changed to disallow unsafe APIs via RPC even when the |
hyunsooda
previously approved these changes
Dec 26, 2023
2dvorak
suggested changes
Dec 26, 2023
Collaborator
2dvorak
left a comment
There was a problem hiding this comment.
@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?
2dvorak
reviewed
Jan 2, 2024
Collaborator
|
Tested like below, seems like working as intended. |
blukat29
reviewed
Jan 2, 2024
Contributor
blukat29
left a comment
There was a problem hiding this comment.
LGTM except adding some comments
blukat29
reviewed
Jan 3, 2024
blukat29
approved these changes
Jan 3, 2024
2dvorak
approved these changes
Jan 4, 2024
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Proposed changes
Unsafe debug APIs are
ken attach klay.ipc) regardless of--rpc.unsafe-debug.disable flagnor--rpcapi--rpc.unsafe-debug.disable == falseAND--rpcapicontainsdebugTypes 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...