1. 0

    Unfortunately the bootstrap node that DHT uses must be hardcoded and is a central point of failure.

    1. 2

      Or just post the IP on a website and let a user copy-paste it. (Yes, I am aware of the difficulties of getting a user to do anything sensible ;-) )

      1. 3

        that’s a good idea, sort of like how 8.8.8.8 is manually spread around as google’s open DNS.

        the comparison to DNS is apt, DHT is a name resolution system similar to DNS.

        DNS : names->ips :: DHT : hash->peers

        1. 2

          Encode the IP address as base32 or a hashid or something and tell them it’s a secret code!

        2. 2

          it is a central point of failure for the first time connecting to a DHT network, but subsequent connections can be initiated with previously found peers (some clients do this)

          1. 1

            Not necessarily, there are certainly methods to not need bootstrap nodes as long as you can make some assumptions like “AWS IP space would have a node in it” and then scan likely IP spaces for nodes.

            1. 1

              I tried a few decentralised chat clients a year back to see what they were like. I recall one program taking hours to find my other device (user). This wasn’t remarked well in the docs, it just mentioned you had to wait :P


              Sidenote: I specifically remember the Tox clients. Voicechat was a feature I tested with a friend, but things kept breaking. Voice streams kept becoming one-way after random periods of time and transferring a file was unreliable and would make the voice stream become unreliable.

              It would be interesting to have a look at how things are since then.

              EDIT: other memories:

              • Ring: big browser app only, couldn’t get it to compile on my distro (Void). Website didn’t offer generic pre-built options, instead told me to use my package manager in my distro (of which only a few were listed). Hope it’s still not a giant webapp (electron?) thing.
              • Retroshare: feature-filled, didn’t fully test. Looked interesting, not much publicity.
              • Qtox and Utox had different/unique bugs.
              • Nothing beat or matched running a murmur server + using mumble in terms of convenience or reliability. Alas I’m annoyed about how many deps this software requires: half of Google IIRC, a pain to compile from scratch on distros that don’t package it (alpine?).
              1. 1

                that’s still a hardcoded central point of failure, just one that is more robust against failures

                1. 1

                  It’s not that hardcoded, as long as some node is reachable on the internet without NAT traversal, you can establish connection to the network.

                  1. 1

                    you’d be hardcoding a specific IP space to use, which could easily be blocked by a malicious ISP. if you don’t have access to IPv4, only IPv6, then you can’t scan the internet looking for a node either.

                    1. 1

                      you hardcode some specific IP space to use first and blacklist problematic IPs, otherwise I don’t see how ISPs would go about blocking it. We’re talking /8 Spaces.

              2. 1

                You can easily hardcode a fairly large list of bootstrap nodes. It compresses well.

                1. 1

                  and a malicious ISP could easily block all the nodes on that list

                  1. 1

                    …or do DPI and block DHT traffic anyways. However, circumvention and obfuscation is out of the scope of the article.

              1. 3

                Here’s my term paper that I wrote about dat a couple years ago, if there’s interest: https://bernsteinbear.com/dat-paper/

                1. 3

                  lovely, thanks for sharing! looking forward to reading this

                  1. 2

                    just read it, thanks for sharing! adding a link to this on the page

                    1. 1

                      Cool! I’m glad you enjoyed.

                  1. 1

                    Somewhat unrelated but why is this website trying to play audio in my browser?

                    1. 2

                      There are looping muted videos (“gifs”), but nothing that plays any audio. A speaker icon for audio doesn’t appear in Firefox and Chrome at least

                    1. 2

                      Thanks for the post. I am writing my own 3D modelling software from scratch, and I needed some of this information.

                      I’m confused about why I would want a near clipping plane for a perspective view. In real life, objects don’t disappear when they get too close to my eye or too close to the lens of a camera, so why would I want my software to work that way? Maybe it is a technical limitation of how OpenGL renders triangle meshes. If that’s the issue, I can ignore it since I’m using signed distance fields and sphere tracing, not triangles.

                      1. 4

                        Keep in mind that OpenGL dates from the mid-90s, where 16-bit depth buffers were still quite common, and Z-fighting was a regular occurrence. The clipping planes were how you conserved the depth-buffer precision.

                        Nowadays most GPUs have enough precision that it doesn’t matter as much, although I have heard of some people cleverly using clipping planes for “slab” rendering.

                        1. 1

                          real life doesn’t have near and far planes, but they do provide a minimum and maximum Z values (z/w, or -1 to 1 in OpenGL, 0 to 1 in DirectX I think) during the clip space -> NDC transformation[0]. Entire objects can be culled if outside this range, and vertices clipped/discarded. Maybe something like the infinite projection matrix[1] works around that

                          [0] https://jsantell.com/model-view-projection#projection [1] http://www.terathon.com/gdc07_lengyel.pdf

                          1. 3

                            That’s what Unreal Engine uses, you don’t have a far plane to setup (which is great) and they have a reversed Z buffer to increase precision overall.

                        1. 4

                          Wow this may be one of the nicest articles on 3D I’ve seen.

                          Would be nice to include the several different transforms that happen (model, world, camera - with their proper names of course) and the visualizations :D

                          1. 5

                            Glad you enjoyed it! :)

                            This started as some notes on asymmetric projections, but first I had to write about projections, and then, well, I need to cover model view projection[0], and then, dang, I guess I first need basic matrix transformations[1] too :)

                            [0] https://jsantell.com/model-view-projection [1] https://jsantell.com/matrix-transformations

                            1. 2

                              Oh [0] is what I was talking about! Damn man, this is so, so, sooo nice.