Merge pull request #779 from ethereum/JustinDrake-patch-4
Move to SHA256
This commit is contained in:
commit
2d413be91f
|
@ -668,7 +668,7 @@ def xor(bytes1: Bytes32, bytes2: Bytes32) -> Bytes32:
|
||||||
|
|
||||||
### `hash`
|
### `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.
|
Note: We aim to migrate to a S[T/N]ARK-friendly hash function in a future Ethereum 2.0 deployment phase.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# from hashlib import sha256
|
from hashlib import sha256
|
||||||
from eth_utils import keccak
|
# from eth_utils import keccak
|
||||||
|
|
||||||
|
|
||||||
# def hash(x): return sha256(x).digest()
|
def hash(x): return sha256(x).digest()
|
||||||
def hash(x):
|
# def hash(x): return keccak(x)
|
||||||
return keccak(x)
|
|
||||||
|
|
Loading…
Reference in New Issue