ARK-Builders / ARK-Builders/ark-core

Add Conditional Collision Tracking Compilation Flag to `fs-index`

Open
#64 1 comment 1 reaction 1 assignee Claimed by @tareknaser View on GitHub
Dominant language
Rust
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

## Description
Currently, `fs-index` keeps track of collisions regardless of the hash function used to compute the resource ID, whether it's cryptographic or not.
This adds unnecessary computation in some cases. For cryptographic hash functions, there are no collisions, so this part can be ignored.
> Note: some users might still want collision counting to track files with the same content.

## Plan
We plan to include a compilation flag in the `fs-index` crate to manage collision tracking. This was initially intended for #42, but we postponed it until we update the `ResourceIndex` API, which will simplify the collision tracking code. For more details, see [this comment](https://github.com/ARK-Builders/ark-rust/pull/42#issuecomment-2120833547).

## Notes
- The compilation flag might be better named `collision-counting` since it will now only track the number of occurrences of the same hash.
- An alternative approach could be to create a separate crate for the different implementation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.