Phala Network Docs
  • Home
    • πŸ‘ΎPhala Network Docs
  • Overview
    • βš–οΈPhala Network
      • πŸ’ŽPhala Cloud
      • πŸ₯·Dstack
      • πŸ”GPU TEE
    • πŸ’ŽPHA Token
      • πŸͺ™Introduction
      • πŸ‘Delegation
        • Delegate to StakePool
        • What is Vault
        • What is Share
        • WrappedBalances & W-PHA
        • Examples of Delegation
        • Use Phala App to Delegate
        • Estimate Your Reward
      • πŸ—³οΈGovernance
        • Governance Mechanism
        • Join the Council
        • Voting for Councillors
        • Apply for Project Funding
        • Phala Treasury
        • Phala Governance
        • Setting Up an Account Identity
  • Phala Cloud
    • πŸš€Getting Started
      • Sign-up for Cloud Account
      • Start from Cloud UI
      • Start from Cloud CLI
      • Start from Template
    • 🟧Launch an Eliza Agent
    • πŸ“¦Create CVM
      • Create CVM with Docker Compose
      • Create CVM with Private Docker Image
      • Set Secure Environment Variables
      • Access Your Applications
      • Setting Up Custom Domain
      • Debug Your Application
      • Deployment Cheat Sheet
    • βš™οΈCVM Management
      • Upgrade Application
      • Resize Resources
      • Check Logs
      • Private Log Viewer
    • πŸ”„Deploy Docker App in TEE
      • Expose Service Port
      • Generate RA Report
      • Access Database
      • Create Crypto Wallet
    • πŸ›³οΈSetup a CI/CD Pipeline
    • πŸ› οΈPhala Cloud CLI Reference
      • phala
        • auth
        • cvms
        • docker
        • simulator
    • Production Checklist
    • ❓FAQs
    • πŸ”Troubleshooting
    • πŸ“–Glossary
    • πŸ“‹References
    • πŸ”’Use Cases
      • TEE with AI
      • TEE with FHE and MPC
      • TEE with ZK and ZKrollup
  • Dstack
    • Overview
    • Getting Started
    • Hardware Requirements
    • Design Documents
      • Decentralized Root-of-Trust
      • Key Management Protocol
      • Zero Trust HTTPs (TLS)
    • Acknowledgement
  • LLM in GPU TEE
    • πŸ‘©β€πŸ’»Host LLM in GPU TEE
    • πŸ”GPU TEE Inference API
    • 🏎️GPU TEE Benchmark
  • Tech Specs
    • ⛓️Blockchain
      • Blockchain Entities
      • Cluster of Workers
      • Secret Key Hierarchy
  • References
    • πŸ”Setting Up a Wallet on Phala
      • Acquiring PHA
    • πŸŒ‰SubBridge
      • Cross-chain Transfer
      • Supported Assets
      • Asset Integration Guide
      • Technical Details
    • πŸ‘·Community Builders
    • 🀹Hackathon Guides
      • ETHGlobal Singapore
      • ETHGlobal San Francisco
      • ETHGlobal Bangkok
    • 🀯Advanced Topics
      • Cross Chain Solutions
      • System Contract and Drivers
      • Run Local Testnet
      • SideVM
    • πŸ†˜Support
      • Available Phala Chains
      • Resource Limits
      • Transaction Costs
      • Compatibility Matrix
      • Block Explorers
      • Faucet
    • ⁉️FAQ
  • Compute Providers
    • πŸ™ƒBasic Info
      • Introduction
      • Gemini Tokenomics (Worker Rewards)
      • Budget balancer
      • Staking Mechanism
      • Requirements in Phala
      • Confidence Level & SGX Function
      • Rent Hardware
      • Error Summary
    • 🦿Run Workers on Phala
      • Solo Worker Deployment
      • PRBv3 Deployment
      • Using PRBv3 UI
      • PRB Worker Deployment
      • Switch Workers from Solo to PRB Mode
      • Headers-cache deployment
      • Archive node deployment
    • πŸ›‘οΈGatekeeper
      • Collator
      • Gatekeeper
  • Web Directory
    • Discord
    • GitHub
    • Twitter
    • YouTube
    • Forum
    • Medium
    • Telegram
  • Legacy
    • Information
    • βš’οΈPhala SDK
    • πŸ‘¨β€πŸš€Builders Program
    • πŸ₯·AI Agent Contract
      • WapoJS Functions
      • Phala Agent Gateway
  • AI Agent Contract (Legacy)
    • πŸ‘©β€πŸ’»Getting Started
      • Build Your First AI Agent Contract
      • Build An Agent to Transact Onchain
      • Build Your AI Agent Contract with OpenAI
      • Build Your AI Agent Contract with LangChain
      • Integrate with 3rd Party API with HTTP Request
      • Run a Local Testnet With Docker
      • AI Agent Contract Templates
    • πŸ§™β€β™‚οΈExamples
      • Create a Weather Agent w/ Function Calling
    • ⛓️Supported Chains
    • FAQ
  • Agent Wars (Legacy)
    • πŸ“œIntroduction
    • πŸ’ΈTokenomics
    • ▢️Getting Started
      • Wallet Setup & Get PHA
      • Buy and Sell Keys
    • πŸ§‘β€πŸ«Tutorial
Powered by GitBook
LogoLogo

Participate

  • Compute Providers
  • Node
  • Community
  • About Us

Resources

  • Technical Whitepaper
  • Token Economics
  • Docs
  • GitHub

More

  • Testnet
  • Explorer
  • Careers
  • Responsible Disclosure

COPYRIGHT Β© 2024 PHALA.LTD ALL RIGHTS RESERVED. May Phala be with you!

On this page
  • Deploy PRBv3
  • Update PRBv2 docker image
  • Run the migration script
  • Limitations of Migration

Was this helpful?

Edit on GitHub
  1. Compute Providers
  2. Run Workers on Khala - Archived

Migration from PRBv2 to v3 - Archived

Last updated 1 year ago

Was this helpful?

This guide will show you how to migrate a PRBv2 deployment to PRBv3 using Docker Compose.

Deploy PRBv3

First, you should create a clean PRBv3 deployment by referring to this page:

Make sure it's running and the wm should be running and listening on port 3001 by default.

Update PRBv2 docker image

Check your .yml file of PRBv2 and set the docker image of lifecycle component to phalanetwork/prb:git-current-v2 to receive the bundled migration script.

In the lifecycle , the component’s docker-compose configuration file should be like:

lifecycle:
    network_mode: host
    image: phalanetwork/prb:git-current-v2
		# leave other things as is

Then run sudo docker compose pull.

Your will see the lifecycle should pull a new image and restart.

Run the migration script

In the docker-compose folder of PRBv2's lifecycle component, run:

docker compose down
# Change PRB3_API_ENDPOINT to your actual endpoint of prb3-wm
docker compose run -e "PRB3_API_ENDPOINT=http://127.0.0.1:3001" --entrypoint "yarn migrate_to_prb3" lifecycle

To stop the PRBv2 and to run the migration script.

There you should use the same endpoint of what you wrote in wm.yml to replace the `http://127.0.0.1:3001`.

Now the migration is done, just waiting for the worker's beginning to start.

Limitations of Migration

Duplicated worker name

Before Migration, you must ensure that there can be no duplicate items in the names of the pools and workers. Includes but is not limited to worker names being equal to pool names.

PID #0 error

PRBv2 supports PID #0, but PRBv3 does not support it.

This makes the migration fail if you want to migrate PID #0 from PRBv2 to PRBv3.

Database conflicts

If your PRBv3 is running and migration from PRBv2 is also necessary. Before your migration, check it to avoid the 2 limitations above.

If your PRBv3 is brand new but may have some test data or you failed to migrate before, the previous test data or half-imported dirty data will result in poor synchronization results. Therefore, you need to:

  • First, stop PRBv3 by sudo docker compose down

  • Delete the inv and po folders.

  • Start the normal synchronization process from the start of this article.

πŸƒβ€β™€οΈ
PRBv3 Deployment Guide