mirror of
				https://github.com/tornadocash/tornado-core.git
				synced 2025-10-30 22:18:54 -04:00 
			
		
		
		
	tweaked poseidon (wip)
This commit is contained in:
		
							parent
							
								
									d38647aeaa
								
							
						
					
					
						commit
						33723a731e
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 poma
						poma