Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/beacon-node/src/api/impl/beacon/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ export function getBeaconBlockApi({
}

if (!blobSidecars) {
throw Error("Not found in db");
throw Error(`blobSidecars not found in db for slot=${block.message.slot} root=${toHexString(blockRoot)}`);
}
return {
executionOptimistic,
Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/db/repositories/blobSidecars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const BLOB_SIDECARS_IN_WRAPPER_INDEX = 44;
export const BLOBSIDECAR_FIXED_SIZE = 131256;

/**
* blobSidecarsWrapper by block root (= hash_tree_root(SignedBeaconBlockAndBlobsSidecar.beacon_block.message))
* blobSidecarsWrapper by block root (= hash_tree_root(SignedBeaconBlock.message))
*
* Used to store unfinalized BlobsSidecar
* Used to store unfinalized BlobSidecars
*/
export class BlobSidecarsRepository extends Repository<Uint8Array, BlobSidecarsWrapper> {
constructor(config: ChainForkConfig, db: Db) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {blobSidecarsWrapperSsz, BlobSidecarsWrapper} from "./blobSidecars.js";
/**
* blobSidecarsWrapper by slot
*
* Used to store unfinalized BlobsSidecar
* Used to store finalized BlobSidecars
*/
export class BlobSidecarsArchiveRepository extends Repository<Slot, BlobSidecarsWrapper> {
constructor(config: ChainForkConfig, db: Db) {
Expand Down
2 changes: 0 additions & 2 deletions packages/beacon-node/test/spec/presets/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import {transition} from "./transition.js";
// ],
// ```
const skipOpts: SkipOpts = {
// To be enabled in decouple blobs PR: https://github.com/ChainSafe/lodestar/pull/5181
skippedForks: ["deneb"],
// TODO: capella
// BeaconBlockBody proof in lightclient is the new addition in v1.3.0-rc.2-hotfix
// Skip them for now to enable subsequently
Expand Down
21 changes: 21 additions & 0 deletions packages/types/src/deneb/sszTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
FIELD_ELEMENTS_PER_BLOB,
MAX_BLOBS_PER_BLOCK,
MAX_REQUEST_BLOCKS,
MAX_REQUEST_BLOB_SIDECARS,
BYTES_PER_FIELD_ELEMENT,
BLOCK_BODY_EXECUTION_PAYLOAD_DEPTH as EXECUTION_PAYLOAD_DEPTH,
EPOCHS_PER_SYNC_COMMITTEE_PERIOD,
Expand Down Expand Up @@ -84,6 +85,26 @@ export const PolynomialAndCommitment = new ContainerType(
// ReqResp types
// =============

export const BlobSidecarsByRangeRequest = new ContainerType(
{
startSlot: Slot,
count: UintNum64,
},
{typeName: "BlobSidecarsByRangeRequest", jsonCase: "eth2"}
);

export const BlobIdentifier = new ContainerType(
{
blockRoot: Root,
index: BlobIndex,
},
{typeName: "BlobIdentifier", jsonCase: "eth2"}
);

export const BlobSidecarsByRootRequest = new ListCompositeType(BlobIdentifier, MAX_REQUEST_BLOB_SIDECARS);

// TODO DENEB: cleanup the following types once blob migration is complete

export const BlobsSidecarsByRangeRequest = new ContainerType(
{
startSlot: Slot,
Expand Down
4 changes: 4 additions & 0 deletions packages/types/src/deneb/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export type Polynomial = ValueOf<typeof ssz.Polynomial>;
export type PolynomialAndCommitment = ValueOf<typeof ssz.PolynomialAndCommitment>;
export type BLSFieldElement = ValueOf<typeof ssz.BLSFieldElement>;

export type BlobIdentifier = ValueOf<typeof ssz.BlobIdentifier>;
export type BlobSidecarsByRangeRequest = ValueOf<typeof ssz.BlobSidecarsByRangeRequest>;
export type BlobSidecarsByRootRequest = ValueOf<typeof ssz.BlobSidecarsByRootRequest>;
// TODO DENEB: cleanup the following old blobs types once the migration is complete
export type BlobsSidecarsByRangeRequest = ValueOf<typeof ssz.BlobsSidecarsByRangeRequest>;
export type BeaconBlockAndBlobsSidecarByRootRequest = ValueOf<typeof ssz.BeaconBlockAndBlobsSidecarByRootRequest>;

Expand Down