ethereum / ethereumj

DEPRECATED! Java implementation of the Ethereum yellowpaper. For JSON-RPC and other client features check Ethereum Harmony
GNU Lesser General Public License v3.0
2.18k stars 1.1k forks source link

Multiple validator service #1189

Closed mkalinin closed 5 years ago

mkalinin commented 5 years ago

Abstract

Implement ValidatorService that manages to work with multiple validators.

Rationale

It would make possible to run several proposers and attesters inside standalone node. It's very good for testing and doing benchmarks (e.g. BLS) prior to implementation of wire and net protocols.

Proposed implementation

Add MultiValidatorService that fetches a list of validator pub keys from BeaconGenesis and creates a set of validators from it, other parameters may be reused from ValidatorConfig. Thus, private key used to sign validator registartion Tx will be the same for all transactions. MultiValidatorService should transit to Enlisted state only when all transactions have been successfully executed.

Feature ProposerService and AttesterService with ability to handle several validators in one instance. Maybe it worth to increase number of threads for executors that are used by proposer and attester services.

Randao instance and other similar resources can be shared between all validators.