Skip to content

fix: override MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS for Gnosis#9075

Merged
nflaig merged 1 commit intoChainSafe:unstablefrom
lodekeeper:fix/gnosis-data-column-retention
Mar 20, 2026
Merged

fix: override MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS for Gnosis#9075
nflaig merged 1 commit intoChainSafe:unstablefrom
lodekeeper:fix/gnosis-data-column-retention

Conversation

@lodekeeper
Copy link
Copy Markdown
Contributor

Problem

The Gnosis chain config inherits mainnet's MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096, but the official Gnosis config specifies 16384.

With Gnosis's faster block times (5s slots, 16 slots/epoch), this drastically shortens the data column retention window:

Config Epochs Retention
Mainnet (4096 × 32 slots × 12s) 4096 ~18.2 days
Gnosis with wrong 4096 (4096 × 16 slots × 5s) 4096 ~3.7 days
Gnosis with correct 16384 (16384 × 16 slots × 5s) 16384 ~15.2 days

Impact (once Fulu activates on Gnosis)

  1. Premature pruning: Lodestar prunes data columns after ~3.7 days instead of ~15 days
  2. Refuses serving: DataColumnSidecarsByRoot handler rejects requests for columns older than ~3.7 days (packages/beacon-node/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts:22-27)
  3. Archive pruning: Block archiver prunes data column sidecars too aggressively (packages/beacon-node/src/chain/archiveStore/utils/archiveBlocks.ts:171-195)
  4. Interop mismatch: Other clients using the correct 16384 would retain data for ~15 days, causing Lodestar to diverge from the network

Evidence

Fix

Add MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 16384 to the Gnosis chain config, matching the official Gnosis config and the existing blob sidecars override.

Flagged by @chatgpt-codex-connector in #9074 (comment)

Gnosis config was inheriting mainnet's value of 4096 for
MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS. With Gnosis's faster
block times (5s slots, 16 slots/epoch), this gives only ~3.7 days
of data column retention instead of the intended ~15 days.

The official Gnosis config specifies 16384:
https://github.com/gnosischain/configs/blob/main/mainnet/config.yaml

This matches the existing MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS
override already present in the Gnosis config.

Without this fix, once Fulu activates on Gnosis:
- Lodestar nodes prune data columns after ~3.7 days
- Other clients retain them for ~15 days
- Lodestar would refuse to serve older data columns via
  DataColumnSidecarsByRoot requests
@lodekeeper lodekeeper requested a review from a team as a code owner March 20, 2026 16:27
@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical configuration mismatch for the Gnosis chain, specifically addressing the data column sidecar retention period. The change ensures that the application adheres to the official Gnosis network specifications, thereby preventing issues like premature data pruning, refusal of serving older data, and maintaining interoperability with other clients on the network.

Highlights

  • Gnosis Chain Configuration Fix: Corrected the MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS value for the Gnosis chain configuration to 16384. This aligns the application's settings with the official Gnosis config, preventing premature data column pruning and ensuring proper data retention.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly overrides the MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS for the Gnosis chain configuration. The new value of 16384 aligns with the official Gnosis specification, fixing an issue where the incorrect value was inherited from the mainnet configuration. This change ensures the data column retention window is appropriate for Gnosis's block time. The change is well-documented and correct.

@nflaig nflaig merged commit 7552832 into ChainSafe:unstable Mar 20, 2026
19 checks passed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.28%. Comparing base (70938e1) to head (a443853).
⚠️ Report is 2 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #9075   +/-   ##
=========================================
  Coverage     52.28%   52.28%           
=========================================
  Files           848      848           
  Lines         62155    62155           
  Branches       4544     4544           
=========================================
  Hits          32498    32498           
  Misses        29592    29592           
  Partials         65       65           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

matthewkeil pushed a commit that referenced this pull request Apr 1, 2026
…#9075)

## Problem

The Gnosis chain config inherits mainnet's
`MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096`, but the [official
Gnosis
config](https://github.com/gnosischain/configs/blob/main/mainnet/config.yaml)
specifies `16384`.

With Gnosis's faster block times (5s slots, 16 slots/epoch), this
drastically shortens the data column retention window:

| Config | Epochs | Retention |
|--------|--------|-----------|
| Mainnet (4096 × 32 slots × 12s) | 4096 | **~18.2 days** |
| Gnosis with wrong 4096 (4096 × 16 slots × 5s) | 4096 | **~3.7 days** ❌
|
| Gnosis with correct 16384 (16384 × 16 slots × 5s) | 16384 | **~15.2
days** ✅ |

### Impact (once Fulu activates on Gnosis)

1. **Premature pruning**: Lodestar prunes data columns after ~3.7 days
instead of ~15 days
2. **Refuses serving**: `DataColumnSidecarsByRoot` handler rejects
requests for columns older than ~3.7 days
(`packages/beacon-node/src/network/reqresp/handlers/dataColumnSidecarsByRoot.ts:22-27`)
3. **Archive pruning**: Block archiver prunes data column sidecars too
aggressively
(`packages/beacon-node/src/chain/archiveStore/utils/archiveBlocks.ts:171-195`)
4. **Interop mismatch**: Other clients using the correct 16384 would
retain data for ~15 days, causing Lodestar to diverge from the network

### Evidence

- Official Gnosis config:
[`MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS:
16384`](https://github.com/gnosischain/configs/blob/main/mainnet/config.yaml)
- The existing `MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 16384` override
is already present in `gnosis.ts` (line 35) — this is the same pattern

## Fix

Add `MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 16384` to the Gnosis
chain config, matching the official Gnosis config and the existing blob
sidecars override.

Flagged by @chatgpt-codex-connector in
#9074 (comment)

Co-authored-by: lodekeeper <lodekeeper@users.noreply.github.com>
@wemeetagain
Copy link
Copy Markdown
Member

🎉 This PR is included in v1.41.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants