Commit Graph

1039 Commits

Author SHA1 Message Date
Paul Hauner
ed59327feb Add check to ensure parent block is in fork choice 2020-01-28 11:34:29 +11:00
Paul Hauner
43b0a63c73 Remove old debugging code, fix API fault 2020-01-27 13:45:51 +11:00
Paul Hauner
4da401fd39 Ensure effective balances are used 2020-01-27 13:30:37 +11:00
Paul Hauner
7b7982f6a7 Remove block_root_tree reminents 2020-01-27 13:18:03 +11:00
Paul Hauner
8a61904d83 Add API endpoint for fork choice 2020-01-27 12:51:28 +11:00
Paul Hauner
aa0e9a460e Merge branch 'master' into proto-array 2020-01-24 17:00:32 +11:00
Paul Hauner
3a1e999c5d Merge branch 'proto-array' of github.com:sigp/lighthouse into proto-array 2020-01-24 16:30:35 +11:00
pscott
d98c00389a Fix typo in test name; fix clippy warning (#826) 2020-01-23 19:28:23 +11:00
Age Manning
81b028b805 Advanced error handling for syncing (#819)
* Initial block processing thread design

* Correct compilation issues

* Increase logging and request from all given peers

* Patch peer request bug

* Adds fork choice to block processing

* Adds logging for bug isolation

* Patch syncing for chains with skip-slots

* Bump block processing error logs

* Improve logging for attestation processing

* Randomize peer selection during sync

* Resuming chains restarts from local finalized slot

* Downgrades Arc batches to Rc batches

* Add clippy fixes

* Add advanced error handling for invalid/malicious batches

* Downgrade Rc<Batch> to Option<Batch> to pass processed batches to chains

* Squash edge case rpc and syncing bugs

* Process empty batches which could end chains

* Removes last_processed_id concept to account for ending skip-slot batches

* Add logging for chain purges

* Adds retries to re-request batch logging

* Remove bug finding log

* Add reviewers suggestions

* Revert to master modifications

* Line wrapping

* Revert to master
2020-01-23 19:25:13 +11:00
Pawan Dhananjay
23a35c3767 Persist/load DHT on shutdown/startup (#659)
* Store dht enrs on shutdown

* Load enrs on startup and add tests

* Remove enr_entries from behavior

* Move all dht persisting logic to `NetworkService`

* Move `PersistedDht` from eth2-libp2p to network crate

* Add test to confirm dht persistence

* Add logging

* Remove extra call to beacon_chain persist

* Expose only mutable `add_enr` method from behaviour

* Fix tests

* Fix merge errors
2020-01-23 18:16:11 +11:00
Age Manning
8c96739cab Correct discovery address CLI functionality (#818)
* Improve handling of discovery IP address CLI config

* Remove excess debug logging

* Add reviewers suggestions
2020-01-23 17:31:08 +11:00
Age Manning
fdb6e28f94 Super/Silky smooth syncs (#816)
* Initial block processing thread design

* Correct compilation issues

* Increase logging and request from all given peers

* Patch peer request bug

* Adds fork choice to block processing

* Adds logging for bug isolation

* Patch syncing for chains with skip-slots

* Bump block processing error logs

* Improve logging for attestation processing

* Randomize peer selection during sync

* Resuming chains restarts from local finalized slot

* Downgrades Arc batches to Rc batches

* Add clippy fixes

* Downgrade Rc<Batch> to Option<Batch> to pass processed batches to chains

* Add reviewers suggestions
2020-01-23 17:30:49 +11:00
pscott
7396cd2cab Fix clippy warnings (#813)
* Clippy account manager

* Clippy account_manager

* Clippy beacon_node/beacon_chain

* Clippy beacon_node/client

* Clippy beacon_node/eth1

* Clippy beacon_node/eth2-libp2p

* Clippy beacon_node/genesis

* Clippy beacon_node/network

* Clippy beacon_node/rest_api

* Clippy beacon_node/src

* Clippy beacon_node/store

* Clippy eth2/lmd_ghost

* Clippy eth2/operation_pool

* Clippy eth2/state_processing

* Clippy eth2/types

* Clippy eth2/utils/bls

* Clippy eth2/utils/cahced_tree_hash

* Clippy eth2/utils/deposit_contract

* Clippy eth2/utils/eth2_interop_keypairs

* Clippy eth2/utils/eth2_testnet_config

* Clippy eth2/utils/lighthouse_metrics

* Clippy eth2/utils/ssz

* Clippy eth2/utils/ssz_types

* Clippy eth2/utils/tree_hash_derive

* Clippy lcli

* Clippy tests/beacon_chain_sim

* Clippy validator_client

* Cargo fmt
2020-01-21 18:38:56 +11:00
Paul Hauner
c3969e2ce5 Remove BlockRootTree 2020-01-21 14:26:04 +11:00
pscott
1abb964652 Update op_pool to use proper rewards (#707)
* Update op_pool to use proper rewards

* Fix missing use import for tests

* Address Michael's comments

* Revert to private ValidatorStatuses

* Rename variable for clearer code

* Fix update_cover function

* Remove expect

* Add WIP test for rewards

* Use aggregation_bits instead of earliest_attestation_validators

* Use earliest attestation in test and correct typo

* Fix op_pool test thanks to @michaelsproul 's help

* Change test name
2020-01-20 10:33:28 +11:00
Paul Hauner
6908b7cce0 Fix spec inconsistency in CheckpointManager 2020-01-20 08:56:45 +11:00
Pawan Dhananjay
661ef65de8 Persist eth1 cache (#760)
* Add intermediate structures for bytes conversion

* Expose byte conversion methods from `Eth1Service`

* Add eth1 ssz containers

* Fix type errors

* Load eth1 cache on restart

* Fix compile errors

* Update Cargo.lock

* Add comments and minor formatting

* Add test for eth1 cache persistence

* Restrict Deposit and Block cache field visibility

* Add checks

* Fix `SszDepositCache` check

* Implement Encode/Decode directly on `BlockCache`
2020-01-20 07:52:58 +11:00
Paul Hauner
eabc2edb5f Add block to fock choice before db 2020-01-19 22:09:17 +11:00
Paul Hauner
268dd064bd Merge branch 'sync-bug-finder' into proto-array 2020-01-17 16:12:42 +11:00
Paul Hauner
71947641a6 Fix bug in checkpoint manager 2020-01-17 16:12:22 +11:00
Paul Hauner
fd0a1c44aa Add cache metrics 2020-01-17 14:59:42 +11:00
Paul Hauner
52dfb61de0 Fix justified balances bug 2020-01-17 14:53:06 +11:00
Age Manning
0cd7ae56a6 Add targetted logging for sneaky sync bug 2020-01-17 13:12:00 +11:00
Paul Hauner
cd5c8a3d9f Tidy 2020-01-17 13:01:06 +11:00
Paul Hauner
b55687cf9d Move checkpoint manager into own file 2020-01-17 13:00:25 +11:00
Paul Hauner
991223db1e Rename JustificationManager 2020-01-17 12:48:29 +11:00
Paul Hauner
272c16c2f2 Ensure fin+just checkpoints from from same block 2020-01-17 11:40:21 +11:00
Paul Hauner
9d295b7e95 Add fork choice JSON dumping 2020-01-17 09:10:42 +11:00
Paul Hauner
2366c9ae48 Fix bug with epoch of attestation votes 2020-01-16 09:10:53 +11:00
Paul Hauner
ea19227eac Merge branch 'master' into proto-array 2020-01-15 17:25:32 +11:00
Paul Hauner
76d7122b28 Add extra justification change check 2020-01-15 17:15:43 +11:00
Paul Hauner
fbfe77b307 Fix test compile errors 2020-01-15 16:24:59 +11:00
Paul Hauner
61c8781554 Adjust TODO 2020-01-15 16:02:58 +11:00
Age Manning
13e74e5352 Correct stream timeout delay queue handling (#803)
* Correct stream timeout delay queue handling

* Correct small typo
2020-01-15 15:50:01 +11:00
Paul Hauner
cba0d9a48c Attempt to fix prune error 2020-01-15 15:43:50 +11:00
Age Manning
c184a98170 Sync fixes (#801)
* Randomize peer selection for batch errors

* Downgrade attestation logging

* Handle range sync errors

* Update lock file

* Downgrade logs

* Decrease batch size for better thread handling

* Optimise peer selection in range sync
2020-01-15 14:48:09 +11:00
Paul Hauner
486c74f6e9 Merge branch 'master' into proto-array + more changes 2020-01-15 07:46:07 +11:00
Paul Hauner
b8d33ae26b Integrate proto_array into lighthouse 2020-01-14 17:05:59 +11:00
Paul Hauner
271fdd4fb9 Bumb version tags (#792) 2020-01-10 16:01:37 +11:00
Paul Hauner
55a6dc9ae3 Notifier errors (#793)
* Handle notifier errors

* Log error for notifier errors
2020-01-10 16:01:22 +11:00
Michael Sproul
5a8f2dd961 Increase default slots per restore point to 2048 (#790)
This should reduce disk usage by 32x while keeping historical state queries to
less than 10s. If historical states are required quickly, the minimum SPRP of 32
can be set on the CLI.
2020-01-10 14:42:49 +11:00
Age Manning
b3712d8e9b Discv5 upgrade (#788)
* Update discv5 to delay queues for timeouts

* Further discv5 bug fixes
2020-01-10 14:35:07 +11:00
Paul Hauner
698af6d7ec Update docs for testnet3 (#773)
* Start docker docs

* Add progress

* Update docker.md

* Add note about geth syncing

* Fix env to use geth

* Update docs

* Remove sigp goerli node

* Change text about eth1 syncing

* Address comments from @pscott

* Add links to beaconcha.in

* Add instructions for starting an eth1 node

* Fix typo

* Re-organise Syncing log
2020-01-10 13:56:48 +11:00
Age Manning
1aaeb6b505 Upgrades trace logging for Sync RPC method (#784) 2020-01-10 02:01:03 +11:00
Michael Sproul
95fc840e2c Fix off-by-one error in get_latest_restore_point (#787)
* Fix off-by-one error in get_latest_restore_point

* Tighten SPRP checks for succinct hot DB change
2020-01-09 21:05:56 +11:00
Michael Sproul
d9e9c17d3b Avoid building caches during block replay (#783)
Also, make the ExitCache safe.
2020-01-09 11:43:11 +11:00
Paul Hauner
da95a73605 Fix typo in eth1 service (#782) 2020-01-09 10:53:25 +11:00
Age Manning
30f51df4cf Improved RPC timeout handling (#770)
* Handle slow app level responses for RPC

* Correct errors

* Terminates stream on error
2020-01-08 14:18:06 +11:00
Michael Sproul
f36a5a15d6 Store states efficiently in the hot database (#746)
* Sparse hot DB and block root tree

* Fix store_tests

* Ensure loads of hot states on boundaries are fast

* Milder error for unaligned finalized blocks
2020-01-08 13:58:01 +11:00
Paul Hauner
26dde26c48 Use Cow for checkpoint cache (#775) 2020-01-08 11:09:27 +11:00