snarkify / sirius

A Plonkish folding framework for Incrementally Verifiable Computation (IVC).
MIT License
106 stars 15 forks source link

feat(nifs): impl `protogalaxy::poly::compute_G` #284

Closed cyphersnake closed 1 week ago

cyphersnake commented 4 weeks ago

Motivation Close #260

Overview

cyphersnake commented 3 weeks ago

The algorithm separated from the context is here, for your reference

https://gist.github.com/rust-play/89ae0609d30feb22d2585a6f43ccc07e

cyphersnake commented 3 weeks ago

I did not take into account that PlonkWitness is not a matrix, in general it is not hard to correct by making the indexes trickier

I will postpone this task for now due to higher priority, however, the fix will be not very large

cyphersnake commented 1 week ago

Benchmark data is still being collected, but there doesn't seem to be any code left there, I'm going back to this task

cyphersnake commented 1 week ago

Generally fixed, but because of cloning there is multiple rows traversal, which can be annoying. It is also possible to create result vectors more optimally.

But in order not to delay, I suggest to return to this optimization, if it becomes bottle neck

cyphersnake commented 1 week ago

@chaosma If you don't understand this big iterator, let me know, we may need a call to write a good doc to it together. It's really not very intuitive, but I had to sacrifice understandability for optimality

chaosma commented 1 week ago

@chaosma If you don't understand this big iterator, let me know, we may need a call to write a good doc to it together. It's really not very intuitive, but I had to sacrifice understandability for optimality

I think I got it. Other comments are addressed. I leave a new comment there.