diff --git a/circuit_defs/final_reduced_risc_v_machine/generated/layout b/circuit_defs/final_reduced_risc_v_machine/generated/layout index 6a8c6260d..a36b31832 100644 --- a/circuit_defs/final_reduced_risc_v_machine/generated/layout +++ b/circuit_defs/final_reduced_risc_v_machine/generated/layout @@ -7090,43 +7090,43 @@ 659585, 659713, 725249, - 1249537, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937 + 1773825, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225 ], - "total_tables_size": 5447937 + "total_tables_size": 5972225 } \ No newline at end of file diff --git a/circuit_defs/final_reduced_risc_v_machine/generated/witness_generation_fn.cuh b/circuit_defs/final_reduced_risc_v_machine/generated/witness_generation_fn.cuh index c364e0988..79e79a57e 100644 --- a/circuit_defs/final_reduced_risc_v_machine/generated/witness_generation_fn.cuh +++ b/circuit_defs/final_reduced_risc_v_machine/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/circuit_defs/final_reduced_risc_v_machine/src/lib.rs b/circuit_defs/final_reduced_risc_v_machine/src/lib.rs index 77238c56d..034b78d5f 100644 --- a/circuit_defs/final_reduced_risc_v_machine/src/lib.rs +++ b/circuit_defs/final_reduced_risc_v_machine/src/lib.rs @@ -14,7 +14,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; pub const ALLOWED_DELEGATION_CSRS: &[u32] = diff --git a/circuit_defs/machine_without_signed_mul_div/generated/layout b/circuit_defs/machine_without_signed_mul_div/generated/layout index 6e692397b..62e144f2a 100644 --- a/circuit_defs/machine_without_signed_mul_div/generated/layout +++ b/circuit_defs/machine_without_signed_mul_div/generated/layout @@ -9261,43 +9261,43 @@ 659585, 659713, 725249, - 1249537, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 5447937, - 5447937, - 6496513, - 6627585, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657 + 1773825, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 5972225, + 5972225, + 7020801, + 7151873, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945 ], - "total_tables_size": 6758657 + "total_tables_size": 7282945 } \ No newline at end of file diff --git a/circuit_defs/machine_without_signed_mul_div/generated/witness_generation_fn.cuh b/circuit_defs/machine_without_signed_mul_div/generated/witness_generation_fn.cuh index ac5553e86..84454e3b7 100644 --- a/circuit_defs/machine_without_signed_mul_div/generated/witness_generation_fn.cuh +++ b/circuit_defs/machine_without_signed_mul_div/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 6496513, 6627585, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 7020801, 7151873, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/circuit_defs/machine_without_signed_mul_div/src/lib.rs b/circuit_defs/machine_without_signed_mul_div/src/lib.rs index f11eee17c..719a0e8be 100644 --- a/circuit_defs/machine_without_signed_mul_div/src/lib.rs +++ b/circuit_defs/machine_without_signed_mul_div/src/lib.rs @@ -14,7 +14,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; pub const ALLOWED_DELEGATION_CSRS: &[u32] = diff --git a/circuit_defs/reduced_risc_v_log_23_machine/generated/layout b/circuit_defs/reduced_risc_v_log_23_machine/generated/layout index ab6433c90..98646ba6f 100644 --- a/circuit_defs/reduced_risc_v_log_23_machine/generated/layout +++ b/circuit_defs/reduced_risc_v_log_23_machine/generated/layout @@ -7090,43 +7090,43 @@ 659585, 659713, 725249, - 1249537, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937 + 1773825, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225 ], - "total_tables_size": 5447937 + "total_tables_size": 5972225 } \ No newline at end of file diff --git a/circuit_defs/reduced_risc_v_log_23_machine/generated/witness_generation_fn.cuh b/circuit_defs/reduced_risc_v_log_23_machine/generated/witness_generation_fn.cuh index c364e0988..79e79a57e 100644 --- a/circuit_defs/reduced_risc_v_log_23_machine/generated/witness_generation_fn.cuh +++ b/circuit_defs/reduced_risc_v_log_23_machine/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/circuit_defs/reduced_risc_v_log_23_machine/src/lib.rs b/circuit_defs/reduced_risc_v_log_23_machine/src/lib.rs index ff68bebde..0158d255e 100644 --- a/circuit_defs/reduced_risc_v_log_23_machine/src/lib.rs +++ b/circuit_defs/reduced_risc_v_log_23_machine/src/lib.rs @@ -14,7 +14,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; pub const ALLOWED_DELEGATION_CSRS: &[u32] = diff --git a/circuit_defs/reduced_risc_v_machine/generated/layout b/circuit_defs/reduced_risc_v_machine/generated/layout index 3873943dc..2662c7807 100644 --- a/circuit_defs/reduced_risc_v_machine/generated/layout +++ b/circuit_defs/reduced_risc_v_machine/generated/layout @@ -7090,43 +7090,43 @@ 659585, 659713, 725249, - 1249537, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937, - 5447937 + 1773825, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225, + 5972225 ], - "total_tables_size": 5447937 + "total_tables_size": 5972225 } \ No newline at end of file diff --git a/circuit_defs/reduced_risc_v_machine/generated/witness_generation_fn.cuh b/circuit_defs/reduced_risc_v_machine/generated/witness_generation_fn.cuh index 9f5ebcd43..2d80ee193 100644 --- a/circuit_defs/reduced_risc_v_machine/generated/witness_generation_fn.cuh +++ b/circuit_defs/reduced_risc_v_machine/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/circuit_defs/reduced_risc_v_machine/src/lib.rs b/circuit_defs/reduced_risc_v_machine/src/lib.rs index 42c4cb66a..fc4317c54 100644 --- a/circuit_defs/reduced_risc_v_machine/src/lib.rs +++ b/circuit_defs/reduced_risc_v_machine/src/lib.rs @@ -14,7 +14,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; pub const ALLOWED_DELEGATION_CSRS: &[u32] = diff --git a/circuit_defs/risc_v_cycles/generated/layout b/circuit_defs/risc_v_cycles/generated/layout index 7af2c96c4..13e7e8568 100644 --- a/circuit_defs/risc_v_cycles/generated/layout +++ b/circuit_defs/risc_v_cycles/generated/layout @@ -10369,43 +10369,43 @@ 659585, 659713, 725249, - 1249537, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 1253633, - 5447937, - 5447937, - 6496513, - 6627585, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657, - 6758657 + 1773825, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 1777921, + 5972225, + 5972225, + 7020801, + 7151873, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945, + 7282945 ], - "total_tables_size": 6758657 + "total_tables_size": 7282945 } \ No newline at end of file diff --git a/circuit_defs/risc_v_cycles/generated/witness_generation_fn.cuh b/circuit_defs/risc_v_cycles/generated/witness_generation_fn.cuh index 34bc9fdf4..63e79b633 100644 --- a/circuit_defs/risc_v_cycles/generated/witness_generation_fn.cuh +++ b/circuit_defs/risc_v_cycles/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 6496513, 6627585, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 7020801, 7151873, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/circuit_defs/risc_v_cycles/src/lib.rs b/circuit_defs/risc_v_cycles/src/lib.rs index d80edbfa0..9496f8e41 100644 --- a/circuit_defs/risc_v_cycles/src/lib.rs +++ b/circuit_defs/risc_v_cycles/src/lib.rs @@ -14,7 +14,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; pub const ALLOWED_DELEGATION_CSRS: &[u32] = diff --git a/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/generated/layout b/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/generated/layout index 11eb75b7d..954bb6c3b 100644 --- a/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/generated/layout +++ b/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/generated/layout @@ -1999,7 +1999,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 27 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, diff --git a/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/src/lib.rs b/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/src/lib.rs index b69639990..44cd78560 100644 --- a/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/src/lib.rs +++ b/circuit_defs/unrolled_circuits/add_sub_lui_auipc_mop/src/lib.rs @@ -21,7 +21,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; fn serialize_to_file(el: &T, filename: &str) { diff --git a/circuit_defs/unrolled_circuits/inits_and_teardowns/src/lib.rs b/circuit_defs/unrolled_circuits/inits_and_teardowns/src/lib.rs index 220eeebc5..0ac20634c 100644 --- a/circuit_defs/unrolled_circuits/inits_and_teardowns/src/lib.rs +++ b/circuit_defs/unrolled_circuits/inits_and_teardowns/src/lib.rs @@ -14,7 +14,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; fn serialize_to_file(el: &T, filename: &str) { diff --git a/circuit_defs/unrolled_circuits/jump_branch_slt/generated/layout b/circuit_defs/unrolled_circuits/jump_branch_slt/generated/layout index cc916ac53..795d60faf 100644 --- a/circuit_defs/unrolled_circuits/jump_branch_slt/generated/layout +++ b/circuit_defs/unrolled_circuits/jump_branch_slt/generated/layout @@ -1649,7 +1649,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 27 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, diff --git a/circuit_defs/unrolled_circuits/jump_branch_slt/src/lib.rs b/circuit_defs/unrolled_circuits/jump_branch_slt/src/lib.rs index 14b9360c4..dcb13574c 100644 --- a/circuit_defs/unrolled_circuits/jump_branch_slt/src/lib.rs +++ b/circuit_defs/unrolled_circuits/jump_branch_slt/src/lib.rs @@ -19,7 +19,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; fn serialize_to_file(el: &T, filename: &str) { diff --git a/circuit_defs/unrolled_circuits/load_store_subword_only/generated/layout b/circuit_defs/unrolled_circuits/load_store_subword_only/generated/layout index b87f1678b..a89df41b3 100644 --- a/circuit_defs/unrolled_circuits/load_store_subword_only/generated/layout +++ b/circuit_defs/unrolled_circuits/load_store_subword_only/generated/layout @@ -2681,7 +2681,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 20 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, @@ -2731,21 +2731,21 @@ 65537, 2162689, 4259841, - 4784129, - 4784129, - 4784129, - 4784129, - 4784129, - 4784129, - 4784129, - 4784129, - 6881281, - 8978433, - 8978433, - 8978433, - 8978433, - 8978433, - 8978433 + 5308417, + 5308417, + 5308417, + 5308417, + 5308417, + 5308417, + 5308417, + 5308417, + 7405569, + 9502721, + 9502721, + 9502721, + 9502721, + 9502721, + 9502721 ], - "total_tables_size": 8978433 + "total_tables_size": 9502721 } \ No newline at end of file diff --git a/circuit_defs/unrolled_circuits/load_store_subword_only/generated/witness_generation_fn.cuh b/circuit_defs/unrolled_circuits/load_store_subword_only/generated/witness_generation_fn.cuh index df8e9cfb1..ea7cb1042 100644 --- a/circuit_defs/unrolled_circuits/load_store_subword_only/generated/witness_generation_fn.cuh +++ b/circuit_defs/unrolled_circuits/load_store_subword_only/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 2162689, 4259841, 4784129, 4784129, 4784129, 4784129, 4784129, 4784129, 4784129, 4784129, 6881281, 8978433, 8978433, 8978433, 8978433, 8978433, 8978433) +LOOKUP_TABLE_OFFSETS(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 65537, 2162689, 4259841, 5308417, 5308417, 5308417, 5308417, 5308417, 5308417, 5308417, 5308417, 7405569, 9502721, 9502721, 9502721, 9502721, 9502721, 9502721) FN_BEGIN(2) GET_WITNESS_PLACE(u16, 0, 3) diff --git a/circuit_defs/unrolled_circuits/load_store_subword_only/src/lib.rs b/circuit_defs/unrolled_circuits/load_store_subword_only/src/lib.rs index 64fe982a6..88e5cf448 100644 --- a/circuit_defs/unrolled_circuits/load_store_subword_only/src/lib.rs +++ b/circuit_defs/unrolled_circuits/load_store_subword_only/src/lib.rs @@ -22,7 +22,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; fn serialize_to_file(el: &T, filename: &str) { diff --git a/circuit_defs/unrolled_circuits/load_store_word_only/generated/layout b/circuit_defs/unrolled_circuits/load_store_word_only/generated/layout index 8ae7b01a9..f500934b2 100644 --- a/circuit_defs/unrolled_circuits/load_store_word_only/generated/layout +++ b/circuit_defs/unrolled_circuits/load_store_word_only/generated/layout @@ -1705,7 +1705,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 18 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, @@ -1733,43 +1733,43 @@ 1, 1, 65537, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825, - 589825 + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113, + 1114113 ], - "total_tables_size": 589825 + "total_tables_size": 1114113 } \ No newline at end of file diff --git a/circuit_defs/unrolled_circuits/load_store_word_only/generated/witness_generation_fn.cuh b/circuit_defs/unrolled_circuits/load_store_word_only/generated/witness_generation_fn.cuh index 4ea5f9340..9ba6791e2 100644 --- a/circuit_defs/unrolled_circuits/load_store_word_only/generated/witness_generation_fn.cuh +++ b/circuit_defs/unrolled_circuits/load_store_word_only/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 65537, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825, 589825) +LOOKUP_TABLE_OFFSETS(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 65537, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113, 1114113) FN_BEGIN(2) GET_WITNESS_PLACE(u16, 0, 3) diff --git a/circuit_defs/unrolled_circuits/load_store_word_only/src/lib.rs b/circuit_defs/unrolled_circuits/load_store_word_only/src/lib.rs index 9ce95843e..7831b4176 100644 --- a/circuit_defs/unrolled_circuits/load_store_word_only/src/lib.rs +++ b/circuit_defs/unrolled_circuits/load_store_word_only/src/lib.rs @@ -22,7 +22,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; fn serialize_to_file(el: &T, filename: &str) { diff --git a/circuit_defs/unrolled_circuits/mul_div/generated/layout b/circuit_defs/unrolled_circuits/mul_div/generated/layout index 86863554e..8b96f0538 100644 --- a/circuit_defs/unrolled_circuits/mul_div/generated/layout +++ b/circuit_defs/unrolled_circuits/mul_div/generated/layout @@ -3424,7 +3424,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 51 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, diff --git a/circuit_defs/unrolled_circuits/mul_div/src/lib.rs b/circuit_defs/unrolled_circuits/mul_div/src/lib.rs index 4def5da96..cc38c666a 100644 --- a/circuit_defs/unrolled_circuits/mul_div/src/lib.rs +++ b/circuit_defs/unrolled_circuits/mul_div/src/lib.rs @@ -21,7 +21,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; const SUPPORT_SIGNED: bool = true; diff --git a/circuit_defs/unrolled_circuits/mul_div_unsigned/generated/layout b/circuit_defs/unrolled_circuits/mul_div_unsigned/generated/layout index 602a412e2..8b75aa3ac 100644 --- a/circuit_defs/unrolled_circuits/mul_div_unsigned/generated/layout +++ b/circuit_defs/unrolled_circuits/mul_div_unsigned/generated/layout @@ -2421,7 +2421,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 38 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, diff --git a/circuit_defs/unrolled_circuits/mul_div_unsigned/src/lib.rs b/circuit_defs/unrolled_circuits/mul_div_unsigned/src/lib.rs index 32e11e40a..a0a8cf91f 100644 --- a/circuit_defs/unrolled_circuits/mul_div_unsigned/src/lib.rs +++ b/circuit_defs/unrolled_circuits/mul_div_unsigned/src/lib.rs @@ -21,7 +21,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; const SUPPORT_SIGNED: bool = false; diff --git a/circuit_defs/unrolled_circuits/shift_binary_csr/generated/layout b/circuit_defs/unrolled_circuits/shift_binary_csr/generated/layout index 2931b3ed6..cc39635e7 100644 --- a/circuit_defs/unrolled_circuits/shift_binary_csr/generated/layout +++ b/circuit_defs/unrolled_circuits/shift_binary_csr/generated/layout @@ -2651,7 +2651,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 20 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 16777216, "table_offsets": [ 0, diff --git a/circuit_defs/unrolled_circuits/shift_binary_csr/src/lib.rs b/circuit_defs/unrolled_circuits/shift_binary_csr/src/lib.rs index 4257f0cc2..407f3846e 100644 --- a/circuit_defs/unrolled_circuits/shift_binary_csr/src/lib.rs +++ b/circuit_defs/unrolled_circuits/shift_binary_csr/src/lib.rs @@ -25,7 +25,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; pub const ALLOWED_DELEGATION_CSRS: &[u32] = &[ diff --git a/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/layout b/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/layout index 8b19a5c5a..3cc556a8b 100644 --- a/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/layout +++ b/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/layout @@ -5477,7 +5477,7 @@ "executor_family_circuit_next_timestamp_aux_var": { "WitnessSubtree": 49 }, - "executor_family_decoder_table_size": 524288, + "executor_family_decoder_table_size": 1048576, "trace_len": 8388608, "table_offsets": [ 0, @@ -5505,43 +5505,43 @@ 393345, 393473, 459009, - 983297, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 987393, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697, - 5181697 + 1507585, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 1511681, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985, + 5705985 ], - "total_tables_size": 5181697 + "total_tables_size": 5705985 } \ No newline at end of file diff --git a/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/witness_generation_fn.cuh b/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/witness_generation_fn.cuh index 2c28c8437..c14f446f0 100644 --- a/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/witness_generation_fn.cuh +++ b/circuit_defs/unrolled_circuits/unified_reduced_machine/generated/witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 1, 1, 1, 65537, 65537, 131073, 196609, 196609, 196609, 196609, 196609, 196609, 196609, 196609, 196609, 262145, 327681, 393217, 393217, 393345, 393345, 393473, 459009, 983297, 987393, 987393, 987393, 987393, 987393, 987393, 987393, 987393, 987393, 987393, 987393, 987393, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697, 5181697) +LOOKUP_TABLE_OFFSETS(0, 1, 1, 1, 1, 65537, 65537, 131073, 196609, 196609, 196609, 196609, 196609, 196609, 196609, 196609, 196609, 262145, 327681, 393217, 393217, 393345, 393345, 393473, 459009, 1507585, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 1511681, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985, 5705985) FN_BEGIN(1) GET_WITNESS_PLACE(f, 0, 6) diff --git a/circuit_defs/unrolled_circuits/unified_reduced_machine/src/lib.rs b/circuit_defs/unrolled_circuits/unified_reduced_machine/src/lib.rs index e8787f0fb..3c3aa3a8e 100644 --- a/circuit_defs/unrolled_circuits/unified_reduced_machine/src/lib.rs +++ b/circuit_defs/unrolled_circuits/unified_reduced_machine/src/lib.rs @@ -20,7 +20,7 @@ pub const NUM_CYCLES: usize = DOMAIN_SIZE - 1; pub const LDE_FACTOR: usize = 2; pub const LDE_SOURCE_COSETS: &[usize] = &[0, 1]; pub const TREE_CAP_SIZE: usize = 32; -pub const MAX_ROM_SIZE: usize = 1 << 21; // bytes +pub const MAX_ROM_SIZE: usize = 1 << 22; // bytes pub const ROM_ADDRESS_SPACE_SECOND_WORD_BITS: usize = (MAX_ROM_SIZE.trailing_zeros() - 16) as usize; fn serialize_to_file(el: &T, filename: &str) { diff --git a/examples/scripts/lds/memory.x b/examples/scripts/lds/memory.x index 482a4ef30..465b478fa 100644 --- a/examples/scripts/lds/memory.x +++ b/examples/scripts/lds/memory.x @@ -1,7 +1,7 @@ MEMORY { - ROM (rx): ORIGIN = 0, LENGTH = 2M - RAM (rwa!x) : ORIGIN = 2M, LENGTH = 1022M + ROM (rx): ORIGIN = 0, LENGTH = 4M + RAM (rwa!x) : ORIGIN = 4M, LENGTH = 1022M } REGION_ALIAS("REGION_TEXT", ROM); diff --git a/tools/cli/src/main.rs b/tools/cli/src/main.rs index b1dfd6cfa..bace05d5a 100644 --- a/tools/cli/src/main.rs +++ b/tools/cli/src/main.rs @@ -107,6 +107,14 @@ enum Commands { #[arg(long)] gpu: bool, }, + /// Prove data from multiple files in one go. + /// Mostly used for performance testing, so it has limited set of options for now. + MultiProve { + #[arg(short, long)] + bin: String, + #[arg(long)] + input_file: Vec, + }, /// Run the 'final' step of proving (for example on the output from ZKSmith) ProveFinal { // Either load data from the input file or from RPC @@ -310,6 +318,20 @@ fn main() { gpu.clone(), ); } + Commands::MultiProve { bin, input_file } => { + let mut all_inputs = vec![]; + for input in input_file { + let input_data = fs::read_to_string(input).unwrap().trim().to_string(); + let input_u32 = u32_from_hex_string(&input_data); + all_inputs.push(input_u32); + } + #[cfg(feature = "gpu")] + cli_lib::prover_utils::multi_prove(bin, all_inputs); + #[cfg(not(feature = "gpu"))] + { + panic!("MultiProve is only available with GPU feature enabled."); + } + } Commands::ProveFinal { input, output_dir, diff --git a/tools/cli/src/prover_utils.rs b/tools/cli/src/prover_utils.rs index 851be1701..fe821094a 100644 --- a/tools/cli/src/prover_utils.rs +++ b/tools/cli/src/prover_utils.rs @@ -58,6 +58,61 @@ pub fn u32_from_hex_string(hex_string: &str) -> Vec { numbers } +#[cfg(feature = "gpu")] +pub fn multi_prove(bin_path: &String, input_files: Vec>) { + let binary = load_binary_from_path(bin_path); + + // TODO: hardcoded for now. + let num_instances = 500; + // Let's use v23 circuits everywhere. + + let recursion_circuit_type = MainCircuitType::ReducedRiscVLog23Machine; + let mut gpu_state = Some(GpuSharedState::new(&binary, recursion_circuit_type)); + + let mut gpu_state = gpu_state.as_mut(); + + let mut final_results = vec![]; + + for (i, non_determinism_data) in input_files.into_iter().enumerate() { + let mut total_proof_time = Some(0f64); + + let (proof_list, proof_metadata) = create_proofs_internal( + &binary, + non_determinism_data, + &Machine::Standard, + num_instances, + None, + &mut gpu_state, + &mut total_proof_time, + ); + + let recursion_mode = RecursionStrategy::UseReducedLog23Machine; + + let (_recursion_proof_list, _recursion_proof_metadata) = + create_recursion_proofs_with_machine( + proof_list, + proof_metadata, + recursion_mode, + &None, + &Machine::ReducedLog23, + &mut gpu_state, + &mut total_proof_time, + ); + // Currently we don't store the final proofs (as this is mostly for performance testing). + println!( + "**** {} Total time on production critical path {:.3}s ****", + i, + total_proof_time.unwrap(), + ); + final_results.push(total_proof_time.unwrap()); + } + + println!("**** Multi-prove summary ****"); + for (i, time) in final_results.iter().enumerate() { + println!("Input {}: total proof time {:.3}s", i, time); + } +} + pub fn create_proofs( bin_path: &String, output_dir: &String, @@ -499,6 +554,26 @@ pub fn create_recursion_proofs( tmp_dir: &Option, gpu_shared_state: &mut Option<&mut GpuSharedState>, total_proof_time: &mut Option, +) -> (ProofList, ProofMetadata) { + create_recursion_proofs_with_machine( + proof_list, + proof_metadata, + recursion_mode, + tmp_dir, + &Machine::Reduced, + gpu_shared_state, + total_proof_time, + ) +} + +pub fn create_recursion_proofs_with_machine( + proof_list: ProofList, + proof_metadata: ProofMetadata, + recursion_mode: RecursionStrategy, + tmp_dir: &Option, + machine: &Machine, + gpu_shared_state: &mut Option<&mut GpuSharedState>, + total_proof_time: &mut Option, ) -> (ProofList, ProofMetadata) { assert!( proof_metadata.basic_proof_count > 0, @@ -525,7 +600,7 @@ pub fn create_recursion_proofs( (current_proof_list, current_proof_metadata) = create_proofs_internal( &binary, non_determinism_data, - &Machine::Reduced, + machine, current_proof_metadata.total_proofs(), Some(current_proof_metadata.create_prev_metadata()), gpu_shared_state, diff --git a/tools/generator/output/final_reduced_risc_v_machine_witness_generation_fn.cuh b/tools/generator/output/final_reduced_risc_v_machine_witness_generation_fn.cuh index c364e0988..79e79a57e 100644 --- a/tools/generator/output/final_reduced_risc_v_machine_witness_generation_fn.cuh +++ b/tools/generator/output/final_reduced_risc_v_machine_witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/tools/generator/output/machine_without_signed_mul_div_witness_generation_fn.cuh b/tools/generator/output/machine_without_signed_mul_div_witness_generation_fn.cuh index ac5553e86..84454e3b7 100644 --- a/tools/generator/output/machine_without_signed_mul_div_witness_generation_fn.cuh +++ b/tools/generator/output/machine_without_signed_mul_div_witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 6496513, 6627585, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 7020801, 7151873, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/tools/generator/output/reduced_risc_v_log_23_machine_witness_generation_fn.cuh b/tools/generator/output/reduced_risc_v_log_23_machine_witness_generation_fn.cuh index c364e0988..79e79a57e 100644 --- a/tools/generator/output/reduced_risc_v_log_23_machine_witness_generation_fn.cuh +++ b/tools/generator/output/reduced_risc_v_log_23_machine_witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/tools/generator/output/reduced_risc_v_machine_witness_generation_fn.cuh b/tools/generator/output/reduced_risc_v_machine_witness_generation_fn.cuh index 9f5ebcd43..2d80ee193 100644 --- a/tools/generator/output/reduced_risc_v_machine_witness_generation_fn.cuh +++ b/tools/generator/output/reduced_risc_v_machine_witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937, 5447937) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225, 5972225) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/tools/generator/output/risc_v_cycles_witness_generation_fn.cuh b/tools/generator/output/risc_v_cycles_witness_generation_fn.cuh index 34bc9fdf4..63e79b633 100644 --- a/tools/generator/output/risc_v_cycles_witness_generation_fn.cuh +++ b/tools/generator/output/risc_v_cycles_witness_generation_fn.cuh @@ -1,4 +1,4 @@ -LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1249537, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 1253633, 5447937, 5447937, 6496513, 6627585, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657, 6758657) +LOOKUP_TABLE_OFFSETS(0, 1, 131073, 131073, 131073, 196609, 196609, 262145, 327681, 393217, 393217, 393217, 397313, 462849, 462849, 462849, 462849, 528385, 593921, 659457, 659457, 659585, 659585, 659713, 725249, 1773825, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 1777921, 5972225, 5972225, 7020801, 7151873, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945, 7282945) FN_BEGIN(0) GET_ORACLE_VALUE(u32, 0, { PcInit }) diff --git a/tools/verifier/src/lds/memory.x b/tools/verifier/src/lds/memory.x index 482a4ef30..465b478fa 100644 --- a/tools/verifier/src/lds/memory.x +++ b/tools/verifier/src/lds/memory.x @@ -1,7 +1,7 @@ MEMORY { - ROM (rx): ORIGIN = 0, LENGTH = 2M - RAM (rwa!x) : ORIGIN = 2M, LENGTH = 1022M + ROM (rx): ORIGIN = 0, LENGTH = 4M + RAM (rwa!x) : ORIGIN = 4M, LENGTH = 1022M } REGION_ALIAS("REGION_TEXT", ROM); diff --git a/tools/verifier/universal.bin b/tools/verifier/universal.bin index 9a059edb2..5d516bc7f 100755 Binary files a/tools/verifier/universal.bin and b/tools/verifier/universal.bin differ