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/Run Lithos/Configuration

Node connection and security

Connecting the client to your Ergo node, and the two secrets that guard its own API.

Standard4 min readFor anyone running the Lithos client. No Ergo or smart contract experience needed.

The node block tells the client where your Ergo node is and how to authenticate with it. Two more settings guard the client's own HTTP API. This page covers both, and it is the only configuration page where every setting is required.

It does not cover setting up the node itself. For that, read Setting up an Ergo testnet node.

Node connection#

Every setting here is required. The client refuses to start if any is missing:

SettingDefaultRangeWhat it does
node.urlhttp://127.0.0.1An http or https URL with a hostYour node's address. Include a port to use it, or leave it off and the client appends the default for the network
node.keyemptyAny stringThe node's REST API key, matching the apiKeyHash in your ergo.conf
node.storagePathemptyAny stringFull path to the node wallet's keyfile.json. The client signs transactions with it
node.passemptyAny stringThe node wallet password, used to unlock that keystore
node.networkTypeMAINNETMAINNET or TESTNETDecides the default node port, address prefixes and contract set. Case-insensitive
node.explorerURLdefaultA URL, or the literal defaultRequired by the Ergo SDK the client is built on. The client reads nothing from it. default picks the public explorer for the network
node.numAddresses321 to 1000How many EIP-3 addresses the prover holds keys for

The client reads the chain from your node alone#

Every box, transaction and block the client uses comes from your node. node.explorerURL exists only because the Ergo SDK the client is built on requires one, and leaving it at default is correct. This is also why the node must run with extraIndex = true: the client looks boxes up by token and script through the node's own index.

The port is appended, not required#

The client parses node.url and appends a default port only when the URL does not already name one: 9052 on testnet, 9053 on mainnet. Both of these work and mean the same thing on testnet:

hocon
node.url = "http://127.0.0.1"
node.url = "http://127.0.0.1:9052"

A URL without a scheme does not work. 127.0.0.1 alone is rejected at startup, because the client cannot tell a host from a path without one.

Why numAddresses matters more than it looks#

The client builds its signing prover with one secret per address index, from zero to numAddresses - 1. Any box paid to an address past that last index is one the client cannot sign for.

Lender keys are derived from these addresses, which is why emission.maxLenderKeys must not exceed numAddresses. Startup refuses the pair and names the value to raise.

Warning
Raising it is safe. Lowering it strands funds

Addresses are derived in order, so raising the count only adds new ones. Lowering it below a key that has already received a permit return or a coinbase leaves that ERG unspendable until you raise it back. Raising it costs a little startup time and nothing else.

Matching the node's mempool rule#

SettingDefaultRangeWhat it does
node.mempoolSortingbySizebySize or byExecutionCostWhich rule your node ranks mempool transactions by

Ergo nodes rank the mempool either by fee per serialized byte or by fee per unit of execution cost, and the node does not report which it uses. The client has to be told, so that the blocks it builds are packed against the rule your node actually applies.

Set it to match ergo.node.mempoolSorting in your ergo.conf. The node's own default is bySize, which is also the client's.

This setting is not validated at startup. Anything the client does not recognise reads as bySize, so a typo here fails silently rather than refusing to start. Check the spelling against your ergo.conf by eye.

Client API security#

SettingDefaultRangeWhat it does
lithos.apiKeyHashhash of helloExactly 64 hexadecimal charactersBLAKE2b-256 hash of the key that guards the client's authenticated endpoints
play.http.secret.keychangethissecretAny string, not validatedSigns the client's own web session cookies

Both ship with published placeholder values and both should change before you run anything you care about.

Setting your own API key hash#

The value in the file is the hash, not the key. The key is what you send with a request. To generate a hash, use your node's own hashing endpoint:

  1. Open your node's Swagger panel at http://127.0.0.1:9052/swagger on testnet.
  2. Under /utils, call POST /utils/hash/blake2b with your chosen key as the request body.
  3. Copy the returned hash into lithos.apiKeyHash.
  4. Keep the original string. That is what you authenticate with.

Startup checks that the value is 64 hexadecimal characters and nothing else, so pasting the key instead of the hash is caught immediately.

Danger
Keep the client's API off the open internet

The client holds your node API key and wallet password and can sign transactions with your keys. Do not forward its port, and do not expose it beyond your local network. The API key is a second line of defence, not the first.

Mainnet node settings#

Two settings belong in your node's configuration rather than the client's, and only for mainnet mining:

ergo.conf
hocon
ergo.chain.reemission.checkReemissionRules = true
ergo.wallet.checkEIP27 = true

The first validates consensus. The second handles payments made by the node wallet. Neither applies on testnet.

Next steps#

  • Stratum and difficulty: connecting your mining software and choosing diff.
  • Setting up an Ergo testnet node: the node side of this page.
Edit this page on GitHubsynced from e0ca86a
← PreviousConfigurationNext →Stratum and difficulty
On this page
  • Node connection
  • The client reads the chain from your node alone
  • The port is appended, not required
  • Why numAddresses matters more than it looks
  • Matching the node's mempool rule
  • Client API security
  • Setting your own API key hash
  • Mainnet node settings
  • Next steps