nexus_getBlocks
Get blocks in range (for replica sync).
Parameters Object
| Field | Type | Description |
|---|
from_height | number | Start block height |
to_height | number | End block height |
include_transactions | boolean | Include full transactions |
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.
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getSyncStatus","params":[],"id":1}'
{
"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.
Block height (optional, defaults to latest)
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getStateSnapshot","params":[1000],"id":1}'
Node Modes
| Mode | Description |
|---|
primary | Full node that produces blocks |
replica | Syncs from primary, read-only |
archive | Full 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.