Commit Graph

33 Commits

Author SHA1 Message Date
Paul Hauner
7d11d78299 Abandon starting the node if libp2p doesn't start 2019-08-23 12:43:34 +10:00
Paul Hauner
b912e26b79 Tidy API to be more consistent with recent decisions 2019-08-22 14:37:47 +10:00
Paul Hauner
bb166a2599 Fix rustc warnings 2019-08-14 18:58:01 +10:00
Paul Hauner
c93d2baa91 Add network routes to API 2019-08-14 18:24:42 +10:00
Age Manning
468015f9bb Initial Interop Updates (#492)
* Add interop chain spec and rename chain_id

* Add ability to connect to raw libp2p nodes

* Adds Identify protocol, clean up RPC protocol name handling

* Update to latest libp2p, gossipsub improvements

* Updates to latest interop branch.

- Shifts decoding of objects into message handler.
- Updates to latest interop gossipsub.
- Adds interop spec constant.

* Configuration updates allow for verbosity CLI flag and spec constants

* Update submodules to master

* Correct minimal chainspec modifications

* Duplication of validator polls are no longer fatal

* Apply PR suggestions
2019-08-10 11:44:17 +10:00
Michael Sproul
a236003a7b Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8

* state_processing: epoch processing v0.8.0

* state_processing: block processing v0.8.0

* tree_hash_derive: support generics in SignedRoot

* types v0.8: update to use ssz_types

* state_processing v0.8: use ssz_types

* ssz_types: add bitwise methods and from_elem

* types: fix v0.8 FIXMEs

* ssz_types: add bitfield shift_up

* ssz_types: iterators and DerefMut for VariableList

* types,state_processing: use VariableList

* ssz_types: fix BitVector Decode impl

Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!

* types: fix test modules for v0.8 update

* types: remove slow type-level arithmetic

* state_processing: fix tests for v0.8

* op_pool: update for v0.8

* ssz_types: Bitfield difference length-independent

Allow computing the difference of two bitfields of different lengths.

* Implement compact committee support

* epoch_processing: committee & active index roots

* state_processing: genesis state builder v0.8

* state_processing: implement v0.8.1

* Further improve tree_hash

* Strip examples, tests from cached_tree_hash

* Update TreeHash, un-impl CachedTreeHash

* Update bitfield TreeHash, un-impl CachedTreeHash

* Update FixedLenVec TreeHash, unimpl CachedTreeHash

* Update update tree_hash_derive for new TreeHash

* Fix TreeHash, un-impl CachedTreeHash for ssz_types

* Remove fixed_len_vec, ssz benches

SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)

* Remove boolean_bitfield crate

* Fix fake_crypto BLS compile errors

* Update ef_tests for new v.8 type params

* Update ef_tests submodule to v0.8.1 tag

* Make fixes to support parsing ssz ef_tests

* `compact_committee...` to `compact_committees...`

* Derive more traits for `CompactCommittee`

* Flip bitfield byte-endianness

* Fix tree_hash for bitfields

* Modify CLI output for ef_tests

* Bump ssz crate version

* Update ssz_types doc comment

* Del cached tree hash tests from ssz_static tests

* Tidy SSZ dependencies

* Rename ssz_types crate to eth2_ssz_types

* validator_client: update for v0.8

* ssz_types: update union/difference for bit order swap

* beacon_node: update for v0.8, EthSpec

* types: disable cached tree hash, update min spec

* state_processing: fix slot bug in committee update

* tests: temporarily disable fork choice harness test

See #447

* committee cache: prevent out-of-bounds access

In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.

* fix bug in get_indexed_attestation and simplify

There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.

* state_proc: workaround for compact committees bug

https://github.com/ethereum/eth2.0-specs/issues/1315

* v0.8: updates to make the EF tests pass

* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
  verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
  the spec.

* rustfmt

* ef_tests: add new epoch processing tests

* Integrate v0.8 into master (compiles)

* Remove unused crates, fix clippy lints

* Replace v0.6.3 tags w/ v0.8.1

* Remove old comment

* Ensure lmd ghost tests only run in release

* Update readme
2019-07-30 12:44:51 +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
af28d5e20c Add persistent network identification 2019-07-04 14:14:27 +10:00
Age Manning
0952a36a21 Initial integration of discovery v5 2019-07-04 14:14:27 +10:00
Age Manning
44c9058477 Integrate discv5 into lighthouse 2019-07-04 14:14:27 +10:00
Age Manning
43135484ca Update to lastest libp2p 2019-07-04 14:13:43 +10:00
Age Manning
7920f8098f Complete moving network logc into beacon node 2019-07-04 14:07:26 +10:00
Age Manning
64abd0bc5b Removes network parameters from chain spec 2019-07-04 14:07:26 +10:00
Age Manning
5521c53d36 Add persistent network identification 2019-07-01 16:38:42 +10:00
Age Manning
a64a6c7d3a Initial integration of discovery v5 2019-06-25 18:02:50 +10:00
Age Manning
81f0b6c238 Integrate discv5 into lighthouse 2019-06-25 18:02:50 +10:00
Age Manning
fc8dc6dfa7 Update to lastest libp2p 2019-06-25 18:02:50 +10:00
Age Manning
c1d609902a Complete moving network logc into beacon node 2019-06-25 18:02:49 +10:00
Age Manning
dd3a4f0b43 Removes network parameters from chain spec 2019-06-25 18:02:49 +10:00
Paul Hauner
059699736b Return errors instead of panic in libp2p 2019-06-10 21:37:41 -04:00
Paul Hauner
e73a31c37f Refactor ClientConfig, add serde to it 2019-06-07 19:44:27 -04:00
Paul Hauner
1913be0c6f Fix clippy lints 2019-04-03 16:23:09 +11:00
Paul Hauner
c596e3f7d7 Change log levels of gossipsub events 2019-03-31 17:26:28 +11:00
Age Manning
6955330f6c Merge branch 'libp2p-patch' 2019-03-26 15:14:29 +11:00
Age Manning
5b40152873 Update to latest libp2p and gossipsub 2019-03-26 15:01:05 +11:00
Age Manning
52b31b2009 Implement initial pubsub message handling 2019-03-25 23:02:51 +11:00
Age Manning
13ac5b1d25 Tidy network poll and implement Identify 2019-03-21 13:15:14 +11:00
Age Manning
35815ce786 Cleans up swarm poll and adds identify behaviour 2019-03-21 12:57:41 +11:00
Age Manning
67a3dfe052 Remove node private key from config 2019-03-21 12:45:23 +11:00
Age Manning
7ec37939c8 Adds Identify protocol and cleans up network config 2019-03-21 12:41:05 +11:00
Age Manning
e080f63811 Rename libp2p to eth2-libp2p 2019-03-20 15:09:24 +11:00