Skip to content

Store execution payloads during backfill if --prune-payloads false #6510

Closed
@michaelsproul

Description

@michaelsproul

Description

@KolbyML notes that the ability to keep execution payloads during block backfill would be useful for syncing Trin (portal network client). It's a bit of a gotcha that at the moment Lighthouse throws out execution payloads during backfill sync, even when running with --prune-payloads false. We download the payloads from peers, and then throw them straight in the bin!

// Store block in the hot database without payload.
self.store
.blinded_block_as_kv_store_ops(&block_root, &blinded_block, &mut hot_batch);
// Store the blobs too
if let Some(blobs) = maybe_blobs {
new_oldest_blob_slot = Some(block.slot());
self.store
.blobs_as_kv_store_ops(&block_root, blobs, &mut blob_batch);
}
// Store block roots, including at all skip slots in the freezer DB.
for slot in (block.slot().as_usize()..prev_block_slot.as_usize()).rev() {
chunk_writer.set(slot, block_root, &mut cold_batch)?;
}

Steps to resolve

If prune-payloads is false, store execution payloads in the hot DB as part of import_historical_block_batch.

Additional Info

Should probably be implemented after the hdiff PR is merged, which modifies the backfill logic:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions