# EPF Cohort 6 - Week 4 Update
Following the release of the videos from Cannes (as I couldn't make it to Cannes), I spent some of this week watching the videos, especially the ones related [the beam chain](https://www.youtube.com/playlist?list=PLJqWcTqh_zKEwDCbJ31ds3VSIxa4rUxvF). I learnt about the goals of the beam chain as well as the expertise of different client teams.
We spent majority of our time this week preparing our project proposal and project presentation. Both of them are coming along great and will be released shortly.
I also spent some time working on implement the wait before attestations in our validator flow. I have made a PR for the same.
## Week 4
I worked on the voluntary exit CLI command for the validator client last week. That has received some feedback from Patchy.
1. He recommended not intializing a validator service just to make a voluntary exit call: The solution would be to make the CLI command intialize a Beacon Chain Client instead and use the keystore to sign and submit a voluntary exit.
2. He also thinks that exposing an HTTP API through the validator service for initiating voluntary exits is something worth looking into. Although I agree, I find that it is common practice to exit through a CLI command and we can look into performance optimizations once we have minimal viable validator working.
I also worked on implementing the waiting function prior to submitting an attestation. Before submitting an attestation an attesting validator has to wait for either a block to be proposed or for 1/3rd of the slot to pass.
This wait is implemented using a tokio select over
1. A channel that sends the highest slot seen by the validator through the beacon events api - 'head' topic.
2. A Tokio Sleep delay of 1/3rd of a slot (4 secs as of today)
The tokio select will wait till until one of them completes and then return. Once our attestation_wait() function returns the validator can now make an attestation.
```rust
tokio::select! {
Ok(received_slot) = slot_receiver.recv() => {
if received_slot >= slot {
info!("Received slot {received_slot}, proceeding with attestation");
}
}
_ = tokio::time::sleep(Duration::from_secs(network_spec().seconds_per_slot / 3)) => {
info!("One third of slot {slot} has passed, proceeding with attestation");
}
}
```
## Resources
1. [Attestation Wait PR](https://github.com/ReamLabs/ream/pull/640)
2. [Voluntary Exit CLI PR](https://github.com/ReamLabs/ream/pull/625)