Skip to content

Commit

Permalink
Merge pull request #169 from Zondax/add-9340
Browse files Browse the repository at this point in the history
replace spec 9300 with spec 9340
  • Loading branch information
carlosala authored Dec 27, 2022
2 parents 346f750 + b60cbbb commit 5eaf63d
Show file tree
Hide file tree
Showing 24 changed files with 31,618 additions and 32,998 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,34 @@ jobs:
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
outputs:
size: ${{steps.build.outputs.size}}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Build Standard app
id: build
shell: bash -l {0}
run: |
source $HOME/.cargo/env
make
SUBSTRATE_PARSER_FULL=1 make
echo "size=$(python3 deps/ledger-zxlib/scripts/getSize.py s)" >> $GITHUB_OUTPUT
- name: Build SR25519 app
shell: bash -l {0}
run: |
source $HOME/.cargo/env
SUPPORT_SR25519=1 make
size_nano_s:
needs: build_ledger
runs-on: ubuntu-latest
steps:
- run: |
echo "LNS app size: ${{needs.build_ledger.outputs.size}} KiB"
[ ${{needs.build_ledger.outputs.size}} -le 136 ]
test_zemu:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=19
# This is the `spec_version` field of `Runtime`
APPVERSION_N=9360
# This is the patch version of this release
APPVERSION_P=0
APPVERSION_P=1
Binary file modified app/glyphs/icon_warning.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/substrate/substrate_coin.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef enum {
// Coin Specific
#define PK_ADDRESS_TYPE COIN_ADDR_TYPE
#define SUPPORTED_TX_VERSION_CURRENT LEDGER_MAJOR_VERSION
#define SUPPORTED_TX_VERSION_PREVIOUS 15
#define SUPPORTED_TX_VERSION_PREVIOUS (LEDGER_MAJOR_VERSION - 1)
#define SUPPORTED_SPEC_VERSION (LEDGER_MINOR_VERSION + 0)
#define SUPPORTED_MINIMUM_SPEC_VERSION 9300

Expand Down
32 changes: 16 additions & 16 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ parser_error_t _readMethod(
switch (c->tx_obj->transactionVersion) {
case 19:
return _readMethod_V19(c, moduleIdx, callIdx, &method->V19);
case 15:
return _readMethod_V15(c, moduleIdx, callIdx, &method->V15);
case 18:
return _readMethod_V18(c, moduleIdx, callIdx, &method->V18);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -40,8 +40,8 @@ uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint
switch (transactionVersion) {
case 19:
return _getMethod_NumItems_V19(moduleIdx, callIdx);
case 15:
return _getMethod_NumItems_V15(moduleIdx, callIdx);
case 18:
return _getMethod_NumItems_V18(moduleIdx, callIdx);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -52,8 +52,8 @@ const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx
switch (transactionVersion) {
case 19:
return _getMethod_ModuleName_V19(moduleIdx);
case 15:
return _getMethod_ModuleName_V15(moduleIdx);
case 18:
return _getMethod_ModuleName_V18(moduleIdx);
default:
return NULL;
}
Expand All @@ -64,8 +64,8 @@ const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint
switch (transactionVersion) {
case 19:
return _getMethod_Name_V19(moduleIdx, callIdx);
case 15:
return _getMethod_Name_V15(moduleIdx, callIdx);
case 18:
return _getMethod_Name_V18(moduleIdx, callIdx);
default:
return 0;
}
Expand All @@ -76,8 +76,8 @@ const char* _getMethod_ItemName(uint32_t transactionVersion, uint8_t moduleIdx,
switch (transactionVersion) {
case 19:
return _getMethod_ItemName_V19(moduleIdx, callIdx, itemIdx);
case 15:
return _getMethod_ItemName_V15(moduleIdx, callIdx, itemIdx);
case 18:
return _getMethod_ItemName_V18(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -91,8 +91,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
case 19:
return _getMethod_ItemValue_V19(&m->V19, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
case 15:
return _getMethod_ItemValue_V15(&m->V15, moduleIdx, callIdx, itemIdx, outValue,
case 18:
return _getMethod_ItemValue_V18(&m->V18, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_tx_version_not_supported;
Expand All @@ -104,8 +104,8 @@ bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uin
switch (transactionVersion) {
case 19:
return _getMethod_ItemIsExpert_V19(moduleIdx, callIdx, itemIdx);
case 15:
return _getMethod_ItemIsExpert_V15(moduleIdx, callIdx, itemIdx);
case 18:
return _getMethod_ItemIsExpert_V18(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -116,8 +116,8 @@ bool _getMethod_IsNestingSupported(uint32_t transactionVersion, uint8_t moduleId
switch (transactionVersion) {
case 19:
return _getMethod_IsNestingSupported_V19(moduleIdx, callIdx);
case 15:
return _getMethod_IsNestingSupported_V15(moduleIdx, callIdx);
case 18:
return _getMethod_IsNestingSupported_V18(moduleIdx, callIdx);
default:
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/substrate/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {

#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V15.h"
#include "substrate_dispatch_V18.h"
#include "substrate_dispatch_V19.h"
#include <stddef.h>
#include <stdint.h>
Expand All @@ -36,8 +36,8 @@ extern "C" {
case 19: \
return PD_CALL_##CALL##_V19; \
\
case 15: \
return PD_CALL_##CALL##_V15; \
case 18: \
return PD_CALL_##CALL##_V18; \
\
default: \
return 0; \
Expand Down
Loading

0 comments on commit 5eaf63d

Please sign in to comment.