Commit graph

7 commits

Author SHA1 Message Date
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
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
d0ae26a1a2 Align difficulty math with RFC 2026-04-05 01:05:00 +00:00
Virgil
55d44df9c2 Use effective custom diff in share accounting 2026-04-05 00:32:43 +00:00
Virgil
d42c21438a fix(proxy): honour invalid custom diff suffixes
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 20:48:10 +00:00
Virgil
d47d89af7a Fix submit job validation and custom diff fallback 2026-04-04 20:28:54 +00:00
Virgil
a38dfc18ec feat(proxy): implement RFC surface
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 10:29:02 +00:00