From 63a6e706467772af228728e41a576a7b3f70e1d4 Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Wed, 7 Jun 2023 10:13:51 +0200 Subject: [PATCH] Fill BLOCKHASH and PREVRANDAO syscalls with dummy code (#1076) --- evm/src/cpu/kernel/asm/core/syscall_stubs.asm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/evm/src/cpu/kernel/asm/core/syscall_stubs.asm b/evm/src/cpu/kernel/asm/core/syscall_stubs.asm index 1530872c..1df96bd7 100644 --- a/evm/src/cpu/kernel/asm/core/syscall_stubs.asm +++ b/evm/src/cpu/kernel/asm/core/syscall_stubs.asm @@ -1,8 +1,19 @@ // Labels for unimplemented syscalls to make the kernel assemble. // Each label should be removed from this file once it is implemented. +// This is a temporary version that returns 0 on all inputs. +// TODO: Fix this. global sys_blockhash: - PANIC + // stack: kexit_info, block_number + %charge_gas_const(@GAS_BLOCKHASH) + %stack (kexit_info, block_number) -> (kexit_info, 0) + EXIT_KERNEL + +// This is a temporary version that returns 0. +// TODO: Fix this. +// TODO: What semantics will this have for Edge? global sys_prevrandao: - // TODO: What semantics will this have for Edge? - PANIC + // stack: kexit_info + %charge_gas_const(@GAS_BASE) + %stack (kexit_info) -> (kexit_info, 0) + EXIT_KERNEL