Snider
2470f1ac3d
feat(proxy): add log tests, fix nil config panic, complete test triads
...
- Add log package tests (AccessLog and ShareLog Good/Bad/Ugly triads)
- Fix nil pointer panic in pool.NewStrategyFactory when config is nil
- Add Worker Hashrate Good/Bad/Ugly test triad
- Add ConfigWatcher Start Bad test (nonexistent path)
- Add FailoverStrategy CurrentPools Bad/Ugly, EnabledPools Good/Bad/Ugly,
and NewStrategyFactory Good/Bad/Ugly test triads
- Improve doc comments on Stats, StatsSummary, Workers, WorkerRecord
with AX-compliant usage examples
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 08:08:28 +01:00
Snider
31a151d23c
feat(proxy): implement RFC test coverage and AX usage-example comments
...
Add missing Good/Bad/Ugly test triplets per RFC section 22:
- stats_test.go: OnAccept/OnReject/Tick/OnLogin/OnClose tests with
concurrency race test and top-10 diff slot verification
- ratelimit_test.go: full Good/Bad/Ugly set including ban persistence
and disabled-limiter edge case
- customdiff_test.go: renamed to Apply_Good/Bad/Ugly convention per RFC
- storage_test.go: full Add_Good/Bad/Ugly set including 256-slot fill,
overflow rejection, and dead-slot reclamation via SetJob
- job_test.go: added Good/Bad/Ugly for BlobWithFixedByte, DifficultyFromTarget,
and IsValid
Add Miner.Diff() public getter for the last difficulty sent to miner.
Add AX-compliant usage-example comments (principle 2) to all Miner
accessors, Proxy query methods, EffectiveShareDifficulty, targetFromDifficulty,
MinerSnapshot, and RateLimiter.IsActive.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 07:02:54 +01:00
Virgil
6f0747abc2
fix(reload): apply custom diff updates to active miners
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:49:05 +00:00
Virgil
711c4259f7
refactor(proxy): unify monitoring auth checks
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:44:35 +00:00
Virgil
8cf01f2618
refactor(proxy): rename server TLS config field
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:42:05 +00:00
Virgil
b6b44b1f7b
refactor(proxy): name miner timeouts and password mask
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:39:19 +00:00
Virgil
e1eadf705d
fix(proxy): separate config loading from validation
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:36:21 +00:00
Virgil
ea378354de
chore(proxy): clarify watcher and limiter names
2026-04-05 03:34:07 +00:00
Virgil
8a9046356e
refactor(proxy): centralise monitoring API contract values
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:30:40 +00:00
Virgil
d1a899805e
perf(proxy): reuse miner send buffer for writes
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:25:39 +00:00
Virgil
5680539dbb
docs(proxy): tighten config comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:22:57 +00:00
Virgil
82b2375058
fix(proxy): trim mode and worker identifiers
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:19:28 +00:00
Virgil
01a0cc5907
fix(proxy): drain submits before shutdown
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:15:17 +00:00
Virgil
031f0c0f17
docs(proxy): tighten AX-oriented comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:10:41 +00:00
Virgil
75d151b4e5
refactor(proxy): clarify miner login callback naming
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:07:41 +00:00
Virgil
70fcbd4d43
docs(nicehash): sharpen storage usage examples
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:04:39 +00:00
Virgil
686f4ea54f
fix(api): align response type aliases with RFC
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 03:01:41 +00:00
Virgil
af96bfce94
docs: align public API comments with AX guidance
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:58:56 +00:00
Virgil
1ae781608c
fix(api): honour unrestricted monitoring methods
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:55:36 +00:00
Virgil
ee128e944d
fix(proxy): make config watcher restartable
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:50:55 +00:00
Virgil
1f8ff58b20
fix(login): defer login events until assignment succeeds
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:48:03 +00:00
Virgil
bc6113c80d
fix(api): enforce GET on monitoring routes
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:43:49 +00:00
Virgil
b3fd1fef61
refactor(splitter): clarify mapper ownership names
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:40:42 +00:00
Virgil
e518f2df32
refactor(api): clarify monitoring route guards
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:37:56 +00:00
Virgil
30ff013158
docs(proxy): sharpen AX usage examples
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:34:53 +00:00
Virgil
be47d7afde
fix(proxy): align config and login parsing with rfc
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:31:37 +00:00
Virgil
65f6c733a0
fix(simple): reset stale job window on pool session change
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:28:30 +00:00
Virgil
f4f0081eb0
docs(proxy): align AX comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:24:39 +00:00
Virgil
f0d5f6ae86
refactor(proxy): clarify public wiring comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:21:48 +00:00
Virgil
0a7c99264b
refactor(errors): add scoped proxy failures
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:18:05 +00:00
Virgil
35db5f6840
docs(proxy): sharpen AX usage examples
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:12:55 +00:00
Virgil
8a52856719
fix(proxy): reject configs without enabled pools
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:09:46 +00:00
Virgil
5d8d82b9b5
docs(proxy): align AX comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:06:24 +00:00
Virgil
356eb9cec1
fix(proxy): use mtime-based config watching
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:04:03 +00:00
Virgil
cbde021d0c
docs(proxy): align AX comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 02:01:38 +00:00
Virgil
f2f7dfed75
fix(proxy): align config watcher with RFC
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:59:28 +00:00
Virgil
ce3b7a50cd
fix(proxy): use filesystem config watcher
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:56:36 +00:00
Virgil
ecd4130457
docs(proxy): sharpen AX examples
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:52:20 +00:00
Virgil
5a3fcf4fab
docs(proxy): sharpen AX usage comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:50:02 +00:00
Virgil
7dd9807a6e
chore: improve proxy api comments
2026-04-05 01:46:41 +00:00
Virgil
7b2a7ccd88
docs(proxy): align public AX comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:43:31 +00:00
Virgil
9f34bc7200
docs(proxy): refine config AX comments
2026-04-05 01:41:00 +00:00
Virgil
a1f47f5792
fix(proxy): align pool failover and simple routing
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:38:05 +00:00
Virgil
b5e4a6499f
docs(proxy): improve AX usage comments
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:33:13 +00:00
Virgil
b9b3c47b4c
docs(proxy): align public comments with AX
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:30:08 +00:00
Virgil
fefae4b3e5
fix(proxy): classify low difficulty rejects
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:26:24 +00:00
Virgil
264479d57b
fix(pool): roll back failed submit tracking
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:23:50 +00:00
Virgil
d43c8ee4c1
fix: clear stale upstream state on disconnect
2026-04-05 01:19:50 +00:00
Virgil
05b0bb5ea4
docs(ax): improve public route and log examples
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:15:03 +00:00
Virgil
2a49caca03
docs(ax): add codex conventions
...
Clarify reload behaviour for immutable splitter wiring.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 01:12:06 +00:00