Commit Graph

34 Commits

Author SHA1 Message Date
Preston Van Loon
612bb38077 Cross p2p spans, more spans, synchronous attestations, minor fixes (#2009)
* Fix assignments bug where validators don't retry for assignments on failure

* synch only please

* trying to fix state issues

* trying random stuff

* do not explode

* use ctx

* working build, failing tests

* broadcast local addrs as well as relay addrs

* fixed p2p tests, more tests to fix still

* another test fixed, log warning instead of throw error

* Fix last tests

* godoc

* add test for broadcast in apply fork choiec

* remove unneeded code

* remove tracer adapter, not needed

* remove extra stuff

* remove any

* revert addr_factory

* revert addr_factory

* Revert "revert addr_factory"

This reverts commit e93fb706494a1070158b8db31e67146d6b0648ad.

* Revert "revert addr_factory"

This reverts commit dedaa405559cc818698870c4e4570953367f1e3c.

* revert removal of this code

* unused param
2019-03-17 10:56:05 +08:00
Preston Van Loon
2c1f29922e use floodsub (#1992) 2019-03-14 09:05:49 -07:00
Preston Van Loon
2e7b08f97e
p2p fixes / improvements (#1931)
* don't broadcast to yourself

* todo

* Also listen for incoming streams

* send to a specific peer

* add godoc comment

* handle EOF as a normal thing

* gazelle

* add test for subscribing via direct comm
2019-03-07 21:37:15 -05:00
Preston Van Loon
1f550a0da9
Handle nil protos (#1927)
* Handle hash nil pointers

* handle in hash beacon block

* add recovery when broadcasting p2p messages

* cmt

* gazelle
2019-03-07 11:32:01 -05:00
Preston Van Loon
eda03ff767
Recover from a panic in p2p (#1906)
* recover from a panic in p2p

* Add safely process function

* print proto message

* add status to the span, if available

* add status to the span, if available
2019-03-05 23:57:44 -05:00
Raul Jordan
1f11b821ab
Implement PoW Chain Deposit Trie in Go (#1285) 2019-01-11 16:29:30 +08:00
Kushagra Sharma
ef41dcfe3b Documented p2p.Server.Broadcast (#1166)
* Documented Server.Broadcast

* Fixed documentation formatting
2019-01-10 22:56:17 -05:00
Preston Van Loon
a901a154dc
Health check endpoints for services (#1183)
* /healthz part1

* lint, fix

* lints and todos

* add p2p status test

* Add test for service registry Statuses

* fix my fake errors for the linter

* Test healthz handler

* Run gazelle
2018-12-30 16:20:43 -05:00
Preston Van Loon
10f45744d6
Use gogo protobuf as the protoc compiler (#1165)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* change visibility

* use gogoprotobu
2018-12-23 15:34:59 -05:00
terence tsao
6fb3af04da
Implement Attestation Participants Helper Function (#1111) 2018-12-17 10:34:28 -08:00
Jonathan Gimeno
4f316d6ed0 Issue 1017 taken port (#1108)
* add git ignore to avoid intellij bazel plugin files.

* check if port for p2p is available

* add unit test for port taken
2018-12-17 16:57:22 +08:00
Preston Van Loon
c8ce74825e Bootstrap the DHT service (#973)
* Bootstrap the DHT service, add some tracing spans

* fix

* test fix

* dont ignore error
2018-11-26 10:18:43 -06:00
Preston Van Loon
8587c637a0 Added flag for p2p port (#968)
* Added flag for p2p port

* Register flag with main

* lint

* Fix flag
2018-11-26 10:54:02 +08:00
Preston Van Loon
0559d01261
Add support for connecting via relay nodes (#827)
* Preliminary support for relay nodes

* lint

* Add comment, remove TODO

* work on relay address factory

* dial relay node, if available

* forgot new files

* fix service registry breakage

* added logging

* Added a peer count with prometheus

* always start mDNS

* fix lint
2018-11-25 11:55:02 -05:00
Nishant Das
16b04699d0 Allow Initial Sync to Work with Simulator (#669)
* polling interval

* adding proto message

* changing proto messages

* changing naming

* adding slot functionality

* initial sync working

* new changes

* more sync fixes

* its working now

* finally working

* add tests

* fix tests

* tests

* adding tests

* lint

* log checks

* making changes to simulator

* update logs

* fix tests

* get sync to work with crystallized state

* fixing race

* making requested changes

* unexport

* documentation

* gazelle and fix merge conflicts

* adding repeated requests

* fix lint

* adding new clock , db methods, and util func

* revert change to test

* gazelle

* add in test

* gazelle

* finally working

* save slot

* fix lint and constant
2018-11-21 10:00:36 -08:00
Leandro Lugaresi
d061c784e0 Added Prometheus Client and p2p Metrics (#673)
* Added prometheus client and p2p metrics

* Avoid run the adapter if the metrics are disabled

* fix visibility issue

* Fix invalid p2p.Message sent to Adapters

The middlewares (adapters) must receive the complete message to avoid
problems and the main Handler must get the values from middlewares

Also, added tests and comments for metrics package

* Added logrus hook collector

This collector is used to collect counters of log messages.
The main purpose of these metric is to know how many warnings and errors
the system are getting.

* Add hook when register the prometheus service

* update bazel builds

* fix emit tests and remove unused imports

* gazelle --fix

* remove unused logger

* move prometheus package to shared directory

* better metric names and fix metric paths

* improve metric tests and start to use promauto

* added prometheus initial documentation

* fix tests

* fix type differences with go get and bazel

* Fix service test
2018-11-15 07:54:45 -05:00
terence tsao
e1137e5801 Allow Beacon Node to Connect to Bootstrap Node for Peer Discovery (#740)
* start sequence for node to connect to bootstrap nodes

* lint

* maybe warning is more appropiate?

* fix gazelle

* preston's feedback

* add go-ipfs-addr to workspace

* move flag to shared

* removed routed host
2018-11-14 21:25:06 -05:00
Nishant Das
37bc1c67be
Adding Basic Private Key Management (#671)
* adding flags

* adding modified key utils

* adding more funcs

* more changes

* more changes

* documentation

* changes to node

* gazelle

* fixing bazel build

* gazelle

* adding tests

* more tests

* addressing terence's feedback

* adding geth header

* test

* changes

* fixedd it

* fixed marshalling

* adding more to tests

* gazelle

* adding more tests

* lint

* add cov

* cov

* fix imports
2018-11-08 11:22:31 +08:00
Preston Van Loon
e330249e49
Enable DHT support for p2p peer discovery (#730) 2018-11-06 20:52:36 -05:00
Preston Van Loon
3118947271
Update libp2p deps (#717)
* Revert "Fix LibP2P Global Proto Bug on Travis (#690)"

This reverts commit 7300204176.

* update libp2p deps

* goimports
2018-11-03 12:59:39 -04:00
Nishant Das
c67a084b55 Clean Up Todos and Add in Issue Checker (#640) 2018-10-11 13:52:09 -05:00
Preston Van Loon
8bcddf5fdc
Migrate dependencies on @com_github_ethereum_go_ethereum//event (#601)
* Add go-ethereum's event and

* remove swp file

* goimports

* remove unused code

* fix gazelle
2018-10-02 21:49:01 -04:00
Divyank Katira
2a51ed3f39 P2P Message Execution Tracing (#517)
* Request execution tracing initial commit

* Resolve linter issues

* Run gazelle

* Make trace sampling configurable, clean up, update doc

* Document trace span creation

* Fix linter issue
2018-09-20 07:46:35 -04:00
Preston Van Loon
3c264be1c1
Clean up some p2p related TODOs (#521)
* Remove error checking for type assertions on p2p messages. The code should fail earlier in the p2p layer. Also fixed format on some TODOs

* format TODO again

* Add a bit more tests for p2p stuff

* goimports on feed_mock

* remove unused import
2018-09-16 14:02:53 -04:00
Preston Van Loon
db1138ae1f
Fix p2p issues in #465 (#489) 2018-09-09 18:15:24 -04:00
Preston Van Loon
b02042dbe9 shared: Split P2P Topics And Introduce Middleware (Adapters) (#421) 2018-08-29 11:32:54 -05:00
Ivan Martinez
390ac62ed8 Update docs client/beacon-chain wide (#386) 2018-08-09 11:25:48 -07:00
Raul Jordan
13a011ce5f
proto: Structure Protos for Beacon and for Sharding (#359) 2018-07-31 13:54:45 -05:00
Raul Jordan
cccd675a84
beacon: Initial Sync Network Simulator (#341) 2018-07-30 23:41:27 -05:00
Preston Van Loon
9cf375267e Add Security Linter: gosec (#343) 2018-07-28 20:44:24 -04:00
Raul Jordan
9ab02849b6
beacon: Initial Beacon P2P Protobufs, Subscriptions (#327) 2018-07-28 15:53:02 -04:00
Yutaro Mori
8d858aad9b Add Feed Subscribe() Convenience Method (#333) 2018-07-26 07:16:31 -07:00
Federico Gimenez
b8fe4228af Add Mutex on Top of p2p Feeds Map (#321)
* add mutex on top of p2p feeds map

* lock read too

* add concurrent write test and enable race detector

* restrict race detection to concurrent feed map write test

* gazelle fix

* increase ram and I/O in bazel's local_resources

* reverted local_resources changes

* address review comments

* do not disable sandboxing on travis

* address review comments
2018-07-26 00:11:15 +08:00
Preston Van Loon
d33836b48e shared: Move p2p Library to Shared (#317) 2018-07-24 10:21:58 -05:00