diff --git a/filecoin-hashers/src/blake2s.rs b/filecoin-hashers/src/blake2s.rs index cf14b263e..7704f3402 100644 --- a/filecoin-hashers/src/blake2s.rs +++ b/filecoin-hashers/src/blake2s.rs @@ -498,6 +498,9 @@ impl Hasher for Blake2sHasher { type Domain = Blake2sDomain; type Function = Blake2sFunction; + // The hasher name should be the same for all fields. The hasher name is used to name the SDR + // parent-cache; graph parent generation is not affected by a hasher's field, thus the field + // name should not be included in the hasher name. fn name() -> String { "Blake2sHasher".into() } @@ -507,7 +510,7 @@ impl Hasher for Blake2sHasher { type Function = Blake2sFunction; fn name() -> String { - "Blake2sHasher_pallas".into() + "Blake2sHasher".into() } } impl Hasher for Blake2sHasher { @@ -515,6 +518,6 @@ impl Hasher for Blake2sHasher { type Function = Blake2sFunction; fn name() -> String { - "Blake2sHasher_vesta".into() + "Blake2sHasher".into() } } diff --git a/filecoin-hashers/src/poseidon.rs b/filecoin-hashers/src/poseidon.rs index e172ab1e4..58280c2b4 100644 --- a/filecoin-hashers/src/poseidon.rs +++ b/filecoin-hashers/src/poseidon.rs @@ -610,6 +610,9 @@ impl Hasher for PoseidonHasher { type Domain = PoseidonDomain; type Function = PoseidonFunction; + // The hasher name should be the same for all fields. The hasher name is used to name the SDR + // parent-cache; graph parent generation is not affected by a hasher's field, thus the field + // name should not be included in the hasher name. fn name() -> String { "poseidon_hasher".into() } @@ -619,7 +622,7 @@ impl Hasher for PoseidonHasher { type Function = PoseidonFunction; fn name() -> String { - "poseidon_hasher_pallas".into() + "poseidon_hasher".into() } } impl Hasher for PoseidonHasher { @@ -627,6 +630,6 @@ impl Hasher for PoseidonHasher { type Function = PoseidonFunction; fn name() -> String { - "poseidon_hasher_vesta".into() + "poseidon_hasher".into() } } diff --git a/filecoin-hashers/src/sha256.rs b/filecoin-hashers/src/sha256.rs index 289d46373..01ebfd823 100644 --- a/filecoin-hashers/src/sha256.rs +++ b/filecoin-hashers/src/sha256.rs @@ -526,6 +526,9 @@ impl Hasher for Sha256Hasher { type Domain = Sha256Domain; type Function = Sha256Function; + // The hasher name should be the same for all fields. The hasher name is used to name the SDR + // parent-cache; graph parent generation is not affected by a hasher's field, thus the field + // name should not be included in the hasher name. fn name() -> String { "sha256_hasher".into() } @@ -535,7 +538,7 @@ impl Hasher for Sha256Hasher { type Function = Sha256Function; fn name() -> String { - "sha256_hasher_pallas".into() + "sha256_hasher".into() } } impl Hasher for Sha256Hasher { @@ -543,6 +546,6 @@ impl Hasher for Sha256Hasher { type Function = Sha256Function; fn name() -> String { - "sha256_hasher_vesta".into() + "sha256_hasher".into() } }