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 #134 from Zondax/upgrade_v0.9.17
Browse files Browse the repository at this point in the history
Upgrade v0.9.17
  • Loading branch information
jleni authored Feb 25, 2022
2 parents 4ec08c9 + 637b7f4 commit c67ef7e
Show file tree
Hide file tree
Showing 151 changed files with 25,508 additions and 22,543 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: "Verify PRs to master"

on:
pull_request:
branches:
- master

jobs:
configure:
runs-on: ubuntu-latest
outputs:
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
steps:
- id: get-user
run: echo "::set-output name=uid_gid::$(id -u):$(id -g)"

get_version:
needs: configure
runs-on: ubuntu-latest
container:
image: zondax/builder-bolos:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
env:
BOLOS_ENV: /opt/bolos
HOME: /home/zondax_circle
outputs:
version: ${{ steps.store-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Invoke `version`
shell: bash -l {0}
env:
BOLOS_SDK: ${{ github.workspace }}/deps/nanos-secure-sdk
run: make version

- id: store-version
run: echo ::set-output name=version::$(cat ./app/app.version)

check_app_version:
needs: get_version
runs-on: ubuntu-latest
steps:
- id: checkTag
uses: mukunku/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ needs.get_version.outputs.version }}

- run: echo ${{ steps.checkTag.outputs.exists }}

- name: Tag exists
if: ${{ steps.checkTag.outputs.exists == 'true' }}
run: exit 1
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

---

![zondax](docs/zondax.jpg)
![zondax_light](docs/zondax_light.png#gh-light-mode-only)
![zondax_dark](docs/zondax_dark.png#gh-dark-mode-only)

_Please visit our website at [zondax.ch](https://www.zondax.ch)_

Expand All @@ -28,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 9.9160.x
# Kusama 10.9170.x

## System

Expand Down Expand Up @@ -114,6 +115,7 @@ Please:
|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/> |
|Chill other | | :heavy_check_mark: | | `AccountId` controller <br/> |
|Force apply min commission | | :heavy_check_mark: | | `AccountId` validator_stash <br/> |

## Session

Expand Down Expand Up @@ -329,7 +331,7 @@ Please:

| Name | Light | XL | Nesting | Arguments |
| :---------- |:------------:|:--------:|:--------:|:--------|
|As multi threshold 1 | | | | `VecAccountId` other_signatories <br/>`Call` call <br/> |
|As multi threshold 1 | | :heavy_check_mark: | :heavy_check_mark: | `VecAccountId` other_signatories <br/>`Call` call <br/> |
|As multi | | :heavy_check_mark: | :heavy_check_mark: | `u16` threshold <br/>`VecAccountId` other_signatories <br/>`OptionTimepoint` maybe_timepoint <br/>`OpaqueCall` call <br/>`bool` store_call <br/>`Weight` max_weight <br/> |
|Approve as multi | | :heavy_check_mark: | :heavy_check_mark: | `u16` threshold <br/>`VecAccountId` other_signatories <br/>`OptionTimepoint` maybe_timepoint <br/>`H256` call_hash <br/>`Weight` max_weight <br/> |
|Cancel as multi | | :heavy_check_mark: | :heavy_check_mark: | `u16` threshold <br/>`VecAccountId` other_signatories <br/>`Timepoint` timepoint <br/>`H256` call_hash <br/> |
Expand Down Expand Up @@ -376,6 +378,7 @@ Please:
|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/> |
|Governance fallback | | :heavy_check_mark: | | `Optionu32` maybe_max_voters <br/>`Optionu32` maybe_max_targets <br/> |

## Gilt

Expand Down Expand Up @@ -496,10 +499,10 @@ Please:
|Hrmp init open channel | | | | `ParaId` recipient <br/>`u32` proposed_max_capacity <br/>`u32` proposed_max_message_size <br/> |
|Hrmp accept open channel | | | | `ParaId` sender <br/> |
|Hrmp close channel | | | | `HrmpChannelId` channel_id <br/> |
|Force clean hrmp | | | | `ParaId` para <br/> |
|Force process hrmp open | | :heavy_check_mark: | | |
|Force process hrmp close | | :heavy_check_mark: | | |
|Hrmp cancel open request | | | | `HrmpChannelId` channel_id <br/> |
|Force clean hrmp | | | | `ParaId` para <br/>`u32` inbound <br/>`u32` outbound <br/> |
|Force process hrmp open | | :heavy_check_mark: | | `u32` channels <br/> |
|Force process hrmp close | | :heavy_check_mark: | | `u32` channels <br/> |
|Hrmp cancel open request | | | | `HrmpChannelId` channel_id <br/>`u32` open_requests <br/> |

## ParasDisputes

Expand Down
4 changes: 4 additions & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,7 @@ ifeq ($(TARGET_NAME),TARGET_NANOS)
else ifeq ($(TARGET_NAME),TARGET_NANOX)
@echo VARIANTS COIN KSM
endif

.PHONY: version
version:
@echo "v$(APPVERSION)" > app.version
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=9
APPVERSION_M=10
# This is the `spec_version` field of `Runtime`
APPVERSION_N=9160
APPVERSION_N=9170
# This is the patch version of this release
APPVERSION_P=1
APPVERSION_P=0
34 changes: 17 additions & 17 deletions app/src/substrate/substrate_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ 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 8:
return _readMethod_V8(c, moduleIdx, callIdx, &method->V8);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -38,10 +38,10 @@ 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 8:
return _getMethod_NumItems_V8(moduleIdx, callIdx);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -50,10 +50,10 @@ 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 8:
return _getMethod_ModuleName_V8(moduleIdx);
default:
return NULL;
}
Expand All @@ -62,10 +62,10 @@ 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 8:
return _getMethod_Name_V8(moduleIdx, callIdx);
default:
return 0;
}
Expand All @@ -74,10 +74,10 @@ 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 8:
return _getMethod_ItemName_V8(moduleIdx, callIdx, itemIdx);
default:
return NULL;
}
Expand All @@ -88,12 +88,12 @@ 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,
outValueLen, pageIdx, pageCount);
case 8:
return _getMethod_ItemValue_V8(&m->V8, moduleIdx, callIdx, itemIdx, outValue,
outValueLen, pageIdx, pageCount);
default:
return parser_tx_version_not_supported;
}
Expand All @@ -102,10 +102,10 @@ 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 8:
return _getMethod_ItemIsExpert_V8(moduleIdx, callIdx, itemIdx);
default:
return false;
}
Expand All @@ -114,10 +114,10 @@ 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 8:
return _getMethod_IsNestingSupported_V8(moduleIdx, callIdx);
default:
return false;
}
Expand Down
8 changes: 4 additions & 4 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_V8.h"
#include "substrate_dispatch_V10.h"
#include "substrate_dispatch_V9.h"
#include <stddef.h>
#include <stdint.h>
Expand All @@ -33,12 +33,12 @@ extern "C" {
{ \
switch (txVersion) { \
\
case 10: \
return PD_CALL_##CALL##_V10; \
\
case 9: \
return PD_CALL_##CALL##_V9; \
\
case 8: \
return PD_CALL_##CALL##_V8; \
\
default: \
return 0; \
} \
Expand Down
Loading

0 comments on commit c67ef7e

Please sign in to comment.