Skip to content

Commit

Permalink
rename crates
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ghtStorm committed Jan 9, 2025
1 parent 1f51015 commit 0ea1249
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 85 deletions.
120 changes: 60 additions & 60 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "data-storage-node"
description = "A parachain node template built with Substrate and Cumulus, part of Polkadot Sdk."
description = "Data Storage Node"
version = "0.0.0"
license = "MIT-0"
authors.workspace = true
Expand All @@ -20,7 +20,7 @@ futures = "0.3.28"
serde_json = { workspace = true, default-features = true }

# Local
parachain-template-runtime = { path = "../runtime" }
data-storage-runtime = { path = "../runtime" }

# Substrate
frame-benchmarking = { workspace = true }
Expand Down Expand Up @@ -80,14 +80,14 @@ runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
"frame-benchmarking-cli/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"parachain-template-runtime/runtime-benchmarks",
"data-storage-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
"parachain-template-runtime/try-runtime",
"data-storage-runtime/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
]
8 changes: 4 additions & 4 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cumulus_primitives_core::ParaId;
use parachain_template_runtime as runtime;
use data_storage_runtime as runtime;
use runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
Expand Down Expand Up @@ -57,7 +57,7 @@ where
/// Generate the session keys from individual elements.
///
/// The input must be a tuple of individual keys (a single arg for now since we have just one key).
pub fn template_session_keys(keys: AuraId) -> runtime::SessionKeys {
pub fn local_session_keys(keys: AuraId) -> runtime::SessionKeys {
runtime::SessionKeys { aura: keys }
}

Expand Down Expand Up @@ -159,7 +159,7 @@ pub fn local_testnet_config() -> ChainSpec {
get_account_id_from_seed::<sr25519::Public>("Alice"),
1000.into(),
))
.with_protocol_id("template-local")
.with_protocol_id("data-storage-local")
.with_properties(properties)
.build()
}
Expand Down Expand Up @@ -188,7 +188,7 @@ fn testnet_genesis(
(
acc.clone(), // account id
acc, // validator id
template_session_keys(aura), // session keys
local_session_keys(aura), // session keys
)
})
.collect::<Vec<_>>(),
Expand Down
8 changes: 4 additions & 4 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ pub enum Subcommand {

const AFTER_HELP_EXAMPLE: &str = color_print::cstr!(
r#"<bold><underline>Examples:</></>
<bold>parachain-template-node build-spec --disable-default-bootnode > plain-parachain-chainspec.json</>
<bold>data-storage-node build-spec --disable-default-bootnode > plain-parachain-chainspec.json</>
Export a chainspec for a local testnet in json format.
<bold>parachain-template-node --chain plain-parachain-chainspec.json --tmp -- --chain rococo-local</>
<bold>data-storage-node --chain plain-parachain-chainspec.json --tmp -- --chain rococo-local</>
Launch a full node with chain specification loaded from plain-parachain-chainspec.json.
<bold>parachain-template-node</>
<bold>data-storage-node</>
Launch a full node with default parachain <italic>local-testnet</> and relay chain <italic>rococo-local</>.
<bold>parachain-template-node --collator</>
<bold>data-storage-node --collator</>
Launch a collator with default parachain <italic>local-testnet</> and relay chain <italic>rococo-local</>.
"#
);
Expand Down
11 changes: 5 additions & 6 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunc
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use log::info;
use parachain_template_runtime::Block;
use data_storage_runtime::Block;
use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
NetworkParams, Result, SharedParams, SubstrateCli,
Expand All @@ -20,15 +20,14 @@ use crate::{
fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
Ok(match id {
"dev" => Box::new(chain_spec::development_config()),
"template-rococo" => Box::new(chain_spec::local_testnet_config()),
"" | "local" => Box::new(chain_spec::local_testnet_config()),
path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
})
}

impl SubstrateCli for Cli {
fn impl_name() -> String {
"Parachain Collator Template".into()
"Atleta Data Storage Parachain Collator".into()
}

fn impl_version() -> String {
Expand All @@ -37,7 +36,7 @@ impl SubstrateCli for Cli {

fn description() -> String {
format!(
"Parachain Collator Template\n\nThe command-line arguments provided first will be \
"Parachain Collator \n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n\
{} <parachain-args> -- <relay-chain-args>",
Expand All @@ -64,7 +63,7 @@ impl SubstrateCli for Cli {

impl SubstrateCli for RelayChainCli {
fn impl_name() -> String {
"Parachain Collator Template".into()
"Atleta Data Storage Parachain Collator".into()
}

fn impl_version() -> String {
Expand All @@ -73,7 +72,7 @@ impl SubstrateCli for RelayChainCli {

fn description() -> String {
format!(
"Parachain Collator Template\n\nThe command-line arguments provided first will be \
"Atleta Data Storage Parachain Collator \n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relay chain node.\n\n\
{} <parachain-args> -- <relay-chain-args>",
Expand Down
2 changes: 1 addition & 1 deletion node/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Substrate Parachain Node Template CLI
//! Atleta Data Storage Parachain Node CLI
#![warn(missing_docs)]

Expand Down
2 changes: 1 addition & 1 deletion node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use std::sync::Arc;

use parachain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
use data_storage_runtime::{opaque::Block, AccountId, Balance, Nonce};

pub use sc_rpc::DenyUnsafe;
use sc_transaction_pool_api::TransactionPool;
Expand Down
2 changes: 1 addition & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{sync::Arc, time::Duration};

use cumulus_client_cli::CollatorOptions;
// Local Runtime Types
use parachain_template_runtime::{
use data_storage_runtime::{
apis::RuntimeApi,
opaque::{Block, Hash},
};
Expand Down
4 changes: 2 additions & 2 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "parachain-template-runtime"
description = "A parachain runtime template built with Substrate and Cumulus, part of Polkadot Sdk."
name = "data-storage-runtime"
description = "Atleta data storage parachain runtime"
version = "0.0.0"
license = "MIT-0"
authors.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ pub struct WeightToFee;
impl WeightToFeePolynomial for WeightToFee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
// in Rococo, extrinsic base weight (smallest non-zero weight) is mapped to 1 MILLIUNIT:
// in our template, we map to 1/10 of that, or 1/10 MILLIUNIT
let p = MILLIUNIT / 10;
let q = 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
smallvec![WeightToFeeCoefficient {
Expand Down

0 comments on commit 0ea1249

Please sign in to comment.