Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit e66caee

Browse files
cab404vitvakatuboozookmkurnikovborispovod
authored
Upgrade to VM v1.2 (#56)
* tests started to build * WiP update to the new VM 1.2 * initial Nix build environment * update sp-move-vm to revision 12f20a4 * fix no-std build of sp-mvm/balance.rs std::fmt is not available in no-std builds, core::fmt is * call init_storage in genesis block (#62) * utilize `#[genesis_build]` to load Move stdlib and VM config in genesis block. In case of error we simply panic, cause there is no way to recover. * serde dependency added to support `#[genesis_build]`. * require dove 1.2.4, fix paths * use fixed dove min-version 1.2.5 * ci: use `get dove` gh-action, fix dove version * fix MvmConfig init for testnet genesis * fix move code WIP * added Nix Flakes * fixed incompatible empty version syntax, bumped lock * added dove as a dependency * Initialize MoveVM storage in tests mock runtime * Call sp_mvm::GenesisConfig::assimilate_storage for mock storage to load stdlib and VMConfig. * Fake `T` generic added to GenesisConfig to implement GenesisBuild. * enable Event module to fix emit_event test * remove Oracle tests * update sp-move-vm version * fix events * Remove explicit loading of std modules in tests * Move stdlib is now loaded in genesis block automatically * rename ts -> tx in dove usage * fix std::execute_script test * Fix docs of pallet's Event enum, as they were completely incorrect * refactor gas.rs tests * refactor helper functions in tests/common/utils. There is no need in such deep hierarchy of *_raw, *raw_unchecked and *raw_unchecked_with_origin. * simplify all tests using utils module * update VM dependency ver * added multisig pallet to runtime * add currency info * standard library coming from pallet genesis config * initialize function call from genesis * change stdlib (rev) version * fix tests * refactoring: fetch stdlib, vm config * update gitignore * refactoring: move/.gitkeep * refactoing: pallet changes * refactoring: fmt * refactoring: build before running tests * update move-vm depends * fixed benchmarks * update balance to u64, 10 decimals max * enable multisig pallet in mock runtime * use correct maximum number of signers in multisig config for mock runtime * fix: balances adapter (sub <-> add) * fix balance test * update benches * update VM dependency rev * CI: fix tests job target * CI: dove cache for coverage job target * upload & save build artifacts now optional only with "save artifact"/"+artifact" in commit text * CI: update dove dependency version; * fix dove cache for tests * fix embedded move-stdlib version * CI: allow dove prereleases * update dove version Co-authored-by: Ilya Bogdanov <[email protected]> Co-authored-by: Alexander Koz <[email protected]> Co-authored-by: Maksim Kurnikov <[email protected]> Co-authored-by: borispovod <[email protected]>
1 parent b972ad3 commit e66caee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1792
-1153
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/workflows/coverage.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ jobs:
2727
cfg:
2828
- os: self-hosted
2929
grcov: grcov-linux-x86_64.tar.bz2
30-
dove:
31-
version: 1.1.4
30+
dove: 1.2.7
3231

3332
env:
3433
SKIP_WASM_BUILD: 1
@@ -64,15 +63,17 @@ jobs:
6463
cp grcov ~/.cargo/bin/grcov
6564
rm ${{ matrix.cfg.grcov }}
6665
67-
- name: Cache
66+
- name: cache Dove
6867
uses: actions/cache@v2
6968
with:
7069
path: ~/.dove
71-
key: ${{ matrix.cfg.os }}-dove
70+
key: ${{ matrix.cfg.os }}-dove-${{ matrix.cfg.dove }}
71+
7272
- name: get Dove
7373
uses: pontem-network/get-dove@main
7474
with:
75-
version: ${{ matrix.cfg.dove.version }}
75+
prerelease: true
76+
version: ${{ matrix.cfg.dove }}
7677
token: ${{ secrets.GITHUB_TOKEN }}
7778

7879
- name: Build test resources

.github/workflows/tests.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ jobs:
2727
matrix:
2828
cfg:
2929
- os: macos-latest
30-
dove:
31-
version: 1.1.4
30+
dove: 1.2.7
3231
- os: ubuntu-latest
33-
dove:
34-
version: 1.1.4
32+
dove: 1.2.7
3533
steps:
3634
- name: Checkout repository
3735
uses: actions/checkout@v2
@@ -57,11 +55,12 @@ jobs:
5755
uses: actions/cache@v2
5856
with:
5957
path: ~/.dove
60-
key: ${{ matrix.cfg.os }}-dove
58+
key: ${{ matrix.cfg.os }}-dove-${{ matrix.cfg.dove }}
6159
- name: get Dove
6260
uses: pontem-network/get-dove@main
6361
with:
64-
version: ${{ matrix.cfg.dove.version }}
62+
prerelease: true
63+
version: ${{ matrix.cfg.dove }}
6564
token: ${{ secrets.GITHUB_TOKEN }}
6665

6766
- name: Build test resources
@@ -85,6 +84,8 @@ jobs:
8584
matrix:
8685
os:
8786
- ubuntu-latest
87+
dove:
88+
- 1.2.7
8889

8990
steps:
9091
- name: Checkout repository
@@ -105,6 +106,13 @@ jobs:
105106
target: wasm32-unknown-unknown
106107
override: true
107108

109+
- name: get dove
110+
uses: pontem-network/get-dove@main
111+
with:
112+
prerelease: true
113+
version: ${{ matrix.dove }}
114+
token: ${{ secrets.GITHUB_TOKEN }}
115+
108116
- name: Clippy
109117
uses: actions-rs/clippy-check@v1
110118
with:
@@ -128,6 +136,8 @@ jobs:
128136
os:
129137
- macos-latest
130138
- ubuntu-latest
139+
dove:
140+
- 1.2.7
131141

132142
steps:
133143
- name: Checkout repository
@@ -147,10 +157,18 @@ jobs:
147157
target: wasm32-unknown-unknown
148158
override: false
149159

160+
- name: get dove
161+
uses: pontem-network/get-dove@main
162+
with:
163+
prerelease: true
164+
version: ${{ matrix.dove }}
165+
token: ${{ secrets.GITHUB_TOKEN }}
166+
150167
- name: Build
151168
run: cargo +${{ steps.rust.outputs.version }} build --all
152169

153170
- name: make artifact
171+
if: "contains(github.event.head_commit.message, 'save artifact') || contains(github.event.head_commit.message, '+artifact')"
154172
uses: actions/[email protected]
155173
with:
156174
name: node-${{ matrix.os }}-debug

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@
1212
# Dove temp cache/lock-file
1313
.Dove.man
1414
/pallets/**/target/
15+
artifacts/
16+
/node/move/stdlib/
17+
18+
.direnv

0 commit comments

Comments
 (0)