## Summary
Now back from Paris, I've been working on a broad research on the Consensus specs. My focus has been on understanding the E2E flow for:
- Attestations
- Slashing
- Fork-choice
I arrived to this simplified sequence chart:
```mermaid
sequenceDiagram
participant Validator as Validator Client
participant Beacon as Beacon Node
participant Network as Ethereum 2.0 Network
Network->>Beacon: New Block
Beacon->>Beacon: Validate Block
Beacon->>Beacon: Process Block (update state)
Beacon-->>Validator: New Block
Validator->>Validator: Create Attestation
Validator->>Validator: Sign Attestation
Validator-->>Beacon: Signed Attestation
Beacon->>Beacon: Validate Attestation
Beacon->>Beacon: Update state
Beacon-->>Network: Propagate Attestation
```
This helped me understand the differences between validator and beacon node responsibilities, which in turn helps divide the tasks in categories/vertical slices. A possible first MVP would be a beacon node working without the validator features.
## First vertical slice
This is a rough set of features that could be included in a first e2e vertical slice.
- Beacon Node
- Process blocks (specially attestations).
- Update internal state.
- Networking
- Connect to the p2p network.
- Receive incoming blocks.
- Decode SSZ format.
- API
- Get basic information about specific blocks.
This walking skeleton of a consensus node can enable us to add other features on top of it, like fork-choice, slashing, and other features.
## Feature list
The work was divided the work into categories:
- Core (beacon)
- Fork-choice
- Block representation (e.g. proto-arrays)
- Attestation processing
- Slashing processing
- State Storage
- Validator
- Attestation creation
- Slashing monitoring
- Slashing proof creation
- EngineAPI
- Getting execution payloads
- Payload execution
- Block validation
- Fork choice updates
- LibP2P
- Discovery
- Receiving blocks
- Receiving pending attestations
- Propagating attestations
- Propagating slashings
- SSZ: decoding payloads
- BSL: verifying signatures
- Grafana dashboards
- CI:
- spec tests -> We'll focus on these ones.
- integration tests
- unit tests
This week we'll take these features, understand inter-dependencies, estimate the time they'll, write tickets and build a roadmap.
## Repo setup
As a basic maintenance task, I setup the elixir project in [our repo](https://github.com/lambdaclass/lambda_ethereum_consensus/), plus make targets for basic tasks. This week I'll add linter, CI, and other kickoff tasks.
## Resources
My main sources of information were:
- Ben Edgington's [Upgrading Ethereum](https://eth2book.info/capella/) book.
- Vitalik's [Annotated Consensus Specs](https://github.com/ethereum/annotated-spec/tree/master).