-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add peer info api #4845
Conversation
As part of this needed to stop deep copying config shared between nodes of NewTestNetwork.
Codecov Report
@@ Coverage Diff @@
## develop #4845 +/- ##
=========================================
- Coverage 76.8% 76.8% -0.1%
=========================================
Files 261 261
Lines 30160 30234 +74
=========================================
+ Hits 23189 23229 +40
- Misses 5476 5505 +29
- Partials 1495 1500 +5
|
Also update test to check that uptime is set.
bors merge |
## Motivation Closes #4778 Note that this is in a draft state because it needs spacemeshos/api#258 to be merged and I guess a release of the API package, before it can be merged. I plan to remove the replace directive for the api in the mod file when, the api has been released. ## Changes Adds a new streaming API endpoint to the node service to return info about connected peers. Note this PR changes the PostProviderID field to be exported to allow for config to be easily serialised/deserialised in order to perform a deep copy. ## Test Plan Added a test, the test doesn't check whether tags are since that part would make things a bit trickier. However through manual checking I can see that tags are being assigned. ```shell $ grpc_cli call localhost:9092 spacemesh.v1.NodeService.PeerInfo '' connecting to localhost:9092 peers { id: "12D3KooWRkZMjGNrQfRyeKQC9U58cUwAfyQMtjNsupixkBFag8AY" connections { address: "/ip4/34.150.215.241/tcp/5000" uptime: "29.348584085s" outbound: true } tags: "bootnode" } Rpc succeeded with OK status ``` ## DevOps Notes <!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases --> - [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources) - [x] This PR does not affect public APIs - [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.) - [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
Pull request successfully merged into develop. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Motivation
Closes #4778
Note that this is in a draft state because it needs spacemeshos/api#258 to be merged and I guess a release of the API package, before it can be merged. I plan to remove the replace directive for the api in the mod file when, the api has been released.
Changes
Adds a new streaming API endpoint to the node service to return info about connected peers.
Note this PR changes the PostProviderID field to be exported to allow for config to be easily serialised/deserialised in order to perform a deep copy.
Test Plan
Added a test, the test doesn't check whether tags are since that part would make things a bit trickier. However through manual checking I can see that tags are being assigned.
DevOps Notes