Skip to content

Commit

Permalink
all updates so far
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma committed Oct 14, 2024
1 parent cb1f19c commit 7c2d349
Show file tree
Hide file tree
Showing 29 changed files with 1,614 additions and 191 deletions.
51 changes: 51 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ members = [
"cumulus/test/service",
"cumulus/xcm/xcm-emulator",
"docs/sdk",
"docs/sdk/packages/guides/first-pallet",
"docs/sdk/packages/guides/first-runtime",
"docs/sdk/src/reference_docs/chain_spec_runtime",
"polkadot",
"polkadot/cli",
Expand Down Expand Up @@ -1065,6 +1067,8 @@ polkadot-runtime-metrics = { path = "polkadot/runtime/metrics", default-features
polkadot-runtime-parachains = { path = "polkadot/runtime/parachains", default-features = false }
polkadot-sdk = { path = "umbrella", default-features = false }
polkadot-sdk-docs = { path = "docs/sdk" }
first-pallet = { package = "polkadot-sdk-docs-first-pallet", path = "docs/sdk/packages/guides/first-pallet", default-features = false }
first-runtime = { package = "polkadot-sdk-docs-first-runtime", path = "docs/sdk/packages/guides/first-runtime", default-features = false }
polkadot-service = { path = "polkadot/node/service", default-features = false }
polkadot-statement-distribution = { path = "polkadot/node/network/statement-distribution", default-features = false }
polkadot-statement-table = { path = "polkadot/statement-table", default-features = false }
Expand Down
9 changes: 9 additions & 0 deletions cumulus/polkadot-omni-node/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

//! # Polkadot Omni Node Library
//!
//! Helper library that can be used to run a parachain node.
//!
//! ## Overview
Expand All @@ -38,6 +40,13 @@
//! ## Examples
//!
//! For an example, see the `polkadot-parachain-bin` crate.
//!
//! ## Binary
//!
//! It can be used to start a parachain node from a provided chain spec file.
//! It is only compatible with runtimes that use block number `u32` and `Aura` consensus.
//!
//! Example: `polkadot-omni-node --chain [chain_spec.json]`

#![deny(missing_docs)]

Expand Down
6 changes: 1 addition & 5 deletions cumulus/polkadot-omni-node/lib/src/nodes/manual_seal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use sc_network::NetworkBackend;
use sc_service::{build_polkadot_syncing_strategy, Configuration, PartialComponents, TaskManager};
use sc_telemetry::TelemetryHandle;
use sp_runtime::traits::Header;
use sp_timestamp::Timestamp;
use std::{marker::PhantomData, sync::Arc};

pub struct ManualSealNode<NodeSpec>(PhantomData<NodeSpec>);
Expand Down Expand Up @@ -181,10 +180,7 @@ impl<NodeSpec: NodeSpecT> ManualSealNode<NodeSpec> {
raw_horizontal_messages: vec![],
additional_key_values: None,
};
Ok((
sp_timestamp::InherentDataProvider::new(Timestamp::new(0)),
mocked_parachain,
))
Ok((sp_timestamp::InherentDataProvider::from_system_time(), mocked_parachain))
}
},
};
Expand Down
7 changes: 2 additions & 5 deletions cumulus/polkadot-omni-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

//! Basic polkadot omni-node.
//! White labeled polkadot omni-node.
//!
//! It can be used to start a parachain node from a provided chain spec file.
//! It is only compatible with runtimes that use block number `u32` and `Aura` consensus.
//!
//! Example: `polkadot-omni-node --chain [chain_spec.json]`
//! For documentation, see [`polkadot_omni_node_lib`].

#![warn(missing_docs)]
#![warn(unused_extern_crates)]
Expand Down
22 changes: 18 additions & 4 deletions docs/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ cumulus-primitives-proof-size-hostfunction = { workspace = true, default-feature
cumulus-client-service = { workspace = true, default-features = true }
cumulus-primitives-storage-weight-reclaim = { workspace = true, default-features = true }

# Omni Nodes
polkadot-omni-node = { workspace = true, default-features = true }
polkadot-omni-node-lib = { workspace = true, default-features = true }

# Pallets and FRAME internals
pallet-aura = { workspace = true, default-features = true }
pallet-timestamp = { workspace = true, default-features = true }
Expand All @@ -91,6 +95,7 @@ pallet-scheduler = { workspace = true, default-features = true }
pallet-referenda = { workspace = true, default-features = true }
pallet-broker = { workspace = true, default-features = true }
pallet-babe = { workspace = true, default-features = true }
pallet-grandpa = { workspace = true, default-features = true }

# Primitives
sp-io = { workspace = true, default-features = true }
Expand All @@ -116,9 +121,18 @@ xcm-simulator = { workspace = true }
pallet-xcm = { workspace = true }

# runtime guides
chain-spec-guide-runtime = { workspace = true }

chain-spec-guide-runtime = { workspace = true, default-features = true }

# Templates
minimal-template-runtime = { workspace = true }
solochain-template-runtime = { workspace = true }
parachain-template-runtime = { workspace = true }
minimal-template-runtime = { workspace = true, default-features = true }
solochain-template-runtime = { workspace = true, default-features = true }
parachain-template-runtime = { workspace = true, default-features = true }

# local packages
first-runtime = { workspace = true, default-features = true }
first-pallet = { workspace = true, default-features = true }

[dev-dependencies]
assert_cmd = "2.0.14"
nix = { version = "0.29.0", features = ["signal"] }
26 changes: 26 additions & 0 deletions docs/sdk/packages/guides/first-pallet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[package]
name = "polkadot-sdk-docs-first-pallet"
description = "A simple pallet created for the polkadot-sdk-docs guides"
version = "0.0.0"
license = "MIT-0"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
edition.workspace = true
publish = false

[lints]
workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { workspace = true }
scale-info = { workspace = true }
frame = { workspace = true, features = ["experimental", "runtime"] }
docify = "0.2.7"

[features]
default = ["std"]
std = ["codec/std", "frame/std", "scale-info/std"]
Loading

0 comments on commit 7c2d349

Please sign in to comment.