Canonical Data Sources
Different parts of worker state come from different contracts. If you only query contract storage through ABI calls, you will not be able to reconstruct full job and session history.How To Think About Worker State
A worker is practically assignable when all of the following are true:- the worker is registered
- the worker is not jailed
- the worker meets the global minimum stake
- the worker supports the model
- the model is whitelisted
- the worker is currently in the eligible set for that model
CodeHTML
- CodeHTML
Core Read Functions
These reads are the foundation of a worker explorer.Eligibility Set Semantics
Each model has anCodeHTML
CodeHTML
- workers are appended when added
- removals use swap-and-pop
- ordering is not stable
- list position should never be treated as meaningful
[!TIP] Usefor reconciliation, not as your only source of history.CodeHTML
For historical views, keep your own indexed cache from events.
What Changes Eligibility
A worker enters a model's eligible set when:- the worker is registered
- the worker calls CodeHTML
- the model is whitelisted in CodeHTML
- the model is enabled in CodeHTML
- the worker's stake is at least CodeHTML
- the worker calls CodeHTML
- the worker deregisters
- slashing drops stake below the minimum
- the worker is jailed
CodeHTML
Registration, Stake, And Jail Flow
Register
CodeHTML
- requires a non-empty key
- requires CodeHTML
- stores one global stake amount for the worker
Top Up
CodeHTML
- increases global stake
- can re-add the worker to supported models if eligibility had been lost due to low stake
Withdraw
CodeHTML
- allows stake withdrawal
- cannot reduce remaining stake below the minimum if the worker still supports any model
Deregister
CodeHTML
- requires CodeHTML
- removes the worker from all eligible sets
- returns the remaining stake
Slash And Jail
OnlyCodeHTML
CodeTEXT
- slash size is based on the global minimum stake, not the worker's current stake
- if the slash exceeds current stake, it is capped at current stake
- offense count increases on each slash
- workers can be removed from eligibility when stake falls below minimum
- workers are jailed when offense count reaches the configured threshold
Model Availability Caveat
Explorers should show both model flags separately:- CodeHTML
- CodeHTML
CodeHTML
- whitelist present
- model enabled
CodeHTML
- CodeHTML
A model disabled in config is not automatically removed from the eligible set.
For explorer UIs, this means a worker can still look assignable unless you display both model-control layers.
Events You Should Index
Because job and session structs are not publicly exposed through getters, index these events.Session events
Job events
Reconstructing Job State
A practical event-driven state machine looks like this:CodeTEXT
- can release bothCodeHTMLandCodeHTMLjobsCodeHTML
- jobs become releasable after the dispute windowCodeHTML
- jobs become releasable immediatelyCodeHTML
- disputed timeout handling can emit instead ofCodeHTMLCodeHTML
Earnings And Accounting
Explorer UIs should separate three balances:- worker stake in CodeHTML
- worker earnings credited inside CodeHTML
- slashed funds accumulated by the protocol
- is not exposed through a public getterCodeHTML
- is not exposed through a public getterCodeHTML
- worker earnings should be reconstructed from andCodeHTMLCodeHTML
- burn totals should be reconstructed from CodeHTML
Recommended UI Fields
For a worker detail page, the most useful fields are:- registration status
- current stake
- encryption key presence
- supported models
- eligible models
- active job count
- jailed flag
- jailed-until timestamp
- offense count
- slash history
- earnings history
- CodeHTML
- CodeHTML
- eligible worker count
- eligible worker addresses
- recent job activity from indexed session and job events
Related Guides
Last updated: March 2026