Skip to content

Prevent unwind and log when manual unwind is attempted past pruning config #16579

@Rjected

Description

@Rjected

Describe the feature

Right now if you attempt to unwind past the account / storage history limit, for example the one configured here:

account_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
storage_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),

This will result in an error in the merkle stage. It makes sense that the merkle unwind would fail, because we don't have enough history. However, we should instead return an error and add a log for the user before running any stages if we find that we don't have enough history and can't unwind to the desired block

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-staged-syncRelated to staged sync (pipelines and stages)C-enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions