ChainSafe / ChainSafe/lodestar-prover

Handle the re-org scenario for the proof provider

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Problem description

WIth the `@lodestar/prover` we have the following scenario where we have to update the payloads in case of re-orgs. We need a better way to handle these re-orgs.

https://github.com/ChainSafe/lodestar/blob/08b82af89f83e89ecaa164e8d94e4e296e0ee65e/packages/prover/src/proof_provider/payload_store.ts#L155-L159

### Solution description

One solution could be that `lightclient` exposes a re-org event which tells the base slot where re-org happens and then `prover` should purge and update the payloads from that slot onwards.

### Additional context

This issue was extracted from https://github.com/ChainSafe/lodestar/issues/4706

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with packages/prover/src/proof_provider/payload_store.ts at lines 155-159, then trace how lightclient and prover currently handle payloads and re-organizations. Compare the proposed re-org event and determine how payloads from the reported base slot onward should be purged and updated; done means re-orged payloads no longer remain stale.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.