feat: sequence check validator#1
Open
kjnasdfkjnsadfkjnds wants to merge 13 commits into
Open
Conversation
staaason
pushed a commit
that referenced
this pull request
Dec 8, 2025
* actually start setting epoch id for inference_validation_details.proto * Use epoch_id for indexing InferenceValidation details * more cleanups * more cleanups * Fix test #1 * Fix test #2 * clean all usages of EpochGroupId * Delete epoch_group_id from proto definition * clean the GenesisState * Cleanup genesis params * more genesis cleanup * delete unnecessary setup * delete unnecessary setup * revive tokenomics data * revive tokenomics data, but remove from genesis! * gen protos * return skipped count * fix test * fix test * fix test
feat: distribution check
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.
Essential Elements of an Effective PR Description Checklist
PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS ABOVE HAVE BEEN CONSIDERED.
Purpose
This PR introduces two core validation mechanisms for decentralized inference security according to this proposal - https://github.com/gonka-ai/gonka/blob/main/proposals/inference-validation/inference-validation.md
1. Stage 1 Sequence Check
Implements deterministic verification that each generated token in a submitted sequence appears in the corresponding top-k tokens returned in the inference artifact. This ensures executers cannot pre-generate sequences with a cheaper model and later compute probabilities with a different (claimed) model.
Sequence check logic:
run_seedand top-k tokens from the inference response.This closes the primary pre-fill attack vector for Stage 1.
2. Distribution Check with Live vLLM Inference
Test Plan
Execution environment was validated on both local and server GPUs to ensure consistent results:
Local GPU:
Server GPU:
Both environments successfully executed the vLLM-based distribution check.
Tests cover:
Test Results
Sequence Check Tests
All sequence check tests pass:
Distribution Check Tests (Using Live vLLM)
Distribution check logs confirm:
(Optional) Documentation Update
No documentation update required. The validation logic is fully internal and does not change the public API.