GitBulletin

Repository: farcasterxyz/hub-monorepo

**Network Revolution: New RPC Endpoint Unleashes Peer Connectivity!**

2024-02-29 06:35:13 UTC

**Farcaster Hub introduces groundbreaking `currentPeers` endpoint, paving the way for real-time peer insights and enhanced network transparency!**

Commit Details:

feat: Add currentPeers RPC Endpoint (#1630) ## Motivation This endpoint was added to get an approximate list of all peers on the network ## Change Summary - Added new Proto definitions for endpoint - New accessor method for current peers - New RPC endpoint for current peers `/v1/peerList` ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [x] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. - [x] All [commits have been signed](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#22-signing-commits) ## Additional Context Response looks like the following: ``` { "contacts": [ { "gossipAddress": { "address": "84.247.175.196", "family": 4, "port": 2282, "dnsName": "" }, "rpcAddress": { "address": "84.247.175.196", "family": 4, "port": 2283, "dnsName": "" }, "excludedHashes": [], "count": 10694067, "hubVersion": "2023.12.27", "network": "FARCASTER_NETWORK_MAINNET", "appVersion": "1.9.2", "timestamp": 1705796040744 }, ... ``` <!-- start pr-codex --> --- ## PR-Codex overview This PR adds a new `currentPeers` API endpoint and related changes to support fetching current peer contacts in the Hub network. ### Detailed summary - Added `currentPeers` RPC endpoint - Implemented API endpoint for getting a list of current sync peers - Updated documentation for the new API endpoint - Added protobuf message for `ContactInfoResponse` - Updated HTTP server to handle `currentPeers` API call - Updated TypeScript files to include `ContactInfoResponse` and related functions > The following files were skipped due to too many changes: `packages/core/src/protobufs/generated/request_response.ts`, `packages/hub-nodejs/src/generated/rpc.ts`, `packages/hub-web/src/generated/rpc.ts`, `packages/hub-web/src/generated/gossip.ts`, `packages/hub-nodejs/src/generated/gossip.ts` > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->

Search Similar