op-supervisor: head pointers, refactor block processor#12031
op-supervisor: head pointers, refactor block processor#12031axelKingsley merged 2 commits intodevelopfrom
Conversation
|
Semgrep found 1 TODO in error handling code Ignore this finding from err-todo. |
axelKingsley
left a comment
There was a problem hiding this comment.
Summary of changes as I understand them:
Head Pointers
Rather than use EntryIdx to represent the pointer into the database, there's now an application specific structure which captures the Block Number and Index (called "Logs Since")
Downstream Effects
- UpdateCrossHeadsForChain now tracks the x-head position using this pointer notion. The pointer can initialize itself in position without searching around.
Safety Checkers Return Err
Rather than return bool for the safety check, they now return an error related to which kind of issue is encountered (validity or inclusion). Safety Checkers also needed to be updated to use the new storage mechanisms
Head Storage hides Update Functions
Now the storage has explicit functions to update the named safety levels, per chain. it handles making the update operation
Chain processors Refactor
Seems like Chain Processors are now using a channel based trigger instead of the previous OnNewHead. I'm not sure if these changes are very connected to the rest of the PR. I think it's so that it doesn't block?
Additionally, the headpointer_processors that I wrote yesterday are gone, in favor of using the explicit heads update functions, wrapped into satisfying the HeadProcessor interface.
|
Semgrep found 1 No |
ac27f13 to
a8e18e9
Compare
|
Semgrep found 7
No |
change entry indices to head pointers, refactor block processor, backend fixes Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
630603c to
d8212d7
Compare
|
Ok, dropped the non-supervisor changes, rebased on develop, cleaned up the truncated-hash -> common-hash type change conflicts, and fixed some linting issues. |
…mism#12031) * op-supervisor: supervisor-head-pointers squashed change entry indices to head pointers, refactor block processor, backend fixes Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com> * use ticker instead of time.After --------- Co-authored-by: Axel Kingsley <axel.kingsley@gmail.com>
Description
Experimental draft of head block pointers instead of raw indices, and fixes of the x-head maintainer to use said block pointers.
Also includes an updated block-processor (the receipts fetcher), to be more asynchronous. I might split that out into a separate PR, TBD.
Tests
Work in progress.