Skip to Content
⚠️ Alert: Sylan is under active development—only trust contract/wallet addresses announced on our official channels; we will never DM you, ask for funds, or run surprise airdrops/presales.
NodeSetup

Node Setup

This page provides a production‑ready path using Node.js 20+ or Docker. The node is a small TypeScript service with JSON logs and an HTTP health check.

Prerequisites

  • Linux/Windows/macOS with Node.js 20+ and npm, or Docker 24+
  • RPC access to your target network (HTTP; optional WebSocket)
  • A dedicated EOA with some gas token
  • SYL tokens to stake (see Node Registry) and approve the staking contract

Install (source)

# 1) clone & install cp .env.example .env # then edit values (see below) npm i # 2) develop or build npm run dev # watch mode npm run build && npm start

Install (Docker)

# Build local image and run docker build -t sylan/node . # Provide env via --env-file or bind a mounted .env docker run --rm -it --name sylan-node --env-file .env sylan/node

Multi‑node compose (for testing)

version: "3.9" services: node1: build: . image: sylan/node restart: unless-stopped env_file: [.env.common, .env.node1] node2: image: sylan/node depends_on: [node1] restart: unless-stopped env_file: [.env.common, .env.node2] node3: image: sylan/node depends_on: [node1] restart: unless-stopped env_file: [.env.common, .env.node3]

Environment variables

KeyDescription
RPC_URLHTTP RPC endpoint for the target chain
WS_RPC_URL(optional) WebSocket RPC; enables live event streaming with HTTP polling fallback
CHAIN_IDNetwork chain id (e.g., 80002 for Polygon Amoy)
CONSENSUS_ADDRDeployed APIConsensus address
REGISTRY_ADDRDeployed AccessRegistry address
PRIVATE_KEYNode’s EOA private key (hex, 0x…)
LOG_LEVELinfo, debug, warn, etc.
POLL_FROM_BLOCKStarting block for polling fallback (BigInt string)
CONFIRMATIONSBlock confirmations for reads
DRY_RUNtrue to simulate without sending txs
PROVIDER_BASE_URLBase URL for Provider Gateway (the off‑chain server exposing /snapshot)
PROVIDER_API_KEYOptional API key header sent as x-api-key
PINATA_JWTIf set, node pins JSON pointers to IPFS via Pinata
IPFS_API_URLAlternative native IPFS HTTP API (if not using Pinata)

Health check & logs

  • Health endpoint: GET /healthz200 OK when the event loop is active.
  • Logs are JSON via pino; redact secrets by default.
  • Graceful shutdown on SIGINT/SIGTERM.
Last updated on