Giter Site home page Giter Site logo

umbracle / eth2-validator Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 308 KB

Eth2-validator is an easy to use, performant and flexible Ethereum validator client.

License: Mozilla Public License 2.0

Dockerfile 0.34% Makefile 0.43% Go 98.74% Shell 0.49%
consensus-layer ethereum go proof-of-stake validator

eth2-validator's People

Contributors

ferranbt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eth2-validator's Issues

Use state of duties

The Duty object has a state field (Pending, Queued, Confirmed...) which is not being used right now.

Run `beacon-clients` with genesis state

Right now, it is necessary to deploy an eth1 client, deploy the deposit contract and make a deposit transaction before starting the eth2 beacon clients. Though this workflow is required for some types of tests (i.e. validator waiting to be validated), most of the tests would benefit from a genesis state with the validators.

Add unit testing for the Beacon http library

Initially, the idea was to follow the same pattern as ethgo in order to test the HTTP client library, this is, to run a real client and make queries to the endpoints. However, it happens to be a bit more complicated in this setting, since some endpoints require building complex logic (outside the scope of the HTTP package itself) to have access to the data. Thus, we need to think about a different strategy.

Fix scheduling of future duties

Right now, all the duties are scheduled for the current starting epoch. However, there are some duties that are available beforehand.

Multi-node e2e cluster

As of now, the testutil framework only deploys single node (1 beacon, 1 validator) devnets. The framework should be able to provision and configure multi-node devnets both with the same client and multi-client.

Embed `bls` types in `consensus` structs

Right now, the consensus types have many instances of the type:

type DepositData struct {
	Pubkey                []byte   `json:"pubkey" ssz-size:"48"`
	WithdrawalCredentials []byte   `json:"withdrawal_credentials" ssz-size:"32"`
	Amount                uint64   `json:"amount"`
	Signature             []byte   `json:"signature" ssz-size:"96"`
	Root                  [32]byte `ssz:"-"`
}

where Signature and PubKey are fixed-size arrays that represent BLS signature and public key. In order to use this structure eventually, those fields have to be converted to golang objects for the blst library.

Thus, it would be straightforward if we could use the bls objects directly as a wrapper like:

type DepositData struct {
      PubKey     bls.PubKey     `json:"pubkey"`
      ...
      Signature  bls.Signature  `json:"signature"`
}

Note that this does not cause any problems to the fastssz hashing since it already support aliases like this.

Add bitlist library

In order to aggregate attestation, the validator has to support and manage bitlists. The mock of the library is already there under internal/lib/bitlist.

Support Phase0

This is a tracking issue to follow the development to support the phase0 fork.

  • Submit attestation.
  • Submit propose block.

Reload beacon config during forks

The config spec changes after a fork, the client must be able to reload it. The main concern is how to protect the config for the concurrent read/write.

Add validator lifecycle manager

The validator client should be able to handle the lifecycle of new validators being tracked: adding, waiting to be ready, exiting...

Calculate domain should account for forks

Right now the calculation of the domain is hardcoded to either phase0 or altair. Once the validator has the config.yaml available #41 it should be possible to calculate the domain depending on the fork.

Load `config.yaml` spec from beacon node

On a fresh start, the validator should query the beacon node to download the config.yaml spec and store it internally. Then, on future interactions it should query the beacon node to check if the spec matches and to refresh it if necessary.

Add CI

Add a CI step to run the unit tests in the repo.

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.