Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Sha256 parallelization #1

Description

@krlosMata

Overview

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions