Coder Social home page Coder Social logo

kademlia_vis's People

Contributors

kelseyc18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kademlia_vis's Issues

`join` visualisation shows incorrect distance

join step 6 visualisation shows the same value for the nearest node as for the distance:

The following nodes are the k closest to Target ID 0b011100 (28):
    0b000001 (1) - distance 1
    0b001011 (11) - distance 11
    0b010101 (21) - distance 21
    0b011111 (31) - distance 31

Should be

The following nodes are the k closest to Target ID 0b011100 (28):
    0b000001 (1) - distance 29
    0b001011 (11) - distance 23
    0b010101 (21) - distance 9
    0b011111 (31) - distance 3

I traced it to displayFinalKContacts but I don't know JS well enough to figure out what's wrong.

Round contact selection?

Hello! Thanks for this visualization, it's great to have tools like this.

I was trying to verify my understanding and tried

Looking up ID 0b110010 (50) from Node 0b110001 (49).

We will use system-wide parameters k = 4 and alpha = 3.

These are almost neighbors, but the closest neighbors for 50 are:
red:

0b000001
(1)
0b000100
(4)
0b000101
(5)
0b000110
(6)

yellow:

0b100010
(34)
0b101011
(43)

green:

0b111100
(60)
0b111110
(62)

The simulation says:

Round 1 contacts are 0b000001 (1), 0b000100 (4), 0b000101 (5).

This seems incorrect intuitively to me, and the paper seems to be ambiguous so I'm not 100% sure. My intuition is that each hop should move closer to the destination node, backing up only if those nodes don't return closer nodes themselves. So in this case I'd expect it to select nodes from the green group, then yellow.

For reference, the paper says:

The lookup initiator starts by picking α nodes from its closest non-empty k-bucket (or, if that bucket has fewer than α entries, it just takes the α closest nodes it knows of).

I think "closest" must mean the k-bucket containing nodes the same distance from the initiator as the destination is from the initiator... which I think mathematically should be closer to the destination than any other node in any other bucket.

And then I guess it would try lower-k buckets, then higher-k buckets, because all lower-k buckets will be in the same subtree compared to higher k-buckets...

I tried

0b110111 (55) from Node 0b111100 (60)

too and it selects the neighbor in the closest k-bucket but then skips to red again and ignores yellow and pink which are both closer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.