Code Monkey home page Code Monkey logo

teku's Introduction

teku

Build Status GitHub License Documentation 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:

Build Instructions

Install Prerequisites

  • Java 17+

Note: Official builds of Teku are performed with Java 17. 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:

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:

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:

./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:

./gradlew test

Special thanks

YourKit for providing us with a free profiler open source license.

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.

YourKit Logo

teku's People

Contributors

ajsutton avatar atoulme avatar benjaminion avatar bgravenorst avatar cemozerr avatar cjhare avatar courtneyeh avatar dangerousfood avatar errorific avatar jframe avatar joshuafernandes avatar jrhea avatar jtraglia avatar lucassaldanha avatar macfarla avatar mark-terry avatar mbaxter avatar mehdi-aouadi avatar nashatyrev avatar neurone avatar nicolasmassart avatar regio avatar robzajac avatar rolfyone avatar schroedingerscode avatar stefanbratanov avatar tbenr avatar usmansaleem avatar vitorpy avatar zilm13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teku's Issues

Upgrade to openjdk 11.0.1

Description

  • apply errorprone fixes found in Pantheon
  • update dependency versions
  • upgrade gradle to 4.10.2

Implement gRPC

Description

We need to implement a gRPC endpoint on this client

Acceptance Criteria

  • Needs to be generic so that Pantheon can use it too

Clean up gradle setup

  • Cleanup Gradle Plugin Management
  • Consolidate common dependencies where appropriate. (Such as for junit and mockito)
  • Resolve circular dependencies in parent gradle project.

Refactor UInt64 Class and Tests

  • Division should perform only integer division. Integer types are not expected to handle remainders.
  • Add javadoc style method comments for autocompletion niceness.
  • Too much code is repeated in the unit tests, this should be refactored.

Implement Support for UInt384

Implement a container to support a uint384 (48 bytes) for holding the BLS sigs. Currently, it doesn't seem as though any arithmetic operations are necessary, that should be handled by the BLS lib.

If additional operations beyond simple comparison are necessary, an additional issue should be created.

Add copyright boilerplate to all files

As per the LICENSE file, every source file must have the following boilerplate copyright added:

/*
 * Copyright 2018 ConsenSys AG.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */

**Cards**

Cards can be added to your board to track the progress of issues and pull requests. You can also add note cards, like this one!

Cleanup Unnecessary Pantheon Artifacts

  • remove unnecessary primitives that were carried over from pantheon
  • remove and/or reconfigure Dockerfile to be specific to developing/running the beacon chain
  • remove and/or refactor unnecessary utilities from pantheon not relevant for beacon chain/eth2

Finish p2p Daemon Rebase

Protocol Labs guys added support for quic and partial pub/sub support. I need to keep my PR current with their master so they can approve/merge

Implement SSZ

Implement SSZ in accordance with the spec listed here. Additional resources can be found here here

Meta: pre-open-sourcing checklist

  • Install Code of Conduct, Contributing etc. #51
  • Add copyright notices to all source files #56
  • Automate the CLA signing on first commit
  • Create our own Gitter channel (or use Pantheon's?) and reference it in the CLA etc.
  • Link to Pantheon's coding conventions from the relevant places
  • Automate the build process on commit (Spotless check at a minimum)
  • Move to PegaSysEng repo?
  • Decide on a cool name?

Add new pow block event

right now the VRC only emits an event when a validator is registered. Need to emit an event when a new Pow block is detected too.

Add BLAKE2b-512 implementation

The hashing function under-the-hood for Eth2.0 is BLAKE2b-512. Currently the algorithms supported in the Hash file are Keccak-256, Sha-256, RIPEMD160.

Logging

Look at Pantheon repo for guidance

Add labels to Github

Add labels for issue management.

E.g.

  • bug
  • enhancement
  • good first issue

Check what Pantheon does. Add labels to existing issues.

update directory structure

Description

We still have relics of our old file structure in our code

Acceptance Criteria

  • folders named beaconchain need to be renamed to artemis
  • net/consensys renamed to tech/pegasys
  • update imports

IMPORTANT: use git mv to perform the folder renaming

Additional Information

Testing for BeaconChain

  • Configure gradle file to run tests with 'gradle test'
  • Use annotation VisibleForTesting for testing private methods

CLI argument parsing framework

Description

We need to implement CLI arg processing similar to Pantheon (they use picocli)

Acceptance Criteria

  • implement ArtemisCommand class

Configure licenses to only include approved licenses

Currently, some 3rd parties are using licenses not in our accepted licenses list. For now we have temporarily disabled checking licenses, but we need to either get approval from legal or remove these dependencies.

WARNING: An illegal reflective access operation has occurred

Description

Getting this warning: An illegal reflective access operation has occurred

Acceptance Criteria

  • no warnings

Steps to Reproduce (Bug)

  1. ./gradlew clean
  2. ./gradlew build

Expected behavior: [What you expect to happen]
There shouldn't be a warning
Actual behavior: [What actually happens]

$ ./gradlew build
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/Users/jonny/.gradle/caches/modules-2/files-2.1/io.netty/netty-common/4.1.19.Final/b281916c11d3eeec5e839677ec4f2eb9d7586928/netty-common-4.1.19.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Frequency: [What percentage of the time does it occur?]
100%

Versions (Add all that apply)

  • Java version: [java -version]
openjdk 11.0.1 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
  • OS Name & Version:
Darwin 10.13.6
  • Kernel Version: [uname -a]
Darwin jonnys-MBP.attlocal.net 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018; root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64

Additional Information

Research on Pantheon, Web3j, Cava libraries for data types

Extending the Pantheon types seems to be much more complex than using web3j. Web3j numeric types implement the BigInteger type, which has add(), subtract() , multiply(), divide(), remainder(), equality and comparison, as well as other supported math operations. Web3j types seem simpler to understand as well as cleaner than the Pantheon types. I'm not sure whether extending the Pantheon types would be worth the time required to implement them, at least right now, for the sake of reducing our dependencies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.