Skip to content

Commit cc2ff9d

Browse files
committed
Add baedeker workflow - network starts and is ready for runtime upgrade
1 parent 6158e9b commit cc2ff9d

File tree

4 files changed

+10
-76
lines changed

4 files changed

+10
-76
lines changed

.baedeker/util/package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"version": "1.0.0",
44
"description": "Scripts for running miscellaneous tasks on subtensor",
55
"scripts": {
6-
"build": "tsc",
7-
"upgradeRuntime": "node build/upgradeRuntime.js"
6+
"upgradeRuntime": "node upgradeRuntime.js"
87
},
98
"author": "",
109
"license": "ISC",
@@ -14,8 +13,6 @@
1413
"@polkadot/util-crypto": "^7.7.1"
1514
},
1615
"devDependencies": {
17-
"@types/node": "^20.14.12",
18-
"ts-node": "^10.9.2",
19-
"typescript": "^5.5.4"
16+
"@types/node": "^20.14.12"
2017
}
2118
}

.baedeker/util/runtimeUpgrade.ts .baedeker/util/runtimeUpgrade.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { ApiPromise, WsProvider } from '@polkadot/api';
2-
import { Keyring } from '@polkadot/keyring';
3-
import * as fs from 'fs';
1+
const { ApiPromise, WsProvider } = require('@polkadot/api');
2+
const { Keyring } = require('@polkadot/keyring');
3+
const fs = require('fs');
44

55
const NODE_URL = 'ws://127.0.0.1:9946';
66
const SUDO_ACCOUNT_SEED = '//Alice';
7-
const WASM_FILE_PATH = './path/to/your/runtime.wasm';
7+
const WASM_FILE_PATH = '../../target/release/wbuild/node-subtensor-runtime/node_subtensor_runtime.compact.compressed.wasm';
88

9-
async function main(): Promise<void> {
9+
async function main() {
1010
// Create a provider connected to the local node
1111
const provider = new WsProvider(NODE_URL);
1212

@@ -42,4 +42,4 @@ async function main(): Promise<void> {
4242
provider.disconnect();
4343
}
4444

45-
main().catch(console.error);
45+
main().catch(console.error);

.baedeker/util/tsconfig.json

-13
This file was deleted.

.github/workflows/check-finney-clone.yml

+2-52
Original file line numberDiff line numberDiff line change
@@ -211,57 +211,7 @@ jobs:
211211
- name: Runtime upgrade
212212
working-directory: .baedeker/util
213213
run: |
214-
# yarn install
214+
yarn install
215215
../../scripts/wait_first_block_local.sh
216216
echo "Executing runtime upgrade"
217-
# yarn ts-node --esm util/runtimeUpgrade.ts
218-
219-
220-
# cargo-test-benchmarks:
221-
# name: cargo test w/benchmarks
222-
# runs-on: SubtensorCI
223-
# strategy:
224-
# matrix:
225-
# rust-branch:
226-
# - stable
227-
# rust-target:
228-
# - x86_64-unknown-linux-gnu
229-
# # - x86_64-apple-darwin
230-
# os:
231-
# - ubuntu-latest
232-
# # - macos-latest
233-
# include:
234-
# - os: ubuntu-latest
235-
# # - os: macos-latest
236-
# env:
237-
# RELEASE_NAME: development
238-
# # RUSTFLAGS: -A warnings
239-
# RUSTV: ${{ matrix.rust-branch }}
240-
# RUST_BACKTRACE: full
241-
# RUST_BIN_DIR: target/${{ matrix.rust-target }}
242-
# SKIP_WASM_BUILD: 1
243-
# TARGET: ${{ matrix.rust-target }}
244-
# steps:
245-
# - name: Check-out repository under $GITHUB_WORKSPACE
246-
# uses: actions/checkout@v4
247-
248-
# - name: Install dependencies
249-
# run: |
250-
# sudo apt-get update &&
251-
# sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
252-
253-
# - name: Install Rust ${{ matrix.rust-branch }}
254-
# uses: actions-rs/toolchain@v1.0.6
255-
# with:
256-
# toolchain: ${{ matrix.rust-branch }}
257-
# components: rustfmt, clippy
258-
# profile: minimal
259-
260-
# - name: Utilize Rust shared cached
261-
# uses: Swatinem/rust-cache@v2.2.1
262-
# with:
263-
# key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}
264-
265-
# - name: cargo test --workspace --features=runtime-benchmarks
266-
# run: cargo test --workspace --features=runtime-benchmarks
267-
217+
node runtimeUpgrade.js

0 commit comments

Comments
 (0)