Skip to content

Commit 6080135

Browse files
authored
Merge pull request #2040 from mintlayer/update_trezor_ref_and_docs
Update trezor ref and docs
2 parents c28e937 + 36a7a5c commit 6080135

10 files changed

Lines changed: 124 additions & 68 deletions

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ env:
1818
jobs:
1919
build_windows:
2020
runs-on: windows-latest
21+
env:
22+
# With the default CARGO_HOME the job will fail due to Windows path length limit when
23+
# checking out the trezor firmware repo. E.g. one of the paths looks like this:
24+
# C:/Users/runneradmin/.cargo/git/checkouts/mintlayer-trezor-firmware-04bdf62619936e0b/596b3eb/vendor/libtropic/scripts/tropic01_model/provisioning_data/2025-06-27T07-51-29Z__prod_C2S_T200__provisioning__lab_batch_package/cert_chain/tropicsquare_root_ca_certificate_sn_101.der
25+
CARGO_HOME: C:\crg
2126
steps:
2227
- name: Checkout the repository
2328
uses: actions/checkout@v5
@@ -218,6 +223,19 @@ jobs:
218223
TREZOR_TESTS_USE_REAL_DEVICE: false
219224
TREZOR_TESTS_AUTO_CONFIRM: true
220225
steps:
226+
# Note: THP is the new protocol used by Safe 7, which we do not yet support, so we disable
227+
# it by setting THP to 0. This means that we're not emulating the real Safe 7 here, i.e. it's
228+
# just a hack to make the CI pass.
229+
# TODO:
230+
# 1) Remove this after THP support is implemented.
231+
# 2) Another thing that is different about Safe 7 is the use of an additional secure element
232+
# called Tropic. Tests on the firmware side build the firmware with DISABLE_TROPIC=0, which
233+
# then requires a Tropic model server to be run alongside the emulator. We might want to do
234+
# the same here, to make the emulator behave more like the real device.
235+
- name: Disable THP for T3W1
236+
if: ${{ matrix.model == 'T3W1' }}
237+
run: echo "THP=0" >> "$GITHUB_ENV"
238+
221239
# Note: cargo-nextest requires the source code to be present when running archived test binaries.
222240
- name: Checkout the core repository
223241
uses: actions/checkout@v5
@@ -271,18 +289,18 @@ jobs:
271289
run: nix-shell --arg fullDeps false --run "true"
272290
working-directory: ./mintlayer-trezor-firmware
273291
- name: Setup trezor repo build dependencies, part 2
274-
run: nix-shell --arg fullDeps false --run "poetry install"
292+
run: nix-shell --arg fullDeps false --run "uv sync"
275293
working-directory: ./mintlayer-trezor-firmware
276294

277295
- name: Build the firmware
278-
run: nix-shell --run "poetry run make -C core build_unix"
296+
run: nix-shell --run "uv run make -C core build_unix"
279297
working-directory: ./mintlayer-trezor-firmware
280298

281299
# Note: since we haven't installed Cargo in this job, we have to execute "cargo-nextest nextest"
282300
# instead of "cargo nextest".
283301
- name: Run tests in the emulator
284302
run: nix-shell --run "
285-
poetry run core/emu.py
303+
uv run core/emu.py
286304
--headless --quiet --temporary-profile
287305
--mnemonic \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\"
288306
--command env --chdir ../mintlayer-core

.github/workflows/code_checks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454

5555
static_checks_windows:
5656
runs-on: windows-latest
57+
env:
58+
# Same as in build_windows, using the default CARGO_HOME would make the job fail due to Windows
59+
# path length limit.
60+
CARGO_HOME: C:\crg
5761
steps:
5862
# This prevents git from changing line-endings to crlf, which messes cargo fmt checks
5963
- name: Set git to use LF

.github/workflows/wasm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: npm install typescript knip
5555

5656
- name: Install wasm-pack
57-
run: cargo install wasm-pack
57+
run: cargo install wasm-pack --locked
5858

5959
- name: Build the wasm module
6060
working-directory: ./wasm-wrappers
@@ -92,7 +92,7 @@ jobs:
9292
--default-toolchain $(python ./build-tools/cargo-info-extractor/extract.py --rust-version)
9393
9494
- name: Install wasm-pack
95-
run: cargo install wasm-pack
95+
run: cargo install wasm-pack --locked
9696

9797
- name: Build the wasm module for nodejs - release
9898
working-directory: ./wasm-wrappers

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -280,28 +280,30 @@ zeroize = "1.5"
280280

281281
[workspace.dependencies.ml_primitives]
282282
git = "https://github.com/mintlayer/mintlayer-core-primitives"
283-
# The commit "Add CoinType used for Ledger and encode/decode utils".
284-
rev = "13b10dbc88efdf3b5aa31ece8e34278bc69a5a9b"
283+
# The commit "Merge pull request #4 from mintlayer/fix_typo".
284+
rev = "8644bfe06d932d687075939d2d175183ba1c369d"
285285
package = "mintlayer-core-primitives"
286286

287287
[workspace.dependencies.ledger-lib]
288-
git = "https://github.com/ImplOfAnImpl/rust-ledger.git"
289-
rev = "035789ec436d47b938e8a3d2085ffb2fbf6f0559"
288+
git = "https://github.com/ledger-community/rust-ledger.git"
289+
# Note: we need this PR - https://github.com/ledger-community/rust-ledger/pull/14
290+
rev = "c8ed12e89788e78d77cdc0dc9fb8a4bd4dc24b89"
290291

291292
[workspace.dependencies.ledger-proto]
292-
git = "https://github.com/ImplOfAnImpl/rust-ledger.git"
293-
rev = "035789ec436d47b938e8a3d2085ffb2fbf6f0559"
293+
git = "https://github.com/ledger-community/rust-ledger.git"
294+
# The revision must be the same as for ledger-lib.
295+
rev = "c8ed12e89788e78d77cdc0dc9fb8a4bd4dc24b89"
294296

295297
[workspace.dependencies.mintlayer-ledger-messages]
296298
git = "https://github.com/mintlayer/mintlayer-ledger-app"
297-
# The commit "Move StatusWord to messages crate"
298-
rev = "dbc41342564b2198037ed4ad41b4cf0c34617870"
299+
# The commit "Merge pull request #3 from mintlayer/update_ml_primitives_rev"
300+
rev = "a544449d0c649c7c6b27ec0bd8e03f43861f60a7"
299301
package = "messages"
300302

301303
[workspace.dependencies.trezor-client]
302304
git = "https://github.com/mintlayer/mintlayer-trezor-firmware"
303-
# The commit "Bump ml_primitives and parity scale codec deps"
304-
rev = "a2e67f6cf804dd905791ec36bff1981871f5321c"
305+
# The commit "Merge pull request #25 from mintlayer/merge_with_v2.11.0_from_upstream"
306+
rev = "0e6c4d46ff75a94164f07c9bf0bd95cdba81fea3"
305307
features = ["bitcoin", "mintlayer"]
306308

307309
[workspace.metadata.dist.dependencies.apt]
@@ -346,10 +348,13 @@ opt-level = 2
346348
# TODO: investigate this further.
347349
fontconfig-parser = { git = "https://github.com/Riey/fontconfig-parser", rev = "f7d13a779e6ee282ce75acbc00a1270c0350e0c2" }
348350

349-
# This patch is needed because there is no release of the library and because ledger-lib depends on ledger-proto, so this is the only way to make the former find the latter.
350-
# Note that the revision specified here must be the same as the one used in the workspace.dependencies section
351-
ledger-proto = { git = "https://github.com/ImplOfAnImpl/rust-ledger.git", rev = "035789ec436d47b938e8a3d2085ffb2fbf6f0559" }
352-
# The specific commit is chosen because it contains a fix for the Ledger NanoX,
353-
# and we use the same version across all Trezor, Ledger and Mintlayerr core primitives repos
354-
# If a different version is used the tests in Mintlayer core will stop compiling
351+
# This patch is needed because there is no release of the library and because ledger-lib depends on ledger-proto, so this
352+
# is the only way to make the former find the latter.
353+
# Note that the revision specified here must be the same as the one used in the workspace.dependencies section.
354+
ledger-proto = { git = "https://github.com/ledger-community/rust-ledger.git", rev = "c8ed12e89788e78d77cdc0dc9fb8a4bd4dc24b89" }
355+
356+
# Use a specific commit because we need a fix (github.com/paritytech/parity-scale-codec/pull/751)
357+
# that has not been released yet (should be part of the release coming after v3.7.5).
358+
# Note that the fix is needed for the Ledger app, but we have to use the same version of parity-scale-codec
359+
# across Trezor, Ledger, mintlayer-core and mintlayer-core-primitives repos.
355360
parity-scale-codec = { git = "https://github.com/paritytech/parity-scale-codec.git", rev = "5021525697edc0661591ebc71392c48d950a10b0" }

deny.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ db-path = "~/.cargo/advisory-dbs"
4444
db-urls = ["https://github.com/RustSec/advisory-db"]
4545
yanked = "warn"
4646
ignore = [
47-
"RUSTSEC-2024-0436", # "paste" is no longer maintained
48-
"RUSTSEC-2025-0141", # "bincode" is no longer maintained
47+
# "paste" is no longer maintained.
48+
"RUSTSEC-2024-0436",
49+
50+
# "bincode" is no longer maintained.
51+
"RUSTSEC-2025-0141",
52+
53+
# `rand` is unsound.
54+
# Note: to fix the error we need to upgrade `rand` to either 0.9.3 or 0.10.1, which is non-trivial
55+
# because some of our dependencies still use 0.8.x and earlier versions.
56+
"RUSTSEC-2026-0097"
4957
]

supply-chain/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,11 +713,11 @@ version = "0.10.4"
713713
criteria = "safe-to-deploy"
714714

715715
[[exemptions.ledger-lib]]
716-
version = "0.1.0@git:035789ec436d47b938e8a3d2085ffb2fbf6f0559"
716+
version = "0.1.0@git:c8ed12e89788e78d77cdc0dc9fb8a4bd4dc24b89"
717717
criteria = "safe-to-deploy"
718718

719719
[[exemptions.ledger-proto]]
720-
version = "0.1.0@git:035789ec436d47b938e8a3d2085ffb2fbf6f0559"
720+
version = "0.1.0@git:c8ed12e89788e78d77cdc0dc9fb8a4bd4dc24b89"
721721
criteria = "safe-to-deploy"
722722

723723
[[exemptions.libdbus-sys]]

supply-chain/imports.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,8 +1430,8 @@ user-login = "cpu"
14301430
user-name = "Daniel McCarney"
14311431

14321432
[[publisher.rustls-webpki]]
1433-
version = "0.103.10"
1434-
when = "2026-03-20"
1433+
version = "0.103.12"
1434+
when = "2026-04-14"
14351435
user-id = 2751
14361436
user-login = "ctz"
14371437
user-name = "Joe Birr-Pixton"

0 commit comments

Comments
 (0)