Skip to content

Commit 8f13224

Browse files
bhgomestommyjk21Kevingislason
authored
feat: integrate manta-rs upgrades into signer (#57)
* feat: finish setting up signer library integration * feat: move mnemonic generation to server * feat: add signer account creation and login protocols * feat: improve logging framework * feat: add transaction summary * feat: update to new utxo accumulator model naming * feat: add test server and update e2e test * feat: add Apple signing keys * feat: use new auto-integrated SDK objects * feat: add signer state saving to disk * feat: add autotag for merging into main * fix: remove old model from tauri glue code * fix: remove old signer code * fix: change state machine text from load seed to load state * fix: update README.md formatting * fix: move to main branch from master * chore: remove unused font files * chore: bump tauri to rc.11, tauri-build to rc.9 Co-authored-by: tommyjk21 <92386732+tommyjk21@users.noreply.github.com> Co-authored-by: Kevin Gislason <kevingislason@gmail.com>
1 parent 6ff2a24 commit 8f13224

File tree

912 files changed

+10713
-4600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

912 files changed

+10713
-4600
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ write a little note why.
2424
- [ ] Re-reviewed `Files changed` in the Github PR explorer.
2525
- [ ] Update the version numbers properly:
2626
* Cargo.toml
27+
* ui/package.json
28+
* ui/public/about.html
2729
* ui/src-tauri/Cargo.toml
2830
* ui/src-tauri/tauri.conf.json
29-
* ui/public/about.html
30-
* ui/package.json

.github/workflows/e2e.yml

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
name: End-to-end test
1+
name: End-to-end Test
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
paths-ignore:
77
- '**.md'
88
pull_request:
99
branches:
10-
- master
10+
- main
1111
paths-ignore:
1212
- '**.md'
13-
1413
jobs:
1514
build_code:
16-
name: End to end test
15+
name: End-to-end Test
1716
runs-on: ubuntu-latest
1817
timeout-minutes: 120
1918
strategy:
2019
matrix:
2120
node-version: [16.x]
2221
env:
2322
MANTA_SDK_BRANCH: "main"
24-
2523
steps:
2624
- name: Cancel previous runs
2725
uses: styfle/cancel-workflow-action@0.9.1
@@ -39,41 +37,11 @@ jobs:
3937
cd js
4038
yarn install --immutable | grep -v 'YN0013'
4139
yarn build
42-
4340
- name: Enable test scripts
4441
run: |
45-
chmod +x "${GITHUB_WORKSPACE}/.github/workflows/e2e/get_latest_sdk_version.sh"
46-
chmod +x "${GITHUB_WORKSPACE}/.github/workflows/e2e/move_proving_keys.sh"
4742
chmod +x "${GITHUB_WORKSPACE}/.github/workflows/e2e/get_node.sh"
4843
chmod +x "${GITHUB_WORKSPACE}/.github/workflows/e2e/run_test.sh"
49-
50-
- name: Get latest Manta sdk version
51-
run: |
52-
LATEST_SDK_VERSION=`"${GITHUB_WORKSPACE}/.github/workflows/e2e/get_latest_sdk_version.sh" ${{ env.MANTA_SDK_BRANCH }}`
53-
echo $LATEST_SDK_VERSION
54-
echo "LATEST_SDK_VERSION=$LATEST_SDK_VERSION" >> $GITHUB_ENV
55-
- name: Load proving keys from cache
56-
id: load-cache-proving-keys
57-
uses: actions/cache@v2
58-
env:
59-
cache-name: proving-keys
60-
with:
61-
path: ~/.local/share/manta-signer
62-
key: ${{ env.cache-name }}-${{ env.LATEST_SDK_VERSION }}
63-
- name: Get proving keys
64-
if: steps.load-cache-proving-keys.outputs.cache-hit != 'true'
65-
uses: actions/checkout@v2
66-
with:
67-
repository: Manta-Network/sdk
68-
path: sdk
69-
fetch-depth: 1
70-
lfs: true
71-
- name: Move proving keys
72-
if: steps.load-cache-proving-keys.outputs.cache-hit != 'true'
73-
run: "${GITHUB_WORKSPACE}/.github/workflows/e2e/move_proving_keys.sh"
74-
7544
- name: Get Dolphin node
7645
run: "${GITHUB_WORKSPACE}/.github/workflows/e2e/get_node.sh"
77-
7846
- name: Run test
7947
run: "${GITHUB_WORKSPACE}/.github/workflows/e2e/run_test.sh"

.github/workflows/e2e/get_latest_sdk_version.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/e2e/move_proving_keys.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/e2e/run_test.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@ cat out.json
77

88
# Run 3 headless copies of signer
99
cd ../../..
10-
cargo run --example test_server --release --features=unsafe-disable-cors -- http://127.0.0.1:29988 &
11-
cargo run --example test_server --release --features=unsafe-disable-cors -- http://127.0.0.1:29989 &
12-
cargo run --example test_server --release --features=unsafe-disable-cors -- http://127.0.0.1:29990 &
10+
./target/release/examples/test_server 127.0.0.1:29988 &
11+
./target/release/examples/test_server 127.0.0.1:29989 &
12+
./target/release/examples/test_server 127.0.0.1:29990 &
1313

1414
# Run node
15-
~/Manta/manta --chain dev --ws-port 9944 --port 30333 --alice \
16-
--tmp --rpc-cors all --unsafe-ws-external --unsafe-rpc-external \
17-
--rpc-methods=Unsafe &
15+
~/Manta/manta \
16+
--chain dev \
17+
--ws-port 9944 \
18+
--port 30333 \
19+
--alice \
20+
--tmp \
21+
--rpc-cors all \
22+
--unsafe-ws-external \
23+
--unsafe-rpc-external \
24+
--rpc-methods=Unsafe &
1825

1926
# Run test
2027
cd js

.github/workflows/release.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: Build and upload release binaries
2-
32
on:
43
pull_request:
54
branches:
6-
- master
5+
- main
76
release:
87
types: [published]
9-
108
jobs:
119
setup:
1210
name: Get version
@@ -21,6 +19,7 @@ jobs:
2119
needs: setup
2220
runs-on: ${{ matrix.os }}
2321
strategy:
22+
fail-fast: false
2423
matrix:
2524
include:
2625
- os: ubuntu-latest
@@ -78,20 +77,11 @@ jobs:
7877
${{ matrix.os }}-build-${{ env.cache-name }}-
7978
${{ matrix.os }}-build-
8079
${{ matrix.os }}-
81-
- name: Fetch Proving Keys
82-
uses: actions/checkout@v2
83-
with:
84-
repository: Manta-Network/sdk
85-
path: sdk
86-
fetch-depth: 1
87-
lfs: false
88-
- name: Move Proving Keys
89-
run: mv ./sdk/legacy/proving/* ui/src-tauri/
9080
- name: Hack For Ubuntu Builds
9181
run: cd ui/src-tauri; sed -i /icns/d tauri.conf.json
9282
if: matrix.os_type == 'ubuntu'
9383
- name: Ubuntu Build Dependencies
94-
run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev patchelf librsvg2-dev
84+
run: sudo apt-get update && sudo apt-get -y install libayatana-appindicator3-dev libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev patchelf librsvg2-dev
9585
if: matrix.os_type == 'ubuntu'
9686
- name: Suffix version
9787
id: suffixed
@@ -106,10 +96,15 @@ jobs:
10696
- name: Append version suffix
10797
run: node ./scripts/suffix.js ${{ steps.suffixed.outputs.SUFFIXED }}
10898
- name: Build & Sign
109-
run: cd ui;yarn && yarn tauri build
99+
run: cd ui;yarn && yarn add @tauri-apps/cli && yarn tauri build -v
110100
env:
111101
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
112102
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
103+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
104+
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
105+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
106+
APPLE_ID: ${{ secrets.APPLE_ID }}
107+
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
113108
- name: Get release
114109
id: get_release
115110
uses: bruceadams/get-release@v1.2.3

.github/workflows/tag.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Bump version
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: '0'
13+
- name: Bump version and push tag
14+
uses: anothrNick/github-tag-action@1.36.0
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
WITH_V: false

.rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
imports_granularity="Crate"
1+
imports_granularity = "Crate"
22
license_template_path = "FILE_TEMPLATE"
33

Cargo.toml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "manta-signer"
3-
edition = "2018"
4-
version = "0.5.2"
3+
edition = "2021"
4+
version = "0.6.0"
55
authors = ["Manta Network <contact@manta.network>"]
66
readme = "README.md"
77
license-file = "LICENSE"
@@ -25,34 +25,29 @@ is-it-maintained-open-issues = { repository = "Manta-Network/manta-signer" }
2525
maintenance = { status = "actively-developed" }
2626

2727
[features]
28-
# Disable CORS Check
28+
# Disable CORS Check: This is UNSAFE in general and should only be used in debug builds.
2929
unsafe-disable-cors = []
3030

3131
[dependencies]
32-
ark-serialize = { version = "0.3.0", default-features = false }
33-
async-std = { version = "1.10.0" }
34-
bip0039 = { version = "0.10.0" }
35-
bip32 = { version = "0.2.2" }
36-
bs58 = { version = "0.4.0" }
37-
cocoon = { version = "0.3.0" }
38-
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive", "full" ] }
32+
argon2 = { version = "0.3.4", default-features = false, features = ["alloc", "password-hash"] }
33+
async-std = { version = "1.11.0", default-features = false, features = ["attributes", "tokio1"] }
34+
chrono = { version = "0.4.19", default-features = false, features = ["clock"] }
3935
derivative = { version = "2.2.0", default-features = false, features = ["use_core"] }
40-
dirs-next = { version = "2.0.0" }
41-
futures = { version = "0.3.17", default-features = false }
36+
dirs-next = { version = "2.0.0", default-features = false }
37+
futures = { version = "0.3.17", default-features = false, features = ["alloc"] }
4238
http-types = { version = "2.12.0", default-features = false }
43-
manta-api = { git = "https://github.com/Manta-Network/manta-api", branch = "manta", default-features = false, features = ["signer", "testnet"] }
44-
manta-asset = { git = "https://github.com/Manta-Network/manta-types", branch = "manta" }
45-
manta-crypto = { git = "https://github.com/Manta-Network/manta-crypto", branch = "manta" }
46-
manta-data = { git = "https://github.com/Manta-Network/manta-types", branch = "manta" }
47-
rand = { version = "0.8.4", default-features = false }
48-
rand_chacha = { version = "0.3.1", default-features = false }
39+
manta-accounting = { git = "https://github.com/manta-network/manta-rs", default-features = false, features = ["cocoon-fs"] }
40+
manta-crypto = { git = "https://github.com/manta-network/manta-rs", default-features = false, features = ["getrandom"] }
41+
manta-pay = { git = "https://github.com/manta-network/manta-rs", default-features = false, features = ["bs58", "groth16", "serde", "wallet"] }
42+
manta-sdk = { git = "https://github.com/manta-network/sdk", default-features = false, features = ["download"] }
43+
manta-util = { git = "https://github.com/manta-network/manta-rs", default-features = false }
44+
parking_lot = { version = "0.12.0", default-features = false }
45+
password-hash = { version = "0.3.2", default-features = false, features = ["alloc"] }
4946
secrecy = { version = "0.8.0", default-features = false, features = ["alloc"] }
50-
serde = { version = "1.0.131", default-features = false, features = ["derive"] }
5147
serde_json = { version = "1.0.68", default-features = false }
52-
subtle = { version = "2.4.1" }
53-
tide = { version = "0.16.0" }
48+
subtle = { version = "2.4.1", default-features = false }
49+
tide = { version = "0.16.0", default-features = false, features = ["h1-server"] }
50+
tokio = { version = "1.17.0", default-features = false, features = ["fs", "io-std", "io-util", "rt", "sync", "time"] }
5451

5552
[dev-dependencies]
56-
async-std = { version = "1.10.0", features = ["attributes"] }
57-
tempfile = { version = "3.2.0" }
58-
53+
tempfile = { version = "3.3.0", default-features = false }

README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
manta-signer
2-
============
1+
# manta-signer
32

43
`manta-signer` is manta's native client that **turbo charges** zero-knowledge-proof generation.
54

6-
<img width="655" alt="Screen Shot 2021-11-21 at 3 50 01 PM" src="https://user-images.githubusercontent.com/720571/142786609-ce7455e1-dbe7-4a6d-8a78-4aa22984a3d7.png">
5+
<img width="655" src="https://user-images.githubusercontent.com/720571/142786609-ce7455e1-dbe7-4a6d-8a78-4aa22984a3d7.png">
76

8-
Disclaimer: `manta-signer` is experimental software, use it at your own risk.
7+
**Disclaimer: `manta-signer` is experimental software, use it at your own risk.**
98

109
## Project Organization
11-
```
12-
-src: manta-signer zkp generation
13-
-ui: manta-signer desktop UI
14-
-js: external Javascript libraries that interact with manta-signer
15-
```
16-
17-
<br/>
18-
To remove your private account data completely and set up a new account, you should remove these files.
19-
20-
```
21-
Mac: ~/Library/Application Support/manta-signer/root_seed.aes
22-
Linux: ~/.config/manta-signer/root_seed.aes
23-
Windows: ~/AppData/Roaming/manta-signer/root_seed.aes
24-
```
10+
11+
- `src`: `manta-signer` ZKP generation
12+
- `ui`: `manta-signer` Desktop UI
13+
- `js`: external Javascript libraries that interact with `manta-signer`
14+
15+
## Restarting Your Account
16+
17+
To remove your private account data completely and set up a new account, you should remove these files:
18+
19+
- macOS: `~/Library/Application Support/manta-signer/`
20+
- Linux: `~/.config/manta-signer/`
21+
- Windows: `~/AppData/Roaming/manta-signer/`

0 commit comments

Comments
 (0)