Skip to content

Latest commit

 

History

History
160 lines (107 loc) · 4.19 KB

near-node.md

File metadata and controls

160 lines (107 loc) · 4.19 KB
slug title
/near-node
Running a NEAR RPC Node

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Running a NEAR RPC Node

Requirements 📄

Before you start, ensure that your machine meets the following minimum requirements:

CPU: 8-Core (16-Thread) Intel i7/Xeon or equivalent with AVX support
RAM: 20GB DDR4
Storage: 1TB SSD  - NVMe SSD recommended
OS: MacOS / Linux
CPU: 8-Core (16-Thread) Intel i7/Xeon or equivalent with AVX support
RAM: 12GB DDR4
Storage: 500GB SSD
OS: MacOS / Linux

:::tip

Installing NEAR will also require a current installation of Rust, Git, as well as many common dev tools (python, docker, awscli, & protobuf-compiler).

:::

Install 📥

Get nearcore

Clone the NEAR nearcore repo to your machine and switch to it.

git clone https://github.com/near/nearcore
cd nearcore
git fetch origin --tags

Get the latest release.

git checkout tags/<RELEASE TAG HERE> -b mynode

Compile the latest stable release

Ensure you're in the correct folder (/nearcore/) & run the following command:

make release

:::caution make release will cause the nearcore to compile. Compilation is a time-intensive process and can take ~30 minutes or longer on recommended hardware. :::

Configure the release folder

With one command you can create the required directory structure -- generating a config.json, node_key.json, and downloading a genesis.json for your respective chain-id choice.

./target/release/neard --home ~/.near init --chain-id mainnet --download-genesis --download-config
./target/release/neard --home ~/.near init --chain-id testnet --download-genesis --download-config

Start your Node! 🚀

Run the following command to initiate your node!

# Get a data backup 
aws s3 --no-sign-request cp s3://near-protocol-public/backups/mainnet/rpc/latest .
LATEST=$(cat latest)
aws s3 --no-sign-request cp --no-sign-request --recursive s3://near-protocol-public/backups/mainnet/rpc/$LATEST ~/.near/data

# Start the Node!
./target/release/neard --home ~/.near run

Configure your Provider 🔧

After you've gotten things together with your node. You can set things in motion with a provider. Use the following template(s) to set up your provider config file:

endpoints:
 - api-interface: jsonrpc
   chain-id: NEAR
   network-address:
    address: "127.0.0.1:port"
    disable-tls: true
   node-urls:
    - url: https://endpoint/mainnet/erpc

metrics-listen-address: ":port"
endpoints:
 - api-interface: jsonrpc
   chain-id: NEART
   network-address:
    address: "127.0.0.1:port"
    disable-tls: true
   node-urls:
    - url: https://endpoint/testnet/erpc

metrics-listen-address: ":port"

NEAR ipRPC 🪙

Want to reach more developers and get more rewards as a node runner? NEAR offers Incentivized Public RPC (ipRPC) endpoints to developers in its ecosystem. By signing up here, you can be first in line to being one of our premier providers contributing to decentralized public goods. Sign up now!

Setup your Provider on Lava Network 🌋

Once you’ve been accepted - to set up your provider on the Lava Network, you can refer to the provider setup documentation available elsewhere in our docs. This should provide you with the necessary information to configure and operate your provider node on the Lava Network.