From 0565fe1bd211e056b61ac351d255849b59fed0ed Mon Sep 17 00:00:00 2001 From: Jason <98767015+dfx-json@users.noreply.github.com> Date: Tue, 17 Jan 2023 13:38:29 -0800 Subject: [PATCH] chore: attempt to link openssl 1.1 statically (#149) * chore: attempt to link openssl 1.1 statically * chore: update make install command * chore: add build command to ci workflow * chore: add build command to ci workflow * chore: add build step to ci * chore: skip make test * chore: skip make test * chore: typo * chore: update version * chore: set environment variables for static openssl in a separate step * chore: change path for OPENSSL_DIR * chore: typo * chore: use separate env vars * chore: bump openssl * chore: update README.md * chore: use set-env workflow command * chore: use openssl/vendored * chore: make openssl/vendored default in Cargo.toml * chore: remove build instructions --- CHANGELOG.md | 4 +++ Cargo.lock | 10 +++---- Cargo.toml | 5 ++-- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 81 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d3e837d..376cb1d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [0.3.2] - 2023-01-13 + +### Changed +- Bump `openssl` crate to 0.10.45 ## [0.3.1] - 2022-12-20 diff --git a/Cargo.lock b/Cargo.lock index fd9ee3fa..397c9222 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2960,9 +2960,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.40" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -3001,9 +3001,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.74" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", "cc", @@ -3336,7 +3336,7 @@ dependencies = [ [[package]] name = "quill" -version = "0.3.1" +version = "0.3.2" dependencies = [ "anyhow", "base64 0.13.0", diff --git a/Cargo.toml b/Cargo.toml index f8048e27..ab51bbe0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "quill" -version = "0.3.1" +version = "0.3.2" authors = ["DFINITY Team"] edition = "2018" @@ -26,7 +26,7 @@ ic-nns-governance = { git = "https://github.com/dfinity/ic", rev = "7fb55980481a ic-types = "0.4.1" ledger-canister = { git = "https://github.com/dfinity/ic", rev = "7fb55980481a526cda59e538114e7c3282d38f22" } num-bigint = "0.4.3" -openssl = "0.10.38" +openssl = "0.10.45" pem = "1.0.1" qrcodegen = "1.8" rand = { version = "0.8.4", features = ["getrandom"] } @@ -47,3 +47,4 @@ tempfile = "3.3.0" [features] static-ssl = ["openssl/vendored"] +default = ["static-ssl"] \ No newline at end of file diff --git a/README.md b/README.md index 8dee3617..4b5a9926 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ Minimalistic ledger and governance toolkit for cold wallets. +`quill` is a toolkit for interacting with the Network Nervous System's (NNS) canisters using self-custody keys. These +keys +can be held in an air-gapped computer (a computer +that has never connected to the internet) known as a cold wallet. To support cold wallets, `quill` takes a two-phase +approach to sending query/update calls to the IC. In the first phase, `quill` is used with the various subcommands to +generate and sign messages based on user input, without needing access to the internet. In the second phase, the signed +message(s) are sent to the IC. Since this requires connection to boundary nodes via the internet, cold-wallet users will +transport the signed message(s) from the air-gapped computer (i.e. with a USB stick) to a computer connected with the +internet + ## Disclaimer YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT USE OF THIS SOFTWARE IS AT YOUR SOLE RISK. @@ -27,7 +37,7 @@ To get the principal and the account id: ### Governance -This is how you’d stake/topup a neuron: +This is how you’d stake/top-up a neuron: quill --pem-file neuron-stake --amount 2.5 --name 1 @@ -35,11 +45,63 @@ Managing the neuron: quill --pem-file neuron-manage [OPERATIONS] -All of the commands above will generate signed messages, which can be sent on the online machine using the `send` command from above. +All the commands above will generate signed messages, which can be sent on the online machine using the `send` command +from above. + +## Download & Install + +Use pre-built binaries from the latest [release](https://github.com/dfinity/quill/releases). + +### MacOS (Intel Chip & Apple Silicon) + +#### Install quill +1. Download the file named `quill-macos-x86_64` +2. Move the file to your `/usr/local/bin` directory to make it available system-wide + +```shell +sudo mv quill-macos-x86_64 /usr/local/bin/quill +``` + +3. Make the file executable + +```shell +chmod +x /usr/local/bin/quill +``` + +4. Run quill + +```shell +quill -h +``` + +### Linux + +1. Download the file specific to your system architecture + 1. for x86 download `quill-linux-x86_64` + 2. for arm32 download `quill-arm_32` + +2. Move the file to your `/usr/local/bin` directory to make it available system-wide + +```shell +sudo mv quill-linux-x86_64 /usr/local/bin/quill +``` + +3. Make the file executable + +```shell +chmod +x /usr/local/bin/quill +``` + +4. Run quill + +```shell +quill -h +``` -## Download +### Windows -Use binaries from the latest [release](https://github.com/dfinity/quill/releases). +1. Download the file named `quill-windows-x86_64.exe` +2. Double-click the downloaded file to launch the executable ## Build @@ -77,14 +139,15 @@ example: ## Contribution `quill` is a very critical link in the workflow of the management of valuable assets. -`quill`'s code must stay clean, simple, readable and leave no room for ambiguities, so that it can be reviewed and audited by anyone. +`quill`'s code must stay clean, simple, readable and leave no room for ambiguities, so that it can be reviewed and +audited by anyone. Hence, if you would like to propose a change, please adhere to the following principles: 1. Be concise and only add functional code. 2. Optimize for correctness, then for readability. 3. Avoid adding dependencies at all costs unless it's completely unreasonable to do so. 4. Every new feature (+ a test) is proposed only after it was tested on real wallets. -5. Increment the last digit of the crate version whenever the functionality scope changes. +5. Increment the last digit of the crate version whenever the functionality scope changes. ## Credit