Decentralized Tornado Cash sources scripts & info
Go to file
2023-10-10 16:02:09 -07:00
scripts Add installation checks for libraries & fix rpc link 2023-10-10 15:59:17 -07:00
src Fix relayers ui ENS domain 2023-10-10 15:58:53 -07:00
.env.example Init commit 2023-09-27 23:51:32 -07:00
.gitignore Fix imports & add command to pin Tornado IPFS cids with daemon 2023-10-05 13:04:03 -07:00
.nvmrc Bump required node version 2023-09-28 03:47:24 -07:00
LICENSE Initial commit 2023-09-27 17:45:08 +02:00
package.json Update repo links to tornadocash org on Git 2023-10-10 16:02:09 -07:00
README.md Update repo links to tornadocash org on Git 2023-10-10 16:02:09 -07:00
tsconfig.json Init commit 2023-09-27 23:51:32 -07:00
yarn.lock Init commit 2023-09-27 23:51:32 -07:00

Decentralized repositories downloader

Script to download all Tornado Cash git repositories with source code from IPFS by actual hashes in ENS.

Requirements

  1. Node 16 or higher (Windows, Linux)
  2. Yarn: npm i -g yarn

Installation

  1. yarn install in repo folder
  2. Rename .env.example to .env and fill set RPC_URL pointing to Ethereum Mainnet JSON RPC
  3. yarn start

Next steps

Previous command will automatically create folder repos in root of this repo and two subfolders in it: tornadocash and tornado-packages. All main services and contracts (like classic-ui or torn-token) git repositories will be in tornadocash folder, and all packages (like websnark or fixed-merkle-tree) will be in tornado-packages folder.

To publish it on new Gitea and make it working, you need:

  1. Create two organizations on Gitea with usernames tornadocash and tornado-packages
  2. Push packages repositories to tornado-packages organization. In package.json file of every package change repository link to actual site
  3. Build and publish packages in Gitea npm registry. You need to build at first those packages, which doesn't have recursive dependencies to other Tornado packages (for example, first build & publish snarkjs and then circomlib, which uses snarkjs dependency). Don't forget to publish all package versions (check branches in packages repos)!
  4. Set in each Tornado repo, which uses @tornado dependencies, link to new Gitea npm registry in .npmrc file

All done!

Now you can use it as standard git without problems (but don't forget to update IPFS repos hashes on ENS after big changes)

Self-host IPFS peer with Tornado IPFS CIDs

Just run on any Debian Linux server (from root):

curl https://git.tornado.ws/tornadocash/decentralized-sources/raw/branch/main/scripts/hostIPFS.sh | bash