Skip to content

Commit 05d8c16

Browse files
authored
prepare release: update docs&bump version (#1636)
1 parent 6aa6988 commit 05d8c16

4 files changed

Lines changed: 58 additions & 3 deletions

File tree

api/doc/thor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ info:
1414
license:
1515
name: LGPL 3.0
1616
url: https://www.gnu.org/licenses/lgpl-3.0.en.html
17-
version: 2.4.3
17+
version: 2.4.4
1818
servers:
1919
- url: /
2020
description: Current Node

cmd/disco/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.4
1+
1.0.5

cmd/thor/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.3
1+
2.4.4

docs/command_line_arguments.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ variables, run: `bin/thor --help`
2727
| `--api-allowed-tracers` | Comma-separated list of allowed tracers (default: "none") |
2828
| `--enable-api-logs` | Enables API requests logging |
2929
| `--api-logs-limit` | Limit the number of logs returned by /logs API (default: 1000) |
30+
| `--api-logs-max-offset` | Limit the maximum offset for /logs API (default: 100000) |
3031
| `--api-priority-fees-percentage` | Percentage of the block base fee for priority fees calculation (default: 5) |
3132
| `--verbosity` | Log verbosity (0-9) (default: 3) |
3233
| `--max-peers` | Maximum number of P2P network peers (P2P network disabled if set to 0) (default: 25) |
@@ -162,6 +163,60 @@ Change the log level via a POST request to /admin/loglevel.
162163
curl -X POST -H "Content-Type: application/json" -d '{"level": "trace"}' http://localhost:2113/admin/loglevel
163164
```
164165

166+
#### Feature toggles
167+
168+
Selected features can be switched on and off at runtime through the admin server, without
169+
restarting the node. Each toggle shares the atomic state of its startup flag, so toggling it
170+
overrides that flag for the running process. When a feature is disabled its API responds with
171+
`503 Service Unavailable` and a `Retry-After` header.
172+
173+
The following features are exposed:
174+
175+
| Feature | Backing flag | Description |
176+
|--------------|-----------------------|---------------------------------------------|
177+
| `apilogs` | `--enable-api-logs` | API request logging |
178+
| `txpool-api` | `--api-enable-txpool` | Transaction pool API endpoints |
179+
| `pprof` | `--pprof` | go-pprof handlers served at `/debug/pprof/` |
180+
181+
List the state of all features via a GET request to /admin/features.
182+
183+
```shell
184+
curl http://localhost:2113/admin/features
185+
```
186+
187+
```json
188+
[
189+
{"name": "apilogs", "enabled": false},
190+
{"name": "pprof", "enabled": false},
191+
{"name": "txpool-api", "enabled": true}
192+
]
193+
```
194+
195+
Retrieve a single feature's state via a GET request to /admin/features/{name}.
196+
197+
```shell
198+
curl http://localhost:2113/admin/features/pprof
199+
```
200+
201+
Toggle a feature via a POST request to /admin/features/{name}. The optional `ttlSeconds` field
202+
(clamped to `0``3600`, `0` meaning no expiry) only takes effect when enabling a feature; the
203+
feature auto-disables after the TTL elapses.
204+
205+
```shell
206+
curl -X POST -H "Content-Type: application/json" -d '{"enabled": true, "ttlSeconds": 300}' http://localhost:2113/admin/features/pprof
207+
```
208+
209+
```json
210+
{
211+
"enabled": true,
212+
"ttlSeconds": 300
213+
}
214+
```
215+
216+
- **Note**: `GET`/`POST /admin/apilogs` is kept as a deprecated alias for the `apilogs` feature.
217+
It returns a `Deprecation` header pointing at `/admin/features/apilogs`; use the unified
218+
`/admin/features` endpoints instead.
219+
165220
#### Health
166221

167222
Retrieve the node health infomation via a GET request to /admin/health.

0 commit comments

Comments
 (0)