Get difficulty commitment
/mining/commitmentThis 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; seereason.one ofunregisteredregisteringwaitingactiveunknownreasonstringWhy
stateisunknownorregistering.heightintegerThe chain tip the commitment was read at. Absent when it could not be read.
▶
inForceCommitmentEntryOne commitment. Absent when there is none in that slot.
scorestringrequiredThe committed score, as an exact decimal string. Payouts are proportional to it.
decimal stringdiffstringrequiredscorewritten the waystratum.diffis.declaredHeightintegerrequiredThe height the commitment declares. Super shares count toward it from here.
inForceFromHeightintegerrequiredThe first height whose rollups judge NISPs against this commitment.
servedFromHeightintegerThe first block the stratum mines at this score. Present only on a commitment not yet in force.
▶
pendingCommitmentEntryOne commitment. Absent when there is none in that slot.
scorestringrequiredThe committed score, as an exact decimal string. Payouts are proportional to it.
decimal stringdiffstringrequiredscorewritten the waystratum.diffis.declaredHeightintegerrequiredThe height the commitment declares. Super shares count toward it from here.
inForceFromHeightintegerrequiredThe first height whose rollups judge NISPs against this commitment.
servedFromHeightintegerThe first block the stratum mines at this score. Present only on a commitment not yet in force.
▶
inFlightCommitmentInFlightA registration or change that is sent but not yet part of
inForceorpending.txIdstringrequiredkindstringrequiredone ofregistrationchangeconfirmedHeightintegerPresent once the transaction confirmed, while this client has not yet synced to this height.
▶
commitmentCommitmentEntryrequiredOne commitment. Absent when there is none in that slot.
scorestringrequiredThe committed score, as an exact decimal string. Payouts are proportional to it.
decimal stringdiffstringrequiredscorewritten the waystratum.diffis.declaredHeightintegerrequiredThe height the commitment declares. Super shares count toward it from here.
inForceFromHeightintegerrequiredThe first height whose rollups judge NISPs against this commitment.
servedFromHeightintegerThe first block the stratum mines at this score. Present only on a commitment not yet in force.
replaceableFromHeightintegerThe first tip a change to the newest commitment can be sent from. Absent while unregistered.
canCommitbooleanrequiredWhether
POST /mining/commitmentwould send now.blockedReasonstringWhy
canCommitis false.-
TRANSFORMS_DISABLED:state.disableTransformsis on. -AUTO_COMMIT:state.autoCommitkeeps the commitment atconfigDiff. -UNAVAILABLE: the commitment could not be read. -IN_FLIGHT: an earlier registration or change has not settled; seeinFlight. -SYNCING: the Miner Dictionary is not synced, or the registration is not recorded yet. -LOCKED: the newest commitment cannot be replaced beforereplaceableFromHeight.one ofTRANSFORMS_DISABLEDAUTO_COMMITUNAVAILABLEIN_FLIGHTSYNCINGLOCKEDautoCommitbooleanrequiredWhether
state.autoCommitis running and keeps the commitment atconfigDiff.configDiffstringrequiredThe
stratum.diffsetting. The stratum serves it until a commitment takes effect, and auto-commit commits it.▶
timingCommitmentTimingrequiredBlocks from the tip a commitment is sent at.
servedAfterBlocksintegerrequiredUntil the stratum mines at a first commitment or a raise. A cut is served once it is in force.
inForceAfterBlocksintegerrequiredUntil rollups judge NISPs against it, and this miner can be paid at it.
replaceableAfterBlocksintegerrequiredUntil the next change can be sent.
windowBlocksintegerrequiredThe blocks a NISP's super shares are drawn from.
rollupLifetimeBlocksintegerrequiredFrom a rollup opening to its payout.
defaultErrorApiError▶
errorintegerrequiredError code
reasonstringrequiredError message explaining the reason of the error
detailstringrequirednullableDetailed error description