diff --git a/circuits/merkleTree.circom b/circuits/merkleTree.circom index 212f0e5..4e5fe06 100644 --- a/circuits/merkleTree.circom +++ b/circuits/merkleTree.circom @@ -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; diff --git a/lib/Poseidon.js b/lib/Poseidon.js index 1840149..1279472 100644 --- a/lib/Poseidon.js +++ b/lib/Poseidon.js @@ -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() } } diff --git a/migrations/2_deploy_hasher.js b/migrations/2_deploy_hasher.js index 000845c..2fa50b4 100644 --- a/migrations/2_deploy_hasher.js +++ b/migrations/2_deploy_hasher.js @@ -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)