mratsim / constantine

Constantine: modular, high-performance, zero-dependency cryptography stack for proof systems and blockchain protocols.
Other
272 stars 38 forks source link

PR #330 - enable test verkle ipa #389

Closed mratsim closed 3 weeks ago

mratsim commented 3 weeks ago

This is #330, rebased to latest master and for investigation of CI failure on Windows

mratsim commented 3 weeks ago

Bisecting, the regression mentioned in https://github.com/mratsim/constantine/pull/330#issuecomment-2154439568 is due to #371

mratsim commented 3 weeks ago

Confirmed that Windows failure without any error is due to a stack overflow due to array[VerkleDomain, array[VerkleDomain, Fr[Banderwagon]] being too large for Windows stack.

The temporary workaround is to use a ref array, see https://github.com/mratsim/constantine/pull/389/commits/bc7490281279e68c112b5bcaddde27e7b6d56009.

Ultimately those should be replaced by using Constantine allocator functions, to avoid Nim allocator, see: https://github.com/mratsim/constantine/issues/367

Strangely, if changing to a ref alloc in the test file, the Multiproof creation and verification test fails. Hopefully switching 1 out of 2 to heap space leaves enough stack space for Windows test.