Skip to content

op-supervisor: Check Consistency in Query Functions #14765

@axelKingsley

Description

@axelKingsley
  • IsCrossUnsafe only checks if the block given has a lower number than whatever actual crossUnsafe block is recorded. If an inconsistent block is used, the function does not notice.
  • ParentBlock only takes the number from the provided block to look up the parent. If they are not actually linked, this function does not notice.

These gaps could create issues when callers expect these functions to detect inconsistency, and should be repaired.

Remediation

ParentBlock
Can be removed and replaced with FindSealedBlock. However, this function is also used in the op-program, so matching changes will be needed. The op-program version also does not detect inconsistency.

IsCrossUnsafe
Can likely be extended without extra concern, though additional testing would be nice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-op-supervisorArea: op-supervisorC-bugCategory: bugsH-interopHardfork: change planned for interop upgrade

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions