Skip to content

Commit fc4a742

Browse files
committed
Merge branch 'main' into feat/ethrex-empty-block-v2
2 parents 62a4474 + 7b42e51 commit fc4a742

64 files changed

Lines changed: 10397 additions & 58 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +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_keccak_air, create_load_air,
44-
create_lt_air, create_memw_air, create_memw_aligned_air, create_mul_air, create_page_air,
45-
create_register_air,
46-
create_shift_air,
44+
create_lt_air, create_memw_air, create_memw_aligned_air, create_memw_register_air,
45+
create_mul_air, create_page_air, create_register_air, create_shift_air,
4746
};
4847

4948
use stark::proof::options::{GoldilocksCubicProofOptions, ProofOptions};
@@ -74,6 +73,7 @@ pub struct TableCounts {
7473
pub dvrm: usize,
7574
pub shift: usize,
7675
pub branch: usize,
76+
pub memw_register: usize,
7777
}
7878

7979
impl TableCounts {
@@ -92,6 +92,7 @@ impl TableCounts {
9292
+ self.dvrm
9393
+ self.shift
9494
+ self.branch
95+
+ self.memw_register
9596
}
9697

9798
/// Validate that all required tables have at least one chunk.
@@ -109,6 +110,7 @@ impl TableCounts {
109110
("dvrm", self.dvrm),
110111
("shift", self.shift),
111112
("branch", self.branch),
113+
("memw_register", self.memw_register),
112114
];
113115
for (name, count) in checks {
114116
if count == 0 {
@@ -197,6 +199,7 @@ pub(crate) struct VmAirs {
197199
pub register: VmAir,
198200
pub keccak: VmAir,
199201
pub pages: Vec<VmAir>,
202+
pub memw_registers: Vec<VmAir>,
200203
}
201204

202205
impl VmAirs {
@@ -245,6 +248,13 @@ impl VmAirs {
245248
for (air, trace) in self.pages.iter().zip(traces.pages.iter_mut()) {
246249
pairs.push((air, trace, &()));
247250
}
251+
for (air, trace) in self
252+
.memw_registers
253+
.iter()
254+
.zip(traces.memw_registers.iter_mut())
255+
{
256+
pairs.push((air, trace, &()));
257+
}
248258

249259
pairs
250260
}
@@ -290,6 +300,9 @@ impl VmAirs {
290300
for air in &self.pages {
291301
refs.push(air);
292302
}
303+
for air in &self.memw_registers {
304+
refs.push(air);
305+
}
293306

294307
refs
295308
}
@@ -363,6 +376,9 @@ impl VmAirs {
363376
)
364377
})
365378
.collect();
379+
let memw_registers: Vec<_> = (0..table_counts.memw_register)
380+
.map(|i| create_memw_register_air(proof_options).with_name(&format!("MEMW_R[{}]", i)))
381+
.collect();
366382

367383
#[cfg(feature = "debug-checks")]
368384
debug_report::print_bus_legend();
@@ -384,6 +400,7 @@ impl VmAirs {
384400
register,
385401
keccak,
386402
pages,
403+
memw_registers,
387404
}
388405
}
389406
}

0 commit comments

Comments
 (0)