Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #141 from Zondax/update_v0.9.18
Browse files Browse the repository at this point in the history
Update v0.9.18
  • Loading branch information
jleni authored Mar 21, 2022
2 parents a3cfbcd + b12cb0e commit 94ec6af
Show file tree
Hide file tree
Showing 33 changed files with 23,192 additions and 33,478 deletions.
77 changes: 18 additions & 59 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ jobs:
cd ./app/rust
cargo clippy --version
cargo clippy --all-features --all-targets || true
# - name: audit
# run: |
# cd ./app/rust
# cargo audit --version
# cargo audit
- name: run tests
run: |
cd ./app/rust
Expand Down Expand Up @@ -150,7 +145,7 @@ jobs:
export PATH=~/.cargo/bin:$PATH
cd tests_zemu && yarn testSR25519
build_package_0:
build_package:
needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
Expand All @@ -174,40 +169,21 @@ jobs:
run: |
source $HOME/.cargo/env
make SUBSTRATE_PARSER_FULL=0
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos_light.sh
mv ./app/pkg/installer_s.sh ./app/pkg/installer_nanos.sh
- name: Set tag
id: nanos_light
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_light.sh version)
id: nanos
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos.sh version)
- name: Create or Update Release (1)
id: create_release_0
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
files: ./app/pkg/installer_nanos_light.sh
tag_name: ${{ steps.nanos_light.outputs.tag_name }}
files: ./app/pkg/installer_nanos.sh
tag_name: ${{ steps.nanos.outputs.tag_name }}
draft: false
prerelease: false

build_package_1:
needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install deps
run: pip install ledgerblue

- name: Build NanoS XL
shell: bash -l {0}
run: |
Expand All @@ -217,8 +193,8 @@ jobs:
- name: Set tag
id: nanos_xl
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_xl.sh version)
- name: Update Release
id: update_release_1
- name: Create or Update Release (1)
id: create_release_1
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
Expand All @@ -228,41 +204,24 @@ jobs:
draft: false
prerelease: false

build_package_2:
needs: [ configure, build, build_ledger, test_zemu, test_zemu_sr25519 ]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanosplus-secure-sdk
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Install deps
run: pip install ledgerblue

- name: Build NanoSP XL
- name: Build NanoSP
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanosplus-secure-sdk
shell: bash -l {0}
run: |
source $HOME/.cargo/env
make SUBSTRATE_PARSER_FULL=1
mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanosp_xl.sh
mv ./app/pkg/installer_s2.sh ./app/pkg/installer_nanos_plus.sh
- name: Set tag
id: nanosp_xl
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanosp_xl.sh version)
- name: Update Release
id: update_release_2
id: nanosp
run: echo ::set-output name=tag_name::$(./app/pkg/installer_nanos_plus.sh version)
- name: Create or Update Release (1)
id: create_release_2
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
files: ./app/pkg/installer_nanosp_xl.sh
tag_name: ${{ steps.nanosp_xl.outputs.tag_name }}
files: ./app/pkg/installer_nanos_plus.sh
tag_name: ${{ steps.nanosp.outputs.tag_name }}
draft: false
prerelease: false
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please:
- **Do not use a Ledger device with funds for development purposes.**
- **Have a separate and marked device that is used ONLY for development and testing**

# Kusama 10.9170.x
# Kusama 11.9180.x

## System

Expand Down Expand Up @@ -113,7 +113,7 @@ Please:
|Set history depth | | :heavy_check_mark: | | `Compactu32` new_history_depth <br/>`Compactu32` era_items_deleted <br/> |
|Reap stash | | :heavy_check_mark: | | `AccountId` stash <br/>`u32` num_slashing_spans <br/> |
|Kick | | :heavy_check_mark: | | `VecLookupasStaticLookupSource` who <br/> |
|Set staking configs | | | | `Balance` min_nominator_bond <br/>`Balance` min_validator_bond <br/>`Optionu32` max_nominator_count <br/>`Optionu32` max_validator_count <br/>`OptionPercent` chill_threshold <br/>`Perbill` min_commission <br/> |
|Set staking configs | | | | `ConfigOpBalanceOfT` min_nominator_bond <br/>`ConfigOpBalanceOfT` min_validator_bond <br/>`ConfigOpu32` max_nominator_count <br/>`ConfigOpu32` max_validator_count <br/>`ConfigOpPercent` chill_threshold <br/>`ConfigOpPerbill` min_commission <br/> |
|Chill other | | :heavy_check_mark: | | `AccountId` controller <br/> |
|Force apply min commission | | :heavy_check_mark: | | `AccountId` validator_stash <br/> |

Expand Down Expand Up @@ -377,7 +377,7 @@ Please:
|Submit unsigned | | | | `BoxRawSolutionSolutionOfT` raw_solution <br/>`SolutionOrSnapshotSize` witness <br/> |
|Set minimum untrusted score | | | | `OptionElectionScore` maybe_next_score <br/> |
|Set emergency election result | | | | `SupportsAccountId` supports <br/> |
|Submit | | | | `BoxRawSolutionSolutionOfT` raw_solution <br/>`u32` num_signed_submissions <br/> |
|Submit | | | | `BoxRawSolutionSolutionOfT` raw_solution <br/> |
|Governance fallback | | :heavy_check_mark: | | `Optionu32` maybe_max_voters <br/>`Optionu32` maybe_max_targets <br/> |

## Gilt
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=10
APPVERSION_M=11
# This is the `spec_version` field of `Runtime`
APPVERSION_N=9170
APPVERSION_N=9180
# This is the patch version of this release
APPVERSION_P=1
APPVERSION_P=0
4 changes: 2 additions & 2 deletions app/src/substrate/substrate_coin.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ extern "C" {

#define HDPATH_LEN_DEFAULT 5
#define HDPATH_0_DEFAULT (0x80000000 | 0x2c)
#define HDPATH_1_DEFAULT (0x80000000 | 0x1b2) // 434 - Kusama
#define HDPATH_1_RECOVERY (0x80000000 | 0x162) // 354 - Polkadot
#define HDPATH_1_DEFAULT (0x80000000 | 0x1b2)
#define HDPATH_1_RECOVERY (0x80000000 | 0x162)

#define HDPATH_2_DEFAULT (0x80000000u | 0u)
#define HDPATH_3_DEFAULT (0u)
Expand Down
49 changes: 16 additions & 33 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ parser_error_t _readMethod(
pd_Method_t* method)
{
switch (c->tx_obj->transactionVersion) {
case 10:
return _readMethod_V10(c, moduleIdx, callIdx, &method->V10);
case 9:
return _readMethod_V9(c, moduleIdx, callIdx, &method->V9);
case 11:
return _readMethod_V11(c, moduleIdx, callIdx, &method->V11);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -38,10 +36,8 @@ parser_error_t _readMethod(
uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 10:
return _getMethod_NumItems_V10(moduleIdx, callIdx);
case 9:
return _getMethod_NumItems_V9(moduleIdx, callIdx);
case 11:
return _getMethod_NumItems_V11(moduleIdx, callIdx);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -50,10 +46,8 @@ uint8_t _getMethod_NumItems(uint32_t transactionVersion, uint8_t moduleIdx, uint
const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx)
{
switch (transactionVersion) {
case 10:
return _getMethod_ModuleName_V10(moduleIdx);
case 9:
return _getMethod_ModuleName_V9(moduleIdx);
case 11:
return _getMethod_ModuleName_V11(moduleIdx);
default:
return NULL;
}
Expand All @@ -62,10 +56,8 @@ const char* _getMethod_ModuleName(uint32_t transactionVersion, uint8_t moduleIdx
const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 10:
return _getMethod_Name_V10(moduleIdx, callIdx);
case 9:
return _getMethod_Name_V9(moduleIdx, callIdx);
case 11:
return _getMethod_Name_V11(moduleIdx, callIdx);
default:
return 0;
}
Expand All @@ -74,10 +66,8 @@ const char* _getMethod_Name(uint32_t transactionVersion, uint8_t moduleIdx, uint
const char* _getMethod_ItemName(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx, uint8_t itemIdx)
{
switch (transactionVersion) {
case 10:
return _getMethod_ItemName_V10(moduleIdx, callIdx, itemIdx);
case 9:
return _getMethod_ItemName_V9(moduleIdx, callIdx, itemIdx);
case 11:
return _getMethod_ItemName_V11(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -88,11 +78,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
uint8_t pageIdx, uint8_t* pageCount)
{
switch (transactionVersion) {
case 10:
return _getMethod_ItemValue_V10(&m->V10, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
case 9:
return _getMethod_ItemValue_V9(&m->V9, moduleIdx, callIdx, itemIdx, outValue,
case 11:
return _getMethod_ItemValue_V11(&m->V11, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_tx_version_not_supported;
Expand All @@ -102,10 +89,8 @@ parser_error_t _getMethod_ItemValue(uint32_t transactionVersion, pd_Method_t* m,
bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx, uint8_t itemIdx)
{
switch (transactionVersion) {
case 10:
return _getMethod_ItemIsExpert_V10(moduleIdx, callIdx, itemIdx);
case 9:
return _getMethod_ItemIsExpert_V9(moduleIdx, callIdx, itemIdx);
case 11:
return _getMethod_ItemIsExpert_V11(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -114,10 +99,8 @@ bool _getMethod_ItemIsExpert(uint32_t transactionVersion, uint8_t moduleIdx, uin
bool _getMethod_IsNestingSupported(uint32_t transactionVersion, uint8_t moduleIdx, uint8_t callIdx)
{
switch (transactionVersion) {
case 10:
return _getMethod_IsNestingSupported_V10(moduleIdx, callIdx);
case 9:
return _getMethod_IsNestingSupported_V9(moduleIdx, callIdx);
case 11:
return _getMethod_IsNestingSupported_V11(moduleIdx, callIdx);
default:
return false;
}
Expand Down
10 changes: 3 additions & 7 deletions app/src/substrate/substrate_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ extern "C" {

#include "parser_common.h"
#include "stdbool.h"
#include "substrate_dispatch_V10.h"
#include "substrate_dispatch_V9.h"
#include "substrate_dispatch_V11.h"
#include <stddef.h>
#include <stdint.h>

Expand All @@ -33,11 +32,8 @@ extern "C" {
{ \
switch (txVersion) { \
\
case 10: \
return PD_CALL_##CALL##_V10; \
\
case 9: \
return PD_CALL_##CALL##_V9; \
case 11: \
return PD_CALL_##CALL##_V11; \
\
default: \
return 0; \
Expand Down
Loading

0 comments on commit 94ec6af

Please sign in to comment.