LithosDocs
ProtocolPayoutsTokenStatsDocs
Start mining
Documentation home
Protocol
  • Lithos Protocol
  • LFSM
    • Rollups
    • NISPs
    • Emissions
    • Mining on Lithos
    • Candidate building
    • Ergo Voting
  • LithosDex
    • Trading with orders
    • Providing liquidity
Run Lithos
  • Startup guide
    • Setting up an Ergo testnet node
  • Configuration
    • Node connection and security
    • Stratum and difficulty
    • Block packages
    • Batching and orders
    • Collateral and emission
    • Wallet and consolidation
    • Statistics and web panels
    • Synchronization and storage
    • Tasks and dispatchers
    • Failure modes
    • Reporting issues
Client API
  • Overview
    • getLithos client information
    • getList UTXO ids for blocks
    • getUTXO ids by block height
    • getBlock info by UTXO id
    • postBlock info for multiple UTXO ids
    • getGet a block's miner set
    • getList all pool blocks
    • getGet Lithos payouts
    • getStatistics overview
    • getMining and payment totals
    • getMining statistics by hour or day
    • getEstimate Lithos hashrate
    • getNetwork difficulty by epoch
    • getThis client's own hashrate
    • getThis client's hashrate over time
    • getThis client's payouts and claims
    • getCollateral inventory
    • getLocal mining activity
    • getCollateral market snapshot
    • getList queue boxes
    • getList the active set
    • getPermit price history
    • getYour locked block rewards
    • postClaim unlocked block rewards
    • postQuote joining the queue
    • postJoin the collateral queue
    • getLithosDex pool state
    • getLithosDex fee vault state
    • getList your outstanding orders
    • postQuote a swap order
    • postPlace a swap order
    • postQuote a deposit order
    • postPlace a deposit order
    • postQuote a redeem order
    • postPlace a redeem order
    • postCancel an order
    • postQuote a swap
    • postQuote a swap by desired output
    • postExecute a swap
    • postQuote a liquidity deposit
    • postDeposit liquidity
    • postQuote a liquidity redemption
    • postRedeem liquidity
    • getList liquidity provisions
    • postClaim settled fees for a provision
    • postQuote a provision resize
    • postResize a provision
    • postCheck a pending fee flush
    • postFlush pending fees to the vault
    • getPool-wide fee history
    • getPool price history
    • getRecent pool activity
    • getFee history for one provision
    • getWallet balances and lending status
    • getGet Stratum information
    • getGet candidate settings
    • getGet difficulty commitment
    • postCommit a difficulty
    • getGet best NISP at height
Lithos

A decentralized mining pool protocol on Ergo. Miners build their own blocks; contracts pay them for proven work.

Live on Ergo mainnet
Protocol
  • How Lithos works
  • Mining on Lithos
  • NISPs
  • Emissions
  • LFSM contracts
Run Lithos
  • Startup guide
  • Configuration
  • LithosDex
  • Client API
  • Failure modes
Network
  • Live stats
  • Public stats API
  • Ergo Platform↗
  • SOAT Miner↗
Community
  • Telegram↗
  • X / Twitter↗
  • GitHub↗
Lithos
© 2026 Lithos Protocol. Open source under the MIT licence.λίθος — stone
Docs/Client API/Statistics

Network difficulty by epoch

get/stats/mining/difficulty

The network difficulty curve, one point per difficulty epoch. Ergo only readjusts difficulty on epoch boundaries, so every block inside an epoch carries the same value and one record describes all 128 of them. That makes the table cheap enough to keep for years — it is not bounded by the history retention window the other statistics use.

Each epoch carries its height range, its first and last block timestamps, and hashesPerSecond: the work of the epoch's block intervals divided by the time those same intervals took. Use it for network hashrate as well as difficulty; the two differ only by how long the blocks took.

current is the epoch in progress. It is recomputed on every collection cycle rather than stored, so it is the only entry that can still change, and its complete is false. Stored epochs stay a full epoch behind the tip so a reorg cannot rewrite one.

Indices count epochs from height 1. With no range the newest limit epochs are returned. oldestIndex and newestIndex report what the table actually holds, and backfillComplete says whether it has finished walking back to its floor — on mainnet that floor is the EIP-37 activation, below which epochs were 1024 blocks long and are not described here.

Query parameters

  • frominteger · int32

    First epoch index to include. Clamped to oldestIndex.

  • tointeger · int32

    Last epoch index to include; defaults to newestIndex and cannot exceed it.

  • limitinteger · int32default 256

    How many epochs to return, counted back from to.

Responses

200The requested epochs, oldest first, plus the epoch in progress.DifficultyEpochHistory▶
  • ▶
    sourceMiningCursorrequired

    The processed chain point a statistics result was read from.

    • heightintegerrequired
    • blockIdstringrequired
    • parentIdstringrequired
    • timestampinteger · int64required

      The block's own timestamp in Unix milliseconds, not the time the client read it.

  • epochLengthintegerrequired

    Blocks per epoch. 128 on mainnet since EIP-37, and on testnet throughout.

  • ▶
    epochsDifficultyEpoch[]required

    Stored epochs in the requested window, oldest first. A gap means that epoch is not held.

    • indexinteger · int32required

      Epoch number, counting from height 1. Epoch n spans heights 128n + 1 to 128n + 128.

      0 – …
    • startHeightintegerrequired

      First block of the epoch, and the one whose header supplied difficulty.

    • endHeightintegerrequired

      Last block of the epoch, or the current tip while the epoch is still in progress.

    • startTimestampinteger · int64required

      Timestamp of startHeight, in Unix milliseconds.

    • endTimestampinteger · int64required

      Timestamp of endHeight, in Unix milliseconds.

    • difficultystringrequired

      Required difficulty for every block in the range, as an exact decimal integer.

      decimal string
    • completebooleanrequired

      False only for the epoch in progress, whose endHeight still moves with the tip.

    • hashesPerSecondstring

      Network hashrate across the epoch: difficulty × (endHeight − startHeight) divided by the seconds between the two timestamps, so both sides count the same block intervals. Omitted when the range covers no interval or no elapsed time.

      decimal string
  • ▶
    currentDifficultyEpoch

    One difficulty epoch. Every block from startHeight to endHeight carries difficulty, because Ergo only readjusts on epoch boundaries.

    • indexinteger · int32required

      Epoch number, counting from height 1. Epoch n spans heights 128n + 1 to 128n + 128.

      0 – …
    • startHeightintegerrequired

      First block of the epoch, and the one whose header supplied difficulty.

    • endHeightintegerrequired

      Last block of the epoch, or the current tip while the epoch is still in progress.

    • startTimestampinteger · int64required

      Timestamp of startHeight, in Unix milliseconds.

    • endTimestampinteger · int64required

      Timestamp of endHeight, in Unix milliseconds.

    • difficultystringrequired

      Required difficulty for every block in the range, as an exact decimal integer.

      decimal string
    • completebooleanrequired

      False only for the epoch in progress, whose endHeight still moves with the tip.

    • hashesPerSecondstring

      Network hashrate across the epoch: difficulty × (endHeight − startHeight) divided by the seconds between the two timestamps, so both sides count the same block intervals. Omitted when the range covers no interval or no elapsed time.

      decimal string
  • oldestIndexinteger · int32

    Oldest epoch the table holds; absent while it is empty.

  • newestIndexinteger · int32

    Newest stored epoch, which stays a full epoch behind the tip. Absent while the table is empty.

  • backfillCompletebooleanrequired

    Whether the table has reached its floor. While false it is still walking backwards and older epochs will appear.

  • statusstringrequired

    How far collection has got. ready means it reached the last checked chain tip. catching-up and recovering mean replay or reorg work is still running, stale means the last successful check is too old, and unavailable means collection failed. On disabled or loading the numbers are not evidence that the period was quiet.

    one ofdisabledloadingreadystaleunavailablecatching-uprecovering
400A negative index, a reversed range, or a limit outside 1–512.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

503History is loading, disabled, busy, or unreadable. Check `mining.status` in /stats before retrying.ApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

← PreviousEstimate Lithos hashrateNext →This client's own hashrate
Request
curl -X GET "http://localhost:9000/stats/mining/difficulty"
Response
{
  "source": {
    "height": 0,
    "blockId": "string",
    "parentId": "string",
    "timestamp": 0
  },
  "epochLength": 0,
  "epochs": [
    {
      "index": 0,
      "startHeight": 0,
      "endHeight": 0,
      "startTimestamp": 0,
      "endTimestamp": 0,
      "difficulty": "0",
      "complete": true,
      "hashesPerSecond": "0"
    }
  ],
  "current": {
    "index": 0,
    "startHeight": 0,
    "endHeight": 0,
    "startTimestamp": 0,
    "endTimestamp": 0,
    "difficulty": "0",
    "complete": true,
    "hashesPerSecond": "0"
  },
  "oldestIndex": 0,
  "newestIndex": 0,
  "backfillComplete": true,
  "status": "disabled"
}