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

fix verification network behaviour: #1348

Merged
merged 3 commits into from
Feb 17, 2017
Merged

fix verification network behaviour: #1348

merged 3 commits into from
Feb 17, 2017

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Feb 17, 2017

  • use up to 10 connections only
  • save state (do not ask same nodes after restart)
  • initiate on time based intervals (every 5 minutes) instead of new blocks (should keep connections alive longer)

This address complains that some vps providers consider such activity (a lot of very short-life connections) a ddos-attack.

- use up to 10 connections only
- save state (do not ask same nodes after restart)
- initiate on time based intervals (every 5 minutes), based not on new blocks (should keep connections alive longer)
@thelazier
Copy link

I found that we will send verify more than one to some nodes.

Ex: Rank#1 starts sending from Rank#11 and Rank#2 starts sending from Rank#21. 
If there Rank#14 is verified and get skipped by verified/banned,
then Rank#1 will also send verified to Rank#21 which is already verified by Rank#2.

My solution is ...

Rank#1 starts sending from Rank#11,
then next to Rank#n+MAX_POSE_CONNECTION (#21,#31,#41,#51,...),
until nCount = MAX_POSE_CONNECTION. 

This way Rank#1-#10 will not send verify duplicate with other Rank#, IMO.

@UdjinM6
Copy link
Author

UdjinM6 commented Feb 17, 2017

Actually no,

if(netfulfilledman.HasFulfilledRequest(addr, strprintf("%s", NetMsgType::MNVERIFY)+"-request")) {

should take care of recent connections.

And mWeAskedForVerification is serving different purpose, reverted serialization.

EDIT: but thanks for bringing my attention to this again :)

@thelazier
Copy link

Actually, I don't mean that a node will duplicate send to same MN for verify again, I mean node A on Rank#1 and node B on Rank#2 could send verify-request to node C on Rank#21 in same period of time. So, node C need to calculate verify response twice while it should calculate only once for verify-request from node B :)

@UdjinM6
Copy link
Author

UdjinM6 commented Feb 17, 2017

Ah, I see now :)

Copy link

@tgflynn tgflynn left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit 91f7e57 into dashpay:v0.12.1.x Feb 17, 2017
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.

3 participants