Node Setup

Introduction

Running a node on Studio Blockchain enables developers and validators to fully interact with the network, participate in transaction validation, and contribute to the ecosystem’s decentralization. Whether you want to set up a full node for real-time interaction or a light node for basic querying, this guide provides step-by-step instructions.

1. Types of Nodes

Studio Blockchain supports two types of nodes:

Full Node:

  • Stores the complete blockchain ledger.

  • Provides full transaction and block data.

  • Best for validators, indexers, and developers requiring deep insights.

Light Node:

  • Stores only the latest blockchain state.

  • Relies on full nodes for historical data.

  • Ideal for users with limited storage or computational resources.

2. System Requirements

Hardware Requirements for Full Node:

  • CPU: Quad-core processor (2.5 GHz or higher).

  • RAM: 8 GB or more (4 GB minimum).

  • Storage: Minimum 50 GB disk space (expandable as the blockchain grows).

  • Network: High-speed internet connection (minimum 100 Mbps).

  • OS: Linux (Ubuntu 20.04 or higher recommended).

Hardware Requirements for Light Node:

  • CPU: Dual-core processor (2.0 GHz or higher).

  • RAM: 4 GB or more.

  • Storage: Minimum 10 GB disk space.

  • Network: High-speed internet connection (minimum 50 Mbps).

  • OS: Same as above.

3. Installing Studio Blockchain Node

Step 1: Install Dependencies

Update System Packages:

sudo apt update && sudo apt upgrade

Install Required Software:

sudo apt install build-essential curl git jq -y

Step 2: Install Geth

Studio Blockchain’s implementation is based on Geth (v1.13.14-stable). Install Geth using the following commands:

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt update
sudo apt install geth -y

Step 3: Configure the Node

Initialize the Genesis File:

geth init /path/to/genesis.json --datadir ~/.studio-node

Start the Node:

geth --datadir ~/.studio-node --networkid 240240 --http --http.addr 0.0.0.0 --http.port 8545 --http.api web3,eth,net --ws --ws.port 8546 --ws.api web3,eth,net

4. Connecting to the Studio Blockchain Testnet

After starting the node, you can connect it to the Studio Blockchain Testnet:

Modify Configuration: Add the Studio Blockchain Testnet bootnodes to the configuration file:

"bootnodes": [
  "enode://...@rpc.studio-blockchain.com:30303"
]

Sync the Blockchain:

tail -f ~/.studio-node/logs/node.log

5. Running a Validator Node

If you want to participate as a validator on Studio Blockchain’s Proof-of-Authority (PoA) network, follow these steps:

Generate Validator Key:

geth account new --datadir ~/.studio-node

Submit Validator Address: Send your validator address to the Studio Blockchain governance team to be added to the authorized list of validators.

Start Validator Node:

geth --datadir ~/.studio-node --mine --miner.threads=4

6. Monitoring Your Node

Use the following commands to monitor your node’s status and performance:

Check Peer Count:

curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' http://localhost:8545

Check Sync Status:

curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545

Node Health Check: Use the indexer "/health" endpoint for additional health metrics:

curl http://localhost:3000/health

7. Best Practices

Security:

  • Use a firewall to restrict access to your node’s ports.

  • Regularly update your node software to the latest version.

  • Enable SSL/TLS for secure connections.

Backup:

  • Backup the ~/.studio-node/keystore directory regularly to avoid losing wallet or validator keys.

Resource Allocation:

  • Monitor CPU and memory usage to ensure optimal performance.

  • Allocate sufficient disk space for blockchain growth.


Next Steps

Now that your node is set up:

  1. Explore the Indexer and Querying Data subpage to efficiently interact with blockchain data.

  2. Join the Studio Blockchain validator network to support the ecosystem.

  3. Test your dApps and contracts with real-time node interactions.

Last updated