LogoLogo
  • Overview
  • Getting Started
    • Using Mainnet
    • Wallet Configuration
    • Using DApps
    • Technical Architecture
  • Utilities
    • Fees
    • Bridges
    • Block Explorers
    • Oracles
    • Data Indexer
  • Development
    • Private RPC Providers
    • Contract Deployment(Remix)
    • Contract Deployment(Starton)
    • NFT APIs
    • Account Abstraction
    • Contracts
    • Running Matchain Node
  • Links
    • Network Status
    • Rollup info page
    • Matchain Website
Powered by GitBook
LogoLogo

All Rights Reserved © 2024 Matchain

On this page

Was this helpful?

  1. Development

Running Matchain Node

PreviousContracts

Last updated 1 month ago

Was this helpful?

This guide provides instructions on launching a full node on Matchain using a simple Docker Compose script. Follow the steps below to set up your full node.


Prerequisites

Clone the Repository

Before starting, clone the opstack-fullnode-sync repository:

git clone -b v0.3.0 https://github.com/matchain/opstack-fullnode-sync.git
cd opstack-fullnode-sync

Recommended Hardware

  • CPU: 4 Cores

  • RAM: 16 GB+

  • Storage: 1TB SSD (NVMe Recommended)

  • Network: 100 MB/s+ Download


Preparation

  1. Generate JWT File Run the following command to generate a JWT file:

    openssl rand -hex 32 > jwt.txt
  2. Configure Environment Variables Copy the .env.example file to create your .env file, and update the values as needed:

    cp .env.example .env

    Modify .env to set your parameters, or request a preconfigured .env from the Matchain team.


Operating the Node

Start the Node

Use Docker Compose to start the node:

docker compose --env-file .env up -d

View Logs

  • Logs for OP Node:

    docker compose logs -f node
  • Logs for OP Geth:

    docker compose logs -f geth

Sanity Test

Check Sync Status

To check the sync status, use:

curl --location 'localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": [],
  "id": 2
}'
  • If the node is still syncing, you will see output similar to:

    {
      "jsonrpc": "2.0",
      "id": 2,
      "result": {
        "currentBlock": "0x7d0f5",
        ...
        "highestBlock": "0xd8674",
        ...
      }
    }
  • When syncing completes, you will see:

    {"jsonrpc":"2.0","id":2,"result":false}

Check Block Number

After syncing completes, verify by checking the latest block number:

curl --location 'localhost:8545' \
--header 'Content-Type: application/json' \
--data '{
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "id": 2
}'
  • Example response:

    {
      "jsonrpc": "2.0",
      "id": 2,
      "result": "0x2139"
    }

Stop the Node

To stop the node, use:

docker compose down

Reference

For further details, refer to the .

file
Optimism Documentation