refactor(archiver): extract l1 synchronizer and factory#19553
Closed
spalladino wants to merge 1 commit intonextfrom
Closed
refactor(archiver): extract l1 synchronizer and factory#19553spalladino wants to merge 1 commit intonextfrom
spalladino wants to merge 1 commit intonextfrom
Conversation
5bde3cc to
8b8bbd1
Compare
Collaborator
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
Contributor
Author
|
Closing in favor of #19564 |
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.
Extracts L1 synchronization logic out of the archiver and into a separate class. Also extracts the
createAndSyncmethod into the archiver factory, and lifts some more methods to theArchiveSourceBase.Created Files
archiver/src/archiver/archiver_l1_synchronizer.ts(~800 lines): New class that extracts all L1 synchronization logic from the Archiver, including:syncFromL1()- Main sync orchestrationhandleCheckpoints()- Checkpoint retrieval and validationhandleL1ToL2Messages()- L1→L2 message fetchinghandleEpochPrune()- Epoch pruning detectionTraceableinterface for distributed tracingModified Files
archiver/src/archiver/archiver.ts: Removed ~630 lines of L1 sync code; constructor now acceptssynchronizerandeventsas injected dependenciesarchiver/src/factory.ts: ConsolidatedArchiver.createAndSync()logic intocreateArchiver(); creates synchronizer/events and injects themarchiver/src/archiver/index.ts: Added export forArchiverL1Synchronizeraztec/src/cli/cmds/start_archiver.ts: Changed fromArchiver.createAndSync()tocreateArchiver()archiver/src/archiver/archiver.sync.test.tsandarchiver.test.ts: Updated to create synchronizer and events before creating ArchiverArchitectural Change
ArchiverL1SynchronizerThis aligns with the plan goal of "clean separation of the archiver into syncing (L1 sync) vs datastore (storage + reads)".