Skip to content

Latest commit

 

History

History
98 lines (65 loc) · 3.63 KB

100.md

File metadata and controls

98 lines (65 loc) · 3.63 KB
FATIP Title Status Category Author Created
100 FAT Chain ID Derivation Standard Accepted Core Devon Katz <devonk@dbgrow.com> 8-17-2018

Summary

This standard defines how FAT token's Factom Chain ID's and other resources are derived based on a unique identifier. This standard also defines a basic hierarchical naming convention used to designate hierarchical resources on the Factom blockchain using the same derivation method.

Motivation

A standard convention for storing and locating resources on the Factom blockchain is imperative for interoperability. ChainIDs are used to look up specific chains in the Factom Blockchain and are deterministically derived from an ordered set of External IDs, also called Chain Name segments.

Specification

This standard uses Factom Chain's External IDs to deterministically generate a resource's chain IDs based on a unique set of hierarchical inputs.

Chain ID derivation

From the Factom Documentation:

A ChainID is a series of SHA256 hashes of Chain Name segments. The ChainID is 32 bytes long. The ChainID must be the hash of something to only have opaque data in the higher level block structures.

The algorithm hashes each segment of the Chain Name. Those hashes are concatenated, and are hashed again into a single 32 byte value.

Getting a ChainID from a single segment Chain Name would be equivalent of hashing the Chain Name twice.

ChainID = SHA256( SHA256(Name[0]) | SHA256(Name[1]) | ... | SHA256(Name[X]) )

The standard human readable form of a Chain IDs is hex encoded.

In the Factom Documentation, the External IDs of the first entry in a chain are called the Chain's Name Segments. We use the term External ID in this document to refer to a chain's Name Segments. Name Segments are just a special term for the External IDs of the first entry in a chain.

Hierarchical Resource Identifiers (HRI's)

We can use sequential External IDs to indicate increased specificity about the data a chain holds. For example a chain with data about a movie might use the following External IDs.

ExtId[0]="movies",
ExtId[1]="2018",
ExtId[2]="Thor Ragnarok"

This creates a directory-like structure that can be used to navigate and access resources on the Factom blockchain.

Standardized HRI's For Common FAT Resource Chains

Quoted strings indicate that the quoted text is used (without quotes) as the External ID.

Angle brackets indicate that the appropriate value described should be used as the External ID.

A single dash indicates that the External ID is not used. Using an empty External ID is possible but it is incorrect and will result in the wrong Chain ID.

Chain Description ExtID[0] ExtID[1] ExtID[2] ExtID[3] ExtID[4]
Token Chain (FATIP-0) "token" <Hex Encoded Token ID> "issuer" <Hex Encoded Issuer Identity Root Chain ID> -
FAT Index Chain (FATIP-102) "index" "FAT" - - -

Implementation

No implementation notes

Copyright

Copyright and related rights waived via CC0.