Skip to content

Format of Modality IDs #37

@foysavas

Description

@foysavas

Under the hood self-describing peerid like: 12D3KooWMRAdDAzYKfvPrN1R1Cf5fPC1iSLe37yUDV5FhEWsWABB

But format it like this:

  1. convert to hexadecimal
  2. copy first five hexadecimal after prefix to front
  3. prefix with 0x

Example:

  1. 002408011220ac5ad4ff4c9bb3c92ac2e18f0619ff5c7c2805c08947b01fff1d160e148dfa9a
  2. ac5ad002408011220ac5ad4ff4c9bb3c92ac2e18f0619ff5c7c2805c08947b01fff1d160e148dfa9a
  3. 0xac5ad002408011220ac5ad4ff4c9bb3c92ac2e18f0619ff5c7c2805c08947b01fff1d160e148dfa9a

as recommended by @rarepepi

Reasoning:

  1. 0x familiarity to eth devs
  2. keep self-describing key type allowing cryptographic upgrades
  3. beginning and end of key of id distinctive (example 0xac5ad...dfa9a) an key format still easy to find starting at fixed width

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions