SAFCDA / masa-oracle-go-testnet

Masa Oracle: Decentralized Data Protocol 🌐

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Masa Oracle: Decentralized Data Protocol πŸŒπŸš€: Testnet Release

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.

Contents

Getting Started 🌟

Prerequisites

Before diving in, ensure these prerequisites are installed:

Installation

  1. Clone the repository:

    git clone https://github.com/masa-finance/masa-oracle-go-testnet.git
    cd masa-oracle-go-testnet
    1. Build the node executable:
    go build -v -o masa-node ./cmd/masa-node

Staking Tokens πŸ”

To participate in the network and earn rewards, you must first stake your tokens:

  1. Obtain Sepolia ETH and Masa tokens for your node's Ethereum address. The address's private key is created when you run the node for the first time using ./masa-node --start and is saved locally:

    cat /Users/{USER}/.masa/masa_oracle_key.ecdsa
  2. Import the private key into Metamask to access your Ethereum address.

  3. Send Sepolia ETH and Masa testnet tokens to your address. Then you can stake!:

    ./masa-node --stake 100

Running the Node πŸš€

Start your node and join the Masa network with default configurations:

./masa-node --start

Command-Line Interface (CLI) πŸ’»

Customize your node's behavior with various flags:

./masa-node --bootnodes=node1,node2,node3 --port=8080 --udp=true --tcp=false --start=true

Configuration πŸ”§

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

Deploying a Node using Fly.io πŸ›«

Deploy a node using Fly.io by setting up your environment and configuring your deployment settings:

Prerequisites

  • Generate a key and stake tokens by running the node locally with ./masa-node --start and ./masa-node --stake 100 πŸ‘†.
  • Install flyctl, the Fly.io command-line tool, from the official Fly.io documentation.
  • Sign up for and log into your Fly.io account.

Setup

  1. Initialize your application with Fly.io using fly launch from the masa-oracle-go-testnet project directory.

    fly launch
  2. Set the PRIVATE_KEY environment variable in your Fly.io application using the private key from your local node setup.

    fly secrets set -a YOUR_APP_NAME PRIVATE_KEY="PRIVATE_KEY"

Deployment

Deploy your application using fly deploy:

fly deploy

Checking Deployment Status

Check the status of your deployment with fly status:

fly status -a YOUR_APP_NAME

Requirements for Running Masa-Node on Fly.io πŸ“‹

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

Please note that these are the specifications provided by Fly.io's free plan. For better performance, especially for production environments, a more powerful server may be necessary.

Before running the masa-node, make sure to install the necessary dependencies as outlined in the Installation section.

Also, ensure that the necessary ports are open in your server's firewall settings to allow for incoming and outgoing connections.

Please refer to the Fly.io documentation for more details on their server specifications and how to configure your application.


After setting up, your node's address will be displayed, indicating it's ready to connect with other Masa nodes. Follow any additional configuration steps and best practices as per your use case or network

About

Masa Oracle: Decentralized Data Protocol 🌐

License:MIT License


Languages

Language:Go 88.8%Language:Solidity 8.3%Language:Dockerfile 1.6%Language:JavaScript 1.3%