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

File comparison when forbans are updated #1

Open
makew0rld opened this issue Nov 14, 2018 · 2 comments
Open

File comparison when forbans are updated #1

makew0rld opened this issue Nov 14, 2018 · 2 comments
Labels
bad UX Forban works without it, but it could cause unexpected, unwanted, behaviours

Comments

@makew0rld
Copy link
Owner

makew0rld commented Nov 14, 2018

As can be seen in this line and beyond, the only comparison made on a file basis is whether the local file is smaller or not. This is simplistic and will easily break apart in situations where a remote updated file stays the same size but changes in content, or reduces in size. This should be replaced by a hash per file system, or more eloquently, a full hash tree for each forban, so each file doesn't have to be analyzed.

@makew0rld makew0rld added the bad UX Forban works without it, but it could cause unexpected, unwanted, behaviours label Nov 15, 2018
@makew0rld
Copy link
Owner Author

Mentioned it in the original Forban repo here.

@makew0rld
Copy link
Owner Author

makew0rld commented Nov 15, 2018

The hash tree would need to be versioned, to prevent out-of-date nodes from distributing old information. Of course, the versioning could still be faked, but it works within the frail trust everyone model.

How would it be versioned? It could just be that the Forban index file would contain a hash and a version number along with the filepath and size already listed in the index file. Then mirroring nodes would just ensure that the remote file version number is higher then the local one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad UX Forban works without it, but it could cause unexpected, unwanted, behaviours
Projects
None yet
Development

No branches or pull requests

1 participant