Skip to content

Commit af92fcc

Browse files
authored
Merge branch 'main' into feat/heap-profiling
2 parents 2a16df8 + 7b42e51 commit af92fcc

64 files changed

Lines changed: 10390 additions & 57 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pr_spec.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Spec tests
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
- 'spec/**'
7+
push:
8+
branches: ["**"]
9+
paths: ["spec/**"]
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
spec_structure:
20+
name: Spec structure test
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v6
24+
- uses: actions/setup-python@v6
25+
- run: python3 spec/tooling/chip.py spec/src/config.toml spec/src/signatures.toml spec/src/*.toml

prover/src/lib.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ use crate::tables::types::BusId;
4141
use crate::test_utils::{
4242
E, F, VmAir, create_bitwise_air, create_branch_air, create_commit_air, create_cpu_air,
4343
create_decode_air, create_dvrm_air, create_halt_air, create_load_air, create_lt_air,
44-
create_memw_air, create_memw_aligned_air, create_mul_air, create_page_air, create_register_air,
45-
create_shift_air,
44+
create_memw_air, create_memw_aligned_air, create_memw_register_air, create_mul_air,
45+
create_page_air, create_register_air, create_shift_air,
4646
};
4747

4848
use stark::proof::options::{GoldilocksCubicProofOptions, ProofOptions};
@@ -73,6 +73,7 @@ pub struct TableCounts {
7373
pub dvrm: usize,
7474
pub shift: usize,
7575
pub branch: usize,
76+
pub memw_register: usize,
7677
}
7778

7879
impl TableCounts {
@@ -91,6 +92,7 @@ impl TableCounts {
9192
+ self.dvrm
9293
+ self.shift
9394
+ self.branch
95+
+ self.memw_register
9496
}
9597

9698
/// Validate that all required tables have at least one chunk.
@@ -108,6 +110,7 @@ impl TableCounts {
108110
("dvrm", self.dvrm),
109111
("shift", self.shift),
110112
("branch", self.branch),
113+
("memw_register", self.memw_register),
111114
];
112115
for (name, count) in checks {
113116
if count == 0 {
@@ -195,6 +198,7 @@ pub(crate) struct VmAirs {
195198
pub commit: VmAir,
196199
pub register: VmAir,
197200
pub pages: Vec<VmAir>,
201+
pub memw_registers: Vec<VmAir>,
198202
}
199203

200204
impl VmAirs {
@@ -242,6 +246,13 @@ impl VmAirs {
242246
for (air, trace) in self.pages.iter().zip(traces.pages.iter_mut()) {
243247
pairs.push((air, trace, &()));
244248
}
249+
for (air, trace) in self
250+
.memw_registers
251+
.iter()
252+
.zip(traces.memw_registers.iter_mut())
253+
{
254+
pairs.push((air, trace, &()));
255+
}
245256

246257
pairs
247258
}
@@ -286,6 +297,9 @@ impl VmAirs {
286297
for air in &self.pages {
287298
refs.push(air);
288299
}
300+
for air in &self.memw_registers {
301+
refs.push(air);
302+
}
289303

290304
refs
291305
}
@@ -358,6 +372,9 @@ impl VmAirs {
358372
)
359373
})
360374
.collect();
375+
let memw_registers: Vec<_> = (0..table_counts.memw_register)
376+
.map(|i| create_memw_register_air(proof_options).with_name(&format!("MEMW_R[{}]", i)))
377+
.collect();
361378

362379
#[cfg(feature = "debug-checks")]
363380
debug_report::print_bus_legend();
@@ -378,6 +395,7 @@ impl VmAirs {
378395
commit,
379396
register,
380397
pages,
398+
memw_registers,
381399
}
382400
}
383401
}

0 commit comments

Comments
 (0)