-
Notifications
You must be signed in to change notification settings - Fork 331
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
feat: execute() exposes ExecutionReport #847
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.
I realized wherever we add to the report, we also need to check if unconstrained mode is on
core/src/runtime/mod.rs
Outdated
self.total_instruction_count() | ||
)?; | ||
write!(f, "Syscall Counts:\n")?; | ||
for (syscall, count) in &self.syscall_counts { |
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.
it'd be nice to sort this in alphabetical order so its consistent
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.
updated
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.
Instruction Counts:
add: 583439
and: 151701
auipc: 19488
beq: 26917
bge: 237
bgeu: 5917
blt: 1141
bltu: 43457
bne: 51442
divu: 6
ecall: 2264
jal: 5372
jalr: 38749
lb: 10723
lbu: 57950
lw: 237094
mul: 4036
mulhu: 1152
or: 301944
sb: 58448
sll: 278698
sltu: 16766
srl: 293010
sub: 12382
sw: 312781
xor: 242242
Total Instructions: 2757356
Syscall Counts:
COMMIT: 8
COMMIT_DEFERRED_PROOFS: 8
HALT: 1
SHA_COMPRESS: 1091
SHA_EXTEND: 1091
WRITE: 65
Total Syscall Count: 2264
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.
the difference in lower vs upper case is annoying, is it fine if I re-write all the Opcode enums
sp1/core/src/runtime/opcode.rs
Line 72 in dbed499
pub const fn mnemonic(&self) -> &str { |
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.
can you just do .to_uppercase()? also it looks fine imo
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.
for consistency, should we show 0 for the missing ones?
allows callers can check cycles, also removes cycle check / simulation from proof requests