Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vendor R1CS sponge code #46

Merged
merged 4 commits into from
Apr 26, 2023
Merged

vendor R1CS sponge code #46

merged 4 commits into from
Apr 26, 2023

Commits on Apr 25, 2023

  1. vendor: add code of ark-sponge fork to poseidon377

    This is the `r1cs` branch from our git fork of `ark-sponge`:
    
    https://github.com/penumbra-zone/sponge
    
    It is unmodified in this commit, changes will be made in the
    subsequent commits for clarity of the git history.
    
    The upstream `ark-sponge` repository is archived because they moved
    the poseidon implementation to a different repository. In addition,
    we need to make a lot of changes to get on the upstream impl. This
    was attempted back in November and at that time we decided to continue
    using our fork only for the R1CS feature.
    
    However, in light of the upcoming migration to Poseidon2, any work
    resolving the divergence between our fork and the upstream repo would
    be wasted, as we'll be soon removing Poseidon 1 from `poseidon377`.
    
    As such, for stability, we are vendoring our fork of `ark-sponge`
    on a temporary basis such that we can release `poseidon377` unchanged
    to crates, then pin all penumbra repositories to that release.
    
    Afterwards, we will proceed with migrating to Arkworks 0.4.x release
    series [0] and migrating to Poseidon2 [1].
    
    [0] penumbra-zone/penumbra#2004
    [1] #40
    redshiftzero committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    5dd59ec View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. chore: fix paths, add required dependencies for sponge

    paths to the crate root `crate` in vendored `ark-sponge` need to be
    `crate::r1cs::vendor::sponge`
    redshiftzero committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    9339706 View commit details
    Browse the repository at this point in the history
  2. test: delete out of date test from vendored ark-sponge

    This test is failing in the forked repo, after the change in:
    
    penumbra-zone/sponge@113469a
    
    That change was previously made for consistency with our `poseidon377` test
    vectors (after ark-sponge changed how they invoke the permutation in the
    sponge). Our poseidon377 vectors are `crate::hash` in the tests
    as well as in the protocol spec - those tests pass so there
    should be no issues with consistency across implementations.
    redshiftzero committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    03c08d4 View commit details
    Browse the repository at this point in the history
  3. chore: add versions to our poseidon-* path dependencies

    (needed for publishing to crates)
    redshiftzero committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    8224e1b View commit details
    Browse the repository at this point in the history