-
Notifications
You must be signed in to change notification settings - Fork 44
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
Problem: Missing debug_traceCall RPC #367
Problem: Missing debug_traceCall RPC #367
Conversation
Solution: Implemented the RPC
var tracerConfig json.RawMessage | ||
if req.TraceConfig != nil && req.TraceConfig.TracerJsonConfig != "" { | ||
// ignore error. default to no traceConfig | ||
_ = json.Unmarshal([]byte(req.TraceConfig.TracerJsonConfig), &tracerConfig) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack. Warning
1da357c
to
b58b94b
Compare
return nil, status.Error(codes.InvalidArgument, "empty request") | ||
} | ||
|
||
if req.TraceConfig != nil && req.TraceConfig.Limit < 0 { |
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.
not sure if we need handle stateOverrides
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 can see in eth_call
the state overrides param are ignored too (
ethermint/rpc/namespaces/ethereum/eth/api.go
Line 283 in 199ccc2
_ *rpctypes.StateOverride, |
In addition, from the debug_traceCall
API documentation, I didn't see it can specify state override, do you know how do they pass the stateOverrides config?
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.
seems like some lesser known feature, we don't support yet. we can do that in a separate PR I think.
ref: #368
rpc/namespaces/ethereum/debug/api.go
Outdated
blockNrOrHash rpctypes.BlockNumberOrHash, | ||
config *evmtypes.TraceConfig, | ||
) (interface{}, error) { | ||
a.logger.Debug("eth_call", "args", args.String(), "block number or hash", blockNrOrHash) |
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.
do you mean debug_traceCall
here, and do we mv the block not found check here?
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 for pointing out!
merged: #390 |
Solution: Implemented the RPC
Closes: #XXX
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)