ethereum / ethereum/evmdasm

invalid opcode logs an error, which could be too severe

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
61
Forks
13
PR merge metrics
No merged PRs in 30d

Description

there is an error-level log message in [evmdasm/disassembler.py L:36](https://github.com/ethereum/evmdasm/blob/544ba8c659bd56d35c984ca3a2d6af2cc265bd2b/evmdasm/disassembler.py#L36)

the problem is that this `error` level log could create high severity noise in logging / output, whereas it does not result in general derailing of the function, just a skipped opcode.

to reduce output noise, I would suggest two approaches:

1. change the log level to `logger.warning()` because it's not a showstopper, but it is still irregular and it is not the expected operation

2. if we deem this as a serious error (which isn't currently, because currently it do not stop operation just skip the erroneous opcode) then raise an exception. However, for backward compatibility it should not be the default solution (in case someone already decided to let these happen), but rather as an option to raise an exception if an invalid opcode is encountered. however, the logging severity should still be lowered in case someone does not want to get exceptions for invalid opcodes - again, to reduce noise

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.