A feature of the greedy routing Application that will enable route tracing. There are three ways it can work.
Option 1: each node modifies and forwards a Package
This is more efficient and utilizes less traffic over all.
- The initiator creates a Package with an operation flag; an encoded Packet with source address, destination address, ttl, and routing metric; and an empty list of witnessing nodes, then sends that Package to the next node that would receive a datagram being routed toward the destination address.
- The next node then decodes the internal Packet, decrements the ttl, re-encodes the modified Packet, adds its address to the list of witnesses, then sends that Package to the next node that would receive a datagram being routed toward the destination address.
- Step 2 repeats until it reaches the destination address or encounters an error, at which point the result is sent to the initiator.
Option 2: the initiator contacts each node in the path separately
This is more verbose and thus more useful for debugging and partially mapping the network (i.e. may be able to detect routers that are never used and those that are always used).
- A next-hop reporting system is added to the protocol such that a node can request and receive the next hop along a path from another node.
- The initiator of the route trace sends a next-hop request to the first hop in the path.
- The initiator then sends a next-hop request to that node.
- Repeat until the reported next hop is the destination.
Option 3: snitch on your peers
This is probably too invasive as it will allow anyone to create a complete map of the entire network, and the curiosity may cause enough people to do it and cause congestion. This could be alleviated by protecting it by an admin public key, but that may still be too powerful if this project catches on and gets deployed at scale.
- A visible peer reporting system is added to the protocol such that a node can request and receive a list of visible peers from any other node, which will contain those peers' addresses and public keys.
- The initiator of the route trace requests the peer list from the first hop in the path.
- The initiator then calculates the next hop from that peer list and requests a peer list from that node.
- Repeat the process until the whole path has been mapped (along with collecting the addresses and public keys of all the peers of every hop in that path).