Pharos Docs
  • Introduction
    • About Pharos Network
    • Vision & Mision
    • Why Pharos Network
    • Concepts
      • Degree of Parallelism (DP)
  • Architecture
    • Pharos Modular Stack
    • Node Architecture
      • About Pharos Nodes
  • Core Technologies
    • Pharos Consensus
    • Pharos Execution
      • Why A New Blockchain Compute Model
      • Pharos VM
    • Pharos Pipelining
    • Pharos Store
      • Why We Need a Blockchain-Native Store
    • Pharos SPNs
  • Network Overview
    • Pharos Networks
      • Pharos Testnet Information
    • Pharos Gas Model
    • FAQ
  • Node & Validator Guide
    • Validator Requirements
    • Validator Node Deployment
      • Using Docker (Devnet)
      • Using Docker (Testnet)
    • Node Management
    • Rapid Node Initialization
      • Rapid Node Initialization(Testnet)
      • Rapid Node Initialization(Devnet)
    • Pharos Network Snapshots
    • Node Debugging & Configuration
  • 🛠️ Pharos Testnet: Rebuild Node with Preserved Node Info
  • Pharos Node Monitoring
  • Developer Guide
    • Foundry
      • Write Your First dApp
      • Write Your First Token
      • Write Your First NFT
      • Write Your First Uniswap Contract
    • Hardhat
      • Write Your First dApp
      • Write Your First Token
      • Write Your First NFT
      • Write Your First Uniswap Contract
    • Rust
    • Interoperability
      • Call EVM From WASM
  • API & SDK
    • JSON-RPC API Methods
  • Resources
    • EVM
    • Solidity
Powered by GitBook
On this page
  • 1️⃣ Stop and Backup the Existing Node
  • 2️⃣ Start a Fresh Node Container
  • 3️⃣ ⏳ Wait for Initial Sync (~3 minutes)
  • 4️⃣ Stop the Node and Restore Node Identity
  • 5️⃣ Restart and Finalize
  • 6️⃣ Clean Up Backup
Export as PDF

🛠️ Pharos Testnet: Rebuild Node with Preserved Node Info

This guide helps you rebuild your Pharos Testnet node while preserving your existing validator identity (node info). This is useful when resetting the database but retaining validator keys and configuration.


1️⃣ Stop and Backup the Existing Node

docker stop pharos-testnet
mv /data/testnet /data/testnet_bak
docker rm pharos-testnet

2️⃣ Start a Fresh Node Container

docker run -d --name pharos-testnet \\
  -v /data/testnet:/data \\
  -p 18100:18100 -p 18200:18200 -p 19000:19000 \\
  public.ecr.aws/k2g7b7g1/pharos/testnet:63b85b6b

3️⃣ ⏳ Wait for Initial Sync (~3 minutes)

Do not run docker stop or docker-compose down during this step.

You can check sync progress using:

curl 127.0.0.1:18100/ \\
  -X POST \\
  -H "Content-Type: application/json" \\
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'

4️⃣ Stop the Node and Restore Node Identity

docker stop pharos-testnet

Replace new config with the backup node info:

rm -rf /data/testnet/pharos-node/domain/light/data/
rm -rf /data/testnet/pharos-node/domain/light/certs/
rm -rf /data/testnet/resources/

mv /data/testnet_bak/pharos-node/domain/light/data/ /data/testnet/pharos-node/domain/light/data/
mv /data/testnet_bak/pharos-node/domain/light/certs/ /data/testnet/pharos-node/domain/light/certs/
mv /data/testnet_bak/resources/ /data/testnet/resources/

5️⃣ Restart and Finalize

docker start pharos-testnet

Wait ~3 minutes again for sync to resume. You can check status using:

curl 127.0.0.1:18100/ \\
  -X POST \\
  -H "Content-Type: application/json" \\
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'

6️⃣ Clean Up Backup

rm -rf /data/testnet_bak
PreviousNode Debugging & ConfigurationNextPharos Node Monitoring

Last updated 12 days ago