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/Mining

Get difficulty commitment

get/mining/commitment

This miner's difficulty commitment, read from the chain. Calls within three seconds of each other share one read, and a POST /mining/commitment clears it. NISPs are judged against inForce; with none in force this miner cannot submit NISPs and is not paid from rollups.

A commitment sent at tip h is served by the stratum from h + timing.servedAfterBlocks when it is a first commitment or a raise, and from h + timing.inForceAfterBlocks when it is a cut. It is in force from h + timing.inForceAfterBlocks, and the next change can be sent from h + timing.replaceableAfterBlocks. Each rollup pays timing.rollupLifetimeBlocks after it opens.

Check canCommit and blockedReason before offering a change.

Responses

200The commitment as read nowDifficultyCommitment▶
  • statestringrequired

    - unregistered: no Miner Dictionary entry; send a commitment to register. - registering: a registration was sent and is not yet confirmed and synced. - waiting: registered, and the first commitment is not in force yet. - active: a commitment is in force. - unknown: the commitment could not be read; see reason.

    one ofunregisteredregisteringwaitingactiveunknown
  • reasonstring

    Why state is unknown or registering.

  • heightinteger

    The chain tip the commitment was read at. Absent when it could not be read.

  • ▶
    inForceCommitmentEntry

    One commitment. Absent when there is none in that slot.

    • scorestringrequired

      The committed score, as an exact decimal string. Payouts are proportional to it.

      decimal string
    • diffstringrequired

      score written the way stratum.diff is.

    • declaredHeightintegerrequired

      The height the commitment declares. Super shares count toward it from here.

    • inForceFromHeightintegerrequired

      The first height whose rollups judge NISPs against this commitment.

    • servedFromHeightinteger

      The first block the stratum mines at this score. Present only on a commitment not yet in force.

  • ▶
    pendingCommitmentEntry

    One commitment. Absent when there is none in that slot.

    • scorestringrequired

      The committed score, as an exact decimal string. Payouts are proportional to it.

      decimal string
    • diffstringrequired

      score written the way stratum.diff is.

    • declaredHeightintegerrequired

      The height the commitment declares. Super shares count toward it from here.

    • inForceFromHeightintegerrequired

      The first height whose rollups judge NISPs against this commitment.

    • servedFromHeightinteger

      The first block the stratum mines at this score. Present only on a commitment not yet in force.

  • ▶
    inFlightCommitmentInFlight

    A registration or change that is sent but not yet part of inForce or pending.

    • txIdstringrequired
    • kindstringrequired
      one ofregistrationchange
    • confirmedHeightinteger

      Present once the transaction confirmed, while this client has not yet synced to this height.

    • ▶
      commitmentCommitmentEntryrequired

      One commitment. Absent when there is none in that slot.

      • scorestringrequired

        The committed score, as an exact decimal string. Payouts are proportional to it.

        decimal string
      • diffstringrequired

        score written the way stratum.diff is.

      • declaredHeightintegerrequired

        The height the commitment declares. Super shares count toward it from here.

      • inForceFromHeightintegerrequired

        The first height whose rollups judge NISPs against this commitment.

      • servedFromHeightinteger

        The first block the stratum mines at this score. Present only on a commitment not yet in force.

  • replaceableFromHeightinteger

    The first tip a change to the newest commitment can be sent from. Absent while unregistered.

  • canCommitbooleanrequired

    Whether POST /mining/commitment would send now.

  • blockedReasonstring

    Why canCommit is false.

    - TRANSFORMS_DISABLED: state.disableTransforms is on. - AUTO_COMMIT: state.autoCommit keeps the commitment at configDiff. - UNAVAILABLE: the commitment could not be read. - IN_FLIGHT: an earlier registration or change has not settled; see inFlight. - SYNCING: the Miner Dictionary is not synced, or the registration is not recorded yet. - LOCKED: the newest commitment cannot be replaced before replaceableFromHeight.

    one ofTRANSFORMS_DISABLEDAUTO_COMMITUNAVAILABLEIN_FLIGHTSYNCINGLOCKED
  • autoCommitbooleanrequired

    Whether state.autoCommit is running and keeps the commitment at configDiff.

  • configDiffstringrequired

    The stratum.diff setting. The stratum serves it until a commitment takes effect, and auto-commit commits it.

  • ▶
    timingCommitmentTimingrequired

    Blocks from the tip a commitment is sent at.

    • servedAfterBlocksintegerrequired

      Until the stratum mines at a first commitment or a raise. A cut is served once it is in force.

    • inForceAfterBlocksintegerrequired

      Until rollups judge NISPs against it, and this miner can be paid at it.

    • replaceableAfterBlocksintegerrequired

      Until the next change can be sent.

    • windowBlocksintegerrequired

      The blocks a NISP's super shares are drawn from.

    • rollupLifetimeBlocksintegerrequired

      From a rollup opening to its payout.

defaultErrorApiError▶
  • errorintegerrequired

    Error code

  • reasonstringrequired

    Error message explaining the reason of the error

  • detailstringrequirednullable

    Detailed error description

← PreviousGet candidate settingsNext →Commit a difficulty
Request
curl -X GET "http://localhost:9000/mining/commitment"
Response
{
  "state": "unregistered",
  "reason": "string",
  "height": 0,
  "inForce": {
    "score": "0",
    "diff": "1.50M",
    "declaredHeight": 0,
    "inForceFromHeight": 0,
    "servedFromHeight": 0
  },
  "pending": {
    "score": "0",
    "diff": "1.50M",
    "declaredHeight": 0,
    "inForceFromHeight": 0,
    "servedFromHeight": 0
  },
  "inFlight": {
    "txId": "string",
    "kind": "registration",
    "confirmedHeight": 0,
    "commitment": {
      "score": "0",
      "diff": "1.50M",
      "declaredHeight": 0,
      "inForceFromHeight": 0,
      "servedFromHeight": 0
    }
  },
  "replaceableFromHeight": 0,
  "canCommit": true,
  "blockedReason": "TRANSFORMS_DISABLED",
  "autoCommit": true,
  "configDiff": "4.0G",
  "timing": {
    "servedAfterBlocks": 63,
    "inForceAfterBlocks": 125,
    "replaceableAfterBlocks": 845,
    "windowBlocks": 60,
    "rollupLifetimeBlocks": 720
  }
}