prysm-pulse/beacon-chain/p2p
Simon cec32cb996
Append Dynamic Addinng Trusted Peer Apis (#12531)
* Append Dynamic Addinng Trusted Peer Apis

* Append unit tests for Dynamic Addinng Trusted Peer Apis

* Update beacon-chain/p2p/peers/peerdata/store.go

* Update beacon-chain/p2p/peers/peerdata/store_test.go

* Update beacon-chain/p2p/peers/peerdata/store_test.go

* Update beacon-chain/p2p/peers/peerdata/store_test.go

* Update beacon-chain/p2p/peers/status.go

* Update beacon-chain/p2p/peers/status_test.go

* Update beacon-chain/p2p/peers/status_test.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Update beacon-chain/rpc/eth/node/handlers.go

* Move trusted peer apis from rpc/eth/v1/node to rpc/prysm/node; move peersToWatch into ensurePeerConnections function;

* Update beacon-chain/rpc/prysm/node/server.go

* Update beacon-chain/rpc/prysm/node/server.go

* fix go lint problem

* p2p/watch_peers.go: trusted peer makes AddrInfo structure by itself instead of using MakePeer().

p2p/service.go: add connectWithAllTrustedPeers function, before connectWithPeer, add trusted peer info into peer status.

p2p/peers/status.go: trusted peers are not included, when pruning outdated and disconnected peers.

* use readlock for GetTrustedPeers and IsTrustedPeers

---------

Co-authored-by: simon <sunminghui2@huawei.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2023-07-11 09:26:08 +00:00
..
encoder Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
peers Append Dynamic Addinng Trusted Peer Apis (#12531) 2023-07-11 09:26:08 +00:00
testing Enable misspell linter & fix findings (#12272) 2023-04-14 10:03:11 +00:00
types Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
addr_factory_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
addr_factory.go Enforce log.WithError(err) static analysis and fix all violations (#11163) 2022-08-05 10:52:02 +00:00
broadcaster_test.go Do Not Panic on Broadcasting Nil Object (#12369) 2023-05-07 05:00:30 +00:00
broadcaster.go Do Not Panic on Broadcasting Nil Object (#12369) 2023-05-07 05:00:30 +00:00
BUILD.bazel disable it (#12438) 2023-05-22 19:18:13 +08:00
config.go Replace statefeed Initialize (#12285) 2023-05-03 04:34:01 +00:00
connection_gater_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
connection_gater.go Fix a race condition during initialization (#11444) (#11698) 2022-11-29 18:24:50 +00:00
dial_relay_node_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
dial_relay_node.go Update libp2p to support go 1.19 (#11309) 2022-10-07 15:24:51 +08:00
discovery_test.go Replace statefeed Initialize (#12285) 2023-05-03 04:34:01 +00:00
discovery.go Add the Ability for Prysm To Handle Trusted Peers (#12492) 2023-06-12 14:47:52 +00:00
doc.go Change Eth2 Repository Names (#9425) 2021-08-19 13:00:57 -05:00
fork_test.go Replace statefeed Initialize (#12285) 2023-05-03 04:34:01 +00:00
fork_watcher.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
fork.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
gossip_scoring_params_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
gossip_scoring_params.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
gossip_topic_mappings_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
gossip_topic_mappings.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
handshake.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
info.go Update libp2p to support go 1.19 (#11309) 2022-10-07 15:24:51 +08:00
interfaces.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
iterator.go Refactor Subnet Search (#8048) 2020-12-11 18:40:56 -08:00
log.go Update libp2p to support go 1.19 (#11309) 2022-10-07 15:24:51 +08:00
message_id_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
message_id.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
monitoring.go Add Pubsub Metrics Tracer (#12178) 2023-03-24 12:36:10 +08:00
options_test.go Always Favour Yamux for Multiplexing (#12502) 2023-06-08 04:02:46 +00:00
options.go Always Favour Yamux for Multiplexing (#12502) 2023-06-08 04:02:46 +00:00
parameter_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
pubsub_filter_test.go Fix numerous spelling error and typos in the log messages, comments, and documentation. (#12385) 2023-05-11 20:45:43 +00:00
pubsub_filter.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
pubsub_fuzz_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
pubsub_test.go Replace statefeed Initialize (#12285) 2023-05-03 04:34:01 +00:00
pubsub_tracer.go Add Pubsub Metrics Tracer (#12178) 2023-03-24 12:36:10 +08:00
pubsub.go Add Pubsub Metrics Tracer (#12178) 2023-03-24 12:36:10 +08:00
rpc_topic_mappings_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
rpc_topic_mappings.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
sender_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
sender.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
service_test.go Replace statefeed Initialize (#12285) 2023-05-03 04:34:01 +00:00
service.go Append Dynamic Addinng Trusted Peer Apis (#12531) 2023-07-11 09:26:08 +00:00
subnets_test.go Replace statefeed Initialize (#12285) 2023-05-03 04:34:01 +00:00
subnets.go p2p: Check peer threshold is met before giving up on ctx deadline (#12446) 2023-05-28 13:24:59 +00:00
topics.go Add Gossip Handler For BLS To Execution Changes (#11690) 2022-11-26 11:07:05 -08:00
utils_test.go Update to V4 🚀 (#12134) 2023-03-17 18:52:56 +00:00
utils.go Enable misspell linter & fix findings (#12272) 2023-04-14 10:03:11 +00:00
watch_peers.go Append Dynamic Addinng Trusted Peer Apis (#12531) 2023-07-11 09:26:08 +00:00