Skip to main content

nexus_getBlocks

Get blocks in range (for replica sync).
params[0]
object
required
Query parameters

Parameters Object

FieldTypeDescription
from_heightnumberStart block height
to_heightnumberEnd block height
include_transactionsbooleanInclude full transactions
result
object
Blocks data
curl -X POST http://localhost:8545 \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"nexus_getBlocks",
    "params":[{"from_height": 100, "to_height": 110, "include_transactions": true}],
    "id":1
  }'

nexus_getSyncStatus

Get node sync status.
params
array
required
Empty array
result
object
Sync status information
curl -X POST http://localhost:8545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"nexus_getSyncStatus","params":[],"id":1}'
Response
{
  "jsonrpc": "2.0",
  "result": {
    "mode": "replica",
    "synced": true,
    "local_height": 1000,
    "primary_height": 1000,
    "blocks_behind": 0,
    "sync_rate_blocks_per_sec": 50.0
  },
  "id": 1
}

nexus_getStateSnapshot

Get state snapshot info.
params[0]
number
Block height (optional, defaults to latest)
result
object
Snapshot metadata
curl -X POST http://localhost:8545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"nexus_getStateSnapshot","params":[1000],"id":1}'

Node Modes

ModeDescription
primaryFull node that produces blocks
replicaSyncs from primary, read-only
archiveFull history, no pruning

Sync Architecture

Primary Node

    ├── Replica 1 (sync via RPC)
    ├── Replica 2 (sync via RPC)
    └── Replica 3 (sync via RPC)
Replicas poll the primary for new blocks and verify state roots match.