MCPcopy Index your code
hub / github.com/Consensys/teku

github.com/Consensys/teku @26.7.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 26.7.0 ↗ · + Follow
43,624 symbols 263,929 edges 4,748 files 1,401 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

teku

Build Status GitHub License Documentation consensus-specs Discord Twitter Follow GitPOAP Badge

Teku is an open-source Ethereum consensus client written in Java and containing a full beacon node and validator client implementation.

See the Changelog for details of the latest releases and upcoming breaking changes.

Useful links

Teku users

See our user documentation.

Raise a documentation issue or get in touch in the #teku channel on Discord if you've got questions or feedback.

Teku developers

Binary Releases

Binary releases are available from the releases page. Binary builds that track the latest changes on the master branch are available on Dockerhub using the develop version or as binary downloads (tar.gz format or zip format).

We recommend only using release versions for Mainnet, but develop builds are useful for testing the latest changes on testnets.

Release notifications are available via: * Sign up to our release announcements email list (release and important announcements only, no marketing) * Follow us on Twitter * teku in Consensys Discord, * Subscribe to release notifications on github for teku

Build Instructions

Install Prerequisites

  • Java 25+

Note: Official builds of Teku are performed with Java 25. Building on a more recent version of Java is supported, but the resulting build will not work on earlier versions of Java.

Build and Dist

To create a ready to run distribution:

```shell script git clone https://github.com/Consensys/teku.git cd teku && ./gradlew distTar installDist


This produces:
- Fully packaged distribution in `build/distributions` 
- Expanded distribution, ready to run in `build/install/teku`

### Build and Test

To build, clone this repo and run with `gradle`:

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

After a successful build, distribution packages are available in build/distributions.

Other Useful Gradle Targets

Target Builds
distTar Full distribution in build/distributions (as .tar.gz)
distZip Full distribution in build/distributions (as .zip)
installDist Expanded distribution in build/install/teku
distDocker The consensys/teku docker image

Code Style

We use Google's Java coding conventions for the project. To reformat code, run:

```shell script ./gradlew spotlessApply


Code style is checked automatically during a build.

## Testing

All the unit tests are run as part of the build, but can be explicitly triggered with:

```shell script
./gradlew test

Special thanks

YourKit

YourKit Logo

For providing us free open source licenses for their profiler.

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

OrbStack

OrbStack Logo

For providing us free open source licenses for their application.

OrbStack delivers a fast, light, and easy way to run Docker containers and Linux. Check it out on https://orbstack.dev/.

Extension points exported contracts — how you extend this code

ExpirationTask (Interface)
Callback invoked once when a repeating task expires (see #scheduleRepeatingEventInMillis). [24 implementers]
infrastructure/async/src/main/java/tech/pegasys/teku/infrastructure/async/timed/RepeatingTaskScheduler.java
BLSSignatureVerifier (Interface)
Simple interface to enable pluggable variants of BLS verifier. In a #SIMPLE case it's just static BLS me [9 implementers]
infrastructure/bls/src/main/java/tech/pegasys/teku/bls/BLSSignatureVerifier.java
Merkleizable (Interface)
Returns `hash_tree_root` conforming to SSZ spec: https://github.com/ethereum/consensus-specs/blob/master/ssz/simple-seri [8 …
infrastructure/ssz/src/main/java/tech/pegasys/teku/infrastructure/ssz/Merkleizable.java
BeaconChainControllerFactory (Interface)
CAUTION: this API is unstable and primarily intended for debugging and testing purposes this API might be changed in any [291 …
services/beaconchain/src/main/java/tech/pegasys/teku/services/beaconchain/BeaconChainControllerFactory.java
PreparedGossipMessageFactory (Interface)
Factory for PreparedGossipMessage instances [291 implementers]
networking/p2p/src/main/java/tech/pegasys/teku/networking/p2p/gossip/PreparedGossipMessageFactory.java
ByteBufDecoder (Interface)
A disposable decoder which decodes one or more messages from a 'stream' which is fed to the decoder as a series of {@lin [6 …
networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/core/encodings/ByteBufDecoder.java
BlockPublisher (Interface)
Used to publish blocks (unblinded and blinded) and blob sidecars [10 implementers]
beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/BlockPublisher.java
SyncServiceFactory (Interface)
CAUTION: this API is unstable and primarily intended for debugging and testing purposes this API might be changed in any [292 …
beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/SyncServiceFactory.java

Core symbols most depended-on inside this repo

of
called by 4991
infrastructure/async/src/main/java/tech/pegasys/teku/infrastructure/async/stream/AsyncStream.java
valueOf
called by 3888
infrastructure/unsigned/src/main/java/tech/pegasys/teku/infrastructure/unsigned/UInt64.java
empty
called by 3111
infrastructure/async/src/main/java/tech/pegasys/teku/infrastructure/async/stream/AsyncStream.java
of
called by 2369
ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/attestation/utils/AttestationBits.java
verify
called by 2305
infrastructure/bls/src/main/java/tech/pegasys/teku/bls/impl/Signature.java
map
called by 2162
infrastructure/async/src/main/java/tech/pegasys/teku/infrastructure/async/stream/AsyncStream.java
completedFuture
called by 1994
infrastructure/async/src/main/java/tech/pegasys/teku/infrastructure/async/SafeFuture.java
isEmpty
called by 1685
beacon/sync/src/main/java/tech/pegasys/teku/beacon/sync/forward/multipeer/batches/Batch.java

Shape

Method 38,056
Class 4,790
Interface 652
Enum 122
Function 4

Languages

Java100%
Python1%

Modules by API surface

ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java290 symbols
ethereum/spec/src/main/java/tech/pegasys/teku/spec/Spec.java174 symbols
storage/src/integration-test/java/tech/pegasys/teku/storage/server/kvstore/DatabaseTest.java161 symbols
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/dataaccess/CombinedKvStoreDao.java140 symbols
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/dataaccess/KvStoreCombinedDaoAdapter.java137 symbols
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/dataaccess/KvStoreCombinedDao.java134 symbols
storage/src/main/java/tech/pegasys/teku/storage/server/kvstore/KvStoreDatabase.java129 symbols
ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java111 symbols
infrastructure/async/src/test/java/tech/pegasys/teku/infrastructure/async/SafeFutureTest.java104 symbols
ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/generator/ChainBuilder.java104 symbols
ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/SpecConfigBuilder.java102 symbols
storage/src/test/java/tech/pegasys/teku/storage/protoarray/ProtoArrayTest.java100 symbols

For agents

$ claude mcp add teku \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact