Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 4.04 KB

node-types.mdx

File metadata and controls

62 lines (42 loc) · 4.04 KB
title Node Types
description Learn about different types of Sei nodes, their purposes, commonly used ports, and systemd configuration.
keywords
sei node
blockchain node
node types
RPC
archive node
validator node
state sync
ports
systemd
P2P

You can run a few types of nodes on the Sei network. Each type has a different purpose:

  • RPC / full nodes: these nodes are generally used to query data or to interact with the chain. They keep some state, but not all state since genesis. The default settings run an RPC / full node.

  • Archive / full nodes: these nodes keep the full state of the chain from genesis. They generally need large disks (at least 10 TB). To enable this type of node, set min-retain-blocks=0 and pruning="nothing" in your app.toml. Also set ss-keep-recent = 0 under [state-store] so that the SeiDB state store keeps every version.

  • Frozen nodes: these full nodes stop one block before an upgrade height. They keep running the outgoing release and serve queries for the heights before the upgrade. To run one, see Run frozen nodes.

  • State sync nodes: these nodes serve snapshot data that other nodes use to bootstrap onto the chain. To enable this type of node, set a non-zero snapshot-interval under [state-sync] in app.toml. The enable=true setting under [statesync] in config.toml does the opposite: it makes a node bootstrap from the snapshots of other nodes.

  • Validator nodes: these nodes propose and sign blocks to secure the chain. To enable this type of node, set mode=validator in config.toml. Because Sei uses proof of stake, you must have enough delegation to join the active set.

Commonly used ports

The seid binary uses these TCP ports. Change their settings to match your environment.

  • 26656: The default port for P2P communication. This port is used to communicate with other nodes. It must be open for the node to join a network.
  • 26657: The default port for the RPC interface. This port is used to send queries and transactions, so it must be open to serve queries from seid.
  • 1317: The default port for HTTP RESTful requests to the seid API server. Applications and services can use it to interact with the seid instance through RPC.
  • 9090: The default port for gRPC communication. This port is used for high-performance communication with the node.
  • 8545: The default port for EVM HTTP RPC. This port is used for Ethereum JSON-RPC calls. It must be open if you want to interact with EVM-compatible applications. The frozen-rpc-router binary also listens on 127.0.0.1:8545 by default. If you run the router on the same host as a live node, move one of them to a different port. The linked example keeps the router on 8545 and moves the two co-located nodes to 9545 and 9546.
  • 8546: The default port for EVM WebSocket RPC. EVM applications that need WebSocket connections use this port for real-time communication.
  • 26660: The default port for the Prometheus metrics endpoint, which you can use to monitor the environment. The node opens it only when prometheus = true under [instrumentation] in config.toml. In the default configuration, this port is not open. Seed nodes serve it too. See Seed node Prometheus metrics.

You can change all of these ports in $HOME/.sei/config/config.toml and $HOME/.sei/config/app.toml.

Systemd file template

[Unit]
Description=Sei Node
After=network.target

[Service]
User=<USER>
Type=simple
ExecStart=<PATH_TO_SEID>/seid start --chain-id <Network>
Restart=always

# wait 30 seconds before restarting the service after it has failed.

RestartSec=30

# wait up to 30 seconds for the service to stop gracefully when it is being stopped.

TimeoutStopSec=30

# send the SIGINT signal (equivalent to pressing Ctrl-C) to the service process when it is being stopped

# giving it a chance to shut down gracefully.

KillSignal=SIGINT
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target