Skip to content

Commit

Permalink
Merge pull request #91 from Zondax/updates
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored Jun 23, 2022
2 parents 0d336ce + 69a5eb4 commit e401250
Show file tree
Hide file tree
Showing 149 changed files with 33,207 additions and 37,790 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "Verify PRs to master"
name: "Verify PRs to main"

on:
pull_request:
branches:
- master
- main

jobs:
configure:
Expand Down Expand Up @@ -55,4 +55,5 @@ jobs:

- name: Tag exists
if: ${{ steps.checkTag.outputs.exists == 'true' }}
run: exit 1
run: exit 1

8 changes: 5 additions & 3 deletions .github/workflows/ledger.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: CI

on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
branches: [main]
pull_request:
branches: [ master ]
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -20,6 +20,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Build with Clang Static Analyzer
run: |
Expand Down
45 changes: 36 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build
on: [ push ]
on: [push]

jobs:
configure:
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '14.17.0'
node-version: "14.17.0"
- name: Install yarn
run: |
npm install -g yarn
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
- name: Install node
uses: actions/setup-node@v2
with:
node-version: '14.17.0'
node-version: "14.17.0"
- name: Install yarn
run: |
npm install -g yarn
Expand All @@ -188,8 +188,17 @@ jobs:
cd tests_zemu && yarn testSR25519
build_package_0:
needs: [configure, build, build_nano_S, build_nano_SP, build_nano_X, test_zemu, test_zemu_sr25519]
if: ${{ github.ref == 'refs/heads/master' }}
needs:
[
configure,
build,
build_nano_S,
build_nano_SP,
build_nano_X,
test_zemu,
test_zemu_sr25519,
]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
Expand Down Expand Up @@ -227,8 +236,17 @@ jobs:
prerelease: false

build_package_1:
needs: [configure, build, build_nano_S, build_nano_SP, build_nano_X, test_zemu, test_zemu_sr25519]
if: ${{ github.ref == 'refs/heads/master' }}
needs:
[
configure,
build,
build_nano_S,
build_nano_SP,
build_nano_X,
test_zemu,
test_zemu_sr25519,
]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
Expand Down Expand Up @@ -266,8 +284,17 @@ jobs:
prerelease: false

build_package_2:
needs: [configure, build, build_nano_S, build_nano_SP, build_nano_X, test_zemu, test_zemu_sr25519]
if: ${{ github.ref == 'refs/heads/master' }}
needs:
[
configure,
build,
build_nano_S,
build_nano_SP,
build_nano_X,
test_zemu,
test_zemu_sr25519,
]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "deps/nanosplus-secure-sdk"]
path = deps/nanosplus-secure-sdk
url = https://github.com/LedgerHQ/nanosplus-secure-sdk
[submodule "deps/ledger-zxlib"]
path = deps/ledger-zxlib
url = https://github.com/zondax/ledger-zxlib
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ file(GLOB_RECURSE LIB_SRC
####
${CMAKE_CURRENT_SOURCE_DIR}/app/src/crypto_helper.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl_common.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_impl.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/parser_txdef.c
${CMAKE_CURRENT_SOURCE_DIR}/app/src/substrate/substrate*.c
Expand Down
667 changes: 344 additions & 323 deletions README.md

Large diffs are not rendered by default.

24 changes: 9 additions & 15 deletions app/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#*******************************************************************************
# Ledger App
# (c) 2018 - 2022 Zondax GmbH
# (c) 2017 Ledger
# Ledger App
# (c) 2019 - 2022 Zondax GmbH
# (c) 2017 Ledger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -27,8 +27,8 @@ all: bin/app.elf
@echo "APPNAME=\"${APPNAME}\"" >> $(OUTPUT_INSTALLER)
@echo "APPVERSION=\"${APPVERSION}\"" >> $(OUTPUT_INSTALLER)
@echo "APPPATH=\""${APPPATH}"\"" >> $(OUTPUT_INSTALLER)
@echo "LOAD_PARAMS=\"${COMMON_LOAD_PARAMS}\"" >> $(OUTPUT_INSTALLER)
@echo "DELETE_PARAMS=\"${COMMON_DELETE_PARAMS}\"" >> $(OUTPUT_INSTALLER)
@echo "LOAD_PARAMS=($$(echo "${APP_LOAD_PARAMS}" | sed -e "s|"${APPNAME}"|\""${APPNAME}"\"|"))" >> $(OUTPUT_INSTALLER)
@echo "DELETE_PARAMS=($$(echo "${COMMON_DELETE_PARAMS}" | sed -e "s|"${APPNAME}"|\""${APPNAME}"\"|"))" >> $(OUTPUT_INSTALLER)
@echo "APPHEX=\"" >> $(OUTPUT_INSTALLER)
@cat $(CURDIR)/bin/app.hex >> $(OUTPUT_INSTALLER)
@echo "\"" >> $(OUTPUT_INSTALLER)
Expand All @@ -40,8 +40,6 @@ all: bin/app.elf

include $(BOLOS_SDK)/Makefile.defines

#DEFINES += APP_SECRET_MODE_ENABLED

$(info ************ TARGET_NAME = [$(TARGET_NAME)])

ifeq ($(APP_TESTING),1)
Expand Down Expand Up @@ -82,7 +80,7 @@ $(info COIN = [$(COIN)])
ifeq ($(COIN),POLYX)
# Main app configuration
DEFINES += APP_STANDARD
ifeq ($(TARGET_NAME),TARGET_NANOX)
ifneq ($(TARGET_NAME),TARGET_NANOS)
DEFINES += SUBSTRATE_PARSER_FULL
endif
APPNAME = "Polymesh"
Expand All @@ -105,11 +103,11 @@ endef
$(error "$(error_message)")
endif

APP_LOAD_PARAMS = --delete $(COMMON_LOAD_PARAMS) --path $(APPPATH) --curve ed25519
APP_LOAD_PARAMS = --curve ed25519 $(COMMON_LOAD_PARAMS) --path $(APPPATH)

ifeq ($(TARGET_NAME),TARGET_NANOS)
APP_LOAD_PARAMS += --appFlags 0x000
APP_STACK_SIZE:=3172
APP_STACK_SIZE:=3160
ICONNAME:=$(CURDIR)/nanos_icon.gif
OUTPUT_ELF ?= $(CURDIR)/output/app_s.elf
OUTPUT_INSTALLER := $(CURDIR)/pkg/installer_s.sh
Expand Down Expand Up @@ -138,10 +136,6 @@ ifndef ICONNAME
$(error ICONNAME is not set)
endif

# Ledger: add the "Pending security review" disclaimer
APP_LOAD_PARAMS += --tlvraw 9F:01
DEFINES += HAVE_PENDING_REVIEW_SCREEN

############
# Platform

Expand Down Expand Up @@ -269,7 +263,7 @@ dep/%.d: %.c Makefile
listvariants:
ifeq ($(TARGET_NAME),TARGET_NANOS)
@echo VARIANTS COIN POLYX POLYX_XL
else ifeq ($(TARGET_NAME),TARGET_NANOX)
else
@echo VARIANTS COIN POLYX
endif

Expand Down
6 changes: 3 additions & 3 deletions app/Makefile.version
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is the `transaction_version` field of `Runtime`
APPVERSION_M=2
APPVERSION_M=3
# This is the `spec_version` field of `Runtime`
APPVERSION_N=3010
APPVERSION_N=5000001
# This is the patch version of this release
APPVERSION_P=1
APPVERSION_P=0
Loading

0 comments on commit e401250

Please sign in to comment.