View Issue Details

IDProjectCategoryView StatusLast Update
0007136GNUnetDHT servicepublic2022-02-26 23:10
Reporterschanzen Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.16.0Fixed in Version0.16.0 
Summary0007136: Distance metric update
DescriptionWe had offline discussions wrt the distance metric. Currently it is measured as uint64_t.
I _think_ we said we want to change this to 512 bit (HashCode, same length as keys to compare) and use a more basic XOR metric.
Tagslsd0004

Activities

schanzen

2021-12-31 15:18

administrator   ~0018612

Last edited: 2021-12-31 15:19

I also think the function definition is currently flawed and can be misunderstood:
The "bucket" argument is not really referring to a bucket, but an offset to check.
The get_distance() is preceded in the code by a matching_bits() call in order to find a "bucket": https://git.gnunet.org/gnunet.git/tree/src/dht/gnunet-service-dht_neighbours.c?id=9e0d7d411363999bca89f7e7b4e2896b8f6ec931#n1019

Now, IF matching_bits() is more efficient to call than the loop from index 0 in get_distance() we should do that, of course. But in get_distance()!
Because a caller may assume the get_distance() "bucket" argument has actually something to do with buckets and will never know that instead of calling find_bucket() the matching_bits() function must be called to get an offset.

It is just bad function signature design.

I propose to simplify the get_distance() function to ONLY take two keys as argument.

Christian Grothoff

2022-01-03 14:39

manager   ~0018624

I believe this has been resolved.

schanzen

2022-02-26 23:10

administrator   ~0018742

0.16.0 released

Issue History

Date Modified Username Field Change
2021-12-31 09:24 schanzen New Issue
2021-12-31 09:24 schanzen Status new => assigned
2021-12-31 09:24 schanzen Assigned To => Christian Grothoff
2021-12-31 09:24 schanzen Tag Attached: lsd0004
2021-12-31 15:18 schanzen Note Added: 0018612
2021-12-31 15:18 schanzen Note Edited: 0018612
2021-12-31 15:19 schanzen Note Edited: 0018612
2022-01-03 14:39 Christian Grothoff Note Added: 0018624
2022-01-03 14:39 Christian Grothoff Status assigned => resolved
2022-01-03 14:39 Christian Grothoff Resolution open => fixed
2022-01-03 14:39 Christian Grothoff Fixed in Version => 0.16.0
2022-02-26 23:10 schanzen Note Added: 0018742
2022-02-26 23:10 schanzen Status resolved => closed