Closed dansup closed 9 years ago
Routes will remain the same, public key will redirect to the ipv6 page. However there will be a list of possible nodes on an ipv6 request with multiple nodes.
Eventually ips should redirect to the public key.
There is the problem of a user adding a node that doesnt already exist, where we need the public key to add it.
Two ideas:
Public key's are the new primary key, and each ipv6 is the public alias. If multiple public keys point to the same addr, a disambiguation page will link to the proper node.
Hub previously used the cjdns ipv6 as the primary identifier (urls, routes) and the table primary key. While this worked, in theory it is possible for two unique public keys to produce the same ipv6 (very unlikely odds), I decided to address this issue now rather than it arise in the future as a bug.
A small change is the upcoming release affects the node migration, model and controller.
Use Node::whereAddr($ip)->firstOrFail() or get() instead of Node::findOrFail($ip).