pub fn thread_roots(
    envelopes: &Arc<RwLock<HashMap<EnvelopeHash, Envelope>>>,
    threads: &mut Threads
) -> Vec<(ThreadEntry, usize, u64)>