Skip to content
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3cdde97
Part.1
aurexav Dec 17, 2024
ad06f78
Companion of paritytech/polkadot-sdk#3052
aurexav Dec 17, 2024
ca15b06
Companion of paritytech/polkadot-sdk#3221
aurexav Dec 17, 2024
b6e7cd4
Companion of paritytech/polkadot-sdk#3002
aurexav Dec 17, 2024
0702a44
Companion of paritytech/polkadot-sdk#1781
aurexav Dec 17, 2024
bc4d286
Companion of paritytech/polkadot-sdk#3505
aurexav Dec 17, 2024
3ef19e6
Companion of paritytech/polkadot-sdk#3696
aurexav Dec 17, 2024
66184fc
Companion of paritytech/polkadot-sdk#3607
aurexav Dec 17, 2024
df28cf1
Companion of paritytech/polkadot-sdk#3844
aurexav Dec 17, 2024
66f3256
Companion of paritytech/polkadot-sdk#3854
aurexav Dec 17, 2024
ab6fdaa
Companion of paritytech/polkadot-sdk#3858
aurexav Dec 17, 2024
84d1f43
Companion of paritytech/polkadot-sdk#2714
aurexav Dec 18, 2024
153dcff
Fix nostd compile
aurexav Dec 18, 2024
735f466
Companion of paritytech/polkadot-sdk#3660
aurexav Dec 18, 2024
b17ee23
Companion of paritytech/polkadot-sdk#4238
aurexav Dec 18, 2024
5ab0f08
Companion of paritytech/polkadot-sdk#4177
aurexav Dec 18, 2024
855735b
Companion of paritytech/polkadot-sdk#4156
aurexav Dec 18, 2024
be7fbda
Companion of paritytech/polkadot-sdk#4346
aurexav Dec 18, 2024
658fdc5
Companion of paritytech/polkadot-sdk#4355
aurexav Dec 18, 2024
3f2b3a6
Companion of paritytech/polkadot-sdk#3952
aurexav Dec 25, 2024
b0b9249
Companion of paritytech/polkadot-sdk#4410
aurexav Dec 25, 2024
3b94aad
Companion of paritytech/polkadot-sdk#4634
aurexav Dec 25, 2024
b4ac1a3
Companion of paritytech/polkadot-sdk#4666
aurexav Dec 25, 2024
33b3fee
Companion of paritytech/polkadot-sdk#3820
aurexav Dec 25, 2024
22ed2e6
Companion of paritytech/polkadot-sdk#4831
aurexav Dec 25, 2024
e6e1e38
Companion of paritytech/polkadot-sdk#4730
aurexav Dec 25, 2024
6cac042
Companion of paritytech/polkadot-sdk#4857
aurexav Dec 25, 2024
cf85cbc
Companion of paritytech/polkadot-sdk#4805
aurexav Dec 25, 2024
5b3dcf3
Companion of paritytech/polkadot-sdk#3350
aurexav Dec 25, 2024
9bccc9b
Add missing updates
aurexav Dec 25, 2024
fe387bf
Fix XCM related
jiguantong Dec 25, 2024
54606af
Compile all runtime
aurexav Dec 25, 2024
91a0ec4
Fixes
aurexav Dec 27, 2024
64fa8f4
Fixes
aurexav Dec 27, 2024
447b568
Companion of paritytech/polkadot-sdk#2944
aurexav Dec 27, 2024
50e9d5c
Fix tests
aurexav Dec 27, 2024
7726226
Format
aurexav Dec 27, 2024
8e088c6
Fix unit test cases
boundless-forest Dec 27, 2024
57f64f2
Format
aurexav Dec 29, 2024
cbb0388
Format
aurexav Dec 29, 2024
04d2b1b
Add missing features
aurexav Dec 29, 2024
47d8cb5
Fixes
aurexav Dec 30, 2024
a36af4a
Update Cargo.toml to include EVM patches and fix tracing test assertions
boundless-forest Dec 30, 2024
a3443f0
Remove unnecessary console.log from EVM tracing test
boundless-forest Dec 30, 2024
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
6,749 changes: 3,622 additions & 3,127 deletions Cargo.lock

Large diffs are not rendered by default.

306 changes: 151 additions & 155 deletions Cargo.toml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ substrate-build-script-utils = { workspace = true }
array-bytes = { workspace = true }
async-trait = { version = "0.1" }
clap = { version = "4.4", features = ["derive"] }
color-print = { version = "0.3" }
futures = { version = "0.3" }
jsonrpsee = { version = "0.20", features = ["server"] }
jsonrpsee = { version = "0.23", features = ["server"] }
log = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", features = ["arbitrary_precision"] }
Expand Down
4 changes: 2 additions & 2 deletions node/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup, GenericChainSpec, Proper
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{Pair, Public};

pub type ChainSpec = sc_service::GenericChainSpec<(), Extensions>;
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;

const PROTOCOL_ID: &str = "dar";

Expand Down Expand Up @@ -132,7 +132,7 @@ where
)
}

fn load_config<E>(name: &'static str, mut retries: u8) -> GenericChainSpec<(), E>
fn load_config<E>(name: &'static str, mut retries: u8) -> GenericChainSpec<E>
where
E: DeserializeOwned,
{
Expand Down
57 changes: 42 additions & 15 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with Darwinia. If not, see <https://www.gnu.org/licenses/>.

/// The version of the node.
///
/// This is the version that is used for versioning this node binary.
/// By default the `minor` version is bumped in every release. `Major` or `patch` releases are only
/// expected in very rare cases.
///
/// The worker binaries associated to the node binary should ensure that they are using the same
/// version as the main node that started them.
pub const NODE_VERSION: &str = "6.8.1";
// polkadot-sdk
use sc_cli::SubstrateCli;

/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
Expand Down Expand Up @@ -71,7 +64,8 @@ pub enum Subcommand {
#[command(
propagate_version = true,
args_conflicts_with_subcommands = true,
subcommand_negates_reqs = true
subcommand_negates_reqs = true,
after_help = examples(Self::executable_name())
)]
pub struct Cli {
#[command(subcommand)]
Expand Down Expand Up @@ -113,20 +107,33 @@ pub struct RelayChainCli {
pub base_path: Option<std::path::PathBuf>,
}
impl RelayChainCli {
fn polkadot_cmd() -> clap::Command {
// crates.io
use clap::CommandFactory;

let help_template = color_print::cformat!(
"The arguments that are passed to the relay chain node. \n\
\n\
<bold><underline>RELAY_CHAIN_ARGS:</></> \n\
{{options}}",
);

polkadot_cli::RunCmd::command().no_binary_name(true).help_template(help_template)
}

/// Parse the relay chain CLI parameters using the para chain `Configuration`.
pub fn new<'a>(
para_config: &sc_service::Configuration,
relay_chain_args: impl Iterator<Item = &'a String>,
) -> Self {
let polkadot_cmd = Self::polkadot_cmd();
let matches = polkadot_cmd.get_matches_from(relay_chain_args);
let base = clap::FromArgMatches::from_arg_matches(&matches).unwrap_or_else(|e| e.exit());
let extension = crate::chain_spec::Extensions::try_get(&*para_config.chain_spec);
let chain_id = extension.map(|e| e.relay_chain.clone());
let base_path = para_config.base_path.path().join("polkadot");

Self {
base_path: Some(base_path),
chain_id,
base: clap::Parser::parse_from(relay_chain_args),
}
Self { base, chain_id, base_path: Some(base_path) }
}
}

Expand Down Expand Up @@ -258,3 +265,23 @@ pub struct EthRpcConfig {
pub frontier_sql_backend_thread_count: u32,
pub frontier_sql_backend_cache_size: u64,
}

fn examples(executable_name: String) -> String {
color_print::cformat!(
r#"<bold><underline>Examples:</></>

<bold>{0} --chain para.json --sync warp -- --chain relay.json --sync warp</>
Launch a warp-syncing full node of a given para's chain-spec, and a given relay's chain-spec.

<green><italic>The above approach is the most flexible, and the most forward-compatible way to spawn an omni-node.</></>

<bold>{0} --chain darwinia --sync warp -- --chain polkadot --sync warp</>
Launch a warp-syncing full node of the <italic>Darwinia</> parachain on the <italic>Polkadot</> Relay Chain.

<bold>{0} --chain crab --sync warp --relay-chain-rpc-url ws://rpc.example.com -- --chain kusama</>
Launch a warp-syncing full node of the <italic>Crab</> parachain on the <italic>Kusama</> Relay Chain.
Uses <italic>ws://rpc.example.com</> as remote relay chain node.
"#,
executable_name,
)
}
Loading
Loading