Skip to main content

Block Identity

ALX defines two deterministic identities for each Block:

  • contentHash — Identifies canonicalized content independently of declared parent relationships.
  • blockHash — Identifies canonicalized content and the normalized parent set.

Identical content produces the same contentHash. A different normalized parent set produces a different blockHash.

Identity Derivation​

ALX computes both hashes with Keccak-256 over a domain tag followed by canonical bytes. \0 is one zero byte (0x00), and || is byte concatenation. parentHashes is normalized before canonicalization. protocolVersion is excluded from both inputs. See Canonicalization and Parent Relationships for the byte and normalization rules.

contentHash = keccak256(UTF8("ALX-CONTENT-V1\0") || canonicalize(content))
blockHash = keccak256(UTF8("ALX-BLOCK-V1\0") || canonicalize({ content, parentHashes }))

Example​

The same content under two parent sets shares one contentHash, and the two blockHash values differ. The identity suite in Conformance Vectors covers further cases.

content bytes {"task":"summarize"}
contentHash 0x5cff64d0ba6c2002bca1e990cdccfd890c2eb11aaf65b1410682a7729bd126b2

Root Block
blockHash bytes {"content":{"task":"summarize"},"parentHashes":[]}
blockHash 0x4b40e17a97733bcc1c3334221341bf7d7ba62390347fead0c2dcebbbfd210b25

Block with one parent
blockHash bytes {"content":{"task":"summarize"},"parentHashes":["0x2ea8df928f1a68f3fbbbbb2ae5938e817e1633a4066590cd2b22f6fa526aa8aa"]}
blockHash 0x84ee19cabb89367925f79a27e0b7d43d075cb8842ce056a468db6b7355663f5a

Hash Format​

Both hashes are 0x followed by 64 lowercase hexadecimal characters: a 32-byte digest. ALX uses Keccak-256 with the original Keccak padding. FIPS 202 SHA3-256 uses different padding and produces different digests.

blockHash, contentHash, attestation digests, and Merkle values share this text format but are distinct types. Implementations must not substitute one hash type for another.

Hash Selection​

OperationUse
Compare canonicalized contentcontentHash
Compare complete Block identityblockHash
Distinguish the same content under different parentsblockHash
Reference a parent Block in parentHashesblockHash
Validate a BlockRecompute both hashes
Verify Graph relationshipsvalidateGraph()

Verification Scope​

Matching hashes establish deterministic correspondence between recorded identities and protocol-defined inputs. Block identities do not establish factual accuracy, authorship, ownership, authorization, approval, trust, or legal validity.