Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove moonshadow runtime #660

Merged
merged 2 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions .github/workflows/publish-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
chain: ["moonbase", "moonshadow", "moonriver", "moonbeam"]
chain: ["moonbase", "moonriver", "moonbeam"]
steps:
- name: Get Timestamp
run: echo "TMSP=$(date '+%Y%m%d_%H%M%S')" >> $GITHUB_ENV
Expand Down Expand Up @@ -63,11 +63,6 @@ jobs:
with:
name: moonbase-runtime
path: build
- name: Download moonshadow runtime
uses: actions/download-artifact@v2
with:
name: moonshadow-runtime
path: build
- name: Download moonriver runtime
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -96,11 +91,6 @@ jobs:
mv build/moonbase-runtime.compact.wasm moonbase-runtime-${runtime_moonbase_ver}.wasm
mv build/moonbase-srtool-digest.json moonbase-runtime-${runtime_moonbase_ver}-srtool-digest.json

runtime_moonshadow_ver="$(cat ./runtime/moonshadow/src/lib.rs | grep -o 'spec_version: [0-9]*' | tail -1 | grep -o '[0-9]*')"
echo "::set-output name=runtime_moonshadow_ver::$runtime_moonshadow_ver"
mv build/moonshadow-runtime.compact.wasm moonshadow-runtime-${runtime_moonshadow_ver}.wasm
mv build/moonshadow-srtool-digest.json moonshadow-runtime-${runtime_moonshadow_ver}-srtool-digest.json

runtime_moonriver_ver="$(cat ./runtime/moonriver/src/lib.rs | grep -o 'spec_version: [0-9]*' | tail -1 | grep -o '[0-9]*')"
echo "::set-output name=runtime_moonriver_ver::$runtime_moonriver_ver"
mv build/moonriver-runtime.compact.wasm moonriver-runtime-${runtime_moonriver_ver}.wasm
Expand Down Expand Up @@ -139,24 +129,6 @@ jobs:
asset_path: moonbase-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonbase_ver }}-srtool-digest.json
asset_name: moonbase-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonbase_ver }}.srtool-digest.json
asset_content_type: application/json
- name: Upload moonshadow wasm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}.wasm
asset_name: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}.wasm
asset_content_type: application/octet-stream
- name: Upload moonshadow srtool digest
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}-srtool-digest.json
asset_name: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}.srtool-digest.json
asset_content_type: application/json
- name: Upload moonriver wasm
uses: actions/upload-release-asset@v1
env:
Expand Down
30 changes: 1 addition & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
chain: ["moonbase", "moonshadow", "moonriver", "moonbeam"]
chain: ["moonbase", "moonriver", "moonbeam"]
steps:
- name: Get Timestamp
run: echo "TMSP=$(date '+%Y%m%d_%H%M%S')" >> $GITHUB_ENV
Expand Down Expand Up @@ -207,11 +207,6 @@ jobs:
with:
name: moonbase-runtime
path: build
- name: Download moonshadow runtime
uses: actions/download-artifact@v2
with:
name: moonshadow-runtime
path: build
- name: Download moonriver runtime
uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -240,11 +235,6 @@ jobs:
echo "::set-output name=runtime_moonbase_ver::$runtime_moonbase_ver"
mv build/moonbase-runtime.compact.wasm moonbase-runtime-${runtime_moonbase_ver}.wasm
mv build/moonbase-srtool-digest.json moonbase-runtime-${runtime_moonbase_ver}-srtool-digest.json
runtime_moonshadow_ver="$(cat ./runtime/moonshadow/src/lib.rs | grep -o 'spec_version: [0-9]*' | tail -1 | grep -o '[0-9]*')"

echo "::set-output name=runtime_moonshadow_ver::$runtime_moonshadow_ver"
mv build/moonshadow-runtime.compact.wasm moonshadow-runtime-${runtime_moonshadow_ver}.wasm
mv build/moonshadow-srtool-digest.json moonshadow-runtime-${runtime_moonshadow_ver}-srtool-digest.json
runtime_moonriver_ver="$(cat ./runtime/moonriver/src/lib.rs | grep -o 'spec_version: [0-9]*' | tail -1 | grep -o '[0-9]*')"

echo "::set-output name=runtime_moonriver_ver::$runtime_moonriver_ver"
Expand Down Expand Up @@ -284,24 +274,6 @@ jobs:
asset_path: moonbase-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonbase_ver }}-srtool-digest.json
asset_name: moonbase-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonbase_ver }}.srtool-digest.json
asset_content_type: application/json
- name: Upload moonshadow wasm
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}.wasm
asset_name: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}.wasm
asset_content_type: application/octet-stream
- name: Upload moonshadow srtool digest
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}-srtool-digest.json
asset_name: moonshadow-runtime-${{ steps.get-runtime-ver.outputs.runtime_moonshadow_ver }}.srtool-digest.json
asset_content_type: application/json
- name: Upload moonriver wasm
uses: actions/upload-release-asset@v1
env:
Expand Down
77 changes: 2 additions & 75 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
members = [
'runtime/moonbeam',
'runtime/moonriver',
'runtime/moonshadow',
'runtime/moonbase',
'node',
'node/cli',
Expand Down
1 change: 0 additions & 1 deletion moonbeam-types-bundle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,5 @@ export const typesBundle = {
moonbeamDefinitions,
moonbase: moonbeamDefinitions,
moonriver: moonbeamDefinitions,
moonshadow: moonbeamDefinitions,
},
} as OverrideBundleType;
4 changes: 0 additions & 4 deletions node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ pub struct RunCmd {
/// Force using Moonriver native runtime.
#[structopt(long = "force-moonriver")]
pub force_moonriver: bool,

/// Force using Moonshadow native runtime.
#[structopt(long = "force-moonshadow")]
pub force_moonshadow: bool,
}

impl std::ops::Deref for RunCmd {
Expand Down
48 changes: 0 additions & 48 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ fn load_spec(
"moonriver-dev" => Box::new(chain_spec::moonriver::development_chain_spec(None, None)),
"moonriver-local" => Box::new(chain_spec::moonriver::get_chain_spec(para_id)),

// Moonshadow networks
"moonshadow" => Box::new(chain_spec::moonbase::ChainSpec::from_json_bytes(
&include_bytes!("../../../specs/moonshadow/parachain-embedded-specs.json")[..],
)?),
"moonshadow-dev" => Box::new(chain_spec::moonshadow::development_chain_spec(None, None)),
"moonshadow-local" => Box::new(chain_spec::moonshadow::get_chain_spec(para_id)),

// Moonbeam networks
"moonbeam" => {
return Err(
Expand Down Expand Up @@ -100,8 +93,6 @@ fn load_spec(
Box::new(chain_spec::moonbase::ChainSpec::from_json_file(path)?)
} else if run_cmd.force_moonriver || starts_with("moonriver") {
Box::new(chain_spec::moonriver::ChainSpec::from_json_file(path)?)
} else if run_cmd.force_moonshadow || starts_with("moonshadow") {
Box::new(chain_spec::moonshadow::ChainSpec::from_json_file(path)?)
} else {
Box::new(chain_spec::moonbeam::ChainSpec::from_json_file(path)?)
}
Expand Down Expand Up @@ -149,8 +140,6 @@ impl SubstrateCli for Cli {
return &service::moonbase_runtime::VERSION;
} else if spec.is_moonriver() {
return &service::moonriver_runtime::VERSION;
} else if spec.is_moonshadow() {
return &service::moonshadow_runtime::VERSION;
} else {
return &service::moonbeam_runtime::VERSION;
}
Expand Down Expand Up @@ -237,14 +226,6 @@ pub fn run() -> Result<()> {
)),
config.network,
)
} else if config.chain_spec.is_moonshadow() {
params.base.run(
Box::new(chain_spec::moonshadow::development_chain_spec(
params.mnemonic.clone(),
params.accounts,
)),
config.network,
)
} else {
params.base.run(
Box::new(chain_spec::moonbase::development_chain_spec(
Expand Down Expand Up @@ -358,16 +339,6 @@ pub fn run() -> Result<()> {
format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes()
};
output_buf
} else if chain_spec.is_moonshadow() {
let block: service::moonshadow_runtime::Block =
generate_genesis_block(&chain_spec)?;
let raw_header = block.header().encode();
let output_buf = if params.raw {
raw_header
} else {
format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes()
};
output_buf
} else {
let block: service::moonbase_runtime::Block = generate_genesis_block(&chain_spec)?;
let raw_header = block.header().encode();
Expand Down Expand Up @@ -424,12 +395,6 @@ pub fn run() -> Result<()> {
config,
)
});
} else if chain_spec.is_moonshadow() {
return runner.sync_run(|config| {
cmd.run::<service::moonshadow_runtime::Block, service::MoonshadowExecutor>(
config,
)
});
} else {
return runner.sync_run(|config| {
cmd.run::<service::moonbase_runtime::Block, service::MoonbaseExecutor>(
Expand Down Expand Up @@ -502,11 +467,6 @@ pub fn run() -> Result<()> {
generate_genesis_block(&config.chain_spec)
.map_err(|e| format!("{:?}", e))?;
format!("0x{:?}", HexDisplay::from(&block.header().encode()))
} else if config.chain_spec.is_moonshadow() {
let block: service::moonshadow_runtime::Block =
generate_genesis_block(&config.chain_spec)
.map_err(|e| format!("{:?}", e))?;
format!("0x{:?}", HexDisplay::from(&block.header().encode()))
} else {
let block: service::moonbase_runtime::Block =
generate_genesis_block(&config.chain_spec)
Expand Down Expand Up @@ -539,14 +499,6 @@ pub fn run() -> Result<()> {
.await
.map(|r| r.0)
.map_err(Into::into)
} else if config.chain_spec.is_moonshadow() {
service::start_node::<
service::moonshadow_runtime::RuntimeApi,
service::MoonshadowExecutor,
>(config, polkadot_config, id, rpc_config)
.await
.map(|r| r.0)
.map_err(Into::into)
} else {
service::start_node::<
service::moonbase_runtime::RuntimeApi,
Expand Down
1 change: 0 additions & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ cli-opt = { package = "moonbeam-cli-opt", path = "../cli-opt" }
# Runtimes
moonbeam-runtime = { path = "../../runtime/moonbeam" }
moonriver-runtime = { path = "../../runtime/moonriver" }
moonshadow-runtime = { path = "../../runtime/moonshadow" }
moonbase-runtime = { path = "../../runtime/moonbase" }

moonbeam-rpc-txpool = { path = "../../client/rpc/txpool" }
Expand Down
1 change: 0 additions & 1 deletion node/service/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use tiny_hderive::bip32::ExtendedPrivKey;
pub mod moonbase;
pub mod moonbeam;
pub mod moonriver;
pub mod moonshadow;
pub mod test_spec;

#[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension, ChainSpecGroup)]
Expand Down
Loading