op-supervisor: cleanup, refactor, local-safe info from op-node#12427
Merged
axelKingsley merged 4 commits intodevelopfrom Oct 15, 2024
Merged
op-supervisor: cleanup, refactor, local-safe info from op-node#12427axelKingsley merged 4 commits intodevelopfrom
axelKingsley merged 4 commits intodevelopfrom
Conversation
This was referenced Oct 11, 2024
Merged
ghost
reviewed
Oct 14, 2024
ghost
reviewed
Oct 14, 2024
ghost
reviewed
Oct 14, 2024
axelKingsley
approved these changes
Oct 15, 2024
Contributor
axelKingsley
left a comment
There was a problem hiding this comment.
Taking notes as I go:
- Modifications to E2E test from #12213
- Corrections to supervisor_client from #12213
- Addition of a RW lock to explicitly prevent concurrent RW
- Replacing chainMonitors with chainProcessors from #12213
- Rename
dbtochainsDB - Insert Lock and defer.Unlock to new functions
- New backend functions UnsafeView, SafeView, Finalized, Update[...], Derived From.
- ChainsDB now expanded to map each L2 to a "Derived From Storage"
- ChainsDB now also has a RW lock
entry_dbnow uses a type-generic T to operate on EntryTypes- EntryTypes are uint64s which can yield to string
- entry.go now houses all the application specific entry types
- query.go and update.go now houses the ChainsDB functions
Removal of unused:
- Backend methods (old API)
- Frontend methods (old API)
db/heads
Contributor
|
Semgrep found 3
require() must include a reason string Ignore this finding from sol-style-require-reason. |
49a58ab to
320d742
Compare
320d742 to
0cc2e9a
Compare
samlaf
pushed a commit
to samlaf/optimism
that referenced
this pull request
Nov 10, 2024
…eum-optimism#12427) * op-supervisor: cleanup, refactor to take local-safe info from op-node * Refactor ChainProcessor Worker * remove unneeded err check * semgrep --------- Co-authored-by: axelKingsley <axel.kingsley@gmail.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a cleanup PR of the op-supervisor:
backend/db/entrydb:backend/db/heads: remove. Cross-safety was not properly updated, and we'll need to do more work to sync L1backend/db/logs:entries.goto host the encoding/decoding logic that was moved out ofentrydbbackend/db,ChainsDB:query.goupdate.godb_test.gothat was commented / broken.backend/processors:chain_processor.go,log_processor.go,client.gointo this. For fetching and processing of unsafe blocks and their events.backend/safety: remove in-memory safety-index draft. It was broken in a few ways, and we need to address the design before putting something into the supervisor.backend/source:processorspackage for the things that stay.head_monitor.go,chain.go,head_processor.go: we are getting local-safe data from the op-node, not from gethbackend/backend.go:backend/mock.go: updated the mock to fit latest backend interface. It's returning zeroed values, and should be further updated for what we really need in the e2e / testing related PRs.frontend:types:BlockSeal: likeeth.BlockIDbut with timestamp. Or likeeth.BlockRefbut without parent-hash. Having just the seal, without parent-hash, is useful as return type in many places where we don't have the parent-hash handy.service.go: register the update RPC frontend.Tests
ChainsDBtests. Work in progress, considering options on what / how to reinstate proper testing there.Additional context
This takes a few changes from #12213
Metadata
Fix #12358