⬡ Node
Running a Node
Set up a full Tensorium node: init the chain, sync from peers, run RPC and P2P services.
Overview
A full node validates every block, maintains the complete chain state, serves the RPC API to miners and wallets, and participates in P2P block/transaction propagation. Running a node strengthens the network.
| Service | Default Bind | Purpose |
|---|---|---|
tensorium-node rpc | 127.0.0.1:23332 | HTTP RPC — miner, wallet, and app integration |
tensorium-node p2p-listen | 0.0.0.0:23333 | P2P — receive blocks and transactions from peers |
Never expose RPC publicly. Bind
tensorium-node rpc to 127.0.0.1 only. The RPC has no authentication — anyone with access can submit arbitrary blocks. Open port 23333 (P2P) in your firewall, but keep 23332 (RPC) closed.1. Initialize the Chain
bash
mkdir -p ~/tensorium-node TENSORIUM_STATE=~/tensorium-node/state.json \ TENSORIUM_MEMPOOL=~/tensorium-node/mempool.json \ TENSORIUM_BANS=~/tensorium-node/banlist.json \ TENSORIUM_NODE_ID=my-node \ tensorium-node init
This mines the genesis block locally (~30s at difficulty 26). All nodes produce the identical genesis because the timestamp is hardcoded:
chain_id=tensorium-testnet-0 height=0 hash=00000035d8a99c0900fec5daa3ef5a7c2d71c7140e473d239a24b0dd4cd7f6c3
2. Sync the Chain
bash
TENSORIUM_STATE=~/tensorium-node/state.json \ TENSORIUM_MEMPOOL=~/tensorium-node/mempool.json \ TENSORIUM_BANS=~/tensorium-node/banlist.json \ tensorium-node sync 157.230.44.162:23333
Pulls all missing blocks from the seed node in batches of 50. Re-run any time to catch up after downtime.
3. Run Services
bash — nohup (quick start)
STATE=~/tensorium-node/state.json MEMPOOL=~/tensorium-node/mempool.json BANS=~/tensorium-node/banlist.json nohup bash -c "TENSORIUM_STATE=$STATE TENSORIUM_MEMPOOL=$MEMPOOL \ TENSORIUM_BANS=$BANS TENSORIUM_PEERS=157.230.44.162:23333 \ tensorium-node rpc 127.0.0.1:23332" > ~/tensorium-node/rpc.log 2>&1 & nohup bash -c "TENSORIUM_STATE=$STATE TENSORIUM_MEMPOOL=$MEMPOOL \ TENSORIUM_BANS=$BANS \ tensorium-node p2p-listen 0.0.0.0:23333" > ~/tensorium-node/p2p.log 2>&1 & echo "Node running. Check: curl http://localhost:23332/health"
Verify
curl -s http://localhost:23332/health
# {"ok":true}
curl -s http://localhost:23332/getblockcount
# {"blocks":N,"chain_id":"tensorium-testnet-0","height":N-1}
4. Systemd (Production)
bash
USER=$(whoami)
HOME_DIR=$HOME
sudo tee /etc/systemd/system/tensorium-rpc.service <<EOF
[Unit]
Description=Tensorium Node RPC
After=network.target
[Service]
Type=simple
User=${USER}
Environment=TENSORIUM_STATE=${HOME_DIR}/tensorium-node/state.json
Environment=TENSORIUM_MEMPOOL=${HOME_DIR}/tensorium-node/mempool.json
Environment=TENSORIUM_BANS=${HOME_DIR}/tensorium-node/banlist.json
Environment=TENSORIUM_PEERS=157.230.44.162:23333
ExecStart=/usr/local/bin/tensorium-node rpc 127.0.0.1:23332
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo tee /etc/systemd/system/tensorium-p2p.service <<EOF
[Unit]
Description=Tensorium Node P2P
After=network.target
[Service]
Type=simple
User=${USER}
Environment=TENSORIUM_STATE=${HOME_DIR}/tensorium-node/state.json
Environment=TENSORIUM_MEMPOOL=${HOME_DIR}/tensorium-node/mempool.json
Environment=TENSORIUM_BANS=${HOME_DIR}/tensorium-node/banlist.json
ExecStart=/usr/local/bin/tensorium-node p2p-listen 0.0.0.0:23333
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now tensorium-rpc tensorium-p2p
# Check status
sudo systemctl status tensorium-rpc tensorium-p2p
Node Commands Reference
| Command | Description |
|---|---|
tensorium-node init | Mine and save the genesis block |
tensorium-node status | Print current chain tip and height |
tensorium-node rpc [bind] | Start HTTP RPC server (default 127.0.0.1:23332) |
tensorium-node p2p-listen [bind] | Start P2P server (default 0.0.0.0:23333) |
tensorium-node sync [peer] | Pull missing blocks from a peer |
tensorium-node p2p-connect <peer> | Diagnostic handshake (check connectivity) |
tensorium-node peers | Print configured TENSORIUM_PEERS |
tensorium-node banlist | Show peer ban list |
tensorium-node unban <ip> | Remove an IP from ban list |
Environment Variables
TENSORIUM_STATEChain state file path. Default:
tensorium-testnet-state.jsonTENSORIUM_MEMPOOLMempool file path. Default:
tensorium-testnet-mempool.jsonTENSORIUM_BANSPeer ban list file. Default:
tensorium-testnet-banlist.jsonTENSORIUM_PEERSComma-separated peers for block/tx broadcast. Example:
157.230.44.162:23333TENSORIUM_NODE_IDNode identity shown in P2P handshake. Default:
node-<timestamp>