Skip to content

substateProvider does not release iterator on early exit #241

Description

@ibrahim1023

substateProvider.Run creates a substate iterator but only calls Release() when iteration naturally reaches the end. If the provider exits early because the next transaction is outside the requested block range, or because the consumer returns an error, the iterator is not released.

This violates the iterator contract, which requires Release() after use, and can leave decoder goroutines or underlying iterator resources alive during normal bounded runs.

Expected behavior:
substateProvider.Run should release the iterator on every return path, while preserving consumer errors and surfacing iterator errors after release.

Affected file:
executor/substate_provider.go

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