prysm-pulse/shared/p2p/BUILD.bazel
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

103 lines
4.1 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = [
"addr_factory.go",
"dial_relay_node.go",
"discovery.go",
"feed.go",
"interfaces.go",
"message.go",
"monitoring.go",
"options.go",
"p2p.go",
"service.go",
],
importpath = "github.com/prysmaticlabs/prysm/shared/p2p",
visibility = ["//visibility:public"],
deps = [
"//proto/beacon/p2p/v1:go_default_library",
"//shared/event:go_default_library",
"//shared/iputils:go_default_library",
"@com_github_gogo_protobuf//io:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
"@com_github_ipfs_go_datastore//:go_default_library",
"@com_github_ipfs_go_datastore//sync:go_default_library",
"@com_github_ipfs_go_ipfs_addr//:go_default_library",
"@com_github_libp2p_go_libp2p//:go_default_library",
"@com_github_libp2p_go_libp2p//config:go_default_library",
"@com_github_libp2p_go_libp2p//p2p/discovery:go_default_library",
"@com_github_libp2p_go_libp2p//p2p/host/routed:go_default_library",
"@com_github_libp2p_go_libp2p_host//:go_default_library",
"@com_github_libp2p_go_libp2p_kad_dht//:go_default_library",
"@com_github_libp2p_go_libp2p_net//:go_default_library",
"@com_github_libp2p_go_libp2p_peer//:go_default_library",
"@com_github_libp2p_go_libp2p_peerstore//:go_default_library",
"@com_github_libp2p_go_libp2p_protocol//:go_default_library",
"@com_github_libp2p_go_libp2p_pubsub//:go_default_library",
"@com_github_multiformats_go_multiaddr//:go_default_library",
"@com_github_prometheus_client_golang//prometheus:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@io_opencensus_go//trace:go_default_library",
"@io_opencensus_go//trace/propagation:go_default_library",
],
)
go_test(
name = "go_default_test",
srcs = [
"addr_factory_test.go",
"dial_relay_node_test.go",
"feed_example_test.go",
"feed_test.go",
"message_test.go",
"options_test.go",
"register_topic_example_test.go",
"service_test.go",
],
embed = [":go_default_library"],
tags = ["block-network"],
deps = [
"//proto/beacon/p2p/v1:go_default_library",
"//proto/sharding/p2p/v1:go_default_library",
"//proto/testing:go_default_library",
"//shared:go_default_library",
"//shared/p2p/mock:go_default_library",
"//shared/testutil:go_default_library",
"@com_github_gogo_protobuf//io:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_libp2p_go_libp2p_blankhost//:go_default_library",
"@com_github_libp2p_go_libp2p_peerstore//:go_default_library",
"@com_github_libp2p_go_libp2p_protocol//:go_default_library",
"@com_github_libp2p_go_libp2p_pubsub//:go_default_library",
"@com_github_libp2p_go_libp2p_swarm//testing:go_default_library",
"@com_github_multiformats_go_multiaddr//:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_sirupsen_logrus//hooks/test:go_default_library",
],
)
# by default gazelle tries to add all the test files to the first
# go_test; we need to exclude the tests that we want to configure
# in a particular way
# gazelle:exclude discovery_norace_test.go
# gazelle:exclude service_norace_test.go
go_test(
name = "go_norace_test",
srcs = [
"discovery_norace_test.go",
"service_norace_test.go",
],
embed = [":go_default_library"],
race = "off", # TODO(#377): fix issues with race detection testing.
tags = ["requires-network"],
deps = [
"@com_github_libp2p_go_libp2p//p2p/host/basic:go_default_library",
"@com_github_libp2p_go_libp2p_swarm//testing:go_default_library",
"@com_github_sirupsen_logrus//hooks/test:go_default_library",
],
)