I need some more information about what happen exactly when a CID is changed with IPNS ?
I understand that the name is the hashed public key of the peer that add the content, but if i need to update this content what happen under the hood ?
I have some questions:
→ is IPNS points directly to the new CID generated ? (i.e can you explain the process behind this new pointers that points to the new CIDs)
→ What happen with the last CIDs, the GC delete it if he wasn’t pinned ?
but if i need to update this content what happen under the hood ?
A new record is created with the sequence number incremented. Any node that has an older record will drop it in favour of the one with the higher sequence number.
→ What happen with the last CIDs, the GC delete it if he wasn’t pinned ?
The IPNS record is just a pointer. The CIDs and whether they are pinned is independent from the IPNS record.
GC in one IPFS node will delete any CID it isn’t pinning even if there are IPNS records.
In other words, it’s your responsibility to ensure that the CIDs you are pointing in the IPNS record are pinned and available to the network.