How to Set Up Your Environment for Secret Network Development

Dec 25, 2023 | Blockchain

Welcome to your guide for setting up a development environment for the Secret Network! This innovative platform offers scalable, permissionless smart contracts, prioritizing privacy in an era where data ownership is crucial. Let’s dive into the stages of installation and development, making it as user-friendly as possible!

Prebuilt Environment Options

  • Gitpod: Click the button below to start a new development environment:

  • Open in Gitpod

  • VSCode Docker Environment:
    • Install VS Code remote extension.
    • Clone the repository into a new dev container.
  • Docker Dev Environments:
    • From Docker Desktop, create a new Dev Environment from the prebuilt image – ghcr.io/scrtlabs/secretnetwork-dev:latest.
    • Connect with VSCode, or use the container directly.
    • Stay updated with code by using git fetch and git pull.

Manual Setup

If you prefer manual installation, follow these steps:

  • Install prerequisite packages using:
  • apt-get install -y --no-install-recommends g++ libtool automake autoconf clang
  • For Ubuntu 22+, ensure you also install libssl1.1:
  • wget https://debian.mirror.ac.zadebian/pool/main/o/openssl/libssl1.1_1.1.1w-0%2Bdeb11u1_amd64.deb
    dpkg -i libssl1.1_1.1.1w-0%2Bdeb11u1_amd64.deb
  • Clone the repository into your preferred working directory.
  • Install Rust from rustup.rs:
  • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    rustup component add rust-src
    rustup target add wasm32-unknown-unknown
  • Install Go (v1.18+):
  • sudo apt install go-bindata
  • Install SGX SDK for compiling:
  • chmod +x .scripts/install-sgx.sh
    sudo .scripts/install-sgx.sh true true true false
  • Install Xargo:
  • cargo install xargo --version 0.3.25
  • Sync submodules:
  • git submodule init
    git submodule update --remote

Building from Source

Now, let’s build your environment:

  • Use make build-linux to compile the entire codebase, including Rust and Go code.
  • If you want to compile only the Rust code, use make build-linux.
  • To compile just the Go code, use make build_local_no_rust.
  • For production builds, ensure that the enclave is from the latest release.

Running Your Environment

Let’s test your setup:

  • Run all tests using make go-tests.
  • Start your local network with .scripts/start-node.sh.

Troubleshooting

While setting up, you may encounter a few typical issues:

  • Compilation Errors: Ensure all dependencies are installed and updated.
  • Network Issues: Check your internet connection when installing packages or cloning repositories.
  • Permission Issues: Make sure you run commands with appropriate permissions (e.g., using sudo as necessary).
  • If you need more help, reach out for assistance or insights.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Conclusion

Congratulations! You’ve set up your environment for developing on the Secret Network. With this foundation, you can start experimenting with privacy-focused smart contracts, creating your own decentralized applications, and diving into the innovative opportunities that this framework has to offer!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox