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

Safer and more efficient healing #874

Merged
merged 15 commits into from
Jan 30, 2024
Merged

Conversation

ArneBab
Copy link
Contributor

@ArneBab ArneBab commented Oct 29, 2023

With the healing changes in 1497 there’s much more healing traffic for large files. But that brings new risks with it.

This PR tries to address them.

 * Specialize Healing to the fraction of the keyspace in which we would receive the inserts
 * if we were one of 5 long distance nodes of an actual inserter.
 *
 * If an opennet node is connected to an attacker, healing traffic could be mistaken for an insert.
 * Since opennet cannot be fully secured, this should be avoided.
 * As a solution, we specialize healing inserts to the inserts we would send if we were one of 5 
 * long distance connections for a node in another part of the keyspace.
 *
 * As a welcome side effect, specialized healing inserts should take one hop less to reach the
 * correct node from which loop detection will stop the insert long before HTL reaches zero.

@ArneBab ArneBab changed the title Safer healing Safer and more efficient healing Oct 29, 2023
src/freenet/client/async/SimpleHealingQueue.java Outdated Show resolved Hide resolved
src/freenet/client/async/SimpleHealingQueue.java Outdated Show resolved Hide resolved
src/freenet/client/async/SimpleHealingQueue.java Outdated Show resolved Hide resolved
src/freenet/client/async/SplitFileFetcher.java Outdated Show resolved Hide resolved
This enables much cleaner testing by actually testing the public API.

Thanks to Bombe for the review!
@ArneBab ArneBab merged commit aa28524 into hyphanet:next Jan 30, 2024
1 check passed
@ArneBab
Copy link
Contributor Author

ArneBab commented Jan 30, 2024

Merged — thanks a lot for your reviews!

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.

2 participants