FAQ & Troubleshooting
FAQ & Troubleshooting
Fast answers for the errors and operational problems you are most likely to hit.
Most fixes depend on the exact message. Run commands with RUST_BACKTRACE=1 only when you need a developer trace, and redact wallet paths, cookies, and recovery phrases before sharing logs.
Quick diagnosis
| Symptom | Likely cause | First fix |
|---|---|---|
401 unauthorized | Stale or missing RPC cookie | Re-read <data-dir>/.cookie; confirm the node did not restart |
connection refused | Node not running, wrong port, or RPC bound elsewhere | Check the node log and the --rpc bind address |
| Node stuck at height 0 | No peers, firewall, wrong network, or DNS failure | Add a reachable --seed or --peer; check the P2P port |
| Balance is zero | Wallet not synced, wrong wallet, or missing rescan | Confirm node height, run wallet rescan, check the receive address |
| Coins cannot be spent | Immature coinbase or pending outgoing lock | Wait for maturity; inspect pending transactions |
| Wallet will not open | Another process holds the lock, or wrong passphrase | Close the other process; verify the passphrase |
| Mining finds nothing | Low hash rate, high difficulty, or stale templates | Check H/s, use --continuous, verify the tip is advancing |
--txindex error | Combined with --prune or a pruned database | Use one or the other; archive mode for txindex |
| Address rejected | Checksum, network mismatch, or legacy typo | Use the correct Bech32m address for the active network |
Node startup and sync
The node exits immediately or cannot bind a port
Check whether another process is using the P2P or RPC port, or whether a previous node is still running against the same data directory.
ss -ltnp | grep -E '18332|18333|28332|28333'
ps aux | grep '[s]cruple'
- Stop the old process or choose different
--p2pand--rpcports. - Only one node process should open a given data directory at a time. The redb database is not a multi-writer coordination layer.
- Check that the data directory is writable by the user running the node.
- On a VPS, confirm the firewall allows the P2P port if you expect inbound peers. RPC should stay closed.
genesis hash mismatch: database has ..., expected ...
The data directory was created for a different network. Each network has its own genesis block, so a mainnet database cannot be opened as testnet or devnet.
# Use a separate data directory per network
scruple node --network mainnet --data-dir ./mainnet-data
scruple node --network testnet --data-dir ./testnet-data
scruple node --network devnet --data-dir ./devnet-data
Do not delete the old database unless you are sure it contains nothing you need. Chain data can be re-synced, but wallet files are separate and must be backed up.
The node has no peers or stays at height 0
- Wrong network or port. Mainnet uses P2P
18333; testnet uses28333. A testnet node will not peer with mainnet nodes. - Firewall or NAT. Outbound TCP must be allowed. For inbound peers, forward the P2P port and advertise a numeric
--external-addr. - DNS seeds unavailable. Add an explicit
--seed host:portor--peer ip:portthat you trust. - Devnet has no built-in DNS seeds. Connect devnet nodes explicitly with
--seedor--peer. - Private LAN. Use
--no-dns-seedsand explicit peers; explicit peers bypass subnet diversity.
# Example: connect a second devnet node to the first
scruple node --network devnet \
--data-dir ./n2 \
--p2p 127.0.0.1:18334 \
--rpc 127.0.0.1:18335 \
--seed 127.0.0.1:18333
clock_skew_warnings keeps increasing
Headers or blocks are arriving with timestamps more than 1,200 seconds in the future relative to the local clock. Check the host time and timezone.
timedatectl status
sudo systemctl restart systemd-timesyncd # or your NTP service
Mild skew is recorded as a warning rather than an immediate ban, but a badly wrong clock prevents your own blocks from being accepted and can make the chain appear stuck.
The node uses too much disk
- Run with
--prune 2000or higher to keep only recent full blocks. The minimum is 288. - Pruning keeps all headers, the active UTXO set, and the ever-seen address index.
- Do not combine pruning with
--txindex; the index needs historical block bodies. - Archive nodes and explorers should stay unpruned.
--prune ... is too small
The minimum prune depth is 288 blocks. Deeper reorgs would be impossible below that window. Use a larger value for production:
scruple node --prune 2000 --data-dir ./data
--txindex cannot be combined with --prune
These options are mutually exclusive. The txindex needs the historical block bodies that pruning discards.
# Explorer or archive node
scruple node --txindex --data-dir ./explorer-data
# Space-constrained node
scruple node --prune 2000 --data-dir ./data
If an existing database was already pruned, enabling txindex later will fail because the old blocks are gone. Re-sync into a fresh archive data directory instead.
RPC problems
401 Unauthorized / unauthorized: missing or invalid RPC cookie
The cookie rotates on every node restart. A token that worked before a restart is now invalid.
# Read the current token
COOKIE=$(cat ./data/.cookie)
curl -sS http://127.0.0.1:18332 \
-H "X-Scruple-Cookie: $COOKIE" \
-H 'Content-Type: application/json' \
-d '{"method":"info","params":{}}'
- Confirm the
--data-dirmatches the running node. A different directory has a different cookie. - Confirm the
--rpcport and network. Testnet defaults to28332. - Check the cookie file mode and ownership. The node writes
0600; a different user cannot read it. - If using HTTP Basic, the username is literally
__cookie__and the password is the token. - Do not cache the token in a long-running script without a re-read on 401.
405 Method Not Allowed
The RPC accepts POST only. A browser address bar or curl without -d sends GET.
curl -sS -X POST http://127.0.0.1:18332 \
-H "X-Scruple-Cookie: $(cat ./data/.cookie)" \
-H 'Content-Type: application/json' \
-d '{"method":"info","params":{}}'
413 Payload Too Large
The request body exceeds 2,065,536 bytes. Block submissions are the usual cause. The serialized block must be at most 1,000,000 bytes; its hex encoding is at most 2,000,000 characters. Split large batches into separate calls.
'params' must be a JSON object
Scruple does not accept positional parameter arrays. Send an object, or omit params entirely.
{"method": "get_block", "params": {"height": 0}}
transaction not found in mempool
The full message is transaction not found in mempool; start the node with --txindex to look up confirmed transactions. The transaction is not in the mempool, and confirmed lookups need the persistent transaction index. Restart the node with --txindex on an unpruned data directory.
scruple node --txindex --data-dir ./explorer-data
Mempool transactions are always available, even without the index. If the transaction was confirmed long ago on a pruned node, you cannot recover it from that node's local data.
The RPC call times out during mine
The mine method is synchronous and can run for a long time at mainnet difficulty. The built-in client defaults to 300 seconds; a generic HTTP client may give up sooner.
- Raise the client timeout for the call.
- Prefer
scruple mine --continuousfor long sessions; it watches the tip and cancels stale templates. - Only one RPC mine operation can hold the node-wide mining lock at a time. A second call fails with
another RPC mine operation is already in progress.
connection refused from a CLI command
- Start the node first, or check that it is still running.
- Pass the correct
--rpcaddress and--network; testnet uses port28332. - If the node is remote, bind RPC to a reachable interface behind a firewall or TLS proxy. Do not expose it directly to the internet.
Wallet problems
wallet is encrypted; passphrase required
Supply the passphrase interactively, through SCRUPLE_PASSPHRASE, or with the command's passphrase option. Prefer the prompt or environment variable so the passphrase does not appear in shell history.
export SCRUPLE_PASSPHRASE='your long passphrase'
scruple balance --wallet ./wallet.json --data-dir ./data
decryption failed (wrong passphrase or corrupted wallet file)
- Re-enter the passphrase carefully. Keyboard layout and trailing whitespace matter.
- Restore the wallet file from a backup or recover from the 24-word phrase.
- Do not repeatedly overwrite the file while troubleshooting. Make a copy first.
- If the file was partially copied or edited, the AEAD tag will fail. A JSON-valid file is not necessarily decryptable.
wallet file ... is already open in another process
Close the GUI or the other CLI process. The lock is an OS advisory lock on <wallet>.lock and is released automatically on exit or crash.
- Do not delete the lock file while a process is running.
- A leftover
.lockfile after a crash is harmless; the OS lock is gone. - Do not run the same wallet from two machines. The lock only coordinates processes on one host.
wallet file ... already exists; refusing to overwrite it
wallet new and wallet recover will not overwrite an existing file. Choose a new path or move the old wallet aside after backing it up.
scruple wallet new --wallet ./wallet-2.json --encrypt
The balance is zero or history is missing
- Node not synced. Check
scruple infoand compare the height with a trusted source. - Wrong wallet or network. A testnet wallet will not show mainnet coins, and vice versa.
- Address gap. Run
wallet rescanagainst a synced node. It checks the UTXO set and the ever-seen address index, expanding past the gap limit. - Pruned history. The ever-seen index survives pruning, but old confirmed history may not be reconstructible from a pruned node.
- Pending outgoing locks. Coins already spent by a broadcast transaction are excluded from spendable balance until confirmation.
scruple info --data-dir ./data
scruple wallet rescan --data-dir ./data --wallet ./wallet.json --gap-limit 20
scruple balance --data-dir ./data --wallet ./wallet.json
Balance shows immature
Coinbase outputs need maturity before they can be spent: 24 blocks on mainnet, 6 on testnet, and 2 on devnet. The balance command separates mature, immature, and pending amounts. Wait for more blocks; there is no override.
If you try to spend one explicitly, the wallet reports selected coin {height}:{tx_index}:{out_index} is an immature coinbase UTXO and cannot be spent yet.
insufficient spendable funds or insufficient mature funds
- Some coins are immature coinbase outputs. Wait for maturity.
- Some coins are locked by pending outgoing transactions. Wait for confirmation or review the pending state.
- Coin control may be selecting too few UTXOs. Add more
--coinentries or remove restrictions. - The amount plus fee may exceed the selected total. Reduce the amount or use
--send-max. - Dust-sized UTXOs may be uneconomical to spend at the chosen fee rate.
send amount ... is below dust floor 5000
The consensus minimum output is 1 grain, but mempool and wallet policy reject outputs below 5,000 grains. Send a larger amount or sweep with --send-max.
The transaction is stuck unconfirmed
Use Ownership-Proven FSS-RBF to raise the fee:
scruple bump-fee \
--data-dir ./data \
--wallet ./wallet.json \
--txid <64-HEX-TXID> \
--fee-rate 2
- The new fee rate must exceed the original by at least 1 grain per byte.
- Recipient outputs must be preserved. Reducing your own change requires a valid shrink proof; the wallet builds it automatically.
- Only unconfirmed mempool transactions can be bumped. A confirmed transaction is final.
- If the original transaction is genuinely dead,
wallet clear-pendingcan release local locks. Do not use it while the transaction might still be mined.
Address checksum or network errors
| Error | Cause | Fix |
|---|---|---|
invalid Bech32m address checksum (possible typo) | One or more characters are wrong | Re-copy the address; do not retype from memory |
address network mismatch: address is for Testnet ..., but active network is Mainnet ... | Wrong network address | Use --network testnet or the mainnet address |
| Legacy address warning | xsl1:/xsl2: has no checksum | Prefer Bech32m xsl1p.../xsl1z... |
addr hash must be 32 bytes | Malformed legacy hex | Provide exactly 64 hex characters |
The wallet cannot derive the next address
If the wallet has skipped too many already-used indices, it reports an HD derivation limit error. Run a rescan so the wallet learns which indices are used, or recover from the mnemonic into a fresh wallet file.
Mining problems
Mining runs but finds no blocks
- Difficulty is high. Mainnet starts at
0x1e0fffff. A single CPU may take a long time; check the reported H/s. - Wrong network. Mining devnet while expecting mainnet rewards will not work.
- Node is not synced. A template built on a stale tip is wasted. Use
--continuousso the miner watches the tip. - Payout address invalid. The address must match the node's active network.
- Hashrate too low. Add threads or enable
--full-memif you have enough RAM.
The miner stops or restarts repeatedly
- Check for
another RPC mine operation is already in progress. Only one synchronous RPC mine runs at a time. - Check free RAM.
--full-memneeds roughly 2 GB for the shared RandomX dataset plus headroom; a machine with 2 GB total may be killed by the OOM killer. - Check the node log for
node is shutting downor peer/chain errors. - Verify the RPC cookie is current; a restart invalidates it.
Mined coins do not appear in the balance
- Coinbase outputs are immature for 24 blocks on mainnet (6 testnet, 2 devnet).
- Confirm the miner is paying the wallet you are checking.
scruple mine --walletrotates receive addresses;--topays a fixed address. - Rescan the wallet if it was created after the blocks were mined, or if the gap limit was exceeded.
- Check that the node is on the same network and data directory as the miner.
Full-memory mode is slow to start
The RandomX dataset is large and is initialised once, then shared across worker threads. Startup can take several seconds. Light mode uses much less memory but is slower per hash. Choose based on available RAM and whether you are validating or mining.
Multisig problems
The derived vault address differs between cosigners
- Public keys must be the same 83-byte keys and must be sorted in strictly ascending lexicographical order. The CLI sorts them canonically; hand-built tooling must do the same.
- All cosigners must use the same threshold and the same key set. A single wrong key produces a different address.
- Compare the full
xsl2:or Bech32m address out-of-band, not just a prefix.
invalid multisig parameters
1 <= threshold <= n <= 15.- Keys must not be duplicated.
- Keys must be exactly 83 bytes (166 hex characters).
- Signer indices must be below
nand strictly ascending.
no matching cosigner key or a signature is not added
- The wallet does not contain a private key for any public key in the vault. Use the wallet that owns one of the cosigner keys.
- Check the derivation index.
wallet pubkey --index Nprints the key at a specific index; the default is 0. - If the wallet is encrypted, supply the passphrase.
The vault spend says not enough signatures
Finalisation requires at least the threshold number of valid signatures from distinct cosigners. Sign with another cosigner, or verify that earlier signatures were made over the same PartialTx. Rebuilding the proposal invalidates prior signatures.
selected vault coin {height}:{tx_index}:{out_index} is immature
Coinbase outputs mined directly to a vault follow the same maturity rules. Wait for 24 blocks on mainnet, 6 on testnet, or 2 on devnet.
The proposal refuses a UTXO because it is pending
Pending multisig outpoints are tracked in <data-dir>/pending-multisig.json to prevent accidental double spends. If an earlier draft was abandoned, pass --ignore-pending or exclude the outpoint explicitly. Confirm that the old transaction is truly dead first.
GUI problems
The GUI does not start on a server
scruple-gui is an eframe/egui desktop application and needs a graphical session. On a headless VPS, use the CLI node, wallet, and miner instead. X11 forwarding may work but is not a good production setup.
The wallet manager is empty
- By default the GUI looks in
<data-dir>/wallets. Pass--wallets <path>to point at a different directory. - Pass
--wallet <file>to open a specific wallet directly. - Create or import a wallet from the manager; an empty directory is expected on first launch.
A wallet will not open in the GUI
- Close any CLI process using the same wallet. The GUI takes the same lock.
- If the wallet is encrypted, enter the passphrase. A wrong passphrase produces a decryption failure, not a silent empty wallet.
- Check file permissions and that the file is a wallet, not a chain database or a backup of something else.
Tabs show no activity or balances
The GUI embeds a full node. Wait for it to sync, or check the Node tab for height and peer count. A wallet rescan is separate from chain sync. If the node is isolated, transactions and balances will not update.
Security and operations
I exposed RPC to the internet. What now?
- Stop the node or firewall the RPC port immediately.
- Restart the node so the cookie rotates, then re-read the new cookie locally.
- Review the data directory, logs, peers, and wallet for unexpected changes.
- If the wallet was unlocked on that host, treat the keys as potentially compromised and move funds to a new wallet.
- Bind RPC to localhost and use a TLS reverse proxy with additional authentication if remote access is required.
I leaked my recovery phrase
Create a new wallet and sweep all funds to it. Changing the passphrase or deleting the old wallet file does not help: the phrase still derives the same keys. Assume any coins at any derived index are at risk until moved.
Can I delete the data directory to save space?
You can re-sync chain data from peers, but the data directory also contains the RPC cookie, peer state, and possibly pending multisig state. Wallet files are usually stored elsewhere, but confirm before deleting anything. Never delete a wallet or its only backup.
How do I report a bug?
Collect the version, network, command, exact error, and a minimal reproduction. Redact the recovery phrase, wallet passphrase, cookie, private keys, and any personal paths. If the issue is a crash, include the backtrace and the relevant log lines.
scruple --version
scruple info --data-dir ./data
RUST_BACKTRACE=1 scruple <command>
Still stuck?
- Re-read the exact error and the command's
--help. Flags change between builds. - Try the smallest possible reproduction on devnet with a fresh data directory and a fresh wallet.
- Check that the node and client are on the same network and that the cookie is current.
- Run the test suite if you are building from source:
cargo test --release --workspace. - Do not share secrets. A support helper never needs your 24-word phrase or wallet passphrase.