feat(zeph-llm): RequestSigner and EndpointPool for Gonka native inference#3620
Merged
feat(zeph-llm): RequestSigner and EndpointPool for Gonka native inference#3620
Conversation
…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
Without the cfg gate, mod.rs compiled without the gonka feature, causing an unresolved intra-doc link to RequestSigner and failing RUSTDOCFLAGS builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RequestSigner(feat(zeph-llm): RequestSigner with k256 + bech32 + Python-derived fixtures #3609): ECDSA/secp256k1 signed request headers for Gonka nodes, using k256 RFC6979 determinism and bech32 address derivation from compressed pubkeyEndpointPool(feat(zeph-llm): EndpointPool round-robin with fail-skip #3610): atomic round-robin pool with per-node fail-skip cooldown, http/https URL validation, and least-recently-failed fallbackgonkafeature (included infull)GonkaProviderimplementation in feat(zeph-llm): GonkaProvider chat / chat_stream / embed (signed transport) #3611Changes
crates/zeph-llm/src/gonka/signer.rs—RequestSignerwith fixture-verified signingcrates/zeph-llm/src/gonka/endpoints.rs—EndpointPoolwith atomic implementationcrates/zeph-llm/src/gonka/fixtures.json— 3 pre-computed test vectorscrates/zeph-llm/src/gonka/mod.rs— module wiring withpub usere-exportsCargo.toml—gonkafeature added tofull;bech32,k256,ripemdpromoted to workspace depscrates/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 passcargo nextest run --workspace --lib --bins— 8899/8899 passcargo clippy --workspace --features gonka --all-targets -- -D warnings— 0 warningscargo +nightly fmt --check— cleanRUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps -p zeph-llm --features gonka— 0 errors, 19 doctests passNotes
LlmError::Otheris used for construction errors (empty pool, invalid URL, invalid hex key) asLlmError::Configdoes not exist in the current error enum.Closes #3609
Closes #3610