diff --git a/CHANGELOG.md b/CHANGELOG.md index 501bb77..892f78d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,52 @@ The crates carry the one workspace version and are released together. +## 0.11.0 (2026-11-17) + +### Features + +- `rfc9162-sidecar prove` writes a checkpoint and an inclusion proof for one path, and `verify-proof` checks that proof, and an optional blob file, without opening the log. + +### Fixes + +- A sidecar whose pair count or key length does not fit in its u16 prefix is refused, instead of being written with the length truncated. + A bundle of more than 256 entries is refused, because the entry offset is one byte. +- The tile split no longer overflows when a tree is wider than 2^63. + A perfect subtree whose span does not fit in a u64 is refused instead of being accepted or panicking. +- `rfc9162-log`: A seal or compaction retried after its manifest append failed, or after a crash between storing the run file and logging the manifest, logs the run. + It found its own run file and refused every retry with "a run for that entry range is already stored"; a run file with other bytes for the range is still refused. +- `rfc9162-sidecar`: A command line the binary does not take exits with status 2 and opens nothing: the command and its arguments are checked before `DIR/.sidecar/pack` is opened. + An unknown command or a missing argument created the pack, and a non-numeric tree `SIZE`, `include` without `--trusted`, or a `--trusted` line that is not a key exited 1. +- `rfc9162-tiles`: Opening or refreshing a `PackStore` stops at a record head that declares more bytes than the file holds before sizing a buffer for it. + A torn head after a crash cost an allocation of whatever length its bytes claimed, up to 4 GiB. +- `rfc9162-tiles`: `PosixStore::create_new` writes a temporary file and links it at the path, so a write cut short by an error or a crash leaves nothing there, as the store promises, instead of a partial file that every later `create_new` takes for one already stored. + The root must be on a file system with hard links. +- `rfc9162-tiles`: `PosixStore` handles in one process draw temporary file names from one counter, so two handles on one root no longer write the same temporary file and rename each other's bytes into place. + A temporary name that is already taken is passed over rather than truncated, and a temporary file whose write fails is removed. +- `rfc9162-tiles`: `Writer::checkpoint` signs only a tree that extends the checkpoint already published under its origin: the same root at that size, or a larger tree the tiles prove consistent with it. + A tree of the published size with another root, or a larger one that does not extend it, is `Error::Corrupt`, where it was signed. + +### Documentation + +- The install and getting-started docs now state the minimum supported Rust version (1.85) before `cargo add`, and `docs/examples/Cargo.toml` now inherits the workspace `rust-version` so the examples package declares the same compiler floor as the crates. +- The sidecar reference and the log how-to describe `prove` and `verify-proof`, including a proof that still checks after a later snapshot. +- `rfc9162-log`: The `Recovery::quarantined` doc says what it counts: store paths of the data log beyond its tree state that opening the store moved to `.state/torn-`. + It said entries. +- `rfc9162-log`: The `sidecar` module doc and `sidecar_keys` list every lookup key an entry gets: `path=`, `blob=` for a put, and `origin=` for a child's checkpoint. + They left out `origin=`. +- `rfc9162-log`: The `store` module doc describes the run format the writer writes, v3: front-coded blocks of `BLOCK_PAIRS` pairs behind a block index. + It said v2 and pointed at `RUN_MAGIC`, which only readers still accept. +- `rfc9162`: `Head.root`, `verify_inclusion` and `verify_consistency` say that a root is the lower-case hex `hex` writes: the same root in upper case does not verify, so a head has one form for `Head::material` to sign. + They said only "hex". + +### Miscellaneous + +- Added `rfc9162-sidecar verify` for offline checkpoint verification against trusted signed-note key lines, with optional inclusion proof verification for a path at the signed checkpoint. +- Inclusion and consistency proofs at sizes 0, 1, 2 and either side of a power of two are checked against a second tree, and a flipped, truncated or extended proof is rejected. +- `scripts/build-docs.sh` and `docs/examples/sidecar-demo.sh` ask `cargo metadata` for the target directory, so the book's transcripts and API docs come from the builds cargo just made when `CARGO_TARGET_DIR` or a configured target-dir moves them out of `target/`. + They read `target/` under the checkout, and ran stale binaries or none; the docs workflow now builds outside the checkout. + + ## 0.10.0 (2026-11-09) ### Features diff --git a/Cargo.lock b/Cargo.lock index 27fa4b3..f4693af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ dependencies = [ [[package]] name = "rfc9162" -version = "0.10.0" +version = "0.11.0" dependencies = [ "sha2", ] @@ -298,7 +298,7 @@ dependencies = [ [[package]] name = "rfc9162-log" -version = "0.10.0" +version = "0.11.0" dependencies = [ "ed25519-dalek", "rfc9162", @@ -311,7 +311,7 @@ dependencies = [ [[package]] name = "rfc9162-tiles" -version = "0.10.0" +version = "0.11.0" dependencies = [ "ed25519-dalek", "miniz_oxide", diff --git a/Cargo.toml b/Cargo.toml index 9ed1ba8..73bc92d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ ] [workspace.package] -version = "0.10.0" +version = "0.11.0" edition = "2021" license = "MIT" rust-version = "1.85" @@ -17,8 +17,8 @@ rust-version = "1.85" # The internal pin follows [workspace.package] version. cog writes this line. # Change that version, then run `cog -r @cogfiles.txt`. # [[[cog import versions; cog.out(versions.pins()) ]]] -rfc9162 = { path = "crates/rfc9162", version = "0.10.0" } -rfc9162-tiles = { path = "crates/rfc9162-tiles", version = "0.10.0" } +rfc9162 = { path = "crates/rfc9162", version = "0.11.0" } +rfc9162-tiles = { path = "crates/rfc9162-tiles", version = "0.11.0" } # [[[end]]] sha2 = "0.10" serde = { version = "1", features = ["derive"] } diff --git a/changelog.d/+checkpoint-consistency.bugfix.md b/changelog.d/+checkpoint-consistency.bugfix.md deleted file mode 100644 index 81bae54..0000000 --- a/changelog.d/+checkpoint-consistency.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-tiles`: `Writer::checkpoint` signs only a tree that extends the checkpoint already published under its origin: the same root at that size, or a larger tree the tiles prove consistent with it. -A tree of the published size with another root, or a larger one that does not extend it, is `Error::Corrupt`, where it was signed. diff --git a/changelog.d/+docs-target-dir.misc.md b/changelog.d/+docs-target-dir.misc.md deleted file mode 100644 index 1274171..0000000 --- a/changelog.d/+docs-target-dir.misc.md +++ /dev/null @@ -1,2 +0,0 @@ -`scripts/build-docs.sh` and `docs/examples/sidecar-demo.sh` ask `cargo metadata` for the target directory, so the book's transcripts and API docs come from the builds cargo just made when `CARGO_TARGET_DIR` or a configured target-dir moves them out of `target/`. -They read `target/` under the checkout, and ran stale binaries or none; the docs workflow now builds outside the checkout. diff --git a/changelog.d/+head-root-hex.doc.md b/changelog.d/+head-root-hex.doc.md deleted file mode 100644 index 9427cfd..0000000 --- a/changelog.d/+head-root-hex.doc.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162`: `Head.root`, `verify_inclusion` and `verify_consistency` say that a root is the lower-case hex `hex` writes: the same root in upper case does not verify, so a head has one form for `Head::material` to sign. -They said only "hex". diff --git a/changelog.d/+log-run-format.doc.md b/changelog.d/+log-run-format.doc.md deleted file mode 100644 index db1d8e0..0000000 --- a/changelog.d/+log-run-format.doc.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-log`: The `store` module doc describes the run format the writer writes, v3: front-coded blocks of `BLOCK_PAIRS` pairs behind a block index. -It said v2 and pointed at `RUN_MAGIC`, which only readers still accept. diff --git a/changelog.d/+msrv-docs-and-examples.doc.md b/changelog.d/+msrv-docs-and-examples.doc.md deleted file mode 100644 index fef417b..0000000 --- a/changelog.d/+msrv-docs-and-examples.doc.md +++ /dev/null @@ -1 +0,0 @@ -The install and getting-started docs now state the minimum supported Rust version (1.85) before `cargo add`, and `docs/examples/Cargo.toml` now inherits the workspace `rust-version` so the examples package declares the same compiler floor as the crates. diff --git a/changelog.d/+pack-scan-bound.bugfix.md b/changelog.d/+pack-scan-bound.bugfix.md deleted file mode 100644 index 313f8ac..0000000 --- a/changelog.d/+pack-scan-bound.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-tiles`: Opening or refreshing a `PackStore` stops at a record head that declares more bytes than the file holds before sizing a buffer for it. -A torn head after a crash cost an allocation of whatever length its bytes claimed, up to 4 GiB. diff --git a/changelog.d/+posix-create-new.bugfix.md b/changelog.d/+posix-create-new.bugfix.md deleted file mode 100644 index 75c6365..0000000 --- a/changelog.d/+posix-create-new.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-tiles`: `PosixStore::create_new` writes a temporary file and links it at the path, so a write cut short by an error or a crash leaves nothing there, as the store promises, instead of a partial file that every later `create_new` takes for one already stored. -The root must be on a file system with hard links. diff --git a/changelog.d/+posix-temp-names.bugfix.md b/changelog.d/+posix-temp-names.bugfix.md deleted file mode 100644 index 2952955..0000000 --- a/changelog.d/+posix-temp-names.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-tiles`: `PosixStore` handles in one process draw temporary file names from one counter, so two handles on one root no longer write the same temporary file and rename each other's bytes into place. -A temporary name that is already taken is passed over rather than truncated, and a temporary file whose write fails is removed. diff --git a/changelog.d/+proof-shapes.misc.md b/changelog.d/+proof-shapes.misc.md deleted file mode 100644 index a05226d..0000000 --- a/changelog.d/+proof-shapes.misc.md +++ /dev/null @@ -1 +0,0 @@ -Inclusion and consistency proofs at sizes 0, 1, 2 and either side of a power of two are checked against a second tree, and a flipped, truncated or extended proof is rejected. diff --git a/changelog.d/+recovery-quarantined.doc.md b/changelog.d/+recovery-quarantined.doc.md deleted file mode 100644 index 6898e80..0000000 --- a/changelog.d/+recovery-quarantined.doc.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-log`: The `Recovery::quarantined` doc says what it counts: store paths of the data log beyond its tree state that opening the store moved to `.state/torn-`. -It said entries. diff --git a/changelog.d/+run-retry.bugfix.md b/changelog.d/+run-retry.bugfix.md deleted file mode 100644 index 89279c3..0000000 --- a/changelog.d/+run-retry.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-log`: A seal or compaction retried after its manifest append failed, or after a crash between storing the run file and logging the manifest, logs the run. -It found its own run file and refused every retry with "a run for that entry range is already stored"; a run file with other bytes for the range is still refused. diff --git a/changelog.d/+sidecar-bounds.bugfix.md b/changelog.d/+sidecar-bounds.bugfix.md deleted file mode 100644 index 54fadfe..0000000 --- a/changelog.d/+sidecar-bounds.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -A sidecar whose pair count or key length does not fit in its u16 prefix is refused, instead of being written with the length truncated. -A bundle of more than 256 entries is refused, because the entry offset is one byte. diff --git a/changelog.d/+sidecar-cli-usage.bugfix.md b/changelog.d/+sidecar-cli-usage.bugfix.md deleted file mode 100644 index dff3bcc..0000000 --- a/changelog.d/+sidecar-cli-usage.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-sidecar`: A command line the binary does not take exits with status 2 and opens nothing: the command and its arguments are checked before `DIR/.sidecar/pack` is opened. -An unknown command or a missing argument created the pack, and a non-numeric tree `SIZE`, `include` without `--trusted`, or a `--trusted` line that is not a key exited 1. diff --git a/changelog.d/+sidecar-origin-key.doc.md b/changelog.d/+sidecar-origin-key.doc.md deleted file mode 100644 index af9786f..0000000 --- a/changelog.d/+sidecar-origin-key.doc.md +++ /dev/null @@ -1,2 +0,0 @@ -`rfc9162-log`: The `sidecar` module doc and `sidecar_keys` list every lookup key an entry gets: `path=`, `blob=` for a put, and `origin=` for a child's checkpoint. -They left out `origin=`. diff --git a/changelog.d/+sidecar-prove-docs.doc.md b/changelog.d/+sidecar-prove-docs.doc.md deleted file mode 100644 index d773a33..0000000 --- a/changelog.d/+sidecar-prove-docs.doc.md +++ /dev/null @@ -1 +0,0 @@ -The sidecar reference and the log how-to describe `prove` and `verify-proof`, including a proof that still checks after a later snapshot. \ No newline at end of file diff --git a/changelog.d/+sidecar-prove.feature.md b/changelog.d/+sidecar-prove.feature.md deleted file mode 100644 index cb7349c..0000000 --- a/changelog.d/+sidecar-prove.feature.md +++ /dev/null @@ -1 +0,0 @@ -`rfc9162-sidecar prove` writes a checkpoint and an inclusion proof for one path, and `verify-proof` checks that proof, and an optional blob file, without opening the log. diff --git a/changelog.d/+sidecar-verify.misc.md b/changelog.d/+sidecar-verify.misc.md deleted file mode 100644 index 305f9e4..0000000 --- a/changelog.d/+sidecar-verify.misc.md +++ /dev/null @@ -1 +0,0 @@ -Added `rfc9162-sidecar verify` for offline checkpoint verification against trusted signed-note key lines, with optional inclusion proof verification for a path at the signed checkpoint. diff --git a/changelog.d/+split-point.bugfix.md b/changelog.d/+split-point.bugfix.md deleted file mode 100644 index eb8543c..0000000 --- a/changelog.d/+split-point.bugfix.md +++ /dev/null @@ -1,2 +0,0 @@ -The tile split no longer overflows when a tree is wider than 2^63. -A perfect subtree whose span does not fit in a u64 is refused instead of being accepted or panicking.