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)$ git checkout v2.0.49-elemont
(validator)$ makeMainnet
Restore latest snapshot
Mainnet:
Current mainnet installs must restore the latest chaindata snapshot instead of replaying from a genesis file:
SHA256: 969fb6acc86f1cfbc29ceed77224c25046f410c6e78726d5078c04a07afd7b31 (tip epoch 7,894 / block 14,709,230)
Do not bootstrap current mainnet from a genesis file. The distributed 2024 mainnet genesis pre-dates every ELEMONT-era upgrade flag. A fresh replay under v2.0.49-elemont seals those flags at different blocks than the live chain did, so the node computes a different epoch-state hash and rejects current-tip events with err="wrong event epoch hash". The snapshot above, and the regenerated genesis below, were both produced after all five activation seals (2026-08-29/30); they are the only valid mainnet bootstraps. The older mainnet genesis files remain archival only.
Alternative: bootstrap from the regenerated genesis
The snapshot above is the fastest path. The regenerated genesis is the verifiable one — its section hashes are compiled into the binary's AllowedOperaGenesis, so opera refuses to start on a tampered file. A snapshot's checksum lives beside the archive on the same bucket, so it can only be trusted as far as that bucket is.
Size
50,791,105,980 bytes (47.3 GiB)
sha256
14021d4f64e395ed705b7adfb5a29c648cfef6ae4f52abe2a2eb563c369fddd8
Exported from
epoch 7,896 / block 14,711,847 — after all five ELEMONT seals
Then start with --genesis ./vitainu-genesis-mainnet-elemont-20260830.g instead of --datadir pointing at an extracted snapshot. Replay takes considerably longer than extracting the snapshot; pick it when you want the binary to verify the source itself.
Which to use: snapshot for speed, genesis when you want end-to-end verification. Both produce the same node — you need one or the other, never both. Once a datadir exists, neither is read again (Genesis is already written).
Run node
You can turn on and off http and ws options, use your ports and addresses.
Replace
your_hostnamevariables.
Testnet
Restore latest snapshot
Current testnet API nodes must restore the latest chaindata snapshot before first start:
SHA256: 56fb6ed4ca88f4fe202444180036b1a5920560d1879110716d6ae74befa2409d (tip epoch 6,375 / block 1,585,766)
Do not bootstrap current testnet from genesis files or pre-v2.0.47 snapshots. Nodes that missed a seal-time upgrade compute a different epoch-state hash and reject current-tip events with err="wrong event epoch hash". The v2.0.47 snapshot above includes all sealed upgrades through SfcV2Patch10; older testnet snapshots and genesis files remain archival only.
Run node
You can turn on and off http and ws options, use your ports and addresses.
Replace
your_hostnamevariables.
Last updated