refactor(pxe): introduce openPxeStores factory for backing sub-stores#23028
Merged
Conversation
mverzilli
approved these changes
May 7, 2026
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.
Land the
openPxeStores(store, initialBlockHash)factory onnext. Originally introduced onmerge-train/fairiesas part of #22872 (pxe db schema compatibility test); porting just the factory + itspxe.tscaller is the right fix to converge both branches and stop the recurringnext → merge-train/fairiesmerge-train conflict at the source.Diff
yarn-project/pxe/src/storage/open_pxe_stores.ts(49 lines, byte-identical to the fairies copy). Defines thePxeStoresreturn type and the factory that constructs the canonical set of sub-stores PXE opens against the backing KV store.yarn-project/pxe/src/pxe.ts: replace the inlinenew AddressStore(store) / ... / new L2TipsKVStore(store, 'pxe', initialBlockHash)block insidePXE.createwith a destructure offopenPxeStores(store, initialBlockHash). Drop the now-unusedL2TipsKVStoreimport. Local variable name aligns with the factory return (l2TipsStore); class field is unchanged.vs
next: 2 files, +65/-14. vsmerge-train/fairiesfor these two files: empty (byte-identical).Why
Greg's call — the factory is the desired direction. After this lands on
next, the nextmerge-next.shrun (next → merge-train/fairies) auto-merges these files with zero conflicts. The pxe-db schema-compatibility test that lives on fairies (and usesopenPxeStoresfor inventory snapshotting) regains its intended invariant —pxe.tsactually goes through the factory.Scope
Only the production factory +
pxe.tscaller. The full schema-compatibility test suite (backwards_compatibility_tests/) stays on fairies for now; bringing it over is a separate decision.Details: https://gist.github.com/AztecBot/23b7603e153bcd7687a60de6bcc32b7e
ClaudeBox log: https://claudebox.work/s/8a13135d95b87e96?run=6