Skip to content

Commit eb9566b

Browse files
authored
Merge pull request #8 from Zondax/light_app
Enable light app mode
2 parents 468e0b7 + 03bfcc0 commit eb9566b

15 files changed

Lines changed: 20050 additions & 21957 deletions

File tree

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ jobs:
5252
# Docker entrypoint is not considered
5353
- run: git submodule update --init --recursive
5454
- run:
55-
name: Build Standard app
55+
name: Build Standard light parser app
5656
command: |
5757
source /home/zondax/.cargo/env
5858
make
5959
- run:
60-
name: Build SR25519 app
60+
name: Build Standard full parser app
6161
command: |
6262
source /home/zondax/.cargo/env
63-
SUPPORT_SR25519=1 make
63+
SUBSTRATE_PARSER_FULL=1 make
6464
- run:
65-
name: Build Ledgeracio
65+
name: Build SR25519 app
6666
command: |
6767
source /home/zondax/.cargo/env
68-
COIN=Ledgeracio make
68+
SUPPORT_SR25519=1 make
6969
7070
test_zemu:
7171
machine:
@@ -94,9 +94,9 @@ jobs:
9494
- run:
9595
name: Build Ledger app
9696
command: |
97-
make buildS
97+
SUBSTRATE_PARSER_FULL=1 make buildS
9898
make clean
99-
make buildX
99+
SUBSTRATE_PARSER_FULL=1 make buildX
100100
- run:
101101
name: Build/Install build js deps
102102
command: |

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ jobs:
108108
npm install -g yarn
109109
- name: Build Ledger app
110110
run: |
111-
make buildS
111+
make build_full_parser_s
112112
make clean
113-
make buildX
113+
make build_full_parser_x
114114
- name: Build/Install build js deps
115115
run: |
116116
export PATH=~/.cargo/bin:$PATH

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ string(APPEND CMAKE_CXX_FLAGS " -fno-omit-frame-pointer -g")
2929
string(APPEND CMAKE_LINKER_FLAGS " -fno-omit-frame-pointer -g")
3030

3131
add_definitions(-DAPP_STANDARD)
32+
add_definitions(-DSUBSTRATE_PARSER_FULL)
3233

3334
if(ENABLE_FUZZING)
3435
add_definitions(-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1)
@@ -113,7 +114,6 @@ file(GLOB_RECURSE LIB_SRC
113114
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl.c
114115
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_txdef.c
115116
${CMAKE_CURRENT_SOURCE_DIR}/app/src/substrate*.c
116-
${CMAKE_CURRENT_SOURCE_DIR}/app/src/substrate*.h
117117
)
118118

119119
add_library(app_lib STATIC ${LIB_SRC})

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ build_sr25519: buildS
3838
cp $(CURDIR)/app/bin/app.elf $(CURDIR)/app/output/app_sr25519.elf
3939
cp $(CURDIR)/app/bin/app.elf $(CURDIR)/app/bin/app_sr25519.elf
4040

41+
build_full_parser_s: SUBSTRATE_PARSER_FULL=1
42+
build_full_parser_s: buildS
43+
44+
build_full_parser_x: SUBSTRATE_PARSER_FULL=1
45+
build_full_parser_x: buildX
46+
4147
tests_tools_build:
4248
cd tests_tools/neon && yarn install
4349

app/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ DEFINES += SUPPORT_SR25519
5353
$(info ************ SR25519 ENABLED ************)
5454
endif
5555

56+
ifeq ($(SUBSTRATE_PARSER_FULL),1)
57+
DEFINES += SUBSTRATE_PARSER_FULL
58+
$(info ************ FULL PARSER ENABLED ************)
59+
endif
60+
5661
ifndef COIN
5762
COIN=RAD
5863
endif

app/Makefile.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ APPVERSION_M=1
33
# This is the `spec_version` field of `Runtime`
44
APPVERSION_N=240
55
# This is the `impl_version` field of `Runtime`
6-
APPVERSION_P=0
6+
APPVERSION_P=1

0 commit comments

Comments
 (0)