Skip to content

gui: display mapped AS in peers info window - #18402

Merged
laanwj merged 2 commits into
bitcoin:masterfrom
jonatack:gui-peers-display-mapped_as
Mar 25, 2020
Merged

gui: display mapped AS in peers info window#18402
laanwj merged 2 commits into
bitcoin:masterfrom
jonatack:gui-peers-display-mapped_as

Conversation

@jonatack

@jonatack jonatack commented Mar 22, 2020

Copy link
Copy Markdown
Member

Continuing the asmap integration of #16702 which added mapped_as to the rpc getpeerinfo output, this adds the mapped AS to the Peers detail window in the GUI wallet.

$ src/qt/bitcoin-qt -asmap=<path-to-asmap-file> (asmap on)

Screenshot from 2020-03-22 12-29-56

$ src/qt/bitcoin-qt (asmap off)

Screenshot from 2020-03-22 12-32-46

Added a tooltip and a couple of minor fixups.

@fanquake fanquake added the GUI label Mar 22, 2020
@hebasto

hebasto commented Mar 22, 2020

Copy link
Copy Markdown
Member

Concept ACK. Smth similar was in my task list ;)

@laanwj

laanwj commented Mar 22, 2020

Copy link
Copy Markdown
Member

A good addition!
ACK 8580db114ae30459af245f2bf0bfcc5f8c85b612
(but see nits)

Comment thread src/qt/rpcconsole.cpp Outdated
Comment thread src/qt/forms/debugwindow.ui Outdated

@promag promag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, honestly you could squash these commits.

Comment thread src/qt/rpcconsole.cpp Outdated
@jonatack
jonatack force-pushed the gui-peers-display-mapped_as branch from 8580db1 to 64f3838 Compare March 23, 2020 13:34
@jonatack

Copy link
Copy Markdown
Member Author

Thanks @hebasto, @laanwj, and @promag for reviewing. Feedback taken; done.

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 64f383857d6f3412e432e737c298ff17f84c48d3, tested on Linux Mint 19.3:

DeepinScreenshot_bitcoin-qt_20200323191834


@jonatack
While debugwindow.ui is touched mind adding a commit to fix annoying re-formatting by Qt Designer?

@laanwj #15220 (comment):

please just do this the next time you're editing these files.

@promag promag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK modulo suggestion.

Comment thread src/qt/rpcconsole.cpp Outdated
jonatack and others added 2 commits March 24, 2020 14:04
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
@jonatack
jonatack force-pushed the gui-peers-display-mapped_as branch from 64f3838 to 76db4b2 Compare March 24, 2020 13:06
@jonatack

Copy link
Copy Markdown
Member Author

Thanks @promag and @hebasto, done.

@laanwj

laanwj commented Mar 25, 2020

Copy link
Copy Markdown
Member

ACK 76db4b2

@laanwj
laanwj merged commit 244e88e into bitcoin:master Mar 25, 2020
@jonatack
jonatack deleted the gui-peers-display-mapped_as branch March 25, 2020 14:38
@andronoob

Copy link
Copy Markdown

I wonder if the string "Mapped AS" displayed in the GUI could be worded in other ways? Like "BGP AS number", so that it could be more self-explanatory, or at least more google-able?

@jonatack

Copy link
Copy Markdown
Member Author

@andronoob there is an explanatory tooltip -- "The mapped Autonomous System used for diversifying peer selection." -- see https://github.com/bitcoin/bitcoin/pull/18402/files#diff-2537e9bcbac21d35d8fa28ce1a35e89dR1508. In RPC getpeerinfo it is also named mapped_as. I think your translation is also inaccurate. See https://bitcoincore.reviews/16702 for more.

@andronoob

andronoob commented Aug 14, 2020

Copy link
Copy Markdown

The mapped Autonomous System used for diversifying peer selection.

To my understanding, such phrase means:

"(Such number is) The Autonomous System (AS) (number, aka ASN) which this peer is mapped to (according to the map data). BGP AS is considered during peer selection, in order to diversify connected peers. (thus some risks related might be mitigated)"

Correct me if I'm wrong?

</item>
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="placeholderText">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the property order change has been done through QTCreator? I would have probably unstaged those.

@jonasschnelli jonasschnelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core Review ACK 76db4b2

deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 12, 2021
Summary:
> Continuing the asmap integration of [[bitcoin/bitcoin#16702 | PR16702]] which added mapped_as to the rpc getpeerinfo output, this adds the mapped AS to the Peers detail window in the GUI wallet.
> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

This is a backport of Core [[bitcoin/bitcoin#18402 | PR18402]]

Test Plan:
`ninja && src/qt/bitcoin-qt`

Menu `Window -> Peers`, select a peer, the "Mapped AS" field is now visible at the bottom of the right widget.

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8876
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants