-
Notifications
You must be signed in to change notification settings - Fork 0
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(native): enhance traceability with additional logs for better debugging #197
Conversation
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 need to ensure that whatever logger the integrator uses it should work for him
"sync" | ||
"time" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
"github.com/ethereum/go-ethereum/crypto" | ||
"github.com/ethereum/go-ethereum/log" |
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 we know that this is the logging library that every integrator will use?
We had logging before in avalanche integration, so we had to expose in the api so user could pass in his own logger interface and we'd use that. I'm not sure we can assume logging implementation users will use, that's why this PR was not trivial to implement right away
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.
This is how we did the logger before https://github.com/zama-ai/fhevm-go/blob/53d5dae4d6a4c9d887ce6cb484b642b964efc690/fhevm/interface.go#L26 we allow user to provide interface object as part of the environment
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.
Maybe the perfect place to pass in the logger would be once in adding argument to func InitExecutor
? CreateSession
happens many times in every EVM call, we could keep one pointer to logger after InitExecutor
and keep that for the entirety of application
Makes sense! For the record, |
Summary
Simplifies debugging by adding trace logs for key actions such as
execute
,commit
,queue
,flush
, andcompute
.Changes
log.debug
level with a few inlog.info
.--verbosity 4
CLI parameter.Examples for Filtering Logs
grep fhevm
: Display all FHEVM-related logs.grep handle=59b4f9
: Filter logs by specific handle.grep 'sync compute'
: Display input and output ofgrpc.SyncCompute
.