mirror of
https://github.com/tornadocash/tornado-trees.git
synced 2024-12-04 23:15:01 +01:00
use poseidon compatible with mining
This commit is contained in:
parent
a4a6b92e6b
commit
cdd88f2ed4
@ -74,23 +74,10 @@ template BatchTreeUpdate(levels, batchLevels, zeroBatchLeaf) {
|
||||
|
||||
// zeroLeaf = keccak256("tornado") % FIELD_SIZE
|
||||
// zeroBatchLeaf is poseidon(zeroLeaf, zeroLeaf) (batchLevels - 1) times
|
||||
component main = BatchTreeUpdate(20, 2, 18183130938628345667957803100405002905363080101794697711581833408293369315484)
|
||||
component main = BatchTreeUpdate(20, 2, 21572503925325825116380792768937986743990254033176521064707045559165336555197)
|
||||
|
||||
// for mainnet use 20, 7, 17278668323652664881420209773995988768195998574629614593395162463145689805534
|
||||
|
||||
/*
|
||||
circom has new incompatible poseidon. Temp zeroes list for it: //todo change before going to prod
|
||||
21663839004416932945382355908790599225266501822907911457504978515578255421292
|
||||
6558759280185035534262768457043627242000481389071721366452285175835842504378
|
||||
18183130938628345667957803100405002905363080101794697711581833408293369315484
|
||||
1649420513912702105317807420227791840680436863908773772957989215330544908558
|
||||
1519470092809891639075459401377052367516123764590098800258495876383484284269
|
||||
11483247544333149638457900649034027061705091890934198553446561731884583952449
|
||||
1676192069326199968794155063658499005818740739752078691901135837045539426569
|
||||
3691667188955435348598133121052392834370851623525570836101013075316308823822
|
||||
1023697156307946028208019788980135577833715295171390138750488664899512032833
|
||||
*/
|
||||
|
||||
/*
|
||||
zeros of n-th order:
|
||||
21663839004416932945382355908790599225266501822907911457504978515578255421292
|
||||
|
@ -1,22 +0,0 @@
|
||||
//SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
|
||||
import "hardhat/console.sol";
|
||||
|
||||
contract Greeter {
|
||||
string greeting;
|
||||
|
||||
constructor(string memory _greeting) public {
|
||||
console.log("Deploying a Greeter with greeting:", _greeting);
|
||||
greeting = _greeting;
|
||||
}
|
||||
|
||||
function greet() public view returns (string memory) {
|
||||
return greeting;
|
||||
}
|
||||
|
||||
function setGreeting(string memory _greeting) public {
|
||||
console.log("Changing greeting from '%s' to '%s'", greeting, _greeting);
|
||||
greeting = _greeting;
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@
|
||||
"dependencies": {
|
||||
"circom": "^0.5.38",
|
||||
"circom_runtime": "^0.1.12",
|
||||
"circomlib": "^0.4.1",
|
||||
"circomlib": "git+https://github.com/tornadocash/circomlib.git#d20d53411d1bef61f38c99a8b36d5d0cc4836aa1",
|
||||
"dotenv": "^8.2.0",
|
||||
"ffiasm": "^0.1.1",
|
||||
"fixed-merkle-tree": "^0.5.0",
|
||||
|
19
yarn.lock
19
yarn.lock
@ -2253,16 +2253,6 @@ circom_runtime@0.1.8:
|
||||
ffjavascript "0.2.10"
|
||||
fnv-plus "^1.3.1"
|
||||
|
||||
circomlib@^0.4.1:
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/circomlib/-/circomlib-0.4.1.tgz#ada51bec78fbd2602ccecf18ed145296411f20e4"
|
||||
integrity sha512-e77a7qn+86W39ufQl7alNIbdLQmxtyzAJQhp708xLp3xln4mYM26slxt+jOg731RDDLmpZLpNFuVYAuUvDn9CQ==
|
||||
dependencies:
|
||||
blake-hash "^1.1.0"
|
||||
blake2b "^2.1.3"
|
||||
circom "0.5.33"
|
||||
ffjavascript "0.1.0"
|
||||
|
||||
"circomlib@git+https://github.com/tornadocash/circomlib.git#5beb6aee94923052faeecea40135d45b6ce6172c":
|
||||
version "0.0.20"
|
||||
resolved "git+https://github.com/tornadocash/circomlib.git#5beb6aee94923052faeecea40135d45b6ce6172c"
|
||||
@ -2273,6 +2263,15 @@ circomlib@^0.4.1:
|
||||
typedarray-to-buffer "^3.1.5"
|
||||
web3 "^1.2.11"
|
||||
|
||||
"circomlib@git+https://github.com/tornadocash/circomlib.git#d20d53411d1bef61f38c99a8b36d5d0cc4836aa1":
|
||||
version "0.4.1"
|
||||
resolved "git+https://github.com/tornadocash/circomlib.git#d20d53411d1bef61f38c99a8b36d5d0cc4836aa1"
|
||||
dependencies:
|
||||
blake-hash "^1.1.0"
|
||||
blake2b "^2.1.3"
|
||||
circom "0.5.33"
|
||||
ffjavascript "0.1.0"
|
||||
|
||||
class-is@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825"
|
||||
|
Loading…
Reference in New Issue
Block a user