sigp / lighthouse

Ethereum consensus client in Rust
https://lighthouse.sigmaprime.io/
Apache License 2.0
2.96k stars 763 forks source link

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

Open michaelsproul opened 1 month ago

michaelsproul commented 1 month ago

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!

https://github.com/sigp/lighthouse/blob/2e0eb6d1b8705bbda2ba56eb195d9cc7c6575e95/beacon_node/beacon_chain/src/historical_blocks.rs#L121-L134

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 commented 1 month ago

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

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!