prysm-pulse/beacon-chain/p2p
Steven Allen 2428880058
Update go-libp2p to 0.12.0 (#8015)
* Update go-libp2p to 0.12.0

go-libp2p 0.12.0 made some significant changes to the stream interfaces around
stream closing:

* Close now closes in both directions and frees the stream. However, unlike
FullClose did, it doesn't _wait_ for the remote peer to respond with an EOF.
* To close for writing, call CloseWrite (like one would on a TCP connection, etc.).

This patch:

* Replaces calls to FullClose with Close where appropriate.
* Replaces calls to Close with CloseWrite where appropriate.
* Removes redundant Close calls.
* Calls Reset to where appropriate to indicate that the request/response was
  aborted. Unlike Close, this will not flush and will not cause the remote peer
  to read an EOF. Instead, the remote peer will read an ErrReset error.
* Ensures we always either close or reset streams. Send wasn't closing the
  stream on some error paths.
* Now that stream closing is async, we explicitly wait for a response when
  "hanging up" on a peer (so we don't hang up before they receive our
  response/goodbye message).

* update bazel

* Gazelle

* revert unintentional bazel workspace change

* appease an overzealous linter

* update to latest

* Refactor encoder

* gazelle

* Gazelle

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-12-14 17:22:25 +00:00
..
encoder Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
peers Add Inbound Peer Limit (#7942) 2020-12-12 03:46:55 +00:00
testing Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
types Extract common types from sync (#7843) 2020-11-18 04:17:42 +00:00
addr_factory_test.go Apply testutils assertions: final cleanup (#7003) 2020-08-25 15:23:06 +00:00
addr_factory.go QSP-47 Remove Meaningless Relay Addr Check (#6388) 2020-06-25 09:16:30 +00:00
broadcaster_test.go Release and remove feature flag --enable-att-broadcast-discovery-attempts (#7610) 2020-10-23 01:53:50 +00:00
broadcaster.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
BUILD.bazel Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
config.go QSP-13 Only Allow Snappy P2P Encoding (#6415) 2020-07-03 11:24:30 +08:00
connection_gater_test.go Add Inbound Peer Limit (#7942) 2020-12-12 03:46:55 +00:00
connection_gater.go Add Inbound Peer Limit (#7942) 2020-12-12 03:46:55 +00:00
dial_relay_node_test.go Applies assertion funcs to p2p tests (#6597) 2020-07-14 16:51:39 +00:00
dial_relay_node.go Refactors calls to deprecated libp2p methods (#6554) 2020-07-13 02:28:40 +00:00
discovery_test.go Add Inbound Peer Limit (#7942) 2020-12-12 03:46:55 +00:00
discovery.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
doc.go Fix old markdown links (#4603) 2020-01-21 03:30:35 +00:00
fork_test.go Use t.TempDir() in tests (#7769) 2020-11-10 22:45:17 +00:00
fork.go Update PubSub and include topic filter (#7496) 2020-10-16 07:05:40 +00:00
gossip_scoring_params.go Add Gossip Scoring For Peers (#7184) 2020-11-12 08:08:07 +00:00
gossip_topic_mappings_test.go Update run time to v0.9.3 (#4154) 2020-01-07 18:47:39 +00:00
gossip_topic_mappings.go Move subnet topics to global vars (#6525) 2020-07-09 17:38:15 +00:00
handshake.go Clean Up GoodByes (#7790) 2020-11-13 12:58:13 +00:00
info.go Align code base to v0.11 (#5127) 2020-04-14 20:27:03 +00:00
interfaces.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
iterator.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
log.go Clean Up P2P Service (#6574) 2020-07-13 04:16:24 +00:00
monitoring.go Wait for subnet peers before broadcasting onto attestation subnet topic (#6893) 2020-08-10 10:27:50 -05:00
options_test.go Use t.TempDir() in tests (#7769) 2020-11-10 22:45:17 +00:00
options.go Add Buffer For Inbound Peers (#8018) 2020-12-02 10:45:28 -06:00
parameter_test.go Update Gossipsub Parameters (#7869) 2020-11-20 15:36:02 +00:00
pubsub_filter_test.go Update PubSub and include topic filter (#7496) 2020-10-16 07:05:40 +00:00
pubsub_filter.go Update PubSub and include topic filter (#7496) 2020-10-16 07:05:40 +00:00
pubsub_test.go Fix Gossip Message ID (#7624) 2020-10-24 03:38:05 +00:00
pubsub.go Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
rpc_topic_mappings_test.go Use Custom SSZ for P2P Types (#7436) 2020-10-14 07:55:28 +00:00
rpc_topic_mappings.go Use Custom SSZ for P2P Types (#7436) 2020-10-14 07:55:28 +00:00
sender_test.go Use Custom SSZ for P2P Types (#7436) 2020-10-14 07:55:28 +00:00
sender.go Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
service_test.go Add Buffer For Inbound Peers (#8018) 2020-12-02 10:45:28 -06:00
service.go Remove Exclusion List (#7992) 2020-12-01 02:17:29 +00:00
subnets_test.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
subnets.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
topics.go Move subnet topics to global vars (#6525) 2020-07-09 17:38:15 +00:00
utils_test.go Moves AssertLogsContains to assertions package (#6985) 2020-08-13 16:22:25 +00:00
utils.go Prevent Usage of Stdlib File/Dir Writing With Static Analysis (#7685) 2020-11-09 14:27:03 -06:00
watch_peers.go Various code inspection resolutions (#7438) 2020-10-12 08:11:05 +00:00