Skip to content

Commit 56f66cc

Browse files
Merge pull request #359 from LedgerHQ/develop
App release 1.10.0
2 parents a78ca5b + a50ce1d commit 56f66cc

File tree

142 files changed

+7788
-1326
lines changed

Some content is hidden

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

142 files changed

+7788
-1326
lines changed

.github/workflows/auto-author-assign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
assign-author:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: toshimaru/[email protected]
14+
- uses: toshimaru/[email protected]
Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,34 @@
11
name: Compilation
22

33
on:
4-
workflow_dispatch:
54
push:
65
branches:
76
- master
87
pull_request:
98
branches:
109
- master
1110
- develop
11+
workflow_dispatch:
1212

1313
jobs:
14-
nano_debug_build:
15-
name: Build debug application for NanoS, X and S+
14+
nano_release_build:
15+
name: Build release application for NanoS, X and S+
1616
strategy:
1717
matrix:
18-
include:
19-
- SDK: "$NANOS_SDK"
20-
artifact: nanos
21-
- SDK: "$NANOX_SDK"
22-
artifact: nanox
23-
- SDK: "$NANOSP_SDK"
24-
artifact: nanosp
18+
sdk: ["$NANOS_SDK", "$NANOX_SDK", "$NANOSP_SDK"]
2519
runs-on: ubuntu-latest
2620
container:
27-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
21+
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
2822

2923
steps:
3024
- name: Clone
3125
uses: actions/checkout@v2
32-
with:
33-
submodules: recursive
3426

35-
- name: Build an altcoin
27+
- name: Build Ethereum
3628
run: |
37-
make BOLOS_SDK=${{ matrix.SDK }} DEBUG=1 ALLOW_DATA=1 CHAIN=ethereum_classic
38-
mv bin/app.elf ethereum_classic_${{ matrix.artifact }}.elf
29+
make -j BOLOS_SDK=${{ matrix.sdk }}
3930
40-
- name: Upload altcoin binary
41-
uses: actions/upload-artifact@v2
42-
with:
43-
name: ethereum_classic_${{ matrix.artifact }}
44-
path: ./ethereum_classic_${{ matrix.artifact }}.elf
45-
46-
- name: Build Ethereum
31+
- name: Build an altcoin
4732
run: |
4833
make clean
49-
make BOLOS_SDK=${{ matrix.SDK }} DEBUG=1 ALLOW_DATA=1
50-
mv bin/app.elf ethereum_${{ matrix.artifact }}.elf
51-
52-
- name: Upload app binary
53-
uses: actions/upload-artifact@v2
54-
with:
55-
name: ethereum_${{ matrix.artifact }}
56-
path: ./ethereum_${{ matrix.artifact }}.elf
34+
make -j BOLOS_SDK=${{ matrix.sdk }} CHAIN=polygon

.github/workflows/ci-workflow.yml

Lines changed: 135 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
name: Tests
22

33
on:
4-
workflow_dispatch:
54
push:
65
branches:
76
- master
87
pull_request:
98
branches:
109
- master
1110
- develop
11+
workflow_dispatch:
1212

1313
jobs:
1414
scan-build:
1515
name: Clang Static Analyzer
1616
runs-on: ubuntu-latest
17-
1817
container:
19-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
18+
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
2019

2120
steps:
2221
- uses: actions/checkout@v2
@@ -25,6 +24,7 @@ jobs:
2524
run: |
2625
make clean
2726
scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default
27+
2828
- uses: actions/upload-artifact@v2
2929
if: failure()
3030
with:
@@ -39,7 +39,7 @@ jobs:
3939
name: Building binaries for E2E Zemu tests
4040
runs-on: ubuntu-latest
4141
container:
42-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
42+
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
4343

4444
steps:
4545
- uses: actions/checkout@v2
@@ -52,19 +52,21 @@ jobs:
5252
- name: Upload app binaries
5353
uses: actions/upload-artifact@v2
5454
with:
55-
name: e2e_elfs
55+
name: e2e_zemu_elfs
5656
path: ./tests/zemu/elfs/
5757

5858
jobs-e2e-zemu-tests:
5959
name: E2E Zemu tests
6060
needs: [building_for_e2e_zemu_tests]
6161
runs-on: ubuntu-latest
62+
6263
steps:
6364
- name: Test
6465
run: |
6566
id
6667
echo $HOME
6768
echo $DISPLAY
69+
6870
- name: Checkout
6971
uses: actions/checkout@v2
7072

@@ -90,7 +92,7 @@ jobs:
9092
path: tmp/
9193

9294
- name: Gather elfs
93-
run: cp `find tmp/e2e_elfs/ -name "*.elf"` tests/zemu/elfs/
95+
run: cp `find tmp/e2e_zemu_elfs/ -name "*.elf"` tests/zemu/elfs/
9496

9597
- name: Run zemu tests
9698
run: cd tests/zemu/ && yarn test
@@ -104,31 +106,31 @@ jobs:
104106
name: Building binaries for E2E Speculos tests
105107
runs-on: ubuntu-latest
106108
container:
107-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
109+
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
108110

109111
steps:
110112
- uses: actions/checkout@v2
111113

112114
- name: Build testing binaries
113115
run: |
114116
mkdir tests/speculos/elfs
115-
make clean && make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOS_SDK && mv bin/app.elf tests/speculos/elfs/nanos.elf
116-
make clean && make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOX_SDK && mv bin/app.elf tests/speculos/elfs/nanox.elf
117-
make clean && make DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOSP_SDK && mv bin/app.elf tests/speculos/elfs/nanosp.elf
117+
make clean && make -j DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOS_SDK && mv bin/app.elf tests/speculos/elfs/nanos.elf
118+
make clean && make -j DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOX_SDK && mv bin/app.elf tests/speculos/elfs/nanox.elf
119+
make clean && make -j DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK=$NANOSP_SDK && mv bin/app.elf tests/speculos/elfs/nanosp.elf
118120
119121
- name: Upload app binaries
120122
uses: actions/upload-artifact@v2
121123
with:
122-
name: e2e_elfs
124+
name: e2e_speculos_elfs
123125
path: ./tests/speculos/elfs
124126

125127

126128
jobs-e2e-speculos-tests:
127129
name: Speculos tests
128130
strategy:
129131
matrix:
130-
model: ["nanosp", "nanos", "nanox"]
131-
132+
model: ["nanosp", "nanos", "nanox"]
133+
132134
needs: [building_for_e2e_speculos_tests]
133135
runs-on: ubuntu-latest
134136

@@ -145,7 +147,7 @@ jobs:
145147
path: tmp/
146148

147149
- name: Gather elfs
148-
run: cp `find tmp/e2e_elfs/ -name "*.elf"` tests/speculos/elfs/
150+
run: cp `find tmp/e2e_speculos_elfs/ -name "*.elf"` tests/speculos/elfs/
149151

150152
- name: Install dependencies
151153
run: |
@@ -154,6 +156,123 @@ jobs:
154156
pip install --extra-index-url https://test.pypi.org/simple/ -r requirements.txt
155157
156158
- name: Run speculos tests
157-
run: |
159+
run: |
158160
cd tests/speculos
159-
pytest --model ${{ matrix.model }} --path ./elfs/${{ matrix.model }}.elf --display headless
161+
pytest --model ${{ matrix.model }} --path ./elfs/${{ matrix.model }}.elf --display headless
162+
163+
164+
# =====================================================
165+
# RAGGER TESTS
166+
# =====================================================
167+
168+
build_ragger_elfs:
169+
name: Building binaries for Ragger tests
170+
runs-on: ubuntu-latest
171+
container:
172+
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest
173+
174+
steps:
175+
- name: Clone
176+
uses: actions/checkout@v2
177+
178+
- name: Build test binaries
179+
run: |
180+
make -j BOLOS_SDK=$NANOS_SDK CAL_TESTING_KEY=1
181+
mv bin/app.elf app-nanos.elf
182+
make clean
183+
make -j BOLOS_SDK=$NANOX_SDK CAL_TESTING_KEY=1
184+
mv bin/app.elf app-nanox.elf
185+
make clean
186+
make -j BOLOS_SDK=$NANOSP_SDK CAL_TESTING_KEY=1
187+
mv bin/app.elf app-nanosp.elf
188+
189+
- name: Upload app binaries
190+
uses: actions/upload-artifact@v2
191+
with:
192+
name: ragger_elfs
193+
path: ./app-*.elf
194+
195+
create_ragger_env:
196+
name: Cache Ragger environment
197+
runs-on: ubuntu-latest
198+
199+
steps:
200+
- name: Clone
201+
uses: actions/checkout@v2
202+
203+
- name: APT update
204+
run: |
205+
sudo apt update
206+
207+
- name: Create virtual env with dependencies
208+
run: |
209+
cd tests/ragger
210+
python3 -m venv ./venv
211+
. ./venv/bin/activate
212+
pip3 install --extra-index-url https://test.pypi.org/simple/ -r requirements.txt speculos
213+
# Used for the cache key
214+
echo "py_deps=$(pip freeze | md5sum | cut -d' ' -f1)" >> $GITHUB_ENV
215+
216+
- name: Download QEMU
217+
run: |
218+
sudo apt install --download-only -y qemu-user-static
219+
mkdir -p tests/ragger/packages
220+
cp /var/cache/apt/archives/*.deb tests/ragger/packages/
221+
# Used for the cache key
222+
echo "deb_deps=$(find /var/cache/apt/archives/ -maxdepth 0 -type f -name '*.deb' | md5sum | cut -d' ' -f 1)" >> $GITHUB_ENV
223+
224+
- name: Set up cache
225+
uses: actions/cache@v3
226+
with:
227+
key: ${{ runner.os }}-raggenv-${{ env.py_deps }}-${{ env.deb_deps }}
228+
path: |
229+
tests/ragger/venv/
230+
tests/ragger/packages/
231+
outputs:
232+
py_deps: ${{ env.py_deps }}
233+
deb_deps: ${{ env.deb_deps }}
234+
235+
236+
jobs-ragger-tests:
237+
name: Ragger tests
238+
strategy:
239+
matrix:
240+
model: ["nanos", "nanox", "nanosp"]
241+
needs: [build_ragger_elfs, create_ragger_env]
242+
runs-on: ubuntu-latest
243+
244+
steps:
245+
- name: Clone
246+
uses: actions/checkout@v2
247+
248+
- name: Download previously built artifacts
249+
uses: actions/download-artifact@v2
250+
with:
251+
name: ragger_elfs
252+
path: tmp/
253+
254+
- name: Put them where they belong
255+
run: |
256+
mkdir -p tests/ragger/elfs
257+
find tmp/ -type f -name '*.elf' -exec cp {} tests/ragger/elfs/ \;
258+
259+
- name: Get cached environment
260+
uses: actions/cache@v3
261+
with:
262+
key: ${{ runner.os }}-raggenv-${{ needs.create_ragger_env.outputs.py_deps }}-${{ needs.create_ragger_env.outputs.deb_deps }}
263+
path: |
264+
tests/ragger/venv/
265+
tests/ragger/packages/
266+
267+
- name: Install QEMU
268+
run: |
269+
sudo mv tests/ragger/packages/*.deb /var/cache/apt/archives/
270+
sudo apt install -y qemu-user-static
271+
272+
- name: Run tests
273+
env:
274+
CAL_SIGNATURE_TEST_KEY: ${{ secrets.CAL_SIGNATURE_TEST_KEY }}
275+
run: |
276+
cd tests/ragger
277+
. ./venv/bin/activate
278+
pytest --path ./elfs --model ${{ matrix.model }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [1.10.0](https://github.com/ledgerhq/app-ethereum/compare/1.9.20...1.10.0) - 2022-10-26
9+
10+
### Changed
11+
12+
- EIP-712 signatures are now computed on-device and display their content (clear-signing) (LNX & LNS+)
13+
814
## [1.9.20](https://github.com/ledgerhq/app-ethereum/compare/1.9.19...1.9.20) - 2022-10-10
915

1016
### Added

Makefile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ APP_LOAD_PARAMS += --path "1517992542'/1101353413'"
3333
##################
3434

3535
APPVERSION_M=1
36-
APPVERSION_N=9
37-
APPVERSION_P=20
36+
APPVERSION_N=10
37+
APPVERSION_P=0
3838
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)
3939
APP_LOAD_FLAGS= --appFlags 0xa40 --dep Ethereum:$(APPVERSION)
4040

@@ -137,6 +137,22 @@ DEFINES += HAVE_NFT_TESTING_KEY
137137
endif
138138
endif
139139

140+
# Dynamic memory allocator
141+
ifneq ($(TARGET_NAME),TARGET_NANOS)
142+
DEFINES += HAVE_DYN_MEM_ALLOC
143+
endif
144+
145+
# EIP-712
146+
ifneq ($(TARGET_NAME),TARGET_NANOS)
147+
DEFINES += HAVE_EIP712_FULL_SUPPORT
148+
endif
149+
150+
# CryptoAssetsList testing key
151+
CAL_TESTING_KEY:=0
152+
ifneq ($(CAL_TESTING_KEY),0)
153+
DEFINES += HAVE_CAL_TESTING_KEY
154+
endif
155+
140156
# Enabling debug PRINTF
141157
DEBUG:=0
142158
ifneq ($(DEBUG),0)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)