Repository navigation
Conversation
…rtz0#269 hartz0#274 hartz0#267 – Differential arithmetic test suite for fixed-point decay math Add contracts/scoregate-score/src/test_decay_differential.rs with 8 parameterised tests that compare decay_fixed() against a libm f64 reference across the full documented parameter space (t ∈ [0,365 days], λ ∈ [0.0001, 0.5]). Covers: zero-lambda short-circuit, per-axis sweeps, an 11×12 full 2-D grid, horizon-clamping invariant, strict monotonicity in age, zero-age boundary (must return SCALE exactly), Taylor/saturation boundary at x=5, and bounded truncation error (±0.15 % of SCALE). hartz0#268 – Canonical BLS12-381 scalar field validation in decode_proof In contracts/scoregate-score/src/verkle.rs, add the scalar field modulus r as BLS12_381_SCALAR_MODULUS_R and an is_canonical_field_element() predicate. decode_proof now returns None if any of the three extracted field elements (z, v, witness) are ≥ r, closing the proof-malleability window where two distinct byte encodings represent the same mathematical value. hartz0#269 – Exhaustive negative test vectors for Bulletproof inner-product argument Append 29 new #[test] functions to test_zk_range_proof.rs organised into 9 categories: corrupted L[i]/R[i] curve points (all 3 rounds, x and y), zeroed-out identity substitutions, L↔R round-level swaps, truncated and extended transcripts (empty / 256 B / 752 B / 801 B), non-canonical Fiat-Shamir challenge injection via high-bit flips on L[0]/R[0], zero and swapped terminal scalars a/b, all four outer polynomial commitments A/S/T1/T2, and all three inner scalars tx/taux/mu. A local macro replaces the previous unsafe-transmute fixture helper. hartz0#274 – AggregateRiskScore, ScoreSubmission, BatchAttestation in schema-gen tools/schema-gen/src/lib.rs: - Export AGGREGATE_RISK_SCORE_NAME, SCORE_SUBMISSION_NAME, BATCH_ATTESTATION_NAME constants and *_SCHEMA_FILE / *_TYPESCRIPT_FILE / *_PYTHON_FILE filename constants for each new type. - Add native_aggregate_risk_score_struct(), native_score_submission_struct(), native_batch_attestation_struct() extraction functions (native + WASM paths) backed by a shared wasm_named_struct() / into_named_struct() helper that replaces the single-type into_risk_score_struct(). - Extend risk_domain_range() to cover aggregate_score and max_pair_score on AggregateRiskScore (same [0,100] domain as RiskScore fields). - Add tests_extended module: 20 new tests verifying field lists, bounded-field constraints, unbounded fields, JSON Schema / TypeScript / Python output, cross-type provenance headers, and WASM error paths for all three new types. tools/schema-gen/src/main.rs: - Load all four structs from native or WASM source. - Emit 4×3 = 12 artifact files (schema + ts + py per type). - Update --help text and success message.
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.
closes #267 – Differential arithmetic test suite for fixed-point decay math Add contracts/scoregate-score/src/test_decay_differential.rs with 8 parameterised tests that compare decay_fixed() against a libm f64 reference across the full documented parameter space (t ∈ [0,365 days], λ ∈ [0.0001, 0.5]). Covers: zero-lambda short-circuit, per-axis sweeps, an 11×12 full 2-D grid, horizon-clamping invariant, strict monotonicity in age, zero-age boundary (must return SCALE exactly), Taylor/saturation boundary at x=5, and bounded truncation error (±0.15 % of SCALE).
closes #268 – Canonical BLS12-381 scalar field validation in decode_proof In contracts/scoregate-score/src/verkle.rs, add the scalar field modulus r as BLS12_381_SCALAR_MODULUS_R and an is_canonical_field_element() predicate. decode_proof now returns None if any of the three extracted field elements (z, v, witness) are ≥ r, closing the proof-malleability window where two distinct byte encodings represent the same mathematical value.
closes #269 – Exhaustive negative test vectors for Bulletproof inner-product argument Append 29 new #[test] functions to test_zk_range_proof.rs organised into 9 categories: corrupted L[i]/R[i] curve points (all 3 rounds, x and y), zeroed-out identity substitutions, L↔R round-level swaps, truncated and extended transcripts (empty / 256 B / 752 B / 801 B), non-canonical Fiat-Shamir challenge injection via high-bit flips on L[0]/R[0], zero and swapped terminal scalars a/b, all four outer polynomial commitments A/S/T1/T2, and all three inner scalars tx/taux/mu. A local macro replaces the previous unsafe-transmute fixture helper.
closes #274 – AggregateRiskScore, ScoreSubmission, BatchAttestation in schema-gen tools/schema-gen/src/lib.rs: