Skip to content

A Complete Guide - Run Node Ink L2 Blockchain Built on OP Superchain by Kraken

Notifications You must be signed in to change notification settings

arcxteam/ink-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

A Complete Guide - Run Ink Node, The L2 Blockchain Built-on Optimism Superchain by Kraken

Testnet Node - Full Guides cover

Ink is a Layer 2 blockchain project specifically tailored for DeFi applications built on the Optimism Superchain (OP Stack). Ink by the team behind Kraken, officially known as Payward Inc.

Here We Go...GAS ✨✨

This incentivized, incentive....?

Guys..currently, there isn't an incentive-basis testnet for Ink, it's worth noting that many Layer 2 projects to release tokenomics and incentives over time. Following these projects can provide insights into potential incentives and benefits down the line, as we’ve seen with other successful L2.

FOR HUGE UPDATES, WILL BE SHARING AT THIS REPO


1. Preparation - Run Ink Node 🛠️

1. Hardware Requirements 🖥️

In order to run Ink node, its need a server like VPS with the minimum recommended specs

Requirement Details
RAM/Memory 6 - 16 GB
CPU/vCPU 6 - 8 Cores
Storage Space 100 GB - More
Supported OS Ubuntu 20.04-22.04-24.04 LTS

Running an archive node will demand additional disk space over time. More CPU and RAM will enhance performance with higher RPC traffic.

inknode3

2. Software Prerequisites 🧰

In order to run Ink node, its need ensure Docker is installed on your server (VPS)

Requirement Details
Docker Docker Ubuntu
Installation Script Monitor Based-on Docker

3. Rollup-specific Funct as Consensus-Layer 🔄

Sepolia L1 RPC & Beacon APIs (API specification for the beacon chain, RPC endpoints)

  • ETH Sepolia L1 RPC public or private Get RPC
  • ETH Beacon L1 RPC public or private Get RPC

4. Port on The Firewall Server (optional) 🔒

Binding or not its optional, but you need know this port are open for tcp/udp

  • node-op-node: on the host uses PORT 6060, 7300, 9222, 9545
  • node-op-gEth: on the host uses PORT 8545, 8546, 30303, 7301

note; checking other port use it or not, w/ cmd> sudo ufw status

2. Installation - Run Ink Node ⚙️

1. Configured Binding Port (optional) 🔌

sudo ufw allow 6060/tcp && sudo ufw allow 7300/tcp && sudo ufw allow 9222/tcp && sudo ufw allow 9545/tcp && sudo ufw allow 9222/udp && sudo ufw allow 8545:8546/tcp && sudo ufw allow 30303/tcp && sudo ufw allow 30303/udp && sudo ufw allow 7301/tcp && sudo ufw reload

2. Clone Repository 📂

git clone https://github.com/inkonchain/node
cd node

3. Edit File Name env.ink-sepolia ✏️

nano .env.ink-sepolia
  • In both lines, replace the RPC or use this

  • Save and exit the editor (press CTRL+X, then Y, and ENTER)

L1_RPC_URL=https://sepolia.drpc.org
L1_BEACON_URL=https://eth-beacon-chain-sepolia.drpc.org/rest/

inknode1

4. Run the Setup Script 🚀

Run at this

./setup.sh

inknode2

  • stay calm... processing a 17GB file & setup underway. Plz check back in a few minutes...an estimate around 10-15 minutes for the setup. Once complete, run the docker command below.

Start execution on Docker

docker compose up -d

Save your private key

cat var/secrets/jwt.txt

3. Verifying Sync & Run Status 🔍

1. Using the op-node API 🌐

  • Check the sync status with the optimism_syncStatus method on the op-node API to monitor your node’s current status.
curl -X POST -H "Content-Type: application/json" --data \
    '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' \
    http://localhost:9545 | jq

2. Using the op-geth API 🌐

  • Verify full sync by calling the eth_blockNumber method on the op-geth API. If synced, this should match the latest block number on a block explorer.`
curl http://localhost:8545 -X POST \
    -H "Content-Type: application/json" \
    --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' | jq -r .result | sed 's/^0x//' | awk '{printf "%d\n", "0x" $0}';

3. Compare with Remote RPC 👀

  • Use this commands to compare your local finalized block against the finalized block from the Remote RPC.
local_block=$(curl -s -X POST http://localhost:8545 -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["finalized", false],"id":1}' \
  | jq -r .result.number | sed 's/^0x//' | awk '{printf "%d\n", "0x" $0}'); \
remote_block=$(curl -s -X POST https://rpc-gel-sepolia.inkonchain.com/ -H "Content-Type: application/json" \
 --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["finalized", false],"id":1}' \
 | jq -r .result.number | sed 's/^0x//' | awk '{printf "%d\n", "0x" $0}'); \
echo -e "Local finalized block: $local_block\nRemote finalized block: $remote_block"
  • The node is in sync when both the Local finalized block and Remote finalized block are equal. Check the lastest block return by your node and compare with explorer on https://explorer-sepolia.inkonchain.com/
- Results logs --> Local finalized block: 4449608
- Result logs --> Remote finalized block: 4449608

inknode4

4. Important Note ⚠️

  • A syncing your node may take several days. Monitor usage and plan accordingly.

4. Super Commands Logs 📜

  • Save private key cmd.> cat var/secrets/jwt.txt
  • Logs info node-op-node cmd.> docker logs -f node-op-node-1 --tail=10
  • Logs info node-op-geth cmd.> docker logs -f node-op-geth-1 --tail=10
  • Logs status resources cmd.> docker stats

5. Get Ink OG Discord