You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sha256 circom component does not parallelize at the time to compute the witness. The other rollup-main components (DecodeTx, RollupTx & FeeTx) are already parallelized, being the Sha256 component the one which takes mucht ime to be calculated.
There are two approaches that could be followed when trying to paralleize Sha256:
1 - External intermediary signals
This approach pretends to calculate Sha256 internal blocks outside of the circuit. Therefore, intermediary signals should be added to the rollup-main circuit. Besides, circomlib Sha256 should be adapted to accept those intermediary signalsa nd check them properly.
Following this approach:
small changes on circomlib Sha256
small changes on rollup-main circuit
Javascript and Go implementation to get Sha256 intermediary signals
it will reduce witness time computation
2 - Internal intermediary signals
This approach computes Sha256 internal blocks directly on the circom Sha256 circomlib circuit. No additional signals should be added to the rollup-main circuit but a new Sha256Parallel should be build on circomlib.
Following this approach:
new circomlib Sha256Parallel circuit implementing block computation with no comnstraints
no changes on rollup-main circuit (just changing the template name)
general circomlib implementation to be used for anyone an not for an specific circuit
should be benchmarrking if this approach really redice the witness computation
Overview
Sha256circom component does not parallelize at the time to compute the witness. The otherrollup-maincomponents (DecodeTx,RollupTx&FeeTx) are already parallelized, being theSha256component the one which takes mucht ime to be calculated.There are two approaches that could be followed when trying to paralleize
Sha256:1 - External intermediary signals
This approach pretends to calculate Sha256 internal blocks outside of the circuit. Therefore, intermediary signals should be added to the
rollup-maincircuit. Besides, circomlibSha256should be adapted to accept those intermediary signalsa nd check them properly.Sha256rollup-maincircuit2 - Internal intermediary signals
This approach computes Sha256 internal blocks directly on the circom
Sha256circomlib circuit. No additional signals should be added to therollup-maincircuit but a newSha256Parallelshould be build oncircomlib.Sha256Parallelcircuit implementing block computation with no comnstraintsrollup-maincircuit (just changing the template name)