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

Host returns error when invalid cert is sent to proxy #25

Open
bxue-l2 opened this issue Jan 14, 2025 · 5 comments
Open

Host returns error when invalid cert is sent to proxy #25

bxue-l2 opened this issue Jan 14, 2025 · 5 comments

Comments

@bxue-l2
Copy link
Collaborator

bxue-l2 commented Jan 14, 2025

When there is an invalid cert i.e. the signature is wrong (parsing error itself is already handled within the client inside the derivation pipeline), proxy should inform the host about it.

The host should handle such error and only return empty bytes for all field element. The line to fix is here (https://github.com/Layr-Labs/hokulea/blob/master/bin/host/src/eigenda_fetcher/mod.rs#L150).

As such, the oracle client can detect it here https://github.com/Layr-Labs/hokulea/blob/master/crates/proof/src/eigenda_provider.rs#L90

@samlaf
Copy link
Collaborator

samlaf commented Jan 14, 2025

proxy should inform the host about it

This is during GET requests right? What is currently returned upon error? 400? 500? What's your suggestion for modifying proxy to have the information you need?

@bxue-l2
Copy link
Collaborator Author

bxue-l2 commented Jan 14, 2025

Two solutions:

  1. proxy returns an empty byte, not reporting an error. As such, the the frame_queue in the derivation pipeline will filter out the empty byte
  2. proxy returns a special error code, such that the op-node daclient knows to discard the data

Currently as far as I understand, the error flow like below

  1. https://github.com/ethereum-optimism/optimism/blob/develop/op-node/rollup/derive/l1_retrieval.go#L63
  2. https://github.com/ethereum-optimism/optimism/blob/develop/op-alt-da/daclient.go#L53
  3. https://github.com/ethereum-optimism/optimism/blob/develop/op-node/rollup/derive/altda_data_source.go#L93

I have gone deep when it got to 3, but from the comment it will continue to retry that cert, and essentially deadlock the system

@samlaf
Copy link
Collaborator

samlaf commented Jan 14, 2025

Definitely prefer returning an explicit error with http error code.

@bxue-l2
Copy link
Collaborator Author

bxue-l2 commented Jan 15, 2025

As far as I can tell, this is a problem which proxy needs to address in order to prevent a malicious OP batcher. This issue should open under proxy repo

@bxue-l2
Copy link
Collaborator Author

bxue-l2 commented Jan 15, 2025

related issue, Layr-Labs/eigenda-proxy#243 (comment)

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

No branches or pull requests

2 participants