prysm-pulse/beacon-chain/p2p/encoder
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
..
BUILD.bazel Use Custom SSZ for P2P Types (#7436) 2020-10-14 07:55:28 +00:00
doc.go Resolve Miscellaneous Prysm TODOs (#3465) 2019-09-16 15:45:03 -05:00
network_encoding.go QSP-13 Only Allow Snappy P2P Encoding (#6415) 2020-07-03 11:24:30 +08:00
snappy_test.go Applies assertion funcs to p2p tests (#6597) 2020-07-14 16:51:39 +00:00
ssz_test.go Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
ssz.go Update go-libp2p to 0.12.0 (#8015) 2020-12-14 17:22:25 +00:00
varint_test.go Various code inspection resolutions (#7438) 2020-10-12 08:11:05 +00:00
varint.go QSP18: Add Varint Header Validation (#6577) 2020-07-13 14:02:03 -05:00