@hisoka-io/anon-rpc-worker 0.2.0 → 0.3.0
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/CHANGELOG.md +24 -0
- package/README.md +17 -0
- package/dist/anon-rpc-worker.js +3460 -2615
- package/dist/anon-rpc-worker.js.keccak256 +1 -1
- package/dist/anon-rpc-worker.provenance.json +7 -7
- package/package.json +2 -2
- package/src/config.ts +8 -0
- package/src/core.ts +54 -1
- package/src/fetch-map.ts +91 -12
- package/src/local-answers.ts +238 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@hisoka-io/anon-rpc-worker`.
|
|
4
4
|
|
|
5
|
+
## 0.3.0 (2026-10-06)
|
|
6
|
+
|
|
7
|
+
Every 0.2.0 config stays valid. Works against entries on nox 0.4.0-rc.6 and on nodes with claim protocol v2.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Config `hedgeAfterMs` (default 3,000, 0 turns it off): resendable reads send a second copy on another route at
|
|
12
|
+
about the observed p95 reply time; the first reply wins.
|
|
13
|
+
- The client runs with the low-latency settings: binary, retaining, long-polling claims where the entry supports
|
|
14
|
+
them; concurrent claims with data blocks first; immediate resend on a lost reply; two transport-failure resends;
|
|
15
|
+
same-entry resends for a single bridge; a standby entry kept connected (claims share the primary connection).
|
|
16
|
+
- Wallet calls first: the first registry check waits for the first call to settle (at most 15 s).
|
|
17
|
+
- Compressed replies: upstream requests carry `accept-encoding: gzip` where the runtime has `DecompressionStream`,
|
|
18
|
+
and the worker inflates gzip bodies itself, capped at `maxResponseBytes`. A 414 KB `eth_getLogs` reply crosses the
|
|
19
|
+
mixnet as about 41 KB (2 reply packets instead of 14), a full block of 490 KB as about 81 KB (3 instead of 16).
|
|
20
|
+
- Worker-local answers: `eth_chainId` and `net_version` per upstream URL once a second, independently routed
|
|
21
|
+
request agrees. Reads addressed by block hash (`eth_getBlockByHash`, `eth_getBlockReceipts`, `eth_getLogs`
|
|
22
|
+
with `blockHash`, EIP-1898 `{blockHash}` state reads, kept once two calls returned the same result) are behind
|
|
23
|
+
the `LocalAnswers` option `blockHashReads`, off in the worker until answers are checked against the hash. A hit answers at
|
|
24
|
+
once with the caller's JSON-RPC `id` and sends nothing. `Cache-Control: no-cache` or `no-store` skips it. An
|
|
25
|
+
empty log or receipt list is always fetched again, since an upstream behind the chain head answers `[]`.
|
|
26
|
+
- The client's send-path settings: chunked packet writes, a send-window warm-up after each entry connection
|
|
27
|
+
opens, and concurrent calls spread over the pinned and standby entries.
|
|
28
|
+
|
|
5
29
|
## 0.2.0 (2026-10-06)
|
|
6
30
|
|
|
7
31
|
Built on `@hisoka-io/nox-client` 0.6.0 (`kps.discovery`). Every 0.1.0 config stays valid.
|
package/README.md
CHANGED
|
@@ -41,6 +41,7 @@ optional, and every config valid for 0.1.0 stays valid:
|
|
|
41
41
|
| `checkpoint` | | | reserved; any value fails with `bad-config` |
|
|
42
42
|
| `logLevel` | `"debug"`, `"info"`, `"warn"`, `"error"` | `"info"` | |
|
|
43
43
|
| `attemptTimeoutMs` | integer | 12,000 | 3,000-60,000 |
|
|
44
|
+
| `hedgeAfterMs` | integer | 3,000 | 0-60,000. Resendable reads send a second copy on another route when no reply arrived after this long, raised to the observed p95 reply time and kept below `attemptTimeoutMs`; the first reply wins. 0 turns hedging off |
|
|
44
45
|
| `callDeadlineMs` | integer | 25,000 | at least `attemptTimeoutMs`, at most 120,000 |
|
|
45
46
|
| `maxConcurrentCalls` | integer | 16 | 1-64 |
|
|
46
47
|
| `maxRequestBytes` | integer | 1,048,576 | 1,024-4,194,304 |
|
|
@@ -124,6 +125,22 @@ were read at, and when each member outside the snapshot was first seen. At most
|
|
|
124
125
|
days. A cache that fails any check (another registry, too many records, one malformed record) is ignored whole, and
|
|
125
126
|
a learned address is used only after the node's `/metadata.json` names the same member.
|
|
126
127
|
|
|
128
|
+
## Release 0.2.0
|
|
129
|
+
|
|
130
|
+
| | |
|
|
131
|
+
|---|---|
|
|
132
|
+
| `workerHash` (keccak-256 of `dist/anon-rpc-worker.js`) | `0x0a58f9915f686950072a4786249d396ecbf2194a39ac835effe8ea1a7c76f324` |
|
|
133
|
+
| Size | 924,847 bytes; 268,945 bytes with `gzip -9 -n` |
|
|
134
|
+
| Specifier | Ethereum Sepolia `0x29b4a6A8Cc11769531854d87f9F33EC63Efe8fe6` (`ImmutableWorkerSpecifier`, resolvers in [specifier/README.md](./specifier/README.md#deployments)) |
|
|
135
|
+
| Snapshot | NoxRegistry at Arbitrum Sepolia block 316,207,920, keccak-256 `0xa351960e…94fbb2` |
|
|
136
|
+
| nox-wasm module | 188,708 bytes, sha256 `5171416972ea4499fd4b4ea8bcadf002f4c10f10ed42cafb0d5a426121da9c4f` |
|
|
137
|
+
| Built from | `nox-sdk` commit `ef019a716d7994820d7d63d6de3e60ae8f71e80d`, rustc 1.95.0, wasm-pack 0.13.1, wasm-bindgen 0.2.114, binaryen 117, esbuild 0.27.3 |
|
|
138
|
+
|
|
139
|
+
Two builds in fresh containers of the pinned images (at two different paths) and a host build give these exact
|
|
140
|
+
bytes (`scripts/verify-reproducible.sh --native`). Run it from the repository root as
|
|
141
|
+
`packages/anon-rpc-worker/scripts/verify-reproducible.sh` (or `pnpm verify:reproducible` inside the package); host builds (`--native`,
|
|
142
|
+
`--local`) use rustc 1.95.0, so set `RUSTUP_TOOLCHAIN=1.95.0` when the host default differs.
|
|
143
|
+
|
|
127
144
|
## What the bundle contains
|
|
128
145
|
|
|
129
146
|
- `dist/anon-rpc-worker.js`: a single IIFE built by esbuild (target es2022, not minified, so it can be read
|