Skip to content

Commit

Permalink
Merge pull request #682 from EYBlockchain/david/wallet-remove-old-ins…
Browse files Browse the repository at this point in the history
…tructions

remove old wallet instructions
  • Loading branch information
daveroga authored May 31, 2022
2 parents 6431f00 + 5fecc20 commit 50c1091
Showing 1 changed file with 1 addition and 88 deletions.
89 changes: 1 addition & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,95 +206,8 @@ use it:
NF_3 will reject locally-created invalid transactions and so you will never get to the stage of
something challengeable making it on chain.

## Wallet

Nightfall_3 provides a Wallet to exercise its features. To use it:

- Deploy nightfall (only ganache for now) from Nightfall's root folder

```sh
./start-nightfall -g -d -s
```

- In a different terminal, start proposer from Nightfall's root folder once Nightfall deployment is
finished (you will see this `nightfall_3-deployer-1 exited with code 0`).

```sh
./proposer
```

- In a different terminal, start the liquidity provider from Nightfall's root folder. Liquidity provider is needed to use `instant withdraw` feature
```
./liquidity-provider
```

- Generate wallet

```
cd wallet
npm ci
```

- Launch wallet in ganache (localhost)

```
npm start
```

- Launch wallet in localhost connected to testnet deployment

```
npm run start:ropsten
```

- When the wallet starts, connect metamask wallet installed in your browser. You need to have
previously configured your metamask wallet to operate with Nightfall's deployment on localhost

More information can be found [here](https://github.com/EYBlockchain/nightfall_3/wallet/README.md)

### Configuring Metamask to work with Nightfall on localhost

1. Open Metamask wallet
2. Import Account and paste the private key. While we are working on localhost, we will be using a
test account with private key
`0x4775af73d6dc84a0ae76f8726bda4b9ecf187c377229cb39e1afa7a18236a69e`
3. Next step is to configure Nightfall's RPC network. Go to `Settings->Networks->Add Network`
4. Enter the following information and press `Save`
- `Network Name` : nightfall-localhost
- `New RPC URL` : http://localhost:8546
- `Chain ID`: 1337

5. Select the new imported account and the new created network

### Limitations

- You cannot run the wallet and a separate version of the SDK (CLI for example) in parallel as
nonces will get mixed.
- You need to reset the nonce every time you restart Nightfall, as Metamask will keep previous nonce
whereas ganache has reset it. If nonce is not reset, you will see an error message after signing
the transaction. To reset the nonce in metamask:

### Limitations
- If you restart Ganache, you will need to manually delete the IndexedDB state in your browser storage as it will persist.
1. Open Developer Console in your Chrome browser.
2. Click on the Application tab and then click IndexedDB in the left sidebar.
3. Clicking on the Nightfall Commitments storage should enable you to delete the database.

- You need to reset the nonce every time you restart Nightfall, as Metamask will keep previous nonce whereas ganache has reset it. If nonce is not reset, you will see an error message after signing the transaction. To reset the nonce in metamask:
1. Open Metamask in browser
2. Settings->Advance->Reset Account

- Direct transactions are not implemented
- Instant withdraw is selected when doing a withdraw only. Once submitted the instant withdraw
request,the wallet requests a simple withdraw and inmediatelly after converts this withdraw into
an instant withdraw. Wallet will attempt to send the instant withdraw request up to 10 times, once
every 10 seconds. It is likely that during this period, you need to request a simpler transaction
(deposit, withdraw or transfer) so that the original withdraw is processed by the processor and
the instant withdraw can be carried out.
- Doing a transfer to a third account and an instant withdraw in the same block makes the instant
withdraw fail.
- Tested with node version v14.18.0

## Limitations
Nightfall uses the G16 proof system, and we believe it is
[not vulnerable](./doc/G16-malleability.md) to its malleability.

Expand Down

0 comments on commit 50c1091

Please sign in to comment.