Wrong documentation for `instruction_cost()`
Opened this issue · 0 comments
koxu1996 commented
Note: This is upstream bug, but I stumbled upon it while investigating forbidden opcodes in Casper.
Looking at the documentation of Rules::instruction_cost()
:
casper-wasm-utils/src/rules.rs
Lines 12 to 14 in 57a3b0e
the part "where any instruction that is not specifed is considered as forbidden" does not seem to be fully correct.
None
- which is used as indication of error - is returned only when instruction type is marked as forbidden. In case instruction type does not have metering type assigned, regular cost will be used for opcode:
casper-wasm-utils/src/rules.rs
Lines 352 to 357 in 57a3b0e