Teku Documentation

repository·master·Indexed 21 days ago

https://github.com/consensys/teku

Teku is an open-source Ethereum consensus client implemented in Java, providing both beacon node and validator client functionality. The documentation covers building from source using Gradle, running JMH micro benchmarks, deploying test networks via Kurtosis, and the implementation status of Enshrined Proposer-Builder Separation (ePBS) for the Gloas fork (EIP-7732). It also details the Slashing Protection Database Interchange format and community governance roles.

Tokens
33.5K
Snippets
124
Records
159
Agent score
72%

What's inside Teku

  1. Understand Teku ePBS (EIP-7732 / Gloas) implementation status

    master

    Teku is implementing Enshrined Proposer-Builder Separation (ePBS) as defined by EIP-7732 and the Gloas consensus-specs. As of the latest snapshot, the implementation is approximately 78-84% complete.

    Key Implementation Details:

    • Spec Tracking: Teku tracks the consensus-specs/specs/gloas/ specification. It is currently adapting to v1.7.0-alpha.7 of the consensus-specs.
    • Fork Choice: The fork-choice implementation for Gloas is complete. It utilizes ForkChoiceModelGloas and PtcVoteTracker. The system uses ForkChoiceModelFactory.forSlot to route Gloas slots to the appropriate model.
    • Builder Role: Note that Teku does not currently include an in-protocol builder client. On the proposer side, Teku interacts with MEV-Boost or external builders only. The 'honest builder' guide is considered a separate conceptual deliverable.
  2. Teku ePBS Implementation Status and Roadmap

    master

    This document tracks the implementation status of the ePBS (Enshrined Proposer-Builder Separation) features in Teku, following EIP-7732 / Gloas. The implementation is being rolled out across several functional areas including Fork Choice, State Transition, Validator/VC, Networking, REST API, Engine API, Builder Client, Storage, and Testing.

    Key areas of active development include:

    • REST API: Implementation of GET execution_payload_envelopes and GET /eth/v4/validator/blocks/{slot}.
    • Engine API: Support for the engine_getBlobs envelope variant.
    • Validator/VC: Managing block proposer bid thresholds via BUILDER_PAYMENT_THRESHOLD_* and handling Proposer Tip Commitments (PTC).
    • Networking: Integration of proposer-prefs and gossip protocols.
  3. Teku ePBS (EIP-7732 / Gloas) Implementation Status

    master
    This document tracks the implementation progress of the ePBS ( प्रस्तावित Proposer-Builder Separation) features in Teku, specifically focusing on the Gloas fork (EIP-7732). It provides a detailed status table across several technical domains including fork plumbing, SSZ data structures, state transitions, fork choice logic, networking (gossip and Req/Resp), and Engine API integrations.
  4. Monitor and debug the test network

    master

    The Kurtosis test network comes with several monitoring and debugging tools enabled by default:

    • Dora: For network observability.
    • el_forkmon: For monitoring execution layer forks.
    • Prometheus/Grafana: For metrics and visualization.
    • rpc-snooper: For inspecting RPC calls.
  5. Understand Teku community roles and responsibilities

    master

    Teku uses a tiered community model to manage contributions and project governance. Roles range from public access to project leadership:

    RoleResponsibilitiesDefined by
    EveryoneView code, bugs, wiki, binaries, CI, and comment on PRsPublic access
    MemberContinuous active contributors (code or otherwise)Teku GitHub org member
    ApproverHolistic acceptance of contributions (compatibility, API conventions, etc.)Write permissions on master
    Project SponsorContribute developer resourcesConsensys
    Project EvangelistPromote the projectConsensys
    Benevolent DictatorStrategic direction and tie-breaking decisionsConsensys
  6. Understand the Slashing Protection Database Interchange format

    master

    The Slashing Protection Database Interchange is a standardized format designed to allow different Ethereum clients to export and import slashing protection data. This enables interoperability when moving or sharing data related to slashing protection between different client implementations.

    Teku's support for this format is as follows:

    • Exporting: Teku stores sufficient data to generate a minimal export according to the specification.
    • Importing: Teku supports loading the complete specification for slashing protection data.
  7. Use a locally built Teku image in Kurtosis

    master

    If you want to test a local build of Teku instead of the official image, follow these steps:

    1. Build the local Docker image from the Teku root directory:
      ./gradlew distDocker
    2. Update your network_params.yaml file to use the local image by setting the cl_image key to consensys/teku:develop.
    ./gradlew distDocker
  8. Run JMH micro benchmarks

    master

    JMH (Java Microbenchmark Harness) benchmarks in the eth-benchmark-tests module can be executed using Gradle.

    To run the benchmarks from the command line, execute the following command from the root of the eth-benchmark-tests directory:

    ./gradlew jmh

    Alternatively, if you are using IntelliJ IDEA, you can run these benchmarks directly within the IDE by installing the JMH plugin.

  9. Build Teku from Source

    master

    To perform a standard build of the project, clone the repository and run the Gradle wrapper:

    git clone https://github.com/Consensys/teku.git
    cd teku && ./gradlew

    Upon a successful build, the distribution packages will be located in build/distributions.

  10. Become a Teku Member

    master

    Members are active contributors who can have issues and PRs assigned to them. To become a Member, you must meet the following requirements:

    Requirements

    • Enable two-factor authentication on your GitHub account.
    • Make multiple contributions (e.g., authoring/reviewing PRs, filing/commenting on issues, or participating in community discussions like Slack or email).
    • Join the Teku Discord.
    • Read the contributor guide.
    • Sign the ICLA (as described in CLA.md).

    Responsibilities and Privileges

    • Responsiveness: Respond to assigned issues and PRs.
    • Code Ownership: Act as an owner of contributed code, ensuring it is well-tested, tests pass, and addressing bugs discovered after acceptance.
    • PR Interaction: Members can use the /lgtm command on open PRs.
    • Collaboration: Members can be tagged for reviews using /cc @username.