Skip to content

ModExpInput prevents creating trimmed inputs #2043

@chfast

Description

@chfast

The ModExpInput creates integer representations of base, exp and mod. This is a mistake which prevents creating valid and cheap inputs.
E.g. you can create an input of base 0, mod 0 and non-zero exp of length 2**64 as:

0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000010000000000000000 0000000000000000000000000000000000000000000000000000000000000000 80

Similarly, the Spec.calculate_gas_cost() is impractical because it takes the exponent : bytes parameter.

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