LithosDocs
ProtocolPayoutsTokenStatsDocs
Start mining
Documentation home
Protocol
  • Lithos Protocol
  • LFSM
    • Rollups
    • NISPs
    • Emissions
    • Mining on Lithos
    • Candidate building
    • Ergo Voting
  • LithosDex
    • Choosing a pool
    • Trading with orders
    • Providing liquidity
    • Creating a pool
    • Difficulty forwards
    • SigmaFi bonds
Run Lithos
  • Startup guide
    • Setting up an Ergo 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
    • Renting hashrate into Lithos
    • Checking your wallet
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
    • getThis wallet's lending earnings
    • getLocal mining activity
    • getCollateral market snapshot
    • getList queue boxes
    • getList the active set
    • getPermit price history
    • getYour lending status
    • postQuote joining the queue
    • postJoin the collateral queue
    • getLithosDex pool state
    • getEvery LithosDex pool
    • getOne LithosDex pool and its vault
    • getList your outstanding orders on any pool
    • postQuote a direct swap on any pool
    • postSwap directly on any pool
    • postQuote a direct deposit on any pool
    • postDeposit directly on any pool
    • postQuote a direct redemption on any pool
    • postRedeem a provision directly on any pool
    • getList your provisions on any pool
    • postClaim a provision's fees on any pool
    • postCheck a flush on any pool
    • postFlush any pool
    • getA verified pool's price history
    • getA verified pool's fee history
    • getA verified pool's recent activity
    • getA provision's fee history on a verified pool
    • postQuote a new LithosDex pool
    • postCreate a LithosDex pool
    • postQuote a swap order on any pool
    • postPlace a swap order on any pool
    • postQuote a deposit order on any pool
    • postPlace a deposit order on any pool
    • postQuote a redeem order on any pool
    • postPlace a redeem order on any pool
    • 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
    • postLook up provision NFTs
    • 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
    • getDifficulty accumulator and the next epoch's difficulty
    • getList open offers
    • postCreate an offer
    • postQuote an offer
    • postQuote filling an offer
    • postFill an offer
    • postQuote cancelling an offer
    • postCancel an offer
    • getThe whole market
    • getYour settled positions and closed offers
    • getList your positions and offers
    • postQuote settling a position
    • postSettle a position
    • getList open orders
    • postCreate an order
    • postQuote an order
    • postQuote cancelling an order
    • postCancel an order
    • postQuote filling an order
    • postFill an order
    • getList live bonds
    • postQuote repaying a bond
    • postRepay a bond
    • postQuote liquidating a bond
    • postLiquidate a bond
    • postQuote a claim
    • postClaim a settled bond
    • postLook up bond assets
    • getThis wallet in SigmaFi
    • getList configured oracle feeds
    • getCurrent oracle state and recent confirmed history
    • getWallet balances
    • getYour block rewards
    • postClaim unlocked block rewards
    • getVerified tokens
    • getArb stake
    • postReclaim the arb stake
    • 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
  • Difficulty forwards
  • Client API
  • Failure modes
Network
  • Live stats
  • Public stats API
  • Ergo Platform↗
  • SOAT Miner↗
Community
  • Telegram↗
  • X / Twitter↗
  • GitHub↗
Lithos
© 2026 Lithos Protocol. The Lithos client, its contracts and Lithos Launcher are open source under CC0.λίθος — 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.

Standard7 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 node.

Info
Lithos Launcher sets these for you

If you use Lithos Launcher, it writes node.url, node.key, node.storagePath, node.pass, node.networkType, node.mempoolSorting and both API secrets itself. The keys and the wallet password are stored encrypted by the operating system and never written to the file. Change the node or Lithos API key with API keys under Settings, not in lithos.conf.

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. The client checks it against that keystore at startup, and unlocks the node's wallet with it
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: 9053 on mainnet, 9052 on testnet. Both of these work and mean the same thing on mainnet:

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

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.

The client unlocks the node wallet itself#

The client creates new lender keys through your Ergo node's wallet, and the node refuses to create one while its wallet is locked. The node locks its wallet every time it restarts, so the client keeps the wallet unlocked with node.pass.

At startup, the client checks node.pass against the keystore at node.storagePath and refuses to start if they do not match. It then reads the node wallet's status at startup and before it creates any lender key. If the node reports the wallet locked, the client unlocks it and logs the following line once:

Unlocked the node wallet with node.pass, so lender keys can be derived

If the unlock fails, the client logs one warning with the reason, and joins can use only the lender keys the wallet already holds. The client tries again after 60 seconds, and logs again only when the reason changes:

Lender keys cannot be derived: the node wallet is not initialized. Joins can use only keys the wallet already holds

The password travels to node.url in the body of the unlock request, the same way node.key travels with every request. If your Ergo node runs on another machine, use an https URL. See Collateral and emission for how the client uses the keys.

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 characters. Not the hash of hello on mainnetBLAKE2b-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.

On mainnet, the client refuses to start while lithos.apiKeyHash is still the hash of hello. The client's API listens on every network interface, so the published key would open your wallet endpoints to anyone who can reach the port. Testnet still starts on the shipped hash. Lithos Launcher sets a random key of its own, so this check never stops a launcher install. Startup names the setting:

lithos.apiKeyHash
    is still the shipped hash of "hello". Choose your own api key and set its BLAKE2b-256
    here before running on mainnet

Set your own hash as described below, then start the client again.

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:9053/swagger, or port 9052 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.

Remembering the key in the web panel#

The web panel holds your API key in memory, so you enter it again after every page refresh. To keep it across refreshes, turn on Remember API key in this browser under Settings. The option is off by default.

Once it is on, the key is stored in this browser's localStorage, where any script running on the page can read it, a malicious browser extension included. Leave it off on a shared machine. Turning the option off deletes the stored key at once.

Every section of the web panel uses the same key, so remembering it in one section remembers it for all of them. If the browser blocks storage, the panel says so and keeps the key in memory only.

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. Mining on mainnet requires both:

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. The ergo.conf in Setting up an Ergo node already includes them.

Next steps#

  • Stratum and difficulty: connecting your mining software and choosing diff.
  • Setting up an Ergo node: the node side of this page.
Edit this page on GitHubsynced from aa061a5
← 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
  • The client unlocks the node wallet itself
  • Matching the node's mempool rule
  • Client API security
  • Setting your own API key hash
  • Remembering the key in the web panel
  • Mainnet node settings
  • Next steps