Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Redefine p2p communication and update nodeInfo - Closes #5419 & #5472 #5514

Merged
merged 46 commits into from
Jul 8, 2020

Conversation

ishantiw
Copy link
Contributor

@ishantiw ishantiw commented Jul 3, 2020

What was the problem?

This PR resolves #5419 and #5472

How was it solved?

  • Update node Info to have these properties,
 {
	readonly networkId: string,
	readonly networkVersion: string,
	readonly nonce: string,
        readonly advertiseAddress: boolean,
        options?: [key: string]: unknown,
}
  • Apply nodeInfo to only update options field
  • Prepare query object handling clientSocketOptions to have limited fields from above NodeInfo
  • Only allow sharing of ipAddress and port of a peer when sharing peerList
  • Update network_setup and utils for tests
  • Update all the tests
  • Make setup for custom schema for custom nodeInfo related tests

How was it tested?

Run following tests under elements/lisk-p2p,

npm run test:unit
npm run test:integration
npm run test:functional

@ishantiw ishantiw self-assigned this Jul 3, 2020
@ishantiw ishantiw force-pushed the 5419_redefine_p2p_communication branch from f9dc9b3 to 36622d8 Compare July 3, 2020 10:59
@ishantiw ishantiw changed the title Redefine p2p communication and update nodeInfo - Closes #5419 Redefine p2p communication and update nodeInfo - Closes #5419 & #5472 Jul 3, 2020
@ishantiw ishantiw force-pushed the 5419_redefine_p2p_communication branch 6 times, most recently from 71ab461 to d57e8c9 Compare July 6, 2020 02:01
@ishantiw ishantiw force-pushed the 5419_redefine_p2p_communication branch from d57e8c9 to 249e341 Compare July 6, 2020 11:20
@shuse2 shuse2 requested review from mitsuaki-u and shuse2 July 6, 2020 11:41
Copy link
Contributor

@mitsuaki-u mitsuaki-u left a comment

Choose a reason for hiding this comment

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

LGTM besides @shuse2 comments and a question about custom peers

@ishantiw ishantiw requested review from shuse2 and mitsuaki-u July 7, 2020 14:22
Copy link
Collaborator

@shuse2 shuse2 left a comment

Choose a reason for hiding this comment

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

LGTM in general

@ishantiw ishantiw requested a review from shuse2 July 7, 2020 23:02
@shuse2 shuse2 merged commit 0c2209c into development Jul 8, 2020
@shuse2 shuse2 deleted the 5419_redefine_p2p_communication branch July 8, 2020 09:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redefine P2P communication and message formats after using lisk-codec
3 participants