You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/api/websocket.md
+116-3Lines changed: 116 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -318,6 +318,31 @@ errors.
318
318
NOTE: this message is only supported on the Firedancer client, the
319
319
Frankendancer client will always publish `null` for this message
320
320
321
+
#### `summary.catch_up_history`
322
+
| frequency | type | example |
323
+
|-----------|------------------|-----------|
324
+
|*Once*|`CatchUpHistory`| see below |
325
+
326
+
This validator records a history of all slots that were received from
327
+
turbine as well as slots for which a repair request was made while it is
328
+
catching up. After catching up, slots are no longer recorded in this
329
+
history.
330
+
331
+
::: details Example
332
+
333
+
```json
334
+
{
335
+
"topic": "summary",
336
+
"key": "catch_up_history",
337
+
"value": {
338
+
"repair": [11, 12, 13, ...],
339
+
"turbine": [21, 22, 23, ...]
340
+
}
341
+
}
342
+
```
343
+
344
+
:::
345
+
321
346
#### `summary.startup_time_nanos`
322
347
| frequency | type | example |
323
348
|-----------|----------|---------------------|
@@ -1514,6 +1539,7 @@ initially replay one but the cluster votes on the other one.
1514
1539
| failed_vote_transactions |`number\|null`| Total number of failed vote transactions in the block. This should be near-zero in a healthy cluster |
1515
1540
| max_compute_units |`number\|null`| The maximum number of compute units that can be packed into the slot. This limit is one of many consensus-critical limits defined by the solana protocol, and helps keeps blocks small enough for validators consume them quickly. It may grow occasionally via on-chain feature activations |
1516
1541
| compute_units | `number\|null` | Total number of compute units used by the slot. Compute units are a synthetic metric that attempt to capture, based on the content of the block, the various costs that go into processing that block (i.e. cpu, memory, and disk utilization). They are based on certain transaction features, like the number of included signatures, the number of included signature verfication programs, the number of included writeable accounts, the size of the instruction data, the size of the on-chain loaded account data, and the number of computation steps. NOTE: "compute units" is an overloaded term that is often used in misleading contexts to refer to only a single part of the whole consensus-critical cost formula. For example, the getBlock RPC call includes a "computeUnitsConsumed" which actually only refers only the execution compute units associated with a transaction, but excludes other costs like signature costs, data costs, etc. This API will always use compute units in a way that includes ALL consensus-relevant costs, unless otherwise specified |
1542
+
| shreds |`number\|null`| Total number of shreds in the successfully replayed block. Note value is only available in the Firedancer client and will be 0 or null in the Frankendancer client |
1517
1543
| transaction_fee |`string\|null`| Total amount of transaction fees that this slot collects in lamports after any burning |
1518
1544
| priority_fee |`string\|null`| Total amount of priority fees that this slot collects in lamports after any burning |
1519
1545
| tips |`string\|null`| Total amount of tips that this slot collects in lamports, across all block builders, after any commission to the block builder is subtracted |
@@ -1544,6 +1570,90 @@ immediately prior epoch. Recent non-rooted slots may be included, and
1544
1570
included skipped slots will not become unskipped as a later slot has
1545
1571
rooted.
1546
1572
1573
+
#### `slot.live_shreds`
1574
+
| frequency | type | example |
1575
+
|-------------|---------------|---------|
1576
+
|*10ms*|`SlotShred[]`| below |
1577
+
1578
+
The validator sends a continous stream of update messages with detailed
1579
+
information about the time and duration of different shred state
1580
+
transitions (i.e. shred events). A given event is only ever sent once
| reference_slot |`number`| The smallest slot number across all the shreds in a given message |
1606
+
| reference_ts |`number`| The smallest UNIX nanosecond event timestamp number across all the events in a given message |
1607
+
| slot_delta |`number[]`|`reference_slot + slot_delta[i]` is the slot to which shred event `i` belongs |
1608
+
| shred_idxs |`(number\|null)[]`|`shred_idxs[i]` is the slot shred index of the shred for shred event `i`. If null, then shred event `i` applies to all shreds in the slot (i.e. this is used for `slot_complete`) |
1609
+
| events |`string[]`|`events[i]` is the name of shred event `i`. Possible values are `repair_request`, `shred_received`, `shred_replayed`, and `slot_complete`|
1610
+
| events_ts_delta |`string[]`|`reference_ts + events_ts_delta[i]` is the UNIX nanosecond timestamp when shred event `i` occured |
1611
+
1612
+
#### `slot.query_shreds`
1613
+
| frequency | type | example |
1614
+
|-------------|---------------|---------|
1615
+
|*Request*|`SlotShred[]\null`| below |
1616
+
1617
+
| param | type | description |
1618
+
|-------|----------|-------------|
1619
+
| slot |`number`| The requested slot for which the reponse will provide shred timing data |
1620
+
1621
+
WebSocket clients may request historical shred metadata on a per-slot
1622
+
basis. For slots that are too old (i.e. they've been expired from an
1623
+
in-memory store) or too new (i.e. they haven't been finalized yet), the
1624
+
response value will be `null`.
1625
+
1626
+
::: details Example
1627
+
1628
+
```json
1629
+
{
1630
+
"topic": "slot",
1631
+
"key": "query_shreds",
1632
+
"id": 32,
1633
+
"params": {
1634
+
"slot": 289245044
1635
+
}
1636
+
}
1637
+
```
1638
+
1639
+
```json
1640
+
{
1641
+
"topic": "slot",
1642
+
"key": "query_shreds",
1643
+
"id": 32,
1644
+
"value": {
1645
+
"reference_slot": 289245044,
1646
+
"reference_ts": "1739657041588242791",
1647
+
"slot_delta": [0, 0],
1648
+
"shred_idx": [1234, null],
1649
+
"event": [0, 1],
1650
+
"event_ts_delta": ["1000000", "2000000"]
1651
+
}
1652
+
}
1653
+
```
1654
+
1655
+
:::
1656
+
1547
1657
#### `slot.update`
1548
1658
| frequency | type | example |
1549
1659
|-------------|---------------|---------|
@@ -1675,7 +1785,8 @@ explicitly mentioned, skipped slots are not included.
1675
1785
"vote_transactions": 6746,
1676
1786
"failed_transactions": 3703,
1677
1787
"max_compute_units": 48000000,
1678
-
"compute_units": 0
1788
+
"compute_units": 0,
1789
+
"shreds": 123
1679
1790
}
1680
1791
}
1681
1792
}
@@ -1720,7 +1831,8 @@ explicitly mentioned, skipped slots are not included.
1720
1831
"vote_transactions": 6746,
1721
1832
"failed_transactions": 3703,
1722
1833
"max_compute_units": 48000000,
1723
-
"compute_units": 0
1834
+
"compute_units": 0,
1835
+
"shreds": 123
1724
1836
},
1725
1837
"waterfall": {
1726
1838
"in": {
@@ -1855,7 +1967,8 @@ explicitly mentioned, skipped slots are not included.
0 commit comments