Skip to content

Commit 5eb7ff5

Browse files
authored
Merge pull request #15 from blooo-io/fix/audit-fix
Fix/audit fix
2 parents 419b86d + 7217cd4 commit 5eb7ff5

File tree

8 files changed

+24
-14
lines changed

8 files changed

+24
-14
lines changed

.github/workflows/build_and_functional_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_build.yml@v1
2424
with:
2525
upload_app_binaries_artifact: "compiled_app_binaries"
26-
flags: "DEBUG=0 COIN=bitcoin_testnet"
26+
flags: "DEBUG=0 COIN=acre_testnet"
2727

2828
ragger_tests:
2929
name: Run ragger tests using the reusable workflow

.github/workflows/ci-workflow.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040

4141
- name: Build
4242
run: |
43-
make DEBUG=0 COIN=bitcoin BOLOS_SDK=${{ matrix.SDK }} && mv bin/ acre-bin/
43+
make DEBUG=0 COIN=acre BOLOS_SDK=${{ matrix.SDK }} && mv bin/ acre-bin/
4444
make clean
45-
make DEBUG=0 COIN=bitcoin_testnet BOLOS_SDK=${{ matrix.SDK }} && mv bin/ acre-testnet-bin/
45+
make DEBUG=0 COIN=acre_testnet BOLOS_SDK=${{ matrix.SDK }} && mv bin/ acre-testnet-bin/
4646
- name: Upload Acre app binary
4747
uses: actions/upload-artifact@v4
4848
with:

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ include $(BOLOS_SDK)/Makefile.defines
3939
CURVE_APP_LOAD_PARAMS = secp256k1
4040

4141
# Application allowed derivation paths.
42-
PATH_APP_LOAD_PARAMS = "44'/0'" "44'/1'" "84'/0'" "84'/1'" "86'/0'" "86'/1'"
42+
PATH_APP_LOAD_PARAMS = "44'/0'" "44'/1'" "48'/0'" "48'/1'" "49'/0'" "49'/1'" "84'/0'" "84'/1'" "86'/0'" "86'/1'"
4343

4444
# Allowed SLIP21 paths
4545
PATH_SLIP21_APP_LOAD_PARAMS = "LEDGER-Wallet policy"
4646

4747
# Application version
4848
APPVERSION_M = 1
4949
APPVERSION_N = 0
50-
APPVERSION_P = 1
50+
APPVERSION_P = 2
5151
APPVERSION_SUFFIX = # if not empty, appended at the end. Do not add a dash.
5252

5353
ifeq ($(APPVERSION_SUFFIX),)
@@ -65,11 +65,11 @@ endif
6565

6666
# Setting to allow building variant applications
6767
VARIANT_PARAM = COIN
68-
VARIANT_VALUES = bitcoin_testnet bitcoin
68+
VARIANT_VALUES = acre_testnet acre
6969

7070
# simplify for tests
7171
ifndef COIN
72-
COIN=bitcoin_testnet
72+
COIN=acre_testnet
7373
endif
7474

7575
########################################
@@ -79,7 +79,7 @@ HAVE_APPLICATION_FLAG_DERIVE_MASTER = 1
7979
HAVE_APPLICATION_FLAG_BOLOS_SETTINGS = 1
8080
HAVE_APPLICATION_FLAG_LIBRARY = 1
8181

82-
ifeq ($(COIN),bitcoin_testnet)
82+
ifeq ($(COIN),acre_testnet)
8383
# Bitcoin testnet, no legacy support
8484
DEFINES += BIP32_PUBKEY_VERSION=0x043587CF
8585
DEFINES += BIP44_COIN_TYPE=1
@@ -89,7 +89,7 @@ ifeq ($(COIN),bitcoin_testnet)
8989
DEFINES += COIN_COINID_SHORT=\"TEST\"
9090

9191
APPNAME = "Acre Test"
92-
else ifeq ($(COIN),bitcoin)
92+
else ifeq ($(COIN),acre)
9393
# the version for performance tests automatically approves all requests
9494
# there is no reason to ever compile the mainnet app with this flag
9595
ifneq ($(AUTOAPPROVE_FOR_PERF_TESTS),0)
@@ -108,7 +108,7 @@ else ifeq ($(COIN),bitcoin)
108108

109109
else
110110
ifeq ($(filter clean,$(MAKECMDGOALS)),)
111-
$(error Unsupported COIN - use bitcoin_testnet, bitcoin)
111+
$(error Unsupported COIN - use acre_testnet, acre)
112112
endif
113113
endif
114114

tests/README.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# End-to-end tests
1+
# End-to-end Tests
22

3-
These tests are implemented in Python and can be executed either using the [Speculos](https://github.com/LedgerHQ/speculos) emulator or a Ledger Nano S/X.
3+
These tests are implemented in Python and can be executed using either the [Speculos](https://github.com/LedgerHQ/speculos) emulator or a physical Ledger Nano X/SP/Flex or Stax device. The tests require an x86_64 architecture.
4+
5+
Note: If you're using the Ledger Developer Extension, some tests (those containing "e2e" in their names) may not run properly due to missing libraries in the Docker image.
46

57
All the commands in this folder are meant to be ran from the `tests` folder, not from the root.
68

7-
Python dependencies are listed in [requirements.txt](requirements.txt), install them using [pip](https://pypi.org/project/pip/)
9+
Python dependencies are listed in [requirements.txt](requirements.txt), install them using [pip](https://pypi.org/project/pip/).
810

911
```
1012
pip install -r requirements.txt
@@ -16,6 +18,13 @@ Some tests require the `bitcoind 22.0` binary to be in the `$PATH` variable, or
1618
export BITCOIND=/path/to/my/bitcoind
1719
```
1820

21+
You may also need to install the following dependencies to run the end to end tests:
22+
23+
```
24+
sudo apt-get update && sudo apt-get install -y qemu-user-static tesseract-ocr libtesseract-dev
25+
pip install -U pip setuptools
26+
```
27+
1928
## Launch with Speculos
2029

2130
Build the app as normal from the root folder. For convenience, you probably want to enable DEBUG:
@@ -29,6 +38,7 @@ Then run all the tests from this folder, specifying the device: nanox, nanosp, s
2938
```
3039
pytest --device yourdevice
3140
```
41+
3242
You can enable the screen display with the option `--display`
3343

3444
## Launch with your Nano S/X/SP or Stax
@@ -45,4 +55,4 @@ Be sure to have you device connected through USB (without any other software int
4555

4656
```
4757
pytest --device yourdevice --backend ledgercomm
48-
```
58+
```
185 Bytes
Loading
16 Bytes
Loading
16 Bytes
Loading
169 Bytes
Loading

0 commit comments

Comments
 (0)