-
Notifications
You must be signed in to change notification settings - Fork 48
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
P2P example for README? #36
Comments
These are excellent things to have documented as you experience them, thank you!! I can't answer it all exhaustively here, but at least a few pointers to help move you along:
|
Okay, I got something going:
Usage isn't particularly elegant, but not too bad either — I'm doing something like this:
|
Thanks for your code; it was helpful. |
Has anyone figured out how to hook up Telehash v3 with a public DHT? |
Are test1.json and test2.json like the links.json? |
Sort of, but iirc the links.json you are referring to is live connection state (e.g. in case you need to restart your app/server but don't want to renegotiate routing/connections). The test1.json and test2.json are just the keys for each node. They don't actually store link state, just the various generated keypairs themselves. |
I ran a modified copy of test_net_udp4.c and was able to get the mesh_add to show up on a remote machine running the router.js program. I get the message "2wxhqoe up" on the remote end. Now, I need to figure out why the link_up fails. I will probably run link_handshake or some other program that has ping support on the remote side. |
@natevw - thanks so much for your code - it is the best example I could find so far to help me understand the protocol, a simple README/Getting started page would be great! but for now I guess I am going to have to read the whitepaper :) |
@southbite I've actually written up a few page "explainer" overview on Telehash that's mostly waiting for a few (not super essential) diagrams that are still on my list. Don't know if @quartzjer has already published that somewhere or if he'd be comfortable with me publicly posting my draft to a personal gist/blog. (Note also that my draft hasn't been super thoroughly vetted for technical accuracy in every detail, but iirc the initial feedback I got was on track!) |
@natevw any news on this paper? It would be great to have some introductory documentation on Telehash, some kind of step-by-step tutorial... |
It might make sense to wait until we finish the v4 refactor that Jer keeps talking about. :-) |
@quartzjer Ping ping ping .... Still alive? |
Do we have an example on c library? |
I've gotten a bit stuck following the current README.
telehash.load
helper that does the above for me)The documentation says I need a "router to assist" if I want to connect to a hashname.
I remembered that v2 used seeds and whatnot, but I don't see https://github.com/quartzjer/telehash-seeds/ as a dependency and passing that to
telehash.load({id:"endpoint.json", links:"seeds.json"})
doesn't work as thelinks
wants a CommonJS module rather than JSON [for starters]. I also see some hints that Telehash might be doing private meshes by default now, and/or that it's using blockname for DHT perhaps instead of seeds — but blockname's documentation makes it sound like it's a way to store backup DNS A records in Bitcoin so I'm a little lost down this path. What is a router, and do I need a Bitcoin wallet/client/??? to use Telehash in this way, but what does backup IPv4 host mappings have to do with Telehash hashnames and/or keys…?Backing up to this README again, it looks like the other alternative is that I can connect directly, if I have endpoint/id-reminiscent information. Not sure about "paths" here though… I've already logged this URI thing as the first/only thing after instantiating(/starting?) my own mesh, so it seems important, but gets no further mention in the docs here. I guess I need the public keys from the file generated in step 1 above, and maybe the URI for paths? But paths is an
{}
instead of a[]
so I'm not sure how I should pass it based on the docs.This is as far as I've got today; and I'm guessing as I continue to UTSL in conjunction with the spec, things will gradually become clearer. But, while they were fresh, I wanted to document some things that were confusing to me and have slowed me down trying to play.
At this point, what I think would be helpful is if:
meshA.mesh(meshB)
thing — at this point I have only a tentative understanding of what a Telehash mesh is in the abstract, or how its been encapsulated in this JS object I know have.telehash
app code is, or does it need to be on the same LAN [the link:// URL contains only a network ip address] or what?In short, how do I get to a point where I know Telehash is "working", and then what are my options for remixing things from that point?
The text was updated successfully, but these errors were encountered: