What happens with links to/from removed entries

Hey everyone,

Some time ago @guillemcordoba mentioned here that it might not be necessary to remove links to a deleted entry, but this needs to be clarified. Considering that in Holochain data isn’t actually deleted, idea to avoid committing multiple deletion entries sounds reasonable. But then it would probably make link retrieval more expensive because there’d be another check to perform (is this link to/from a deleted entry?).

I tried to dig into holochain-rust code to answer my question but I’m not sure what to make of my findings.

I found an internal method invoke_remove_entry that is triggered when remove_entry is called in hApp code. I see that it only works with the entry being deleted and doesn’t do anything about it’s links.

So I’ve thought: if links aren’t marked when entry gets deleted, maybe link retrieval takes care of this filtering? I checked a method invoke_get_links in the same crate, wandered around a little bit and got to a enum LinksStatusRequestKind that defines types of get links requests. And seems like LinksStatusRequestKind::Live might be a request type that would only display links that are not tied to deleted entries. But that’s where I realized that I’m drowning in the code I know nothing about and decided to clarify it on the forum.

So, the questions I want to clarify:

  1. does anything happen to a link when it’s base is deleted? (a.k.a. link from deleted entry)
  2. does anything happen to a link when it’s target is deleted? (a.k.a. link to deleted entry)
  3. are links to/from deleted entries considered to be Live?

Cheers!