getnodeinfo

How to use it

// yarn add @tatumio/tatum

import { TatumSDK, Tron, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Tron>({network: Network.TRON})

const nodeInfo = await tatum.rpc.getNodeInfo()

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

Overview

The getNodeInfo method is used to query information about the current state of the TRON node. This includes details about the latest block information, the number of active and passive connections, the total TCP flow, and other vital node details. This information is critical for monitoring the health and status of the TRON network.

Parameters

This method doesn't require any parameters.

Return Object

  • beginSyncNum (integer): The begin sync block number.

  • block (string): The latest block information, including block height and block id.

  • solidityBlock (string): The latest solidified block information, including block height and block id.

  • currentConnectCount (integer): The current connect count.

  • activeConnectCount (integer): Active node connection count.

  • passiveConnectCount (integer): Passive node connection count.

  • totalFlow (integer): Total TCP flow.

  • peerInfoList (PeerInfo[]): Peer node information.

  • configNodeInfo (ConfigNodeInfo): Node configuration information.

  • machineInfo (MachineInfo): The information of the machine where the node is located.

  • cheatWitnessInfoMap (map<string, string>): SR information that may be suspected of cheating.

HTTP Request Example

{}

HTTP Response Example

{
  "activeConnectCount": 2,
  "beginSyncNum": 33868394,
  "block": "Num:33868413,ID:000000000204ca7d21eec047b7bd9659e633f27eabe7133aa8ae1f35c7800835",
  "cheatWitnessInfoMap": {},
  "configNodeInfo": {
    "activeNodeSize": 2,
    "allowAdaptiveEnergy": 1,
    "allowCreationOfContracts": 1,
    "backupListenPort": 10001,
    "backupMemberSize": 0,
    "backupPriority": 6,
    "codeVersion": "4.7.1.1",
    "dbVersion": 2,
    "discoverEnable": true,
    "listenPort": 16666,
    "maxConnectCount": 30,
    "maxTimeRatio": 5,
    "minParticipationRate": 0,
    "minTimeRatio": 0,
    "p2pVersion": "1",
    "passiveNodeSize": 2,
    "sameIpMaxConnectCount": 2,
    "sendNodeSize": 3,
    "supportConstant": true,
    "versionNum": "17686"
  },
  "currentConnectCount": 5,
  "machineInfo": {
    "cpuCount": 4,
    "cpuRate": 0.012658227848101266,
    "deadLockThreadCount": 0,
    "deadLockThreadInfoList": [],