Zokrates / ZoKrates

A toolbox for zkSNARKs on Ethereum

Home Page:https://zokrates.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sha256 compilation issue

TheYangCode opened this issue · comments

import "hashes/sha256/sha256Padded" as sha256;

def main(u8[7417]input) ->u32[8]{

    u32[8] hash = sha256(input);

    return hash;
}

The above is my code, but it always gets killed during compilation. Is it because it requires too much memory? How should I adjust it?

Probably the input is so large that it runs out of memory during compilation. I'm afraid using such large inputs for SHA256 is not the way to go using Zokrates. You could maybe use the Poseidon hash?