-
Notifications
You must be signed in to change notification settings - Fork 97
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
Performance issue for guest function: event_table.0.len() * EVENT_TABLE_ENTRY_ROWS <= self.max_available_rows
#118
Comments
(assertion failed: event_table.0.len() * EVENT_TABLE_ENTRY_ROWS as usize <= self.max_available_rows)
(assertion failed: event_table.0.len() * EVENT_TABLE_ENTRY_ROWS as usize <= self.max_available_rows)
event_table.0.len() * EVENT_TABLE_ENTRY_ROWS <= self.max_available_rows
You can specify k in cli in zkWASM |
@xgaozoyoe thats exactly what I was doing. As I've mentioned, increasing k from 18 to 24 did nothing, I get the same error anyway. If you look at my code closely, you'll notice that it is exactly the same as in cli |
I am not sure how you conclude that your code follows exactly the cli source code. My notice is that in cli we use the following: let zkwasm_k = Self::parse_zkwasm_k_arg(&top_matches).unwrap_or(MIN_K); while set_zkwasm_k is implemented as following: lazy_static! { **_pub fn set_zkwasm_k(k: u32) {
}_** pub fn zkwasm_k() -> u32 { |
But anyway, thank you very much for trying the codebase. Hope the above comment can help. If you can improve the way of setting k in the codebase, it will be great to have a patch and I am willing to apply it. |
You can also submit wasm image on https://zkwasm-explorer.delphinuslab.com/ for reporting performance issues with certain wasm image. |
I'm not able to run pretty simple fibonacci guest function in zkWasm with reasonable performance, meaning I won't be able to run my custom tough app on it.
I've tried to launch that fibonacci program on zkWasm for
n > 10000
and it always ends inassertion failed: event_table.0.len() * EVENT_TABLE_ENTRY_ROWS as usize <= self.max_available_rows)
. I've tried to increasek
from default18
up to24
and more, and got the same error. Fork=25
setup run for more than 20mins, btw.I understand that wasm is a pretty complex case to zk-verify, but failing calculate fibonacci program means for me no production code could be run on zkWasm. Moreover, other zk-sokutions (such as risk-0) show much better performance. For instance, I'm able to generate proof for
n=150000
in 2 mins and verify it for 5ms, compared to my best result with zkWasm withn=1000
with proof generation in 1.5 mins and verification in 170ms.The question is - is there any way to run the full setup-proof-verify cycle for such a large
n
like 10000? Is there any parameter other thank
which I can change?Here is the guest function
log_foreign
is just a renamed methodlog
added inregister_log_foreign
.I've used methods same as cli uses and my host looks like this
I tried using both
main
and latestv2
branches ofzkWasm
with default features. I'm running these benchmarks on my M1 mac btw.The text was updated successfully, but these errors were encountered: