Skip to content

Commit

Permalink
chore: remove cpp python bindings for pedersen hashing until conflict…
Browse files Browse the repository at this point in the history
… is resolved
  • Loading branch information
petscheit committed Nov 20, 2024
1 parent 54a9723 commit 3a535a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tools/make/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ web3==7.4.0
black
poseidon-py
trie==3.0.1
sympy==1.12.1
sympy==1.12.1
# crypto-cpp-py==1.4.4
13 changes: 7 additions & 6 deletions tools/py/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import functools
from typing import Callable

from crypto_cpp_py.cpp_bindings import cpp_hash
# from crypto_cpp_py.cpp_bindings import cpp_hash
from starkware.crypto.signature.signature import pedersen_hash

from poseidon_py.poseidon_hash import (
poseidon_hash_func,
Expand Down Expand Up @@ -319,11 +320,11 @@ def validate_initial_params(initial_params: dict):
), f"Invalid MMR size: {initial_params['mmr_size']}"


def pedersen_hash(left: int, right: int) -> int:
"""
One of two hash functions (along with starknet_keccak) used throughout Starknet.
"""
return cpp_hash(left, right)
# def pedersen_hash(left: int, right: int) -> int:
# """
# One of two hash functions (along with starknet_keccak) used throughout Starknet.
# """
# return cpp_hash(left, right)


def bytes_hash_pedersen_function(x: bytes, y: bytes) -> bytes:
Expand Down

0 comments on commit 3a535a6

Please sign in to comment.