# Net
Maintainer
# net_syncInfo
Return sync status of the node
Parameters:
none
Returns:
SyncInfo
from
:string
Sync start heightto
:string
Sync target heightcurrent
:string
Current snapshot chain heightstate
:uint
Sync state: 0 - not start, 1 - syncing, 2 - complete, 3 - error, 4 - cancelledstatus
:string
Sync state descriptionExample:
{
"jsonrpc": "2.0",
"id": 2,
"method": "net_syncInfo",
"params": null
}
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"from": "0",
"to": "30000",
"current": "0",
"state": 1,
"status": "Synchronising"
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "net_syncInfo",
"params": null
}
# net_syncDetail
synchron detail
Parameters:
none
Returns:
SyncDetail
from
:string
start heightto
:string
target heightcurrent
:string
current snapshot chain heightstatus
:string
synchron status descriptiontasks
:array
download tasksConnections
:array
network connections to download ledger chunksChunks
:array
downloaded ledger chunks have been verified, wait to insert into local chainCaches
:array
downloaded ledger chunks, but have not verified.
Example:
{
"jsonrpc": "2.0",
"id": 2,
"method": "net_syncDetail",
"params": null
}
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"from": 692001,
"to": 727000,
"current": 692084,
"state": "Synchronising",
"status": "Synchronising",
"tasks": [
"692001-693000 done",
"693001-694000 pending"
],
"connections": [
{
"address": "24a160122317e6e4940ef2a91242b07f@118.25.49.80:8484",
"speed": "0.00 Byte/s",
},
{
"address": "04508fbe0512c01a48c8a450425547de@118.24.112.185:8484",
"speed": "0.00 Byte/s",
}
],
"chunks": [
[
{
"height": 692000,
"hash": "74add6f7f61c33dd741276d97d8ade4456c47485da78752587aef8a209fe7e88"
},
{
"height": 693000,
"hash": "b6af1c6fb3b502268b17928b1d91206e71003f614c134f8865bf6886d88d8e30"
}
]
],
"caches": [
{
"Bound": [
691001, 693000
],
"Hash": "b6af1c6fb3b502268b17928b1d91206e71003f614c134f8865bf6886d88d8e30",
"PrevHash": "028e2730c8fad34b53b8d8f5a41881024fa8b87a97a9cfc61f0e0c83984336a0"
},
{
"Bound": [
694001, 696000
],
"Hash": "e14662c3e9a9751b28822f2640be79cf13bd778c6b3158c8f6ff584fbf89fa24",
"PrevHash": "c6cd65717345f017309ee961a6bcda9ba021e0ed5913d8111471ff09fc95590c"
},
{
"Bound": [
698001, 699000
],
"Hash": "4e067e54b9e966b264053c271c7d976065b8a0796d6995b9dda45e11339e0b57",
"PrevHash": "26a6bdcfd3d9f58951eb76ebd4784160e98098564cc31e236618f045cb90f365"
}
]
}
}
{
"jsonrpc": "2.0",
"id": 2,
"method": "net_syncDetail",
"params": null
}
# net_nodeInfo
Return the detailed information of current Node, like peers.
Parameters:
none
Returns:
NodeInfo
id
:string
Node IDname
:string
Node name, configured inIdentity
field ofnode_config.json
netId
:int
The ID of Vite network connectedpeerCount
:int
Number of peers connectedpeers
:[]*PeerInfo
Information of peers connectedExample:
{
"jsonrpc": "2.0",
"id": 3,
"method": "net_nodeInfo",
"params": null
}
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"name": "vite-sbp-0",
"netId": 1,
"address": "0.0.0.0:8483",
"peerCount": 2,
"peers": [
{
"name": "vite-sbp-1",
"height": 726575,
"address": "119.28.221.175:8483",
"createAt": "2019-05-31 03:05:09"
},
{
"name": "vite-full-node",
"height": 726576,
"address": "117.50.66.76:8483",
"createAt": "2019-05-31 12:33:44"
},
]
}
}
{
"jsonrpc": "2.0",
"id": 3,
"method": "net_nodeInfo",
"params": null
}
PeerInfo
name
:string
Peer's nameheight
:int
Current snapshot chain heightaddress
:string
Peer's ip addresscreateAt
:string
The time when this peer connected
# net_peers
the same with method net_nodeInfo
← Contract CommonModels →