Skip to content

Align on Opcodeand Bytecode __hash__ and __eq__ logic #2190

@fselmo

Description

@fselmo

Some optimizations involving caching calls that deal with Opcode and Bytecode revealed that, since adding metadata to these classes, we do not take these into account when generating a unique __hash__() for these classes, nor when comparing via __eq__(). Unfortunately, for the Opcode case, this is relied upon in the opcode_gas_map so we can't just account for these without refactoring how this map works.

For more context on how these issues bubbled up and a band-aid fix, without this larger refactor, see #2185. I think the actual fix is aligning these dunder methods to take metadata into account but more discussion is needed to align on the next steps here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions