Skip to content

Commit 2d9ada9

Browse files
authored
docs(op-batcher): Add runtime batcher flushing instructions (#17967)
* Add runtime batcher flushing instructions Added instructions for manually triggering the batcher to post data to the DA layer. * Update op-batcher/readme.md * add cast rpc variants * fix misleading comment * note on admin API * respond to review
1 parent 07a6044 commit 2d9ada9

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

op-batcher/readme.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,13 @@ The batcher includes sophisticated throttling mechanisms to manage data availabi
154154
--throttle-threshold=1000000
155155
--throttle-controller-type=quadratic
156156

157-
# Runtime controller switching
157+
# Runtime controller inspection
158158
curl -X POST -H "Content-Type: application/json" \
159159
--data '{"jsonrpc":"2.0","method":"admin_getThrottleController","params":[],"id":1}' \
160160
http://localhost:8545
161+
162+
# or
163+
cast rpc admin_getThrottleController -r http://localhost:8545
161164
```
162165

163166
**📖 For complete documentation, configuration guides, and troubleshooting, see [Enhanced DA Throttling Mechanisms](./throttling.md)**
@@ -166,6 +169,21 @@ curl -X POST -H "Content-Type: application/json" \
166169

167170
The batcher tries to ensure that batches are posted at a minimum frequency specified by `MAX_CHANNEL_DURATION`. To achieve this, it caches the l1 origin of the last submitted channel, and will force close a channel if the timestamp of the l1 head moves beyond the timestamp of that l1 origin plus `MAX_CHANNEL_DURATION`. When clearing its state, e.g. following the detection of a reorg, the batcher will not clear the cached l1 origin: this way, the regular posting of batches will not be disturbed by events like reorgs.
168171

172+
### Enabling the `admin` API
173+
In the following sections, we make use of the batcher's admin API. This is disabled by default but can be set with `OP_BATCHER_RPC_ENABLE_ADMIN=true` or `--rpc.enable-admin=true`.
174+
175+
### Runtime batcher flushing
176+
It is possible to manually trigger the batcher to post data to the DA layer without restarting it, like so:
177+
```bash
178+
curl -X POST -H "Content-Type: application/json" \
179+
--data '{"jsonrpc":"2.0","method":"admin_flushBatcher","params":[],"id":1}' \
180+
http://localhost:8545
181+
182+
# or
183+
cast rpc admin_flushBatcher -r http://localhost:8545
184+
```
185+
The command can either be run on the batcher host machine itself, or remotely by replacing `localhost` with the appropriate remote hostname.
186+
169187
## Known issues and future work
170188

171189
Link to [open issues with the `op-batcher` tag](https://github.com/ethereum-optimism/optimism/issues?q=is%3Aopen+is%3Aissue+label%3AA-op-batcher).

0 commit comments

Comments
 (0)