-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
feat: generalize blobs to data for extension ready for ils and/or data columns #6693
base: unstable
Are you sure you want to change the base?
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
…a columns rename types and fix references to them update forkchoice and availability flow propagate changes to the codebase lint and tsc some fixes cleanup test run fixes fix the tests fix
function notOnOutOfRangeData(beaconBlockRoot: Root): void { | ||
const protoBeaconBlock = chain.forkChoice.getBlock(beaconBlockRoot); | ||
if (!protoBeaconBlock) { | ||
throw new ApiError(400, "Block not in forkChoice"); |
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.
add beaconBlockRoot
to error message
}; | ||
}, | ||
|
||
outOfRangeData( |
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.
when is a block "out of range data"?
}; | ||
type Availability<T> = {availabilityPromise: Promise<T>; resolveAvailability: (data: T) => void}; | ||
|
||
type CachedBlobs = BlobsInputCache & Availability<BlockInputDataBlobs>; |
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.
having both CachedBlobs
and BlobsCache
types seems confusing
preDeneb = "preDeneb", | ||
postDeneb = "postDeneb", | ||
blobsPromise = "blobsPromise", | ||
preData = "preData", |
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.
drop a comment to note this also means pre deneb
a note for reviewers, this PR also adds a new field "dataAvailabilityStatus" to forkchoice |
@@ -136,33 +136,29 @@ export class SeenGossipBlockInput { | |||
|
|||
if (blobKzgCommitments.length === blobsCache.size) { | |||
const allBlobs = getBlockInputBlobs(blobsCache); | |||
resolveAvailability({...allBlobs, blobsSource: BlobsSource.gossip}); | |||
const blockData = {...allBlobs, blobsSource: BlobsSource.gossip, fork: cachedData.fork} as BlockInputDataBlobs; |
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.
do we need to enhance type to avoid type. cast?
to avoid redoing the same work on different branches and have a clean way to extend data requirements