0xMiden / 0xMiden/air-script

Sort boundary constraints

Đang mở
#315 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
96
Fork
39
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The order in which the boundary constraints are defined is important. For example:

```
boundary_constraints:
enf p.last = 1
enf p.first = 1
```

Is not the same as:

```
boundary_constraints:
enf p.first = 1
enf p.last = 1
```

The first will emit the following code for the winterfell backend:

```
fn get_aux_assertions>(&self, aux_rand_elements: &AuxTraceRandElements) -> Vec> {
let mut result = Vec::new();
result.push(Assertion::single(0, 0, E::ONE));
result.push(Assertion::single(0, self.last_step(), E::ONE));
result
}
```

And the later

```
fn get_aux_assertions>(&self, aux_rand_elements: &AuxTraceRandElements) -> Vec> {
let mut result = Vec::new();
result.push(Assertion::single(0, self.last_step(), E::ONE));
result.push(Assertion::single(0, 0, E::ONE));
result
}
```

The issue is that the order of `Vec>` determines the order of the composition coefficients, so proofs of the two systems above are not interchangeable. Additionally, this may introduce bugs across different backends, since the order of the coefficients is implicitly defined and can easily become out of sync.

To fix the issue above an ordering is required. A proposal is to sort by `(trace, column_name, step)`, similar to https://github.com/0xPolygonMiden/air-script/issues/314

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.