Skip to content
Closed
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
1,979 changes: 991 additions & 988 deletions substrate-node/Cargo.lock

Large diffs are not rendered by default.

79 changes: 39 additions & 40 deletions substrate-node/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name = 'tfchain'
targets = ['x86_64-unknown-linux-gnu']

[build-dependencies]
substrate-build-script-utils = {package = "substrate-build-script-utils", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
substrate-build-script-utils = {package = "substrate-build-script-utils", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
vergen = "3.1.0"

[dependencies]
Expand All @@ -25,48 +25,47 @@ hex-literal = "0.2.1"
jsonrpc-core = "18.0.0"
log = "0.4"
structopt = "0.3.8"
jsonrpsee = { version = "0.15.1", features = ["server"] }
clap = { version = "3.1.18", features = ["derive"] }
serde = { version = "1.0.119", features = ["derive"] }
serde_json = "1.0.64"
jsonrpsee = { version = "0.13.0", features = ["server"] }
clap = { version = "3.1.18", features = ["derive"] }
tracing-core = "=0.1.26"

frame-benchmarking = {git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.24"}
frame-system = {git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.24"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.24"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
pallet-transaction-payment = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-finality-grandpa-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-keyring = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-runtime = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24"}
frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.24", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.24", optional = true }
frame-benchmarking = {git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29"}
frame-system = {git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29"}
frame-benchmarking-cli = {git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29"}
pallet-transaction-payment-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
pallet-transaction-payment = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-basic-authorship = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-cli = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-client-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-executor = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-service = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-finality-grandpa-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-keystore = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-keyring = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-network = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-rpc = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-rpc-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-telemetry = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sc-transaction-pool-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-api = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-block-builder = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-blockchain = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-consensus = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-consensus-aura = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-core = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-finality-grandpa = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-inherents = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-runtime = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-timestamp = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
sp-transaction-pool = {git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
frame-rpc-system = {package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29"}
frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29", optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29", optional = true }

tfchain-runtime = { path = '../runtime' }

Expand Down
4 changes: 2 additions & 2 deletions substrate-node/node/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};

fn main() {
generate_cargo_keys();
generate_cargo_keys();

rerun_if_git_head_changed();
rerun_if_git_head_changed();
}
5 changes: 4 additions & 1 deletion substrate-node/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{ed25519, sr25519, Pair, Public};
use sp_finality_grandpa::AuthorityId as GrandpaId;
use sp_runtime::traits::{IdentifyAccount, Verify};
use std::convert::TryInto;
use tfchain_runtime::opaque::SessionKeys;
use tfchain_runtime::{
AccountId, AuraConfig, BalancesConfig, CouncilConfig, CouncilMembershipConfig, GenesisConfig,
Expand Down Expand Up @@ -320,7 +321,9 @@ fn testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
get_account_id_from_seed::<sr25519::Public>("Eve"),
],
]
.try_into()
.unwrap(),
phantom: Default::default(),
},
// just some default for development
Expand Down
66 changes: 33 additions & 33 deletions substrate-node/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,52 @@ use sc_cli::RunCmd;

#[derive(Debug, clap::Parser)]
pub struct Cli {
#[clap(subcommand)]
pub subcommand: Option<Subcommand>,
#[clap(subcommand)]
pub subcommand: Option<Subcommand>,

#[clap(flatten)]
pub run: RunCmd,
#[clap(flatten)]
pub run: RunCmd,
}

#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Key management cli utilities
#[clap(subcommand)]
Key(sc_cli::KeySubcommand),
/// Key management cli utilities
#[clap(subcommand)]
Key(sc_cli::KeySubcommand),

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

/// Validate blocks.
CheckBlock(sc_cli::CheckBlockCmd),
/// Validate blocks.
CheckBlock(sc_cli::CheckBlockCmd),

/// Export blocks.
ExportBlocks(sc_cli::ExportBlocksCmd),
/// Export blocks.
ExportBlocks(sc_cli::ExportBlocksCmd),

/// Export the state of a given block into a chain spec.
ExportState(sc_cli::ExportStateCmd),
/// Export the state of a given block into a chain spec.
ExportState(sc_cli::ExportStateCmd),

/// Import blocks.
ImportBlocks(sc_cli::ImportBlocksCmd),
/// Import blocks.
ImportBlocks(sc_cli::ImportBlocksCmd),

/// Remove the whole chain.
PurgeChain(sc_cli::PurgeChainCmd),
/// Remove the whole chain.
PurgeChain(sc_cli::PurgeChainCmd),

/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),
/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),

/// Sub-commands concerned with benchmarking.
#[clap(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
/// Sub-commands concerned with benchmarking.
#[clap(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// Try some command against runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),
/// Try some command against runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),

/// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
#[cfg(not(feature = "try-runtime"))]
TryRuntime,
/// Try some command against runtime state. Note: `try-runtime` feature must be enabled.
#[cfg(not(feature = "try-runtime"))]
TryRuntime,

/// Db meta columns information.
ChainInfo(sc_cli::ChainInfoCmd),
}
/// Db meta columns information.
ChainInfo(sc_cli::ChainInfoCmd),
}
Loading