From 0cabd318cd4d6bfc99c4b0821a36ff04a61905eb Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 26 Feb 2021 11:17:13 +0300 Subject: [PATCH] pre production config --- circuits/BatchTreeUpdate.circom | 2 +- contracts/TornadoTrees.sol | 2 +- package.json | 2 +- scripts/deploy.js | 2 +- scripts/deployEmptyV1.js | 2 +- test/snark.test.js | 2 +- test/tornadoTrees.test.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/circuits/BatchTreeUpdate.circom b/circuits/BatchTreeUpdate.circom index dd17ecd..1896b53 100644 --- a/circuits/BatchTreeUpdate.circom +++ b/circuits/BatchTreeUpdate.circom @@ -87,5 +87,5 @@ function nthZero(n) { if (n == 9) return 209436188287252095316293336871467217491997565239632454977424802439169726471; } -var CHUNK_TREE_HEIGHT = 2 +var CHUNK_TREE_HEIGHT = 8 component main = BatchTreeUpdate(20, CHUNK_TREE_HEIGHT, nthZero(CHUNK_TREE_HEIGHT)) diff --git a/contracts/TornadoTrees.sol b/contracts/TornadoTrees.sol index 5ff8c16..587ca80 100644 --- a/contracts/TornadoTrees.sol +++ b/contracts/TornadoTrees.sol @@ -17,7 +17,7 @@ contract TornadoTrees { ITornadoTreesV1 public immutable tornadoTreesV1; // make sure CHUNK_TREE_HEIGHT has the same value in BatchTreeUpdate.circom - uint256 public constant CHUNK_TREE_HEIGHT = 2; + uint256 public constant CHUNK_TREE_HEIGHT = 8; uint256 public constant CHUNK_SIZE = 2**CHUNK_TREE_HEIGHT; uint256 public constant ITEM_SIZE = 32 + 20 + 4; uint256 public constant BYTES_SIZE = 32 + 32 + 4 + CHUNK_SIZE * ITEM_SIZE; diff --git a/package.json b/package.json index a9c56a0..3083b61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tornado-trees", - "version": "0.0.5", + "version": "0.0.6", "main": "src/index.js", "repository": "https://github.com/tornadocash/tornado-trees.git", "author": "Tornadocash team ", diff --git a/scripts/deploy.js b/scripts/deploy.js index eb3a373..b4f057b 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -15,7 +15,7 @@ const instances = [ ] const blocks = ['0xaaaaaaaa', '0xbbbbbbbb', '0xcccccccc', '0xdddddddd'] -const CHUNK_TREE_HEIGHT = 2 +const CHUNK_TREE_HEIGHT = 8 const levels = 20 const nonRandomBN = (nonce = 0) => diff --git a/scripts/deployEmptyV1.js b/scripts/deployEmptyV1.js index c993aef..3848893 100644 --- a/scripts/deployEmptyV1.js +++ b/scripts/deployEmptyV1.js @@ -15,7 +15,7 @@ const instances = [ ] const blocks = ['0xaaaaaaaa', '0xbbbbbbbb', '0xcccccccc', '0xdddddddd'] -const CHUNK_TREE_HEIGHT = 2 +const CHUNK_TREE_HEIGHT = 8 const levels = 20 const nonRandomBN = (nonce = 0) => diff --git a/test/snark.test.js b/test/snark.test.js index 4bcbbcf..ca0d929 100644 --- a/test/snark.test.js +++ b/test/snark.test.js @@ -4,7 +4,7 @@ const { poseidonHash2, randomBN } = require('../src/utils') const { batchTreeUpdate, prove } = require('../src/index') const levels = 20 -const CHUNK_TREE_HEIGHT = 2 +const CHUNK_TREE_HEIGHT = 8 describe('Snark', () => { it('should work', async () => { const tree = new MerkleTree(levels, [], { hashFunction: poseidonHash2 }) diff --git a/test/tornadoTrees.test.js b/test/tornadoTrees.test.js index c194a27..6f55cad 100644 --- a/test/tornadoTrees.test.js +++ b/test/tornadoTrees.test.js @@ -17,7 +17,7 @@ async function register(note, tornadoTrees, from) { } const levels = 20 -const CHUNK_TREE_HEIGHT = 2 +const CHUNK_TREE_HEIGHT = 8 const instances = [ '0x1111000000000000000000000000000000001111',