Skip to content

feat(net):supplement disconnect reasons#5392

Merged
317787106 merged 5 commits intotronprotocol:developfrom
317787106:feature/add_disconnect
Sep 5, 2023
Merged

feat(net):supplement disconnect reasons#5392
317787106 merged 5 commits intotronprotocol:developfrom
317787106:feature/add_disconnect

Conversation

@317787106
Copy link

What does this PR do?

  • supplement two disconnect reasons, including RelayService and shutdown node

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@lvs007 lvs007 requested review from jwrct and xxo1shine August 3, 2023 03:44
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.3 milestone Aug 9, 2023
TOO_MANY_PEERS_WITH_SAME_IP = 0x22;
LIGHT_NODE_SYNC_FAIL = 0x23;
BELOW_THAN_ME = 0X24;
NOT_WITNESS = 0x25;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it compatible with older versions?

Copy link
Author

@317787106 317787106 Aug 11, 2023

Choose a reason for hiding this comment

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

All of the newly added unrecognized ReasonCode will be converted to ReasonCode UNKNOWN, and no exception will be thrown.

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. It is recommended to make it more perfect, whether each of these merged cases defines a reason, and there are some unknown scenarios
    case NO_SUCH_MESSAGE:
    case MESSAGE_WITH_WRONG_LENGTH:
    case BAD_MESSAGE:
    code = Protocol.ReasonCode.BAD_PROTOCOL;

Copy link
Author

Choose a reason for hiding this comment

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

@wubin01 there is no MESSAGE_WITH_WRONG_LENGTH really. But there is NO_SUCH_MESSAGE. Do you means add NO_SUCH_MESSAGE in Protocol.ReasonCode?

Copy link
Author

Choose a reason for hiding this comment

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

I have added new ReasonCode NO_SUCH_MESSAGE in proto.

Copy link

@Nidacoke Nidacoke left a comment

Choose a reason for hiding this comment

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

Everyone have any idea for more updates.

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.

TIP-592: Supplement Disconnect Reasons in Java-tron Supplement Disconnect Reasons in Java-tron

5 participants