Skip to content

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Oct 20, 2025

fixes #9976

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Stop publishing reconstructed data column sidecars while syncing; add a recovered-sidecar subscriber API and wire Gossip, EL recovery, recovering custody, and retriever together.

  • Core behavior:
    • Gate publishing of recovered DataColumnSidecars on node sync status in DataColumnSidecarRecoveringCustodyImpl and DataColumnSidecarELRecoveryManagerImpl (new onSyncingStatusChanged hooks; only publish when inSync).
    • Sync state updates are propagated from SyncService to both components.
  • New API / Events:
    • Add RecoveredColumnSidecarSubscriber and subscribeToRecoveredColumnSidecar to DataColumnSidecarELRecoveryManager and DataColumnSidecarRecoveringCustody; notify subscribers on recovered sidecars.
  • Wiring/Plumbing:
    • Introduce completeDasClassesPluming() in BeaconChainController to connect flows:
      • Gossip -> RecoveringCustody and EL Recovery
      • EL Recovery <-> RecoveringCustody (recovered sidecars)
      • All sources -> DataColumnSidecarRetriever.
  • Cleanup:
    • Remove DataColumnSidecarManager.onDataColumnSidecarPublish and related NOOP/usage.
  • Tests:
    • Add test to ensure no publishing while syncing; adjust setup to default to in-sync.

Written by Cursor Bugbot for commit 4c0e64e. This will update automatically on new commits. Configure here.

Copy link
Contributor

@StefanBratanov StefanBratanov left a comment

Choose a reason for hiding this comment

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

LGTM

@tbenr tbenr enabled auto-merge (squash) October 20, 2025 12:10
@tbenr tbenr disabled auto-merge October 20, 2025 12:43
dataColumnSidecarPublisher.accept(dataColumnSidecar, RemoteOrigin.RECOVERED);
}
recoveredColumnSidecarSubscribers.forEach(
subscriber -> subscriber.onRecoveredColumnSidecar(dataColumnSidecar, LOCAL_EL));
Copy link

Choose a reason for hiding this comment

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

Bug: Inconsistent Origin Label for Recovered Sidecars

The RemoteOrigin for recovered sidecars is LOCAL_EL when notifying subscribers, which is inconsistent with other calls in the method using RemoteOrigin.RECOVERED. Since these sidecars are reconstructed, not from the local execution layer, LOCAL_EL misrepresents their true origin and could lead to downstream misinterpretation.

Fix in Cursor Fix in Web

@tbenr tbenr added the DO NOT MERGE Not ready to merge label Oct 20, 2025
@tbenr
Copy link
Contributor Author

tbenr commented Oct 20, 2025

added a Do Not Merge until we come in agreement with what to do with complicated pluming

Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

You need to merge latest changes with DasSamplerBasic/ DasPreSampler. I will recheck after this.
New solution looks better with some flows explicitely defined in BeaconChainController, but we still keep have this ring DataColumnSidecarComponent -> Gossip -> DataColumnSidecarManager -> DataColumnSidecarComponent. Maybe add the test to each component in ring:

onNewValidatedSidecar(sidecar);
onNewValidatedSidecar(sameSidecar);
verifyNoInteraction(everything);

just to be sure we always do nothing on the same sidecar submitted again, just thoughts. Anyway you cut some unnneeded links and have not added new so it's definitely better.

dataColumnSidecarELRecoveryManager::onNewDataColumnSidecar);

// RecoveringCustody -> EL Recovery
dataColumnSidecarRecoveringCustody.subscribeToRecoveredColumnSidecar(
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need this, EL recovery manager needs only trigger to start, if we already recovered everything we don't need to feed it to him. It has ignore for RECOVERED sidecars in logic.

dataColumnSidecarPublisher.accept(dataColumnSidecar, RemoteOrigin.RECOVERED);
}
recoveredColumnSidecarSubscribers.forEach(
subscriber -> subscriber.onRecoveredColumnSidecar(dataColumnSidecar, LOCAL_EL));
Copy link
Contributor

Choose a reason for hiding this comment

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

cursor is right about incorrect origin

import tech.pegasys.teku.statetransition.blobs.RemoteOrigin;

public interface RecoveredColumnSidecarSubscriber {
void onRecoveredColumnSidecar(DataColumnSidecar dataColumnSidecar, RemoteOrigin origin);
Copy link
Contributor

Choose a reason for hiding this comment

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

as we still have origin, it is confusing to have separate subscriber type. I'd reuse other DataColumnSidecar subscriber or default with RemoteOrigin.RECOVERED

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

Labels

DO NOT MERGE Not ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publishing column sidecars while syncing far from the head?

3 participants