masa-oracle-go-testnet

所属分类:其他
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2023-12-15 22:20:07
上 传 者sh-1993
说明:  Masa Oracle:去中心化数据协议
(Masa Oracle: Decentralized Data Protocol)

文件列表:
cmd/
contracts/
pkg/
.dockerignore
Dockerfile
LICENSE
config.json
fly.toml
go.mod
go.sum

# 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](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#getting-started) - [Prerequisites](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#prerequisites) - [Installation](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#installation) - [Staking Tokens](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#staking-tokens) - [Running the Node](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#running-the-node) - [Command-Line Interface (CLI)](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#command-line-interface-cli) - [Configuration](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#configuration) - [Connecting Nodes](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#connecting-nodes) - [Deploying a Node using Fly.io](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#deploying-a-node-using-flyio) - [Requirements for Running Masa-Node on Fly.io](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#requirements-for-running-masa-node-on-flyio) ## Getting Started ### Prerequisites Before diving in, ensure these prerequisites are installed: - **Go**: Grab it from [Go's official site](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/https://golang.org/dl/) . - **Docker**: Install from [Docker's official docs](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/https://docs.docker.com/get-docker/) . ### Installation 1. Clone the repository: ```bash git clone https://github.com/masa-finance/masa-oracle-go-testnet.git cd masa-oracle-go-testnet ``` 2. Build the node executable: ```bash 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: ```bash 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!: ```bash ./masa-node --stake 100 ``` ## Running the Node Start your node and join the Masa network with default configurations: ```bash ./masa-node --start ``` ## Command-Line Interface (CLI) Customize your node's behavior with various flags: ```bash ./masa-node --bootnodes=node1,node2,node3 --port=8080 --udp=true --tcp=false --start=true ``` ## Configuration To use a custom configuration file: ```bash ./masa-node --config=path/to/config.json ``` ## Connecting Nodes Connect to a specific node in the network: ```bash ./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](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/https://fly.io/docs/getting-started/installing-flyctl/). - 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. ```bash fly launch ``` 2. Set the `PRIVATE_KEY` environment variable in your Fly.io application using the private key from your local node setup. ```bash fly secrets set -a YOUR_APP_NAME PRIVATE_KEY="PRIVATE_KEY" ``` ### Deployment Deploy your application using `fly deploy`: ```bash fly deploy ``` ### Checking Deployment Status Check the status of your deployment with `fly status`: ```bash 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](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/#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](https://github.com/masa-finance/masa-oracle-go-testnet/blob/master/https://fly.io/docs/) 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

近期下载者

相关文件


收藏者