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

Ethereum heartbeat #2027

Open
wants to merge 3 commits into
base: colosseo
Choose a base branch
from
Open

Ethereum heartbeat #2027

wants to merge 3 commits into from

Conversation

gordsport
Copy link
Contributor

@gordsport gordsport commented Nov 1, 2023

Copied from #2026 with the base as the palazzo branch.

close #1993 .


For the Ethereum Heartbeat, we use the network parameter `ethereum_heartbeat_period`. This parameter should be either 0 or a value bigger than the number of validators; the recommended initial value is 128, which would create a hearbeat per validator about every 20 minutes (i.e., about 120 heartbeats per validator per epoch). Legal values are all integers larger or equal to 0.

For every Ethereum block, if the hash of this block mod `ethereum_heartbeat_period` equals the identity of the a validator (taken mod ethereum_heartbeat_period)+1, then this validator has to forward this as an Ethereum event. This event is confirmed by other validators just like any other Ethereum event, but then ignored. If that block also contains a valid Vega event that requires an action, this is forwarded independently by the normal event forwarding mechanisms. The heartbeat also does contain the Ethereum hash of the corresponding block.
Copy link
Contributor

@karlem karlem Nov 6, 2023

Choose a reason for hiding this comment

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

What exactly do you mean by identity of the validator here?

Copy link
Contributor

Choose a reason for hiding this comment

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

It's the number of the validator in our validator list (i.e., something between 1 and <number_of_validators>)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Vegaklaus - please can you update the spec to clarify this


If a validator forwards a heartbeat, all other validators have to validate its correctness by checking if the hashes work out.

#### Ethereum Read Access Heartbeat
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify, what is the purpose of having both Ethereum Heartbeat and Ethereum Read Access Heartbeat?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ethereum heartbeat measures if you follow the Ethereum chain to spot events happening there that need forwarding (e.g., deposits on the bridge). Read access means you have access to the Ethereum state, so you can get oracle readings and such.

Copy link
Contributor

Choose a reason for hiding this comment

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

So do we expect the listen for events for the first mechanism and pull for the other?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

@gordsport gordsport closed this Nov 13, 2023
@gordsport gordsport reopened this Nov 13, 2023
@gordsport gordsport changed the base branch from palazzo to nebula January 9, 2024 13:23
@gordsport gordsport removed this from the 🏰 Palazzo Mistero milestone Feb 22, 2024
Copied from #2026 with the base as the `palazzo` branch.

close #1993 .
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

Successfully merging this pull request may close these issues.

[SPEC ONLY?]: Validator Ethereum + L2s heartbeart and performance metric
3 participants