Read GHOSTDAG merge-set colors in a Kaspa block inspector

Kaspa exposes selected-parent and merge-set information separately. An explorer should show the viewpoint from which a merge-set block was classified.

Render relationships from one block

Fetch verbose block data for X and display P as its selected parent. Draw B and R using the merge-set lists returned for X, labelling the edges with that context. Reading only parent hashes omits the classifications computed for the merge set. Preserve the displayed block hash when sharing the view.

block X: selected_parent_hash = P
merge_set_blues_hashes = [B]
merge_set_reds_hashes = [R]

Keep chain membership distinct

The verbose is_chain_block field describes selected-chain membership in the reporting node's view. It answers a different question from membership in X's blue or red merge set. A red merge-set entry by itself gives no reason to flag the block as structurally invalid.

Sources