Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. In the bep042 it is said,
  2.  
  3. > A DHT node which receives an ip result in a request SHOULD consider
  4. > restarting its DHT node with a new node ID, taking this IP into
  5. > account. Since a single node can not be trusted, there should be some
  6. > mechanism to determine whether or not the node has a correct
  7. > understanding of its external IP or not. This could be done by voting,
  8. > or only restart the DHT once at least a certain number of nodes, from
  9. > separate searches, tells you your node ID is incorrect.
  10.  
  11. Before bootstrap an id is generated and properly secured as described in the P "Node ID restriction".
  12. Both id and ip values, might be incorrect, but are stored, are accessible for later manipulations, and are used anyway for the bootstrap.
  13.  
  14. The bootstrap lookup takes place, find_node messages are sent, their responses contains the ip field with a value, might be errors or responses.
  15.  
  16. > Nodes that enforce the node-ID will respond with an error message
  17. > ("y": "e", "e": { ... }), whereas a node that supports this extension
  18. > but without enforcing it will respond with a normal reply ("y": "r",
  19. > "r": { ... }).
  20.  
  21. At that point the program should consider it has failed to discover its public ip, accounting for the reception of many ip fields values which are different from the one stored at beginning.
  22.  
  23. At that point,
  24. - What measures can be taken to ensure that the new ip provided by the network is correct ?
  25. - Or, is the network to be fully trusted by the consensus of the majority ? (If i get 40 responses, with 35 identical ip fields, its a majority)
  26. - is it mandatory to keep checking the ip field after bootstrap ? which is the only moment where the ip field "vote" check takes place.
  27. I could check all messages, but that makes the code more complex than what seems necessary.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement