Compare commits
No commits in common. "0e3ac4e5d94599f9e5b3cda9e1f580c1c86d18ff" and "4514bfb9399485e8159f56f1e67862f27d258fe7" have entirely different histories.
0e3ac4e5d9
...
4514bfb939
@ -2,17 +2,8 @@
|
||||
|
||||
## Setup
|
||||
|
||||
### Stack Orchestrator
|
||||
|
||||
- Follow these steps to install laconic-so: <https://git.vdb.to/cerc-io/stack-orchestrator#install>
|
||||
|
||||
### Laconic Wallet
|
||||
|
||||
- The `laconic-wallet` can be installed using an APK on an Android device or run as a website using `laconic-wallet-web`
|
||||
- Follow one of the following (`Setup On Android` or `Setup As Website`) sections as desired
|
||||
|
||||
#### Setup On Android
|
||||
|
||||
- Install laconic wallet using [latest APK release](https://git.vdb.to/cerc-io/laconic-wallet/releases)
|
||||
|
||||
- Download the APK file in latest release `laconic-wallet-debug.apk`
|
||||
@ -21,8 +12,6 @@
|
||||
|
||||
- It will need third party installation permission to install the APK
|
||||
|
||||
OR
|
||||
|
||||
- (Optional) Build laconic wallet from source by following the steps below
|
||||
|
||||
- Follow the [Install](https://git.vdb.to/cerc-io/laconic-wallet#install) steps from the laconic-wallet README to setup Android Studio
|
||||
@ -64,139 +53,48 @@
|
||||
cd ../
|
||||
```
|
||||
|
||||
#### Setup As Website
|
||||
### Testnet Onboarding App
|
||||
|
||||
- Use the hosted `laconic-wallet-web` at <https://wallet.laconic.com>
|
||||
|
||||
OR
|
||||
|
||||
- (Optional) Setup the `laconic-wallet-web` stack
|
||||
|
||||
- Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconic-wallet-web
|
||||
```
|
||||
|
||||
- Build the container image:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web build-containers
|
||||
```
|
||||
|
||||
- Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web deploy init --output laconic-wallet-web-spec.yml
|
||||
```
|
||||
|
||||
- Edit `network` in the spec file to map container ports to host ports as required:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
laconic-wallet-web:
|
||||
- '5000:80'
|
||||
```
|
||||
|
||||
- Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/laconic-wallet-web/stack/stack-orchestrator/stack/laconic-wallet-web deploy create --spec-file laconic-wallet-web-spec.yml --deployment-dir laconic-wallet-web-deployment
|
||||
```
|
||||
|
||||
- Inside the `laconic-wallet-web-deployment/config.env` file, set your wallet connect ProjectId:
|
||||
|
||||
```bash
|
||||
WALLET_CONNECT_ID=39bc93c...
|
||||
```
|
||||
|
||||
### Testnet Onboarding App and Onboarding API Stacks
|
||||
|
||||
- For running the onboarding API, create sumsub application token from <https://cockpit.sumsub.com>
|
||||
|
||||
- Clone the stack repo:
|
||||
- Clone the repository
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-onboarding-app-stack
|
||||
git clone git@git.vdb.to:cerc-io/testnet-onboarding-app.git
|
||||
```
|
||||
|
||||
- Setup required repositories:
|
||||
- Enter the project directory
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app setup-repositories --pull
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api setup-repositories --pull
|
||||
cd testnet-onboarding-app
|
||||
```
|
||||
|
||||
- Build the container image:
|
||||
- Setup .env
|
||||
- Copy and update `.env`
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
- In the `.env` file, add the WalletConnect project ID used in your [laconic-wallet](https://git.vdb.to/cerc-io/laconic-wallet) setup.
|
||||
|
||||
```bash
|
||||
WALLET_CONNECT_PROJECT_ID=39bc93c...
|
||||
```
|
||||
|
||||
- Install dependencies
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app build-containers --force-rebuild
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api build-containers --force-rebuild
|
||||
yarn
|
||||
```
|
||||
|
||||
- Create spec files for deployments, which will map the stack's ports to the host:
|
||||
- Exit project repo
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy init --output onboarding-app-spec.yml
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api deploy init --output onboarding-api-spec.yml
|
||||
cd ../
|
||||
```
|
||||
|
||||
- Configure ports:
|
||||
### Stack Orchestrator
|
||||
|
||||
- `onboarding-app-spec.yml`:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
testnet-onboarding-app:
|
||||
- '3000:80'
|
||||
```
|
||||
|
||||
- `onboarding-api-spec.yml`:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
testnet-onboarding-api:
|
||||
- '3001:3000'
|
||||
```
|
||||
|
||||
- Create deployments:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-app deploy create --spec-file onboarding-app-spec.yml --deployment-dir onboarding-app-deployment
|
||||
|
||||
laconic-so --stack ~/cerc/testnet-onboarding-app-stack/stack-orchestrator/stacks/onboarding-api deploy create --spec-file onboarding-api-spec.yml --deployment-dir onboarding-api-deployment
|
||||
```
|
||||
|
||||
- Env configuration:
|
||||
|
||||
- Set the required variables:
|
||||
|
||||
```bash
|
||||
# WalletConnect project ID
|
||||
export WALLET_CONNECT_ID=
|
||||
|
||||
# Your sumsub application token
|
||||
export SUMSUB_APP_TOKEN=
|
||||
|
||||
# Your sumsub secret key
|
||||
export SUMSUB_SECRET_KEY=
|
||||
```
|
||||
|
||||
- Set the env config for app and api deployments:
|
||||
|
||||
```bash
|
||||
cat <<EOF > onboarding-app-deployment/config.env
|
||||
WALLET_CONNECT_ID=$WALLET_CONNECT_ID
|
||||
EOF
|
||||
|
||||
cat <<EOF > onboarding-api-deployment/config.env
|
||||
SUMSUB_APP_TOKEN=$SUMSUB_APP_TOKEN
|
||||
SUMSUB_SECRET_KEY=$SUMSUB_SECRET_KEY
|
||||
EOF
|
||||
```
|
||||
- Follow these steps to install laconic-so: <https://git.vdb.to/cerc-io/stack-orchestrator#install>
|
||||
|
||||
### fixturenet-laconicd and laconic-faucet Stacks
|
||||
|
||||
@ -427,7 +325,7 @@
|
||||
```
|
||||
|
||||
- Create a deployment spec-file for Alice's L1 nitro-node:
|
||||
- Create spec file for the deployment:
|
||||
- Create spec files for the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node deploy init --output l1alice-nitro-spec.yml
|
||||
@ -465,7 +363,7 @@
|
||||
```
|
||||
|
||||
- Create a deployment spec-file for Alice's L2 nitro-node:
|
||||
- Create spec file for the deployment:
|
||||
- Create spec files for the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/nitro-stack/stack-orchestrator/stacks/nitro-node deploy init --output l2alice-nitro-spec.yml
|
||||
@ -515,10 +413,10 @@
|
||||
|
||||
- Check status of L1
|
||||
|
||||
- Run status check:
|
||||
- Run command in intervals of 3 seconds to check if new blocks are created
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir fixturenet-eth-deployment exec fixturenet-eth-bootnode-lighthouse "/scripts/status-internal.sh"
|
||||
laconic-so deployment --dir fixturenet-eth-deployment exec foundry "cast block-number"
|
||||
```
|
||||
|
||||
- Check geth logs to ensure that new blocks are getting created
|
||||
@ -535,13 +433,7 @@
|
||||
|
||||
NOTE: The `fixturenet-optimism-contracts` service will configure and deploy the Optimism contracts to L1, exiting when complete. This may take several minutes; you can follow the progress by following the container's logs
|
||||
|
||||
- Follow optimism contracts deployment logs:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir fixturenet-optimism-deployment logs -f fixturenet-optimism-contracts
|
||||
```
|
||||
|
||||
- Check L2 logs:
|
||||
- Check L2 logs
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir fixturenet-optimism-deployment logs -f op-geth
|
||||
@ -638,76 +530,61 @@
|
||||
laconic-so deployment --dir bridge-deployment exec nitro-contracts "cd packages/nitro-protocol && yarn hardhat transfer --contract $L1_ASSET_ADDRESS --to $C_CHAIN_ADDRESS --amount 1000 --network geth"
|
||||
```
|
||||
|
||||
- Start `onboarding-app` and `onboarding-api` deployments (run where deployments are created):
|
||||
- Start testnet-onboarding-app (run command in testnet-onboarding-app repo)
|
||||
|
||||
```bash
|
||||
# Builds and serves the app
|
||||
laconic-so deployment --dir onboarding-app-deployment start
|
||||
|
||||
# Serves the API to generate access tokens
|
||||
laconic-so deployment --dir onboarding-api-deployment start
|
||||
# In testnet-onboarding-app
|
||||
yarn start
|
||||
```
|
||||
|
||||
Check the logs of the onboarding-app
|
||||
```bash
|
||||
docker ps | grep testnet-onboarding-app
|
||||
```
|
||||
|
||||
Once the container is healthy, the `testnet-onboarding-app` will be accessible at <http://localhost:3000>
|
||||
NOTE: Ignore source map warnings in the terminal
|
||||
|
||||
- Run Laconic Wallet
|
||||
|
||||
- Follow the steps to `Run on Android` or `Run as a website` as per the chosen setup
|
||||
- Connect your phone with the PC (Make sure that USB debugging is enabled on your phone)
|
||||
|
||||
- Run on Android:
|
||||
- Connect your phone with the PC (Make sure that USB debugging is enabled on your phone)
|
||||
- Setup port forwarding for your device using the following command:
|
||||
|
||||
- Setup port forwarding for your device using the following command:
|
||||
```bash
|
||||
# Get device id
|
||||
adb devices
|
||||
|
||||
# Setup port forwarding
|
||||
adb -s <device-id> reverse tcp:26657 tcp:26657
|
||||
```
|
||||
|
||||
- Open Laconic Wallet app that was installed from the APK
|
||||
|
||||
- (Optional) Start `laconic-wallet` android app (run steps in laconic-wallet repo)
|
||||
|
||||
- Set up the Android device
|
||||
- For a physical device, refer to the [React Native documentation for running on a physical device](https://reactnative.dev/docs/running-on-device)
|
||||
- For a virtual device, continue with the steps
|
||||
|
||||
- Start the application:
|
||||
|
||||
```bash
|
||||
# Get device id
|
||||
adb devices
|
||||
|
||||
# Setup port forwarding
|
||||
adb -s <device-id> reverse tcp:26657 tcp:26657
|
||||
# In laconic-wallet
|
||||
yarn start
|
||||
```
|
||||
|
||||
- Open Laconic Wallet app that was installed from the APK
|
||||
|
||||
OR
|
||||
|
||||
- (Optional) Start `laconic-wallet` android app (run steps in laconic-wallet repo)
|
||||
|
||||
- Set up the Android device
|
||||
- For a physical device, refer to the [React Native documentation for running on a physical device](https://reactnative.dev/docs/running-on-device)
|
||||
- For a virtual device, continue with the steps
|
||||
|
||||
- Start the application:
|
||||
|
||||
```bash
|
||||
# In laconic-wallet
|
||||
yarn start
|
||||
```
|
||||
|
||||
- Press `a` to run the application on android and wait till the wallet app opens up on your phone
|
||||
|
||||
OR
|
||||
|
||||
- Run as a website:
|
||||
- Open `laconic-wallet-web` at <https://wallet.laconic.com>
|
||||
|
||||
OR
|
||||
|
||||
- (Optional) Run the `laconic-wallet-web` stack:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment start
|
||||
```
|
||||
|
||||
Open `laconic-wallet-web` at <http://localhost:5000>
|
||||
- Press `a` to run the application on android and wait till the wallet app opens up on your phone
|
||||
|
||||
## Demo
|
||||
|
||||
- In laconic-wallet app, click on `Create wallet` and add laconicd chain using `Add network` button:
|
||||
|
||||
```bash
|
||||
Network type - `COSMOS`
|
||||
Chain ID - `laconic_9000-1`
|
||||
Network name - `laconicd`
|
||||
New RPC URL - `http://127.0.0.1:26657`
|
||||
Coin Type - `118`
|
||||
Native Denom - `alnt`
|
||||
Address Prefix - `laconic`
|
||||
Gas Price - `1`
|
||||
```
|
||||
|
||||
- Start the stack for stage 0 laconicd (run command in directory where stage0-deployment had been created)
|
||||
|
||||
```bash
|
||||
@ -717,14 +594,6 @@
|
||||
laconic-so deployment --dir stage0-deployment logs laconicd -f
|
||||
```
|
||||
|
||||
- In laconic-wallet, click on `Create wallet` and update the `laconicd` network using `Edit Network` button:
|
||||
|
||||
```bash
|
||||
Network name - laconicd
|
||||
New RPC URL - http://127.0.0.1:26657
|
||||
Gas Price - 1
|
||||
```
|
||||
|
||||
- Run laconic-faucet:
|
||||
|
||||
- Get private key of funded faucet account from stage 0 laconicd chain:
|
||||
@ -759,7 +628,7 @@
|
||||
export BRIDGE_ADDRESS=$(laconic-so deployment --dir bridge-deployment exec nitro-bridge "jq -r '.\"42069\"[0].contracts.Bridge.address' /app/deployment/nitro-addresses.json")
|
||||
```
|
||||
|
||||
- In the wallet, add 2 accounts (Alice and Charlie) for both the networks (`Ethereum` and `laconicd`) by selecting the network and clicking on `Add account`
|
||||
- In the wallet, add 2 accounts (Alice and Charlie) for both the networks (ethereum and laconicd) by selecting the network and clicking on `Add account`
|
||||
|
||||
- Get Ethereum private keys for accounts Alice and Charlie from wallet using the `Show private key` link (to be used as statechannel PKs)
|
||||
|
||||
@ -992,21 +861,14 @@
|
||||
|
||||
- Onboard participants
|
||||
- Open the `testnet-onboarding-app` at <http://localhost:3000>
|
||||
- Read and accept the `Terms and Conditions`
|
||||
- Connect testnet-onboarding app to the wallet:
|
||||
- Click on `CONNECT WALLET` button on the testnet-onboarding app
|
||||
- Click on the WalletConnect icon on the top right corner in the wallet
|
||||
- If using the wallet Android app, scan the QR code from the onboarding app
|
||||
- If using the wallet website, enter WalletConnect URI for pairing
|
||||
- In the onboarding app, choose Alice's nitro and laconicd account to onboard
|
||||
- Connect to the testnet-onboarding app by clicking on the WalletConnect icon on the top right corner in the wallet and scanning QR code of the app
|
||||
- Choose Alice's nitro and laconicd account to onboard
|
||||
- Use nitro accounts for which ledger channels have been created on L2
|
||||
- Sign using the nitro key
|
||||
- Approve sign request on Wallet
|
||||
- Perform the user verification steps
|
||||
- Select the desired participant role (`Validator` or `Participant`) and accept the onboarding terms and conditions
|
||||
- In the next step, fund your laconic account by clicking on the `REQUEST TOKENS FROM FAUCET` button; ensure that the displayed balance is updated
|
||||
- Send transaction request to the wallet
|
||||
- From wallet, approve and send transaction to laconicd chain
|
||||
- Fund the laconic account by clicking on the `REQUEST TOKENS FROM FAUCET` button
|
||||
- Send transaction request to the Wallet
|
||||
- Approve and send transaction to laconicd chain
|
||||
- Repeat onboarding for other (Charlies's) account by clicking on the web app header "Testnet Onboarding"
|
||||
- List the participants on stage 1 (run in the directory where laconicd deployment was created):
|
||||
|
||||
@ -1030,16 +892,13 @@
|
||||
- Use the scripts in fixturenet-laconicd stack to generate genesis file for stage 1 with token allocations:
|
||||
|
||||
```bash
|
||||
# Set current working dir path in a variable
|
||||
DEPLOYMENTS_DIR=$(pwd)
|
||||
|
||||
cd ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd
|
||||
|
||||
# Fetch account holdings from bridge
|
||||
./scripts/fetch-account-holdings.sh $DEPLOYMENTS_DIR/bridge-deployment eth-account-holdings.json
|
||||
./scripts/fetch-account-holdings.sh <bridge-deployment-absolute-path> eth-account-holdings.json
|
||||
|
||||
# Generate the genesis file
|
||||
./scripts/generate-stage1-genesis.sh $DEPLOYMENTS_DIR/stage0-deployment eth-account-holdings.json
|
||||
./scripts/generate-stage1-genesis.sh <stage0-deployment-absolute-path> eth-account-holdings.json
|
||||
|
||||
# Expected output:
|
||||
# Genesis file for stage1 written to output/genesis.json
|
||||
@ -1127,7 +986,7 @@
|
||||
# ID: '0xb29aeb32c9495a793ebf7bd116232075d1e7bfe89fc82281c7d498e3ffd3e3bf',
|
||||
# Status: 'Open',
|
||||
# Balance: {
|
||||
# AssetAddress: '0x0000000000000000000000000000000000000000',
|
||||
# AssetAddress: '<Token address on L2>',
|
||||
# Payee: '0xa8d2d06ace9c7ffc24ee785c2695678aecdfd7a0',
|
||||
# Payer: '0xaaa6628ec44a8a742987ef3a114ddfe2d4f7adce',
|
||||
# PaidSoFar: 0n,
|
||||
@ -1269,27 +1128,7 @@
|
||||
- Reset wallet and stop the app:
|
||||
- In laconic-wallet, click on the `Reset Wallet` button to disconnect all apps and clear the accounts
|
||||
|
||||
- Stop (`Ctrl+C`) the `laconic-wallet` if running locally in dev mode
|
||||
|
||||
- Stop and cleanup the `laconic-wallet-web` deployment:
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
laconic-so deployment --dir laconic-wallet-web-deployment stop
|
||||
|
||||
sudo rm -rf laconic-wallet-web-deployment
|
||||
```
|
||||
|
||||
- Stop and cleanup the `onboarding-app` and `onboarding-api` deployments:
|
||||
|
||||
```bash
|
||||
# Run where deployments are created
|
||||
laconic-so deployment --dir onboarding-app-deployment stop
|
||||
laconic-so deployment --dir onboarding-api-deployment stop
|
||||
|
||||
sudo rm -rf onboarding-app-deployment
|
||||
sudo rm -rf onboarding-api-deployment
|
||||
```
|
||||
- Stop (`Ctrl+C`) both `laconic-wallet` and `testnet-onboarding-app`
|
||||
|
||||
- Clean up stage 0 and stage 1 laconicd deployments:
|
||||
- Stop deployment and remove volumes:
|
||||
|
Loading…
Reference in New Issue
Block a user