Try   HackMD

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:

Ethereum 2.0 NetworkBeacon NodeValidator ClientEthereum 2.0 NetworkBeacon NodeValidator ClientNew BlockValidate BlockProcess Block (update state)New BlockCreate AttestationSign AttestationSigned AttestationValidate AttestationUpdate statePropagate 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, plus make targets for basic tasks. This week I'll add linter, CI, and other kickoff tasks.

Resources

My main sources of information were: