Skip to content

Commit f83d10a

Browse files
authored
Merge branch 'main' into feat/continuation-precomputed-commitments
2 parents 0f66dd2 + 2baad17 commit f83d10a

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

executor/src/vm/memory.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ pub type U64HashMap<V> = HashMap<u64, V, U64BuildHasher>;
4242
/// The COMMIT AIR concatenates calls via the running `x254` index, so this
4343
/// is enforced as a running-total budget rather than a per-call limit.
4444
pub const MAX_PUBLIC_OUTPUT_TOTAL_SIZE: u64 = 1024 * 1024;
45-
/// Maximum size of the private input memory region (in bytes). 64 MiB so that a
46-
/// whole `VmProof` can be passed as private input to a verifier guest (naive
47-
/// recursion).
48-
pub const MAX_PRIVATE_INPUT_SIZE: u64 = 64 * 1024 * 1024;
45+
/// Maximum size of the private input memory region (in bytes). 512 MiB so a
46+
/// real proof (e.g. a continuation bundle) fits as private input.
47+
pub const MAX_PRIVATE_INPUT_SIZE: u64 = 512 * 1024 * 1024;
4948
/// Fixed high address where private input is mapped. Guest programs can read
5049
/// directly from this address (ZisK-style memory-mapped input).
5150
/// Layout: 4-byte LE length prefix at `PRIVATE_INPUT_START_INDEX`, then data at +4.

executor/tests/flamegraph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ fn test_run_with_flamegraph_returns_generator_on_executor_new_failure() {
892892
// even on failure.
893893
let elf_bytes = std::fs::read("./program_artifacts/rust/add.elf").unwrap();
894894
let program = executor::elf::Elf::load(&elf_bytes).unwrap();
895-
let oversized_input = vec![0u8; 64 * 1024 * 1024 + 1];
895+
let oversized_input = vec![0u8; executor::vm::memory::MAX_PRIVATE_INPUT_SIZE as usize + 1];
896896

897897
let (generator, result) = executor::flamegraph::run_with_flamegraph(
898898
&elf_bytes,

prover/src/continuation.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,16 +1675,16 @@ mod tests {
16751675

16761676
// The deserialized-count bound is the tight honest max: exactly the pages a MAX-size
16771677
// input occupies, with no slack. Pin the value and the tightness (checked via the byte
1678-
// span so we don't allocate a 64 MiB test input).
1678+
// span so we don't allocate a 512 MiB test input).
16791679
#[test]
16801680
fn test_max_private_input_pages_is_tight() {
16811681
use executor::vm::memory::{MAX_PRIVATE_INPUT_SIZE, PRIVATE_INPUT_LENGTH_PREFIX_BYTES};
16821682
let page_size = page::DEFAULT_PAGE_SIZE;
16831683
let max = page::max_private_input_pages();
16841684

1685-
// (64 MiB + 4-byte prefix) / 256 KiB page = 257 pages (256 full data pages plus
1685+
// (512 MiB + 4-byte prefix) / 256 KiB page = 2049 pages (2048 full data pages plus
16861686
// the one page the length prefix spills into). Pinned so a size/page change is caught.
1687-
assert_eq!(max, 257);
1687+
assert_eq!(max, 2049);
16881688

16891689
// No slack: an honest MAX-size input needs the whole last page (the bound is not
16901690
// padded), and never overflows into an extra one.

prover/src/tests/prove_elfs_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2818,7 +2818,7 @@ fn test_verify_rejects_num_private_input_pages_exceeds_max() {
28182818
let vm_proof = crate::prove_with_inputs(&elf_bytes, &input).expect("prove should succeed");
28192819

28202820
let tampered = crate::VmProof {
2821-
num_private_input_pages: 1000,
2821+
num_private_input_pages: crate::tables::page::max_private_input_pages() + 1,
28222822
..vm_proof
28232823
};
28242824

syscalls/src/syscalls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ use core::arch::asm;
88
#[cfg(target_arch = "riscv64")]
99
pub const PRIVATE_INPUT_START: usize = 0xFF000000;
1010

11-
/// Maximum private-input length the guest will read, in bytes (64 MiB).
11+
/// Maximum private-input length the guest will read, in bytes (512 MiB).
1212
/// The host caps stored input at this size in `Memory::store_private_inputs`,
1313
/// so an honest length prefix is always `<=` this bound; a larger value can only
1414
/// come from a malformed or forged prefix. The reader clamps to this cap so a
1515
/// bogus length can never make the guest fabricate an arbitrarily long slice.
1616
/// Must match `executor::vm::memory::MAX_PRIVATE_INPUT_SIZE`.
1717
#[cfg(target_arch = "riscv64")]
18-
const MAX_PRIVATE_INPUT_SIZE: usize = 64 * 1024 * 1024;
18+
const MAX_PRIVATE_INPUT_SIZE: usize = 512 * 1024 * 1024;
1919

2020
#[cfg(target_arch = "riscv64")]
2121
pub enum SyscallNumbers {

0 commit comments

Comments
 (0)