-
Notifications
You must be signed in to change notification settings - Fork 456
Add get minimal peers list data for discovery process - Closes #3948 #4017
Add get minimal peers list data for discovery process - Closes #3948 #4017
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the variable name comment seems good but functional WS tets are failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional WS tests failing for blocksCommon with error
TypeError: Cannot read property 'message' of undefined at Context.it.only (test/mocha/functional/ws/transport/transport.js:243:26) at process._tickCallback (internal/process/next_tick.js:68:7)
Before it was expecting err.response.message
but now the same message could be found in err.message
though before updating simply the access path to the value we should check if we don't affect other components with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments
…_data_on_discovery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's the branch for P2P but functional:WS
are still failing as the RPC is failing differently now (returns an error instead of an error wrapped in a response) so I would recommend to create an issue to fix those tests in a different PR but for this release. (btw this tests do pass in 2.2 for example)
a8fa5bf
to
5e00024
Compare
What was the problem?
Discovery process was handling a lot unneeded information which also could make us prone to attacks.
How did I solve it?
Create a new method only used in discovery process. Peers are able to send back peer lists and minimal peer list.
How to manually test it?
npm run test:integration
Review checklist