Skip to content

Commit

Permalink
Renames hades_binding to garaga_rs and fixes all references
Browse files Browse the repository at this point in the history
  • Loading branch information
raugfer committed Aug 1, 2024
1 parent 7d1033c commit a455203
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/hydra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
- name: Compile Rust bindings with maturin
run: |
source venv/bin/activate
cd tools/hades_binding
cd tools/garaga_rs
maturin develop --release
- name: Run pytest
run: |
source venv/bin/activate
pytest tests/hydra/ -n auto
pytest tests/hydra/ -n auto
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ venv
tools/gnark/main
tools/gnark/bls12_381/cairo_test/main

tools/hades_binding/target/
tools/hades_binding/Cargo.lock
tools/hades_binding/sys
tools/garaga_rs/target/
tools/garaga_rs/Cargo.lock
tools/garaga_rs/sys

src/cairo/target/
src/cairo/target/
4 changes: 2 additions & 2 deletions hydra/poseidon_transcript.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import hades_binding
import garaga_rs
from starkware.cairo.common.poseidon_utils import PoseidonParams
from starkware.cairo.common.poseidon_utils import (
hades_permutation as hades_permutation_slow, # #only for testing times
Expand All @@ -10,7 +10,7 @@


def hades_permutation(s0: int, s1: int, s2: int) -> tuple[int, int, int]:
r0, r1, r2 = hades_binding.hades_permutation(
r0, r1, r2 = garaga_rs.hades_permutation(
(s0 % STARK).to_bytes(32, "big"),
(s1 % STARK).to_bytes(32, "big"),
(s2 % STARK).to_bytes(32, "big"),
Expand Down
4 changes: 2 additions & 2 deletions tools/hades_binding/Cargo.toml → tools/garaga_rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hades_binding"
name = "garaga_rs"
version = "0.1.0"
edition = "2021"

Expand All @@ -17,4 +17,4 @@ lazy_static = "1.4.0"


lambdaworks-crypto = { git = "https://github.com/lambdaclass/lambdaworks.git" }
lambdaworks-math = { git = "https://github.com/lambdaclass/lambdaworks.git" }
lambdaworks-math = { git = "https://github.com/lambdaclass/lambdaworks.git" }
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use pyo3::{
};

#[pymodule]
fn hades_binding(_py: Python, m: &PyModule) -> PyResult<()> {
fn garaga_rs(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(hades_permutation, m)?)?;
Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions tools/make/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ python3.10 tests/gen_inputs.py
echo "compiling Gnark..."
make go

echo "Compiling hades_binding Rust extension..."
cd tools/hades_binding
echo "Compiling garaga_rs Rust extension..."
cd tools/garaga_rs
maturin develop --release
cd ../../

Expand Down

0 comments on commit a455203

Please sign in to comment.