diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8dda17d..554698eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: - name: Install rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2023-11-10 + toolchain: stable components: rust-src - name: Checkout uses: actions/checkout@v4 diff --git a/Makefile b/Makefile index d47e8f04..237e3cae 100644 --- a/Makefile +++ b/Makefile @@ -26,4 +26,5 @@ copy-files: .PHONY: rust_tests rust_tests: - cd app && cargo test --no-default-features + cd app && cargo +stable test --no-default-features + diff --git a/app/Cargo.lock b/app/Cargo.lock index 500dcba5..93834dcf 100644 --- a/app/Cargo.lock +++ b/app/Cargo.lock @@ -861,6 +861,36 @@ dependencies = [ "walkdir", ] +[[package]] +name = "ironfish-dkg" +version = "0.0.0" +dependencies = [ + "aead", + "arrayref", + "blake2b_simd", + "blake2s_simd", + "chacha20poly1305", + "educe", + "ff 0.12.1", + "getrandom", + "group 0.12.1", + "hex", + "include_gif", + "insta", + "ironfish-frost", + "jubjub", + "lazy_static", + "ledger_device_sdk", + "lexical-core", + "nom", + "numtoa", + "rand", + "serde", + "serde-json-core", + "serde_json", + "spin", +] + [[package]] name = "ironfish-frost" version = "0.1.0" @@ -936,36 +966,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" -[[package]] -name = "ledger-ironfish-dkg" -version = "0.0.0" -dependencies = [ - "aead", - "arrayref", - "blake2b_simd", - "blake2s_simd", - "chacha20poly1305", - "educe", - "ff 0.12.1", - "getrandom", - "group 0.12.1", - "hex", - "include_gif", - "insta", - "ironfish-frost", - "jubjub", - "lazy_static", - "ledger_device_sdk", - "lexical-core", - "nom", - "numtoa", - "rand", - "serde", - "serde-json-core", - "serde_json", - "spin", -] - [[package]] name = "ledger_device_sdk" version = "1.17.1" diff --git a/app/Cargo.toml b/app/Cargo.toml index f94de36c..347c83c2 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "ledger-ironfish-dkg" +name = "ironfish-dkg" version = "0.0.0" # The version is being taken from Makefile.version file edition = "2021" [[bin]] -name = "ledger-ironfish-dkg" +name = "ironfish-dkg" test = false path = "bin-app/app.rs" @@ -91,7 +91,7 @@ icon = "nanox_icon.gif" icon = "stax_icon.gif" [package.metadata.ledger.flex] -icon = "stax_icon.gif" +icon = "flex_icon.gif" # TODO: This change shouldn't be necessary, the ledger targets clearly define atomics as only supporting 32 not 64 (as seen in /opt/rustup/toolchains/1.75.0-aarch64-unknown-linux-musl/lib/rustlib/nanosplus/target.json) # solve why this is happening rather than using modified radium diff --git a/app/Makefile b/app/Makefile index 0c3c1cbc..d3afa1e2 100644 --- a/app/Makefile +++ b/app/Makefile @@ -43,14 +43,14 @@ endif include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.app_testing ifndef COIN -COIN=IRON +COIN=IRON_DKG endif include $(CURDIR)/Makefile.version $(info COIN = [$(COIN)]) -ifeq ($(COIN),IRON) +ifeq ($(COIN),IRON_DKG) # Main app configuration APPNAME = "Ironfish DKG" APPPATH = "44'/1338'" @@ -88,23 +88,23 @@ include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.side_loading .PHONY: buildX buildX: - BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=s" cargo +nightly-2023-11-10 ledger build nanox + BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=s" cargo ledger build nanox FOLDER=nanox make post-build .PHONY: buildS2 buildS2: - BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=s" cargo +nightly-2023-11-10 ledger build nanosplus + BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=s" cargo ledger build nanosplus FOLDER=nanosplus make post-build .PHONY: buildST buildST: - BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=z" cargo +nightly-2023-11-10 ledger build stax + BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=z" cargo ledger build stax FOLDER=stax make post-build .PHONY: buildFL buildFL: - BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=z" cargo +nightly-2023-11-10 ledger build flex + BOLOS_SDK= APPVERSION_STR=$(APPVERSION_STR) PRODUCTION_BUILD=$(PRODUCTION_BUILD) RUSTFLAGS="-C opt-level=z" cargo ledger build flex FOLDER=flex make post-build @@ -134,45 +134,45 @@ format: .PHONY: lint-nanosplus lint-nanosplus: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target nanosplus -- -Dwarnings + APPVERSION=$(APPVERSION) cargo clippy --target nanosplus -- -Dwarnings .PHONY: lint-nanox lint-nanox: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target nanox -- -Dwarnings + APPVERSION=$(APPVERSION) cargo clippy --target nanox -- -Dwarnings .PHONY: lint-flex lint-flex: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target flex -- -Dwarnings + APPVERSION=$(APPVERSION) cargo clippy --target flex -- -Dwarnings .PHONY: lint-stax lint-stax: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target stax -- -Dwarnings + APPVERSION=$(APPVERSION) cargo clippy --target stax -- -Dwarnings .PHONY: lint-nanosplus-fix lint-nanosplus-fix: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target nanosplus --fix + APPVERSION=$(APPVERSION) cargo clippy --target nanosplus --fix .PHONY: lint-nanox-fix lint-nanox-fix: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target nanox --fix + APPVERSION=$(APPVERSION) cargo clippy --target nanox --fix .PHONY: lint-flex-fix lint-flex-fix: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target flex --fix + APPVERSION=$(APPVERSION) cargo clippy --target flex --fix .PHONY: lint-stax-fix lint-stax-fix: - APPVERSION=$(APPVERSION) cargo +nightly-2023-11-10 clippy --target stax --fix + APPVERSION=$(APPVERSION) cargo clippy --target stax --fix .PHONY: post-build post-build: move-files-to-output read-params-from-json get-icon-hex create-install-script .PHONY: move-files-to-output move-files-to-output: - cp target/$(FOLDER)/release/ledger-ironfish-dkg bin/app.elf - cp target/$(FOLDER)/release/ledger-ironfish-dkg.hex bin/app.hex - cp target/$(FOLDER)/release/ledger-ironfish-dkg.apdu bin/app.apdu + cp target/$(FOLDER)/release/ironfish-dkg bin/app.elf + cp target/$(FOLDER)/release/ironfish-dkg.hex bin/app.hex + cp target/$(FOLDER)/release/ironfish-dkg.apdu bin/app.apdu .PHONY: read-params-from-json read-params-from-json: diff --git a/app/Makefile.version b/app/Makefile.version index 21d89367..68013d6f 100644 --- a/app/Makefile.version +++ b/app/Makefile.version @@ -3,4 +3,4 @@ APPVERSION_M=0 # This is the minor version APPVERSION_N=5 # This is the patch version -APPVERSION_P=3 +APPVERSION_P=4 diff --git a/app/bin-app/app.rs b/app/bin-app/app.rs index a34d4600..901620fb 100644 --- a/app/bin-app/app.rs +++ b/app/bin-app/app.rs @@ -18,10 +18,10 @@ #![no_std] #![no_main] +use ironfish_dkg::{context::TxContext, AppSW}; use ledger_device_sdk::io::{Comm, Event}; -use ledger_ironfish_dkg::{context::TxContext, AppSW}; -use ledger_ironfish_dkg::ledger::*; +use ironfish_dkg::ledger::*; #[cfg(any(target_os = "stax", target_os = "flex"))] use ledger_device_sdk::nbgl::init_comm; diff --git a/app/rust-toolchain.toml b/app/rust-toolchain.toml index 91e21b4e..e2c3948f 100644 --- a/app/rust-toolchain.toml +++ b/app/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -# channel = "nightly-2023-11-10" -channel = "stable" +channel = "nightly-2023-11-10" +#channel = "stable" diff --git a/app/src/parser/snapshots/ledger_ironfish_dkg__parser__transaction__review_transaction_test__tx_ui.snap b/app/src/parser/snapshots/ironfish_dkg__parser__transaction__review_transaction_test__tx_ui.snap similarity index 97% rename from app/src/parser/snapshots/ledger_ironfish_dkg__parser__transaction__review_transaction_test__tx_ui.snap rename to app/src/parser/snapshots/ironfish_dkg__parser__transaction__review_transaction_test__tx_ui.snap index d70c8957..e782af4e 100644 --- a/app/src/parser/snapshots/ledger_ironfish_dkg__parser__transaction__review_transaction_test__tx_ui.snap +++ b/app/src/parser/snapshots/ironfish_dkg__parser__transaction__review_transaction_test__tx_ui.snap @@ -1,5 +1,6 @@ --- source: src/parser/transaction.rs +assertion_line: 355 expression: reduced input_file: src/parser/testvectors/transaction_simple.json --- diff --git a/tests_zemu/tests/basic.test.ts b/tests_zemu/tests/basic.test.ts index 5e4dc2a2..11dad959 100644 --- a/tests_zemu/tests/basic.test.ts +++ b/tests_zemu/tests/basic.test.ts @@ -59,7 +59,7 @@ describe('Basic', function () { expect(resp.testMode).toBe(false) expect(resp.major).toBe(0) expect(resp.minor).toBe(5) - expect(resp.patch).toBe(3) + expect(resp.patch).toBe(4) } finally { await sim.close() }