Skip to content

Potenitally incorrect frame border check in pop_values #86

@Harrm

Description

@Harrm

Hi!
I'm implementing the stack limiter logic for KAGOME, an alternative Polkadot Host implementation, and I'm confused by this line:
https://github.com/paritytech/wasm-instrument/blob/39fa497aeec3f35c0d9419ff804aa3beae22c2d5/src/stack_limiter/max_height.rs#L106C2-L106C2

Shouldn't the check be

if self.height - value_count < top_frame.start_height

to make sure that neither of the popped values exceed the frame border?

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