reeflog-client 0.7.22 → 0.7.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ they did to account balances for selected programs into a cursor-addressed
|
|
|
5
5
|
append-only log, so a consumer resumes without gaps after a crash,
|
|
6
6
|
disconnect, or reorg.
|
|
7
7
|
|
|
8
|
-
**Status: v0.7.
|
|
8
|
+
**Status: v0.7.24 shipped (2026-11-13), v0 working.** Live against mainnet-beta: see *Measured results* below. Install the binary without a Rust toolchain: `npm install reeflog-client` then `import { bootstrap } from 'reeflog-client'; await bootstrap()` (downloads the prebuilt release archive and verifies its sha256; the archive digests are `6cea050d…` linux / `d3cbe390…` macos, both equal what the release API publishes). The same install from the tagged release: `npm install github:auroraxo/reeflog#v0.7.24`. Or from source: `cargo install --git https://github.com/auroraxo/reeflog --tag v0.7.24`. The full event envelope (logs, balances, instructions, account list with owners, the bytes each account held, and the authority each token account had at the moment of the event), the Node client (see *The Node client*), webhook fan-out, a dead-letter queue, and archive backfill ship in this tree; Yellowstone as a second transport does not.
|
|
9
9
|
|
|
10
10
|
## The idea
|
|
11
11
|
|
|
@@ -883,7 +883,24 @@ reeflog start --db reeflog.db --webhook-config webhooks.json --webhook-every 5
|
|
|
883
883
|
in chain order and never with a hole in front of it. It may see one
|
|
884
884
|
twice; the stable id (`X-Reeflog-Event-Id: <target>:<kind>:<seq>`) is
|
|
885
885
|
what a consumer dedups on for exactly-once.
|
|
886
|
-
3. **
|
|
886
|
+
3. **A payload the journal still owes is not delivered.** A row whose
|
|
887
|
+
content the journal owes (`logs IS NULL AND payload_state IS NULL`) is a
|
|
888
|
+
signature, not an event — since v0.7.23 the event queue HOLDS at it:
|
|
889
|
+
rows before it are delivered, the target's cursor stays behind the owed
|
|
890
|
+
row, no receipt is written, `push` exits 3 naming `hydrate`, and once the
|
|
891
|
+
debt is paid the SAME target receives the row complete. Measured on the
|
|
892
|
+
published v0.7.22 asset (`research/webhook-payload-hold-baseline-v0722-
|
|
893
|
+
2026-11-13.json`, verdict `webhook-payload-hold-defect-present`): the
|
|
894
|
+
receiver got the owed row as a signed body with `logs: null`, `next_seq`
|
|
895
|
+
moved 0 → 1, a receipt was written, and the second pass after `hydrate`
|
|
896
|
+
delivered nothing — the finished event was permanently unreachable for
|
|
897
|
+
that consumer while a fresh target read it. This is the same rule
|
|
898
|
+
`tail` holds since v0.7.22, one channel over: the webhook body is
|
|
899
|
+
SIGNED, so a receiver cannot tell a signature without content from a
|
|
900
|
+
real event. A recorded outcome (`unavailable` / `invalid` / `no_metadata`)
|
|
901
|
+
is never held — it is an answer, not a debt — and retractions are never
|
|
902
|
+
held by this rule either.
|
|
903
|
+
4. **The payload is authenticated.** Every request carries
|
|
887
904
|
`X-Reeflog-Signature: sha256=<hex>` = HMAC-SHA256(secret, body) over the
|
|
888
905
|
exact bytes sent (canonical JSON — `serde_json`'s sorted keys, so the same
|
|
889
906
|
event always produces the same signature). The receiver checks it with
|
|
@@ -893,14 +910,14 @@ reeflog start --db reeflog.db --webhook-config webhooks.json --webhook-every 5
|
|
|
893
910
|
import hmac, hashlib
|
|
894
911
|
want = "sha256=" + hmac.new(secret, body, hashlib.sha256).hexdigest()
|
|
895
912
|
```
|
|
896
|
-
|
|
913
|
+
5. **A retraction is delivered too**, on its own cursor, and it is delivered
|
|
897
914
|
*even when the event queue is blocked behind a refusal* — a retraction is
|
|
898
915
|
the one message whose lateness costs money.
|
|
899
|
-
|
|
916
|
+
6. **Receipts make the crash window safe.** The state (per-target cursor)
|
|
900
917
|
and the receipts (which exact body was accepted, by sha256) live in the
|
|
901
918
|
journal. A daemon that dies between "POST succeeded" and "cursor advanced"
|
|
902
919
|
does not deliver the event twice on the next pass.
|
|
903
|
-
|
|
920
|
+
7. **A refusal stops being a verdict only when it stops repeating.** One
|
|
904
921
|
4xx can be an accident (mid-deploy, a config reload), so the refusal is
|
|
905
922
|
counted. After `dead_letter_after` refused attempts on the same event
|
|
906
923
|
(default 5, `0` disables it) the event moves to the **dead-letter queue**:
|
|
@@ -924,6 +941,19 @@ reeflog start --db reeflog.db --webhook-config webhooks.json --webhook-every 5
|
|
|
924
941
|
`X-Reeflog-Event-Id` sees the same event it rejected (or missed), not a
|
|
925
942
|
new one. A replay that is refused again stays in the queue and exits 3;
|
|
926
943
|
nothing is ever dropped.
|
|
944
|
+
8. **A failure that ended stops being reported.** `webhook status` carries
|
|
945
|
+
`last_error` — the reason the target's MOST RECENT delivery pass stopped.
|
|
946
|
+
Since v0.7.24 that reason belongs to the pass that produced it: the next
|
|
947
|
+
pass for that target clears it and re-sets it only if the pass stops
|
|
948
|
+
again. Measured on the published v0.7.23 asset
|
|
949
|
+
(`research/webhook-stale-error-published-v0723-2026-11-13.json`, verdict
|
|
950
|
+
`stale-error-verdict-present`): the endpoint refused once (`http 500`,
|
|
951
|
+
`push` exited 3), the next pass delivered everything and exited 0 — and
|
|
952
|
+
`webhook status` still said `http 500`. A monitoring caller that polls
|
|
953
|
+
the status alarmed forever on a failure that had ended, and an operator
|
|
954
|
+
repaired the same endpoint twice. A failure that still stands is
|
|
955
|
+
re-reported on every pass it still happens, so nothing is hidden: the
|
|
956
|
+
rule moves the verdict forward with the passes, it does not swallow it.
|
|
927
957
|
|
|
928
958
|
### Measured, against an independent receiver
|
|
929
959
|
|
|
@@ -1671,7 +1701,7 @@ contract, and a library's idea of the schema cannot drift from the daemon's.
|
|
|
1671
1701
|
|
|
1672
1702
|
```bash
|
|
1673
1703
|
npm install reeflog-client # the registry; this version, no Rust toolchain
|
|
1674
|
-
npm install github:auroraxo/reeflog#v0.7.
|
|
1704
|
+
npm install github:auroraxo/reeflog#v0.7.24 # the same client from the tagged release
|
|
1675
1705
|
```
|
|
1676
1706
|
|
|
1677
1707
|
The client needs the `reeflog` binary. `bootstrap()` gets it **without a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reeflog-client",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.24",
|
|
4
4
|
"description": "Node client for reeflog, the durable local mailbox for Solana events: cursor-based event delivery, retractions, health and repair.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"test": "node --test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"reeflog-client": "github:auroraxo/reeflog#v0.7.
|
|
34
|
+
"reeflog-client": "github:auroraxo/reeflog#v0.7.22"
|
|
35
35
|
}
|
|
36
36
|
}
|