Skip to content

feat(zeph-llm): RequestSigner and EndpointPool for Gonka native inference#3620

Merged
bug-ops merged 2 commits intomainfrom
gonka-signer-endpoint-pool
May 5, 2026
Merged

feat(zeph-llm): RequestSigner and EndpointPool for Gonka native inference#3620
bug-ops merged 2 commits intomainfrom
gonka-signer-endpoint-pool

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 5, 2026

Summary

Changes

  • crates/zeph-llm/src/gonka/signer.rsRequestSigner with fixture-verified signing
  • crates/zeph-llm/src/gonka/endpoints.rsEndpointPool with atomic implementation
  • crates/zeph-llm/src/gonka/fixtures.json — 3 pre-computed test vectors
  • crates/zeph-llm/src/gonka/mod.rs — module wiring with pub use re-exports
  • Root Cargo.tomlgonka feature added to full; bech32, k256, ripemd promoted to workspace deps
  • crates/zeph-llm/Cargo.toml — new deps: k256 0.13, ripemd 0.2, url (scheme validation)

Test plan

  • cargo nextest run -p zeph-llm --features gonka -E 'test(gonka)' — 23/23 pass
  • cargo nextest run --workspace --lib --bins — 8899/8899 pass
  • cargo clippy --workspace --features gonka --all-targets -- -D warnings — 0 warnings
  • cargo +nightly fmt --check — clean
  • RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps -p zeph-llm --features gonka — 0 errors, 19 doctests pass
  • Live testnet probe — required before merging feat(zeph-llm): GonkaProvider chat / chat_stream / embed (signed transport) #3611 (GonkaProvider), not this PR

Notes

LlmError::Other is used for construction errors (empty pool, invalid URL, invalid hex key) as LlmError::Config does not exist in the current error enum.

Closes #3609
Closes #3610

…ence (#3609, #3610)

Add the cryptographic and networking foundation for the Gonka decentralized inference
native provider path (part of epic #3602).

RequestSigner (#3609):
- ECDSA/secp256k1 signing via k256 0.13 with RFC6979 determinism
- Signs sha256(sha256(body) || timestamp_ns || transfer_address)
- Address derivation: bech32(prefix, ripemd160(sha256(compressed_pubkey)))
- Three fixture-verified test vectors; 12 unit tests

EndpointPool (#3610):
- Round-robin over Vec<GonkaEndpoint> with AtomicUsize cursor
- Per-node fail-skip cooldown via Vec<AtomicU64> (unix nanoseconds)
- Falls back to least-recently-failed when all nodes are in cooldown
- http/https URL scheme validation in constructor; 11 unit tests

Both subsystems are feature-gated under the new `gonka` feature flag, which is
included in the `full` feature set. Tracing spans added per project telemetry rules.

Closes #3609
Closes #3610
@github-actions github-actions Bot added enhancement New feature or request size/XL Extra large PR (500+ lines) documentation Improvements or additions to documentation llm zeph-llm crate (Ollama, Claude) rust Rust code changes dependencies Dependency updates labels May 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 5, 2026 21:14
Without the cfg gate, mod.rs compiled without the gonka feature, causing an
unresolved intra-doc link to RequestSigner and failing RUSTDOCFLAGS builds.
@bug-ops bug-ops merged commit 4357b74 into main May 5, 2026
32 checks passed
@bug-ops bug-ops deleted the gonka-signer-endpoint-pool branch May 5, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request llm zeph-llm crate (Ollama, Claude) rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(zeph-llm): EndpointPool round-robin with fail-skip feat(zeph-llm): RequestSigner with k256 + bech32 + Python-derived fixtures

1 participant