Understanding the shape of a DAG without having to download it is extremely beneficial in cases where the DAG is too large and or the transport of the entire DAG is too time-consuming. This is specifically true for blockchain-like DAGs that have a single link to previous, e.g. Network Indexer advertisement chain. For example, such a selector would allow storetheindex to efficiently estimate how far behind it is in processing advertisements of a provider without having to download the entire chain first.
Add the ability to get the depth of a DAG, recursing an edge from some given root with optional stop node.
Understanding the shape of a DAG without having to download it is extremely beneficial in cases where the DAG is too large and or the transport of the entire DAG is too time-consuming. This is specifically true for blockchain-like DAGs that have a single link to previous, e.g. Network Indexer advertisement chain. For example, such a selector would allow storetheindex to efficiently estimate how far behind it is in processing advertisements of a provider without having to download the entire chain first.
Add the ability to get the depth of a DAG, recursing an edge from some given root with optional stop node.