Skip to content

Commit

Permalink
Add baedeker workflow - network starts and is ready for runtime upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
gztensor committed Jul 26, 2024
1 parent 6158e9b commit cc2ff9d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 76 deletions.
7 changes: 2 additions & 5 deletions .baedeker/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "1.0.0",
"description": "Scripts for running miscellaneous tasks on subtensor",
"scripts": {
"build": "tsc",
"upgradeRuntime": "node build/upgradeRuntime.js"
"upgradeRuntime": "node upgradeRuntime.js"
},
"author": "",
"license": "ISC",
Expand All @@ -14,8 +13,6 @@
"@polkadot/util-crypto": "^7.7.1"
},
"devDependencies": {
"@types/node": "^20.14.12",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"@types/node": "^20.14.12"
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ApiPromise, WsProvider } from '@polkadot/api';
import { Keyring } from '@polkadot/keyring';
import * as fs from 'fs';
const { ApiPromise, WsProvider } = require('@polkadot/api');
const { Keyring } = require('@polkadot/keyring');
const fs = require('fs');

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

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

Expand Down Expand Up @@ -42,4 +42,4 @@ async function main(): Promise<void> {
provider.disconnect();
}

main().catch(console.error);
main().catch(console.error);
13 changes: 0 additions & 13 deletions .baedeker/util/tsconfig.json

This file was deleted.

54 changes: 2 additions & 52 deletions .github/workflows/check-finney-clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,57 +211,7 @@ jobs:
- name: Runtime upgrade
working-directory: .baedeker/util
run: |
# yarn install
yarn install
../../scripts/wait_first_block_local.sh
echo "Executing runtime upgrade"
# yarn ts-node --esm util/runtimeUpgrade.ts
# cargo-test-benchmarks:
# name: cargo test w/benchmarks
# runs-on: SubtensorCI
# strategy:
# matrix:
# rust-branch:
# - stable
# rust-target:
# - x86_64-unknown-linux-gnu
# # - x86_64-apple-darwin
# os:
# - ubuntu-latest
# # - macos-latest
# include:
# - os: ubuntu-latest
# # - os: macos-latest
# env:
# RELEASE_NAME: development
# # RUSTFLAGS: -A warnings
# RUSTV: ${{ matrix.rust-branch }}
# RUST_BACKTRACE: full
# RUST_BIN_DIR: target/${{ matrix.rust-target }}
# SKIP_WASM_BUILD: 1
# TARGET: ${{ matrix.rust-target }}
# steps:
# - name: Check-out repository under $GITHUB_WORKSPACE
# uses: actions/checkout@v4

# - name: Install dependencies
# run: |
# sudo apt-get update &&
# sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

# - name: Install Rust ${{ matrix.rust-branch }}
# uses: actions-rs/[email protected]
# with:
# toolchain: ${{ matrix.rust-branch }}
# components: rustfmt, clippy
# profile: minimal

# - name: Utilize Rust shared cached
# uses: Swatinem/[email protected]
# with:
# key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

# - name: cargo test --workspace --features=runtime-benchmarks
# run: cargo test --workspace --features=runtime-benchmarks

node runtimeUpgrade.js

0 comments on commit cc2ff9d

Please sign in to comment.