-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit e8e1822 Author: Ettore Di Giacinto <[email protected]> Date: Fri Aug 23 17:54:21 2024 +0200 ci: Rename static.yml to static.yml Signed-off-by: Ettore Di Giacinto <[email protected]> commit efb84f9 Author: Ettore Di Giacinto <[email protected]> Date: Fri Aug 23 17:53:15 2024 +0200 feat(tests): add baseline for an integration test (#527) * feat(tests): add baseline for an integration test Signed-off-by: mudler <[email protected]> * chore: drop obsoleted code Signed-off-by: mudler <[email protected]> * fix: HasBootnodes otherwise panics if no bootnodes are specified Signed-off-by: mudler <[email protected]> * chore(integration tests): make it possible to run the tests without generating identity keys - Introduce GetP2PMultiAddrs() to retrieve the node id multiaddress which is having p2p encapsulation, in order to be used as bootnode - Wire up some changes into the constructor of the oracle to allow to specify bootnodes and enable random identity generation Signed-off-by: mudler <[email protected]> * chore: drop unneeded code Signed-off-by: mudler <[email protected]> --------- Signed-off-by: mudler <[email protected]> commit 6dae3fe Author: Brendan Playford <[email protected]> Date: Mon Aug 19 14:01:08 2024 -0700 hotfix: .env formatting and description plus runpod and Docker image commit 5e5853e Author: Ettore Di Giacinto <[email protected]> Date: Mon Aug 19 11:03:16 2024 +0200 fix(ci): point correctly to main in `goreleaser.yml` (#516) * fix(ci): point correctly to main Otherwise goreleaser will fail building. Fixes: #514 Signed-off-by: mudler <[email protected]> * detect goreleaser Signed-off-by: mudler <[email protected]> --------- Signed-off-by: mudler <[email protected]>
- Loading branch information
1 parent
86f3546
commit 5b794e7
Showing
21 changed files
with
376 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,49 @@ | ||
## note: all nodes need to be staked to participate | ||
|
||
## BOOTNODE configuration | ||
ENV=test | ||
FILE_PATH=. | ||
PORT=8080 | ||
RPC_URL=https://ethereum-sepolia.publicnode.com | ||
|
||
## ORACLE without SCRAPER configuration | ||
## Note: All nodes need to be staked to participate | ||
## To stake your node: | ||
## 1. Ensure you have Sepolia ETH from a public faucet | ||
## 2. Ensure you have Sepolia MASA tokens run make faucet to get 1000 Sepolia MASA | ||
## 3. Start your node and copy the Public Key from the startup logs | ||
## 4. Use the following commands: make stake or ./masa-node --stake <amount> (e.g., ./masa-node --stake 1000 for 1000 MASA) | ||
## 5. Wait for the transaction to be confirmed on the blockchain | ||
## 6. Restart your node after staking | ||
## Minimum stake required: 1000 Sepolia MASA | ||
|
||
## Minimum .env configuration for running a staked node and getting data from the network | ||
## With this configuration, you can retrieve data but cannot provide data as a worker | ||
BOOTNODES=/ip4/35.223.224.220/udp/4001/quic-v1/p2p/16Uiu2HAmPxXXjR1XJEwckh6q1UStheMmGaGe8fyXdeRs3SejadSa | ||
ENV=test | ||
FILE_PATH=. | ||
PORT=8080 | ||
RPC_URL=https://ethereum-sepolia.publicnode.com | ||
|
||
## VALIDATOR configuration | ||
BOOTNODES=/ip4/35.223.224.220/udp/4001/quic-v1/p2p/16Uiu2HAmPxXXjR1XJEwckh6q1UStheMmGaGe8fyXdeRs3SejadSa | ||
ENV=test | ||
FILE_PATH=. | ||
PORT=8080 | ||
RPC_URL=https://ethereum-sepolia.publicnode.com | ||
VALIDATOR=true | ||
|
||
## ORACLE with SCRAPER configuration | ||
BOOTNODES=/ip4/35.223.224.220/udp/4001/quic-v1/p2p/16Uiu2HAmPxXXjR1XJEwckh6q1UStheMmGaGe8fyXdeRs3SejadSa | ||
ENV=test | ||
FILE_PATH=. | ||
PORT=8080 | ||
RPC_URL=https://ethereum-sepolia.publicnode.com | ||
TWITTER_USERNAME= your twitter username | ||
TWITTER_PASSWORD= your twitter password | ||
TWITTER_2FA_CODE= your twitter 2fa code | ||
DISCORD_SCRAPER=true | ||
DISCORD_BOT_TOKEN= your discord bot token | ||
TWITTER_SCRAPER=true | ||
WEB_SCRAPER=true | ||
TELEGRAM_SCRAPER=false | ||
|
||
# Go to my.telegram.org/auth and after logging in click the developer option to get these | ||
TELEGRAM_APP_ID= | ||
TELEGRAM_APP_HASH= | ||
# Worker Configuration | ||
# Note: To become a worker and provide data to the network, you must configure the following settings | ||
|
||
## Optional added features for ORACLE or VALIDATOR nodes only | ||
|
||
# Claude API and Elevenlabs API | ||
CLAUDE_API_KEY= | ||
CLAUDE_API_URL= | ||
CLAUDE_API_VERSION= | ||
ELAB_KEY= | ||
|
||
# For use with ollama https://hub.docker.com/r/ollama/ollama | ||
LLM_SERVER=true | ||
LLM_CHAT_URL=http://localhost:11434/api/chat | ||
# Twitter Configuration | ||
# Note: A pro-paid Twitter account is required to run a Twitter worker | ||
TWITTER_SCRAPER=true | ||
TWITTER_USERNAME=your pro-paid twitter username (without the '@' symbol) | ||
TWITTER_PASSWORD=your twitter password | ||
# Important: If your 2FA code times out, you'll need to restart your node and login by submitting a request. | ||
# We recommend temporarily disabling 2FA to save your cookies locally to your .home or .masa directory, then re-enabling it afterwards. | ||
# This will help avoid frequent login requests and potential timeouts. | ||
TWITTER_2FA_CODE=your twitter 2fa code (if applicable) | ||
|
||
# Discord Configuration | ||
# Note: You must have a bot in a Discord guild to scrape Discord channel messages | ||
DISCORD_SCRAPER=true | ||
DISCORD_BOT_TOKEN=your discord bot token | ||
|
||
# Bring your own Cloudflare worker token | ||
LLM_CF_URL= | ||
LLM_CF_TOKEN= | ||
# Web Scraper Configuration | ||
WEB_SCRAPER=true | ||
|
||
# Bring your own OpenAI api key | ||
OPENAI_API_KEY= | ||
PROMPT="You are a helpful assistant." | ||
# Telegram Configuration | ||
# Note: You must configure a bot as a developer and add it to a channel to scrape Telegram channel messages | ||
TELEGRAM_SCRAPER=false | ||
# To obtain these credentials, go to my.telegram.org/auth, log in, and select the API development tools | ||
TELEGRAM_APP_ID=your telegram app id | ||
TELEGRAM_APP_HASH=your telegram app hash | ||
# Configure your Telegram bot and add it to the channel you want to scrape | ||
TELEGRAM_BOT_TOKEN=your telegram bot token | ||
TELEGRAM_CHANNEL_USERNAME=username of the channel to scrape (without the '@' symbol) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Quickstart: Deploying Masa Oracle Node on RunPod | ||
|
||
## Prerequisites | ||
|
||
1. A RunPod account (sign up at https://www.runpod.io/) | ||
2. Basic knowledge of Docker and command-line interfaces | ||
|
||
## Step 1: Use the Official Masa Finance Docker Image | ||
|
||
Instead of building your own Docker image, we'll use the official Masa Finance image from Docker Hub. | ||
|
||
## Step 2: Create a RunPod Template | ||
|
||
1. Log in to your RunPod account. | ||
2. Go to "Templates" in the left sidebar. | ||
3. Click "New Template". | ||
4. Fill in the template details: | ||
- Name: Masa Protocol Node | ||
- Image: masafinance/masa-node:latest | ||
- Container Disk: 10 GB (or as needed) | ||
- Volume Disk: 20 GB (or as needed) | ||
- Ports: 4001/tcp, 4001/udp, 8080/tcp | ||
|
||
5. In the "Docker Command" field, enter: | ||
```bash | ||
/usr/bin/masa-node --bootnodes="$BOOTNODES" --env="$ENV" --validator="$VALIDATOR" --cachePath="$CACHE_PATH" | ||
``` | ||
|
||
6. Add environment variables: | ||
- BOOTNODES | ||
- ENV | ||
- RPC_URL | ||
- FILE_PATH | ||
- VALIDATOR | ||
- CACHE_PATH | ||
- TWITTER_PASSwORD | ||
- TWITTER_USERNAME | ||
- TWITTER_2FA_CODE | ||
- TWITTER_SCRAPER | ||
|
||
7. Save the template. | ||
|
||
## Step 3: Deploy Your Node on RunPod | ||
|
||
1. Go to "Pods" in the left sidebar. | ||
2. Click "Deploy". | ||
3. Select your "Masa Oracle Node" template. | ||
4. Choose a GPU type (CPU-only might be sufficient for basic node operation). | ||
5. Set the values for your environment variables. | ||
6. Deploy the pod. | ||
|
||
## Step 4: Access Your Node | ||
|
||
1. Once deployed, go to the "Pods" page. | ||
2. Find your Masa Oracle Node pod and click on it. | ||
3. You can access the node's logs and terminal from this page. | ||
|
||
## Step 5: Verify Node Operation | ||
|
||
1. Use the provided terminal to check if your node is running correctly: | ||
```bash | ||
docker logs masa-node | ||
``` | ||
|
||
2. Look for the startup message indicating successful connection to the network. | ||
|
||
## Step 6: Stake Your Node (if not already staked) | ||
|
||
If your node isn't staked, you can stake it using the RunPod terminal: | ||
|
||
```bash | ||
docker exec masa-node /usr/bin/masa-node --stake 1000 | ||
``` | ||
|
||
Replace 1000 with the amount of MASA tokens you want to stake. | ||
|
||
## Conclusion | ||
|
||
You've now successfully deployed your Masa Oracle Node on RunPod using the official Masa Finance Docker image. Monitor your node's performance and logs regularly to ensure it's operating correctly. Remember to keep your environment variables and node software up to date. | ||
|
||
For more detailed information on node operation and troubleshooting, refer to the main Masa Oracle documentation. | ||
|
||
[Source: https://hub.docker.com/repositories/masafinance] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.