Compare commits
No commits in common. "bc2e1d47e16f37f78c2eeb880e9cb6f968a37f9d" and "ed107528a2b3d150817b39a4eb14aca457c059b7" have entirely different histories.
bc2e1d47e1
...
ed107528a2
31
README.md
31
README.md
@ -1,6 +1,6 @@
|
|||||||
# Tornado Cash Classic UI
|
# Tornado Cash Classic UI
|
||||||
|
|
||||||
> Self-hostable Tornado Cash UI software for interacting with the protocol
|
> UI for non-custodial Ethereum Privacy solution
|
||||||
|
|
||||||
## Building locally
|
## Building locally
|
||||||
|
|
||||||
@ -31,42 +31,29 @@ For detailed explanation on how things work, checkout [Nuxt.js docs](https://nux
|
|||||||
|
|
||||||
## Update cached files
|
## Update cached files
|
||||||
|
|
||||||
- To update deposit and withdrawal events use `yarn update:events {chainId} {optional: tokenOrEvent} {optional: tokenOrEvent}`
|
- For update deposits and withdrawals events use `yarn update:events {chainId}`
|
||||||
- To update encrypted notes use `yarn update:encrypted {chainId}`
|
- For update encrypted notes use `yarn update:encrypted {chainId}`
|
||||||
- To update merkle tree use `yarn update:tree {chainId}`
|
- For update merkle tree use `yarn update:tree {chainId}`
|
||||||
|
|
||||||
#### NOTE!
|
#### NOTE!
|
||||||
|
|
||||||
After updating cached files do not forget to use `yarn update:zip`.
|
After update cached files do not forget to use `yarn update:zip`
|
||||||
|
|
||||||
### Example for Ethereum Mainnet:
|
### Example for Ethereum Mainnet:
|
||||||
|
|
||||||
You may set in [`networkConfig.js`](./networkConfig.js) the `blockSyncInterval` (def: 10_000) to the maximum value allowed by your RPC provider. Command usage follows below.
|
```
|
||||||
|
|
||||||
```bash
|
|
||||||
# Updating events with just the required chain id parameter
|
|
||||||
yarn update:events 1
|
yarn update:events 1
|
||||||
# Updating events for only one token across all instances on that network
|
|
||||||
yarn update:events 1 dai
|
|
||||||
# Updating events for only one event on only some network
|
|
||||||
yarn update:events 1 deposit
|
|
||||||
# Both
|
|
||||||
yarn update:events 1 dai deposit
|
|
||||||
# Updating encrypted notes for some chain id
|
|
||||||
yarn update:encrypted 1
|
yarn update:encrypted 1
|
||||||
# Updating trees for some chain id
|
|
||||||
yarn update:tree 1
|
yarn update:tree 1
|
||||||
# Finally zips must be updated
|
|
||||||
yarn update:zip
|
yarn update:zip
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example for Binance Smart Chain:
|
### Example for Binance Smart Chain:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
yarn update:events 56
|
yarn update:events 56
|
||||||
yarn update:events 56 bnb
|
|
||||||
yarn update:events 56 bnb deposit
|
|
||||||
yarn update:encrypted 56
|
yarn update:encrypted 56
|
||||||
yarn update:tree 56
|
|
||||||
yarn update:zip
|
yarn update:zip
|
||||||
```
|
```
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
export const blockSyncInterval = 10000
|
export const enabledChains = ['1', '10', '56', '100', '137', '42161']
|
||||||
export const enabledChains = ['1', '10', '56', '100', '137', '43114', '42161']
|
|
||||||
export const chainsWithEncryptedNotes = ['1', '5', '56', '100', '137']
|
export const chainsWithEncryptedNotes = ['1', '5', '56', '100', '137']
|
||||||
export default {
|
export default {
|
||||||
netId1: {
|
netId1: {
|
||||||
|
@ -2,7 +2,7 @@ import fs from 'fs'
|
|||||||
import zlib from 'zlib'
|
import zlib from 'zlib'
|
||||||
import Web3 from 'web3'
|
import Web3 from 'web3'
|
||||||
|
|
||||||
import networkConfig, { blockSyncInterval } from '../../networkConfig'
|
import networkConfig from '../../networkConfig'
|
||||||
|
|
||||||
export function download({ name, directory }) {
|
export function download({ name, directory }) {
|
||||||
const path = `${directory}${name}.gz`.toLowerCase()
|
const path = `${directory}${name}.gz`.toLowerCase()
|
||||||
@ -53,7 +53,7 @@ export async function getPastEvents({ type, fromBlock, netId, events, contractAt
|
|||||||
const blockDifference = Math.ceil(blockNumberBuffer - fromBlock)
|
const blockDifference = Math.ceil(blockNumberBuffer - fromBlock)
|
||||||
|
|
||||||
// eth_logs and eth_filter are restricted > 10,000 block queries
|
// eth_logs and eth_filter are restricted > 10,000 block queries
|
||||||
const blockRange = blockSyncInterval ? blockSyncInterval : 10_000
|
const blockRange = 10000
|
||||||
|
|
||||||
let chunksCount = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange)
|
let chunksCount = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange)
|
||||||
const chunkSize = Math.ceil(blockDifference / chunksCount)
|
const chunkSize = Math.ceil(blockDifference / chunksCount)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user