Skip to main content

Parent Relationships

parentHashes declare a Block’s direct relationships to parent Blocks. The normalized parent set becomes part of Block identity and connects related Blocks into a directed derivation graph.

Parent Identity

contentHash identifies canonicalized content. blockHash identifies canonicalized content together with the normalized parent set.

The same content can therefore retain the same contentHash while producing different blockHash values when its declared parents differ.

Parent relationships therefore become part of deterministic Block identity while contentHash remains unchanged. The normalized parent set binds declared lineage to Block identity without changing the identity of the underlying content.

Parent Normalization

ALX normalizes every parent reference before computing blockHash.

The normalization process:

  1. Trims leading and trailing whitespace.
  2. Converts every hash to lowercase.
  3. Validates the 0x-prefixed 32-byte format.
  4. Removes duplicate parent hashes.
  5. Sorts the final parent set lexicographically.

Equivalent parent sets produce the same normalized representation and therefore the same blockHash when paired with equivalent content. Parent order, casing, surrounding whitespace, and duplicate entries do not change the resulting Block identity.

Invalid parent hashes are rejected before Block identity is computed.

Parent Selection

Declare the direct parent Blocks that the application intends to represent as the Block’s upstream relationships.

Use an empty array for a root Block with no declared parent relationships. When representing multi-step derivation, declare direct parents rather than repeating earlier ancestors. Earlier ancestors remain reachable through the derivation graph when the required Blocks are available.

A Block may declare multiple parents when its content derives from or combines multiple upstream Blocks.

Continue with: