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

Add engine api support to anvil #5

Open
2 of 5 tasks
roninjin10 opened this issue Oct 16, 2023 · 3 comments
Open
2 of 5 tasks

Add engine api support to anvil #5

roninjin10 opened this issue Oct 16, 2023 · 3 comments
Assignees
Labels
Anvil enhancement New feature or request

Comments

@roninjin10
Copy link

roninjin10 commented Oct 16, 2023

This is a large sized task of adding engine api support to anvil

Description

Engine API is needed for op-node but currently not supported by anvil. Currently a proxy is being used but ideally this functionality should live in Anvil.

image

Resources and useful links

See #66

Engine API Notes

Links

pr: https://github.com/foundry-rs/foundry/pull/6574/files

specs: https://github.com/ethereum-optimism/optimism/blob/develop/specs/exec-engine.md

Issue: foundry-rs/foundry#5994

Work done so far

  • Deposit tx types merged

  • Blockers to engine api fixed after we surfaced issues. Mattse merged fixes

  • Hello world endpoint implemented. This endpoint which already has had eyes on it from mattse is a great template of how to implement all the engine api endpoints.

SubTasks

1 Figure out the data model

Assignee: Will

Estimation (1 week lift): January 19, 2024

This task blocks other tasks and thus we should try and see if we can get this in by friday

Once the data model is in place in theory the endpoints could be worked on in parallel

tbh I don't have enough experience with rust datatypes to exactly know what's appropriate for storing the payloads, I looked at RETH and they used some kind of crazy tokio high concurrency datastructure that I didn't understand

I think Anvil can probably use something much simpler

I think we started using just a plain HashMap?

2 Integration: Integrate anvil with engine api with op-node

Assignee: Will

Estimation (1 week lift): January 26, 2024

  • Add foundry as submodule to mocktimism
  • Add ‘make’ command to build foundry binary
  • Hook up anvil with the existing anvil service passign in the engine api flag
  • Validate it integrates with op-node

2 Endpoints:

Will to implement a first one as a reference, divide and conquer the rest between Will and Base engs

Estimation: (4 weeks lift) -

  • Endpoint: [engine_forkchoiceUpdatedV2](https://github.com/ethereum-optimism/optimism/blob/develop/specs/exec-engine.md#engine_forkchoiceupdatedv2)
  • Endpoint: engine_forkchoiceUpdatedV3
  • Endpoint: engine_newPayloadV2
  • Endpoint: engine_newPayloadV3
  • Endpoint: engine_signalSuperchainV1

3 Configuration: Implement engine api configuration

→ DEMO - Tentative date: 15th Feb - Collective All Hands

4 Documentation: Update foundry documentation with engine api

5+ Ship mocktimism

Since deposit tx is in already, after engine api there are no blockers to shipping the rest of mocktimism. This will require merging some of the pending work on other services

@roninjin10
Copy link
Author

mdehoog#2

@roninjin10
Copy link
Author

From @mdehoog

i dumped out requests / responses for the current op-node engine API here, this is what helped me in the engine API -> anvil proxy

@roninjin10
Copy link
Author

Added useful links to #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anvil enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants