Description
Background
The LND REST API returns {"code":2,"message":"lnd is not ready for: /lnrpc.Lightning/SignMessage","details":[]} when attempting to sign messages, even though the same operation works perfectly via lncli on the identical LitD instance. The issue appears to be that the REST API gateway checks the node sync state and blocks requests when synced_to_chain: false or synced_to_graph: false, while direct RPC calls bypass this check. This creates an inconsistency where message signing (which doesn't require chain synchronization) is artificially blocked via REST but works via CLI.
Your environment
version of lnd: 0.18.5-beta (commit=lightning-terminal-v0.14.1-alpha)
version of litd: 0.14.1-alpha (commit=v0.14.1-alpha)
operating system: Docker container (lightninglabs/lightning-terminal:v0.14.1-alpha)
backend: Bitcoin node (sync status irrelevant to signing)
Docker run command:
bash
docker run -v /home/weltitob/wallet_password:/root/.lit/wallet_password
-v /home/weltitob/testnet_lit.conf:/root/.lit/lit.conf
-v /home/weltitob/internal.crt:/root/.lit/tls.cert
-v /home/weltitob/internal.key:/root/.lit/tls.key
-p 8443:8443/tcp
-p 9735:9735/tcp
-p 10009:10009/tcp
lightninglabs/lightning-terminal:v0.14.1-alpha --enablerest
Steps to reproduce
Start LitD with --enablerest flag
Wait for RPC server to be active but before full chain/graph sync completes
Attempt to sign a message via REST API: POST /v1/signmessage
Observe the "lnd is not ready" error
Try the same operation via lncli signmessage - this works successfully
Check node status - synced_to_chain: false, synced_to_graph: false but state is SERVER_ACTIVE
(this was also reproduced with the latest litf verison 15.0.1 alpha)
Expected behaviour
The REST API should allow message signing operations and other available endpoints that are available via grcp immediately when the RPC server is active, just like lncli does. Message signing is a cryptographic operation that doesn't require chain synchronization, channel state, or graph data. The REST API should have the same capabilities as the CLI interface.
Actual behaviour
The REST API returns {"code":2,"message":"lnd is not ready for: /lnrpc.Lightning/SignMessage","details":[]} while lncli signmessage works perfectly on the same instance. This creates an artificial limitation where REST clients cannot perform signing operations during the initial sync period, even though the underlying capability is available via other interfaces.
The issue persists even with nobootstrap=true configuration, as the node will always show synced_to_chain: false, synced_to_graph: false in such setups, making the REST API permanently unavailable for signing operations.
THIS IS A REPLICA:
Old issue: lightningnetwork/lnd#10023