Commit Graph

120 Commits

Author SHA1 Message Date
Paul Hauner
177df12149 Testnet stability (#451)
* Change reduced tree for adding weightless node

* Add more comments for reduced tree fork choice

* Small refactor on reduced tree for readability

* Move test_harness forking logic into itself

* Add new `AncestorIter` trait to store

* Add unfinished tests to fork choice

* Make `beacon_state.genesis_block_root` public

* Add failing lmd_ghost fork choice tests

* Extend fork_choice tests, create failing test

* Implement Debug for generic ReducedTree

* Add lazy_static to fork choice tests

* Add verify_integrity fn to reduced tree

* Fix bugs in reduced tree

* Ensure all reduced tree tests verify integrity

* Slightly alter reduce tree test params

* Add (failing) reduced tree test

* Fix bug in fork choice

Iter ancestors was not working well with skip slots

* Put maximum depth for common ancestor search

Ensures that we don't search back past the finalized root.

* Add basic finalization tests for reduced tree

* Change fork choice to use beacon_block_root

Previously it was using target_root, which was wrong

* Change reduced tree for adding weightless node

* Add more comments for reduced tree fork choice

* Small refactor on reduced tree for readability

* Move test_harness forking logic into itself

* Add new `AncestorIter` trait to store

* Add unfinished tests to fork choice

* Make `beacon_state.genesis_block_root` public

* Add failing lmd_ghost fork choice tests

* Extend fork_choice tests, create failing test

* Implement Debug for generic ReducedTree

* Add lazy_static to fork choice tests

* Add verify_integrity fn to reduced tree

* Fix bugs in reduced tree

* Ensure all reduced tree tests verify integrity

* Slightly alter reduce tree test params

* Add (failing) reduced tree test

* Fix bug in fork choice

Iter ancestors was not working well with skip slots

* Put maximum depth for common ancestor search

Ensures that we don't search back past the finalized root.

* Add basic finalization tests for reduced tree

* Add network dir CLI flag

* Simplify "NewSlot" log message

* Rename network-dir CLI flag

* Change fork choice to use beacon_block_root

Previously it was using target_root, which was wrong

* Update db dir size for metrics

* Change slog to use `FullFormat` logging

* Update some comments and log formatting

* Add prom gauge for best block root

* Only add known target blocks to fork choice

* Add finalized and justified root prom metrics

* Add CLI flag for setting log level

* Add logger to beacon chain

* Add debug-level CLI flag to validator

* Allow block processing if fork choice fails

* Create warn log when there's low libp2p peer count

* Minor change to logging

* Make ancestor iter return option

* Disable fork choice test when !debug_assertions

* Fix type, removed code fragment

* Tidy some borrow-checker evading

* Lower reduced tree random test iterations
2019-07-29 13:45:45 +10:00
John Adler
fec7168512 Fix lots of typos. 2019-07-26 15:26:06 -04:00
Age Manning
89ff7fb6b8 Complete initial testing of new RPC 2019-07-23 22:45:42 +10:00
Age Manning
b350a78fec Update RPC. WIP 2019-07-22 14:13:18 +10:00
Age Manning
b2a1b20e24 Merge latest master 2019-07-16 23:26:31 +10:00
Age Manning
414d41cb57 Shift changes into message handler and simple sync for rpc-rewrite 2019-07-16 22:32:37 +10:00
Kirk Baird
0513559252 Fix syncing bugs by recursively attempting to process parents in the … (#429)
* Fix syncing bugs by recursively attempting to process parents in the import queue, change BlockRootsIterator

* Swap from crossbeam channel to tokio mpsc

* Recursion fix

* Remove exess block processing

* Fix network lag, correct attestation topic

* Correct network poll logic

* Overhaul of SimpleSync and modify BlockRootsIterator to return start_slot

* Fix bug in tests relating to StateRootsIterator

* Remove old, commented-out heartbeat code.

* Tidy docs on import queue enum

* Change source logging msg in simple sync

* Rename function parameter in simple sync

* Use `BestBlockRootsIterator` in `reduced_tree`

* Update comments for `BestBlockRootsIterator`

* Fix duplicate dep in cargo.toml
2019-07-16 17:28:15 +10:00
Age Manning
6ee2b4df34 Complete merging of network addition branch 2019-07-04 14:14:26 +10:00
Age Manning
2d710f19fc Update to latest libp2p 2019-07-04 14:08:48 +10:00
Age Manning
a31d6bcb22 RPC methods get pubsub topics from chain spec 2019-07-04 14:07:26 +10:00
Paul Hauner
2a7122beaf Partially refactor simple_sync, makes improvement 2019-06-27 18:05:03 +10:00
Age Manning
84ea5adffe Complete merging of network addition branch 2019-06-25 18:02:50 +10:00
Age Manning
cf459b60a9 Updates for latest master 2019-06-25 18:02:50 +10:00
Age Manning
7ad9805f02 Update to latest libp2p 2019-06-25 18:02:49 +10:00
Age Manning
f54bd79f84 RPC methods get pubsub topics from chain spec 2019-06-25 18:02:48 +10:00
Paul Hauner
906580be15 Attempt to catch edge case in syncing 2019-06-25 16:05:26 +10:00
Paul Hauner
075c989375 Remove old fork_choice crate 2019-06-24 09:34:56 +10:00
Paul Hauner
55818e285a Refactor block prod. to produce for forks 2019-06-24 09:34:53 +10:00
Paul Hauner
4c0724fba6 Refactor block processing results, some sync logic 2019-06-12 23:54:16 -04:00
Paul Hauner
e74d49fc8a Remove dupe info between ChainSpec and EthSpec 2019-06-08 07:57:25 -04:00
Paul Hauner
719dd72de6 Fix recently introduced sync bugs 2019-06-07 02:55:16 -04:00
Paul Hauner
af96dd08c8 Simplify simple_sync code 2019-06-06 00:32:09 -04:00
Paul Hauner
2f9f8bf772 Tidy BeaconChain; del spec, unify head updates 2019-05-31 17:32:20 +10:00
Paul Hauner
0590504261 Remove BeaconChain wrapper trait from network 2019-05-30 18:27:19 +10:00
Paul Hauner
ee8d13573f Create BeaconChainTypes, thread through runtime 2019-05-26 15:59:29 +10:00
Paul Hauner
fcabef91da Use E for EthSpec trait, instead of B 2019-05-13 14:44:43 +10:00
Paul Hauner
ce8ebeccbc Rename BeaconStateTypes to EthSpec 2019-05-10 14:47:09 +10:00
Paul Hauner
42b7aa89d4 Update network and rpc to BeaconStateTypes 2019-05-08 19:38:18 +10:00
Paul Hauner
b8c4c3308a Update types to new tree_hash crate 2019-04-16 14:14:38 +10:00
Paul Hauner
1913be0c6f Fix clippy lints 2019-04-03 16:23:09 +11:00
Paul Hauner
5e80b90301 Extend queue stale time, queue more blocks 2019-04-01 15:51:48 +11:00
Paul Hauner
a7df4f1800 Add log when block not processed in queue 2019-04-01 15:38:22 +11:00
Paul Hauner
a3ca3ec50d Break block proc. loop if we get a bad block 2019-04-01 15:32:04 +11:00
Paul Hauner
111c81f428 Add ParentUnknown block processing to SimpleSync 2019-04-01 15:23:38 +11:00
Paul Hauner
a93f898946 Improve gossipsub block processing 2019-03-31 17:27:04 +11:00
Paul Hauner
2c1fa86cd3 Swap to gossiping whole block.
Processing for gossiped blocks is broken in `SimpleSync`, will be fixed
next.
2019-03-31 12:28:35 +11:00
Paul Hauner
c99a742aae Fix bug in SimpleSync queue.
It was not completing partials with bodies.
2019-03-31 10:15:42 +11:00
Paul Hauner
d2b5cf5a32 Improve queueing in SimpleSync 2019-03-31 09:44:58 +11:00
Paul Hauner
935c64deef Adds attestation validation to SimpleSync 2019-03-30 19:11:52 +11:00
Paul Hauner
12936e73a7 Set gossip logs to info 2019-03-27 12:57:05 +11:00
Age Manning
f7131c2f87 Fix compile issues and modify type names 2019-03-25 23:39:39 +11:00
Paul Hauner
098e63ac32 Move gossip structs into behaviour 2019-03-25 18:59:50 +11:00
Paul Hauner
32a025bdf7 Introduced RequestId newtype 2019-03-25 16:48:44 +11:00
Paul Hauner
ebb9ced0a4 Improve peer status handling 2019-03-25 15:30:46 +11:00
Paul Hauner
708d9b5674 Add basic Gossip sync handlers 2019-03-25 14:27:20 +11:00
Paul Hauner
267477ffc2 Fix typo from previous commit 2019-03-24 18:37:23 +11:00
Paul Hauner
755a09d164 Move ImportQueue into own file 2019-03-24 18:34:44 +11:00
Paul Hauner
ee07efb9e9 Add comments to SimpleSync 2019-03-24 18:31:03 +11:00
Paul Hauner
796b68dc04 Implement Goodbye and BeaconState msg handlers 2019-03-24 17:51:32 +11:00
Paul Hauner
3dc5595a6f Fix last errors stopping full chain sync 2019-03-24 16:35:07 +11:00