base on 🚀 Open-source Ethereum consensus client written in Java # teku [![Build Status](https://circleci.com/gh/Consensys/teku.svg?style=svg)](https://circleci.com/gh/Consensys/workflows/teku) [![GitHub License](https://img.shields.io/github/license/Consensys/teku.svg?logo=apache)](https://github.com/Consensys/teku/blob/master/LICENSE) [![Documentation](https://img.shields.io/badge/docs-readme-blue?logo=readme&logoColor=white)](https://docs.teku.consensys.io/) [![consensus-specs](https://img.shields.io/badge/dynamic/regex?url=https%3A%2F%2Fraw.githubusercontent.com%2FConsensys%2Fteku%2Frefs%2Fheads%2Fmaster%2Fbuild.gradle&search=refTestVersion.*%22(v%5B%5E%22%5D%2B)%22&replace=%241&label=consensus-specs)](https://github.com/ethereum/consensus-specs/releases) [![Discord](https://img.shields.io/badge/Chat-on%20Discord-%235865F2?logo=discord&logoColor=white)](https://discord.gg/7hPv2T6) [![Twitter Follow](https://img.shields.io/twitter/follow/Teku_Consensys)](https://twitter.com/Teku_Consensys) [![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/ConsenSys/teku/badge)](https://www.gitpoap.io/gh/ConsenSys/teku) Teku is an open-source Ethereum consensus client written in Java and containing a full beacon node and validator client implementation. See the [Changelog](https://github.com/Consensys/teku/releases) for details of the latest releases and upcoming breaking changes. ## Useful links * [Ethereum Beacon Chain specification](https://github.com/ethereum/consensus-specs/blob/master/specs/phase0/beacon-chain.md) * [Teku user documentation](https://docs.teku.consensys.net/) * [Teku REST API reference documentation](https://consensys.github.io/teku/) * [Teku issues](https://github.com/Consensys/teku/issues) * [Contribution guidelines](CONTRIBUTING.md) * [Teku Changelog](https://github.com/Consensys/teku/releases) ## Teku users See our [user documentation](https://docs.teku.consensys.net/). Raise a [documentation issue](https://github.com/Consensys/doc.teku/issues) or get in touch in the #teku channel on [Discord](https://discord.gg/7hPv2T6) if you've got questions or feedback. ## Teku developers * [Contribution Guidelines](CONTRIBUTING.md) * [Coding Conventions](https://wiki.hyperledger.org/display/BESU/Coding+Conventions) ## Binary Releases Binary releases are available from the [releases page](https://github.com/Consensys/teku/releases). Binary builds that track the latest changes on the master branch are available on [Dockerhub](https://hub.docker.com/r/consensys/teku) using the `develop` version or as binary downloads ([tar.gz format](https://artifacts.consensys.net/public/teku/raw/names/teku.tar.gz/versions/develop/teku-develop.tar.gz) or [zip format](https://artifacts.consensys.net/public/teku/raw/names/teku.zip/versions/develop/teku-develop.zip)). 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](https://pages.consensys.net/teku-sign-up) email list (release and important announcements only, no marketing) * Follow us on [Twitter](https://twitter.com/Teku_Consensys) * `teku` in [Consensys Discord](https://discord.gg/7hPv2T6), * Subscribe to release notifications on github for [teku](https://github.com/Consensys/teku) ## Build Instructions ### Install Prerequisites * Java 21+ Note: Official builds of Teku are performed with Java 21. 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](https://www.yourkit.com/images/yklogo.png) 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 <a href="https://www.yourkit.com/java/profiler/">YourKit Java Profiler</a>, <a href="https://www.yourkit.com/.net/profiler/">YourKit .NET Profiler</a>, and <a href="https://www.yourkit.com/youmonitor/">YourKit YouMonitor</a>. **OrbStack** ![OrbStack Logo](https://orbstack.dev/_next/image?url=%2Fimg%2Ficon128.png&w=64&q=75) 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/.", Assign "at most 3 tags" to the expected json: {"id":"6110","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"