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

added richness to useless peer disconnect reasons #6899

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

macfarla
Copy link
Contributor

@macfarla macfarla commented Apr 8, 2024

PR description

Added various specific messages for useless peer disconnects so they can be logged more clearly.

Fixed Issue(s)

Fixes #6897

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla
Copy link
Contributor Author

macfarla commented Apr 8, 2024

example log - inbound and outbound


[DEBUG] 2024-04-08 05:48:49.669 [nioEventLoopGroup-3-7] AbstractPeerConnection - Disconnecting connection -228412499, peer 0x7b588b8860c3f43a... reason 0x03 USELESS_PEER_NO_SHARED_CAPABILITIES No shared capabilities
2024-04-08 05:48:54.587+00:00 | nioEventLoopGroup-3-2 | DEBUG | AbstractPeerConnection | Disconnecting connection 1999510985, peer 0xd59915c057ac5473... reason 0x03 USELESS_PEER_NO_SHARED_CAPABILITIES No shared capabilities
[DEBUG] 2024-04-08 05:48:54.587 [nioEventLoopGroup-3-2] AbstractPeerConnection - Disconnecting connection 1999510985, peer 0xd59915c057ac5473... reason 0x03 USELESS_PEER_NO_SHARED_CAPABILITIES No shared capabilities
2024-04-08 05:49:19.741+00:00 | nioEventLoopGroup-3-1 | DEBUG | EthProtocolManager | Disconnect - Inbound - 0x03 USELESS_PEER  - 0x7fe70140169a8328... - 2 peers left
[DEBUG] 2024-04-08 05:49:19.741 [nioEventLoopGroup-3-1] EthProtocolManager - Disconnect - Inbound - 0x03 USELESS_PEER  - 0x7fe70140169a8328... - 2 peers left
2024-04-08 06:14:17.442+00:00 | nioEventLoopGroup-3-1 | DEBUG | EthProtocolManager | Disconnect - Outbound - 0x03 USELESS_PEER_USELESS_RESPONSES Useless responses: exceeded threshold - 0xa3435a0155a3e837... - 1 peers left
[DEBUG] 2024-04-08 06:14:17.442 [nioEventLoopGroup-3-1] EthProtocolManager - Disconnect - Outbound - 0x03 USELESS_PEER_USELESS_RESPONSES Useless responses: exceeded threshold - 0xa3435a0155a3e837... - 1 peers left
2024-04-08 06:14:17.442+00:00 | nioEventLoopGroup-3-1 | DEBUG | AbstractPeerConnection | Disconnecting connection -1223704849, peer 0xa3435a0155a3e837... reason 0x03 USELESS_PEER_USELESS_RESPONSES Useless responses: exceeded threshold
[DEBUG] 2024-04-08 06:14:17.442 [nioEventLoopGroup-3-1] AbstractPeerConnection - Disconnecting connection -1223704849, peer 0xa3435a0155a3e837... reason 0x03 USELESS_PEER_USELESS_RESPONSES Useless responses: exceeded threshold
2024-04-08 06:16:59.488+00:00 | EthScheduler-Services-42 (importBlock) | DEBUG | EthProtocolManager | Disconnect - Outbound - 0x03 USELESS_PEER_BY_CHAIN_COMPARATOR Lowest by chain height comparator - 0xac906289e4b7f12d... - 0 peers left
[DEBUG] 2024-04-08 06:16:59.488 [EthScheduler-Services-42 (importBlock)] EthProtocolManager - Disconnect - Outbound - 0x03 USELESS_PEER_BY_CHAIN_COMPARATOR Lowest by chain height comparator - 0xac906289e4b7f12d... - 0 peers left
2024-04-08 06:16:59.488+00:00 | EthScheduler-Services-42 (importBlock) | DEBUG | AbstractPeerConnection | Disconnecting connection -625070788, peer 0xac906289e4b7f12d... reason 0x03 USELESS_PEER_BY_CHAIN_COMPARATOR Lowest by chain height comparator
[DEBUG] 2024-04-08 06:16:59.488 [EthScheduler-Services-42 (importBlock)] AbstractPeerConnection - Disconnecting connection -625070788, peer 0xac906289e4b7f12d... reason 0x03 USELESS_PEER_BY_CHAIN_COMPARATOR Lowest by chain height comparator

@macfarla macfarla merged commit d753b2a into hyperledger:main Apr 8, 2024
42 checks passed
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: amsmota <antonio.mota@citi.com>
macfarla added a commit to macfarla/besu that referenced this pull request Apr 26, 2024
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla macfarla deleted the useless-peer-logging branch July 16, 2024 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve logging of outgoing peer disconnects for "useless peer"
2 participants