RPC Guide
Prerequisites
Ensure Docker is installed (or install it in your OS of choice) and run the gluwa/creditcoin3 Docker image.
Using Docker to run a Mainnet RPC
docker run \
--name creditcoin-rpc \
-p 30333:30333 \
-p 9944:9944 \
-p 9615:9615 \
-v /path/to/your/data:/creditcoin-node/data \
gluwa/creditcoin3:3.55.0-mainnet \
--name "rpc name" \
--prometheus-external \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--public-addr "/dns4/<host_ip>/tcp/30333" \
--chain /mainnetSpecRaw.json \
--bootnodes "/dns4/cc3-bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWLGyvbdQ3wTGjRAEueFsDnstZnV8fN3iyPTmHeyswSPGy" \
--pruning archive \
--base-path /creditcoin-node/data \
--port 30333 \
--rpc-external \
--rpc-cors all \
--rpc-max-connections 1024
docker run `
--name creditcoin-rpc `
-p 30333:30333 `
-p 9944:9944 `
-p 9615:9615 `
-v /path/to/your/data:/creditcoin-node/data `
gluwa/creditcoin3:3.55.0-mainnet `
--name "rpc name" `
--prometheus-external `
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" `
--public-addr "/dns4/<host_ip>/tcp/30333" `
--chain /mainnetSpecRaw.json `
--bootnodes "/dns4/cc3-bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWLGyvbdQ3wTGjRAEueFsDnstZnV8fN3iyPTmHeyswSPGy" `
--pruning archive `
--base-path /creditcoin-node/data `
--port 30333 `
--rpc-external `
--rpc-cors all `
--rpc-max-connections 1024
Configuration Notes
Port 30333: Node-to-node P2P communications port
Port 9944: JSON-RPC/WebSocket endpoint for blockchain interaction.
Port 9615: Prometheus metrics endpoint (optional)
-v (volume mount): Maps host directory to container path. Replace
/path/to/your/datawith your actual data directory path. It's important that docker has the ability to write to this directory, otherwise you will see errors such asError: Service(Client(Backend("IO Error: Permission denied (os error 13)"))).--name: Custom name for your RPC node
--prometheus-external: Enable Prometheus metrics (optional)
--telemetry-url: Opt in to telemetry reporting (optional)
--public-addr: Replace
<host_ip>with your actual public IP or hostname--chain: Connect to mainnet using the spec file (use
testnetfor testnet)--pruning archive: Keep full chain history
--base-path: Directory inside container to store node data
--rpc-external: Allow RPC connections from external sources
--rpc-cors all: Allow all CORS origins
--rpc-max-connections: Maximum concurrent RPC connections
Using Docker to run a Testnet RPC
docker run \
--name creditcoin-rpc \
-p 30333:30333 \
-p 9944:9944 \
-p 9615:9615 \
-v /path/to/your/data:/creditcoin-node/data \
gluwa/creditcoin3:3.55.0-testnet \
--name "rpc name" \
--prometheus-external \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--public-addr "/dns4/<host_ip>/tcp/30333" \
--chain testnet \
--bootnodes "/dns4/cc3-test-bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAxmsWr6iEjFyLqQBzfLvbCRTAhYBeszyr8UWgQx6Zu7K" \
--pruning archive \
--base-path /creditcoin-node/data \
--port 30333 \
--rpc-external \
--rpc-cors all \
--rpc-max-connections 1024
docker run `
--name creditcoin-rpc `
-p 30333:30333 `
-p 9944:9944 `
-p 9615:9615 `
-v path/to/your/data:/creditcoin-node/data `
gluwa/creditcoin3:3.55.0-testnet `
--name "rpc name" `
--prometheus-external `
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" `
--public-addr "/dns4/<host_ip>/tcp/30333" `
--chain testnet `
--bootnodes "/dns4/cc3-test-bootnode.creditcoin.network/tcp/30333/p2p/12D3KooWAxmsWr6iEjFyLqQBzfLvbCRTAhYBeszyr8UWgQx6Zu7K" `
--pruning archive `
--base-path /creditcoin-node/data `
--port 30333 `
--rpc-external `
--rpc-cors all `
--rpc-max-connections 1024
Configuration Notes
Port 30333: Node-to-node P2P communications port
Port 9944: JSON-RPC/WebSocket endpoint for blockchain interaction.
Port 9615: Prometheus metrics endpoint (optional)
-v (volume mount): Maps host directory to container path. Replace
/path/to/your/datawith your actual data directory path. It's important that docker has the ability to write to this directory, otherwise you will see errors such asError: Service(Client(Backend("IO Error: Permission denied (os error 13)"))).--name: Custom name for your RPC node
--prometheus-external: Enable Prometheus metrics (optional)
--telemetry-url: Opt in to telemetry reporting (optional)
--public-addr: Replace
<host_ip>with your actual public IP or hostname--chain: Connect to mainnet using the spec file (use
testnetfor testnet)--pruning archive: Keep full chain history
--base-path: Directory inside container to store node data
--rpc-external: Allow RPC connections from external sources
--rpc-cors all: Allow all CORS origins
--rpc-max-connections: Maximum concurrent RPC connections
Last updated