LP Light RPC node
As of version 1.12.0, to call the LP RPC endpoints, you must run your own LP Light RPC node. Operating a Chainflip light-RPC node is straightforward and resource-efficient.
The LP light-rpc node is just a normal Chainflip node running in a specialized --sync light-rpc mode. Your LP account key must be injected in the node’s keystore to be able to expose the LP RPC endpoints and submit extrinsics.
This light-rpc mode prunes older blocks and permits querying only recent blocks, significantly reducing disk space requirements compared to running a full node. The recommended minimum requirements for running a light-rpc node include:
- 2 vCPU
- 4 GB RAM
- 20 GB SSD
Running the LP light-rpc node using Docker
Setup
- Clone the
chainflip-mainnet-apisrepo
git clone https://github.com/chainflip-io/chainflip-mainnet-apis.git
cd chainflip-mainnet-apisLP account key
⛔️ Please make sure you backup your keys. If you lose your keys, you will lose access to your funds. ⛔️
- If you have an existing LP account key, copy it to the
./chainflip/keys/lp/signing_key_filefile. Please make sure that the key is in the correct location, otherwise it won’t be properly injected into the node’s keystore.
If you don’t have an LP account key, you can generate one using the following steps.
mkdir -p ./chainflip/keys/lp
docker run --platform=linux/amd64 --entrypoint=/usr/local/bin/chainflip-cli chainfliplabs/chainflip-cli:berghain-1.12.0 generate-keys --json > chainflip/lp-keys.json
cat chainflip/lp-keys.json | jq -r '.signing_key.secret_key' > chainflip/keys/lp/signing_key_fileRunning the node
- Start an LP RPC node and wait for it to sync:
docker compose --profile lp up -d- View the logs to monitor sync progress
docker compose --profile lp logs -fYou should see something like this:
node-with-lp-1 | 2025-10-30 10:42:26 Chainflip Node
node-with-lp-1 | 2025-10-30 10:42:26 ✌️ version 1.12.0-11b2cc9c943
node-with-lp-1 | 2025-10-30 10:42:26 ❤️ by Chainflip Team <https://github.com/chainflip-io>, 2021-2025
node-with-lp-1 | 2025-10-30 10:42:26 📋 Chain specification: Chainflip-Berghain
node-with-lp-1 | 2025-10-30 10:42:26 🏷 Node name: decorous-paper-9644
node-with-lp-1 | 2025-10-30 10:42:26 👤 Role: FULL
node-with-lp-1 | 2025-10-30 10:42:26 💾 Database: RocksDb at /etc/chainflip/chaindata/chains/Chainflip-Berghain/db/full_light
node-with-lp-1 | 2025-10-30 10:42:26 ⚡ Light-RPC mode enabled
node-with-lp-1 | 2025-10-30 10:42:26 Deleting old db files and recreating a new RocksDB database on startup.
node-with-lp-1 | 2025-10-30 10:42:28 🔨 Initializing Genesis block/state (state: 0xceb9…3b8d, header-hash: 0x8b8c…6eb9)
node-with-lp-1 | 2025-10-30 10:42:29 🏷 Local node identity is: 12D3KooWGP9hRqHK4mqKsGH55PyvDijQKtKDyvJSFMxmo3T7dj2T
node-with-lp-1 | 2025-10-30 10:42:29 Running libp2p network backend
node-with-lp-1 | 2025-10-30 10:42:29 🗝️ Lp key found in the keystore, enabling LP-related RPCs
node-with-lp-1 | 2025-10-30 10:42:29 💻 Operating system: linux
node-with-lp-1 | 2025-10-30 10:42:29 💻 CPU architecture: x86_64
node-with-lp-1 | 2025-10-30 10:42:29 💻 Target environment: gnu
node-with-lp-1 | 2025-10-30 10:42:29 💻 Memory: 23996MB
node-with-lp-1 | 2025-10-30 10:42:29 💻 Kernel: 6.10.14-linuxkit
node-with-lp-1 | 2025-10-30 10:42:29 💻 Linux distribution: Ubuntu 22.04.5 LTS
node-with-lp-1 | 2025-10-30 10:42:29 💻 Virtual machine: no
node-with-lp-1 | 2025-10-30 10:42:29 📦 Highest known block at #0
node-with-lp-1 | 2025-10-30 10:42:29 〽️ Prometheus exporter started at 127.0.0.1:9615
node-with-lp-1 | 2025-10-30 10:42:29 Running JSON-RPC server: addr=0.0.0.0:9944, allowed origins=["*"]Make sure:
-
To see that light-rpc mode is enabled in the logs. Log line similar to:
⚡ Light-RPC mode enabled -
LP key is properly injected and LP RPC endpoints are enabled. Log line similar to:
🗝️ Lp key found in the keystore, enabling LP-related RPCs -
Wait until the node is synced before start making RPC calls. This should take around 2 minutes.
💡 Note: Your node is considered synced when you see logs similar to:
node-with-lp-1 | 2025-10-30 10:53:49 🏆 Imported #10260208 (0xe26d…ad53 → 0xc279…f190)
node-with-lp-1 | 2025-10-30 10:53:54 💤 Idle (8 peers), best: #10260208 (0xc279…f190), finalized #10260206 (0x0507…e82d), ⬇ 229.9kiB/s ⬆ 184.4kiB/s
node-with-lp-1 | 2025-10-30 10:53:55 🏆 Imported #10260209 (0xc279…f190 → 0x7cb8…21f4)- You can check the node’s health and verify it is synced by using this RPC call:
curl -H "Content-Type: application/json" \
-d '{"id":1, "jsonrpc":"2.0", "method": "system_health"}' \
http://localhost:9944You should a response showing that isSyncing is false, similar to:
{"jsonrpc":"2.0","result":{"peers":8,"isSyncing":false,"shouldHavePeers":true},"id":1}- To stop the node:
docker compose --profile broker downInteracting with the APIs
Now you can interact with the APIs using any HTTP or WS client. Here we use the curl and wscat commands.
- For example, to request a liquidity deposit address for
ETH:
curl
curl -H "Content-Type: application/json" \
-d '{"id":1, "jsonrpc":"2.0", "method": "lp_request_liquidity_deposit_address_v2", "params": ["ETH"]}' \
http://localhost:9944- Subscribe to order fills. Note that subscriptions are only supported over WebSockets.
wscat -c ws://localhost:9944 -x '{ "id": 1, "jsonrpc": "2.0", "method": "lp_subscribe_order_fills"}'Migrating from LP-API Binary
If you’re upgrading from a previous version that used separate LP API binary service, the new LP light-rpc mode provides a simplified architecture where all APIs are exposed directly onto the rpc node. There are no additional steps that are required from your side because all the same endpoints are exposed on the rpc node. All you have to do is:
- Make sure that your LP key is in the right location so that it can be properly injected into the node’s keystore. Follow the steps in LP account key
- Redirect all your bots or external services from the old binary port to the new light-rpc node port.
To give you a better idea of the new architecture, here is a visual comparison of the old and new architecture:
- Before version
1.12.0, you needed to run 2 services: the LP API binary and an RPC node. The signing key is injected into the LP API binary’s keystore.
- As of version
1.12.0, the LP and general RPCs are consolidated as part of the node itself. the signing key is injected into the node’s keystore on startup.
