# 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](https://github.com/coreybutler/nvm-windows), [Linux](https://github.com/nvm-sh/nvm)) 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](https://docs.gitea.com/usage/permissions?_highlight=or#organization-repository) 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](https://docs.gitea.com/next/usage/packages/npm). 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 ```