Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Merge 1294931 into 07f7d14
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook authored Apr 28, 2022
2 parents 07f7d14 + 1294931 commit 59e3dc5
Show file tree
Hide file tree
Showing 29 changed files with 2,635 additions and 2,309 deletions.
4,303 changes: 2,286 additions & 2,017 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[workspace]
resolver = "2"

members = [
'node',
'pallets/*',
'runtime',
]
members = ['node', 'pallets/*', 'runtime']

[profile.release]
panic = 'unwind'
rpath = false


# [patch.'https://github.com/pontem-network/xcm-simulator']
# xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator.git", rev = "22d94e7754b7d8b956b20855b51891928ed0a2f5" }
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pontem parachain node with [Move VM pallet](/pallets/sp-mvm/) on board.
* [Pontem docs](https://docs.pontem.network) - if you want to learn about Pontem network.
* [Validator docs](https://docs.pontem.network/03.-staking/collator) - if you want to launch a validator node.
* [Bootstrap](https://github.com/pontem-network/bootstrap) - if you want to up node quickly (not for development).

## Local Relaychain & Parachain Launch

Current version built with Nimbus consensus and Parachain Staking implementation.
Expand Down Expand Up @@ -42,7 +42,7 @@ There are several options to launch Pontem local parachain:

Install [polkadot-launch](https://github.com/paritytech/polkadot-launch).

**Note:** you must have polkadot node `v0.9.16` compiled and built placed in `../polkadot/target/release/`.
**Note:** you must have polkadot node `v0.9.18` compiled and built placed in `../polkadot/target/release/`.
To use different localion you can modify `./launch-config.json`.

Create keystore path for Pontem:
Expand Down Expand Up @@ -105,7 +105,7 @@ Build Polkadot:
git clone https://github.com/paritytech/polkadot.git
cd polkadot
git fetch origin
git checkout release-v0.9.16
git checkout release-v0.9.18
cargo build --release
```

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
dockerfile: launch.Dockerfile
args:
PONTEM_VERSION: v0.5.1
POLKADOT_VERSION: v0.9.16
POLKADOT_VERSION: v0.9.18
NODE_VERSION: 16
ports:
- "9944:9944" # Alice relaychain
Expand Down
110 changes: 55 additions & 55 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = 'Apache-2.0'
name = 'pontem-node'
edition = '2021'
build = 'build.rs'
version = '0.5.2'
version = '0.5.3'

[[bin]]
name = 'pontem'
Expand All @@ -17,79 +17,79 @@ path = "src/main.rs"
targets = ['x86_64-unknown-linux-gnu']

[build-dependencies]
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
stdlib-fetch = { path = "../utils/stdlib-fetch" }

[dependencies]
async-io = "1.3"
futures = { version = "0.3.1", features = ["compat"] }
jsonrpc-core = '18.0'
serde_json = '1.0'
structopt = '0.3.8'
codec = { package = 'parity-scale-codec', version = '2.3.1' }
clap = { version = "3.1.6", features = ["derive"] }
codec = { package = 'parity-scale-codec', version = '3.0.0' }
log = "0.4"
serde = { version = "1.0", features = ["derive"] }

# Substrate dependencies
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
substrate-prometheus-endpoint = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
substrate-prometheus-endpoint = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }

# Substarte Client Dependencies
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16', features = ['wasmtime'] }
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16', features = ['wasmtime'] }
sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] }
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] }
sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }

# Substrate Primitive Dependencies
sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.16' }
sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }

# Nimbus dependencies
nimbus-primitives = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.16' }
nimbus-consensus = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.16' }
nimbus-primitives = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.18' }
nimbus-consensus = { git = "https://github.com/pontem-network/nimbus", branch = 'polkadot-v0.9.18' }

# Cumulus dependencies
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.16' }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.16' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-relay-chain-local = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.16' }
cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.18' }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = 'polkadot-v0.9.18' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }
cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.18' }

# Polkadot dependencies
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16' }
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16' }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18' }
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18' }

flume = "0.10.9"

Expand All @@ -109,12 +109,12 @@ constants = { path = "../constants" }
#
# ** Don't enable relay chains you don't need, as this is a **very** heavy build for no reason**
# More info: https://github.com/paritytech/polkadot/pull/3189
polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.16', features = ["kusama-native"] }
polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.18', features = ["kusama-native"] }

[dependencies.move-vm]
package = "mvm"
git = "https://github.com/pontem-network/sp-move-vm.git"
rev = "c8ac6f91c7ec95e62afa3ee9ef9884eec113511c"
rev = "c922f60b747bfba0d0f01ab77bd3091d3e43454c"
default-features = false
features = [ "move_stdlib" ]

Expand Down
4 changes: 2 additions & 2 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use pontem_runtime::{
GenesisConfig, SudoConfig, SystemConfig, BalancesConfig, WASM_BINARY, ParachainInfoConfig,
VestingConfig, MvmConfig, TransactionPauseConfig, ParachainStakingConfig, InflationInfo,
Range, AuthorFilterConfig, AuthorMappingConfig, TreasuryConfig, TokensConfig,
DemocracyConfig, PolkadotXcmConfig,
DemocracyConfig, PolkadotXcmConfig, EligibilityValue,
};
use primitives::{currency::CurrencyId, AccountId, Signature, Balance, BlockNumber};
use constants::SS58_PREFIX;
Expand Down Expand Up @@ -774,7 +774,7 @@ fn genesis(
inflation_config: pontem_inflation_config(),
},
author_filter: AuthorFilterConfig {
eligible_ratio: sp_runtime::Percent::from_percent(50),
eligible_count: EligibilityValue::new_unchecked(50),
},
author_mapping: AuthorMappingConfig {
mappings: candidates
Expand Down
42 changes: 22 additions & 20 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use structopt::StructOpt;
use clap::Parser as Clap;
use clap::{/* Subcommand, */ Args};
use std::path::PathBuf;
use sc_cli::SubstrateCli;

Expand Down Expand Up @@ -26,38 +27,39 @@ impl std::str::FromStr for Sealing {
}
}

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

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

/// Sealing mode for --dev-service
#[structopt(long, default_value = "instant")]
#[clap(long, default_value = "instant")]
pub sealing: Sealing,

/// Whether to run node in development node (single node, no consensus)
#[structopt(long)]
#[clap(long)]
pub dev_service: bool,

/// Relaychain arguments
#[structopt(raw = true)]
#[clap(raw = true)]
pub relaychain_args: Vec<String>,
}

#[derive(Debug, StructOpt)]
#[derive(Debug, Clap)]
pub enum Subcommand {
/// Export the genesis state of the parachain.
#[structopt(name = "export-genesis-state")]
#[clap(name = "export-genesis-state")]
ExportGenesisState(ExportGenesisStateCommand),

/// Export the genesis wasm of the parachain.
#[structopt(name = "export-genesis-wasm")]
#[clap(name = "export-genesis-wasm")]
ExportGenesisWasm(ExportGenesisWasmCommand),

/// Key management cli utilities
#[clap(subcommand)]
Key(sc_cli::KeySubcommand),
/// Build a chain specification.
BuildSpec(sc_cli::BuildSpecCmd),
Expand All @@ -81,39 +83,39 @@ pub enum Subcommand {
Revert(sc_cli::RevertCmd),

/// The custom benchmark subcommmand benchmarking runtime pallets.
#[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
}

/// Command for exporting the genesis state of the parachain
#[derive(Debug, StructOpt)]
#[derive(Debug, Clap)]
pub struct ExportGenesisStateCommand {
/// Output file name or stdout if unspecified.
#[structopt(parse(from_os_str))]
#[clap(parse(from_os_str))]
pub output: Option<PathBuf>,

/// Write output in binary. Default is to write in hex.
#[structopt(short, long)]
#[clap(short, long)]
pub raw: bool,

/// The name of the chain for that the genesis state should be exported.
#[structopt(long)]
#[clap(long)]
pub chain: Option<String>,
}

/// Command for exporting the genesis wasm file.
#[derive(Debug, StructOpt)]
#[derive(Debug, Clap)]
pub struct ExportGenesisWasmCommand {
/// Output file name or stdout if unspecified.
#[structopt(parse(from_os_str))]
#[clap(parse(from_os_str))]
pub output: Option<PathBuf>,

/// Write output in binary. Default is to write in hex.
#[structopt(short, long)]
#[clap(short, long)]
pub raw: bool,

/// The name of the chain for that the genesis wasm file should be exported.
#[structopt(long)]
#[clap(long)]
pub chain: Option<String>,
}

Expand Down Expand Up @@ -145,7 +147,7 @@ impl RelayChainCli {
Self {
base_path,
chain_id,
base: polkadot_cli::RunCmd::from_iter(args),
base: polkadot_cli::RunCmd::parse_from(args),
}
}
}
Loading

0 comments on commit 59e3dc5

Please sign in to comment.