-
Notifications
You must be signed in to change notification settings - Fork 3.9k
op-supervisor: Check Consistency in Query Functions #14765
Copy link
Copy link
Closed
Labels
A-op-supervisorArea: op-supervisorArea: op-supervisorC-bugCategory: bugsCategory: bugsH-interopHardfork: change planned for interop upgradeHardfork: change planned for interop upgrade
Description
IsCrossUnsafeonly checks if the block given has a lower number than whatever actualcrossUnsafeblock is recorded. If an inconsistent block is used, the function does not notice.ParentBlockonly takes thenumberfrom 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-op-supervisorArea: op-supervisorArea: op-supervisorC-bugCategory: bugsCategory: bugsH-interopHardfork: change planned for interop upgradeHardfork: change planned for interop upgrade