Skip to content

Commit 41a6ba1

Browse files
committed
fix lint
1 parent 369a915 commit 41a6ba1

3 files changed

Lines changed: 45 additions & 33 deletions

File tree

prover/src/lib.rs

Lines changed: 2 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,
45-
create_register_air, create_register_reload_air, create_shift_air,
44+
create_memw_air, create_memw_aligned_air, create_mul_air, create_page_air, create_register_air,
45+
create_register_reload_air, create_shift_air,
4646
};
4747

4848
use stark::proof::options::{GoldilocksCubicProofOptions, ProofOptions};

prover/src/tables/register_reload.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
159159
BusId::Memory,
160160
Multiplicity::One,
161161
vec![
162-
BusValue::constant(1), // is_register = 1
163-
addr_w0.clone(), // addr_lo = 2 * reg_idx
164-
BusValue::constant(0), // addr_hi = 0
165-
old_ts.clone(), // ts_lo = old_ts
166-
BusValue::constant(0), // ts_hi = 0
167-
val_lo.clone(), // value = val_lo
162+
BusValue::constant(1), // is_register = 1
163+
addr_w0.clone(), // addr_lo = 2 * reg_idx
164+
BusValue::constant(0), // addr_hi = 0
165+
old_ts.clone(), // ts_lo = old_ts
166+
BusValue::constant(0), // ts_hi = 0
167+
val_lo.clone(), // value = val_lo
168168
],
169169
));
170170

@@ -173,12 +173,12 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
173173
BusId::Memory,
174174
Multiplicity::One,
175175
vec![
176-
BusValue::constant(1), // is_register = 1
177-
addr_w1.clone(), // addr_lo = 2 * reg_idx + 1
178-
BusValue::constant(0), // addr_hi = 0
179-
old_ts, // ts_lo = old_ts
180-
BusValue::constant(0), // ts_hi = 0
181-
val_hi.clone(), // value = val_hi
176+
BusValue::constant(1), // is_register = 1
177+
addr_w1.clone(), // addr_lo = 2 * reg_idx + 1
178+
BusValue::constant(0), // addr_hi = 0
179+
old_ts, // ts_lo = old_ts
180+
BusValue::constant(0), // ts_hi = 0
181+
val_hi.clone(), // value = val_hi
182182
],
183183
));
184184

@@ -187,12 +187,12 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
187187
BusId::Memory,
188188
Multiplicity::One,
189189
vec![
190-
BusValue::constant(1), // is_register = 1
191-
addr_w0, // addr_lo = 2 * reg_idx
192-
BusValue::constant(0), // addr_hi = 0
193-
new_ts.clone(), // ts_lo = new_ts
194-
BusValue::constant(0), // ts_hi = 0
195-
val_lo, // value = val_lo
190+
BusValue::constant(1), // is_register = 1
191+
addr_w0, // addr_lo = 2 * reg_idx
192+
BusValue::constant(0), // addr_hi = 0
193+
new_ts.clone(), // ts_lo = new_ts
194+
BusValue::constant(0), // ts_hi = 0
195+
val_lo, // value = val_lo
196196
],
197197
));
198198

@@ -201,12 +201,12 @@ pub fn bus_interactions() -> Vec<BusInteraction> {
201201
BusId::Memory,
202202
Multiplicity::One,
203203
vec![
204-
BusValue::constant(1), // is_register = 1
205-
addr_w1, // addr_lo = 2 * reg_idx + 1
206-
BusValue::constant(0), // addr_hi = 0
207-
new_ts, // ts_lo = new_ts
208-
BusValue::constant(0), // ts_hi = 0
209-
val_hi, // value = val_hi
204+
BusValue::constant(1), // is_register = 1
205+
addr_w1, // addr_lo = 2 * reg_idx + 1
206+
BusValue::constant(0), // addr_hi = 0
207+
new_ts, // ts_lo = new_ts
208+
BusValue::constant(0), // ts_hi = 0
209+
val_hi, // value = val_hi
210210
],
211211
));
212212

prover/src/tables/trace_builder.rs

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,8 +1891,15 @@ impl Traces {
18911891
// Initialize memory state from ELF so first accesses get correct old_value.
18921892
let mut memory_state = MemoryState::from_elf(elf);
18931893
let mut register_state = RegisterState::new(elf.entry_point);
1894-
let (mut memw_ops, load_ops, mut lt_ops, shift_ops, mut bitwise_ops, commit_ops, reload_ops) =
1895-
collect_ops_from_cpu(&mut cpu_ops, &mut memory_state, &mut register_state);
1894+
let (
1895+
mut memw_ops,
1896+
load_ops,
1897+
mut lt_ops,
1898+
shift_ops,
1899+
mut bitwise_ops,
1900+
commit_ops,
1901+
reload_ops,
1902+
) = collect_ops_from_cpu(&mut cpu_ops, &mut memory_state, &mut register_state);
18961903

18971904
// HALT finalization: 33 register MEMW operations at timestamp u64::MAX.
18981905
// Must come before Phase 3 (LT from MEMW) so HALT ops get timestamp checks.
@@ -2134,8 +2141,15 @@ impl Traces {
21342141
// Entry point = first instruction's PC (start of execution)
21352142
let entry_point = cpu_ops.first().map_or(0, |op| op.decode.pc);
21362143
let mut register_state = RegisterState::new(entry_point);
2137-
let (mut memw_ops, load_ops, mut lt_ops, shift_ops, mut bitwise_ops, commit_ops, reload_ops) =
2138-
collect_ops_from_cpu(&mut cpu_ops, &mut memory_state, &mut register_state);
2144+
let (
2145+
mut memw_ops,
2146+
load_ops,
2147+
mut lt_ops,
2148+
shift_ops,
2149+
mut bitwise_ops,
2150+
commit_ops,
2151+
reload_ops,
2152+
) = collect_ops_from_cpu(&mut cpu_ops, &mut memory_state, &mut register_state);
21392153

21402154
// HALT finalization: 33 register MEMW operations at timestamp u64::MAX.
21412155
// Must come before Phase 3 (LT from MEMW) so HALT ops get timestamp checks.
@@ -2270,8 +2284,7 @@ impl Traces {
22702284
let dvrms = chunk_and_generate(&dvrm_ops, max_rows.dvrm, dvrm::generate_dvrm_trace);
22712285
let branches =
22722286
chunk_and_generate(&branch_ops, max_rows.branch, branch::generate_branch_trace);
2273-
let register_reload_trace =
2274-
register_reload::generate_register_reload_trace(&reload_ops);
2287+
let register_reload_trace = register_reload::generate_register_reload_trace(&reload_ops);
22752288

22762289
let mut bitwise = bitwise::generate_bitwise_trace();
22772290
bitwise::update_multiplicities(&mut bitwise, &bitwise_ops);
@@ -2385,4 +2398,3 @@ impl Traces {
23852398
Self::from_logs_trimmed(logs, instructions, max_rows)
23862399
}
23872400
}
2388-

0 commit comments

Comments
 (0)