Skip to content

Environment ​

All services read their settings from environment variables; the repository's .env.example lists them with comments. Defaults below are what the code uses when a variable is unset.

Several protocol values (gas budget, stake, rewards, slashing, AI thresholds) are governance parameters stored on chain. Where an environment variable exists for one, it overrides the on-chain value on that node at start-up — meant for test networks; on a shared network every validator must use the same value. See Governance → Parameters.

Node ​

Network and identity ​

VariableDefaultMeaning
CHAIN_ENVmainnetmainnet: strict signatures, faucet off, RPC on localhost. testnet: warn-only signatures, faucet on
NEUROCHAIN_NETWORKneurochain-mainnet-1Network / chain id
NEUROCHAIN_DATA_DIR./dataData directory (state, WAL, key)
NEUROCHAIN_MODELS_DIR./modelsAI model weights
NEUROCHAIN_RPC_PORT9933HTTP RPC port
NEUROCHAIN_RPC_HOSTlocalhost (mainnet) / 0.0.0.0 (testnet)RPC bind address
NEUROCHAIN_P2P_PORT30333P2P port (also carries consensus)
NEUROCHAIN_P2P_PORT_MIN / _MAX1024 / 65534Accepted peer port range
NEUROCHAIN_NODE_ADDRlocalhost:<p2p port>Address peers use to reach this node; must not be 0.0.0.0. Matches the node to its genesis validator entry
NEUROCHAIN_BOOTSTRAP—Comma-separated peers to join on start
NEUROCHAIN_PEER_DISCOVERY_SECS30Peer discovery interval
NEUROCHAIN_P2P_CONN_RATE_LIMIT20Inbound P2P connections per second per IP
NEUROCHAIN_TLS_CERT, NEUROCHAIN_TLS_KEY—Serve the RPC over HTTPS

Genesis ​

VariableDefaultMeaning
NEUROCHAIN_GENESIS_VALIDATORSthis node only`neuro:name.node
NEUROCHAIN_GENESIS_ACCOUNTS—`neuro:addr.human
NEUROCHAIN_FAUCET_BALANCE1 000 000 000 NROBalance of the faucet vault at genesis
NEUROCHAIN_INITIAL_BALANCE0uNRO credited to a never-seen account on first read (test networks only)
NEUROCHAIN_GAS_SPONSORneuro:faucet.vaultOnboarding gas sponsor
NEUROCHAIN_GAS_SPONSOR_FUND1 000 000 NROIts gas pool at genesis
NEUROCHAIN_CHECKPOINT_URL—Start an empty node from this node's state snapshot

Consensus and sharding ​

VariableDefaultMeaning
NEUROCHAIN_MIN_VALIDATORS7Below this, the node warns about reduced fault tolerance
NEUROCHAIN_BLOCK_MS200Minimum wait before proposing a block with transactions
NEUROCHAIN_EMPTY_BLOCK_MS2000Minimum wait before proposing an empty block
NEUROCHAIN_SYNC_HISTORY_BLOCKS10000Decided blocks kept to serve catching-up peers
NEUROCHAIN_JAIL_BLOCKS10000Jail length after a slash (governance jail_blocks)
NEUROCHAIN_SLASH_FRACTION_DOUBLE_SIGN_BPS500Double-sign slash, basis points of min_stake
NEUROCHAIN_SLASH_REWARD_FRACTION_BPS100Reporter's share of a slash
NEUROCHAIN_SLASH_EVIDENCE_WINDOW10000Oldest offence (in blocks) that evidence may prove
NEUROCHAIN_SHARD_ID—Shard this node serves; unset = single shard
NEUROCHAIN_SHARDS4 with a shard id, else 1Number of shards
NEUROCHAIN_SHARD_DIR_PREFIXshardSub-directory name per shard

Economics and mempool ​

VariableDefaultMeaning
NEUROCHAIN_UNBONDING_BLOCKSgovernance (1 512 000)Staking lock
NEUROCHAIN_REWARD_INTERVAL_BLOCKSgovernance (216 000)Blocks between reward payouts
NEUROCHAIN_FUEL_PER_GAS_UNIT20000Contract fuel per gas unit
NEUROCHAIN_MAX_SPONSORED_FEE100000 uNROLargest fee a gas pool pays per transaction
NEUROCHAIN_MAX_MEMPOOL10000Pending transactions held
NEUROCHAIN_MAX_PENDING_PER_ACCOUNT64Pending transactions per sender
NEUROCHAIN_RBF_MIN_BUMP_PCT10Gas price increase needed to replace a pending transaction
NEUROCHAIN_MIN_FEE_PER_GAS0Extra mempool price floor
NEUROCHAIN_FAUCET_MAX_NRO100Largest faucet request (test networks)
NEUROCHAIN_FAUCET_COOLDOWN_SECS86400Faucet cooldown per address; 0 = none

AI ​

VariableDefaultMeaning
MONITOR_INTERVAL_SECS20Re-audit of deployed contracts
MONITOR_SCORE_THRESHOLD10Score change that triggers a certificate update
NEUROCHAIN_SENTINEL_POLICY_ENABLEDgovernance (0)Sentinel policy layer on/off
NEUROCHAIN_SENTINEL_HOLD_THRESHOLDgovernance (60)Score × 100 from which transfers are held
NEUROCHAIN_SENTINEL_STEPUP_THRESHOLDgovernance (70)Score × 100 from which the owner must confirm
NEUROCHAIN_SENTINEL_HOLD_BLOCKSgovernance (50)Automatic release delay
NEUROCHAIN_SENTINEL_CONFIRM_EXPIRY_BLOCKSgovernance (1000)Wait for confirmation before refund
NEUROCHAIN_SENTINEL_AGENT_CONFIRM_THRESHOLDgovernance (60)Threshold for session-key transfers
NEUROCHAIN_TRUST_ACTIVATION_BLOCKSgovernance (300)Delay before a trusted recipient counts
AI_EXPORT_MAX_LIMIT5000Rows per AI data export request

IBC v2 ​

See IBC v2 & sharding → Configuration: NEUROCHAIN_IBC_OPERATOR_PUBKEYS, NEUROCHAIN_IBC_TRUSTED_PUBKEYS, NEUROCHAIN_IBC_REQUIRE_HEADER, NEUROCHAIN_IBC_REQUIRE_PACKET_COMMITMENT, NEUROCHAIN_IBC_TIMEOUT_BLOCKS, NEUROCHAIN_IBC_MAX_PACKET_UNRO, NEUROCHAIN_IBC_MAX_CHANNEL_ESCROW_UNRO, NEUROCHAIN_IBC_NATIVE_DENOM.

Native assets ​

VariableDefaultMeaning
NEUROCHAIN_ASSET_ISSUERS—Addresses given the verified issuer tier at genesis
NEUROCHAIN_RESERVED_SYMBOLS—Tickers reserved at genesis

Both are read once, at genesis; afterwards the registries change only through governance.

Access and limits ​

VariableDefaultMeaning
NEUROCHAIN_RPC_RATE_LIMIT100RPC requests per second per IP
CORS_ALLOWED_ORIGINS*Allowed browser origins
NEUROCHAIN_INTERNAL_TOKEN—Required X-Internal-Token for internal endpoints
NEUROCHAIN_SNAPSHOT_TOKEN—Required bearer token for /api/v1/state/snapshot
NEUROCHAIN_ALLOW_SERVER_DERIVEfalseAllow POST /api/v1/wallet/derive-address (receives a recovery phrase) on test networks; always off on mainnet
RUST_LOGneurochain=info,warnLog level

Gateway ​

Listed with explanations on the Gateway page: PORT, NODE_RPC_URL, NEUROCHAIN_SHARD_NODES, SHARD_NODE_URLS, NETWORK_ID, CORS_ALLOWED_ORIGINS, TLS_CERT, TLS_KEY, rate limits (GLOBAL_RL_MAX_RPS, AI_RL_MAX_RPM, WS_*), chain watching (POLL_NODE_INTERVAL_MS, SENTINEL_*, ALERT_COOLDOWN_MS), faucet (FAUCET_AMOUNT, FAUCET_COOLDOWN_SECS, REDIS_URL) and AI tools (ANTHROPIC_API_KEY, SMARTFORGE_*, AI_EXPORT_TOKEN, ASSISTANT_*).

Web app ​

VariableDefaultMeaning
WEB_PORT8080Dev server port
WEB_HOSTlocalhostDev server bind; 0.0.0.0 to expose on the network
GATEWAY_URLhttp://localhost:3000Gateway the dev server proxies /api and /ws to
VUE_APP_NEUROCHAIN_RPC— (same origin)Force a fixed API base URL into the build
VUE_APP_SITE_URL, VUE_APP_SITE_NAME, VUE_APP_SITE_OG_IMAGE—Metadata of the deployed app
VUE_APP_DOCS_URL—Link to this documentation

Docs site ​

VariableDefaultMeaning
DOCS_SITE_URLhttps://docs.nro.worldCanonical URLs, sitemap, hreflang, llms.txt
DOCS_OG_IMAGE/og-image.pngSocial preview image
DOCS_GOOGLE_SITE_VERIFICATION, DOCS_BING_SITE_VERIFICATION—Search-console ownership tokens
DOCS_HOST, DOCS_PORTlocalhost, 5173Dev server
DOCS_BASE/Base path

MCP server ​

VariableDefaultMeaning
NEUROCHAIN_MCP_CONFIG—Path to the JSON config — see AI agents (MCP)