Skip to main content

Getting Started

This section will guide you through the necessary steps to set up and get started with the Devnet environment. By following these instructions, you'll be able to quickly configure your Devnet and start building data applications on Powerloom.

Watch this tutorial below to get a detailed walk-through of Powerloom Devnet node setup.

Minting the Devnet Slot

To get started with Devnet, you'll need to mint a no-cost NFT slot on the Sepolia network.

📢Ethereum Sepolia Faucet
To mint the NFT slot, ETH on the Sepolia network is required. If your balance is insufficient, you can obtain Sepolia ETH through the following link: https://faucet.quicknode.com/drip

Follow these steps:

  1. Visit https://devnet-mint.powerloom.dev to begin the minting process. You will be prompted to connect your wallet that contains Sepolia ETH.

  2. Click mint to being the minting process after connecting your wallet.

Mint Dashboard

  1. Once the NFT slot is minted, use one of the following options to locate your minted Slot ID for later use in the node setup.

    Devnet Dashboard

    • Search for the transaction hash of your NFT mint on the Sepolia block explorer.
      • For Metamask: The transaction will be under the Activity section.
      • For other wallets: Search for your wallet address in the Sepolia block explorer; the mint will be the latest transaction.
      • Locate the minted Token ID under the ERC-1155 Tokens Transferred section.

    Block Explorer

After completing these steps, you'll be ready to start using Devnet. The next step is to configure and run our snapshotter node.

Setting up the Snapshotter Node

A snapshotter peer, as part of the Powerloom Protocol, does exactly what the name suggests: It synchronizes with other snapshotter peers over a smart contract running on the Powerloom Prost chain.

Whether you are developing your own application or extending our existing use cases, setting up your Snapshotter node is a crucial step.

tip

Here are some important topics you may want to check out:

System Requirements

  • RAM: At least 4 GB.
  • CPU Core: Minimum of 2 Cores
  • Disk Space: A minimum of 40 GB.
  • Python: Ensure Python 3.11 is installed.
  • Docker: Latest version of docker (>= 20.10.21) and docker-compose (>= v2.13.0). If your system doesn't have docker installed, please follow the guide here.
  • RPC URL URL for Ethereum mainnet or the chain you're working on.
tip

Your RPC usage depends on your specific use case. If your application requires a high volume of RPC calls, we recommend running your own RPC node to avoid potentially expensive third-party service costs.

If you want to monitor your RPC usage, we recommend signing up with a provider like Alchemy, Infura or Quicknode.

info

Setting up the snapshotter node on Windows requires a few additional steps. We suggest using Docker because of its ease of setup and speed. To begin with Docker, you must have the Windows Subsystem for Linux (WSL) installed. Please follow the guide provided below for detailed instructions.

Deploying a Snapshotter Node on macOS/Linux

Running the Snapshotter Node

Follow the process outlined below to ensure a smooth setup

Step 1: Clone the Snapshotter Deploy Repository

Clone the repository against the respective branch (main by default). Open the terminal and run the below command to clone the deploy repo in a directory named powerloom_deploy.

git clone https://github.com/PowerLoom/deploy.git --single-branch powerloom_deploy --branch devnet && cd powerloom_deploy

The above command itself navigates you to the Repository Directory powerloom_deploy

Step 2: Configure the environment variables

  1. cp env.example .env Copies the contents of the file named env.example to a new file named .env.

  2. Fill in the required variables in the .env file:

During the creation of the .env file, add the following details:

  • SOURCE_RPC_URL: The URL for Source RPC (Local node/Infura/Alchemy) service.
  • SIGNER_ACCOUNT_ADDRESS: The address of the signer account. This should be an unused "burner" address that does not need to have any token balance. You can create a new burner wallet from our tool. During later steps, this address will be registered against the SLOT_ID on the PROTOCOL_STATE_CONTRACT that is set in this .env.
  • SIGNER_ACCOUNT_PRIVATE_KEY: The private key corresponding to the burner wallet address
  • SLOT_ID: Enter your Devnet Slot ID. [You can find the slotID by visiting the Devnet Dashboard, or on the Sepolia block explorer by searching for the transaction hash of your node mint]
  • PROTOCOL_STATE_CONTRACT: Choose the contract address for the protocol state with respect to the Epoch size.
note

Currently, there are two variations of Protocol State Contracts available. One where Epoch size is set to 1 and the other where epoch size is set to 10 blocks.

You can find the latest Epoch Contracts in the example.env file.

This should allow developers to build and experiment with a variety of use cases. If you have any custom needs, reach out to the team

Pre-supplied:

info

Unless it is a customized need or instructed by us, the below need not be changed or modified.

  • SNAPSHOT_CONFIG_REPOhttps://github.com/powerloom/snapshotter-configs
  • SNAPSHOT_CONFIG_REPO_BRANCH: devnet
  • SNAPSHOTTER_COMPUTE_REPOhttps://github.com/powerloom/snapshotter-computes
  • SNAPSHOTTER_COMPUTE_REPO_BRANCH: devnet
  • PROST_RPC_URL: The Powerloom Protocol Chain RPC service URL.
  • RELAYER_HOST: The relayer URL for the Powerloom Protocol Chain.
  • NAMESPACE: The unique key to identify your project namespace.
  • POWERLOOM_REPORTING_URL: The URL for reporting to PowerLoom.
  • PROST_CHAIN_ID: The Devnet chain ID

Optional variables:

  • IPFS_URL: The URL for the IPFS (InterPlanetary File System) service in HTTP(s) (e.g., https://ipfs.infura.io:5001) or multiaddr format (e.g., /dns4/ipfs.infura.io/tcp/5001/https).
  • IPFS_API_KEY: The API key for the IPFS service (if required).
  • IPFS_API_SECRET: The API secret for the IPFS service (if required).
  • SLACK_REPORTING_URL: The URL for reporting to Slack.

Step 3: Set Up the Codebase

Set up the codebase by running the bootstrap.sh command in the terminal. Developers may use different shells, such as bash or zsh. Adjust the command accordingly:

For bash:

bash bootstrap.sh

or

zsh bootstrap.sh
info

This one-time step resets the powerloom_deploy codebase to the latest version of the devnet branch. After completing this one-time setup, you'll be ready to dive into the codebase and start building amazing data applications!

Step 4:

Install the required dependencies using pip:

pip3 install -r requirements.txt

Step 5: Run the Snapshotter Node

Run the command

bash build.sh

or

zsh build.sh

Step 6: Assign your Wallet

Do you want to assign a wallet to a slot? (yes/no):

Enter yes.

Next, you will be prompted to enter a private key:

To assign a wallet to a slot, you need to sign a message with the private key of the Account holding the slot.
Private Key:

Troubleshooting Errors

If the .env file is filled up correctly, all services will execute one by one.

If you see the following error:

   powerloom_depoy-pooler-1           | Snapshotter identity check failed on protocol smart contract
powerloom_depoy-pooler-1 exited with code 1

Make sure your snapshotter address is registered. Ensure you have minted the Devnet Slot from the devnet dashboard and your burner wallet has been added correctly during Step 6.

Refer to our troubleshooting section if you encounter any other issues with your node.

Stopping the Node

  1. To shut down services, press Ctrl+C for macOS/Linux & Ctrl + Break for Windows (and again to force).

  2. If you encounter issues with data, you can do a clean reset by running the following command before restarting from Step 5:

docker-compose --profile ipfs down --volumes

or

docker compose --profile ipfs down --volumes