Specification
Before we had the concept of a remote field on a vault, we were intending to preserve the vault ID of a cloned vault, such that they retain their unique identity in the global Polykey network. However, now that we're using the remote field for a vault, we can remove this.
For example, if a node A has a vault with ID id1 and shares this vault with B, when cloning, the local, cloned version on B will have a completely different ID.
Recall that a cloned vault is intended to be immutable. We've had discussions on what the presence of a remote field actually indicates. If a remote field is set (i.e. not undefined or missing), then this will indicate that a vault is a cloned/synchronised vault (i.e. originally coming from some other node). Therefore, any vault with a remote field set should be immutable.
Additional context
Tasks
- Remove the preservation of vault ID on clone
- Set a new vault ID on clone
- Set the
remote field to be nodeID + vaultID
- Make the vault immutable
Specification
Before we had the concept of a
remotefield on a vault, we were intending to preserve the vault ID of a cloned vault, such that they retain their unique identity in the global Polykey network. However, now that we're using theremotefield for a vault, we can remove this.For example, if a node
Ahas a vault with IDid1and shares this vault withB, when cloning, the local, cloned version onBwill have a completely different ID.Recall that a cloned vault is intended to be immutable. We've had discussions on what the presence of a
remotefield actually indicates. If aremotefield is set (i.e. not undefined or missing), then this will indicate that a vault is a cloned/synchronised vault (i.e. originally coming from some other node). Therefore, any vault with aremotefield set should be immutable.Additional context
remotefield as an indicator for immutability https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/205#note_688569888 (see the notes just below "cloned vaults are immutable")Tasks
remotefield to benodeID + vaultID