mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Added bench.ps1, Made a CRL file not there yet revoke nothing for clients too
- bench.ps1 runs the benchmarks (push_rate, replication_rate, compare_with_old) in release mode: -Only, -Sync full|normal. Plan step 13 done, every step of the plan is. - A CRL file named in client.toml that isn't there yet: nothing revoked (the tool, Python's from_file), as on the server, which now warns in its log. A path given to the DLL's SetCrl or Client(crl=...) stays a FileError. Decided in revamp.md, dropped from known-issues.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -77,9 +77,12 @@ connected, `peer_identity()` gives the other end's `Identity`.
|
||||
handshake, no new configuration needed. `Revocations::revokes()` tells
|
||||
the server which open connections to drop.
|
||||
- **Both ends check it:** `server_config()` and `client_config()` both take
|
||||
the revocations (`Revocations::none()` without a CRL). A server dialing
|
||||
its peer is the peer's client, with the same CRL: servers block each
|
||||
other, whichever end dials.
|
||||
the revocations (`Revocations::none()` without a CRL, or when the
|
||||
server's config or `client.toml` names a CRL file that isn't there
|
||||
yet: never blocking, the server warns in its log; a path given to
|
||||
the DLL is a `FileError`). A server dialing its peer is the peer's
|
||||
client, with the same CRL: servers block each other, whichever end
|
||||
dials.
|
||||
- **Revoking is by certificate, not by name:** each certificate has its own
|
||||
key and its own serial number (made from that key), so two of the same
|
||||
name (two servers named alike, a new one before the old one goes) are
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ server = "10.0.0.2:7000" # host:port, [an IPv6 address]:port
|
||||
ca = "ca.crt"
|
||||
certificate = "kitchen.crt"
|
||||
key = "kitchen.key"
|
||||
crl = "ca.crl" # optional
|
||||
crl = "ca.crl" # optional; a file not there yet: none
|
||||
```
|
||||
|
||||
## The DLL
|
||||
|
||||
@@ -123,13 +123,6 @@ Reproduce one before fixing it, and move it up (or drop it) once known.
|
||||
`GetMessages` answers `UnknownName` for a node without messages
|
||||
anywhere and none for one with messages in another topic
|
||||
(`reader.rs`, `messages`). Fix: none in both cases.
|
||||
- **A CRL file that isn't there.** The server takes it as nothing
|
||||
revoked (`load_revocations`, `bakashrot-server/src/lib.rs`), the
|
||||
`bakashrot` tool refuses to start when `client.toml`'s `crl` names a
|
||||
missing file. Either may be right (a server that starts before its
|
||||
first CRL; a client that must not skip the check): choose one and
|
||||
say it in the docs. A server whose CRL file was deleted by mistake
|
||||
revokes nothing, silently.
|
||||
- **No limits per client.** Any number of connections (each a task and
|
||||
its buffers), any amount pushed: an allowed client can fill the disk
|
||||
or the server's memory. Fine for the threat model; first thing to
|
||||
|
||||
+4
-1
@@ -77,7 +77,7 @@ beside it, on `debian:trixie-slim`, as uid 10001.
|
||||
| Writes | one writer thread | a queue of every write (pushes, uploads and their parts, replicated messages and parts, retention's deletes); the thread writes whatever is queued in one transaction (group commit, 1000 at most): the busier, the bigger the groups |
|
||||
| Reads, queries | tokio's blocking threads | a pool of read connections and one of query connections (`query_only`), reused |
|
||||
| WAL checkpoints | one thread, every second | its own connection, off the writer's way (`storage.md`) |
|
||||
| The CRL file | a task, every 5 s | reloaded when its time or size changes; one that isn't the CA's is refused, the previous one stays |
|
||||
| The CRL file | a task, every 5 s | reloaded when its time or size changes; one that isn't the CA's is refused, the previous one stays; no file: nothing revoked, warned |
|
||||
| Retention | a task, at start then every `retention_interval` (1 min) | below |
|
||||
| Replication | a task per server of `push_to` | below: links kept up, a check-in every `sync_interval` (5 s) |
|
||||
|
||||
@@ -238,6 +238,9 @@ server's, `ConnectionLost`, `ProtocolError`, `InvalidArgument`,
|
||||
|
||||
## Measured
|
||||
|
||||
`bench.ps1` at the root runs these benchmarks (`-Only push,replication`,
|
||||
`-Sync full|normal`; the variables below from the environment).
|
||||
|
||||
`push_rate` (`tests/end_to_end.rs`, ignored by default): a whole server on
|
||||
localhost, 10 clients each its own node (`CLIENTS`), one push at a time
|
||||
each, 200-byte JSON, 20,000 pushes per client.
|
||||
|
||||
+3
-2
@@ -220,8 +220,9 @@ over 500 streams picked at random, 100 per transaction, 200-byte JSON;
|
||||
middle id; retention of 10% of one topic. The new side is
|
||||
`compare_with_old` (`tests/storage.rs`, ignored by default:
|
||||
`PUSHES=1000000 SYNC=normal cargo test --release -p bakashrot-storage --
|
||||
--ignored --nocapture`). The old side calls `OldSource`'s writer
|
||||
(`BakaShrot_Writer_WriteJobs()`, its group commit, PureBasic 5.73, SQLite
|
||||
--ignored --nocapture`, or `bench.ps1 -Only storage`). The old side
|
||||
calls `OldSource`'s writer (`BakaShrot_Writer_WriteJobs()`, its group
|
||||
commit, PureBasic 5.73, SQLite
|
||||
3.54.1 from `sqlite3.dll`), from a program built outside `OldSource`.
|
||||
Same machine, NVMe, one run each.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user