Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parachain-omni-node binary #3597

Closed
wants to merge 19 commits into from
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
185 changes: 185 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 @@ -528,6 +528,10 @@ members = [
"templates/parachain/node",
"templates/parachain/pallets/template",
"templates/parachain/runtime",

"omni-nodes/parachain",
"omni-nodes/common",
"cumulus/service",
]
default-members = ["polkadot", "substrate/bin/node/cli"]

Expand Down
1 change: 1 addition & 0 deletions cumulus/polkadot-parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ hex-literal = "0.4.1"
log = { workspace = true, default-features = true }
serde = { features = ["derive"], workspace = true, default-features = true }
serde_json = { workspace = true, default-features = true }
serde_alias = { version = "0.0.2" }

# Local
rococo-parachain-runtime = { path = "../parachains/runtimes/testing/rococo-parachain" }
Expand Down
19 changes: 6 additions & 13 deletions cumulus/polkadot-parachain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.

use crate::{fake_runtime_api::aura::RuntimeApi as FakeRuntimeApi, rpc};
use codec::{Codec, Decode};
use cumulus_client_cli::CollatorOptions;
use cumulus_client_collator::service::CollatorService;
Expand All @@ -22,6 +23,7 @@ use cumulus_client_consensus_common::{
ParachainBlockImport as TParachainBlockImport, ParachainCandidate, ParachainConsensus,
};
use cumulus_client_consensus_proposer::Proposer;
use cumulus_client_consensus_relay_chain::Verifier as RelayChainVerifier;
#[allow(deprecated)]
use cumulus_client_service::old_consensus;
use cumulus_client_service::{
Expand All @@ -33,28 +35,23 @@ use cumulus_primitives_core::{
ParaId,
};
use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};
use sc_rpc::DenyUnsafe;
use sp_core::Pair;

use futures::{lock::Mutex, prelude::*};
use jsonrpsee::RpcModule;

use crate::{fake_runtime_api::aura::RuntimeApi as FakeRuntimeApi, rpc};
pub use parachains_common::{AccountId, AuraId, Balance, Block, Hash, Header, Nonce};

use cumulus_client_consensus_relay_chain::Verifier as RelayChainVerifier;
use futures::{lock::Mutex, prelude::*};
use polkadot_primitives::CollatorPair;
use sc_consensus::{
import_queue::{BasicQueue, Verifier as VerifierT},
BlockImportParams, ImportQueue,
};
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
use sc_network::{config::FullNetworkConfiguration, service::traits::NetworkBackend, NetworkBlock};
use sc_network_sync::SyncingService;
use sc_rpc::DenyUnsafe;
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sp_api::{ApiExt, ConstructRuntimeApi, ProvideRuntimeApi};
use sp_consensus_aura::AuraApi;
use sp_core::traits::SpawnEssentialNamed;
use sp_core::{traits::SpawnEssentialNamed, Pair};
use sp_keystore::KeystorePtr;
use sp_runtime::{
app_crypto::AppCrypto,
Expand All @@ -63,8 +60,6 @@ use sp_runtime::{
use std::{marker::PhantomData, sync::Arc, time::Duration};
use substrate_prometheus_endpoint::Registry;

use polkadot_primitives::CollatorPair;

#[cfg(not(feature = "runtime-benchmarks"))]
type HostFunctions = cumulus_client_service::ParachainHostFunctions;

Expand All @@ -75,9 +70,7 @@ type HostFunctions = (
);

type ParachainClient<RuntimeApi> = TFullClient<Block, RuntimeApi, WasmExecutor<HostFunctions>>;

type ParachainBackend = TFullBackend<Block>;

type ParachainBlockImport<RuntimeApi> =
TParachainBlockImport<Block, Arc<ParachainClient<RuntimeApi>>, ParachainBackend>;

Expand Down
Loading
Loading