qubiccore/bob

By qubiccore

โ€ขUpdated about 7 hours ago

High-performance indexer for the Qubic network that provides a JSON-RPC 2.0 API (http/ws)

Image
Networking
2

10K+

qubiccore/bob repository overview

โ Qubic Bob

Latest version Image size

Qubic Bob is a high-performance indexer for the Qubic networkโ . It syncs tick data from peers, verifies integrity via quorum & log events, indexes blockchain state, and exposes it through:

  • ๐Ÿ”Œ JSON-RPC 2.0 API (HTTP & WebSocket) โ€” Ethereum-like, designed for exchanges, dApps, and explorers.
  • ๐ŸŒ REST API โ€” for tooling that prefers plain HTTP.
  • ๐Ÿ“ก WebSocket subscriptions โ€” real-time tickStream, newTicks, logs, transfers.

This image ships bob + KeyDB + Kvrocks in a single container โ€” no extra services to install.


โ ๐Ÿš€ Quick start

โ One-liner
docker run -d --name qubic-bob \
  -p 21842:21842 \
  -p 40420:40420 \
  -e NODE_SEED=your_55_char_lowercase_seed_a_z_only_padded_to_55chars \
  -v qubic-bob-redis:/data/redis \
  -v qubic-bob-kvrocks:/data/kvrocks \
  -v qubic-bob-data:/data/bob \
  qubiccore/bob:latest
โ Docker Compose
services:
  qubic-bob:
    image: qubiccore/bob:latest
    container_name: qubic-bob
    restart: unless-stopped
    ports:
      - "21842:21842"     # P2P
      - "40420:40420"     # JSON-RPC / REST / WebSocket
    environment:
      NODE_SEED: your_55_char_lowercase_seed_a_z_only_padded_to_55chars
      NODE_ALIAS: my-bob-node
      # See the full list at docs/DOCKER_ENV.md
    volumes:
      - qubic-bob-redis:/data/redis
      - qubic-bob-kvrocks:/data/kvrocks
      - qubic-bob-data:/data/bob

volumes:
  qubic-bob-redis:
  qubic-bob-kvrocks:
  qubic-bob-data:
โ Verify it's running
# Wait ~30s after start, then:
curl -s http://localhost:40420/status | jq
curl -s -X POST http://localhost:40420/qubic \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"qubic_getTickNumber","params":[],"id":1}'

โ ๐Ÿ“ฆ Available tags

TagWhat it is
latestLatest stable release. Recommended for production.
vX.Y.Z (e.g. v1.5.0)Pinned version. Recommended if you need reproducibility.
nightlyDaily build from master. May be unstable.

See the release notesโ  for what changed in each version.


โ ๐Ÿ–ฅ๏ธ System requirements

ResourceMinimumRecommended
CPU4 cores (AVX2 required)8+ cores
RAM12 GB32 GB
Storage300 GB SSD/NVMe500 GB+ NVMe
Network100 Mbps1 Gbps

Bob is memory-hungry on busy networks. KeyDB holds recent ticks in RAM before migrating to Kvrocks on disk; if the network throughput exceeds your REDIS_MAXMEMORY, you'll see OOM command not allowed when used memory > maxmemory errors in the log. See Tuning under loadโ  below.


โ ๐Ÿ”Œ API endpoints

EndpointProtocolPurpose
POST http://localhost:40420/qubicJSON-RPC 2.0Primary API
ws://localhost:40420/ws/qubicWebSocketSubscriptions + JSON-RPC
GET http://localhost:40420/*RESTConvenience endpoints
GET http://localhost:40420/swaggerSwagger UIREST API explorer
โ Common JSON-RPC methods
MethodDescription
qubic_getTickNumberLatest tick
qubic_getTickByNumberFull tick details (digests, votes, fees, log range)
qubic_getBalanceIdentity's QU balance
qubic_getAssetBalanceAsset balance (ownership + possession)
qubic_getTransactionByHashTransaction by hash
qubic_getTransactionReceiptReceipt with status: "success" | "failed" | "pending"
qubic_getLogsFilter logs by tick range, identity, log type
qubic_broadcastTransactionSubmit a signed transaction
qubic_statusFull node status
qubic_subscribeWebSocket subscription (newTicks, logs, transfers, tickStream)

Full reference: JSON-RPC API Guideโ  ยท REST API Guideโ  ยท Interactive playgroundโ 


โ โš™๏ธ Configuration

Two ways to configure, in order of preference:

  1. Environment variables (recommended) โ€” see docs/DOCKER_ENV.mdโ  for the complete reference of all 39 supported vars.
  2. Mount a custom bob.json โ€” for advanced cases where env vars aren't enough.
โ Most-used env vars
Env varPurposeDefault
NODE_SEED55-char aโ€“z seed identifying this node-
NODE_ALIASDisplay nameBig fat bob
P2P_NODESComma-separated peer listauto-discover
LOG_LEVELtrace/debug/info/warn/errorinfo
REDIS_MAXMEMORYKeyDB memory cap2gb
KVROCKS_TTLData retention in kvrocks (seconds)1209600 (14 days)
โ Custom bob.json
docker run -d --name qubic-bob \
  -p 21842:21842 -p 40420:40420 \
  -v ./bob.json:/app/bob.json \
  -v qubic-bob-redis:/data/redis \
  -v qubic-bob-kvrocks:/data/kvrocks \
  -v qubic-bob-data:/data/bob \
  qubiccore/bob:latest

โš ๏ธ Do not use :ro on the bob.json mount โ€” the entrypoint patches the file at startup.

Full bob.json reference: docs/CONFIG_FILE.MDโ .


โ ๐Ÿ’พ Volumes

PathWhat's in itPersist?
/data/redisKeyDB persistence (AOF + RDB)yes
/data/kvrocksKvrocks (RocksDB-backed) datayes
/data/bobbob's snapshot filesyes
/app/logslogs from supervisord-managed childrenoptional

A fresh container with no volumes will start clean every restart โ€” fine for dev, not for guardians or production indexers.


โ ๐Ÿ› ๏ธ Tuning under load

If you see Failed to add log ... OOM command not allowed:

SymptomFix
Steady OOM under high tx volumeIncrease REDIS_MAXMEMORY (e.g. 8gb)
OOM after container restartWait for migration to drain, or lower LAST_N_TICK_STORAGE (lastNTick mode) / n_tickdata_to_store (kvrocks mode)
Disk usage growing fastLower KVROCKS_TTL (default 14 days). 7 days halves disk.
Cleaner falling behindCheck the Current state: log lines โ€” the GC: <a>/<b> numbers should track the indexing cursor; if they drift, your machine can't keep up.

bob logs a KeyDB memory: <used> / <max> (XX%) line roughly once per minute and immediately when usage crosses 85% โ€” this is the cleanest signal for memory pressure.


โ ๐Ÿ”ง Troubleshooting

IssueCheck
Container exits immediatelydocker logs qubic-bob โ€” usually a config validation error (bad NODE_SEED, bad P2P_NODES format)
Stuck at "Waiting for new epoch info from peers"Peer set unreachable. Verify outbound to port 21841 on the listed peers. Default uses qubic.global for auto-discovery.
status: "failed" for low-value txsShould not happen on v1.4.0+ (the default SPAM_QU_THRESHOLD is now 0). Upgrade if you see this.
tick_data endpoint returns zerosThe tick is older than your retention window. Check TICK_STORAGE_MODE: lastNTick deletes; kvrocks archives.
WebSocket subscription disconnectsBob auto-disconnects idle WS connections. Re-subscribe on disconnect (this is expected).

โ ๐Ÿง‘โ€๐Ÿ’ป For developers

โ Inside the container
# View the effective config
docker exec qubic-bob jq . /app/bob.json
docker exec qubic-bob cat /etc/redis/redis.conf
docker exec qubic-bob cat /etc/kvrocks/kvrocks.conf

# Talk to KeyDB / Kvrocks directly
docker exec qubic-bob redis-cli ping            # KeyDB on 6379
docker exec qubic-bob redis-cli -p 6666 ping    # Kvrocks on 6666

# Tail bob logs
docker logs -f qubic-bob

Built with โค๏ธ by the Qubic Bob team. Massive thanks to @krypdkatโ  for the original qubicbob project this is based on.

Tag summary

Content type

Image

Digest

sha256:631779bb9โ€ฆ

Size

59.6 MB

Last updated

about 7 hours ago

docker pull qubiccore/bob:v1.5.14