holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

Added a few test cases dealing with bootstraps #97

Closed LuKks closed 2 years ago

LuKks commented 2 years ago

The first test "bootstrapper" is actually a dht-rpc issue which I already opened a PR there, so it could be removed from here, no problem.

I left some comments but before merging it would be appropriate to remove them. Also, before merging I could edit the helper to be able to create those tests as the other ones.

LuKks commented 2 years ago

The 1st test local bootstrap with non ephemeral server works. The 2nd test local bootstrap with ephemeral server doesn't work. Why?

Also, the others commented out tests are working and they're basically the same as the two above except that are using online bootstrap nodes. Obviously no intention to merge them and they will be removed before do so.

LuKks commented 2 years ago

@mafintosh Can you try to set up a functional bootstrap in the next server? 206.81.13.180 It's fresh from DigitalOcean

LuKks commented 2 years ago

Okay, in dht1.lukks.ar I only have this command running: hyperswarm-dht --bootstrap --host 67.205.140.151 So, no second bootstrap, no extra nodes, etc so it should not find peers which is what happens, that's ok.

The first test case it's creating one local bootstrap and it's finding the peer, why? Presumibly, all four tests have the same configuration, only 1 bootstrap without extra nodes so no one should find a peer, the unique difference is the ephemeral option changing between false and true.

LuKks commented 2 years ago

In case you don't trust dht1.lukks.ar and you want to do the remote bootstrap yourself, this is the new fresh server: 142.93.13.125 where you have SSH access and it's pointing to dht2.lukks.ar in case that's useful

LuKks commented 2 years ago

Sorry my bad, it's all working perfectly. And by now the bootstrapper tests is already in dht-rpc so no need for this PR.