Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Some field gadget tests do not verify lookups

Aperta
#19 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust

Direzione di ricerca

Inizia dai test dei field gadget in core/src/operations/field/field_den.rs, field_inner_product.rs, field_op.rs, field/extensions/quadratic/sqrt.rs e field/extensions/quadratic/mod.rs. Confrontali con i test end-to-end presenti in tests/ e verifica come vengono controllati gli argomenti di lookup. Il lavoro è completato quando i test dei gadget interessati convalidano i lookup da loro generati, oppure quando la limitazione è documentata chiaramente se un test di full-proof non è pratico.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Tests that only verify a single chip's trace and proof, understandably but surprisingly, do not check for the correctness of lookups, since they are only checking an individual chip's trace for correctness.

This is particularly relevant for non-native field operation tests after the addition of range checking to the non-native field gadgets. That is, all of these tests: 1, 2, 3, 4, 5), are not actually checking that the range checks are correct and that the lookup arguments and send/receives are also correct. This is a minor issue, but can cover up existing issues if any of those gadgets are not used and tested by other existing precompiles. Right now, after merging #160, I believe only the QuadField Sqrt gadget falls under this under-tested criteria.

Any test that makes use of those operations in an actual RISC-V precompile (i.e. any of the tests under the tests/ directory) do not have this issue, since they emulate the entire machine and check the cumulative sum of the lookup arguments. However, some of the tests in the tests/ directory use only hard-coded test values, while the field gadget tests fill the trace with random values as well as hardcoded values, so the test coverage is not perfect.

I'm not sure of the best way to approach this: modifying those tests to make a "full" proof seems difficult since the test chips are not in the MachineAir enum. Adding a test-only method for checking the generated byte lookup events for correctness might be a good compromise, to ensure that at least none of the gadgets are emitting invalid byte lookups. Alternatively, proper documentation to highlight that this is the case might be enough, since the full end-to-end tests with RISC-V programs exist for all precompiles.

Lingua principale
Rust
Stelle
80
Fork
8
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di argumentcomputer/sphinx

Tutte le issue di argumentcomputer/sphinx

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.