Move layer numbering to the ENV #3278
Open
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 and Related Issue(s)
Resolves #2554
Makes rollup layer numbering configurable so instances can use L2/L3 (or other pairs) instead of the default L2/L1, as requested in Canny.
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER(default2) and centralizes layer labels inlib/rollups/utils.ts(layerLabels.current/layerLabels.parent).Proposed Changes
NEXT_PUBLIC_ROLLUP_LAYER_NUMBERand wired it in rollup config and ENV validator.lib/rollups/utils.tswithlayerLabelsand status-formatting helpers; all rollup views now use these labels instead of literal "L1"/"L2".docs/ENVS.md(new variable and minor wording: "L1" → "parent", "L2" → "rollup" where generic).Environment variables
NEXT_PUBLIC_ROLLUP_LAYER_NUMBER(optional, number, default2) – Layer number of the rollup. Used to show "L2"/"L1" (or e.g. "L3"/"L2") in the UI. Set to3for L3 chains.Breaking or Incompatible Changes
None. Default remains
2(L2/L1).Additional Information
.env.optimismexample updated for the new variable.Checklist for PR author