Skip to content
Draft
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
7 changes: 7 additions & 0 deletions Cargo.lock

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

7 changes: 7 additions & 0 deletions crates/subspace-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,27 @@ domain-client-message-relayer.workspace = true
domain-client-operator.workspace = true
domain-eth-service.workspace = true
domain-service.workspace = true
domain-block-builder.workspace = true
domain-runtime-primitives.workspace = true
evm-domain-runtime.workspace = true
fdlimit.workspace = true
fp-evm.workspace = true
frame-benchmarking = { workspace = true, optional = true }
frame-benchmarking-cli = { workspace = true, optional = true }
frame-support.workspace = true
frame-system.workspace = true
futures.workspace = true
hex.workspace = true
hex-literal.workspace = true
mimalloc.workspace = true
pallet-balances.workspace = true
parity-scale-codec.workspace = true
prometheus-client.workspace = true
sc-chain-spec.workspace = true
sc-cli.workspace = true
sc-client-api.workspace = true
sc-client-db.workspace = true
sc-consensus.workspace = true
sc-consensus-slots.workspace = true
sc-consensus-subspace.workspace = true
sc-domains.workspace = true
Expand All @@ -62,13 +66,16 @@ serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
sp-api.workspace = true
sp-blockchain.workspace = true
sp-consensus.workspace = true
sp-consensus-subspace.workspace = true
sp-core.workspace = true
sp-domains.workspace = true
sp-domain-digests.workspace = true
sp-keystore.workspace = true
sp-keyring.workspace = true
sp-messenger.workspace = true
sp-runtime.workspace = true
sp-state-machine.workspace = true
subspace-core-primitives.workspace = true
subspace-logging.workspace = true
subspace-metrics.workspace = true
Expand Down
5 changes: 4 additions & 1 deletion crates/subspace-node/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::chain_spec;
use crate::commands::{RunOptions, WipeOptions};
use crate::commands::{ForkOptions, RunOptions, WipeOptions};
use clap::Parser;
use sc_chain_spec::GenericChainSpec;
use sc_cli::SubstrateCli;
Expand All @@ -13,6 +13,9 @@ pub enum Cli {
/// Run blockchain node
Run(RunOptions),

/// Fork existing blockchain
Fork(ForkOptions),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will create a blockchain that looks like Mainnet, but isn't actually compatible. Should we require a compile-time feature for this, like we do for runtime benchmarks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what is the reason for it to be behind a feature flag?
are you concerned that some one might actually run this unintentionally ?

Copy link
Member

@teor2345 teor2345 Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, someone might run it unintentionally, or report bugs to us as if they're running production code. (This happens already, where users forget to tell us they're using non-standard configurations.)

That's why I want to change this log later on to say "fork":
#3651 (comment)

It also increases the compile time, and the size of the binary, particularly by adding extra dependencies.


/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),

Expand Down
2 changes: 2 additions & 0 deletions crates/subspace-node/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
mod domain_key;
mod fork;
mod run;
mod shared;
mod wipe;

pub use domain_key::{
CreateDomainKeyOptions, InsertDomainKeyOptions, create_domain_key, insert_domain_key,
};
pub use fork::{ForkOptions, fork};
pub use run::{RunOptions, run};
pub(crate) use shared::set_exit_on_panic;
pub use wipe::{WipeOptions, wipe};
Loading
Loading