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: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
14
14
- Added time-based snapshot scheduling. Snapshots can now be triggered after a configurable wall-clock interval (`snapshots.time_interval`) elapses, in addition to the existing transaction-count threshold (`snapshots.tx_count`). A new `snapshots.min_tx_count` option (default 2) sets the minimum number of transactions required before a time-based snapshot fires. Snapshot timing state is replicated to backups via a new `public:ccf.internal.snapshot_status` internal table (#7731).
15
15
- Added support for endpoints that defer their HTTP response until the submitted transaction reaches a terminal consensus state (committed or invalidated). Endpoint authors can call `set_consensus_committed_function()` when installing an endpoint to register a callback that is invoked once the transaction is globally committed or invalidated. The callback receives the `ccf::TxID` and a `ccf::FinalTxStatus` (either `Committed` or `Invalid`), and may inspect or modify the response before it is sent. A built-in `ccf::endpoints::default_respond_on_commit_func` is provided that returns the original response on commit, or an error on invalidation. See the logging sample app (`/log/blocking/private`) for example usage (#7562).
16
16
17
+
### Changed
18
+
19
+
- Renamed `/node/ledger-chunk` and `/node/ledger-chunk/{chunk_name}` endpoints to `/node/ledger_chunk` and `/node/ledger_chunk/{chunk_name}` for consistency with the naming convention used by other `/node/*` endpoints.
20
+
17
21
### Fixed
18
22
19
23
- Fixed the Turin SEV-SNP CPUID mapping used for product detection (#7748).
Copy file name to clipboardExpand all lines: doc/operations/configuration.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ The `enabled_operator_features` configuration field allows enabling or disabling
29
29
Currently supported features are:
30
30
31
31
1. 'SnapshotRead': gates access to endpoints used to fetch snapshots directly from nodes (:http:GET:`/node/snapshot`, :http:HEAD:`/node/snapshot`, :http:GET:`/node/snapshot/{snapshot_name}` and :http:HEAD:`/node/snapshot/{snapshot_name}`).
32
-
2. 'LedgerChunkRead': gates access to endpoints used to retrieve ledger chunks (:http:GET:`/node/ledger-chunk`, :http:HEAD:`/node/ledger-chunk`, :http:GET:`/node/ledger-chunk/{chunk_name}` and :http:HEAD:`/node/ledger-chunk/{chunk_name}`).
32
+
2. 'LedgerChunkRead': gates access to endpoints used to retrieve ledger chunks (:http:GET:`/node/ledger_chunk`, :http:HEAD:`/node/ledger_chunk`, :http:GET:`/node/ledger_chunk/{chunk_name}` and :http:HEAD:`/node/ledger_chunk/{chunk_name}`).
33
33
34
34
Since these operations may require disk IO and produce large responses, these features should not be enabled on interfaces with public access, and instead restricted to interfaces with local connectivity for node-to-node and operator access.
Copy file name to clipboardExpand all lines: doc/operations/ledger_snapshot.rst
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Download Endpoints
50
50
In order to facilitate long term backup of the ledger files (also called chunks), nodes can enable HTTP endpoints that allow a client to download committed ledger files.
51
51
The `LedgerChunkRead` feature must be added to `enabled_operator_features` on the relevant `rpc_interfaces` entries in the node configuration.
52
52
53
-
1. :http:GET:`/node/ledger-chunk` and :http:HEAD:`/node/ledger-chunk`, both taking a `since` query parameter.
53
+
1. :http:GET:`/node/ledger_chunk` and :http:HEAD:`/node/ledger_chunk`, both taking a `since=<seqno>` query parameter.
54
54
55
55
These endpoints can be used by a client to download the next ledger chunk including a given sequence number `<seqno>`.
56
56
They redirect to the appropriate chunk if it exists, using the endpoints described below, or return a `404 Not Found` response if no such chunk is available.
@@ -61,17 +61,17 @@ In the typical case, a requesting client will first hit a Backup, and will event
61
61
62
62
sequenceDiagram
63
63
Note over Client: Client asks for chunk starting at index
64
-
Client->>+Backup: GET /node/ledger-chunk?since=index
Client->>+Primary: GET /node/ledger_chunk?since=101
108
108
109
-
2. :http:GET:`/node/ledger-chunk/{chunk_name}` and :http:HEAD:`/node/ledger-chunk/{chunk_name}`
109
+
2. :http:GET:`/node/ledger_chunk/{chunk_name}` and :http:HEAD:`/node/ledger_chunk/{chunk_name}`
110
110
111
111
These endpoints allow downloading a specific ledger chunk by name, where `<chunk-name>` is of the form `ledger_<start_seqno>-<end_seqno>.committed`.
112
112
They support the HTTP `Range` header for partial downloads, and the `HEAD` method for clients to query metadata such as the total size without downloading the full chunk.
@@ -126,7 +126,7 @@ This allows clients to verify the integrity of downloaded files and avoid re-dow
126
126
ETag and If-None-Match
127
127
^^^^^^^^^^^^^^^^^^^^^^
128
128
129
-
``GET /node/ledger-chunk/{chunk_name}`` supports ``ETag`` and ``If-None-Match`` headers, allowing clients to atomically check whether a chunk (or a range of a chunk) has changed and re-download it in a single request, without needing a separate metadata query first.
129
+
``GET /node/ledger_chunk/{chunk_name}`` supports ``ETag`` and ``If-None-Match`` headers, allowing clients to atomically check whether a chunk (or a range of a chunk) has changed and re-download it in a single request, without needing a separate metadata query first.
130
130
Every successful ``GET`` response includes an ``ETag`` header whose value uses the `RFC 9530 <https://www.rfc-editor.org/rfc/rfc9530>`_ digest format: ``"sha-256=:<base64_digest>:"``, where ``<base64_digest>`` is the base64-encoded SHA-256 digest of the returned content (which may be a sub-range when the ``Range`` header is used).
131
131
132
132
.. note:: ETag values must be surrounded by double quotes, as per `RFC 7232 <https://www.rfc-editor.org/rfc/rfc7232#section-2.3>`_.
@@ -140,7 +140,7 @@ When the client already holds a chunk and wants to check if it has changed, it s
140
140
141
141
sequenceDiagram
142
142
Note over Client: Client already has chunk with known ETag
143
-
Client->>+Node: GET /node/ledger-chunk/ledger_1-100.committed<br/>If-None-Match: "sha-256=:47DEQpj8HBSa+/TImW...=:"
143
+
Client->>+Node: GET /node/ledger_chunk/ledger_1-100.committed<br/>If-None-Match: "sha-256=:47DEQpj8HBSa+/TImW...=:"
144
144
Note over Node: Computes digest, matches If-None-Match
145
145
Node->>-Client: 304 Not Modified<br/>ETag: "sha-256=:47DEQpj8HBSa+/TImW...=:"
146
146
Note over Client: No body transferred, client keeps existing copy
@@ -151,7 +151,7 @@ If the ``If-None-Match`` ETag does not match the current content (e.g. the clien
151
151
152
152
sequenceDiagram
153
153
Note over Client: Client sends an ETag that does not match
154
-
Client->>+Node: GET /node/ledger-chunk/ledger_1-100.committed<br/>If-None-Match: "sha-256=:AAAA...=:"
154
+
Client->>+Node: GET /node/ledger_chunk/ledger_1-100.committed<br/>If-None-Match: "sha-256=:AAAA...=:"
155
155
Note over Node: Computes digest, does not match If-None-Match
Copy file name to clipboardExpand all lines: doc/schemas/node_openapi.json
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1200,9 +1200,9 @@
1200
1200
}
1201
1201
}
1202
1202
},
1203
-
"/node/ledger-chunk": {
1203
+
"/node/ledger_chunk": {
1204
1204
"get": {
1205
-
"description": "Redirect to the corresponding /node/ledger-chunk/{chunk_name} endpoint for the ledger chunk including the sequence number specified in the 'since' query parameter.",
1205
+
"description": "Redirect to the corresponding /node/ledger_chunk/{chunk_name} endpoint for the ledger chunk including the sequence number specified in the 'since' query parameter.",
1206
1206
"operationId": "GetNodeLedgerChunk",
1207
1207
"parameters": [
1208
1208
{
@@ -1228,7 +1228,7 @@
1228
1228
}
1229
1229
},
1230
1230
"head": {
1231
-
"description": "Redirect to the corresponding /node/ledger-chunk/{chunk_name} endpoint for the ledger chunk including the sequence number specified in the 'since' query parameter.",
1231
+
"description": "Redirect to the corresponding /node/ledger_chunk/{chunk_name} endpoint for the ledger chunk including the sequence number specified in the 'since' query parameter.",
1232
1232
"operationId": "HeadNodeLedgerChunk",
1233
1233
"parameters": [
1234
1234
{
@@ -1254,7 +1254,7 @@
1254
1254
}
1255
1255
}
1256
1256
},
1257
-
"/node/ledger-chunk/{chunk_name}": {
1257
+
"/node/ledger_chunk/{chunk_name}": {
1258
1258
"get": {
1259
1259
"description": "Download a specific ledger chunk by name. Supports HTTP Range header for partial downloads.",
0 commit comments