The Masa Oracle provides infrastructure for accessing, sharing, and rewarding providers of behavioral, personal, and identity data in a decentralized and private way. The Masa Oracle guarantees transparency, security, and equitable compensation for nodes participating in the Masa zk-Data Network & Marketplace.
To run the masa-node
on Fly.io's free plan, your server should meet the following specifications:
- Operating System: Linux-based OS (Ubuntu 20.04 recommended)
- Processor: 4 x Shared CPU
- Memory: 1GB RAM
- Storage: 20GB SSD
- Network: Shared network resources
apt update
apt upgrade
cd $HOME
! [ -x "$(command -v go)" ] && {
VER="1.20.3"
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
}
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
-
Clone the repository:
git clone https://github.com/masa-finance/masa-oracle-go-testnet.git cd masa-oracle-go-testnet
-
Build the node executable:
go build -v -o masa-node ./cmd/masa-node
To participate in the network and earn rewards, you must first stake your tokens:
-
Start your node to get Private Key
./masa-node --start
-
Get your private key from the node
cat /root/.masa/masa_oracle_key.ecdsa
-
Import the private key into Metamask to access your Ethereum address.
-
Send Sepolia ETH and Masa testnet tokens to your address. Then stake!:
./masa-node --stake 100
Start your node and join the Masa network with default configurations:
./masa-node --start
Customize your node's behavior with various flags:
./masa-node --bootnodes=node1,node2,node3 --port=8080 --udp=true --tcp=false --start=true
To use a custom configuration file:
./masa-node --config=path/to/config.json
Connecting Nodes π Connect to a specific node in the network:
./masa-node --bootnodes=/ip4/34.133.16.77/udp/4001/quic-v1/p2p/16Uiu2HAmAEDCYv5RrbLhZRmHXGWXNuSFa7YDoC5BGeN3NtDmiZEb --port=4001 --udp=true --tcp=false --start=true
Deploy a node using Fly.io by setting up your environment and configuring your deployment settings:
-
Istall Fly.io
curl -L https://fly.io/install.sh | sh
-
Move Fly.io Foldet
mv /root/.fly /root/masa-oracle-go-testnet/
Register you account on https://fly.io/dashboard
-
link your node to the FLY platform
.fly/bin/flyctl auth login
copy the link from terminal and paste it on your browser to connect
-
Run your application with Fly.io from the
masa-oracle-go-testnet
project directory..fly/bin/flyctl launch
-
Change your node name on the web.
-
Visit your Fly.io profile ,go to your application in the dashboard and in the secrets section specify your node name and private key
-
You can also monitor the status of your node from the monitoring directory
- Check the status of your deployment`:
.fly/bin/flyctl status -a testmasa