VinuChain
  • VinuChain | VC
  • 📃Whitepaper
    • Whitepaper
      • Disclaimer
      • Abstract
      • Introduction
      • Background
      • VinuChain Protocol
      • Consensus Mechanism
      • Quota System
      • Network Architecture
      • VinuChain Coin (VC)
      • Conclusion
      • References
    • Tokenomics
    • Launchpads
    • Roadmap
  • 🧑‍💻Technical Docs
    • VinuChain Mainnet
      • Connect to Mainnet
      • Install Read-Only Node
      • Install Validator Node
      • Install API Node
    • VinuChain Testnet
      • Connect to Testnet
      • Install Read-Only Node
      • Install Validator Node
      • Private Network (Fakenet)
    • Nodes & Validators
      • Read-Only Node
      • Become a Validator
      • Update Validator Info
      • API Node
      • Delegation Calls
      • Lockup Calls
      • Reward Calls
      • Validator Calls
      • Troubleshooting
      • FAQ
    • Staking
      • Overview
      • Stake VC on VinuChain
      • FAQ - Staking
    • Smart Contracts
      • Deploy a Smart Contract
    • API
      • Public API Endpoints
      • GraphQL
      • REST API
    • Web3 Methods
      • gasprice.js
      • transfer.js
      • web3.eth.abi.js
      • web3.eth.accounts.js
      • web3.eth.contract.js
      • web3.eth.iban.js
      • web3.eth.js
      • web3.eth.net.js
      • web3.eth.subscribe.js
      • web3.eth.utils.js
      • .gitignore
      • LICENSE
      • app.js
      • common.js
      • constants.js
      • package-lock.json
      • package.json
      • yarn.lock
    • Cross-chain Bridging
      • Native $VC vs Wrapped $VC
      • Wanbridge
      • Add bep20 VC to Trust Wallet
Powered by GitBook
On this page
  • API Nodes
  • Initial steps
  • Install Opera
  • Mainnet
  • Download genesis file
  • Run node
  • Testnet
  • Download genesis file
  • Run node
  1. Technical Docs
  2. Nodes & Validators

API Node

How to run an API Node

API Nodes

API nodes are special types of nodes that run on the VinuChain network and provide access to the full history of transactions, balances, and smart contract interactions. They are often exposed to the public via HTTP or WebSocket protocols, allowing developers and users to interact with the VinuChain network.

API nodes also support transaction tracing, which is a feature that enables tracking the execution of smart contracts and their internal calls.

API nodes are useful for building applications that require querying historical data or tracing smart contract logic on the VinuChain network.

Initial steps

Install Opera

# Install Opera
(validator)$ git clone https://github.com/VinuChain/VinuChain
(validator)$ cd VinuChain/
(validator)$ make

Mainnet

Download genesis file

#Download genesis file
(validator)$ curl https://vinu-blockchain-mainnet-genesis.s3.us-east-1.amazonaws.com/vitainu-genesis-mainnet-with-contracts.g 
--output vitainu-genesis-mainnet-with-contracts.g

Run node

You can turn on and off http and ws options, use your ports and addresses.

# Run node
(validator)$ cd build

(validator)$ nohup ./opera \
    --genesis ../vitainu-genesis-mainnet-with-contracts.g \
    --datadir ./datadir \
    --http \
    --http.addr=your_hostname \
    --http.port 4000  --http.corsdomain=* --http.vhosts=* \
    --http.api=eth,debug,net,admin,web3,personal,txpool,vc,dag \
    --ws \ 
    --ws.addr=your_hostname \
    --ws.port 4100 \
    --ws.api=eth,debug,net,admin,web3,personal,txpool,vc,dag \
    --ws.rpcprefix "/" \
    --bootnodes enode://105ecea3fafaa01a329b9ce988d69ad7d9af233b04ad2c3b637b2f42862623c38f358bd7a7cfead5ae61991681965629abe2749131168bdd9ce573f8085380ab@node-0.vinuchain-rpc.com:3000 \
    --verbosity=3 --tracing > ./opera_read_node.log &
  • Replace your_hostname variables.

Testnet

Download genesis file

# Download Testnet genesis file
(validator)$ curl https://vinu-blockchain-genesis.s3.amazonaws.com/vitainu-genesis-testnet-20240621.g 

Run node

You can turn on and off http and ws options, use your ports and addresses.

# Run node
(validator)$ cd build

(validator)$ nohup ./opera \
    --genesis ../vitainu-genesis-mainnet-with-contracts.g \
    --datadir ./datadir \
    --http \
    --http.addr=your_hostname \
    --http.port 4000  --http.corsdomain=* --http.vhosts=* \
    --http.api=eth,debug,net,admin,web3,personal,txpool,vc,dag \
    --ws \ 
    --ws.addr=your_hostname \
    --ws.port 4100 \
    --ws.api=eth,debug,net,admin,web3,personal,txpool,vc,dag \
    --ws.rpcprefix "/" \
    --bootnodes enode://105ecea3fafaa01a329b9ce988d69ad7d9af233b04ad2c3b637b2f42862623c38f358bd7a7cfead5ae61991681965629abe2749131168bdd9ce573f8085380ab@node-0.vinuchain-rpc.com:3000 \
    --verbosity=3 --tracing > ./opera_read_node.log &
  • Replace your_hostname variables.

PreviousUpdate Validator InfoNextDelegation Calls

Last updated 10 months ago

🧑‍💻