Commit Graph

518 Commits

Author SHA1 Message Date
Paul Hauner
3c6c06a505
Validator on-boarding docs (#656)
* Add first draft of validator onboarding

* Update docs

* Add documentation link to main README

* Continue docs development

* Update book readme

* Update docs

* Allow vc to run without testnet subcommand

* Small change to onboarding docs

* Tidy CLI help messages

* Update docs

* Add check to val client see if beacon node is synced

* Add notifier service to validator client

* Re-order onboarding steps

* Update deposit contract address

* Update testnet dir

* Add note about public eth1 node

* Set default eth1 endpoint to sigp

* Fix broken test

* Try fix eth1 cache locking

* Be more specific about eth1 endpoint

* Increase gas limit for deposit

* Fix default deposit amount
2019-12-09 22:42:36 +11:00
Paul Hauner
75efed305c
Faster BeaconState enc/dec (#671)
* Add state enc/dec benches

* Add example for flamegraph

* Use `PublicKeyBytes` for `Validator`

* Ripple PublicKeyBytes change through codebase

* Add benches, optimizations to store BeaconState

* Store BeaconState in StorageContainer too

* Optimize StorageContainer with std::mem magic

* Fix rest_api tests
2019-12-06 16:44:03 +11:00
Age Manning
5a765396b7 Implements a timeout for peer banning (#665)
* Adds peer ban timeout of 30 seconds

* Remove delay queue from discovery
2019-12-06 14:13:43 +11:00
Michael Sproul
5e8f958977
Allow multiple proposals per validator per epoch (#662)
Closes #658
2019-12-05 10:56:37 +11:00
Paul Hauner
a0549e3842
Prepare for public testnet (#628)
* Update to spec v0.9.0

* Update to v0.9.1

* Bump spec tags for v0.9.1

* Formatting, fix CI failures

* Resolve accidental KeyPair merge conflict

* Document new BeaconState functions

* Add `validator` changes from `validator-to-rest`

* Add initial (failing) REST api tests

* Fix signature parsing

* Add more tests

* Refactor http router

* Add working tests for publish beacon block

* Add validator duties tests

* Move account_manager under `lighthouse` binary

* Unify logfile handling in `environment` crate.

* Fix incorrect cache drops in `advance_caches`

* Update fork choice for v0.9.1

* Add `deposit_contract` crate

* Add progress on validator onboarding

* Add unfinished attesation code

* Update account manager CLI

* Write eth1 data file as hex string

* Integrate ValidatorDirectory with validator_client

* Move ValidatorDirectory into validator_client

* Clean up some FIXMEs

* Add beacon_chain_sim

* Fix a few docs/logs

* Expand `beacon_chain_sim`

* Fix spec for `beacon_chain_sim

* More testing for api

* Start work on attestation endpoint

* Reject empty attestations

* Allow attestations to genesis block

* Add working tests for `rest_api` validator endpoint

* Remove grpc from beacon_node

* Start heavy refactor of validator client

- Block production is working

* Prune old validator client files

* Start works on attestation service

* Add attestation service to validator client

* Use full pubkey for validator directories

* Add validator duties post endpoint

* Use par_iter for keypair generation

* Use bulk duties request in validator client

* Add version http endpoint tests

* Add interop keys and startup wait

* Ensure a prompt exit

* Add duties pruning

* Fix compile error in beacon node tests

* Add github workflow

* Modify rust.yaml

* Modify gitlab actions

* Add to CI file

* Add sudo to CI npm install

* Move cargo fmt to own job in tests

* Fix cargo fmt in CI

* Add rustup update before cargo fmt

* Change name of CI job

* Make other CI jobs require cargo fmt

* Add CI badge

* Remove gitlab and travis files

* Add different http timeout for debug

* Update docker file, use makefile in CI

* Use make in the dockerfile, skip the test

* Use the makefile for debug GI test

* Update book

* Tidy grpc and misc things

* Apply discv5 fixes

* Address other minor issues

* Fix warnings

* Attempt fix for addr parsing

* Tidy validator config, CLIs

* Tidy comments

* Tidy signing, reduce ForkService duplication

* Fail if skipping too many slots

* Set default recent genesis time to 0

* Add custom http timeout to validator

* Fix compile bug in node_test_rig

* Remove old bootstrap flag from val CLI

* Update docs

* Tidy val client

* Change val client log levels

* Add comments, more validity checks

* Fix compile error, add comments

* Undo changes to eth2-libp2p/src

* Reduce duplication of keypair generation

* Add more logging for validator duties

* Fix beacon_chain_sim, nitpicks

* Fix compile error, minor nits

* Update to use v0.9.2 version of deposit contract

* Add efforts to automate eth1 testnet deployment

* Fix lcli testnet deployer

* Modify bn CLI to parse eth2_testnet_dir

* Progress with account_manager deposit tools

* Make account manager submit deposits

* Add password option for submitting deposits

* Allow custom deposit amount

* Add long names to lcli clap

* Add password option to lcli deploy command

* Fix minor bugs whilst testing

* Address Michael's comments

* Add refund-deposit-contract to lcli

* Use time instead of skip count for denying long skips

* Improve logging for eth1

* Fix bug with validator services exiting on error

* Drop the block cache after genesis

* Modify eth1 testnet config

* Improve eth1 logging

* Make validator wait until genesis time

* Fix bug in eth1 voting

* Add more logging to eth1 voting

* Handle errors in eth1 http module

* Set SECONDS_PER_DAY to sensible minimum

* Shorten delay before testnet start

* Ensure eth1 block is produced without any votes

* Improve eth1 logging

* Fix broken tests in eth1

* Tidy code in rest_api

* Fix failing test in deposit_contract

* Make CLI args more consistent

* Change validator/duties endpoint

* Add time-based skip slot limiting

* Add new error type missed in previous commit

* Add log when waiting for genesis

* Refactor beacon node CLI

* Remove unused dep

* Add lcli eth1-genesis command

* Fix bug in master merge

* Apply clippy lints to beacon node

* Add support for YamlConfig in Eth2TestnetDir

* Upgrade tesnet deposit contract version

* Remove unnecessary logging and correct formatting

* Add a hardcoded eth2 testnet config

* Ensure http server flag works. Overwrite configs with flags.

* Ensure boot nodes are loaded from testnet dir

* Fix account manager CLI bugs

* Fix bugs with beacon node cli

* Allow testnet dir without boot nodes

* Write genesis state as SSZ

* Remove ---/n from the start of testnet_dir files

* Set default libp2p address

* Tidy account manager CLI, add logging

* Add check to see if testnet dir exists

* Apply reviewers suggestions

* Add HeadTracker struct

* Add fork choice persistence

* Shorten slot time for simulator

* Add the /beacon/heads API endpoint

* Update hardcoded testnet

* Add tests for BeaconChain persistence + fix bugs

* Extend BeaconChain persistence testing

* Ensure chain is finalized b4 persistence tests

* Ensure boot_enr.yaml is include in binary

* Refactor beacon_chain_sim

* Move files about in beacon sim

* Update beacon_chain_sim

* Fix bug with deposit inclusion

* Increase log in genesis service, fix todo

* Tidy sim, fix broken rest_api tests

* Fix more broken tests

* Update testnet

* Fix broken rest api test

* Tidy account manager CLI

* Use tempdir for account manager

* Stop hardcoded testnet dir from creating dir

* Rename Eth2TestnetDir to Eth2TestnetConfig

* Change hardcoded -> hard_coded

* Tidy account manager

* Add log to account manager

* Tidy, ensure head tracker is loaded from disk

* Tidy beacon chain builder

* Tidy eth1_chain

* Adds log support for simulator

* Revert "Adds log support for simulator"

This reverts commit ec77c66a052350f551db145cf20f213823428dd3.

* Adds log support for simulator

* Tidy after self-review

* Change default log level

* Address Michael's delicious PR comments

* Fix off-by-one in tests
2019-12-03 15:28:57 +11:00
Age Manning
12e32bd789
RPC Corrections and deadlock fix (#640)
* Correct goodbye handling and fix deadlock

* Correct typo
2019-11-29 13:04:44 +11:00
Paul Hauner
78d82d9193
Validator client refactor (#618)
* Update to spec v0.9.0

* Update to v0.9.1

* Bump spec tags for v0.9.1

* Formatting, fix CI failures

* Resolve accidental KeyPair merge conflict

* Document new BeaconState functions

* Add `validator` changes from `validator-to-rest`

* Add initial (failing) REST api tests

* Fix signature parsing

* Add more tests

* Refactor http router

* Add working tests for publish beacon block

* Add validator duties tests

* Move account_manager under `lighthouse` binary

* Unify logfile handling in `environment` crate.

* Fix incorrect cache drops in `advance_caches`

* Update fork choice for v0.9.1

* Add `deposit_contract` crate

* Add progress on validator onboarding

* Add unfinished attesation code

* Update account manager CLI

* Write eth1 data file as hex string

* Integrate ValidatorDirectory with validator_client

* Move ValidatorDirectory into validator_client

* Clean up some FIXMEs

* Add beacon_chain_sim

* Fix a few docs/logs

* Expand `beacon_chain_sim`

* Fix spec for `beacon_chain_sim

* More testing for api

* Start work on attestation endpoint

* Reject empty attestations

* Allow attestations to genesis block

* Add working tests for `rest_api` validator endpoint

* Remove grpc from beacon_node

* Start heavy refactor of validator client

- Block production is working

* Prune old validator client files

* Start works on attestation service

* Add attestation service to validator client

* Use full pubkey for validator directories

* Add validator duties post endpoint

* Use par_iter for keypair generation

* Use bulk duties request in validator client

* Add version http endpoint tests

* Add interop keys and startup wait

* Ensure a prompt exit

* Add duties pruning

* Fix compile error in beacon node tests

* Add github workflow

* Modify rust.yaml

* Modify gitlab actions

* Add to CI file

* Add sudo to CI npm install

* Move cargo fmt to own job in tests

* Fix cargo fmt in CI

* Add rustup update before cargo fmt

* Change name of CI job

* Make other CI jobs require cargo fmt

* Add CI badge

* Remove gitlab and travis files

* Add different http timeout for debug

* Update docker file, use makefile in CI

* Use make in the dockerfile, skip the test

* Use the makefile for debug GI test

* Update book

* Tidy grpc and misc things

* Apply discv5 fixes

* Address other minor issues

* Fix warnings

* Attempt fix for addr parsing

* Tidy validator config, CLIs

* Tidy comments

* Tidy signing, reduce ForkService duplication

* Fail if skipping too many slots

* Set default recent genesis time to 0

* Add custom http timeout to validator

* Fix compile bug in node_test_rig

* Remove old bootstrap flag from val CLI

* Update docs

* Tidy val client

* Change val client log levels

* Add comments, more validity checks

* Fix compile error, add comments

* Undo changes to eth2-libp2p/src

* Reduce duplication of keypair generation

* Add more logging for validator duties

* Fix beacon_chain_sim, nitpicks

* Fix compile error, minor nits

* Address Michael's comments
2019-11-25 15:48:24 +11:00
Paul Hauner
03e18ded86
Move account manager under main binary (#601)
* Move account_manager under `lighthouse` binary

* Unify logfile handling in `environment` crate.
2019-11-22 11:35:41 +11:00
Michael Sproul
24e941d175
Update to spec v0.9.1 (#597)
* Update to spec v0.9.0

* Update to v0.9.1

* Bump spec tags for v0.9.1

* Formatting, fix CI failures

* Resolve accidental KeyPair merge conflict

* Document new BeaconState functions

* Fix incorrect cache drops in `advance_caches`

* Update fork choice for v0.9.1

* Clean up some FIXMEs

* Fix a few docs/logs
2019-11-21 11:47:30 +11:00
Paul Hauner
e1de30bd64
Clean CLI arguments (#609) 2019-11-20 11:25:16 +11:00
Paul Hauner
f229bbba1c
Eth1 Integration (#542)
* Refactor to cache Eth1Data

* Fix merge conflicts and minor refactorings

* Rename Eth1Cache to Eth1DataCache

* Refactor events subscription

* Add deposits module to interface with BeaconChain deposits

* Remove utils

* Rename to types.rs and add trait constraints to Eth1DataFetcher

* Confirm to trait constraints. Make Web3DataFetcher cloneable

* Make fetcher object member of deposit and eth1_data cache and other fixes
* Fix update_cache function
* Move fetch_eth1_data to impl block
* Fix deposit tests

* Create Eth1 object for interfacing with Beacon chain
* Add `run` function for running update_cache and subscribe_deposit_logs tasks
* Add logging

* Run `cargo fmt` and make tests pass

* Convert sync functions to async

* Add timeouts to web3 functions

* Return futures from cache functions

* Add failed chaining of futures

* Working cache updation

* Clean up tests and `update_cache` function

* Refactor `get_eth1_data` functions to work with future returning functions

* Refactor eth1 `run` function to work with modified `update_cache` api

* Minor changes

* Add distance parameter to `update_cache`

* Fix tests and other minor fixes

* Working integration with cache and deposits

* Add merkle_tree construction, proof generation and verification code

* Add function to construct and fetch Deposits for BeaconNode

* Add error handling

* Import ssz

* Add error handling to eth1 cache and fix minor errors

* Run rustfmt

* Fix minor bug

* Rename Eth1Error and change to Result<T>

* Change deposit fetching mechanism from notification based to poll based
* Add deposits from eth1 chain in a given range every `x` blocks
* Modify `run` function to accommodate changes
* Minor fixes

* Fix formatting

* Initial commit. web3 api working.

* Tidied up lib. Add function for fetching logs.

* Refactor with `Eth1DataFetcher` trait

* Add parsing for deposit contract logs and get_eth1_data function

* Add `get_eth1_votes` function

* Refactor to cache Eth1Data

* Fix merge conflicts and minor refactorings

* Rename Eth1Cache to Eth1DataCache

* Refactor events subscription

* Add deposits module to interface with BeaconChain deposits

* Remove utils

* Rename to types.rs and add trait constraints to Eth1DataFetcher

* Confirm to trait constraints. Make Web3DataFetcher cloneable

* Make fetcher object member of deposit and eth1_data cache and other fixes
* Fix update_cache function
* Move fetch_eth1_data to impl block
* Fix deposit tests

* Create Eth1 object for interfacing with Beacon chain
* Add `run` function for running update_cache and subscribe_deposit_logs tasks
* Add logging

* Run `cargo fmt` and make tests pass

* Convert sync functions to async

* Add timeouts to web3 functions

* Return futures from cache functions

* Add failed chaining of futures

* Working cache updation

* Clean up tests and `update_cache` function

* Refactor `get_eth1_data` functions to work with future returning functions

* Refactor eth1 `run` function to work with modified `update_cache` api

* Minor changes

* Add distance parameter to `update_cache`

* Fix tests and other minor fixes

* Working integration with cache and deposits

* Add merkle_tree construction, proof generation and verification code

* Add function to construct and fetch Deposits for BeaconNode

* Add error handling

* Import ssz

* Add error handling to eth1 cache and fix minor errors

* Run rustfmt

* Fix minor bug

* Rename Eth1Error and change to Result<T>

* Change deposit fetching mechanism from notification based to poll based
* Add deposits from eth1 chain in a given range every `x` blocks
* Modify `run` function to accommodate changes
* Minor fixes

* Fix formatting

* Fix merge issue

* Refactor with `Config` struct. Remote `ContractConfig`

* Rename eth1_chain crate to eth1

* Rename files and read abi file using `fs::read`

* Move eth1 to lib

* Remove unnecessary mutability constraint

* Add `Web3Backend` for returning actual eth1 data

* Refactor `get_eth1_votes` to return a Result

* Delete `eth1_chain` crate

* Return `Result` from `get_deposits`

* Fix range of deposits to return to beacon chain

* Add `get_block_height_by_hash` trait function

* Add naive method for getting `previous_eth1_distance`

* Add eth1 config params to main config

* Add instructions for setting up eth1 testing environment

* Add build script to fetch deposit contract abi

* Contract ABI is part of compiled binary

* Fix minor bugs

* Move docs to lib

* Add timeout to config

* Remove print statements

* Change warn to error

* Fix typos

* Removed prints in test and get timeout value from config

* Fixed error types

* Added logging to web3_fetcher

* Refactor for modified web3 api

* Fix minor stuff

* Add build script

* Tidy, hide eth1 integration tests behind flag

* Add http crate

* Add first stages of eth1_test_rig

* Fix deposits on test rig

* Fix bug with deposit count method

* Add block hash getter to http eth1

* Clean eth1 http crate and tests

* Add script to start ganache

* Adds deposit tree to eth1-http

* Extend deposit tree tests

* Tidy tests in eth1-http

* Add more detail to get block request

* Add block cache to eth1-http

* Rename deposit tree to deposit cache

* Add inital updating to eth1-http

* Tidy updater

* Fix compile bugs in tests

* Adds an Eth1DataCache builder

* Reorg eth1-http files

* Add (failing) tests for eth1 updater

* Rename files, fix bug in eth1-http

* Ensure that ganache timestamps are increasing

* Fix bugs with getting eth1data ancestors

* Improve eth1 testing, fix bugs

* Add truncate method to block cache

* Add pruning to block cache update process

* Add tests for block pruning

* Allow for dropping an expired cache.

* Add more comments

* Add first compiling version of deposit updater

* Add common fn for getting range of required blocks

* Add passing deposit update test

* Improve tests

* Fix block pruning bug

* Add tests for running two updates at once

* Add updater services to eth1

* Add deposit collection to beacon chain

* Add incomplete builder experiments

* Add first working version of beacon chain builder

* Update test harness to new beacon chain type

* Rename builder file, tidy

* Add first working client builder

* Progress further on client builder

* Update becaon node binary to use client builder

* Ensure release tests compile

* Remove old eth1 crate

* Add first pass of new lighthouse binary

* Fix websocket server startup

* Remove old binary code from beacon_node crate

* Add first working beacon node tests

* Add genesis crate, new eth1 cache_2

* Add Serivce to Eth1Cache

* Refactor with general eth1 improvements

* Add passing genesis test

* Tidy, add comments

* Add more comments to eth1 service

* Add further eth1 progress

* Fix some bugs with genesis

* Fix eth1 bugs, make eth1 linking more efficient

* Shift logic in genesis service

* Add more comments to genesis service

* Add gzip, max request values, timeouts to http

* Update testnet parameters to suit goerli testnet

* Add ability to vary Fork, fix custom spec

* Be more explicit about deposit fork version

* Start adding beacon chain eth1 option

* Add more flexibility to prod client

* Further runtime refactoring

* Allow for starting from store

* Add bootstrapping to client config

* Add remote_beacon_node crate

* Update eth1 service for more configurability

* Update eth1 tests to use less runtimes

* Patch issues with tests using too many files

* Move dummy eth1 backend flag

* Ensure all tests pass

* Add ganache-cli to Dockerfile

* Use a special docker hub image for testing

* Appease clippy

* Move validator client into lighthouse binary

* Allow starting with dummy eth1 backend

* Improve logging

* Fix dummy eth1 backend from cli

* Add extra testnet command

* Ensure consistent spec in beacon node

* Update eth1 rig to work on goerli

* Tidy lcli, start adding support for yaml config

* Add incomplete YamlConfig struct

* Remove efforts at YamlConfig

* Add incomplete eth1 voting. Blocked on spec issues

* Add (untested) first pass at eth1 vote algo

* Add tests for winning vote

* Add more tests for eth1 chain

* Add more eth1 voting tests

* Added more eth1 voting testing

* Change test name

* Add more tests to eth1 chain

* Tidy eth1 generics, add more tests

* Improve comments

* Tidy beacon_node tests

* Tidy, rename JsonRpc.. to Caching..

* Tidy voting logic

* Tidy builder docs

* Add comments, tidy eth1

* Add more comments to eth1

* Fix bug with winning_vote

* Add doc comments to the `ClientBuilder`

* Remove commented-out code

* Improve `ClientBuilder` docs

* Add comments to client config

* Add decoding test for `ClientConfig`

* Remove unused `DepositSet` struct

* Tidy `block_cache`

* Remove commented out lines

* Remove unused code in `eth1` crate

* Remove old validator binary `main.rs`

* Tidy, fix tests compile error

* Add initial tests for get_deposits

* Remove dead code in eth1_test_rig

* Update TestingDepositBuilder

* Add testing for getting eth1 deposits

* Fix duplicate rand dep

* Remove dead code

* Remove accidentally-added files

* Fix comment in eth1_genesis_service

* Add .gitignore for eth1_test_rig

* Fix bug in eth1_genesis_service

* Remove dead code from eth2_config

* Fix tabs/spaces in root Cargo.toml

* Tidy eth1 crate

* Allow for re-use of eth1 service after genesis

* Update docs for new CLI

* Change README gif

* Tidy eth1 http module

* Tidy eth1 service

* Tidy environment crate

* Remove unused file

* Tidy, add comments

* Remove commented-out code

* Address majority of Michael's comments

* Address other PR comments

* Add link to issue alongside TODO
2019-11-15 14:47:51 +11:00
Paul Hauner
97729f8654
Run cargo-fmt (#599) 2019-11-12 19:15:56 +11:00
Age Manning
5c97ed3562
Updates external dependencies (#577)
* Updates external dependencies

* Correct fmt formatting
2019-10-30 12:22:18 +11:00
Mehdi Zerouali
6ae62c952b Change private key file permissions (#551)
* Import the libc crate for file permission management

* Tighten permissions on key file

* Fix code to match style guidelines
2019-10-02 11:16:34 +10:00
Paul Hauner
9aedb12bfc
Refactor docs into mdbook (#547)
* Refactor documentation, ef_tests makefile

* Add makefile to root

* Tidy readme

* Fix readme badges

* Tidy logs

* Add terminalize gif

* Update readme image

* Update readme image

* Tidy logs

* Update readme image

* Update readme

* Update readme

* Fix book link

* Update makefiles

* Update book

* Fix link in book

* Add readme for book

* Remove old docs, move api spec YAML

* Fix eth2/ dir readme

* Add readme for lcli

* Add about this book section

* Minor formatting improvements

* Address mehdi's comments
2019-10-02 11:04:56 +10:00
pscott
7eb82125ef Clippy clean (#536)
* Change into_iter to iter

* Fix clippy 'easy' warnings

* Clippy eth2/utils

* Add struct NetworkInfo

* Clippy for types, utils, and beacon_node/store/src/iters.rs

* Cargo fmt

* Change foo to my_foo

* Remove complex signature

* suppress clippy warning for unit_value in benches

* Use enumerate instead of iterating over range

* Allow trivially_copy_pass_by_ref in serde_utils
2019-09-30 13:58:45 +10:00
Michael Sproul
81325a0e05
Run rustfmt 2019-09-30 11:30:47 +10:00
Paul Hauner
4ba6e916d5
Merge branch 'interop' of github.com:sigp/lighthouse into interop 2019-09-23 22:32:09 +10:00
Paul Hauner
8ceb2e3d95
Refactor slot clock to remove underflow
Previously I had used `Instant` to refer to the genesis time.
2019-09-21 11:21:47 +10:00
Luke Anderson
00a5f003c4
Merge branch 'api-alignment' into validator-post-fns 2019-09-13 20:53:38 +10:00
Paul Hauner
7c211f3791
Add explicit fails for 32bit architecture 2019-09-12 10:40:29 -04:00
Luke Anderson
cd8f40b4b7
Getting regular endpoint functions to return futures.
- Wrapped endpoint functions in new into_boxfut function
 - Undid changes to Network API service, now returning ApiResult again.
 - Cleaning up of functions, and removal of success_response functions in updated endpoints.
 - A bunch of other clean-ups.
2019-09-12 15:20:31 +10:00
Luke Anderson
ea9d2285c3
Merge branch 'interop' into validator-post-fns. 2019-09-12 12:50:04 +10:00
Paul Hauner
3fe61f5044
Add additional logs to validator client 2019-09-10 17:40:21 -04:00
Paul Hauner
8c5a8034b6
Add whiteblock script, CLI options to support it 2019-09-10 12:13:54 -04:00
Luke Anderson
476cbae577
Updated validator client to do better logging, including of JSON serialised signatures and such, for debugging purposes. 2019-09-10 10:55:46 +10:00
Paul Hauner
66fd1586ca
Add more logging around block/attn production 2019-09-09 16:43:08 -04:00
Paul Hauner
14cf6b0118
Add option to validator service to fix bug
With the previous setup it would never produce on the 0 slot.
2019-09-06 10:17:23 +10:00
Paul Hauner
8b69a48fc5
Allow validator client to start before genesis 2019-09-06 10:03:45 +10:00
Paul Hauner
572df4f37e
Make bootstrapper block til connection established 2019-09-04 13:56:30 +10:00
Paul Hauner
246dcaa094
Add extra log to validator client 2019-09-01 22:30:56 +10:00
Paul Hauner
457e04f1e0
Rename key gen subcommand in val client 2019-09-01 20:12:51 +10:00
Paul Hauner
fe2cd2fc27
Add testing keypairs to validator client 2019-09-01 20:09:46 +10:00
Paul Hauner
4a69d01a37
Add first changes to validator CLI 2019-09-01 19:33:43 +10:00
Paul Hauner
543e9457b7
Move bootstrapper into own crate 2019-09-01 19:32:57 +10:00
Paul Hauner
8cfbe8bbfb
Change seconds_per_slot to milliseconds_per_slot 2019-08-29 14:32:21 +10:00
Paul Hauner
7d03806107
Upgrade codebase to new SlotClock API 2019-08-29 14:26:30 +10:00
Paul Hauner
bcd53a8b10
Migrate codebase across to new SlotClock API 2019-08-29 13:25:55 +10:00
Age Manning
3210489a36
Apply PR suggestions 2019-08-09 13:23:47 +10:00
Age Manning
826abea8e0
Merge latest 'master' 2019-08-09 10:46:49 +10:00
Paul Hauner
8cfa36fedd
Publish ssz_types (and deps) to crates.io (#468)
* Rename `hashing` crate to `eth2_hashing`

* Add license, desc to eth2_hashing Cargo.toml

* Remove merkle root from eth2 hashing

* Remove old benches folder (zombied from old branch)

* Add docs to eth2_hashing

* Prepare tree_hash for publishing on crates.io

* Update deps to use crates.io instead of paths

* Update all crates to pull ssz from crates.io

* Remove cached_tree_hash, add patches to manifest

* Fix compile error in benches

* Remove unused code

* Fix fake_crypto compile error
2019-08-08 11:39:47 +10:00
Age Manning
107f32642f
Duplication of validator polls are no longer fatal 2019-08-07 16:33:21 +10:00
Age Manning
907a4e5a4b
Configuration updates allow for verbosity CLI flag and spec constants 2019-08-07 14:54:08 +10:00
Age Manning
107bbdcccd
Updates to latest interop branch.
- Shifts decoding of objects into message handler.
- Updates to latest interop gossipsub.
- Adds interop spec constant.
2019-08-06 17:54:38 +10:00
Age Manning
40c0b70b22
Add interop chain spec and rename chain_id 2019-08-06 15:35:05 +10:00
blacktemplar
309b10c4a8 add logging functionality for aligning key value pairs after message (#461)
* add logging functionality for aligning key value pairs after the main messages

* move to own crate, change default message width to 40

* use FullFormat in validator_client (CompactFormat is not compatible with aligning)

* move logging to eth2/utils/logging
2019-07-31 09:06:53 +10:00
Michael Sproul
a236003a7b Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8

* state_processing: epoch processing v0.8.0

* state_processing: block processing v0.8.0

* tree_hash_derive: support generics in SignedRoot

* types v0.8: update to use ssz_types

* state_processing v0.8: use ssz_types

* ssz_types: add bitwise methods and from_elem

* types: fix v0.8 FIXMEs

* ssz_types: add bitfield shift_up

* ssz_types: iterators and DerefMut for VariableList

* types,state_processing: use VariableList

* ssz_types: fix BitVector Decode impl

Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!

* types: fix test modules for v0.8 update

* types: remove slow type-level arithmetic

* state_processing: fix tests for v0.8

* op_pool: update for v0.8

* ssz_types: Bitfield difference length-independent

Allow computing the difference of two bitfields of different lengths.

* Implement compact committee support

* epoch_processing: committee & active index roots

* state_processing: genesis state builder v0.8

* state_processing: implement v0.8.1

* Further improve tree_hash

* Strip examples, tests from cached_tree_hash

* Update TreeHash, un-impl CachedTreeHash

* Update bitfield TreeHash, un-impl CachedTreeHash

* Update FixedLenVec TreeHash, unimpl CachedTreeHash

* Update update tree_hash_derive for new TreeHash

* Fix TreeHash, un-impl CachedTreeHash for ssz_types

* Remove fixed_len_vec, ssz benches

SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)

* Remove boolean_bitfield crate

* Fix fake_crypto BLS compile errors

* Update ef_tests for new v.8 type params

* Update ef_tests submodule to v0.8.1 tag

* Make fixes to support parsing ssz ef_tests

* `compact_committee...` to `compact_committees...`

* Derive more traits for `CompactCommittee`

* Flip bitfield byte-endianness

* Fix tree_hash for bitfields

* Modify CLI output for ef_tests

* Bump ssz crate version

* Update ssz_types doc comment

* Del cached tree hash tests from ssz_static tests

* Tidy SSZ dependencies

* Rename ssz_types crate to eth2_ssz_types

* validator_client: update for v0.8

* ssz_types: update union/difference for bit order swap

* beacon_node: update for v0.8, EthSpec

* types: disable cached tree hash, update min spec

* state_processing: fix slot bug in committee update

* tests: temporarily disable fork choice harness test

See #447

* committee cache: prevent out-of-bounds access

In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.

* fix bug in get_indexed_attestation and simplify

There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.

* state_proc: workaround for compact committees bug

https://github.com/ethereum/eth2.0-specs/issues/1315

* v0.8: updates to make the EF tests pass

* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
  verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
  the spec.

* rustfmt

* ef_tests: add new epoch processing tests

* Integrate v0.8 into master (compiles)

* Remove unused crates, fix clippy lints

* Replace v0.6.3 tags w/ v0.8.1

* Remove old comment

* Ensure lmd ghost tests only run in release

* Update readme
2019-07-30 12:44:51 +10:00
Paul Hauner
177df12149
Testnet stability (#451)
* Change reduced tree for adding weightless node

* Add more comments for reduced tree fork choice

* Small refactor on reduced tree for readability

* Move test_harness forking logic into itself

* Add new `AncestorIter` trait to store

* Add unfinished tests to fork choice

* Make `beacon_state.genesis_block_root` public

* Add failing lmd_ghost fork choice tests

* Extend fork_choice tests, create failing test

* Implement Debug for generic ReducedTree

* Add lazy_static to fork choice tests

* Add verify_integrity fn to reduced tree

* Fix bugs in reduced tree

* Ensure all reduced tree tests verify integrity

* Slightly alter reduce tree test params

* Add (failing) reduced tree test

* Fix bug in fork choice

Iter ancestors was not working well with skip slots

* Put maximum depth for common ancestor search

Ensures that we don't search back past the finalized root.

* Add basic finalization tests for reduced tree

* Change fork choice to use beacon_block_root

Previously it was using target_root, which was wrong

* Change reduced tree for adding weightless node

* Add more comments for reduced tree fork choice

* Small refactor on reduced tree for readability

* Move test_harness forking logic into itself

* Add new `AncestorIter` trait to store

* Add unfinished tests to fork choice

* Make `beacon_state.genesis_block_root` public

* Add failing lmd_ghost fork choice tests

* Extend fork_choice tests, create failing test

* Implement Debug for generic ReducedTree

* Add lazy_static to fork choice tests

* Add verify_integrity fn to reduced tree

* Fix bugs in reduced tree

* Ensure all reduced tree tests verify integrity

* Slightly alter reduce tree test params

* Add (failing) reduced tree test

* Fix bug in fork choice

Iter ancestors was not working well with skip slots

* Put maximum depth for common ancestor search

Ensures that we don't search back past the finalized root.

* Add basic finalization tests for reduced tree

* Add network dir CLI flag

* Simplify "NewSlot" log message

* Rename network-dir CLI flag

* Change fork choice to use beacon_block_root

Previously it was using target_root, which was wrong

* Update db dir size for metrics

* Change slog to use `FullFormat` logging

* Update some comments and log formatting

* Add prom gauge for best block root

* Only add known target blocks to fork choice

* Add finalized and justified root prom metrics

* Add CLI flag for setting log level

* Add logger to beacon chain

* Add debug-level CLI flag to validator

* Allow block processing if fork choice fails

* Create warn log when there's low libp2p peer count

* Minor change to logging

* Make ancestor iter return option

* Disable fork choice test when !debug_assertions

* Fix type, removed code fragment

* Tidy some borrow-checker evading

* Lower reduced tree random test iterations
2019-07-29 13:45:45 +10:00
Pawan Dhananjay
db094022b9 Remove unused dependencies (#456) 2019-07-29 09:55:57 +10:00
John Adler
fec7168512
Fix lots of typos. 2019-07-26 15:26:06 -04:00
Luke Schoen
bbde06eb9f docs: Fix readme typos (#439) 2019-07-16 17:40:53 +10:00
Kirk Baird
08069704c1
Add cli flag for logging to JSON file 2019-07-10 10:27:44 +10:00
Paul Hauner
1dc9368b13
Merge pull request #415 from sigp/fix-validator-keys-410
Fixed account_manager data dir
2019-07-04 15:01:54 +10:00
Age Manning
1aeec12b78
Improve error handling of default directory 2019-07-04 14:14:27 +10:00
Age Manning
af28d5e20c
Add persistent network identification 2019-07-04 14:14:27 +10:00
Paul Hauner
027f0a539d
Prepare ssz for publishing on crates.io 2019-07-03 16:06:20 +10:00
Luke Anderson
df61231bbe
Small CLI update.
- Added the 'd' short version of the 'datadir' flag for the validator client.
2019-06-27 13:31:07 +10:00
Michael Sproul
1572690519
validator: update minimal config file 2019-06-18 10:44:40 +10:00
Paul Hauner
b9e832216b
Change name of VC CLI param 2019-06-10 21:37:59 -04:00
Paul Hauner
4a871dbcc7
Change default config filenames 2019-06-09 06:35:36 -04:00
Paul Hauner
ab12787610
Update account manager config parsing 2019-06-09 04:34:56 -04:00
Paul Hauner
3487b16ce5
Add eth2_config crate, integrate into val client 2019-06-08 20:21:50 -04:00
Paul Hauner
749f2fcb5f
Unify EthSpecs in Mainnet and Minimal 2019-06-08 08:49:04 -04:00
Paul Hauner
e74d49fc8a
Remove dupe info between ChainSpec and EthSpec 2019-06-08 07:57:25 -04:00
Paul Hauner
7005234fd1
Run rust fmt 2019-06-04 09:38:13 +10:00
Paul Hauner
39cb63e01e
Merge branch 'v0.6.1' into docker-env 2019-06-04 09:25:00 +10:00
Michael Sproul
6bde64bd6a
spec v0.6: update beacon_node, validator_client 2019-06-03 16:13:51 +10:00
Paul Hauner
2f9f8bf772
Tidy BeaconChain; del spec, unify head updates 2019-05-31 17:32:20 +10:00
Paul Hauner
6e5e1721f7
Fix lints introduced in Rust 1.35 2019-05-28 10:46:01 +10:00
Paul Hauner
76602a65fc
Add new fns to ForkChoice and SlotClock 2019-05-27 17:58:15 +10:00
Michael Sproul
9f6b7eb757
Merge remote-tracking branch 'origin/sos' into spec-0.6 2019-05-15 11:09:00 +10:00
Michael Sproul
e80264b8c8
Merge remote-tracking branch 'origin/master' into spec-0.6 2019-05-14 12:09:59 +10:00
Michael Sproul
bc03e14943
validator_client: IndexedAttestation rename 2019-05-13 17:21:17 +10:00
Paul Hauner
a0148b5aae
Rename SSZ traits (Encodable -> Encode) 2019-05-13 15:12:19 +10:00
Paul Hauner
95fcd3654a
Update validator_client for new SSZ API 2019-05-12 09:42:41 +10:00
Paul Hauner
ce8ebeccbc
Rename BeaconStateTypes to EthSpec 2019-05-10 14:47:09 +10:00
Paul Hauner
2a938f2fd5
Fix clippy lints 2019-05-09 13:35:00 +10:00
Paul Hauner
0ac278f44d
Update validator_client for BeaconStateTypes 2019-05-09 12:19:52 +10:00
Paul Hauner
49c92ef167
Remove attester, block_producer & test_harness 2019-05-09 11:48:14 +10:00
Luke Anderson
934cb5af5f
Merge branch 'master' into testnet-key-load 2019-05-06 11:13:16 +10:00
Paul Hauner
f69b56ad60
Add new tree_hash crate project wide. 2019-04-16 14:25:43 +10:00
Paul Hauner
b8c4c3308a
Update types to new tree_hash crate 2019-04-16 14:14:38 +10:00
Luke Anderson
3ad40dac9b
Fixed *all* cargo fmt 2019-04-08 15:39:26 +10:00
Luke Anderson
177a351462
Added deterministic keypair generation.
- The Account Manager has a new subcommand, allowing generation of deterministic keys given a particular validator index.
 - Split functionality in generate_deterministic_keypair function
 - Fixed up READMEs to reflect new functionality & correct naming.
2019-04-08 15:02:11 +10:00
Paul Hauner
1913be0c6f
Fix clippy lints 2019-04-03 16:23:09 +11:00
Paul Hauner
3fe7dd80e2
Merge branch 'validator-enhancements' into testnet-client 2019-04-02 14:29:43 +11:00
Age Manning
3f160d3b99
Correct bootnodes cli parameter 2019-04-01 16:29:11 +11:00
Age Manning
c85da612f6
Remove debugging statements 2019-03-31 15:35:54 +11:00
Age Manning
33473892f2
Validator client fixes. Hack fix for genesis start time 2019-03-31 14:26:58 +11:00
Age Manning
ee693fb3e3
Add committe_len to gRPC parameters 2019-03-31 00:34:35 +11:00
Age Manning
9a6ecc4665
Add clippy suggestions 2019-03-30 19:58:19 +11:00
Age Manning
51ffbc07d2
Correct attestation error handling 2019-03-30 19:48:45 +11:00
Age Manning
fc5142c09a
Registers the attester service to the beacon node RPC client 2019-03-30 19:32:32 +11:00
Age Manning
e1befe9d3a
Adds attestation producer to the validation client 2019-03-30 18:46:06 +11:00
Age Manning
d12ddae247
Builds attestation grpc implemention 2019-03-30 18:14:04 +11:00
Age Manning
145cabc427
Build validator client AttestationProducer 2019-03-30 17:56:43 +11:00
Age Manning
a952acb86f
Add committee_len to attestation data 2019-03-30 17:20:33 +11:00
Age Manning
bb8938c564
Use AttestationDuty in epoch duties 2019-03-30 17:14:38 +11:00
Age Manning
c107ebf9aa
Initial implementation of AttestationProducer 2019-03-30 17:06:43 +11:00
Age Manning
25d1ddfbb0
Renames BeaconBlockNode to BeaconNodeBlock for future consistency 2019-03-30 16:34:43 +11:00
Age Manning
6e254551af
Implement produce beacon block on gRPC beacon node server 2019-03-30 15:58:31 +11:00
Age Manning
ba90901730
Referenced signer passed to block producer 2019-03-30 14:48:43 +11:00
Age Manning
deb0abd4a8
Restores display for validator keys 2019-03-30 14:28:42 +11:00
Age Manning
d3a6d73153
Implements Signer generic for validator client and epoch duties 2019-03-30 14:27:37 +11:00
Age Manning
ba771282fa
Merges in validator client branch 2019-03-30 13:17:24 +11:00
Age Manning
97bb61371c
Correct compiler issues, re-introduce validator library 2019-03-30 12:14:56 +11:00
Age Manning
e418cd1183
Refactor main validator service 2019-03-29 23:45:53 +11:00
Age Manning
9cdb7bb716
Restructure of validator client service and block producer 2019-03-29 17:28:07 +11:00
Age Manning
eea772de3e
Implement block producer for validator client 2019-03-29 16:33:27 +11:00
Age Manning
f8201edddd
Initial layout of beacon block production 2019-03-29 14:52:08 +11:00
Kirk Baird
023b4e8c92
Merge master and remove ssz length encoding from FakeBLS 2019-03-29 11:47:22 +11:00
Age Manning
aa29a66fac
Add node chain-id validation for validation client 2019-03-29 10:49:43 +11:00
Age Manning
68b33620c2
Implement Display and clean validator output 2019-03-29 02:23:03 +11:00
Age Manning
405ea619e2
Clean up validator output 2019-03-29 00:45:39 +11:00
Luke Anderson
6c8abd8990
Fixed merge conflict fail. 2019-03-29 00:02:41 +11:00
Luke Anderson
367fbbc1c5
Merging master, fixing conflicts. 2019-03-28 23:57:06 +11:00
Luke Anderson
87acaac8a0
Ran cargo fmt. 2019-03-28 21:01:47 +11:00
Luke Anderson
867af4bc6a
Made the 'signers' an Arc, so that things compile. 2019-03-28 21:00:38 +11:00
Luke Anderson
ba71e8adca
Merged age-validator-client into luke's changes on validator_client, and fixed all the merge conflicts. 2019-03-28 20:55:07 +11:00
Luke Anderson
9f92026fe2
rustfmt fix. 2019-03-28 19:52:36 +11:00
Luke Anderson
18998f3dc8
Fixing merge conflict, having keys generated deterministically for testing. 2019-03-28 19:08:33 +11:00
Luke Anderson
6937da0994
Added deterministic key generation for testing purposes. 2019-03-28 18:58:00 +11:00
Age Manning
2a2660ce62
Cleanup debug issues, corrects RPC server logic 2019-03-28 17:24:49 +11:00
Age Manning
cc4ccd4017
Corrects read/write race condition 2019-03-28 17:16:43 +11:00
Luke Anderson
c9e8fe53bc
Merged Age's changes and ripped out heaps of now obsolete stuff in the validator client.
- Replaced most instances of PublicKey with KeyPair, since they need to be passed into each validator thread now.
 - Pulled out a bunch of FreeAttestations, and replaced with regular Attestations (as per Paul's suggestion)
 - Started generalising pubkeys to 'signers' (though they are still just Keypairs)
 - Added validator_index into a few structs where relevant
 - Removed the SlotClock and DutiesReader from the BlockProducer and Attester services, since this logic is now abstracted to the higher level process.
 - Added a Hash trait to the Keypair (rather than just pubkey) which assumes the Pubkey uniquely defines it.
2019-03-28 15:50:57 +11:00
Age Manning
6f0c0e47c3
Update Validator RPC and cache building 2019-03-28 14:32:02 +11:00
Age Manning
d7289ab55e
Add gossip-test branch 2019-03-28 14:31:35 +11:00
Age Manning
4caaf82892
Correct validator get duties RPC server logic 2019-03-28 13:14:41 +11:00
Luke Anderson
bda381a264
More progress towards getting the attester working. 2019-03-28 09:38:39 +11:00
Age Manning
d3af95d1eb
Returns attestation duty for validator client processing 2019-03-27 22:41:55 +11:00
Age Manning
75195bbbf4
Implement work finding logic in validator client 2019-03-27 22:22:51 +11:00
Age Manning
a315e9da49
Rename fields in validator client EpochDuties 2019-03-27 21:36:06 +11:00
Age Manning
cde049df1f
Adds RwLock to EpochDuty 2019-03-27 19:52:05 +11:00
Age Manning
46181408ba
Epoch duties update 2019-03-27 19:47:08 +11:00
Age Manning
bc8ec51fe5
Update EpochDuty RPC and core functionality 2019-03-27 15:41:51 +11:00
Luke Anderson
c9a7977d69
Renamed some functions, trying to get beaconnode attestation stuff to work. 2019-03-27 14:30:09 +11:00
Luke Anderson
1584469b7c
Renamed attestation -> attestation_data for fetch, but not publish, to acknowledge the difference in the spec. Also started implementing the gRPC get_attestation_data functionality in the BeaconNode. 2019-03-26 17:41:43 +11:00
Age Manning
7c31c052f3
Temp commit - Re-building validator RPC API 2019-03-26 15:59:00 +11:00
Paul Hauner
00b546e6b8
Update slot clock to use genesis slot 2019-03-26 15:44:28 +11:00
Kirk Baird
116d995960
Merge current master and fix ssz-fuzzing 2019-03-26 14:53:50 +11:00
Paul Hauner
d4fecd8a84
Set GRPC block to be just SSZ 2019-03-26 12:32:38 +11:00
Age Manning
ffb3d94355
Wrap the duty manager in a future for its own thread 2019-03-26 11:59:48 +11:00
Age Manning
33d0f29221
Remove old tests 2019-03-26 11:33:24 +11:00
Age Manning
a82a5311ee
Merge branch 'validator_client' of github.com:sigp/lighthouse into validator_client 2019-03-25 18:58:42 +11:00
Luke Anderson
c7ba3faae0
Merge branch 'validator_client' of github.com:sigp/lighthouse into validator_client 2019-03-25 18:32:42 +11:00
Luke Anderson
4cdeb6abe5
Progress towards validator signing attestations.
- Added a 'beacon_attester' RPC endpoint, so the BeaconNode can supply attestation data.
 - Renamed 'attestation_data' to just 'attestation' throughout (except where it is actually just the data structure).
2019-03-25 18:32:27 +11:00
Age Manning
a8a3f1c318
Removes duty manager service in favour of tokio timer 2019-03-25 18:03:23 +11:00
Age Manning
3ad18b4367
Adds manager duties to validator runtime 2019-03-25 17:47:23 +11:00
Age Manning
02039be400
Fix merge conflicts 2019-03-25 17:46:08 +11:00
Luke Anderson
2f49289c28
Merged master and fixed merge conflicts with Config updates. 2019-03-25 17:03:17 +11:00
Age Manning
ca9af49d4e
Adds error handling to validator client service 2019-03-25 16:50:15 +11:00
Age Manning
4fdb01e5f0
Correct slot duration interval timer 2019-03-25 15:10:26 +11:00
Age Manning
209614e373
Merge pull request #295 from sigp/validator-updates
Persisting (random) Validator Keys
2019-03-25 14:40:11 +11:00
Age Manning
18493a4df4
Adds microsecond duration to validator client 2019-03-24 09:24:50 +11:00
Luke Anderson
cc208670b2
Fixed formatting with rustfmt. 2019-03-23 15:52:17 +11:00
Luke Anderson
fba916a0d8
Updated validator config according to suggestions.
- Directory structure changed slightly
 - Uses a filter_map instead of a for loop.
 - All errors reading files does not prevent others from being read.
 - The accounts manager needs to generate files first, with the same structure.
2019-03-23 15:46:51 +11:00
Age Manning
56d33d2e26
Basic tokio slot stream implementation 2019-03-23 11:48:36 +11:00
Age Manning
318d6a976e
Initial tokio timer interval 2019-03-23 00:36:48 +11:00
Age Manning
547a750d78
Setup basic structure before tokio runtime addition 2019-03-22 23:21:26 +11:00
Age Manning
17cd5bb991
Adds genesis time to node info. Closes #256 2019-03-22 23:01:10 +11:00
Age Manning
61fc946d54
Adds initial connection to beacon node with retries 2019-03-22 22:50:16 +11:00
Age Manning
c4454289d6
Initial implementation of validator service 2019-03-22 17:27:07 +11:00
Age Manning
b2cd771a42
Shift argument passing into config module 2019-03-22 17:04:55 +11:00
Age Manning
4990569f68
Add BeaconNodeInfo RPC to validator client 2019-03-22 16:48:25 +11:00
Age Manning
a4cfe68272
Thread beacon node RPC server 2019-03-22 16:46:52 +11:00
Age Manning
6d0ad99358
Merge @thojest validator client to branch. 2019-03-22 11:54:24 +11:00
Luke Anderson
9e47cb56e7
Fixed code appearance with rustfmt. 2019-03-20 16:27:58 +11:00
Luke Anderson
49f6e7ac65
Moved configuration around for validator client.
- Custom datadir/server argument logic moved into configuration, out of main.
 - Updated the validator config directory structure, as per issue #253 suggestions
 - Removed the 'generate 3 random keys' function
 - Updated the README to reflect new structure
 - Just exit if there are no keys, don't generate any (this is for accounts_manager, in a separate commit).
 - Created a lib.rs file, so that the validator client configuration can be included by external crates.
2019-03-20 16:23:33 +11:00
thojest
d8099ae00c started implementing BeaconNode for AttestationGrpcClient; included correct epoch_map for instantiation of Attester (lighthouse-255) 2019-03-18 21:19:44 +01:00
Kirk Baird
9cef6a5814
Finish implementing Darrens migrate-ssz-little-endian and add wrapper to check for ssz underflow 2019-03-18 18:11:46 +11:00
Paul Hauner
919a15de22
Ensure validator client compiles under v0.5.0 2019-03-17 19:21:19 +11:00
thojest
2215aa4b46 added protos specification for Attester and created first draft for attestation_grpc_client (lighthouse-255) 2019-03-15 11:44:39 +01:00
Paul Hauner
f9964ebd8b
Update Fork struct to v0.5.0 2019-03-15 13:33:45 +11:00
Luke Anderson
b000a0972e
Minor updates to Paul's comments.
- Bubbled up home_dir not found error
 - Made comment show up in docs
2019-03-13 13:38:28 +11:00
Luke Anderson
e942d7533b
A first go at persisting validator keys and handling configuration. Addresses issue #253.
- Creates a keystore directory in the config
 - Fetches serialized keys from the keystore directory
 - If no keys, generates keys randomly, saves serialized keys to keystore dir.
2019-03-12 21:56:45 +11:00
thojest
8f3530f60c created attester_service and started to create an attester_thread in main of validator_client (lighthouse-255) 2019-03-08 13:48:33 +01:00
Paul Hauner
db3b6cba6d
Introduce Fork struct to block_producer
It's a pretty crappy solution, IMO. It shouldn't really belong in
"duties" but this gets the job done for now.
2019-03-07 13:54:56 +11:00
Paul Hauner
5a21e19a31
Fix all compile errors from v0.4.0 update 2019-03-07 12:53:15 +11:00
Paul Hauner
93ce7b59e7
Merge branch 'master' into v0.4.0-types 2019-03-07 12:03:27 +11:00
Paul Hauner
663d39739f
Do project-wide s/epoch_length/slots_per_epoch/g 2019-03-04 17:51:54 +11:00
thojest
c28c07c17d validator_client: added default_value for spec; used unreachable macro for custom spec (lighthouse-252) 2019-03-03 14:15:00 +01:00
thojest
ed7a081008 slightly adapted impossible error for validator_client (lighthouse-252) 2019-03-01 18:27:47 +01:00
thojest
f0ea691208 now possible to select ChainSpec by using CLI flag (lighthouse-252) 2019-03-01 18:19:08 +01:00
Feng94
7ed606eca1
Modify block_producer references in other crates where needed for compilation 2019-02-19 00:21:23 +11:00
Paul Hauner
35c914baa6
Revert "Merge pull request #200 from sigp/new-structure"
This reverts commit d7a3545be1, reversing
changes made to 1da06c156c.
2019-02-14 12:09:18 +11:00
Paul Hauner
1d5ff4359a
Strip out old code
All of these files have been moved to either:

- https://github.com/sigp/lighthouse-beacon
- https://github.com/sigp/lighthouse-validator
- https://github.com/sigp/lighthouse-common

For rationale, see: https://github.com/sigp/lighthouse/issues/197
2019-02-13 14:15:53 +11:00
Paul Hauner
05ed778ccc
Remove unused var from block_producer
It was made redundant when `proposer_slots` was removed.
2019-02-13 07:39:00 +11:00
Paul Hauner
5c1d0dcea5
Fix various clippy lints 2019-02-13 07:32:31 +11:00
Paul Hauner
606d927a84
Update validator_client for spec v0.2.0 2019-02-12 17:00:51 +11:00
Paul Hauner
5e37e8a33a
Update validator_client for spec v0.2.0 2019-02-12 12:57:17 +11:00
Paul Hauner
85450ec254
Fix all compile errors from new Slot/Epoch types 2019-02-07 11:22:48 +11:00
Paul Hauner
36ee4aa81f
Fix file naming inconsistencies.
File names should be the same as the struct that they contain.
2019-02-05 16:53:44 +11:00
Paul Hauner
6c6ee4320d
Fix block_producer naming to match attester 2019-02-05 16:47:59 +11:00
Paul Hauner
ea523c8658
Merge spec crate into types 2019-01-25 13:52:21 +11:00
Paul Hauner
9c86c07eea
Fix unused deps warnings 2019-01-25 13:05:11 +11:00
Paul Hauner
19417efa63
Fix compile errors from block_producer upgrades 2019-01-25 13:03:17 +11:00
Paul Hauner
298f9acd6a
Merge branch 'master' into lmd-ghost 2019-01-24 12:06:23 +11:00
Paul Hauner
8c0e634aa4
Add Signer to validator client 2019-01-24 11:50:34 +11:00
Paul Hauner
188434aaa0
Move block_propser -> eth/, impl for val client 2019-01-23 21:41:47 +11:00
Paul Hauner
403eefb7b4
Move block_proposer into separate crate 2019-01-23 21:21:18 +11:00
Paul Hauner
8e935f93bc
Replace EpochDutiesMap with trait in BlockProducer 2019-01-23 21:01:46 +11:00
Paul Hauner
af6437eb13
Update validator client for types change 2019-01-23 20:59:59 +11:00
Kirk Baird
e047fbe914
More updates base upon the specs 2019-01-23 18:06:25 +11:00
Kirk Baird
560dbe4ae1
Update constants / types to match specs as of 23.1.19 2019-01-23 15:04:40 +11:00
Paul Hauner
bf2cd2331d
Fix dependencies after eth2 rename 2019-01-22 16:19:39 +11:00
Paul Hauner
df3c450723
Update validator client for block body update 2019-01-22 14:54:51 +11:00
Paul Hauner
14dfc3223a
Add doc comments for validator service. 2019-01-22 12:38:11 +11:00
Paul Hauner
3d06bf9d2d
Add validator client readme 2019-01-22 09:38:31 +11:00
Paul Hauner
992f2101c2
Add short ID to logging for BLS public keys 2019-01-22 09:05:34 +11:00
Paul Hauner
b8ba0cd698
Split out validator index gRPC call 2019-01-21 22:10:43 +11:00
Paul Hauner
158ffd7d1c
Separate validator fns into new proto service 2019-01-21 19:38:28 +11:00
Paul Hauner
24a27891b8 Run rustfmt on entire codebase
Signed-off-by: Paul Hauner <paul@paulhauner.com>
2019-01-21 18:42:21 +11:00
Paul Hauner
ab502de8ec Add validator duties gRPC service to val. client 2019-01-21 18:29:50 +11:00
Paul Hauner
ebba4977a8
Introduce threading to validator client 2019-01-16 21:44:44 +11:00
Paul Hauner
27bfec6692
Add duties service to validator 2019-01-16 20:38:53 +11:00
Paul Hauner
3891a6017a
Impl more validator client 2019-01-15 17:42:55 +11:00
Paul Hauner
b87ff828ef
Impl more validator logic 2019-01-15 15:52:25 +11:00
Paul Hauner
40cf650563
Add validator_node, restructure binaries, gRPC.
This is a massive commit which restructures the workspace, adds a very
basic, untested, validator client and some very basic, non-functioning
gRPC endpoints to the beacon-node.
2019-01-14 12:55:55 +11:00