Assessment reports>Scroll zkEVM>Discussion>Incorrect comments for memory gadgets

Incorrect comments for memory gadgets

In zkevm-circuits/src/evm_circuit/util/memory_gadget.rs, there are some comments that appear to refer to constants that have since been renamed. Concretely, in MemoryExpansionGadget::construct, there are several comments referring to MAX_QUAD_COST_IN_BYTES and MAX_MEMORY_SIZE_IN_BYTES that should be N_BYTES_GAS and N_BYTES_MEMORY_WORD_SIZE instead. There are also other functions referring to the old names.

The comment for MemoryCopierGasGadget::construct seems copied from MemoryExpansionGadget::construct and does not fit the function it is documenting.

The incorrect constant names for MemoryExpansionGadget::construct were fixed in commit

Zellic © 2024Back to top ↑