Layr-Labs / eigenda-proxy

EigenDA sidecar proxy server used for communication between rollup software and EigenDA.
MIT License
8 stars 10 forks source link

Add local DA Cert verification support #16

Closed teddyknox closed 1 week ago

teddyknox commented 1 month ago

Doing local DA cert verification means:

  1. Calling VerifyBlob() on some singleton deployment of the library so that the client can be confident that the disperser is not lying when it reports the blob as confirmed.
  2. Ensuring that the block that finalized the blob is indeed finalized. 2a. There is a sub-step here of verifying the L1 block that the disperser claims the blob's batch was confirmed in. Otherwise the finalization claim is also trusted. I'm not sure how to do this except filtering on transactions in the claimed block, looking for batch confirmation transactions, and then positively identifying the batch header hash in hand with the one in the L1 block. If this is too time-consuming this step can be decoupled from this task as a further TODO.
epociask commented 2 weeks ago

Since this logic isn't deploy under a singelton we'll have to reproduce the library verification code within golang. This will require replicating the following invariant checks: A. The blob header hash stored on-chain is equivalent to the one generated from the disperser returned batch metadata: https://github.com/Layr-Labs/eigenda/blob/2ade91370441ebfefe717865f64a4ace11241639/contracts/src/libraries/EigenDARollupUtils.sol#L38-L42 B. The inclusion proof can be merkalized to generate the batch header root stored on-chain: https://github.com/Layr-Labs/eigenda/blob/2ade91370441ebfefe717865f64a4ace11241639/contracts/src/libraries/EigenDARollupUtils.sol#L44-L52 C. All quorums are sufficiently expressed in accordance with their respective thresholds: https://github.com/Layr-Labs/eigenda/blob/2ade91370441ebfefe717865f64a4ace11241639/contracts/src/libraries/EigenDARollupUtils.sol#L57-L86