Commit Graph

3205 Commits

Author SHA1 Message Date
Paul Hauner
bb93b08f7f Update readme dates 2020-01-28 11:44:31 +11:00
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
e1ebdf38e5 Add more ffg tests 2020-01-27 13:11:23 +11:00
Paul Hauner
8a61904d83 Add API endpoint for fork choice 2020-01-27 12:51:28 +11:00
Paul Hauner
cc11e52f78 Remove old reduced_tree code fragment 2020-01-27 12:02:48 +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
pscott
4a963423ca Make docs clearer regarding local vs public testnets (#823)
* Clear docs regarding local vs public testnets

* Rename private to local
2020-01-23 19:27:38 +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
Pawan Dhananjay
89f05e4a4f Adds simulator for syncing (#758)
* Add CLI for beacon_chain_sim

* Rename beacon-chain-sim to simulator

* Fix simulator workflow

* Push Cargo.lock

* WIP syncing simulator

* Add cli args

* Remove eth1 stuff and deposits

* Add syncing strategy simulations

* Successful one node sync

* Clean up

* Rename to avoid confusion

* add command line args

* fix cargo fmt issues

* Add additional syncing strategies

* Run all syncing strategies one after other; add comments

* Improve cli argument parsing

* Change `end_after_checks` default to true

* Small modifications to syncing-sim

* Add `strategy` cli argument

* Documented defaults in cli help

Co-authored-by: mkinney <mike.kinney@gmail.com>
Co-authored-by: Age Manning <Age@AgeManning.com>
2020-01-23 18:07:39 +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
f8cff3bd2e Optimize block production (#820)
* Remove SignatureVerif on block production; short-circuit fetching attestations when num attestations < T::MaxAttestation

* Cargo fmt

* Remove short-circuiting
2020-01-23 11:35:13 +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
Michael Sproul
4632e9ce52 Document the freezer DB space-time trade-off (#808) 2020-01-20 10:01:58 +11:00
Paul Hauner
6908b7cce0 Fix spec inconsistency in CheckpointManager 2020-01-20 08:56:45 +11:00
Pawan Dhananjay
82b55ea418 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 08:02:48 +11:00
Pawan Dhananjay
3ba221e388 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:54:19 +11:00
Pawan Dhananjay
cb13129cd6 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:53:55 +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
Tim Myers
a8da36b913 fix(dockerfile): Add ca-certificates so eth1 calls work in docker. (#796) 2020-01-20 07:49:59 +11:00
Paul Hauner
dcea0b5084 Rename on_new_block fn 2020-01-20 07:12:52 +11:00
Paul Hauner
eabc2edb5f Add block to fock choice before db 2020-01-19 22:09:17 +11:00
Paul Hauner
c546cab03f Ignore duplicate blocks in fork choice 2020-01-19 22:08:35 +11:00
Paul Hauner
10d37b26dc Fix compile error in fork choice tests 2020-01-17 16:17:39 +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
cf72a6cdcc Add metrics for log levels 2020-01-17 15:25:07 +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
f136d38543 Add more detail to best node error 2020-01-17 09:13:34 +11:00
Paul Hauner
9d295b7e95 Add fork choice JSON dumping 2020-01-17 09:10:42 +11:00
Paul Hauner
2df71372d2 Add more fork choice tests 2020-01-16 17:02:19 +11:00
Paul Hauner
2052bcbf8e Start adding ffg tests 2020-01-16 15:49:26 +11:00
Paul Hauner
62ea0661a7 Shuffle files 2020-01-16 15:14:46 +11:00
Paul Hauner
4a60c06afe Add binary, re-org crate 2020-01-16 13:55:33 +11:00
Paul Hauner
72dc6db9dd Move test defs into crate 2020-01-16 13:32:37 +11:00
Paul Hauner
c33d358cc9 Create test def concept 2020-01-16 13:29:40 +11:00