Commit Graph

3169 Commits

Author SHA1 Message Date
Paul Hauner
2016c22e45 Add a hardcoded eth2 testnet config 2019-11-28 15:22:04 +11:00
Paul Hauner
e31f76e79b Upgrade tesnet deposit contract version 2019-11-28 14:58:53 +11:00
Paul Hauner
2577136ba7 Add support for YamlConfig in Eth2TestnetDir 2019-11-28 14:49:15 +11:00
Paul Hauner
defe28b183 Fix bug in master merge 2019-11-28 13:24:00 +11:00
Paul Hauner
d32246b76c Merge branch 'master' into eth1-deploy 2019-11-28 13:21:28 +11:00
Paul Hauner
0dd1d3d442 Add lcli eth1-genesis command 2019-11-28 13:20:58 +11:00
pscott
7bdddd682c Apply eth2.0 config spec to ChainSpec (#605)
* Allow slot clock to work on genesis

* Loose over-strict requirements for slot clock tests

* fix slots_per_eth1_voting_period

* add utils for domain serializing and deserializing

* add serde_yaml to cargo

* add tmpdir to cargo

* cargo fmt src/utils

* add YamlConfig, allowing to serialize and deserialize yaml config files

* update to v0.9.1

* Comment out local tests

* update milliseconds_per_slot for minimal

* add safe_slots_to_update_justified

* Update to v0.9.1 and add deny_unknown_fields

* Specify that max_epochs_per_crosslink is for phase1

* Remove test stubs

* Use get to avoid panicking in serde_utils

* Use ? operator instead of explicit match return
2019-11-28 13:20:16 +11:00
Paul Hauner
291cf060d2 Remove unused dep 2019-11-28 10:49:48 +11:00
Paul Hauner
73ead55235 Refactor beacon node CLI 2019-11-28 10:31:51 +11:00
Paul Hauner
2bbac2ed18 Address bugs (#639)
* Change validator/duties endpoint

* Add time-based skip slot limiting

* Add new error type missed in previous commit
2019-11-27 18:37:09 +11:00
Paul Hauner
9bd0e13d9d Add log when waiting for genesis 2019-11-27 18:23:37 +11:00
Paul Hauner
88bd764143 Merge branch 'api-bug-fix' into eth1-deploy 2019-11-27 17:46:47 +11:00
Paul Hauner
34e6e6f943 Add new error type missed in previous commit 2019-11-27 17:36:19 +11:00
Paul Hauner
e0f417ec86 Add time-based skip slot limiting 2019-11-27 17:34:57 +11:00
Paul Hauner
dcd889f6ba Change validator/duties endpoint 2019-11-27 17:30:44 +11:00
Paul Hauner
0408fa6fd6 Make CLI args more consistent 2019-11-27 13:47:35 +11:00
Paul Hauner
66d624e538 Fix failing test in deposit_contract 2019-11-27 13:47:25 +11:00
Paul Hauner
b51d2d7282 Tidy code in rest_api 2019-11-27 13:11:52 +11:00
Paul Hauner
ab8b5dfc78 Fix broken tests in eth1 2019-11-27 13:11:44 +11:00
Paul Hauner
c3f2a50059 Merge branch 'master' into eth1-deploy 2019-11-27 12:49:22 +11:00
Paul Hauner
280bb455d0 Merge branch 'master' into eth1-deploy 2019-11-27 12:49:04 +11:00
Age Manning
97aa8b75b8 Testnet compatible network upgrade (#587)
* Create libp2p instance

* Change logger to stdlog

* test_connection initial commit

* Add gossipsub test

* Delete tests in network crate

* Add test module

* Clean tests

* Remove dependency on discovery

* Working publish between 2 nodes
TODO: Publish should be called just once

* Working 2 peer gossipsub test with additional events

* Cleanup test

* Add rpc test

* Star topology discovery WIP

* build_nodes builds and connects n nodes. Increase nodes in gossipsub test

* Add unsubscribe method and expose reference to gossipsub object for gossipsub tests

* Add gossipsub message forwarding test

* Fix gossipsub forward test

* Test improvements
* Remove discovery tests
* Simplify gossipsub forward test topology
* Add helper functions for topology building

* Clean up tests

* Update naming to new network spec

* Correct ssz encoding of protocol names

* Further additions to network upgrade

* Initial network spec update WIP

* Temp commit

* Builds one side of the streamed RPC responses

* Temporary commit

* Propagates streaming changes up into message handler

* Intermediate network update

* Partial update in upgrading to the new network spec

* Update dependencies, remove redundant deps

* Correct sync manager for block stream handling

* Re-write of RPC handler, improves efficiency and corrects bugs

* Stream termination update

* Completed refactor of rpc handler

* Remove crates

* Correct compile issues associated with test merge

* Build basic tests and testing structure for eth2-libp2p

* Enhance RPC tests and add logging

* Complete RPC testing framework and STATUS test

* Decoding bug fixes, log improvements, stream test

* Clean up RPC handler logging

* Decoder bug fix, empty block stream test

* Add BlocksByRoot RPC test

* Add Goodbye RPC test

* Syncing and stream handling bug fixes and performance improvements

* Applies discv5 bug fixes

* Adds DHT IP filtering for lighthouse - currently disabled

* Adds randomized network propagation as a CLI arg

* Add disconnect functionality

* Adds attestation handling and parent lookup

* Adds RPC error handling for the sync manager

* Allow parent's blocks to be already processed

* Update github workflow

* Adds reviewer suggestions
2019-11-27 12:47:46 +11:00
Michael Sproul
bf2eeae3f2 Implement freezer database (#508)
* Implement freezer database for state vectors

* Improve BeaconState safe accessors

And fix a bug in the compact committees accessor.

* Banish dodgy type bounds back to gRPC

* Clean up

* Switch to exclusive end points in chunked vec

* Cleaning up and start of tests

* Randao fix, more tests

* Fix unsightly hack

* Resolve test FIXMEs

* Config file support

* More clean-ups, migrator beginnings

* Finish migrator, integrate into BeaconChain

* Fixups

* Fix store tests

* Fix BeaconChain tests

* Fix LMD GHOST tests

* Address review comments, delete 'static bounds

* Cargo format

* Address review comments

* Fix LMD ghost tests

* 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

* Update for new builder paradigm, spec changes

* Freezer DB integration into BeaconNode

* Cleaning up

* This works, clean it up

* Cleanups

* Fix and improve store tests

* Refine store test

* Delete unused beacon_chain_builder.rs

* Fix CLI

* Store state at split slot in hot database

* Make fork choice lookup fast again

* Store freezer DB split slot in the database

* Handle potential div by 0 in chunked_vector

* Exclude committee caches from freezer DB

* Remove FIXME about long-running test
2019-11-27 10:54:46 +11:00
Paul Hauner
aad68f9e88 Improve eth1 logging 2019-11-27 09:12:07 +11:00
Paul Hauner
72da0df9e8 Ensure eth1 block is produced without any votes 2019-11-27 08:52:16 +11:00
Paul Hauner
103bde01da Shorten delay before testnet start 2019-11-27 08:50:50 +11:00
pscott
a514968155 Add cfg! check for fake_crypto (#633)
* Add cfg! check for fake_crypto

* Remove function attribute and update in-code cfg! checks
2019-11-27 07:29:51 +11:00
pscott
e6eda58faa optimize state loading (#636) 2019-11-27 07:18:54 +11:00
Paul Hauner
728e28e6ad Set SECONDS_PER_DAY to sensible minimum 2019-11-26 14:42:53 +11:00
Paul Hauner
f2374b3bc2 Handle errors in eth1 http module 2019-11-26 14:42:41 +11:00
Paul Hauner
743029a1de Add more logging to eth1 voting 2019-11-26 14:42:27 +11:00
Paul Hauner
4d4edda230 Fix bug in eth1 voting 2019-11-26 14:41:43 +11:00
Paul Hauner
581a46fd1c Make validator wait until genesis time 2019-11-26 09:10:20 +11:00
Paul Hauner
81f89c054c Improve eth1 logging 2019-11-26 09:09:26 +11:00
pscott
560d7cdb9f increase timeout duration (#627) 2019-11-25 20:26:05 +11:00
Paul Hauner
68f0e632f3 Modify eth1 testnet config 2019-11-25 18:20:06 +11:00
Paul Hauner
aebf7d38e0 Drop the block cache after genesis 2019-11-25 18:19:55 +11:00
Paul Hauner
ebfa1f53d6 Fix bug with validator services exiting on error 2019-11-25 18:19:41 +11:00
Paul Hauner
ae535ea33a Improve logging for eth1 2019-11-25 18:19:26 +11:00
Paul Hauner
b8bc548aaa Use time instead of skip count for denying long skips 2019-11-25 18:18:41 +11:00
Paul Hauner
79168b3063 Add refund-deposit-contract to lcli 2019-11-25 15:53:20 +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
0d22990056 Merge branch 'kill-grpc' into eth1-deploy 2019-11-25 15:18:47 +11:00
Paul Hauner
65cbf601ae Address Michael's comments 2019-11-25 15:11:27 +11:00
Paul Hauner
713c0a8c10 Fix minor bugs whilst testing 2019-11-25 14:52:09 +11:00
Paul Hauner
73572c32d4 Add password option to lcli deploy command 2019-11-25 13:13:49 +11:00
Paul Hauner
bd8d4818ef Add long names to lcli clap 2019-11-25 12:12:58 +11:00
Paul Hauner
837434dd5f Allow custom deposit amount 2019-11-25 12:02:48 +11:00
Paul Hauner
8347ddda96 Add password option for submitting deposits 2019-11-25 11:38:40 +11:00
Paul Hauner
140a0517a7 Make account manager submit deposits 2019-11-25 10:51:11 +11:00