proposal-30-decentralize-so.../README.md

69 lines
3.2 KiB
Markdown
Raw Normal View History

2023-07-28 15:43:53 +03:00
# Proposal to update Tornado IPFS hashes in ENS
2023-07-25 18:39:19 +03:00
### Changes / effect description
- Change owner of ENS domains [staking-rewards.contract.tornadocash.eth](https://app.ens.domains/staking-rewards.contract.tornadocash.eth), [governance-impl.contract.tornadocash.eth](https://app.ens.domains/governance-impl.contract.tornadocash.eth) and [contract.tornadocash.eth](https://app.ens.domains/contract.tornadocash.eth) to Tornado Cash Governance
- Change address on staking-rewards.contract.tornadocash.eth and governance-impl.contract.tornadocash.eth to new addresses (has been changed in [proposal 22](https://tornado.ws/governance/22))
2023-07-28 16:20:34 +03:00
- Update IPFS content hashes on ENS domains for docs (docs.tornadocash.eth), Classic UI (tornadocash.eth), Nova UI (nova.tornadocash.eth) and relayers UI (relayers-network.tornadocash.eth)
2023-07-25 18:39:19 +03:00
### Requirements
- Rust ([Need only for Windows](https://doc.rust-lang.org/cargo/getting-started/installation.html))
- Foundryup ([Windows](https://github.com/altugbakan/foundryup-windows), [Linux](https://book.getfoundry.sh/getting-started/installation))
- Node 14 or higher ([Windows](https://github.com/coreybutler/nvm-windows), [Linux](https://github.com/nvm-sh/nvm))
2023-07-25 18:39:19 +03:00
### Installation
```text
git clone --recurse-submodules https://git.tornado.ws/Theo/proposal-29-update-ipfs.git
cd proposal-29-update-ipfs
2023-07-25 18:39:19 +03:00
npm install
2023-07-28 15:43:53 +03:00
npm run init
2023-07-25 18:39:19 +03:00
```
### Testing
```text
npm run test:windows
```
or
```text
npm run test:linux
```
2023-07-31 12:12:57 +03:00
### Contracts
Proposal deployed contract: [0xaF0AbcF236D495AEfDA9f9e1DF5bECE0D132da66](https://etherscan.io/address/0xaf0abcf236d495aefda9f9e1df5bece0d132da66#code)
Goerli test contract: [0x0b70c06d7a4D52cbE9CC4C9FCb4Df2B024F4fFd8](https://goerli.etherscan.io/address/0x0b70c06d7a4d52cbe9cc4c9fcb4df2b024f4ffd8#code)
2023-07-31 12:12:57 +03:00
### Verification
Since the proposal code can be confusing because it relies on numerous specifications and EIPs, users can use scripts to verify the correctness of the data, see the output in the corresponding files, and insert the code directly into Solidity, comparing it with the existing code in the proposal (there should be no discrepancies be).
1. Verification of the transformation of eth domains into [ENS nodes](https://docs.ens.domains/ens-improvement-proposals/ensip-1-ens):
Script source: [calculateENSNodes.ts](scripts/calculateENSNodes.ts)
Command to run: `npm run calculateENS`
Result data: [ensNodesDeclarations.txt](data/ensNodesDeclarations.txt)
2. Verification of the transformation of IPFS CIDs to ENS [content hashes](https://eips.ethereum.org/EIPS/eip-1577)
Script source: [calculateIPFSContenthashes.ts](scripts/calculateIPFSContenthashes.ts)
Command to run: `npm run calculateIPFS`
Result data: [ensDomainsIPFSContenthashes.txt](data/ensDomainsIPFSContenthashes.txt)
3. Verification of the equality [IPFS CIDs](https://docs.ipfs.tech/concepts/content-addressing/) v0 with v1 (because ENS on its interface shows v1 CIDs, but Pinata and contenthash library uses v0)
Script source: [calculateIpfsV1Cids.ts](scripts/calculateIpfsV1Cids.ts)
Command to run: `npm run calculateIpfsV1Cids`
Result data: [ipfsV1CIDs.txt](data/ipfsV1CIDs.txt)