Skip to content

A fallback path moves the head without waiting for execution #388

Open

Description

@SDL-A1

From the external review of #374. crates/storage/src/lib.rs around line 1028.

One fallback path moves the head without waiting for execution, which breaks
the PR's own stated rule. The reviewer notes it is hard to reach.

Why it is worth an issue despite being hard to reach

"Wait for execution before moving the head" is the invariant this PR introduces
to replace the orphan-adoption path that wedged mainnet twice (#9,251,058 and
the #9,422,657 warning seen on the current binary). A single path that does not
honour it is the one that will be taken the next time something unusual happens —
and the whole value of the new design is that the invariant holds everywhere.

What would settle it

Either route the fallback through the same wait, or document at the call site why
this path cannot produce an unexecuted head, with the reasoning rather than an
assertion.

Reported by the external reviewer; the anchor is approximate ("~1028") and has
not been re-derived here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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