Skip to content

Conversation

nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Apr 25, 2025

This is an experiment demonstrating how we could generate deterministic relation IDs based on from, to and entity

How it works:

  1. Combines the IDs and appends an attempt counter
  2. Hashes the result
  3. Creates a UUID4 from the first 16 bytes of the hash
  4. Encode to Base58 and return if 22 chars - otherwise goes back to step one with an increased counter

Note: Do not merge until we decided if we want random or deterministic relation IDs.

@nikgraf nikgraf self-assigned this Apr 25, 2025
@nikgraf nikgraf force-pushed the ng/deterministic-relation-id branch from 56dbd1f to 7c67ea1 Compare April 25, 2025 11:28
@nikgraf nikgraf closed this Apr 29, 2025
@nikgraf nikgraf deleted the ng/deterministic-relation-id branch August 20, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant