Skip to content
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

Very slow compile times #31

Closed
kevinheavey opened this issue Sep 19, 2023 · 1 comment
Closed

Very slow compile times #31

kevinheavey opened this issue Sep 19, 2023 · 1 comment

Comments

@kevinheavey
Copy link

Based on experiments on my machine, the get_poseidon_parameters function lengthens the build time of solana-sdk by 37%. This isn't a mystery since it's 43,000 lines long but I wonder if it can be optimized

@vadorovsky
Copy link
Contributor

I think the best solution for that problem would be to hide the Poseidon functionality in Solana SDK behind a feature flag, so only people interested in ZK would need to build light-poseidon. I'd suggest to open an issue in Solana.

If that idea doesn't get accepted, then I don't think there is anything else we could do, sorry.

I don't think that building parameters can be optimized. These are exactly the same parameters which Circom uses. Providing parameters this way is what other Poseidon libraries do, including:

These parameters could be built either on compile time (which is what we are doing) or could be computed and built during runtime (no, we don't want that in Solana 😅 ). So I think what we are doing now is the best solution, even though it makes the build process longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants