-
Notifications
You must be signed in to change notification settings - Fork 374
Avoid dropping sidecars tracker on block import in Gloas #10788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
297b55e
1809daf
2352226
b155024
386aa94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,8 +255,19 @@ public void onSlot(final UInt64 slot) { | |
| .values() | ||
| .removeIf( | ||
| tracker -> { | ||
| if (tracker.slot().isLessThan(firstNonFinalizedSlot) | ||
| || recentChainData.containsBlock(tracker.blockRoot())) { | ||
| final boolean isCleanupDue; | ||
| if (tracker.slot().isLessThan(firstNonFinalizedSlot)) { | ||
| isCleanupDue = true; | ||
| } else { | ||
| final boolean blockImported = recentChainData.containsBlock(tracker.blockRoot()); | ||
| final boolean isDataAvailabilityDeferred = | ||
| spec.atSlot(tracker.slot()) | ||
| .getForkChoiceUtil() | ||
| .isDataAvailabilityCheckDeferredToExecutionPayloadEnvelope(); | ||
| isCleanupDue = blockImported && !isDataAvailabilityDeferred; | ||
| } | ||
|
|
||
| if (isCleanupDue) { | ||
| // Outdated | ||
| if (!tracker.completionFuture().isDone()) { | ||
| // make sure the future releases any pending waiters | ||
|
|
@@ -285,6 +296,16 @@ public void onNewBlock(final SignedBeaconBlock block, final Optional<RemoteOrigi | |
| } | ||
| } | ||
|
|
||
| @Override | ||
|
cursor[bot] marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should have instead of the two new methods added to public interface DataAvailabilitySampler extends BlockEventsListener, ReceivedBlockEventsChannel, ReceivedExecutionPayloadEventsChannelTo avoid repetition and delegation.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure about this as well
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ive moved only payload event |
||
| public void onBlockImported(final SignedBeaconBlock block) { | ||
| if (spec.atSlot(block.getSlot()) | ||
| .getForkChoiceUtil() | ||
| .isDataAvailabilityCheckDeferredToExecutionPayloadEnvelope()) { | ||
| return; | ||
| } | ||
| removeAllForBlock(block.getSlotAndBlockRoot()); | ||
| } | ||
|
|
||
| @Override | ||
| public void removeAllForBlock(final SlotAndBlockRoot slotAndBlockRoot) { | ||
| final DataColumnSamplingTracker removed = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /* | ||
| * Copyright Consensys Software Inc., 2026 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
| * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| package tech.pegasys.teku.statetransition.execution; | ||
|
|
||
| import tech.pegasys.teku.spec.datastructures.blocks.SlotAndBlockRoot; | ||
|
|
||
| public interface ExecutionPayloadEventsListener { | ||
| ExecutionPayloadEventsListener NOOP = slotAndBlockRoot -> {}; | ||
|
|
||
| void onExecutionPayloadImported(SlotAndBlockRoot slotAndBlockRoot); | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we can get rid of
createAvailabilityCheckerOnBlockandcreateAvailabilityCheckerOnExecutionPayloadEnvelopeand have onlycreateAvailabilityCheckerand this boolean method and have a simple if inon_block, I think better naming isisDataAvailabilityDeferredUntilExecutionPayloadProcessing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we move all logic in ForkChoice. I don't think it's good.
