-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ecall demo with Keccak-f #717
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, please see comments.
Ecall keccak (merge resolution)
Dummy circuit for large ecalls
@kunxian-xia Merged all recent changes, ready for review. |
pub fn handle_syscall(vm: &VMState, function_code: u32) -> Result<SyscallEffects> { | ||
match function_code { | ||
KECCAK_PERMUTE => Ok(keccak_permute::keccak_permute(vm)), | ||
_ => Err(anyhow::anyhow!("Unknown syscall: {}", function_code)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think usually weak-typed anyhow err is not suitable for core lib functions, more suitable for app level errors.
We can add a TODO like "TODO: re-design err types when more precompile designs are done".
Trace generation
StepRecord
to support multiple accesses to registers and memory (beyond standard instructions).fn handle_syscall(…)
syscall_keccak_permute
.Circuit part (standalone diff here)
There is a placeholder for upcoming precompile circuits. The real implementation must have the same effects as this one (same memory writes, etc).
LargeEcallDummy
is an extension of the dummy circuit to support precompiles.keccak_step
.