From a38b430d95336d9fe03725d1b8c098386c352310 Mon Sep 17 00:00:00 2001 From: Yan Chen Date: Tue, 2 May 2023 17:26:11 -0700 Subject: [PATCH 01/26] perf from moc artifact --- .github/workflows/perf.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 11d49145..cce19d80 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -14,7 +14,7 @@ jobs: DFX_VERSION: 0.13.1 VESSEL_VERSION: v0.6.4 IC_REPL_VERSION: 0.3.18 - MOC_VERSION: 0.8.7 + MOC_ARTIFACT: 676558399 steps: - uses: actions/checkout@v3 - name: Checkout out gh-pages report @@ -56,9 +56,9 @@ jobs: cp ./vessel-linux64 /usr/local/bin/vessel chmod a+x /usr/local/bin/vessel dfx cache install - cd $(dfx cache show) - wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-linux64-$MOC_VERSION.tar.gz - tar zxvf motoko-linux64-$MOC_VERSION.tar.gz + wget https://nightly.link/dfinity/motoko/actions/artifacts/$MOC_ARTIFACT.zip + unzip $MOC_ARTIFACT.zip + cp bin/moc $(dfx cache show) - name: Start dfx run: | dfx start --background From 510bad26c25b1220f742ac7511719b9e097cb4c9 Mon Sep 17 00:00:00 2001 From: Yan Chen Date: Tue, 2 May 2023 17:30:37 -0700 Subject: [PATCH 02/26] fix --- .github/workflows/perf.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index cce19d80..904e2066 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -58,7 +58,8 @@ jobs: dfx cache install wget https://nightly.link/dfinity/motoko/actions/artifacts/$MOC_ARTIFACT.zip unzip $MOC_ARTIFACT.zip - cp bin/moc $(dfx cache show) + chmod a+x bin/moc + cp -rf bin/moc $(dfx cache show) - name: Start dfx run: | dfx start --background From 48d0853439606946541f24b511655a65fddae4e4 Mon Sep 17 00:00:00 2001 From: Yan Chen Date: Wed, 3 May 2023 09:56:11 -0700 Subject: [PATCH 03/26] trigger CI From 71cfcdea345c20db5b37b5ffe7e04226a433f1eb Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Tue, 13 Feb 2024 19:42:09 +0000 Subject: [PATCH 04/26] Update .github/workflows/perf.yml --- .github/workflows/perf.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index dafd32d5..f42fd4f5 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -71,9 +71,6 @@ jobs: cp -rf bin/moc $(dfx cache show) wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-linux64 cp ./ic-wasm-linux64 /usr/local/bin/ic-wasm - cd $(dfx cache show) - wget https://github.com/dfinity/motoko/releases/download/$MOC_VERSION/motoko-Darwin-x86_64-$MOC_VERSION.tar.gz - tar zxvf motoko-Darwin-x86_64-$MOC_VERSION.tar.gz wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-macos cp ./ic-wasm-macos /usr/local/bin/ic-wasm chmod a+x /usr/local/bin/ic-wasm From 81ed4c774bbc352e04952dad3a14cc244c052a76 Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:55:07 -0800 Subject: [PATCH 05/26] retrigger CI --- .github/workflows/perf.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index f42fd4f5..e678aebf 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -69,8 +69,6 @@ jobs: unzip $MOC_ARTIFACT.zip chmod a+x bin/moc cp -rf bin/moc $(dfx cache show) - wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-linux64 - cp ./ic-wasm-linux64 /usr/local/bin/ic-wasm wget https://github.com/dfinity/ic-wasm/releases/download/$IC_WASM_VERSION/ic-wasm-macos cp ./ic-wasm-macos /usr/local/bin/ic-wasm chmod a+x /usr/local/bin/ic-wasm From 080121a987094faedfaad5f0be5c86c83f3eb45b Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Sun, 18 Feb 2024 18:50:19 +0000 Subject: [PATCH 06/26] Update .github/workflows/perf.yml --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index e678aebf..9fefe327 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -16,7 +16,7 @@ jobs: MOC_VERSION: 0.10.4 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.75.0 - MOC_ARTIFACT: 1242507845 + MOC_ARTIFACT: 1254717873 steps: - uses: actions/checkout@v3 - name: Checkout out gh-pages report From 4f03b2eeef284f36032607a3a403b0cbdf35748d Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Sun, 18 Feb 2024 19:07:43 +0000 Subject: [PATCH 07/26] change artifact to gated --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 9fefe327..52256c44 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -16,7 +16,7 @@ jobs: MOC_VERSION: 0.10.4 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.75.0 - MOC_ARTIFACT: 1254717873 + MOC_ARTIFACT: 1254821742 steps: - uses: actions/checkout@v3 - name: Checkout out gh-pages report From e231f0a8fd5d9cdc09ea4e9de9db62b7c150b773 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Sun, 18 Feb 2024 22:11:35 +0000 Subject: [PATCH 08/26] Update .github/workflows/perf.yml --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 52256c44..d9ae43af 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -16,7 +16,7 @@ jobs: MOC_VERSION: 0.10.4 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.75.0 - MOC_ARTIFACT: 1254821742 + MOC_ARTIFACT: 1254959535 steps: - uses: actions/checkout@v3 - name: Checkout out gh-pages report From f54e87747a86d1b73097fda54fa64df5b3ad00cc Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 1 Mar 2024 16:23:07 -0800 Subject: [PATCH 09/26] bump rust cdk --- Cargo.lock | 55 ++++++++++++++++++++++++++---------------------------- Cargo.toml | 6 +++--- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f9b88e00..589c6788 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "arrayvec" @@ -98,9 +98,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "candid" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182543fbc03b4ad0bfc384e6b68346e0b0aad0b11d075b71b4fcaa5d07f8862c" +checksum = "7fcd70c7bed52cb20e38dd933c19c0c9abf0302b60db3fa3186e27ec53edf6ad" dependencies = [ "anyhow", "binread", @@ -121,24 +121,21 @@ dependencies = [ [[package]] name = "candid_derive" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970c220da8aa2fa6f7ef5dbbf3ea5b620a59eb3ac107cfb95ae8c6eebdfb7a08" +checksum = "3de398570c386726e7a59d9887b68763c481477f9a043fb998a2e09d428df1a9" dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" [[package]] name = "certified_map" @@ -275,7 +272,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -329,9 +326,9 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "hashmap" @@ -379,9 +376,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "ic-cdk" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3d204af0b11c45715169c997858edb58fa8407d08f4fae78a6b415dd39a362" +checksum = "c63a6fceb94127bda86bd6d05f859a0e2a67d128a8ffb5ddab17e1f15ac8f555" dependencies = [ "candid", "ic-cdk-macros", @@ -392,9 +389,9 @@ dependencies = [ [[package]] name = "ic-cdk-macros" -version = "0.8.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a618e4020cea88e933d8d2f8c7f86d570ec06213506a80d4f2c520a9bba512" +checksum = "2fde5ca6ef1e69825c68916ff1bf7256b8f7ed69ac5ea3f1756f6e57f1503e27" dependencies = [ "candid", "proc-macro2", @@ -406,9 +403,9 @@ dependencies = [ [[package]] name = "ic-cdk-timers" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c43b9706fef3ad10c4192a14801d16bd9539068239f0f06f257857441364329" +checksum = "054727a3a1c486528b96349817d54290ff70df6addf417def456ea708a16f7fb" dependencies = [ "futures", "ic-cdk", @@ -623,9 +620,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -651,13 +648,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] @@ -755,9 +752,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -781,7 +778,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.52", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index ee3660a6..8fb93292 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,8 @@ lto = true opt-level = 2 [workspace.dependencies] -ic-cdk = "0.12.0" -ic-cdk-timers = "0.6.0" -candid = "0.10.0" +ic-cdk = "0.13.1" +ic-cdk-timers = "0.7" +candid = "0.10.4" serde = "1" ic-stable-structures = "0.6" From caa16c89ed87ba536e9b1d53162c1a50c87eaa9b Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 1 Mar 2024 16:37:36 -0800 Subject: [PATCH 10/26] fix --- .github/workflows/perf.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 6112c761..eceaa439 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -17,7 +17,7 @@ jobs: IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.75.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout out gh-pages report if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'build_base') uses: actions/checkout@v3 @@ -26,7 +26,7 @@ jobs: path: main/_out - name: Checkout out base branch if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'build_base') - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} path: main/ @@ -37,14 +37,14 @@ jobs: override: true target: wasm32-unknown-unknown - name: Cache cargo build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-${{ env.RUSTC_VERSION }}-${{ hashFiles('**/Cargo.lock') }} - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 if: github.event_name == 'pull_request' with: python-version: "3.10" @@ -53,12 +53,15 @@ jobs: run: | python -m pip install --upgrade pip pip install pandas markdown lxml html5lib bs4 tabulate scipy - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 - - name: Install ic-repl, mops, dfx, and moc + - name: Install dfx + uses: dfinity/setup-dfx@main + with: + dfx-version: ${{ env.DFX_VERSION }} + - name: Install ic-repl, mops and moc run: | - echo y | DFX_VERSION=$DFX_VERSION bash -ci "$(curl -fsSL https://smartcontracts.org/install.sh)" wget https://github.com/chenyan2002/ic-repl/releases/download/$IC_REPL_VERSION/ic-repl-macos cp ./ic-repl-macos /usr/local/bin/ic-repl chmod a+x /usr/local/bin/ic-repl @@ -173,7 +176,7 @@ jobs: edit-mode: replace - name: Save tables as artifact for forked PR if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: reports path: | From b7c5b25074a8699707b6d4014dc9416d278ffd5f Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Fri, 1 Mar 2024 16:45:07 -0800 Subject: [PATCH 11/26] fix --- dapps/rust/dip721-nft/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dapps/rust/dip721-nft/src/lib.rs b/dapps/rust/dip721-nft/src/lib.rs index c8934048..736c1d30 100644 --- a/dapps/rust/dip721-nft/src/lib.rs +++ b/dapps/rust/dip721-nft/src/lib.rs @@ -185,7 +185,7 @@ fn total_supply() -> u64 { fn get_metadata(/* token_id: u64 */) /* -> Result<&'static MetadataDesc> */ { ic_cdk::setup(); - let token_id = call::arg_data::<(u64,)>().0; + let token_id = call::arg_data::<(u64,)>(call::ArgDecoderConfig::default()).0; let res: Result<()> = STATE.with(|state| { let state = state.borrow(); let metadata = &state @@ -211,7 +211,7 @@ struct ExtendedMetadataResult<'a> { fn get_metadata_for_user(/* user: Principal */) /* -> Vec */ { ic_cdk::setup(); - let user = call::arg_data::<(Principal,)>().0; + let user = call::arg_data::<(Principal,)>(call::ArgDecoderConfig::default()).0; STATE.with(|state| { let state = state.borrow(); let metadata: Vec<_> = state From c2b3d4190fe15375866a25022d4cd1806c536e0b Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:36:32 -0800 Subject: [PATCH 12/26] bump moc --- .github/workflows/perf.yml | 6 +++--- heartbeat/motoko/timer.mo | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index eceaa439..41babc72 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -11,11 +11,11 @@ jobs: strategy: fail-fast: false env: - DFX_VERSION: 0.16.1 + DFX_VERSION: 0.18.0-beta.3 IC_REPL_VERSION: 0.6.2 - MOC_VERSION: 0.10.4 + MOC_VERSION: 0.11.0 IC_WASM_VERSION: 0.7.0 - RUSTC_VERSION: 1.75.0 + RUSTC_VERSION: 1.76.0 steps: - uses: actions/checkout@v4 - name: Checkout out gh-pages report diff --git a/heartbeat/motoko/timer.mo b/heartbeat/motoko/timer.mo index e7da55a2..67c3dfda 100644 --- a/heartbeat/motoko/timer.mo +++ b/heartbeat/motoko/timer.mo @@ -2,7 +2,7 @@ import Timer "mo:base/Timer"; actor { public func setTimer(sec : Nat) : async Nat { - Timer.setTimer(#seconds sec, func () : async () {}); + Timer.setTimer(#seconds sec, func () : async () {}); }; public func cancelTimer(id : Nat) : async () { Timer.cancelTimer(id); From 75135025875c91baab5b85e4a14369ac5201ca4a Mon Sep 17 00:00:00 2001 From: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com> Date: Wed, 6 Mar 2024 09:57:10 -0800 Subject: [PATCH 13/26] try rtti for sha2 --- crypto/motoko/dfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index 923b11b6..f0cc76e9 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "" + "args": "--experimental-rtti" } } } From 15bae8e08689a0800c559aee26467aef156b03a1 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 11:13:17 +0000 Subject: [PATCH 14/26] enable sanity-checks --- crypto/motoko/dfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index f0cc76e9..1233d55e 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "--experimental-rtti" + "args": "--experimental-rtti --sanity-checks" } } } From 4dcb3299bf3f1c3d598250a78d1d05f2f0218150 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 11:39:06 +0000 Subject: [PATCH 15/26] skip other tests --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e335a94..ff73eb21 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -APPS = dapps collections crypto pub-sub heartbeat motoko +#APPS = dapps collections crypto pub-sub heartbeat motoko +APPS = crypto all: $(foreach test_dir,$(APPS),make -C $(test_dir) &&) true From fa7e68a4999087bfa3e36caae6158ea4a4b7b9e4 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 17:42:14 +0000 Subject: [PATCH 16/26] Update .github/workflows/perf.yml --- .github/workflows/perf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 5d8c4e30..8a51e54e 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -16,7 +16,7 @@ jobs: MOC_VERSION: 0.11.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 - MOC_ARTIFACT: 1254821742 + MOC_ARTIFACT: 1305781756 steps: - uses: actions/checkout@v4 - name: Checkout out gh-pages report From 3d8f53c2bf14906c30ca59cff4daaa9a36a27fcf Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 20:57:27 +0000 Subject: [PATCH 17/26] reduce test size --- crypto/perf.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 968ec0b5..4bdc1bb4 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -74,7 +74,8 @@ let res2 = perf_sha(sha_rs, "Rust"); assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -let init_size = 10_000; +//let init_size = 10_000; +let init_size = 10_0; let res1 = perf_map(map_mo, "Motoko", init_size); let res2 = perf_map(map_rs, "Rust", init_size); // Cannot check for equality because witness is not unique From 921db01680bd583c347f618c8dd4414b7f7b2b1f Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 21:00:56 +0000 Subject: [PATCH 18/26] skip more tests --- crypto/perf.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 4bdc1bb4..9c0ef743 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -70,13 +70,14 @@ function perf_map(wasm, title, init_size) { }; let res1 = perf_sha(sha_mo, "Motoko"); -let res2 = perf_sha(sha_rs, "Rust"); -assert res1 == res2; -output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -//let init_size = 10_000; -let init_size = 10_0; -let res1 = perf_map(map_mo, "Motoko", init_size); -let res2 = perf_map(map_rs, "Rust", init_size); -// Cannot check for equality because witness is not unique +// let res2 = perf_sha(sha_rs, "Rust"); // assert res1 == res2; + +// output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); +// //let init_size = 10_000; +// let init_size = 10_0; +// let res1 = perf_map(map_mo, "Motoko", init_size); +// let res2 = perf_map(map_rs, "Rust", init_size); +// // Cannot check for equality because witness is not unique +// // assert res1 == res2; From f631f255516c67e9d56f5d7720cef9318834209f Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 22:31:56 +0000 Subject: [PATCH 19/26] try other test --- crypto/perf.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 9c0ef743..08436724 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -69,15 +69,15 @@ function perf_map(wasm, title, init_size) { witness; }; -let res1 = perf_sha(sha_mo, "Motoko"); +//let res1 = perf_sha(sha_mo, "Motoko"); // let res2 = perf_sha(sha_rs, "Rust"); // assert res1 == res2; -// output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); +output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); // //let init_size = 10_000; -// let init_size = 10_0; -// let res1 = perf_map(map_mo, "Motoko", init_size); +let init_size = 10_0; +let res1 = perf_map(map_mo, "Motoko", init_size); // let res2 = perf_map(map_rs, "Rust", init_size); // // Cannot check for equality because witness is not unique // // assert res1 == res2; From bb21be44ef563bc109e7679721fd5dd9578cd92d Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 22:55:13 +0000 Subject: [PATCH 20/26] bump size --- crypto/perf.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index 08436724..b5860902 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -75,8 +75,7 @@ function perf_map(wasm, title, init_size) { // assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); -// //let init_size = 10_000; -let init_size = 10_0; +let init_size = 10_000; let res1 = perf_map(map_mo, "Motoko", init_size); // let res2 = perf_map(map_rs, "Rust", init_size); // // Cannot check for equality because witness is not unique From 1de475a55ac8a5bb9d75663ec3703783ca055b4c Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 22:56:54 +0000 Subject: [PATCH 21/26] disable sanity-checks, TaggingScheme.debug is enough; revert size --- crypto/motoko/dfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index 1233d55e..f0cc76e9 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "--experimental-rtti --sanity-checks" + "args": "--experimental-rtti" } } } From 6b3870f6efd8138bf44e85a8702c7a99b02b32fd Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 7 Mar 2024 23:12:13 +0000 Subject: [PATCH 22/26] try sha again --- crypto/perf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/perf.sh b/crypto/perf.sh index b5860902..2fe91290 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -69,7 +69,7 @@ function perf_map(wasm, title, init_size) { witness; }; -//let res1 = perf_sha(sha_mo, "Motoko"); +let res1 = perf_sha(sha_mo, "Motoko"); // let res2 = perf_sha(sha_rs, "Rust"); // assert res1 == res2; From 5093a092dd41b2c9a9a29b32ac3c11002f15259b Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Fri, 8 Mar 2024 10:45:37 +0000 Subject: [PATCH 23/26] Update crypto/motoko/dfx.json --- crypto/motoko/dfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index f0cc76e9..1233d55e 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "--experimental-rtti" + "args": "--experimental-rtti --sanity-checks" } } } From cd5c9c8d72444adae604ff564eb2a9de3d8c8f35 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Fri, 8 Mar 2024 11:03:14 +0000 Subject: [PATCH 24/26] Update crypto/motoko/dfx.json --- crypto/motoko/dfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index 1233d55e..f0cc76e9 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "--experimental-rtti --sanity-checks" + "args": "--experimental-rtti" } } } From e168755360757c62df212d45548f01383b115dd3 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Sun, 10 Mar 2024 20:36:24 +0000 Subject: [PATCH 25/26] Use moc artificats that enable rtti by default --- .github/workflows/perf.yml | 2 +- crypto/motoko/dfx.json | 2 +- crypto/perf.sh | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 8a51e54e..d9a95903 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -16,7 +16,7 @@ jobs: MOC_VERSION: 0.11.0 IC_WASM_VERSION: 0.7.0 RUSTC_VERSION: 1.76.0 - MOC_ARTIFACT: 1305781756 + MOC_ARTIFACT: 1313046367 steps: - uses: actions/checkout@v4 - name: Checkout out gh-pages report diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index f0cc76e9..923b11b6 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "--experimental-rtti" + "args": "" } } } diff --git a/crypto/perf.sh b/crypto/perf.sh index 2fe91290..968ec0b5 100644 --- a/crypto/perf.sh +++ b/crypto/perf.sh @@ -70,13 +70,12 @@ function perf_map(wasm, title, init_size) { }; let res1 = perf_sha(sha_mo, "Motoko"); - -// let res2 = perf_sha(sha_rs, "Rust"); -// assert res1 == res2; +let res2 = perf_sha(sha_rs, "Rust"); +assert res1 == res2; output(file, "\n## Certified map\n\n| |binary_size|generate 10k|max mem|inc|witness|upgrade|\n|--:|--:|--:|--:|--:|--:|--:|\n"); let init_size = 10_000; let res1 = perf_map(map_mo, "Motoko", init_size); -// let res2 = perf_map(map_rs, "Rust", init_size); -// // Cannot check for equality because witness is not unique -// // assert res1 == res2; +let res2 = perf_map(map_rs, "Rust", init_size); +// Cannot check for equality because witness is not unique +// assert res1 == res2; From 14fc11a8c75d5f5b0a395c27ff6326b01b00f8ad Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Sun, 10 Mar 2024 20:40:20 +0000 Subject: [PATCH 26/26] oops, renable --experimental-rtti --- crypto/motoko/dfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/motoko/dfx.json b/crypto/motoko/dfx.json index 923b11b6..f0cc76e9 100644 --- a/crypto/motoko/dfx.json +++ b/crypto/motoko/dfx.json @@ -12,7 +12,7 @@ "defaults": { "build": { "packtool": "mops sources", - "args": "" + "args": "--experimental-rtti" } } }