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

Execution integration #59

Merged
merged 57 commits into from
Jan 13, 2025
Merged

Conversation

Zacholme7
Copy link
Member

@Zacholme7 Zacholme7 commented Nov 27, 2024

Issue Addressed

Proposed Changes

This PR tracks the integration of the execution layer into anchor. The process can be thought of as the following:

  1. Fetch all relevant contract events from the chain
  2. Perform verification and parsing on the events and then store them into the database.
  3. If we are caught up to the chain and following along, determine if some action needs to be taken in response to the event.

Additional Info

Types and the database are being worked on alongside this as they all mesh together.

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! great progress @Zacholme7 👏

I know this is WIP, but I thought some early feedback after a quick read might be helpful.

I've added some comments and questions above, and here are a few more:

  • Would be useful to add more logging, both for informative and debug purpose (e.g. sync progress, live events received, fetch or processing errors etc)
  • I'd love to see some unit & integration tests where it make sense. It doesn't have to be this PR, but I wanted to mention it since we recently started adding tests in the validator client, and it's been a little painful. Adding tests while the codebase is fresh can make things a bit more testable by design and save some headaches later.

I'm not familiar with SSV, so my comments are mostly generic, but I'd like to catch up and review this again later when it's ready.

Overall it's very tidy and nice to read, great job 👍

anchor/eth/src/sync.rs Outdated Show resolved Hide resolved
anchor/eth/src/sync.rs Show resolved Hide resolved
anchor/eth/src/sync.rs Outdated Show resolved Hide resolved
anchor/eth/src/sync.rs Outdated Show resolved Hide resolved
anchor/eth/src/abi/ssv_contract.json Outdated Show resolved Hide resolved
anchor/eth/src/sync.rs Outdated Show resolved Hide resolved
anchor/eth/src/sync.rs Outdated Show resolved Hide resolved
@Zacholme7 Zacholme7 added the ready-for-review This PR is ready to be reviewed label Jan 13, 2025
@Zacholme7 Zacholme7 marked this pull request as ready for review January 13, 2025 21:47
const MAX_RETRIES: i32 = 5;

// Block follow distance
const FOLLOW_DISTANCE: u64 = 8;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check with ssv on reason for 8 block follow distance

Copy link
Contributor

@jking-aus jking-aus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed in call on 14/1 -- nice work zac good to get this one finished

@jking-aus jking-aus merged commit 089f79a into sigp:unstable Jan 13, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution layer ready-for-review This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants