Skip to content
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

bug: getpeerinfo RPC should show inbound connections as well as outbound #7893

Open
teor2345 opened this issue Nov 2, 2023 · 0 comments
Open
Labels
A-rpc Area: Remote Procedure Call interfaces C-bug Category: This is a bug I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data S-needs-triage Status: A bug report needs triage

Comments

@teor2345
Copy link
Collaborator

teor2345 commented Nov 2, 2023

Motivation

getpeerinfo is documented to show inbound and outbound connections, but Zebra only shows outbound connections.

Also, it shows current and recent outbound connections, but it should only show current connections.

Specifications

https://zcash.github.io/rpc/getpeerinfo.html

Complex Code or Requirements

We can add a network request for a list of peers, and then use that data for the RPC.

We don't need the address book, maybe we could remove it.

This change might need to be based on PR #7859, because it makes significant changes to the peer set.

Testing

Connect to Zebra with an inbound connection and make sure it shows up. We can do this in a unit test, or manually.
Add the inbound field to the RPC so we're sure.

Follow Up Tickets

  • Change the name of AddressBook to OutboundAddressBook
@teor2345 teor2345 added C-bug Category: This is a bug S-needs-triage Status: A bug report needs triage P-Low ❄️ I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data A-rpc Area: Remote Procedure Call interfaces labels Nov 2, 2023
@teor2345 teor2345 self-assigned this Nov 2, 2023
@teor2345 teor2345 changed the title bug: getpeerinfo should show inbound connections as well as outbound bug: getpeerinfo RPC should show inbound connections as well as outbound Nov 6, 2023
@teor2345 teor2345 removed their assignment Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Area: Remote Procedure Call interfaces C-bug Category: This is a bug I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data S-needs-triage Status: A bug report needs triage
Projects
Status: New
Development

No branches or pull requests

2 participants