You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like we have execution state to validate commitment requests against, we should have a consensus state container. This consensus state will be used to validate commitments against the consensus state. The module should live in src/state/consensus.rs.
The consensus state should have access to a beacon client that it can use to query the beacon chain with. Just like ExecutionState, it should have a fn update_head(&mut self, head: ChainHead) that it will use to update its internal state with. We will have a separate HeadTracker actor that will initiate these update calls.
The validate_request method
To validate a request, we need to
Check if the target slot is one of our proposer slots (need access to a live lookahead + the registry)
Check if the request hasn't passed the slot deadline (i.e. timestamp of prev update + some configurable deadline like 6s)
If validate_request passes, we can continue validation on the execution state.
The text was updated successfully, but these errors were encountered:
Another useful part of the consensus state container is to keep an updated view of the lookahead at all times:
have a notion of consensus Epoch with a start_slot property and its associated proposer_duties
at the beginning of a new epoch, fetch its proposer duties to make sure we have always up to date info
for every new slot (so when the update_head method is called on the ConsensusState) check if the current epoch is over. If it is, then fetch new proposer duties
In the future, this will also be cross-integrated with the on-chain Registry to make sure that we are registered before accepting commitments.
Context
Just like we have execution state to validate commitment requests against, we should have a consensus state container. This consensus state will be used to validate commitments against the consensus state. The module should live in
src/state/consensus.rs
.The consensus state should have access to a beacon client that it can use to query the beacon chain with. Just like
ExecutionState
, it should have afn update_head(&mut self, head: ChainHead)
that it will use to update its internal state with. We will have a separateHeadTracker
actor that will initiate these update calls.The
validate_request
methodTo validate a request, we need to
If
validate_request
passes, we can continue validation on the execution state.The text was updated successfully, but these errors were encountered: