diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index c96c28888..fd45a4082 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -668,7 +668,7 @@ def xor(bytes1: Bytes32, bytes2: Bytes32) -> Bytes32: ### `hash` -The hash function is denoted by `hash`. In Phase 0 the beacon chain is deployed with the same hash function as Ethereum 1.0, i.e. Keccak-256 (also incorrectly known as SHA3). +The `hash` function is SHA256. Note: We aim to migrate to a S[T/N]ARK-friendly hash function in a future Ethereum 2.0 deployment phase. diff --git a/utils/phase0/hash_function.py b/utils/phase0/hash_function.py index 21e6555bf..3fee63d82 100644 --- a/utils/phase0/hash_function.py +++ b/utils/phase0/hash_function.py @@ -1,7 +1,6 @@ -# from hashlib import sha256 -from eth_utils import keccak +from hashlib import sha256 +# from eth_utils import keccak -# def hash(x): return sha256(x).digest() -def hash(x): - return keccak(x) +def hash(x): return sha256(x).digest() +# def hash(x): return keccak(x)