Can someone help me understand DHTs with Byzantine fault tolerance? I read the wikipedia pages but they it didn't quite click for me. I'm also new to writing P2P stuff. (I also posted this on >>>/prog/5299, feel free to reply there. Reposting here because maybe some anons don't check /prog/.)
What is the algorithm, exactly? So I write a bunch of servers that all store some values with some keys and listen on a port. Then I want to query a key.
1. Do I send that key to every server and see which one replies? That sounds very inefficient if I have millions of servers all retrieving values frequently.
2. Is there a way to make it so that the server can't see the information it stores? I suppose I could somehow break up the file but now every query requires many more connections. Would it work if I encrypt the file and break it up into a small number of pieces, say 2, and store each piece on a different server? Even if an individual knew the key it couldn't decrypt even the part that it has.
3. How do I know the IPs of the servers without having a centralized directory?
4. What if the servers sometimes go offline? Is it enough to just store the same key-value on multiple peers and hope that at least one will be up?