0xMiden / 0xMiden/air-script

Improve `periodic_column` usage in Plonky3 backend

Offen
#492 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
codegen
Vorherrschende Sprache
Rust
Sterne
96
Forks
39
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### What should be done?

This issue is a followup on https://github.com/0xMiden/air-script/pull/461:7

As Plonky3 currently does not support periodic columns out of the box, we've introduced in #461 multiple structs and implementation for their support in our backend.

However, their handling can be improved. For instance, we can no longer `prove` or `verify` traces, only check that a given trace follows the constraints described in the Air for testing.

### How should it be done?

- `fn periodic_columns(&self) -> Vec {` in `AirBuilderWithPeriodicColumns` should maybe return an Array

- `periodic_columns` in the `DebugConstraintBuilderWithPeriodicColumns` struct a bit differently
- Pad all periodic columns to the maximum length by periodic repetition
- Transpose the columns so that we have a vector of rows.
- We just return `&self.periodic_columns[self.row_index % col.len()]`

_Originally posted by @adr1anh in https://github.com/0xMiden/air-script/pull/461#discussion_r238264942

- Add support of `prove` and `verify`

### When is this task done?

This task is done when a better handling of periodic columns has been achieved and tested in all the current tests.

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Review the changes in PR #461, especially the structs `AirBuilderWithPeriodicColumns` and `DebugConstraintBuilderWithPeriodicColumns`. Understand how periodic columns are currently handled and the proposed improvements: padding, transposing, and enabling prove/verify. Run existing tests to ensure changes don't break functionality, focusing on tests related to periodic columns.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
backend, compilers
Issue-Typ
Refactoring
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.