Blue Score
Blue score is a cumulative metric derived from GhostDAG's block classification system. It counts the number of blue ancestors a block (or node) has accumulated, serving as the foundation for block ordering, node reputation, and consensus weight in the Citrate network.
Definition
In GhostDAG, every block is classified as either blue (honest, well-connected) or red (suspicious, poorly connected). A block's blue score is the total number of blue blocks in its past set -- that is, the count of all blue ancestors reachable by following parent links back through the DAG.
Blue Score of Block B = |{ A in past(B) : A is blue }|
Because the DAG only grows (blocks are never removed), blue scores are monotonically increasing. A block produced later in the DAG's history will always have a blue score greater than or equal to earlier blocks.
Block Ordering
GhostDAG produces parallel blocks, but applications need a deterministic total order for transactions. Blue score is the primary sorting key:
- Higher blue score first -- Blocks with more blue ancestors are placed earlier in the canonical order.
- Tie-breaking by hash -- When two blocks have identical blue scores (common for blocks produced in the same round), the block with the lower hash value comes first.
This produces a consistent, deterministic ordering that every node in the network computes identically.
DAG: [B1]---[B3]---[B5]
\ / \ /
[B2]---[B4]
Blue scores: B1=1, B2=1, B3=3, B4=3, B5=5
Order: B1, B2, B3, B4, B5 (ties broken by hash)
Node Reputation
While blue score is defined per-block, Citrate extends the concept to node reputation by tracking the cumulative blue score of all blocks a node has produced. A node's reputation score reflects its history of honest participation:
- High blue score indicates the node consistently produces well-connected blocks, responds to inference requests accurately, and provides valuable mentorship signals.
- Low blue score suggests the node is frequently disconnected, produces blocks that end up in the red set, or submits poor-quality inference results.
Node reputation is recalculated at each finality checkpoint and stored in the LVM's reputation state dimension.
Consensus Weight
Blue score directly influences a node's weight in consensus decisions:
| Mechanism | How Blue Score Affects It |
|---|---|
| Mentorship signal weight | Higher-reputation nodes' signals carry more influence in Paraconsensus aggregation |
| Adapter aggregation | Adapter updates from high-score nodes receive proportionally more weight in federated averaging |
| Validator selection | Nodes with higher blue scores are preferentially selected as checkpoint validators |
| Fee distribution | Model providers with higher reputation attract more inference routing |
Sybil Resistance
Blue score provides a natural defense against Sybil attacks (where an adversary creates many fake identities to gain disproportionate influence). Creating a new node is cheap, but building blue score is expensive because it requires:
- Consistent block production -- The node must produce blocks that are well-connected to the rest of the DAG, which requires real-time participation and low-latency network connectivity.
- Accurate inference -- Mentorship signals from the node must demonstrably improve network accuracy, which requires actual computational resources and model quality.
- Time -- Blue score accumulates over the full history of the DAG. A freshly created Sybil node starts at zero and cannot shortcut its way to a meaningful score.
An attacker who splits their resources across N Sybil nodes will find that each node accumulates blue score at roughly 1/N the rate of a single honest node with the same total resources. The attack gains no advantage -- it actually performs worse due to coordination overhead.
Blue Score vs. Stake
Blue score and token stake are complementary but distinct:
| Property | Blue Score | Stake |
|---|---|---|
| Source | Earned through participation | Deposited as collateral |
| Transferable | No | Yes |
| Can be lost | Degrades with inactivity | Slashed for misbehavior |
| Time dependency | Accumulates over full history | Instant once deposited |
| Sybil cost | Linear in resources | Linear in capital |
Both mechanisms contribute to a node's overall influence, but blue score captures something that stake alone cannot: demonstrated competence over time. I think this is one of the most important design decisions in the protocol -- you cannot buy reputation, you have to earn it.
Querying Blue Score
Smart contracts can read any node's blue score via the ConsensusOracle precompile:
uint256 score = IConsensusOracle(0x0104).blueScore(nodeAddress);
This allows applications to gate access, set fee tiers, or weight voting based on on-chain reputation.
Further Reading
- GhostDAG Consensus -- the DAG protocol that produces blue/red block classifications
- Paraconsistent Consensus -- how blue score weights mentorship signals
- Finality Checkpoints -- when blue scores are recalculated