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

send record fixes to peers who send outdated records #1977

Merged
merged 2 commits into from
Dec 29, 2015

Conversation

whyrusleeping
Copy link
Member

Peers who send records with expired validity are currently not sent a 'fixup' record after a peer does a get operation. This makes invalid records just return a blank record so that the later fixup logic can send them a better record.

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

@jbenet jbenet added the status/in-progress In progress label Nov 19, 2015
return nil, nil, err
// still return a non-nil record to signify that we received
// a bad record from this peer
record = new(pb.Record)
Copy link
Member

Choose a reason for hiding this comment

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

ooof-- that embeds a weird/non-obvious assumption here. what about returning a special error, and catching it later

Copy link
Member

Choose a reason for hiding this comment

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

also, an invalid record should not necessarily be the same as an empty record, malicious peers who send invalid stuff should maybe not be talked to, etc. we may want to deal with them specially later (distinct from a valid but empty record)

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, i agree here. Finding a clean way to do this is hard... :/

@ghost ghost added topic/dht Topic dht RFM labels Dec 22, 2015
@whyrusleeping whyrusleeping force-pushed the dev0.4.0 branch 2 times, most recently from 68b9745 to b0a8591 Compare December 28, 2015 14:36
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
whyrusleeping added a commit that referenced this pull request Dec 29, 2015
send record fixes to peers who send outdated records
@whyrusleeping whyrusleeping merged commit 69e3672 into dev0.4.0 Dec 29, 2015
@whyrusleeping whyrusleeping deleted the fix/record-accounting branch December 29, 2015 21:34
@jbenet jbenet removed the status/in-progress In progress label Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants