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.
Follow these steps:
Visit https://devnet-mint.powerloom.dev to begin the minting process. You will be prompted to connect your wallet that contains Sepolia ETH.
Click mint to being the minting process after connecting your wallet.
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.
- Navigate to the Devnet Dashboard to see a list of your minted slots.
- 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.
- For Metamask: The transaction will be under the
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.
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
) anddocker-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.
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.
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.
- macOS/Linux
- Windows
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
cp env.example .env
Copies the contents of the file namedenv.example
to a new file named.env
.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 theSLOT_ID
on thePROTOCOL_STATE_CONTRACT
that is set in this.env
.SIGNER_ACCOUNT_PRIVATE_KEY
: The private key corresponding to the burner wallet addressSLOT_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.
The following protocol state contract addresses are currently operational with active epoch releases
- Data source contracts on ETH Mainnet -- Epoch Size 1 --
0x573906E80C30dA608E3a24A0938BCB3f0C68Ed2f
If you have any custom requirements to track data sources on other chains, reach out to the team.
Pre-supplied:
Unless it is a customized need or instructed by us, the below need not be changed or modified.
SNAPSHOT_CONFIG_REPO
: https://github.com/powerloom/snapshotter-configsSNAPSHOT_CONFIG_REPO_BRANCH
: devnetSNAPSHOTTER_COMPUTE_REPO
: https://github.com/powerloom/snapshotter-computesSNAPSHOTTER_COMPUTE_REPO_BRANCH
: devnetPROST_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
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:
- Please note that this is asking for the private key to your wallet.
- Enter the private key of the wallet used to mint the devnet slot.
Deploying a Snapshotter Node on Windows
Initial Setup | Docker
- Open PowerShell:
- Start by opening PowerShell on your Windows machine. Search for
"PowerShell"
in the start menu and launch it.
- Start by opening PowerShell on your Windows machine. Search for
- Install Windows Subsystem for Linux (WSL):
- In the PowerShell window, enter the following command:
wsl --install
- This command installs the Windows Subsystem for Linux, necessary for running Docker.
- In the PowerShell window, enter the following command:
- Download and Install Docker:
- Download Docker from the official website.
- Follow the installation instructions provided on the website.
- Restart Your Computer:
- After installing Docker, restart your computer to apply all changes.
- Open Docker:
- Post-restart, open Docker. This should automatically launch a Powershell console which will have WSL installed.
- Set Up Linux User Account:
- In the newly opened powershell console, set up a new user account by entering a username and password.
Granting Docker Permissions
- Modify Docker Group Permissions:
- To grant Docker the necessary permissions, add your user to the Docker group with this command:
sudo usermod -aG docker $USER
- Logout and login again or restart the Docker service for the changes to take effect.
- To grant Docker the necessary permissions, add your user to the Docker group with this command:
- Verify Docker Installation:
- To confirm Docker is set up correctly, run:
docker run hello-world
- This command should display a message confirming Docker is functioning.
- To confirm Docker is set up correctly, run:
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
In the deploy repo's directory, create a new file named
.env
.Copy the contents of
env.example
to.env
.Fill in the required variables in the
.env
file:- use
dir
to check all existing files under the created directory “powerloom_deploy” - use
start env.example
to open env.example file - to create a new .env file use syntax
echo. > .env
- to copy contents from
env.example
to.env
use codetype env.example > .env
- to open & check contents of
.env
use codetype .env
- use
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 theSLOT_ID
on thePROTOCOL_STATE_CONTRACT
that is set in this.env
.SIGNER_ACCOUNT_PRIVATE_KEY
: The private key corresponding to the burner wallet addressSLOT_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.
Currently, there are two variations of Protocol State Contracts available. One where Epoch size is set to 1 and 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:
Unless it is a customized need or instructed by us, the below need not be changed or modified.
SNAPSHOT_CONFIG_REPO
: https://github.com/powerloom/snapshotter-configsSNAPSHOT_CONFIG_REPO_BRANCH
: devnetSNAPSHOTTER_COMPUTE_REPO
: https://github.com/powerloom/snapshotter-computesSNAPSHOTTER_COMPUTE_REPO_BRANCH
: devnetPROST_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
This is a one-time step that 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 Burner Wallet
Do you want to assign a burner wallet to a slot? (yes/no):
Enter yes and then enter your burner wallet address when prompted.
- This is the
SIGNER_ACCOUNT_ADDRESS
that was set during Step 3.
Next, you will be prompted to enter a private key:
To assign a burner wallet to a slot, you need to sign a message with the private key of the Account holding the slot.
Private Key:
- Please note that this is not asking for the private key to your burner wallet.
- Enter the private key of the wallet used to mint the devnet slot.
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
To shut down services, press
Ctrl+C
for macOS/Linux &Ctrl + Break
for Windows (and again to force).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