decentralized-sources/README.md
2023-09-27 23:51:32 -07:00

1.8 KiB

Decentralized repositories downloader

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

Requirements

  1. Node 14 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)