Skip to content

Commit

Permalink
Merge pull request #1126 from shamil-gadelshin/migrate_runtime_module4
Browse files Browse the repository at this point in the history
Migrate the node project.
  • Loading branch information
mnaamani authored Aug 12, 2020
2 parents d7f8e51 + fb9845b commit 46cd91c
Show file tree
Hide file tree
Showing 22 changed files with 6,134 additions and 1,702 deletions.
5,126 changes: 4,461 additions & 665 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ members = [
"runtime-modules/versioned-store",
"runtime-modules/versioned-store-permissions",
"runtime-modules/working-group",
# "node",
"node",
# "utils/chain-spec-builder/"
]

Expand Down
226 changes: 89 additions & 137 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
authors = ['Joystream']
authors = ['Joystream contributors']
build = 'build.rs'
edition = '2018'
name = 'joystream-node'
version = '2.6.0'
version = '3.0.0'
default-run = "joystream-node"

[[bin]]
Expand All @@ -14,143 +14,95 @@ path = 'bin/main.rs'
crate-type = ["cdylib", "rlib"]

[dependencies]
hex-literal = '0.2.1'
derive_more = '0.14.0'
exit-future = '0.1.4'
futures = '0.1.29'
log = '0.4.8'
parking_lot = '0.9.0'
tokio = '0.1.22'
jsonrpc-core = '13.2.0'
rand = '0.7.2'
structopt = '=0.3.5'
# third-party dependencies
serde = { version = "1.0.102", features = ["derive"] }
futures = { version = "0.3.1", features = ["compat"] }
jsonrpc-core = "14.2.0"
structopt = { version = "0.3.8", optional = true}
serde_json = '1.0'
serde = '1.0'
hex = '0.4'
# https://users.rust-lang.org/t/failure-derive-compilation-error/39062
# quote = '<=1.0.2'

[dependencies.node-runtime]
package = 'joystream-node-runtime'
path = '../runtime'

[dependencies.substrate-basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-basic-authorship'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.babe]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-consensus-babe'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.babe-primitives]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-consensus-babe-primitives'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.codec]
package = 'parity-scale-codec'
version = '1.0.0'

[dependencies.ctrlc]
features = ['termination']
version = '3.0'

[dependencies.inherents]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-inherents'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.network]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-network'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.primitives]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-primitives'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.sr-io]
git = 'https://github.com/paritytech/substrate.git'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.substrate-cli]
git = 'https://github.com/paritytech/substrate.git'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.substrate-client]
git = 'https://github.com/paritytech/substrate.git'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.substrate-executor]
git = 'https://github.com/paritytech/substrate.git'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.substrate-service]
git = 'https://github.com/paritytech/substrate.git'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-transaction-pool'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.substrate-telemetry]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-telemetry'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.grandpa]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-finality-grandpa'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.grandpa-primitives]
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-finality-grandpa-primitives'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.im-online]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'srml-im-online'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.substrate-rpc]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-rpc'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.authority-discovery]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-authority-discovery'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.client-db]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-client-db'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.runtime-primitives]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'sr-primitives'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.offchain]
default_features = false
git = 'https://github.com/paritytech/substrate.git'
package = 'substrate-offchain'
rev = 'c37bb08535c49a12320af7facfd555ce05cce2e8'

[dependencies.libp2p]
version = '0.13.2'
default-features = false
# primitives
sp-authority-discovery = { package = 'sp-authority-discovery', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-consensus-babe = { package = 'sp-consensus-babe', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-finality-grandpa = { package = 'sp-finality-grandpa', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-core = { package = 'sp-core', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-runtime = { package = 'sp-runtime', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-finality-tracker = { package = 'sp-finality-tracker', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-inherents = { package = 'sp-inherents', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-consensus = { package = 'sp-consensus', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-transaction-pool = { package = 'sp-transaction-pool', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-api = { package = 'sp-api', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-blockchain = { package = 'sp-blockchain', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-block-builder = { package = 'sp-block-builder', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }

# client dependencies
sc-client-api = { package = 'sc-client-api', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-chain-spec = { package = 'sc-chain-spec', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-consensus = { package = 'sc-consensus', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-transaction-pool = { package = 'sc-transaction-pool', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-network = { package = 'sc-network', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-consensus-babe = { package = 'sc-consensus-babe', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4'}
sc-finality-grandpa = { package = 'sc-finality-grandpa', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-basic-authorship = { package = 'sc-basic-authorship', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-service = { package = 'sc-service', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-authority-discovery = { package = 'sc-authority-discovery', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-consensus-epochs = { package = 'sc-consensus-epochs', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-keystore = { package = 'sc-keystore', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-consensus-babe-rpc = { package = 'sc-consensus-babe-rpc', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-finality-grandpa-rpc = { package = 'sc-finality-grandpa-rpc', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-rpc-api = { package = 'sc-rpc-api', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-executor = { package = 'sc-executor', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }

# frame dependencies
pallet-contracts = { package = 'pallet-contracts', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
pallet-im-online = { package = 'pallet-im-online', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
pallet-contracts-rpc = { package = 'pallet-contracts-rpc', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
pallet-transaction-payment-rpc = { package = 'pallet-transaction-payment-rpc', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
substrate-frame-rpc-system = { package = 'substrate-frame-rpc-system', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
frame-benchmarking = { package = 'frame-benchmarking', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }

# node-specific dependencies
node-runtime = { package= "joystream-node-runtime", path = "../runtime" }

# CLI-specific dependencies
sc-cli = { package = 'sc-cli', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4', optional = true }
frame-benchmarking-cli = { package = 'frame-benchmarking-cli', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4', optional = true }
node-inspect = { package = 'node-inspect', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4', optional = true }

# WASM-specific dependencies
wasm-bindgen = { version = "0.2.57", optional = true }
wasm-bindgen-futures = { version = "0.4.7", optional = true }
browser-utils = { package = 'substrate-browser-utils', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4', optional = true}

[dev-dependencies]
tempfile = "3.1.0"
codec = { package = "parity-scale-codec", version = "1.3.1" }
sp-timestamp = { package = 'sp-timestamp', default-features = false, git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sp-keyring = { package = 'sp-keyring', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
sc-consensus-babe = { git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4', features = ["test-helpers"]}
sc-service-test = { git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
frame-system = { package = 'frame-system', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
pallet-transaction-payment = { package = 'pallet-transaction-payment', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }
pallet-grandpa = { package = 'pallet-grandpa', git = 'https://github.com/paritytech/substrate.git', rev = '00768a1f21a579c478fe5d4f51e1fa71f7db9fd4' }

[build-dependencies]
vergen = '3'

[features]
default = [ "cli" ]
browser = [
"browser-utils",
"wasm-bindgen",
"wasm-bindgen-futures",
]
cli = [
"node-inspect",
"sc-cli",
"frame-benchmarking-cli",
"sc-service/db",
"structopt",
]
runtime-benchmarks = [
"node-runtime/runtime-benchmarks",
"frame-benchmarking-cli",
]
23 changes: 3 additions & 20 deletions node/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Joystream node. If not, see <http://www.gnu.org/licenses/>.

//! Substrate Node Template CLI library.
//! Joystream Node.

#![warn(missing_docs)]
#![warn(unused_extern_crates)]

use joystream_node::cli;
pub use substrate_cli::{error, IntoExit, VersionInfo};

fn main() {
let version = VersionInfo {
name: "Joystream Node",
commit: env!("VERGEN_SHA_SHORT"),
version: env!("CARGO_PKG_VERSION"),
executable_name: "joystream-node",
author: "Joystream",
description: "Joystream substrate node",
support_url: "https://www.joystream.org/",
};

if let Err(e) = cli::run(::std::env::args(), cli::Exit, version) {
eprintln!("Fatal error: {}\n\n{:?}", e, e);
std::process::exit(1)
}
fn main() -> sc_cli::Result<()> {
joystream_node::command::run()
}
Loading

0 comments on commit 46cd91c

Please sign in to comment.