Skip to content
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

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

Open
michaelsproul opened this issue Oct 18, 2024 · 1 comment
Open
Labels

Comments

@michaelsproul
Copy link
Member

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:

@KolbyML
Copy link

KolbyML commented Oct 18, 2024

Just to clarify some terminology as we (EF Portal) use a lot of confusing terminology.

  • Portal: is a collection of p2p protocols built on the Portal-wire-specification which is a framework for building distributed storage networks or p2p networks in general
  • Trin: is an implementation of the Portal specification and all the sub-protocols (history,state,beacon,etc). All networks are optional to implement.
  • Trin Execution: is an Execution client we are implementing comparable to Geth/Nethermind/Besu/etc but with the key difference of we will not be using devp2p. So instead we will need to rely on “The Portal Networks”, archival formats, and Consensus clients to achieve what devp2p provides.

Our initial usecase of Trin Execution will be gossiping genesis-latest execution state diffs to the “Portal State Network”, but it will likely become a full Execution client released to the public in time. It also serves as a backup solution if we don’t get adequate adoption by major EL clients.

So this change would be very nice for syncing Trin Execution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@michaelsproul @KolbyML and others