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

Improve logging of peer disconnects due to subprotocol triggered #6886

Merged
merged 8 commits into from
Apr 5, 2024

Conversation

jframe
Copy link
Contributor

@jframe jframe commented Apr 5, 2024

PR description

Add additional detail when we disconnect with SUBPROTOCOL_TRIGGERED disconnect reason. I've extended the enum with additional SUBPROTOCOL_TRIGGERED values using the same code 0x10 and added a message to these extended SUBPROTOCOL_TRIGGERED reasons.

If we receive a 0x10 this is mapped back to the generic SUBPROTOCOL_TRIGGERED reason.

example with the changes

Disconnecting connection 1859339149, peer 0x6b8a113cb2edfa5d... reason 0x10 SUBPROTOCOL_TRIGGERED_MISMATCHED_NETWORK Mismatched network id

Fixed Issue(s)

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: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: Jason Frame <jason.frame@consensys.net>
…entioned as a reason elsewhere in the code

Signed-off-by: Jason Frame <jason.frame@consensys.net>
@jframe jframe changed the title Peer subprotocol triggered logging Improve logging of peer disconnects due to subprotocol triggered Apr 5, 2024
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

nice

@jframe jframe merged commit 758adc7 into hyperledger:main Apr 5, 2024
42 checks passed
@jframe jframe deleted the peer_subprotocol_triggered_logging branch April 5, 2024 08:21
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
…on (hyperledger#6886)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
…on (hyperledger#6886)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Signed-off-by: amsmota <antonio.mota@citi.com>
macfarla pushed a commit to macfarla/besu that referenced this pull request Apr 26, 2024
…on (hyperledger#6886)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
…on (hyperledger#6886)

Signed-off-by: Jason Frame <jason.frame@consensys.net>
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.

2 participants