Commit Graph

925 Commits

Author SHA1 Message Date
Paul Hauner
a8fce42ea9 Merge branch 'master' into interop 2019-09-02 15:15:43 +10:00
Paul Hauner
bfbe776712 Add special genesis state API endpoint 2019-09-02 15:07:48 +10:00
Paul Hauner
11a1505784 Allow starting from SSZ genesis state 2019-09-02 15:07:32 +10:00
Paul Hauner
6c50758bdf Add ResponseBuilder to rest_api 2019-09-02 14:29:36 +10:00
Paul Hauner
d4bf1390c9 Add interop eth1 data stub 2019-09-02 11:39:28 +10:00
Paul Hauner
82dc84ebbf Add slot-time CLI argument 2019-09-02 10:22:29 +10:00
Paul Hauner
4aa12dc408 Set a default BN bootstrap address 2019-09-02 09:59:52 +10:00
Age Manning
c1614b110b Merge interop branch 2019-09-02 05:45:00 +10:00
Age Manning
74baeb4d08 WIP - Upgrade Sync algorithm 2019-09-02 05:38:11 +10:00
Paul Hauner
a78b030f58 Fix rpc port-bump bug 2019-09-01 22:22:09 +10:00
Paul Hauner
960082fe4e Set all listen addresses to 0.0.0.0 for testnets 2019-09-01 22:21:46 +10:00
Paul Hauner
82b4a1b3eb Fix multiple data_dirs in config 2019-09-01 22:21:29 +10:00
Paul Hauner
6db1a19169 Remove stray dbg! 2019-09-01 22:20:31 +10:00
Paul Hauner
4a69d01a37 Add first changes to validator CLI 2019-09-01 19:33:43 +10:00
Paul Hauner
fa6ba51eb7 Make gRPC and HTTP on by default 2019-09-01 19:33:21 +10:00
Paul Hauner
543e9457b7 Move bootstrapper into own crate 2019-09-01 19:32:57 +10:00
Luke Anderson
632c13a9ec Fixing some API bits
- Adding the validator routes into the main function.
 - Fixing the setting of the aggregation bits, and handling errors correctly.
 - Rust format fixes, and addressing compiler warnings.
2019-09-01 15:41:03 +10:00
Luke Anderson
8ea1167563 Factored out getting beacon_chain from request into it's own function. 2019-09-01 15:09:01 +10:00
Luke Anderson
5ee1bb20b7 WIP: Furthered attestation production for validator. 2019-08-31 23:56:35 +10:00
Paul Hauner
5f0509be50 Improve and extend CLI interface 2019-08-31 12:34:27 +10:00
Paul Hauner
6ba093d14f Add warning when disconnecting peer 2019-08-30 17:06:59 +10:00
Paul Hauner
9ffb6d0fe1 Fix fake_crypto test fails 2019-08-30 15:49:06 +10:00
Paul Hauner
6234adc0d6 Add interop-spec genesis procedure 2019-08-30 15:33:34 +10:00
Paul Hauner
3365106340 Fix bug with block production 2019-08-30 11:04:15 +10:00
Paul Hauner
31bbb0f573 Modify RPC duties endpoint 2019-08-30 01:51:18 +10:00
Paul Hauner
8060cd8f5c Change RPC slot behaviour 2019-08-30 01:14:57 +10:00
Paul Hauner
ea562595ed Fix bugs with gRPC API 2019-08-30 00:46:25 +10:00
Paul Hauner
ae114889c1 Fix bugs from removing speculative state 2019-08-30 00:24:46 +10:00
Age Manning
192380cb58 Ethereum 2.0 Network Specification Upgrade (#510)
Updates lighthouse to the latest networking spec

-  Sync re-write (#496)
-  Updates to the latest eth2 networking spec (#495)
-  Libp2p updates and improvements
2019-08-29 13:23:28 +02:00
Paul Hauner
682081ef07 Add first pass at removing speculative state 2019-08-29 19:14:52 +10:00
Paul Hauner
29c8477242 Merge branch 'master' into interop 2019-08-29 16:00:22 +10:00
Paul Hauner
75ac21604f Add long minutes CLI flag 2019-08-29 15:03:52 +10:00
Paul Hauner
314780e634 Allow for customizable recent genesis window 2019-08-29 14:59:32 +10:00
Luke Anderson
eaec5e7b69 Start implementation of 'get attstation' validator function.
- Created new /beacon/validator/attestation endpoint
 - Updated some small issues with the API spec.
2019-08-29 14:58:49 +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
Luke Anderson
b9276da9db Flesh spec. & update display bugs.
- Add correct string formatting when incorrect parameters provided.
 - Fill /beacon/block and /beacon/block_root endpoints
 - Add 500 error responses to endpoints as appropriate
2019-08-29 13:36:51 +10:00
Paul Hauner
4557d2c84b Merge branch 'interop' into millsecond-slots 2019-08-29 13:27:06 +10:00
Paul Hauner
bcd53a8b10 Migrate codebase across to new SlotClock API 2019-08-29 13:25:55 +10:00
Luke Anderson
ca07d72453 Removed methods for 'chain_id', since this is no longer applicable to ETH2. 2019-08-29 12:42:45 +10:00
Paul Hauner
bcffe42712 Bulk signature verification (#507)
* Add basic block processing benches

* Start reviving state processing benches

* Fix old block builders

* Add optimization for faster pubkey add

* Tidy benches, add another

* Add extra block processing bench

* Start working on faster BLS scheme

* Add partially complete sig verify optimization

* Add .gitignore to state processing

* Add progress on faster signature verification

* Fix SignatureSet for fake_crypto

* Tidy attester slashings sig set

* Tidy bulk signature verifier

* Refactor signature sets to be cleaner

* Start threading SignatureStrategy through code

* Add (empty) test dir

* Move BenchingBlockBuilder

* Add initial block signature verification tests

* Add tests for bulk signature verification

* Start threading SignatureStrategy in block proc.

* Refactor per_block_processing errors

* Use sig set tuples instead of lists of two

* Remove dead code

* Thread VerifySignatures through per_block_processing

* Add bulk signature verification

* Introduce parallel bulk signature verification

* Expand state processing benches

* Fix additional compile errors

* Fix issue where par iter chunks is 0

* Update milagro_bls dep

* Remove debugs, code fragment in beacon chain

* Tidy, add comments to block sig verifier

* Fix various PR comments

* Add block_root option to per_block_processing

* Fix comment in block signature verifier

* Fix comments from PR review

* Remove old comment

* Fix comment
2019-08-29 11:34:25 +10:00
Luke Anderson
faef347d18 Fleshed out some API endpoints.
- Added the /beacon/validator/block endpoint for GET (untested)
 - Added the /beacon/fork endpoint for GET
 - Cleaned up a bunch of unused imports & variables
 - Removed '/network/block_discovery' endpoint
2019-08-28 23:33:34 +10:00
Luke Anderson
77e2f576af Further aligning the API & implementation.
- Completed implementation of /beacon/head
 - renamed 'latest_finalized_checkpoint' to 'current_finalized_checkpoint' for consistency
 - Reorganised list of endpoints in both spec & router so that they match
 - Fixed the content-type modifications for /metrics
 - Added a new 'RFC' tag to the spec, to tag things that we have not implemented and aren't sure if it's useful.
 - Moved 'deposit_contract' under /spec
2019-08-28 21:25:38 +10:00
Luke Anderson
16ec330a79 Started aligning API spec with implementation.
- Adding some missing fields to structs
 - Rearranged the endpoints in the rest_api router, and renamed, using an 'implementation_pending' function
 - Added 'content-type' headers, to distinguish difference with /node/metrics
 - Updated OpenAPI spec to v0.2.0
    - Split /node/fork into /node/chain_id and /beacon/fork
    - Moved /metrics to /node/metrics
    - Added example to /node/metrics, since it's text/plain
    - Moved /node/network to just /network
    - Added lots of stubs for endpoints which exist in the router
    - Reordered large parts of the OpenAPI spec
    - Moved /chain/beacon/... to just /beacon/...
2019-08-28 02:05:19 +10:00
Luke Anderson
328f11d564 Validator API (#504)
* Implemented more REST API endpoints.
 - Added many of the endpoints, which return 501 - Not Implemented
 - Created helper function to return a not implemented error
 - Created a parse_pubkey function to get a PublicKey from a hex string
 - Created a HTTP handler for the validator endpoints
 - Started implementing validator/duties endpoint.

* Fleshed out get validator duties.
 - Re-implemented the get validator duties function for the REST API
 - Added an 'as_hex_string' function to FakePublicKey, beacuse it was missing.

* Fixed small caching/state bug.

* Extended to array of API inputs.
 - Created  function for getting arrays from GET parameters.
 - Extended get validator duties function to support array of validator duties.

* Tidy API to be more consistent with recent decisions

* Addressing Paul's comments.
 - Cleaning up function to get list of proposers.
 - Removing unnecessary serde annotations
 - Clarifying error messages
 - Only accept pubkeys if they are '0x' prefixed.

* Fixed formatting with rustfmt.
2019-08-28 00:40:35 +10:00
Paul Hauner
3207eb1d68 Merge branch 'interop' of github.com:sigp/lighthouse into interop 2019-08-27 11:20:35 +10:00
Paul Hauner
4e0ac0169b Merge branch 'fix-fork-choice' into interop 2019-08-27 11:20:16 +10:00
Paul Hauner
ed6c39e25a Add log for fork choice integrity in beacon chain 2019-08-27 11:19:50 +10:00
Paul Hauner
7f6b700b98 Remove old git merge relic 2019-08-27 00:05:25 +10:00
Paul Hauner
6875ae8af5 Pull Eth2Config during bootstrap 2019-08-27 00:04:15 +10:00