-
Notifications
You must be signed in to change notification settings - Fork 2
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
Blake3 output not deterministic in guest #149
Comments
@poszu suggested that it's likely a memory issue and I agree. I looked for any memory issues that have been fixed in the upstream SP1 and didn't find any obvious ones, but I also noticed that the SP1 core runtime was rewritten in succinctlabs/sp1#1036. I narrowed it down to an issue with this data structure; the second time the hash function is called, the |
I created a smaller test to reproduce it: https://github.com/athenavm/athena/blob/debug/corrupted-stack-init/tests/hasher/src/main.rs After attaching GDB, I can see that parts of the
|
@lrettig The issue is most likely in memset-rv32e.s, although I have not yet found the bug. I replaced its implementation with a chat-gpt generated one and it works both in my simple test and with the blake3 hasher test of yours: https://github.com/athenavm/athena/blob/debug/corrupted-stack-init/vm/entrypoint/src/memset-rv32e.s |
Blake3 is exhibiting strange, non-deterministic behavior when running in the guest. Here's a simple test:
athena/tests/hasher/src/main.rs
Lines 11 to 34 in 32ea2b5
It produces this output:
The text was updated successfully, but these errors were encountered: