-
Notifications
You must be signed in to change notification settings - Fork 3.9k
op-supervisor: safety index (work in progress) #12387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Changes from Axel: - Wire in APIs for new input flow - Better logging for Iterator State Needs - Remove Chain Monitor ; Trigger Chain Processor on Local Unsafe Update - BlockRef - uncomment skipped guard Work in progress by Proto: - op-supervisor: generic entry type - experimental - op-supervisor: progresss on generic entry db, and derived-from DB
| if err != nil { | ||
| return common.Hash{}, err | ||
| } | ||
| // TODO(#11693): need to get the actual block hash for this log entry for reorg detection | ||
| return common.Hash{}, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if err != nil { | ||
| return err | ||
| } | ||
| return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if err != nil { | ||
| return eth.BlockID{}, err | ||
| } | ||
| // TODO fix this for cross-safe to work | ||
| return eth.BlockID{}, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| finalizedL1 := db.finalizedL1 | ||
| derived, err := db.LastDerivedFrom(chainID, finalizedL1.ID()) | ||
| if err != nil { | ||
| return eth.BlockID{}, fmt.Errorf("could not find what was last derived from the finalized L1 block") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No fmt.Errorf invocations without fmt arguments allowed
| // The L2 blockhash ensures we are still checking the same log content. | ||
| crossDerivedFrom, err := s.deps.CrossDerivedFrom(chainID, includedIn, execMsg.LogIdx) | ||
| if err != nil { | ||
| // TODO this can be ErrFuture when we don't know the cross-derivation link of the L2 block yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // does indeed exist in an L2 block. | ||
| includedIn, err := s.deps.Check(chainID, execMsg.BlockNum, execMsg.LogIdx, execMsg.Hash) | ||
| if err != nil { | ||
| // TODO this can be an ErrFuture where we just don't have the data for a definite answer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Closing in favor of #12427 And will open a separate PR for the derived-from DB, and another separate PR for the cross-safe update process. |
Changes from Axel, rebased on develop (from #12213 ):
Work in progress by Proto:
Description
Draft PR, to track changes.
Plan to land the changes:
entrydb, including the naming / usages tweaks in the event logs index.fromdafromdatype of index, to handle the safety index functionalityTests
Work in progress
Additional context
Metadata