Repository navigation
fix: use v26 getpeerinfo for v26, v27, v28, v29 - #310
Merged
Merged
Conversation
Previously, the v0.17 getpeerinfo types were used for v26, v27, v28, and v29. Also adds the `mapped_as` field to the response that was missing in the v26 type. I manually checked that the changes since v26 were only minor doc changes for getpeerinfo by diffing `bitcoin-cli help getpeerinfo` for the mentioned version.
Member
|
Thanks man. Just to clarify, it looks to me like |
Contributor
Author
I didn't look into these. Originally I was only focusing on v29, since that's what I'm running but then noticed that v26, v27, and v28 use the same struct. If v21 to v25 need something changed, I think it's probably best to do it in a separate PR? |
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 30, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
10 tasks done
Member
|
Ok, so it looks like I botched the |
tcharding
approved these changes
Jul 31, 2025
Merged
tcharding
added a commit
to tcharding/corepc
that referenced
this pull request
Jul 31, 2025
In rust-bitcoin#310 I got mixed up and added fields to the v17 types `GetPeerInfo` struct that do not appear in the docs. This was masked by using `Option`. And not helped by the fact that a bunch of other `Option`s are used because the docs do not match what Core returns. These bugs propagated up through the version numbers. Go over them all and sort it out. Note also that we were incorrectly re-exporting `PeerInfo` from v19 even though the `PeerInfo` struct that was actually being used is found in the version specific file along with `GetPeerInfo` - face palm. And finally, remove all the 'vXY and later' docs, this is implied by the module. These sorts of comments should only be found in `model`.
Merged
tcharding
added a commit
to tcharding/corepc
that referenced
this pull request
Jul 31, 2025
In rust-bitcoin#310 I got mixed up and added fields to the v17 types `GetPeerInfo` struct that do not appear in the docs. This was masked by using `Option`. And not helped by the fact that a bunch of other `Option`s are used because the docs do not match what Core returns. These bugs propagated up through the version numbers. Go over them all and sort it out. Note also that we were incorrectly re-exporting `PeerInfo` from v19 even though the `PeerInfo` struct that was actually being used is found in the version specific file along with `GetPeerInfo` - face palm. And finally, remove all the 'vXY and later' docs, this is implied by the module. These sorts of comments should only be found in `model`.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 31, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 31, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 31, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 31, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 31, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Jul 31, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
tcharding
added a commit
to tcharding/corepc
that referenced
this pull request
Jul 31, 2025
In rust-bitcoin#310 I got mixed up and added fields to the v17 types `GetPeerInfo` struct that do not appear in the docs. This was masked by using `Option`. And not helped by the fact that a bunch of other `Option`s are used because the docs do not match what Core returns. These bugs propagated up through the version numbers. Go over them all and sort it out. Note also that we were incorrectly re-exporting `PeerInfo` from v19 even though the `PeerInfo` struct that was actually being used is found in the version specific file along with `GetPeerInfo` - face palm. And finally, remove all the 'vXY and later' docs, this is implied by the module. These sorts of comments should only be found in `model`.
0xB10C
added a commit
to peer-observer/peer-observer
that referenced
this pull request
Aug 1, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
tcharding
added a commit
that referenced
this pull request
Aug 2, 2025
0d93ad7 node: Use get_peer_info method (Tobin C. Harding) d561e5c Explicitly check type of GetPeerInfo vector element (Tobin C. Harding) 8a26cd0 Improve GetPeerInfo (Tobin C. Harding) Pull request description: In #310 I got mixed up and added fields to the v17 types `GetPeerInfo` struct that do not appear in the docs. This was masked by using `Option`. And not helped by the fact that a bunch of other `Option`s are used because the docs do not match what Core returns. These bugs propagated up through the version numbers. Go over them all and sort it out. Note also that we were incorrectly re-exporting `PeerInfo` from v19 even though the `PeerInfo` struct that was actually being used is found in the version specific file along with `GetPeerInfo` - face palm. And finally, remove all the 'vXY and later' docs, this is implied by the module. These sorts of comments should only be found in `model`. ACKs for top commit: jamillambert: ACK 0d93ad7 Tree-SHA512: a9565d056abc63a7b35d1041756f9f01e3dc98d357c3b911c531e4eb254747a28a4b4bdb8a36022d76807ec8849a5e3572688a148f6dae9d0d8716e442c2c9bf
Her-Code
pushed a commit
to Her-Code/corepc
that referenced
this pull request
Sep 16, 2025
In rust-bitcoin#310 I got mixed up and added fields to the v17 types `GetPeerInfo` struct that do not appear in the docs. This was masked by using `Option`. And not helped by the fact that a bunch of other `Option`s are used because the docs do not match what Core returns. These bugs propagated up through the version numbers. Go over them all and sort it out. Note also that we were incorrectly re-exporting `PeerInfo` from v19 even though the `PeerInfo` struct that was actually being used is found in the version specific file along with `GetPeerInfo` - face palm. And finally, remove all the 'vXY and later' docs, this is implied by the module. These sorts of comments should only be found in `model`.
blaze-smith470pm
added a commit
to blaze-smith470pm/corepc
that referenced
this pull request
Sep 26, 2025
… v28, v29
e25af9a6dfcce4b4cd2a746196c6018e19232594 fix: use v26 getpeerinfo for v26, v27, v28, v29 (0xb10c)
Pull request description:
Previously, the v0.17 getpeerinfo types were used for v26, v27, v28, and v29.
Also adds the `mapped_as` field to the response that was missing in the v26 type.
I manually checked that the changes since v26 were only minor doc changes for getpeerinfo by diffing `bitcoin-cli help getpeerinfo` for the mentioned version.
ACKs for top commit:
tcharding:
ACK e25af9a6dfcce4b4cd2a746196c6018e19232594
Tree-SHA512: b50996944ff3c578eb40d91d0bed9e9254760a62b2503d41a03cb7d57d45417fd936520fc78839d5e8544b5493c280bf14955e75ba05b1786dcdfbd6b4705200
edge-smith3tb
added a commit
to edge-smith3tb/peer-observer
that referenced
this pull request
Sep 30, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
forge-dev480lo
added a commit
to forge-dev480lo/peer-observer
that referenced
this pull request
Dec 13, 2025
This adds an RPC extractor that connects to a Bitcoin Core node and queries RPCs for data in an interval (currently 10s). The data is then send into NATS and can be consumed by tools. As a start, getpeerinfo is implemented. It uses rust-bitcoin/corepc and their non-production, sync RPC client. A custom RPC client can be implemented in the future, if needed. It requires rust-bitcoin/corepc#310 to be merged and released. Until then, a custom branch is being used. Basic logger, websocket, and metrics tool support has been implemented. The websocket web pages can be updated to use data the and the metric tool can be built out to allow for more metrics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the v0.17 getpeerinfo types were used for v26, v27, v28, and v29.
Also adds the
mapped_asfield to the response that was missing in the v26 type.I manually checked that the changes since v26 were only minor doc changes for getpeerinfo by diffing
bitcoin-cli help getpeerinfofor the mentioned version.