namnc / circom-2-arithc

Circom interpreter to arithmetic circuit description
MIT License
33 stars 7 forks source link

Avoid collisions in random signal id generation. #33

Closed brech1 closed 1 month ago

brech1 commented 2 months ago

We may face signal ids collisions on large circuits.

namnc commented 2 months ago

I have some thoughts on this:

brech1 commented 2 months ago

Yeah we could try incremental. The main reason I didn't went that way is because we need a mutable pointer to the top most runtime and it has to be passed around everywhere (even to the signal creation methods), but also thought it could be problematic with context branching and merging.

I went with u128 because of the faster implementation, but it's true we're using more memory when it's not optimal and thought this was needed fast (for benchmarking 0.0.9).

I can try to implement this and see what issues come up!

brech1 commented 1 month ago

Resolved in #40