refactor!: contract logging plumbing cleanup#20282
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f5b3b8a to
b0b3c1c
Compare
47f99c2 to
166c4d6
Compare
b0b3c1c to
4bf1c81
Compare
ce99975 to
4c010c7
Compare
Compile (Noir contracts)TypeScript validationAction required: Please fix the docs examples or update them to match the current API. cc @AztecProtocol/devrel |
| "avmOpcodeStorageRead" => handle_storage_read(avm_instrs, destinations, inputs), | ||
| "avmOpcodeStorageWrite" => handle_storage_write(avm_instrs, destinations, inputs), | ||
| "utilityDebugLog" => handle_debug_log(avm_instrs, destinations, inputs), | ||
| "utilityLog" => handle_debug_log(avm_instrs, destinations, inputs), |
There was a problem hiding this comment.
Talked with Alvaro in DMs and he said that stopping in the transpiler when it comes to the public domain is the way to go.
There was a problem hiding this comment.
As a general concern with this PR, I'm a bit worried about the potential confusion between "aztec logs" and logging infrastructure. Do you think maybe using logging as much as possible for the latter case would help disambiguate?
In the case of this particular change this would mean utilityLog => utilityLogging (I guess I'm seeing why it was called utilityDebugLog in the first place...)
There was a problem hiding this comment.
never mind my comment, after going through the whole PR I think it's all quite clear now
There was a problem hiding this comment.
I'm a bit worried about the potential confusion between "aztec logs" and logging infrastructure.
I share your concern but don't like utilityLogging as it doesn't communicate and action and I failed to come up with a better naming 😏
d9c11ca to
55e3058
Compare
55e3058 to
25002e4
Compare
The `debug_log` naming became problematic as different log levels are supported and hence the name collides with the debug log level even though it's a generic util. For this reason I've renamed `debug_log` simply as `log` and I've cleaned up what used to be `debug_log.nr` file (in this PR renamed to `logging.nr`). The cleanup consists of: - dropping the log_slice functions (use of slices is now discouraged), - introducing individual functions for different log levels, - un-exposing the log level constants (the specific functions should be used instead) This is a breaking change as the imports need to get updated. This PR is a followup of #19960
25002e4 to
3fcb658
Compare

The
debug_lognaming became problematic as different log levels are supported and hence the name collides with the debug log level even though it's a generic util.For this reason I've renamed
debug_logsimply aslogand I've cleaned up what used to bedebug_log.nrfile (in this PR renamed tologging.nr). The cleanup consists of:This is a breaking change as the imports need to get updated.
This PR is a followup of #19960