mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-12-25 02:36:09 +01:00
tweaked poseidon (wip)
This commit is contained in:
parent
d38647aeaa
commit
33723a731e
@ -7,7 +7,7 @@ template HashLeftRight(rounds) {
|
||||
|
||||
signal output hash;
|
||||
|
||||
component hasher = Poseidon(2, 6, 8, 57);
|
||||
component hasher = Poseidon(2, 3, 8, 57);
|
||||
hasher.inputs[0] <== left;
|
||||
hasher.inputs[1] <== right;
|
||||
|
||||
|
@ -5,7 +5,7 @@ const bigInt = snarkjs.bigInt
|
||||
|
||||
class PoseidonHasher {
|
||||
hash(level, left, right) {
|
||||
const hash = poseidon.createHash(6, 8, 57)
|
||||
const hash = poseidon.createHash(3, 8, 57)
|
||||
return hash([bigInt(left), bigInt(right)]).toString()
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ module.exports = function(deployer) {
|
||||
await artifactor.save({
|
||||
contractName,
|
||||
abi: genContract.abi,
|
||||
unlinked_binary: genContract.createCode(),
|
||||
unlinked_binary: genContract.createCode(3),
|
||||
}).then(async () => {
|
||||
const hasherContract = artifacts.require(contractName)
|
||||
await deployer.deploy(hasherContract)
|
||||
|
Loading…
Reference in New Issue
Block a user