Merge updates manually
This commit is contained in:
80
.github/workflows/rust.yml
vendored
Normal file
80
.github/workflows/rust.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
name: Rust
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: 1.38.0
|
||||||
|
override: true
|
||||||
|
- name: cargo fetch
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fetch
|
||||||
|
- name: Build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --verbose --release --all
|
||||||
|
- name: Run tests
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --verbose --release --all
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}-silentdragonlite-cli
|
||||||
|
path: target/release/silentdragonlite-cli
|
||||||
|
|
||||||
|
linux_arm7:
|
||||||
|
name: Linux ARMv7
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: armv7-unknown-linux-gnueabihf
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
use-cross: true
|
||||||
|
command: build
|
||||||
|
args: --release --target armv7-unknown-linux-gnueabihf
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: linux_armv7-silentdragonlite-cli
|
||||||
|
path: target/armv7-unknown-linux-gnueabihf/release/silentdragonlite-cli
|
||||||
|
|
||||||
|
linux_aarch64:
|
||||||
|
name: Linux ARM64
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: aarch64-unknown-linux-gnu
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
use-cross: true
|
||||||
|
command: build
|
||||||
|
args: --release --target aarch64-unknown-linux-gnu
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: linux_aarch64-silentdragonlite-cli
|
||||||
|
path: target/aarch64-unknown-linux-gnu/release/silentdragonlite-cli
|
||||||
|
|
||||||
23
Cargo.toml
23
Cargo.toml
@@ -1,21 +1,8 @@
|
|||||||
[package]
|
[workspace]
|
||||||
name = "silentdragonlite-cli"
|
members = [
|
||||||
version = "1.1.0"
|
"lib",
|
||||||
edition = "2018"
|
"cli",
|
||||||
|
]
|
||||||
[dependencies]
|
|
||||||
rustyline = "5.0.2"
|
|
||||||
clap = "2.33"
|
|
||||||
log = "0.4"
|
|
||||||
log4rs = "0.8.3"
|
|
||||||
shellwords = "1.0.0"
|
|
||||||
json = "0.12.0"
|
|
||||||
http = "0.1"
|
|
||||||
byteorder = "1"
|
|
||||||
tiny-bip39 = "0.6.2"
|
|
||||||
|
|
||||||
silentdragonlitelib = { path = "./lib/" }
|
|
||||||
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
debug = false
|
debug = false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
## Zecwallet-cli BIP39 derivation bug
|
## silentdragonlite-cli BIP39 derivation bug
|
||||||
|
|
||||||
In v1.0 of zecwallet-cli, there was a bug that incorrectly derived HD wallet keys after the first key. That is, the first key, address was correct, but subsequent ones were not.
|
In v1.0 of silentdragonlite-cli, there was a bug that incorrectly derived HD wallet keys after the first key. That is, the first key, address was correct, but subsequent ones were not.
|
||||||
|
|
||||||
The issue was that the 32-byte seed was directly being used to derive then subsequent addresses instead of the 64-byte pkdf2(seed). The issue affected both t and z addresses.
|
The issue was that the 32-byte seed was directly being used to derive then subsequent addresses instead of the 64-byte pkdf2(seed). The issue affected both t and z addresses.
|
||||||
|
|
||||||
@@ -8,6 +8,6 @@ Note that no funds are at risk. The issue is that, if in the future, you import
|
|||||||
|
|
||||||
## Fix
|
## Fix
|
||||||
If you start a wallet that has this bug, you'll be notified.
|
If you start a wallet that has this bug, you'll be notified.
|
||||||
The bug can be automatically fixed by the wallet by running the `fixbip39bug` command. Just start `zecwallet-cli` and type `fixbip39bug`.
|
The bug can be automatically fixed by the wallet by running the `fixbip39bug` command. Just start `silentdragonlite-cli` and type `fixbip39bug`.
|
||||||
|
|
||||||
If you have any funds in the incorrect addresses, they'll be sent to yourself, and the correct addresses re-derived.
|
If you have any funds in the incorrect addresses, they'll be sent to yourself, and the correct addresses re-derived.
|
||||||
18
cli/Cargo.toml
Normal file
18
cli/Cargo.toml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[package]
|
||||||
|
name = "silentdragonlite-cli"
|
||||||
|
version = "1.1.0"
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rustyline = "5.0.2"
|
||||||
|
clap = "2.33"
|
||||||
|
log = "0.4"
|
||||||
|
log4rs = "0.8.3"
|
||||||
|
shellwords = "1.0.0"
|
||||||
|
json = "0.12.0"
|
||||||
|
http = "0.1"
|
||||||
|
byteorder = "1"
|
||||||
|
tiny-bip39 = "0.6.2"
|
||||||
|
|
||||||
|
silentdragonlitelib = { path = "../lib/" }
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ RUN cd /opt && wget https://download.libsodium.org/libsodium/releases/libsodium-
|
|||||||
tar xvf libsodium-1.0.17-mingw.tar.gz
|
tar xvf libsodium-1.0.17-mingw.tar.gz
|
||||||
|
|
||||||
# Cargo fetch the dependencies so we don't download them over and over again
|
# Cargo fetch the dependencies so we don't download them over and over again
|
||||||
RUN cd /tmp && git clone https://github.com/adityapk00/zecwallet-light-cli.git && \
|
RUN cd /tmp && git clone https://github.com/adityapk00/silentdragonlite-light-cli.git && \
|
||||||
cd zecwallet-light-cli && \
|
cd silentdragonlite-light-cli && \
|
||||||
cargo fetch && \
|
cargo fetch && \
|
||||||
cd /tmp && rm -rf zecwallet-light-cli
|
cd /tmp && rm -rf silentdragonlite-light-cli
|
||||||
|
|||||||
@@ -73,6 +73,3 @@ tower-grpc-build = { git = "https://github.com/tower-rs/tower-grpc", features =
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
debug = true
|
|
||||||
@@ -356,7 +356,11 @@ impl Command for LockCommand {
|
|||||||
|
|
||||||
fn exec(&self, args: &[&str], lightclient: &LightClient) -> String {
|
fn exec(&self, args: &[&str], lightclient: &LightClient) -> String {
|
||||||
if args.len() != 0 {
|
if args.len() != 0 {
|
||||||
return self.help();
|
let mut h = vec![];
|
||||||
|
h.push("Extra arguments to lock. Did you mean 'encrypt'?");
|
||||||
|
h.push("");
|
||||||
|
|
||||||
|
return format!("{}\n{}", h.join("\n"), self.help());
|
||||||
}
|
}
|
||||||
|
|
||||||
match lightclient.wallet.write().unwrap().lock() {
|
match lightclient.wallet.write().unwrap().lock() {
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ impl LightClient {
|
|||||||
info!("Created LightClient to {}", &config.server);
|
info!("Created LightClient to {}", &config.server);
|
||||||
|
|
||||||
if crate::lightwallet::bugs::BugBip39Derivation::has_bug(&lc) {
|
if crate::lightwallet::bugs::BugBip39Derivation::has_bug(&lc) {
|
||||||
let m = format!("WARNING!!!\nYour wallet has a bip39derivation bug that's showing incorrect addresses.\nPlease run 'fixbip39bug' to automatically fix the address derivation in your wallet!\nPlease see: https://github.com/adityapk00/zecwallet-light-cli/blob/master/bip39bug.md");
|
let m = format!("WARNING!!!\nYour wallet has a bip39derivation bug that's showing incorrect addresses.\nPlease run 'fixbip39bug' to automatically fix the address derivation in your wallet!\nPlease see: https://github.com/adityapk00/silentdragonlite-light-cli/blob/master/bip39bug.md");
|
||||||
info!("{}", m);
|
info!("{}", m);
|
||||||
println!("{}", m);
|
println!("{}", m);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1388,10 +1388,10 @@ impl LightWallet {
|
|||||||
let mut builder = Builder::new(height);
|
let mut builder = Builder::new(height);
|
||||||
|
|
||||||
// A note on t addresses
|
// A note on t addresses
|
||||||
// Funds received by t-addresses can't be explicitly spent in ZecWallet.
|
// Funds received by t-addresses can't be explicitly spent in silentdragonlite.
|
||||||
// ZecWallet will lazily consolidate all t address funds into your shielded addresses.
|
// silentdragonlite will lazily consolidate all t address funds into your shielded addresses.
|
||||||
// Specifically, if you send an outgoing transaction that is sent to a shielded address,
|
// Specifically, if you send an outgoing transaction that is sent to a shielded address,
|
||||||
// ZecWallet will add all your t-address funds into that transaction, and send them to your shielded
|
// silentdragonlite will add all your t-address funds into that transaction, and send them to your shielded
|
||||||
// address as change.
|
// address as change.
|
||||||
let tinputs: Vec<_> = self.get_utxos().iter()
|
let tinputs: Vec<_> = self.get_utxos().iter()
|
||||||
.filter(|utxo| utxo.unconfirmed_spent.is_none()) // Remove any unconfirmed spends
|
.filter(|utxo| utxo.unconfirmed_spent.is_none()) // Remove any unconfirmed spends
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
///
|
///
|
||||||
/// In v1.0 of zecwallet-cli, there was a bug that incorrectly derived HD wallet keys after the first key. That is, the
|
/// In v1.0 of silentdragonlite-cli, there was a bug that incorrectly derived HD wallet keys after the first key. That is, the
|
||||||
/// first key, address was correct, but subsequent ones were not.
|
/// first key, address was correct, but subsequent ones were not.
|
||||||
///
|
///
|
||||||
/// The issue was that the 32-byte seed was directly being used to derive then subsequent addresses instead of the
|
/// The issue was that the 32-byte seed was directly being used to derive then subsequent addresses instead of the
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ mkdir -p target/macOS-silentdragonlite-cli-v$APP_VERSION
|
|||||||
cp target/release/silentdragonlite-cli target/macOS-silentdragonlite-cli-v$APP_VERSION/
|
cp target/release/silentdragonlite-cli target/macOS-silentdragonlite-cli-v$APP_VERSION/
|
||||||
|
|
||||||
# For Windows and Linux, build via docker
|
# For Windows and Linux, build via docker
|
||||||
docker run --rm -v $(pwd)/:/opt/zecwallet-light-cli rustbuild:latest bash -c "cd /opt/zecwallet-light-cli && cargo build --release && SODIUM_LIB_DIR='/opt/libsodium-win64/lib/' cargo build --release --target x86_64-pc-windows-gnu"
|
docker run --rm -v $(pwd)/:/opt/silentdragonlite-light-cli rustbuild:latest bash -c "cd /opt/silentdragonlite-light-cli && cargo build --release && SODIUM_LIB_DIR='/opt/libsodium-win64/lib/' cargo build --release --target x86_64-pc-windows-gnu"
|
||||||
|
|
||||||
# Now sign and zip the binaries
|
# Now sign and zip the binaries
|
||||||
# macOS
|
# macOS
|
||||||
|
|||||||
Reference in New Issue
Block a user