diff --git a/stwo_cairo_prover/crates/prover/src/input/builtin_segments.rs b/stwo_cairo_prover/crates/prover/src/input/builtin_segments.rs new file mode 100644 index 00000000..17118a89 --- /dev/null +++ b/stwo_cairo_prover/crates/prover/src/input/builtin_segments.rs @@ -0,0 +1,84 @@ +use std::collections::HashMap; + +use cairo_vm::air_public_input::MemorySegmentAddresses; +use cairo_vm::types::builtin_name::BuiltinName; + +/// This struct holds the builtins used in a Cairo program. +#[derive(Debug, Default)] +pub struct BuiltinSegments { + pub range_check_bits_128: Option, + pub pedersen: Option, + pub ecdsa: Option, + pub keccak: Option, + pub bitwise: Option, + pub ec_op: Option, + pub poseidon: Option, + pub range_check_bits_96: Option, + pub add_mod: Option, + pub mul_mod: Option, +} + +impl BuiltinSegments { + /// Creates a new `BuiltinSegments` struct from a map of memory segment names to addresses. + pub fn from_memory_segments(memory_segments: &HashMap<&str, MemorySegmentAddresses>) -> Self { + let mut res = BuiltinSegments::default(); + for (name, value) in memory_segments.iter() { + if let Some(builtin) = BuiltinName::from_str(name) { + let segments = if value.begin_addr == value.stop_ptr { + None + } else { + Some((value.begin_addr, value.stop_ptr).into()) + }; + match builtin { + BuiltinName::range_check => res.range_check_bits_128 = segments, + BuiltinName::pedersen => res.pedersen = segments, + BuiltinName::ecdsa => res.ecdsa = segments, + BuiltinName::keccak => res.keccak = segments, + BuiltinName::bitwise => res.bitwise = segments, + BuiltinName::ec_op => res.ec_op = segments, + BuiltinName::poseidon => res.poseidon = segments, + BuiltinName::range_check96 => res.range_check_bits_96 = segments, + BuiltinName::add_mod => res.add_mod = segments, + BuiltinName::mul_mod => res.mul_mod = segments, + // Not builtins. + BuiltinName::output | BuiltinName::segment_arena => {} + } + }; + } + res + } +} + +#[cfg(test)] +mod test_builtin_segments { + use std::path::PathBuf; + + use cairo_vm::air_public_input::PublicInput; + + use crate::input::BuiltinSegments; + + // TODO(Stav): move read json to be a unit function + #[test] + fn test_builtin_segments() { + let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + path.push("src/input/test_builtins_segments/blake2s_felts_public_input.json"); + let pub_data_string = std::fs::read_to_string(&path) + .unwrap_or_else(|_| panic!("Unable to read file: {}", path.display())); + let pub_data: PublicInput<'_> = + sonic_rs::from_str(&pub_data_string).expect("Unable to parse JSON"); + let builtins_segments = BuiltinSegments::from_memory_segments(&pub_data.memory_segments); + assert_eq!( + builtins_segments.range_check_bits_128, + Some((7069, 7187).into()) + ); + assert_eq!(builtins_segments.pedersen, None); + assert_eq!(builtins_segments.ecdsa, None); + assert_eq!(builtins_segments.keccak, None); + assert_eq!(builtins_segments.bitwise, Some((23581, 23901).into())); + assert_eq!(builtins_segments.ec_op, None); + assert_eq!(builtins_segments.poseidon, None); + assert_eq!(builtins_segments.range_check_bits_96, None); + assert_eq!(builtins_segments.add_mod, None); + assert_eq!(builtins_segments.mul_mod, None); + } +} diff --git a/stwo_cairo_prover/crates/prover/src/input/mod.rs b/stwo_cairo_prover/crates/prover/src/input/mod.rs index be6994cf..cd3054e7 100644 --- a/stwo_cairo_prover/crates/prover/src/input/mod.rs +++ b/stwo_cairo_prover/crates/prover/src/input/mod.rs @@ -1,7 +1,8 @@ -use cairo_vm::air_public_input::MemorySegmentAddresses; +use builtin_segments::BuiltinSegments; use mem::Memory; use state_transitions::StateTransitions; +pub mod builtin_segments; mod decode; pub mod mem; pub mod plain; @@ -17,7 +18,5 @@ pub struct CairoInput { pub state_transitions: StateTransitions, pub mem: Memory, pub public_mem_addresses: Vec, - - // Builtins. - pub range_check_builtin: MemorySegmentAddresses, + pub builtins_segments: BuiltinSegments, } diff --git a/stwo_cairo_prover/crates/prover/src/input/plain.rs b/stwo_cairo_prover/crates/prover/src/input/plain.rs index 7f9b3d6e..25677b2c 100644 --- a/stwo_cairo_prover/crates/prover/src/input/plain.rs +++ b/stwo_cairo_prover/crates/prover/src/input/plain.rs @@ -9,8 +9,7 @@ use itertools::Itertools; use super::mem::{MemConfig, MemoryBuilder}; use super::state_transitions::StateTransitions; use super::vm_import::MemEntry; -use super::CairoInput; -use crate::input::MemorySegmentAddresses; +use super::{BuiltinSegments, CairoInput}; // TODO(Ohad): remove dev_mode after adding the rest of the opcodes. /// Translates a plain casm into a CairoInput by running the program and extracting the memory and @@ -71,6 +70,13 @@ pub fn input_from_finished_runner(runner: CairoRunner, dev_mode: bool) -> CairoI val: bytemuck::cast(v.to_bytes_le()), }) }); + + let memory_segments = &runner + .get_air_public_input() + .expect("Unable to get public input from the runner") + .memory_segments; + let builtins_segments = BuiltinSegments::from_memory_segments(memory_segments); + let trace = runner.relocated_trace.unwrap(); let trace = trace.iter().map(|t| t.clone().into()); @@ -84,9 +90,6 @@ pub fn input_from_finished_runner(runner: CairoRunner, dev_mode: bool) -> CairoI state_transitions, mem: mem.build(), public_mem_addresses, - range_check_builtin: MemorySegmentAddresses { - begin_addr: 24, - stop_ptr: 64, - }, + builtins_segments, } } diff --git a/stwo_cairo_prover/crates/prover/src/input/test_builtins_segments/blake2s_felts_public_input.json b/stwo_cairo_prover/crates/prover/src/input/test_builtins_segments/blake2s_felts_public_input.json new file mode 100644 index 00000000..1c3ea13e --- /dev/null +++ b/stwo_cairo_prover/crates/prover/src/input/test_builtins_segments/blake2s_felts_public_input.json @@ -0,0 +1,3036 @@ +{ + "_comment": "This file contains the AIR public input of the `blake2s_felts` Cairo program from `cairo-vm/cairo_programs`. It was generated by compiling this program in proof mode and running the VM with a specified path to output the AIR public inputs.", + "layout": "all_cairo", + "rc_min": 0, + "rc_max": 65535, + "n_steps": 131072, + "memory_segments": { + "program": { + "begin_addr": 1, + "stop_ptr": 5 + }, + "bitwise": { + "begin_addr": 23581, + "stop_ptr": 23901 + }, + "range_check96": { + "begin_addr": 69533, + "stop_ptr": 69533 + }, + "output": { + "begin_addr": 5533, + "stop_ptr": 5533 + }, + "pedersen": { + "begin_addr": 5533, + "stop_ptr": 5533 + }, + "execution": { + "begin_addr": 593, + "stop_ptr": 5533 + }, + "ecdsa": { + "begin_addr": 23453, + "stop_ptr": 23453 + }, + "ec_op": { + "begin_addr": 64541, + "stop_ptr": 64541 + }, + "poseidon": { + "begin_addr": 66461, + "stop_ptr": 66461 + }, + "range_check": { + "begin_addr": 7069, + "stop_ptr": 7187 + }, + "keccak": { + "begin_addr": 65437, + "stop_ptr": 65437 + } + }, + "public_memory": [ + { + "address": 1, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 2, + "value": "0x2", + "page": 0 + }, + { + "address": 3, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 4, + "value": "0x1f5", + "page": 0 + }, + { + "address": 5, + "value": "0x10780017fff7fff", + "page": 0 + }, + { + "address": 6, + "value": "0x0", + "page": 0 + }, + { + "address": 7, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 8, + "value": "0x1", + "page": 0 + }, + { + "address": 9, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 10, + "value": "0x400380007ffc7ffd", + "page": 0 + }, + { + "address": 11, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 12, + "value": "0x1", + "page": 0 + }, + { + "address": 13, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 14, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 15, + "value": "0x48297ffc80007ffd", + "page": 0 + }, + { + "address": 16, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 17, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffb", + "page": 0 + }, + { + "address": 18, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 19, + "value": "0x480280017ffc8000", + "page": 0 + }, + { + "address": 20, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 21, + "value": "0x100000000000000000000000000000000", + "page": 0 + }, + { + "address": 22, + "value": "0x480280007ffc8000", + "page": 0 + }, + { + "address": 23, + "value": "0x40317fff7ffe7ffd", + "page": 0 + }, + { + "address": 24, + "value": "0x480280017ffc8000", + "page": 0 + }, + { + "address": 25, + "value": "0x482480017fff8000", + "page": 0 + }, + { + "address": 26, + "value": "0x800000000000010fffffffffffffffff7ffffffffffffef0000000000000001", + "page": 0 + }, + { + "address": 27, + "value": "0x20680017fff7fff", + "page": 0 + }, + { + "address": 28, + "value": "0xb", + "page": 0 + }, + { + "address": 29, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 30, + "value": "0x2", + "page": 0 + }, + { + "address": 31, + "value": "0x480280007ffc8000", + "page": 0 + }, + { + "address": 32, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 33, + "value": "0x0", + "page": 0 + }, + { + "address": 34, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 35, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffed", + "page": 0 + }, + { + "address": 36, + "value": "0x10780017fff7fff", + "page": 0 + }, + { + "address": 37, + "value": "0x9", + "page": 0 + }, + { + "address": 38, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 39, + "value": "0x2", + "page": 0 + }, + { + "address": 40, + "value": "0x480280017ffc8000", + "page": 0 + }, + { + "address": 41, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 42, + "value": "0x800000000000010ffffffffffffffff", + "page": 0 + }, + { + "address": 43, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 44, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe4", + "page": 0 + }, + { + "address": 45, + "value": "0x480280017ffc8000", + "page": 0 + }, + { + "address": 46, + "value": "0x480280007ffc8000", + "page": 0 + }, + { + "address": 47, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 48, + "value": "0x480280007ffb8000", + "page": 0 + }, + { + "address": 49, + "value": "0x480280017ffb8000", + "page": 0 + }, + { + "address": 50, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 51, + "value": "0x2aaaaaaaaaaaab05555555555555556", + "page": 0 + }, + { + "address": 52, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 53, + "value": "0x480280027ffb8000", + "page": 0 + }, + { + "address": 54, + "value": "0x480280037ffb8000", + "page": 0 + }, + { + "address": 55, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 56, + "value": "0x4000000000000088000000000000001", + "page": 0 + }, + { + "address": 57, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 58, + "value": "0xa0680017fff8000", + "page": 0 + }, + { + "address": 59, + "value": "0xe", + "page": 0 + }, + { + "address": 60, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 61, + "value": "0x800000000000011000000000000000000000000000000000000000000000000", + "page": 0 + }, + { + "address": 62, + "value": "0x48287ffc80007fff", + "page": 0 + }, + { + "address": 63, + "value": "0x40307ffc7ff87fff", + "page": 0 + }, + { + "address": 64, + "value": "0x48297ffd80007ffc", + "page": 0 + }, + { + "address": 65, + "value": "0x482680017ffd8000", + "page": 0 + }, + { + "address": 66, + "value": "0x1", + "page": 0 + }, + { + "address": 67, + "value": "0x48507fff7ffe8000", + "page": 0 + }, + { + "address": 68, + "value": "0x40507ff97ff57fff", + "page": 0 + }, + { + "address": 69, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 70, + "value": "0x4", + "page": 0 + }, + { + "address": 71, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 72, + "value": "0xa0680017fff8000", + "page": 0 + }, + { + "address": 73, + "value": "0xc", + "page": 0 + }, + { + "address": 74, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 75, + "value": "0x800000000000011000000000000000000000000000000000000000000000000", + "page": 0 + }, + { + "address": 76, + "value": "0x48287ffd80007fff", + "page": 0 + }, + { + "address": 77, + "value": "0x48327fff7ffc8000", + "page": 0 + }, + { + "address": 78, + "value": "0x40307ffa7ff67fff", + "page": 0 + }, + { + "address": 79, + "value": "0x48527ffe7ffc8000", + "page": 0 + }, + { + "address": 80, + "value": "0x40507ff97ff57fff", + "page": 0 + }, + { + "address": 81, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 82, + "value": "0x4", + "page": 0 + }, + { + "address": 83, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 84, + "value": "0x40317ffd7ff97ffd", + "page": 0 + }, + { + "address": 85, + "value": "0x48297ffc80007ffd", + "page": 0 + }, + { + "address": 86, + "value": "0x48527fff7ffc8000", + "page": 0 + }, + { + "address": 87, + "value": "0x40507ffb7ff77fff", + "page": 0 + }, + { + "address": 88, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 89, + "value": "0x2", + "page": 0 + }, + { + "address": 90, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 91, + "value": "0x4", + "page": 0 + }, + { + "address": 92, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 93, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 94, + "value": "0x2", + "page": 0 + }, + { + "address": 95, + "value": "0x480280007ffb8000", + "page": 0 + }, + { + "address": 96, + "value": "0x482680017ffd8000", + "page": 0 + }, + { + "address": 97, + "value": "0x800000000000011000000000000000000000000000000000000000000000000", + "page": 0 + }, + { + "address": 98, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 99, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffad", + "page": 0 + }, + { + "address": 100, + "value": "0x480280017ffb8000", + "page": 0 + }, + { + "address": 101, + "value": "0x48487ffd7fff8000", + "page": 0 + }, + { + "address": 102, + "value": "0x480280007ffb8000", + "page": 0 + }, + { + "address": 103, + "value": "0x40317fff7ffe7ffc", + "page": 0 + }, + { + "address": 104, + "value": "0x48127ffc7fff8000", + "page": 0 + }, + { + "address": 105, + "value": "0x480280017ffb8000", + "page": 0 + }, + { + "address": 106, + "value": "0x480280007ffb8000", + "page": 0 + }, + { + "address": 107, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 108, + "value": "0xa0680017fff8000", + "page": 0 + }, + { + "address": 109, + "value": "0xa", + "page": 0 + }, + { + "address": 110, + "value": "0x400380007ffc7ffd", + "page": 0 + }, + { + "address": 111, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 112, + "value": "0x14", + "page": 0 + }, + { + "address": 113, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 114, + "value": "0x1", + "page": 0 + }, + { + "address": 115, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 116, + "value": "0x1", + "page": 0 + }, + { + "address": 117, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 118, + "value": "0xa0680017fff8000", + "page": 0 + }, + { + "address": 119, + "value": "0xe", + "page": 0 + }, + { + "address": 120, + "value": "0x484680017ffd8000", + "page": 0 + }, + { + "address": 121, + "value": "0x800000000000011000000000000000000000000000000000000000000000000", + "page": 0 + }, + { + "address": 122, + "value": "0x482480017fff8000", + "page": 0 + }, + { + "address": 123, + "value": "0x800000000000011000000000000000000000000000000000000000000000000", + "page": 0 + }, + { + "address": 124, + "value": "0x400280007ffc7fff", + "page": 0 + }, + { + "address": 125, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 126, + "value": "0x11", + "page": 0 + }, + { + "address": 127, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 128, + "value": "0x1", + "page": 0 + }, + { + "address": 129, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 130, + "value": "0x0", + "page": 0 + }, + { + "address": 131, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 132, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 133, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 134, + "value": "0x100000000000000000000000000000000", + "page": 0 + }, + { + "address": 135, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 136, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 137, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffa9", + "page": 0 + }, + { + "address": 138, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 139, + "value": "0x0", + "page": 0 + }, + { + "address": 140, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 141, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 142, + "value": "0x48297ffc80007ffd", + "page": 0 + }, + { + "address": 143, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 144, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffde", + "page": 0 + }, + { + "address": 145, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 146, + "value": "0x20780017fff7ffd", + "page": 0 + }, + { + "address": 147, + "value": "0x3", + "page": 0 + }, + { + "address": 148, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 149, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 150, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 151, + "value": "0x480080007fff8000", + "page": 0 + }, + { + "address": 152, + "value": "0x400080007ffd7fff", + "page": 0 + }, + { + "address": 153, + "value": "0x482480017ffd8001", + "page": 0 + }, + { + "address": 154, + "value": "0x1", + "page": 0 + }, + { + "address": 155, + "value": "0x482480017ffd8001", + "page": 0 + }, + { + "address": 156, + "value": "0x1", + "page": 0 + }, + { + "address": 157, + "value": "0xa0680017fff7ffe", + "page": 0 + }, + { + "address": 158, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffb", + "page": 0 + }, + { + "address": 159, + "value": "0x402a7ffc7ffd7fff", + "page": 0 + }, + { + "address": 160, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 161, + "value": "0x20780017fff7ffd", + "page": 0 + }, + { + "address": 162, + "value": "0x3", + "page": 0 + }, + { + "address": 163, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 164, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 165, + "value": "0x400180007fff7ffc", + "page": 0 + }, + { + "address": 166, + "value": "0x482480017fff8001", + "page": 0 + }, + { + "address": 167, + "value": "0x1", + "page": 0 + }, + { + "address": 168, + "value": "0xa0680017fff7fff", + "page": 0 + }, + { + "address": 169, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffe", + "page": 0 + }, + { + "address": 170, + "value": "0x402a7ffb7ffd7fff", + "page": 0 + }, + { + "address": 171, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 172, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 173, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 174, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 175, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 176, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 177, + "value": "0x1f", + "page": 0 + }, + { + "address": 178, + "value": "0x480080037fff8000", + "page": 0 + }, + { + "address": 179, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 180, + "value": "0x1000000000000000000000000", + "page": 0 + }, + { + "address": 181, + "value": "0x480080027ffd8000", + "page": 0 + }, + { + "address": 182, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 183, + "value": "0x10000000000000000", + "page": 0 + }, + { + "address": 184, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 185, + "value": "0x480080017ffa8000", + "page": 0 + }, + { + "address": 186, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 187, + "value": "0x100000000", + "page": 0 + }, + { + "address": 188, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 189, + "value": "0x480080007ff78000", + "page": 0 + }, + { + "address": 190, + "value": "0x480080077ff68000", + "page": 0 + }, + { + "address": 191, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 192, + "value": "0x1000000000000000000000000", + "page": 0 + }, + { + "address": 193, + "value": "0x480080067ff48000", + "page": 0 + }, + { + "address": 194, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 195, + "value": "0x10000000000000000", + "page": 0 + }, + { + "address": 196, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 197, + "value": "0x480080057ff18000", + "page": 0 + }, + { + "address": 198, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 199, + "value": "0x100000000", + "page": 0 + }, + { + "address": 200, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 201, + "value": "0x480080047fee8000", + "page": 0 + }, + { + "address": 202, + "value": "0x48127feb7fff8000", + "page": 0 + }, + { + "address": 203, + "value": "0x48127feb7fff8000", + "page": 0 + }, + { + "address": 204, + "value": "0x48307ff47ff38000", + "page": 0 + }, + { + "address": 205, + "value": "0x48307ffc7ffb8000", + "page": 0 + }, + { + "address": 206, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 207, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 208, + "value": "0x6b08e647", + "page": 0 + }, + { + "address": 209, + "value": "0x400280007ffb7fff", + "page": 0 + }, + { + "address": 210, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 211, + "value": "0xbb67ae85", + "page": 0 + }, + { + "address": 212, + "value": "0x400280017ffb7fff", + "page": 0 + }, + { + "address": 213, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 214, + "value": "0x3c6ef372", + "page": 0 + }, + { + "address": 215, + "value": "0x400280027ffb7fff", + "page": 0 + }, + { + "address": 216, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 217, + "value": "0xa54ff53a", + "page": 0 + }, + { + "address": 218, + "value": "0x400280037ffb7fff", + "page": 0 + }, + { + "address": 219, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 220, + "value": "0x510e527f", + "page": 0 + }, + { + "address": 221, + "value": "0x400280047ffb7fff", + "page": 0 + }, + { + "address": 222, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 223, + "value": "0x9b05688c", + "page": 0 + }, + { + "address": 224, + "value": "0x400280057ffb7fff", + "page": 0 + }, + { + "address": 225, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 226, + "value": "0x1f83d9ab", + "page": 0 + }, + { + "address": 227, + "value": "0x400280067ffb7fff", + "page": 0 + }, + { + "address": 228, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 229, + "value": "0x5be0cd19", + "page": 0 + }, + { + "address": 230, + "value": "0x400280077ffb7fff", + "page": 0 + }, + { + "address": 231, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 232, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 233, + "value": "0x8", + "page": 0 + }, + { + "address": 234, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 235, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 236, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 237, + "value": "0x0", + "page": 0 + }, + { + "address": 238, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 239, + "value": "0x3", + "page": 0 + }, + { + "address": 240, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 241, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 242, + "value": "0x1", + "page": 0 + }, + { + "address": 243, + "value": "0x480a7ff97fff8000", + "page": 0 + }, + { + "address": 244, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 245, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 246, + "value": "0x40", + "page": 0 + }, + { + "address": 247, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 248, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff97", + "page": 0 + }, + { + "address": 249, + "value": "0x40137ffe7fff8000", + "page": 0 + }, + { + "address": 250, + "value": "0x20680017fff7fff", + "page": 0 + }, + { + "address": 251, + "value": "0x4", + "page": 0 + }, + { + "address": 252, + "value": "0x10780017fff7fff", + "page": 0 + }, + { + "address": 253, + "value": "0xa", + "page": 0 + }, + { + "address": 254, + "value": "0x480a80007fff8000", + "page": 0 + }, + { + "address": 255, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 256, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 257, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 258, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 259, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 260, + "value": "0x23", + "page": 0 + }, + { + "address": 261, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 262, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 263, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 264, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 265, + "value": "0x10", + "page": 0 + }, + { + "address": 266, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 267, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff89", + "page": 0 + }, + { + "address": 268, + "value": "0x482680017ffd8000", + "page": 0 + }, + { + "address": 269, + "value": "0x40", + "page": 0 + }, + { + "address": 270, + "value": "0x400280107ffa7fff", + "page": 0 + }, + { + "address": 271, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 272, + "value": "0x0", + "page": 0 + }, + { + "address": 273, + "value": "0x400280117ffa7fff", + "page": 0 + }, + { + "address": 274, + "value": "0x482680017ffa8000", + "page": 0 + }, + { + "address": 275, + "value": "0x1a", + "page": 0 + }, + { + "address": 276, + "value": "0x482680017ffa8000", + "page": 0 + }, + { + "address": 277, + "value": "0x12", + "page": 0 + }, + { + "address": 278, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 279, + "value": "0x8", + "page": 0 + }, + { + "address": 280, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 281, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff7b", + "page": 0 + }, + { + "address": 282, + "value": "0x480a80007fff8000", + "page": 0 + }, + { + "address": 283, + "value": "0x482680017ffa8000", + "page": 0 + }, + { + "address": 284, + "value": "0x22", + "page": 0 + }, + { + "address": 285, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 286, + "value": "0x10", + "page": 0 + }, + { + "address": 287, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 288, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffc1", + "page": 0 + }, + { + "address": 289, + "value": "0x482680017ffd8000", + "page": 0 + }, + { + "address": 290, + "value": "0x40", + "page": 0 + }, + { + "address": 291, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 292, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffcf", + "page": 0 + }, + { + "address": 293, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 294, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 295, + "value": "0x2", + "page": 0 + }, + { + "address": 296, + "value": "0x480a7ff97fff8000", + "page": 0 + }, + { + "address": 297, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 298, + "value": "0x3", + "page": 0 + }, + { + "address": 299, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 300, + "value": "0x4", + "page": 0 + }, + { + "address": 301, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 302, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff31", + "page": 0 + }, + { + "address": 303, + "value": "0x40137ffe7fff8000", + "page": 0 + }, + { + "address": 304, + "value": "0x40137ffd7fff8001", + "page": 0 + }, + { + "address": 305, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 306, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 307, + "value": "0x480a80007fff8000", + "page": 0 + }, + { + "address": 308, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 309, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff5f", + "page": 0 + }, + { + "address": 310, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 311, + "value": "0x10", + "page": 0 + }, + { + "address": 312, + "value": "0x482a80007ffa8000", + "page": 0 + }, + { + "address": 313, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 314, + "value": "0x0", + "page": 0 + }, + { + "address": 315, + "value": "0x4828800080007ffd", + "page": 0 + }, + { + "address": 316, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 317, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff66", + "page": 0 + }, + { + "address": 318, + "value": "0x482a7ffc7ffd8000", + "page": 0 + }, + { + "address": 319, + "value": "0x400280107ffa7fff", + "page": 0 + }, + { + "address": 320, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 321, + "value": "0xffffffff", + "page": 0 + }, + { + "address": 322, + "value": "0x400280117ffa7fff", + "page": 0 + }, + { + "address": 323, + "value": "0x480a80017fff8000", + "page": 0 + }, + { + "address": 324, + "value": "0x482680017ffa8000", + "page": 0 + }, + { + "address": 325, + "value": "0x1a", + "page": 0 + }, + { + "address": 326, + "value": "0x482680017ffa8000", + "page": 0 + }, + { + "address": 327, + "value": "0x12", + "page": 0 + }, + { + "address": 328, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 329, + "value": "0x480280037ffb8000", + "page": 0 + }, + { + "address": 330, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 331, + "value": "0x1000000000000000000000000", + "page": 0 + }, + { + "address": 332, + "value": "0x480280027ffb8000", + "page": 0 + }, + { + "address": 333, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 334, + "value": "0x10000000000000000", + "page": 0 + }, + { + "address": 335, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 336, + "value": "0x480280017ffb8000", + "page": 0 + }, + { + "address": 337, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 338, + "value": "0x100000000", + "page": 0 + }, + { + "address": 339, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 340, + "value": "0x480280007ffb8000", + "page": 0 + }, + { + "address": 341, + "value": "0x40317fff7ffe7ffc", + "page": 0 + }, + { + "address": 342, + "value": "0x480280077ffb8000", + "page": 0 + }, + { + "address": 343, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 344, + "value": "0x1000000000000000000000000", + "page": 0 + }, + { + "address": 345, + "value": "0x480280067ffb8000", + "page": 0 + }, + { + "address": 346, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 347, + "value": "0x10000000000000000", + "page": 0 + }, + { + "address": 348, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 349, + "value": "0x480280057ffb8000", + "page": 0 + }, + { + "address": 350, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 351, + "value": "0x100000000", + "page": 0 + }, + { + "address": 352, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 353, + "value": "0x480280047ffb8000", + "page": 0 + }, + { + "address": 354, + "value": "0x40317fff7ffe7ffd", + "page": 0 + }, + { + "address": 355, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 356, + "value": "0x8", + "page": 0 + }, + { + "address": 357, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 358, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 359, + "value": "0x400280007ffa7fff", + "page": 0 + }, + { + "address": 360, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 361, + "value": "0xff00ff00ff00ff00ff00ff00ff00ff", + "page": 0 + }, + { + "address": 362, + "value": "0x400280017ffa7fff", + "page": 0 + }, + { + "address": 363, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 364, + "value": "0xffff", + "page": 0 + }, + { + "address": 365, + "value": "0x480280027ffa8000", + "page": 0 + }, + { + "address": 366, + "value": "0x48507fff7ffe8000", + "page": 0 + }, + { + "address": 367, + "value": "0x48307fff7ffb8000", + "page": 0 + }, + { + "address": 368, + "value": "0x400280057ffa7fff", + "page": 0 + }, + { + "address": 369, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 370, + "value": "0xffff0000ffff0000ffff0000ffff00", + "page": 0 + }, + { + "address": 371, + "value": "0x400280067ffa7fff", + "page": 0 + }, + { + "address": 372, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 373, + "value": "0xffffffff", + "page": 0 + }, + { + "address": 374, + "value": "0x480280077ffa8000", + "page": 0 + }, + { + "address": 375, + "value": "0x48507fff7ffe8000", + "page": 0 + }, + { + "address": 376, + "value": "0x48307fff7ffb8000", + "page": 0 + }, + { + "address": 377, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 378, + "value": "0x7fffff800000010ffffef000000000000000000000000000000000000000001", + "page": 0 + }, + { + "address": 379, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 380, + "value": "0x4002800a7ffa7fff", + "page": 0 + }, + { + "address": 381, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 382, + "value": "0xff00ff00ff00ff00ff00ff00ff00ff", + "page": 0 + }, + { + "address": 383, + "value": "0x4002800b7ffa7fff", + "page": 0 + }, + { + "address": 384, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 385, + "value": "0xffff", + "page": 0 + }, + { + "address": 386, + "value": "0x4802800c7ffa8000", + "page": 0 + }, + { + "address": 387, + "value": "0x48507fff7ffe8000", + "page": 0 + }, + { + "address": 388, + "value": "0x48307fff7ffb8000", + "page": 0 + }, + { + "address": 389, + "value": "0x4002800f7ffa7fff", + "page": 0 + }, + { + "address": 390, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 391, + "value": "0xffff0000ffff0000ffff0000ffff00", + "page": 0 + }, + { + "address": 392, + "value": "0x400280107ffa7fff", + "page": 0 + }, + { + "address": 393, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 394, + "value": "0xffffffff", + "page": 0 + }, + { + "address": 395, + "value": "0x480280117ffa8000", + "page": 0 + }, + { + "address": 396, + "value": "0x48507fff7ffe8000", + "page": 0 + }, + { + "address": 397, + "value": "0x48307fff7ffb8000", + "page": 0 + }, + { + "address": 398, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 399, + "value": "0x7fffff800000010ffffef000000000000000000000000000000000000000001", + "page": 0 + }, + { + "address": 400, + "value": "0x480280007ffb8000", + "page": 0 + }, + { + "address": 401, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 402, + "value": "0x1000000000000000000000000", + "page": 0 + }, + { + "address": 403, + "value": "0x480280017ffb8000", + "page": 0 + }, + { + "address": 404, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 405, + "value": "0x10000000000000000", + "page": 0 + }, + { + "address": 406, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 407, + "value": "0x480280027ffb8000", + "page": 0 + }, + { + "address": 408, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 409, + "value": "0x100000000", + "page": 0 + }, + { + "address": 410, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 411, + "value": "0x480280037ffb8000", + "page": 0 + }, + { + "address": 412, + "value": "0x40307fff7ffe7fea", + "page": 0 + }, + { + "address": 413, + "value": "0x480280047ffb8000", + "page": 0 + }, + { + "address": 414, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 415, + "value": "0x1000000000000000000000000", + "page": 0 + }, + { + "address": 416, + "value": "0x480280057ffb8000", + "page": 0 + }, + { + "address": 417, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 418, + "value": "0x10000000000000000", + "page": 0 + }, + { + "address": 419, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 420, + "value": "0x480280067ffb8000", + "page": 0 + }, + { + "address": 421, + "value": "0x484480017fff8000", + "page": 0 + }, + { + "address": 422, + "value": "0x100000000", + "page": 0 + }, + { + "address": 423, + "value": "0x48307fff7ffd8000", + "page": 0 + }, + { + "address": 424, + "value": "0x480280077ffb8000", + "page": 0 + }, + { + "address": 425, + "value": "0x40307fff7ffe7fed", + "page": 0 + }, + { + "address": 426, + "value": "0x482680017ffa8000", + "page": 0 + }, + { + "address": 427, + "value": "0x14", + "page": 0 + }, + { + "address": 428, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 429, + "value": "0x8", + "page": 0 + }, + { + "address": 430, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 431, + "value": "0x480a7ff97fff8000", + "page": 0 + }, + { + "address": 432, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 433, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 434, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe63", + "page": 0 + }, + { + "address": 435, + "value": "0x20780017fff7ffd", + "page": 0 + }, + { + "address": 436, + "value": "0xb", + "page": 0 + }, + { + "address": 437, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 438, + "value": "0x48127ffe7fff8000", + "page": 0 + }, + { + "address": 439, + "value": "0x48127ffc7fff8000", + "page": 0 + }, + { + "address": 440, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 441, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff92", + "page": 0 + }, + { + "address": 442, + "value": "0x48127fe57fff8000", + "page": 0 + }, + { + "address": 443, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 444, + "value": "0x48127ffd7fff8000", + "page": 0 + }, + { + "address": 445, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 446, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 447, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 448, + "value": "0x48127ffd7fff8000", + "page": 0 + }, + { + "address": 449, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 450, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 451, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffa5", + "page": 0 + }, + { + "address": 452, + "value": "0x48127fcb7fff8000", + "page": 0 + }, + { + "address": 453, + "value": "0x48127ffd7fff8000", + "page": 0 + }, + { + "address": 454, + "value": "0x48127ffd7fff8000", + "page": 0 + }, + { + "address": 455, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 456, + "value": "0x20780017fff7ffb", + "page": 0 + }, + { + "address": 457, + "value": "0x6", + "page": 0 + }, + { + "address": 458, + "value": "0x480a7ff87fff8000", + "page": 0 + }, + { + "address": 459, + "value": "0x480a7ff97fff8000", + "page": 0 + }, + { + "address": 460, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 461, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 462, + "value": "0x480a7ff87fff8000", + "page": 0 + }, + { + "address": 463, + "value": "0x480a7ff97fff8000", + "page": 0 + }, + { + "address": 464, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 465, + "value": "0x480280007ffc8000", + "page": 0 + }, + { + "address": 466, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 467, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 468, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffdd", + "page": 0 + }, + { + "address": 469, + "value": "0x482680017ffb8000", + "page": 0 + }, + { + "address": 470, + "value": "0x800000000000011000000000000000000000000000000000000000000000000", + "page": 0 + }, + { + "address": 471, + "value": "0x482680017ffc8000", + "page": 0 + }, + { + "address": 472, + "value": "0x1", + "page": 0 + }, + { + "address": 473, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 474, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 475, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffef", + "page": 0 + }, + { + "address": 476, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 477, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 478, + "value": "0x2", + "page": 0 + }, + { + "address": 479, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 480, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe29", + "page": 0 + }, + { + "address": 481, + "value": "0x40137fff7fff8000", + "page": 0 + }, + { + "address": 482, + "value": "0x480a7ff87fff8000", + "page": 0 + }, + { + "address": 483, + "value": "0x480a7ff97fff8000", + "page": 0 + }, + { + "address": 484, + "value": "0x48127ffd7fff8000", + "page": 0 + }, + { + "address": 485, + "value": "0x480a7ffb7fff8000", + "page": 0 + }, + { + "address": 486, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 487, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 488, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 489, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe1", + "page": 0 + }, + { + "address": 490, + "value": "0x40137ffe7fff8001", + "page": 0 + }, + { + "address": 491, + "value": "0x48127ffd7fff8000", + "page": 0 + }, + { + "address": 492, + "value": "0x480a7ffa7fff8000", + "page": 0 + }, + { + "address": 493, + "value": "0x480a80007fff8000", + "page": 0 + }, + { + "address": 494, + "value": "0x484680017ffb8000", + "page": 0 + }, + { + "address": 495, + "value": "0x20", + "page": 0 + }, + { + "address": 496, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 497, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffebd", + "page": 0 + }, + { + "address": 498, + "value": "0x48127ffc7fff8000", + "page": 0 + }, + { + "address": 499, + "value": "0x480a80017fff8000", + "page": 0 + }, + { + "address": 500, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 501, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 502, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 503, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 504, + "value": "0x40780017fff7fff", + "page": 0 + }, + { + "address": 505, + "value": "0x2", + "page": 0 + }, + { + "address": 506, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 507, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffe0e", + "page": 0 + }, + { + "address": 508, + "value": "0x40137fff7fff8000", + "page": 0 + }, + { + "address": 509, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 510, + "value": "0x34bed2", + "page": 0 + }, + { + "address": 511, + "value": "0x4002800080007fff", + "page": 0 + }, + { + "address": 512, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 513, + "value": "0x19f410f8", + "page": 0 + }, + { + "address": 514, + "value": "0x4002800180007fff", + "page": 0 + }, + { + "address": 515, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 516, + "value": "0x315329", + "page": 0 + }, + { + "address": 517, + "value": "0x4002800280007fff", + "page": 0 + }, + { + "address": 518, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 519, + "value": "0x274f43", + "page": 0 + }, + { + "address": 520, + "value": "0x4002800380007fff", + "page": 0 + }, + { + "address": 521, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 522, + "value": "0x46117c7", + "page": 0 + }, + { + "address": 523, + "value": "0x4002800480007fff", + "page": 0 + }, + { + "address": 524, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 525, + "value": "0x10bca2c", + "page": 0 + }, + { + "address": 526, + "value": "0x4002800580007fff", + "page": 0 + }, + { + "address": 527, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 528, + "value": "0x531f0ae", + "page": 0 + }, + { + "address": 529, + "value": "0x4002800680007fff", + "page": 0 + }, + { + "address": 530, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 531, + "value": "0x60f304", + "page": 0 + }, + { + "address": 532, + "value": "0x4002800780007fff", + "page": 0 + }, + { + "address": 533, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 534, + "value": "0x147bc875", + "page": 0 + }, + { + "address": 535, + "value": "0x4002800880007fff", + "page": 0 + }, + { + "address": 536, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 537, + "value": "0x132a1a", + "page": 0 + }, + { + "address": 538, + "value": "0x4002800980007fff", + "page": 0 + }, + { + "address": 539, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 540, + "value": "0x1842e29", + "page": 0 + }, + { + "address": 541, + "value": "0x4002800a80007fff", + "page": 0 + }, + { + "address": 542, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 543, + "value": "0x119e12", + "page": 0 + }, + { + "address": 544, + "value": "0x4002800b80007fff", + "page": 0 + }, + { + "address": 545, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 546, + "value": "0x22eb59d7", + "page": 0 + }, + { + "address": 547, + "value": "0x4002800c80007fff", + "page": 0 + }, + { + "address": 548, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 549, + "value": "0xba66e", + "page": 0 + }, + { + "address": 550, + "value": "0x4002800d80007fff", + "page": 0 + }, + { + "address": 551, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 552, + "value": "0x29ba0af", + "page": 0 + }, + { + "address": 553, + "value": "0x4002800e80007fff", + "page": 0 + }, + { + "address": 554, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 555, + "value": "0x46d1222", + "page": 0 + }, + { + "address": 556, + "value": "0x4002800f80007fff", + "page": 0 + }, + { + "address": 557, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 558, + "value": "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffddb", + "page": 0 + }, + { + "address": 559, + "value": "0x40137fff7fff8001", + "page": 0 + }, + { + "address": 560, + "value": "0x480a7ffc7fff8000", + "page": 0 + }, + { + "address": 561, + "value": "0x480a7ffd7fff8000", + "page": 0 + }, + { + "address": 562, + "value": "0x480a80017fff8000", + "page": 0 + }, + { + "address": 563, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 564, + "value": "0x10", + "page": 0 + }, + { + "address": 565, + "value": "0x480a80007fff8000", + "page": 0 + }, + { + "address": 566, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 567, + "value": "0x1", + "page": 0 + }, + { + "address": 568, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 569, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffa6", + "page": 0 + }, + { + "address": 570, + "value": "0x400680017fff7ffe", + "page": 0 + }, + { + "address": 571, + "value": "0x1151e91c0c5c12373a1ee1dea6184157", + "page": 0 + }, + { + "address": 572, + "value": "0x400680017fff7fff", + "page": 0 + }, + { + "address": 573, + "value": "0x66f0d5f0f1a77aa154b6d26dafef9ebd", + "page": 0 + }, + { + "address": 574, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 575, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 576, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 577, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 578, + "value": "0x10", + "page": 0 + }, + { + "address": 579, + "value": "0x480a80007fff8000", + "page": 0 + }, + { + "address": 580, + "value": "0x480680017fff8000", + "page": 0 + }, + { + "address": 581, + "value": "0x0", + "page": 0 + }, + { + "address": 582, + "value": "0x1104800180018000", + "page": 0 + }, + { + "address": 583, + "value": "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff98", + "page": 0 + }, + { + "address": 584, + "value": "0x400680017fff7ffe", + "page": 0 + }, + { + "address": 585, + "value": "0xed5d26182757658237a79c5d99067694", + "page": 0 + }, + { + "address": 586, + "value": "0x400680017fff7fff", + "page": 0 + }, + { + "address": 587, + "value": "0x1fc69d936bc4c3d2de9482f57cad6d5e", + "page": 0 + }, + { + "address": 588, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 589, + "value": "0x48127ffb7fff8000", + "page": 0 + }, + { + "address": 590, + "value": "0x208b7fff7fff7ffe", + "page": 0 + }, + { + "address": 591, + "value": "0x251", + "page": 0 + }, + { + "address": 592, + "value": "0x0", + "page": 0 + }, + { + "address": 593, + "value": "0x1b9d", + "page": 0 + }, + { + "address": 594, + "value": "0x5c1d", + "page": 0 + }, + { + "address": 5531, + "value": "0x1c13", + "page": 0 + }, + { + "address": 5532, + "value": "0x5d5d", + "page": 0 + } + ], + "dynamic_params": null +} \ No newline at end of file diff --git a/stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs b/stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs index dff25c1a..9067fade 100644 --- a/stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs +++ b/stwo_cairo_prover/crates/prover/src/input/vm_import/mod.rs @@ -14,7 +14,7 @@ use super::mem::MemConfig; use super::state_transitions::StateTransitions; use super::CairoInput; use crate::input::mem::MemoryBuilder; -use crate::input::MemorySegmentAddresses; +use crate::input::BuiltinSegments; #[derive(Debug, Error)] pub enum VmImportError { @@ -61,14 +61,13 @@ pub fn import_from_vm_output( .map(|entry| entry.address as u32) .collect(); + let builtins_segments = BuiltinSegments::from_memory_segments(&pub_data.memory_segments); + Ok(CairoInput { state_transitions, mem: mem.build(), public_mem_addresses, - range_check_builtin: MemorySegmentAddresses { - begin_addr: pub_data.memory_segments["range_check"].begin_addr as usize, - stop_ptr: pub_data.memory_segments["range_check"].stop_ptr as usize, - }, + builtins_segments, }) } @@ -168,6 +167,8 @@ pub mod tests { #[test] fn test_read_from_large_files() { let input = large_cairo_input(); + + // Test opcode components. let components = input.state_transitions.casm_states_by_opcode; assert_eq!(components.generic_opcode.len(), 0); assert_eq!(components.add_ap_opcode_is_imm_f_op_1_base_fp_f.len(), 0); @@ -228,12 +229,33 @@ pub mod tests { assert_eq!(components.mul_opcode_is_small_f_is_imm_f.len(), 4583); assert_eq!(components.mul_opcode_is_small_f_is_imm_t.len(), 9047); assert_eq!(components.ret_opcode.len(), 49472); + + // Test builtins. + let builtins_segments = input.builtins_segments; + assert_eq!( + builtins_segments.range_check_bits_128, + Some((1715768, 1757348).into()) + ); + assert_eq!(builtins_segments.pedersen, Some((1322552, 1337489).into())); + assert_eq!(builtins_segments.ecdsa, None); + assert_eq!(builtins_segments.keccak, None); + assert_eq!(builtins_segments.bitwise, None); + assert_eq!(builtins_segments.ec_op, Some((16428600, 16428747).into())); + assert_eq!( + builtins_segments.poseidon, + Some((16920120, 17444532).into()) + ); + assert_eq!(builtins_segments.range_check_bits_96, None); + assert_eq!(builtins_segments.add_mod, None); + assert_eq!(builtins_segments.mul_mod, None); } #[ignore] #[test] fn test_read_from_small_files() { let input = small_cairo_input(); + + // Test opcode components. let components = input.state_transitions.casm_states_by_opcode; assert_eq!(components.generic_opcode.len(), 0); assert_eq!(components.add_ap_opcode_is_imm_f_op_1_base_fp_f.len(), 0); @@ -291,5 +313,24 @@ pub mod tests { assert_eq!(components.mul_opcode_is_small_f_is_imm_f.len(), 0); assert_eq!(components.mul_opcode_is_small_f_is_imm_t.len(), 0); assert_eq!(components.ret_opcode.len(), 462); + + // Test builtins. + let builtins_segments = input.builtins_segments; + assert_eq!( + builtins_segments.range_check_bits_128, + Some((6000, 6050).into()) + ); + assert_eq!(builtins_segments.pedersen, Some((4464, 4614).into())); + assert_eq!(builtins_segments.ecdsa, Some((22384, 22484).into())); + assert_eq!(builtins_segments.keccak, Some((64368, 65168).into())); + assert_eq!(builtins_segments.bitwise, Some((22512, 22762).into())); + assert_eq!(builtins_segments.ec_op, Some((63472, 63822).into())); + assert_eq!(builtins_segments.poseidon, Some((65392, 65692).into())); + assert_eq!( + builtins_segments.range_check_bits_96, + Some((68464, 68514).into()) + ); + assert_eq!(builtins_segments.add_mod, None); + assert_eq!(builtins_segments.mul_mod, None); } }