Skip to content
Contract reference Mining5 source only Source e0617449

CoreLink to this section

TL;DRLink to this section

  • Core records settled work and counts completed Squeek blocks, carrying unfinished work forward.
  • Settlement requires a current Reporter EIP-712 signature; any account can submit it.
  • Guardian can pause Core and replace Reporter while paused; only the timelock-owned ProxyAdmin can upgrade its code.

ResponsibilityLink to this section

Core adds accepted work to a running total and completes a Squeek block whenever work reaches the fixed difficulty. It does not call Token, mint SQK, allocate rewards or hold funds.

Active rounds contain positive work and a nonzero hash committing to supporting data. Each settlement also certifies omitted rounds as zero work through its last round, without storing a record for every empty round.

Dependencies and authorityLink to this section

Actor or dependency Authority
Reporter Signs settlement authorization under the current EIP-712 domain
Relay caller Submits a valid current Reporter authorization; cannot invent authorized work
Guardian pause, unpause, and paused Reporter rotation
ProxyAdmin / Operator Timelock Transparent proxy code upgrades
Initialization Atomic proxy construction; fresh paused zero-baseline state

The domain is SqueekCore, version 1, bound to chain ID and proxy. The settlement type is SqueekWorkSettlementV1(address implementation,uint64 settledThroughRound,bytes32 roundsHash,uint256 nonce,uint256 deadline); roundsHash is keccak256(abi.encode(rounds)).

Pause, unpause and Reporter rotation invalidate outstanding authorizations by advancing the nonce. A signature also binds the executing implementation, so callers cannot reuse it across a different implementation identity.

State and viewsLink to this section

View Return / meaning
configuration() Stream ID, genesis Unix seconds, round duration, per-round work cap, batch limit, Guardian, Reporter, fixed work per Squeek block
state() Last certified round, uint128 cumulative work, completed block height, unfinished work (carry), fixed difficulty, authorization nonce and pause status
currentRound() One-indexed wall-clock round using the 600-second interval
isRoundFinal(roundId) True only for nonzero rounds at or behind the certified frontier
roundState(roundId) Round work, cumulative work, completed height and data hash; zero round returns zeros; future/unsettled rounds revert
roundPage(afterRound, throughRound, maxRecords) Active round records in order, cumulative work at each end, and the last covered round (certifiedThroughRound)
blockInfo(blockNumber) Completion round and cumulative-work threshold for an existing completed Squeek block
hasEverBeenReporter(address) Reporter reuse prevention history
paused(), eip712Domain() Current pause and signing-domain readback
proxyAdmin() Recorded ERC-1967 admin slot
implementationCodeAddress() Executing implementation's own address, including through proxy
implementationCodeVersion() 2 for this source
implementationStorageLayoutDigest() Aggregate generated Core layout identity

RoundPage contains certifiedThroughRound, startCumulativeWork, endCumulativeWork, and active RoundCheckpoint[]. If the record limit would omit an active round, the page ends immediately before it; a zero limit can cover empty rounds but never skip active work.

ActionsLink to this section

Action Caller and effect
initialize(config) Constructor-time proxy initialization; validates launch actors and bounds, emits identity, starts paused
submitRounds(rounds, frontier, expectedNonce, deadline, signature) Any relay with valid current Reporter signature; validates order, elapsed frontier, work caps and nonce, updates ledger atomically
pause() Guardian while unpaused; stops settlement and invalidates authorization
unpause() Guardian while paused; resumes settlement and invalidates paused-period authorization
setReporter(newReporter) Guardian while paused; accepts only an unused valid Reporter address, updates nonce and history

There is no difficulty setter, arbitrary-call entrypoint, state adoption path or reward-policy setter. Round input is (uint64 roundId, uint64 work, bytes32 dataHash).

Events and errorsLink to this section

Event Evidence
CoreInitialized Stream, Guardian, Reporter, genesis, work per block, work cap
ReporterUpdated Previous and new Reporter
RoundRecorded Active round work, cumulative work, completed height and data hash
BatchSettled Digest, Reporter, new/previous frontier, nonce, active count and final work/height
Inherited Paused, Unpaused, Initialized, domain/proxy events Pause, initialization or code-administration transitions
Errors Meaning
UnauthorizedGuardian, InvalidReporter, ReporterAlreadyUsed Authority or forbidden reuse
InvalidAuthorization, ExpiredAuthorization Wrong nonce/signature or deadline
BatchTooLarge, InvalidRoundId, NonIncreasingRoundId, RoundNotElapsed Invalid batch shape, frontier, ordering or clock
WorkExceeded, InvalidActiveRound Work exceeds configured cap, zero work or zero data hash
RoundNotSettled, BlockNotSettled, InvalidRoundPageBounds Historical query outside certified bounds
InvalidWorkPerBlock, InvalidGenesisTimestamp, InvalidWorkCap, InvalidStreamId, InvalidGuardian Invalid launch configuration
InvalidImplementationCodeAddress, InvalidProxyAdmin Invalid initialization context

ECDSA, pause, initialization and checked-cast failures also use inherited OpenZeppelin errors. Use the full ABI and linked sources to decode them; this table lists project errors only.

LimitsLink to this section

  • Round duration: exactly 600 seconds; one-indexed rounds are not Ethereum blocks.
  • Settlement: at most 16 active records; Core accepts an empty array to certify an elapsed all-zero span.
  • Page budget: 0–16 records; afterRound <= throughRound <= settledThroughRound.
  • The last certified round must advance and must have ended by the transaction timestamp; supplied active rounds must be strictly increasing within that range.
  • Active work is 1..maxWorkPerRound; data hashes must be nonzero.
  • Work per Squeek block and work cap are positive uint64 launch values; cumulative work fits uint128, height and carry fit uint64.
  • Genesis is nonzero, not future, and no more than 86,400 seconds before construction.
  • Reporter addresses cannot be reused and cannot equal zero, Guardian, proxy, executing implementation or current ProxyAdmin.
  • Block query range: 1..blockHeight; round zero is a query baseline, never an active record.

SourceLink to this section

Mining5 source specification e0617449. First-party source is private; see source and release scope.