diff --git a/evm/src/cpu/kernel/interpreter.rs b/evm/src/cpu/kernel/interpreter.rs index 5c2329e5..89a4341d 100644 --- a/evm/src/cpu/kernel/interpreter.rs +++ b/evm/src/cpu/kernel/interpreter.rs @@ -370,6 +370,9 @@ impl<'a> Interpreter<'a> { self.push(x.overflowing_sub(y).0); } +// TODO: 107 is hardcoded as a dummy prime for testing +// should be changed to the proper implementation prime + fn run_addfp254(&mut self) { let x = self.pop(); let y = self.pop(); diff --git a/evm/src/cpu/kernel/tests/fields.rs b/evm/src/cpu/kernel/tests/fields.rs index bb57cb2a..0a490983 100644 --- a/evm/src/cpu/kernel/tests/fields.rs +++ b/evm/src/cpu/kernel/tests/fields.rs @@ -5,6 +5,9 @@ use rand::{thread_rng, Rng}; use crate::cpu::kernel::aggregator::combined_kernel; use crate::cpu::kernel::interpreter::run_with_kernel; +// TODO: 107 is hardcoded as a dummy prime for testing +// should be changed to the proper implementation prime +// once the run_{add, mul, sub}fp254 fns are implemented const P254: u32 = 107; fn add_fp(x: u32, y: u32) -> u32 {