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

Redefine P2P communication and message formats after using lisk-codec #5419

Closed
ishantiw opened this issue Jun 10, 2020 · 0 comments · Fixed by #5434 or #5514
Closed

Redefine P2P communication and message formats after using lisk-codec #5419

ishantiw opened this issue Jun 10, 2020 · 0 comments · Fixed by #5434 or #5514

Comments

@ishantiw
Copy link
Contributor

ishantiw commented Jun 10, 2020

Description

Update the content of each endpoints to

getPeers

{
  peers: {
     ipAddress: string;
     port: uint32;
  }[]
}

getNodeInfo

{
  advertiseAddress: boolean;
  networkID: string;
  protocolVersion: string;
  nonce: string;
  // custom field injected from outside
  options: {
    height: uint32;
    maxHeightPrevoted: uint32;
    blockVersion: uint32;
  },
}

updateNodeInfo

// Only accept custom field
{
  height: uint32;
  maxHeightPrevoted: uint32;
  blockVersion: uint32;
}

Handshake

It should only require below information

{
  advertiseAddress: boolean;
  port: uint32;
  networkId: string;
  protocolVersion: string;
  nonce: string;
}

Expected behavior

Actual behavior

  • Some messages are not well defined for p2p communicated and we need to finalize which fields will be required in the schema for encoding.

Steps to reproduce

N/A

Which version(s) does this affect? (Environment, OS, etc...)

5.0

@ishantiw ishantiw added this to the Sprint 21 milestone Jun 10, 2020
@ManuGowda ManuGowda removed this from the Sprint 21 milestone Jun 12, 2020
@sridharmeganathan sridharmeganathan modified the milestone: Sprint 21 Jun 15, 2020
shuse2 added a commit that referenced this issue Jun 16, 2020
…_schema

Allow custom schema in P2P constructor - Partially Closes #5419
@shuse2 shuse2 reopened this Jun 16, 2020
@shuse2 shuse2 removed the unplanned label Jun 16, 2020
@karmacoma karmacoma changed the title Redefine P2P communication and message formats after using lisk-coded Redefine P2P communication and message formats after using lisk-codec Jun 22, 2020
@sridharmeganathan sridharmeganathan added this to the Next Sprint milestone Jun 22, 2020
@sridharmeganathan sridharmeganathan modified the milestones: Sprint 22, Sprint 23 Jul 6, 2020
shuse2 added a commit that referenced this issue Jul 8, 2020
Redefine p2p communication and update nodeInfo - Closes #5419 & #5472
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.