|
36 | 36 | const path_to_root = ""; |
37 | 37 | const default_light_theme = "light"; |
38 | 38 | const default_dark_theme = "navy"; |
39 | | - window.path_to_searchindex_js = "searchindex-fd1243a6.js"; |
| 39 | + window.path_to_searchindex_js = "searchindex-739513d3.js"; |
40 | 40 | </script> |
41 | 41 | <!-- Start loading toc.js asap --> |
42 | 42 | <script src="toc-294cc887.js"></script> |
@@ -1510,7 +1510,23 @@ <h3 id="get-leanv0events"><a class="header" href="#get-leanv0events"><code>GET / |
1510 | 1510 | <pre><code>event: head |
1511 | 1511 | data: {"slot":128,"block":"0x1a2b…","state":"0x3c4d…"} |
1512 | 1512 | </code></pre> |
1513 | | -<p>Events are fanned out over a bounded broadcast channel. A client that reads too slowly skips past the events it missed: they are dropped for that subscriber rather than back-pressured onto the actor, so treat the stream as best-effort and re-sync via the blocks endpoints after a gap. Keep-alive comments are sent periodically to hold idle connections open.</p> |
| 1513 | +<h4 id="filtering-with-topics"><a class="header" href="#filtering-with-topics">Filtering with <code>?topics=</code></a></h4> |
| 1514 | +<p>A <strong>required</strong> comma-separated list of event names selects which events to stream:</p> |
| 1515 | +<pre><code class="language-bash">curl -N 'http://127.0.0.1:5052/lean/v0/events?topics=head,finalized_checkpoint' |
| 1516 | +</code></pre> |
| 1517 | +<p>Valid values are exactly the event names above: <code>head</code>, <code>block</code>, <code>justified_checkpoint</code>, <code>finalized_checkpoint</code>. As in the Beacon API <code>eventstream</code> endpoint, <code>topics</code> is mandatory: there is no “subscribe to everything” default; list the topics you want.</p> |
| 1518 | +<div class="table-wrapper"> |
| 1519 | +<table> |
| 1520 | +<thead> |
| 1521 | +<tr><th>Status</th><th>Condition</th></tr> |
| 1522 | +</thead> |
| 1523 | +<tbody> |
| 1524 | +<tr><td><code>200</code></td><td>Stream opened for the listed topics</td></tr> |
| 1525 | +<tr><td><code>400</code></td><td><code>topics</code> is missing or empty, or any listed name is not a known topic (body names the offending value)</td></tr> |
| 1526 | +</tbody> |
| 1527 | +</table> |
| 1528 | +</div> |
| 1529 | +<p>Events are fanned out over a bounded broadcast channel. A client that reads too slowly skips past the events it missed: they are dropped for that subscriber rather than back-pressured onto the actor, so treat the stream as best-effort and re-sync via the blocks endpoints after a gap. A client that falls behind receives an SSE comment line <code>: error - dropped N messages</code> marking the gap (wire-compatible with Lighthouse) before the stream continues; re-sync via the blocks endpoints rather than trusting the skipped range. Keep-alive comments are sent periodically to hold idle connections open.</p> |
1514 | 1530 | <h3 id="get-leanv0blocksblock_id-and-header"><a class="header" href="#get-leanv0blocksblock_id-and-header"><code>GET /lean/v0/blocks/{block_id}</code> and <code>/header</code></a></h3> |
1515 | 1531 | <p><code>block_id</code> is either:</p> |
1516 | 1532 | <ul> |
|
0 commit comments