Commit Graph

1163 Commits

Author SHA1 Message Date
Age Manning
1635ae8666 Update network crate for new libp2p 2020-05-11 15:34:22 +10:00
Age Manning
3ee4c4c60b Update libp2p service, start rpc test upgrade 2020-05-11 15:24:53 +10:00
Age Manning
e4d9978fb7 Remove println debugging statement 2020-05-11 12:48:00 +10:00
Pawan Dhananjay
addde163c4 stable futures fixes (#1124)
* Fix eth1 update functions

* Fix genesis and client

* Fix beacon node lib

* Return appropriate runtimes from environment

* Fix test rig

* Refactor eth1 service update
2020-05-10 19:55:06 +10:00
Age Manning
4617db64fa Convert self referential async functions 2020-05-08 16:19:55 +10:00
Age Manning
d54356036b Further updates 2020-05-08 16:11:53 +10:00
Age Manning
c4d5af81df Builder update 2020-05-08 15:06:52 +10:00
Age Manning
167530e3f4 Update notifier to stable futures 2020-05-08 12:40:45 +10:00
Pawan Dhananjay
7fbde447b1 Port rest_api crate to stable futures (#1118)
* Port rest_api lib to stable futures

* Reduce tokio features
2020-05-08 11:51:20 +10:00
Age Manning
1f2acad0df Network crate update to stable futures 2020-05-07 19:40:46 +10:00
Age Manning
d00fbcefd2 Merge stable futures 2020-05-07 16:23:53 +10:00
Age Manning
3e44d7a258 Merge latest master 2020-05-06 22:12:22 +10:00
Paul Hauner
ad5bd6412a Add attestation gossip pre-verification (#983)
* Add PH & MS slot clock changes

* Account for genesis time

* Add progress on duties refactor

* Add simple is_aggregator bool to val subscription

* Start work on attestation_verification.rs

* Add progress on ObservedAttestations

* Progress with ObservedAttestations

* Fix tests

* Add observed attestations to the beacon chain

* Add attestation observation to processing code

* Add progress on attestation verification

* Add first draft of ObservedAttesters

* Add more tests

* Add observed attesters to beacon chain

* Add observers to attestation processing

* Add more attestation verification

* Create ObservedAggregators map

* Remove commented-out code

* Add observed aggregators into chain

* Add progress

* Finish adding features to attestation verification

* Ensure beacon chain compiles

* Link attn verification into chain

* Integrate new attn verification in chain

* Remove old attestation processing code

* Start trying to fix beacon_chain tests

* Split adding into pools into two functions

* Add aggregation to harness

* Get test harness working again

* Adjust the number of aggregators for test harness

* Fix edge-case in harness

* Integrate new attn processing in network

* Fix compile bug in validator_client

* Update validator API endpoints

* Fix aggreagation in test harness

* Fix enum thing

* Fix attestation observation bug:

* Patch failing API tests

* Start adding comments to attestation verification

* Remove unused attestation field

* Unify "is block known" logic

* Update comments

* Supress fork choice errors for network processing

* Add todos

* Tidy

* Add gossip attn tests

* Disallow test harness to produce old attns

* Comment out in-progress tests

* Partially address pruning tests

* Fix failing store test

* Add aggregate tests

* Add comments about which spec conditions we check

* Dont re-aggregate

* Split apart test harness attn production

* Fix compile error in network

* Make progress on commented-out test

* Fix skipping attestation test

* Add fork choice verification tests

* Tidy attn tests, remove dead code

* Remove some accidentally added code

* Fix clippy lint

* Rename test file

* Add block tests, add cheap block proposer check

* Rename block testing file

* Add observed_block_producers

* Tidy

* Switch around block signature verification

* Finish block testing

* Remove gossip from signature tests

* First pass of self review

* Fix deviation in spec

* Update test spec tags

* Start moving over to hashset

* Finish moving observed attesters to hashmap

* Move aggregation pool over to hashmap

* Make fc attn borrow again

* Fix rest_api compile error

* Fix missing comments

* Fix monster test

* Uncomment increasing slots test

* Address remaining comments

* Remove unsafe, use cfg test

* Remove cfg test flag

* Fix dodgy comment

* Ignore aggregates that are already known.

* Unify aggregator modulo logic

* Fix typo in logs

* Refactor validator subscription logic

* Avoid reproducing selection proof

* Skip HTTP call if no subscriptions

* Rename DutyAndState -> DutyAndProof

* Tidy logs

* Print root as dbg

* Fix compile errors in tests

* Fix compile error in test
2020-05-06 21:42:56 +10:00
Age Manning
26cf06c3dd Correct discovery update 2020-05-06 21:35:41 +10:00
Pawan Dhananjay
702b2c9623 Fix conversion function and add tests (#1113) 2020-05-06 21:25:50 +10:00
Age Manning
c68e678cac Update all crates versions 2020-05-06 21:23:50 +10:00
Age Manning
c6dad814d4 Compiling version of eth2-libp2p 2020-05-06 16:40:39 +10:00
Age Manning
c363ffc236 Remove hashmap delay 2020-05-06 14:13:23 +10:00
Age Manning
040beb78f4 Merge latest master 2020-05-06 14:06:54 +10:00
Age Manning
4afcf721b9 Protect against timing underflows (#1111) 2020-05-06 13:55:18 +10:00
Raw Pong Ghmoa
fcccf63d29 beacon/eth1: degrade log to debug level (#1105) 2020-05-06 08:54:37 +10:00
Pawan Dhananjay
c444a47f3c Fix the fallback transport construction (#1102) 2020-05-05 19:35:37 +10:00
Age Manning
1ccf83b574 Network service additions 2020-05-04 18:34:01 +10:00
Age Manning
35838dbfbe Update RPC to master libp2p 2020-05-04 18:08:48 +10:00
Age Manning
a43381e3d5 RPC handler to stable futures 2020-05-04 17:35:41 +10:00
Age Manning
0d4ee680b5 Merge latest master 2020-05-04 15:43:49 +10:00
Pawan Dhananjay
36f213c092 Dns discovery (#1015)
* Add cli flag and parse dns address

* Fail if enr udp port isn't set

* Improve docs and address parsing

* address review comments

* Remove debug statements

* Add requires condition for enr-address

* Return address in error
2020-05-03 23:18:19 +10:00
divma
b4a1a2e483 Better handling of RPC errors and RPC conn with the PeerManager (#1047) 2020-05-03 23:17:12 +10:00
Age Manning
a4034e8ae3 Update behaviour 2020-05-01 23:05:49 +10:00
Age Manning
f3e707c3db Further progress towards porting eth2-libp2p adds caching to discovery 2020-05-01 22:53:33 +10:00
Age Manning
9e6ae448a6 Finished first round of fighting RPC types 2020-05-01 20:05:03 +10:00
Age Manning
08838fca23 Partial eth2-libp2p stable future upgrade 2020-04-30 23:09:48 +10:00
Age Manning
522d0e1201 Updated all crates in eth2-libp2p 2020-04-30 21:31:12 +10:00
Paul Hauner
b6c027b9ec Follow distance fix (#1082)
* Ensure eth1 follow distance is respected

* Add more info! logs for eth1

* Improve builder log

* Fix timestamp
2020-04-30 17:14:57 +10:00
Age Manning
e0723dfc3b Correctly notify delay queues (#1087) 2020-04-30 17:12:26 +10:00
pawanjay176
655e255f76 Merge branch 'upstream/stable-futures' into master-sf 2020-04-30 12:03:01 +05:30
pawanjay176
2390b013ac Merge branch 'master' into master-sf 2020-04-30 11:53:32 +05:30
Raw Pong Ghmoa
f4ac0422e2 beacon/notifier: display block information for current slot (#1084) 2020-04-30 16:20:54 +10:00
Paul Hauner
8bf0ef8d30 Add more detail to bad hardcoded dir warning (#1069) 2020-04-30 16:19:15 +10:00
Pawan Dhananjay
85baec87f5 Port websockets, timer and notifier to stable futures (#1035)
* Fix lcli

* Port timer to stable futures

* Fix timer

* Port websocket_server to stable futures

* Port notifier to stable futures

* Add TODOS

* Port remote_beacon_node to stable futures
2020-04-30 15:49:05 +10:00
realbigsean
dea01be00e Improve aggregate validator logic (#1020)
* track whether we have aggregate validator subscriptions to exact subnets, so we know whether or not to drop incoming attestations

* fix is aggregator check

* fix CI

Co-authored-by: Age Manning <Age@AgeManning.com>
2020-04-30 15:39:10 +10:00
Age Manning
78a08ec1e6 Remove padding from gossipsub ids (#1083) 2020-04-30 15:33:53 +10:00
pawanjay176
5fa6b8d5e3 protocol.rs compiles 2020-04-29 20:10:23 +05:30
Paul Hauner
7f2121205a Ensure genesis is not triggered too early (#1052) 2020-04-29 11:37:14 +10:00
pawanjay176
5ae53c9699 Non rpc stuff compiles 2020-04-28 20:30:29 +05:30
pawanjay176
47124ca404 Fix lcli merge conflicts 2020-04-28 18:26:17 +05:30
pawanjay176
19436d4ad7 Merge branch 'master' into master-sf 2020-04-28 18:19:33 +05:30
Justin
41208d79b1 Add missing TODO (#1079) 2020-04-28 21:58:21 +10:00
Kirk Baird
1abb54dabd Milagro BLS update (#985)
* Start updating types

* WIP

* Signature hacking

* Existing EF tests passing with fake_crypto

* Updates

* Delete outdated API spec

* The refactor continues

* It compiles

* WIP test fixes

* All release tests passing bar genesis state parsing

* Update and test YamlConfig

* Update to spec v0.10 compatible BLS

* Updates to BLS EF tests

* Add EF test for AggregateVerify

And delete unused hash2curve tests for uncompressed points

* Update EF tests to v0.10.1

* Use optional block root correctly in block proc

* Use genesis fork in deposit domain. All tests pass

* Cargo fmt

* Fast aggregate verify test

* Update REST API docs

* Cargo fmt

* Fix unused import

* Bump spec tags to v0.10.1

* Add `seconds_per_eth1_block` to chainspec

* Update to timestamp based eth1 voting scheme

* Return None from `get_votes_to_consider` if block cache is empty

* Handle overflows in `is_candidate_block`

* Revert to failing tests

* Fix eth1 data sets test

* Choose default vote according to spec

* Fix collect_valid_votes tests

* Fix `get_votes_to_consider` to choose all eligible blocks

* Uncomment winning_vote tests

* Add comments; remove unused code

* Reduce seconds_per_eth1_block for simulation

* Addressed review comments

* Add test for default vote case

* Fix logs

* Remove unused functions

* Meter default eth1 votes

* Fix comments

* Address review comments; remove unused dependency

* Add first attempt at attestation proc. re-write

* Add version 2 of attestation processing

* Minor fixes

* Add validator pubkey cache

* Make get_indexed_attestation take a committee

* Link signature processing into new attn verification

* First working version

* Ensure pubkey cache is updated

* Add more metrics, slight optimizations

* Clone committee cache during attestation processing

* Update shuffling cache during block processing

* Remove old commented-out code

* Fix shuffling cache insert bug

* Used indexed attestation in fork choice

* Restructure attn processing, add metrics

* Add more detailed metrics

* Tidy, fix failing tests

* Fix failing tests, tidy

* Disable/delete two outdated tests

* Add new Pubkeys struct to signature_sets

* Refactor with functional approach

* Update beacon chain

* Remove decompressed member from pubkey bytes

* Add hashmap for indices lookup

* Change `get_attesting_indices` to use Vec

* Fix failing test

* Tidy

* Add pubkey cache persistence file

* Add more comments

* Integrate persistence file into builder

* Add pubkey cache tests

* Add data_dir to beacon chain builder

* Remove Option in pubkey cache persistence file

* Ensure consistency between datadir/data_dir

* Fix failing network test

* Tidy

* Fix todos

* Improve tests

* Split up block processing metrics

* Tidy

* Refactor get_pubkey_from_state

* Remove commented-out code

* Add BeaconChain::validator_pubkey

* Update milagro_bls

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Cargo fmt

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Use Option::filter

* Remove Box

* Comment out tests that fail due to hard-coded

* Fix fake crypto

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Fix Cow::Borrowed

Signed-off-by: Kirk Baird <baird.k@outlook.com>

* Cargo fmt

Signed-off-by: Kirk Baird <baird.k@outlook.com>

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
Co-authored-by: Michael Sproul <micsproul@gmail.com>
Co-authored-by: pawan <pawandhananjay@gmail.com>
Co-authored-by: Paul Hauner <paul@paulhauner.com>
2020-04-28 13:15:46 +10:00
Age Manning
500f6b53d1 Testnet corrections (#1050)
* Correct RPC ping request

* Add attestation verification

* Add discv5 bug fixes

* Reduce gossipsub heartbeat and update metadata

* Handle known chain of advanced peer
2020-04-27 14:18:30 +10:00