Setup Constellation DAG Dev Env for Metagraph Hackathon

·

2 min read

Macbook M1 16GB

Guideline to setup Constellation DAG development environment for Metagraph Hackathon which initials on 29th July 2024 for Goriant team

Preparation steps

  1. Setup Docker Desktop version >= 26.0.0

  2. Setup jq & yq

    1.   brew install jq
        brew install yq
      
  3. Allocate 8GB Ram for your Docker Desktop

    1. Preferences -> Resources -> Memory : 8GB
  4. Node v16.20.2 - can setup with nvm

    1.   brew install nvm
        nvm install v16.20.2
        nvm use v16.20.2
      
  5. Config git for fetching registry indexes and git dependencies => ~/.bashrc or ~/.zshrc

    1.    export CARGO_NET_GIT_FETCH_WITH_CLI=true
      
  6. Increase Git Buffer Size

    1.    git config --global http.postBuffer 524288000
      
  7. Install rustc version >= 1.63.0

    1.    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
      
  8. Setup Scalar and CS

    1. JDK 17 download and setup - https://download.oracle.com/java/17/archive/jdk-17.0.11_macos-x64_bin.dmg

    2. Install cs - follow this instruction https://get-coursier.io/docs/cli-installation

      1. 
          curl -fL https://github.com/VirtusLab/coursier-m1/releases/latest/download/cs-aarch64-apple-darwin.gz | gzip -d > cs
        
          chmod +x cs
        
          ./cs setup
        
  9. Create Github Access Token - follow this instruction https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens or you can go direct to the link below

    1. Go to https://github.com/settings/tokens?type=beta

    2. Generate new token

    3. Public Repositories (read-only)

Setup Constellation Dev Env

Follow this instruction https://docs.constellationnetwork.io/sdk/guides/quick-start/

  1.   cargo install argc
    
  2.   cs install giter8
    
  3. Working directory

    1.   mkdir -p ~/Development/hackathon/metagraph
        cd ~/Development/hackathon/metagraph
      
  4. Clone the Euclid Development Environment project

    1.   git clone https://github.com/Constellation-Labs/euclid-development-environment
        cd euclid-development-environment
      
  5. Edit the github_token variable within the euclid.json file with your Github Access Token generated previously. Update the project_name field to Goriant.

  6. Remove .git for Detaching your project from the source repo then

  7.  scripts/hydra install
     scripts/hydra install-template --list
     ################################## INSTALL TEMPLATE ##################################
     Fetching templates...
    
     Available templates
    
     custom-transaction-validation
     nft
     reward-api
     social
     voting-poll
     water-and-energy-usage
    
  8. We will choose one of them then run install-template command

Build

Build your network clusters with hydra

scripts/hydra build