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

Testnet Runtime Upgrade v136 #106

Merged
merged 8 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
9,943 changes: 6,909 additions & 3,034 deletions Cargo.lock

Large diffs are not rendered by default.

228 changes: 114 additions & 114 deletions Cargo.toml

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
<div align="center">
<img src="https://140069760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqMnH71Mmd7Au6HK5UAji%2Fuploads%2FEmgmn8pgCqu9eJaQPNSO%2FNeuroWeb%20X%20visual%20(1).jpg?alt=media&token=320f5009-0932-4ecc-a5a6-3bbb7a56cf45">


[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Substrate version](https://img.shields.io/badge/Substrate-3.0.0-brightgreen?logo=Parity%20Substrate)](https://substrate.io)
[![Twitter URL](https://img.shields.io/twitter/follow/NeuroWebAI?style=social)](https://twitter.com/NeuroWebAI)
[![Telegram](https://img.shields.io/endpoint?color=neon&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Forigintrail)](https://t.me/origintrail)
[![Medium](https://badgen.net/badge/icon/medium?icon=medium&label)](https://medium.com/origintrail)
[![Discord](https://img.shields.io/badge/Discord-gray?logo=discord)](https://discord.gg/FCgYk2S)

</div>

NeuroWeb Network is a decentralized Artificial Intelligence blockchain designed to incentivise knowledge creation, connectivity and sharing through **Knowledge Mining**. It's utility token NEURO is designed to fuel the AI knowledge economy, rewarding relevant knowledge contributions to the **OriginTrail Decentralized Knowledge Graph**.
Expand Down Expand Up @@ -48,7 +47,8 @@ To run a full network with multiple NeuroWeb nodes (collators and non-collators)
#### Run A Relay Chain

To start a relay chain we recommend reading and following instructions in [Cumulus Workshop](https://docs.substrate.io/tutorials/build-a-parachain/prepare-a-local-relay-chain/).
NeuroWeb is currently compatible with Polkadot v1.1.0 version.

NeuroWeb is currently compatible with Polkadot v1.11.0 version.

#### Parachain Nodes (Collators)

Expand Down Expand Up @@ -98,10 +98,13 @@ Ensure you set the `ParaId to 2000` and the `parachain: Bool to Yes`.
### Containerize

#### Build

```shell
docker build -t origintrail-parachain .
```

#### Run

```shell
docker run -it -p 30333:30333 -p 9933:9933 -p 9944:9944 -p 9615:9615 -v /data:/data origintrail-parachain:latest\
--base-path=/data --rpc-external --ws-external\
Expand Down
5 changes: 1 addition & 4 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "neuroweb-node"
version = "1.4.0"
version = "1.5.0"
authors = ["TraceLabs"]
description = "NeuroWeb - Cumulus FRAME-based Substrate Node"
license = "GPL-3.0-only"
Expand Down Expand Up @@ -61,7 +61,6 @@ sp-runtime = { workspace = true }
sp-timestamp = { workspace = true }
substrate-frame-rpc-system = { workspace = true }
substrate-prometheus-endpoint = { workspace = true }
try-runtime-cli = { workspace = true }

# Polkadot
polkadot-cli = { workspace = true }
Expand Down Expand Up @@ -97,11 +96,9 @@ substrate-build-script-utils = { workspace = true }
[features]
default = ["fc-rpc/rpc-binary-search-estimate"]
runtime-benchmarks = [
"try-runtime-cli/try-runtime",
"neuroweb-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
]
try-runtime = [
"try-runtime-cli/try-runtime",
"neuroweb-runtime/try-runtime",
]
4 changes: 0 additions & 4 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ fn testnet_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
// sudo: SudoConfig {
// // Assign network admin rights.
// key: Some(root_key),
// },
vesting: Default::default(),
treasury: Default::default(),
evm: EVMConfig {
Expand Down
4 changes: 0 additions & 4 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ pub enum Subcommand {
/// Try some testing command against a specified runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),

/// Errors since the binary was not build with `--features try-runtime`.
#[cfg(not(feature = "try-runtime"))]
TryRuntime,
}

#[derive(Debug, clap::Parser)]
Expand Down
7 changes: 1 addition & 6 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,7 @@ pub fn run() -> Result<()> {
#[allow(unreachable_patterns)]
_ => Err("Benchmarking sub-command unsupported".into()),
}
}
Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a \
standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer \
being maintained here and will be removed entirely some time after January 2024. \
Please remove this subcommand from your runtime and use the standalone CLI."
.into()),
},
None => {
let runner = cli.create_runner(&cli.run.normalize())?;
let collator_options = cli.run.collator_options();
Expand Down
23 changes: 12 additions & 11 deletions node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use std::sync::Arc;

use neuroweb_runtime::{opaque::Block, AccountId, Balance, Hash, Nonce};
use neuroweb_runtime::{opaque::Block, AccountId, Balance, Nonce};
use cumulus_primitives_parachain_inherent::ParachainInherentData;
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
use polkadot_primitives::PersistedValidationData;
Expand All @@ -16,7 +16,7 @@ use sc_client_api::{
};
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
use fc_rpc::{
pending::ConsensusDataProvider, EthBlockDataCacheTask, OverrideHandle, EthFilter, EthFilterApiServer, EthPubSub,
pending::ConsensusDataProvider, EthBlockDataCacheTask, EthFilter, EthFilterApiServer, EthPubSub,
EthPubSubApiServer, Web3, Web3ApiServer,
};
use sp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi};
Expand All @@ -28,7 +28,8 @@ use sc_transaction_pool_api::TransactionPool;
use sp_api::{CallApiAt, ProvideRuntimeApi};
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use sc_network::NetworkService;
use sc_network::service::traits::NetworkService;
use fc_storage::StorageOverride;

/// A type representing all RPC extensions.
pub type RpcExtension = jsonrpsee::RpcModule<()>;
Expand All @@ -48,18 +49,18 @@ pub struct FullDeps<C, P, A: ChainApi> {
/// The Node authority flag
pub is_authority: bool,
/// Network service
pub network: Arc<NetworkService<Block, Hash>>,
/// Backend.
pub network: Arc<dyn NetworkService>,
/// Backend.
pub backend: Arc<dyn fc_api::Backend<Block>>,
/// EthFilterApi pool.
pub filter_pool: FilterPool,
/// Maximum fee history cache size.
pub fee_history_cache_limit: u64,
/// Fee history cache.
pub fee_history_cache: FeeHistoryCache,
/// Ethereum data access overrides.
pub overrides: Arc<OverrideHandle<Block>>,
/// Cache for Ethereum block data.
/// Ethereum data access storage_override.
pub storage_override: Arc<dyn StorageOverride<Block>>,
/// Cache for Ethereum block data.
pub block_data_cache: Arc<EthBlockDataCacheTask<Block>>,
}

Expand Down Expand Up @@ -104,7 +105,7 @@ where

let mut module = RpcExtension::new(());
let FullDeps { client, pool, graph, deny_unsafe, network, backend, is_authority, filter_pool,
sync, fee_history_cache, fee_history_cache_limit, overrides, block_data_cache
sync, fee_history_cache, fee_history_cache_limit, storage_override, block_data_cache
} = deps;

module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;
Expand Down Expand Up @@ -152,7 +153,7 @@ where
no_tx_converter,
sync.clone(),
signers,
overrides.clone(),
storage_override.clone(),
backend.clone(),
is_authority,
block_data_cache.clone(),
Expand Down Expand Up @@ -199,7 +200,7 @@ where
client.clone(),
sync,
subscription_task_executor,
overrides,
storage_override,
pubsub_notification_sinks,
)
.into_rpc(),
Expand Down
Loading
Loading