Ethereum heartbeat - #2027
Ethereum heartbeat#2027gordsport wants to merge 3 commits into
Conversation
|
|
||
| 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. |
There was a problem hiding this comment.
What exactly do you mean by identity of the validator here?
There was a problem hiding this comment.
It's the number of the validator in our validator list (i.e., something between 1 and <number_of_validators>)
There was a problem hiding this comment.
@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 |
There was a problem hiding this comment.
Just to clarify, what is the purpose of having both Ethereum Heartbeat and Ethereum Read Access Heartbeat?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
So do we expect the listen for events for the first mechanism and pull for the other?
a46b320 to
98f163a
Compare
Copied from #2026 with the base as the
palazzobranch.close #1993 .