difftreelog
fix node for release
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6304,7 +6304,7 @@
[[package]]
name = "opal-runtime"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -10188,7 +10188,7 @@
[[package]]
name = "quartz-runtime"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -14976,7 +14976,7 @@
[[package]]
name = "unique-node"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"clap",
@@ -15063,7 +15063,7 @@
[[package]]
name = "unique-runtime"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -15210,7 +15210,7 @@
[[package]]
name = "up-common"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"cumulus-primitives-core",
"fp-rpc",
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -185,20 +185,24 @@
.collect::<Vec<_>>(),
},
- "session": {
- "keys": invulnerables.into_iter()
- .map(|name| {
- let account = get_account_id_from_seed::<sr25519::Public>(name);
- let aura = get_from_seed::<AuraId>(name);
-
- (
- /* account id: */ account.clone(),
- /* validator id: */ account,
- /* session keys: */ SessionKeys { aura },
- )
- })
- .collect::<Vec<_>>()
- },
+ // We don't have Session pallet in production anywhere,
+ // Adding this config makes baedeker think we have pallet-session, and it tries to
+ // reconfigure chain using it, which makes no sense, because then aura knows no
+ // authority, as baedeker expects them to be configured by session pallet.
+ // "session": {
+ // "keys": invulnerables.into_iter()
+ // .map(|name| {
+ // let account = get_account_id_from_seed::<sr25519::Public>(name);
+ // let aura = get_from_seed::<AuraId>(name);
+ //
+ // (
+ // /* account id: */ account.clone(),
+ // /* validator id: */ account,
+ // /* session keys: */ SessionKeys { aura },
+ // )
+ // })
+ // .collect::<Vec<_>>()
+ // },
"sudo": {
"key": get_account_id_from_seed::<sr25519::Public>("Alice"),
node/cli/src/rpc.rsdiffbeforeafterboth--- a/node/cli/src/rpc.rs
+++ b/node/cli/src/rpc.rs
@@ -43,18 +43,13 @@
type FullBackend = sc_service::TFullBackend<Block>;
/// Full client dependencies.
-pub struct FullDeps<C, P, SC> {
+pub struct FullDeps<C, P> {
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
pub pool: Arc<P>,
- /// The SelectChain Strategy
- pub select_chain: SC,
/// Whether to deny unsafe calls
pub deny_unsafe: DenyUnsafe,
-
- /// Runtime identification (read from the chain spec)
- pub runtime_id: RuntimeId,
/// Executor params for PoV estimating
#[cfg(feature = "pov-estimate")]
pub exec_params: uc_rpc::pov_estimate::ExecutorParams,
@@ -64,9 +59,9 @@
}
/// Instantiate all Full RPC extensions.
-pub fn create_full<C, P, SC, R, B>(
+pub fn create_full<C, P, R, B>(
io: &mut RpcModule<()>,
- deps: FullDeps<C, P, SC>,
+ deps: FullDeps<C, P>,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
where
C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
@@ -93,10 +88,7 @@
let FullDeps {
client,
pool,
- select_chain: _,
deny_unsafe,
-
- runtime_id: _,
#[cfg(feature = "pov-estimate")]
exec_params,
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -36,8 +36,8 @@
use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport;
use cumulus_client_consensus_proposer::Proposer;
use cumulus_client_service::{
- build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, DARecoveryProfile,
- StartRelayChainTasksParams,
+ build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,
+ CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams,
};
use cumulus_primitives_core::ParaId;
use cumulus_primitives_parachain_inherent::ParachainInherentData;
@@ -85,10 +85,7 @@
use cumulus_primitives_core::PersistedValidationData;
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
-use crate::{
- chain_spec::RuntimeIdentification,
- rpc::{create_eth, create_full, EthDeps, FullDeps},
-};
+use crate::rpc::{create_eth, create_full, EthDeps, FullDeps};
/// Unique native executor instance.
#[cfg(feature = "unique-runtime")]
@@ -238,7 +235,7 @@
pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}
);
-fn ethereum_parachain_inherent() -> ParachainInherentData {
+fn ethereum_parachain_inherent() -> (sp_timestamp::InherentDataProvider, ParachainInherentData) {
let (relay_parent_storage_root, relay_chain_state) =
RelayStateSproofBuilder::default().into_state_root_and_proof();
let vfp = PersistedValidationData {
@@ -249,12 +246,15 @@
..Default::default()
};
- ParachainInherentData {
- validation_data: vfp,
- relay_chain_state,
- downward_messages: Default::default(),
- horizontal_messages: Default::default(),
- }
+ (
+ sp_timestamp::InherentDataProvider::from_system_time(),
+ ParachainInherentData {
+ validation_data: vfp,
+ relay_chain_state,
+ downward_messages: Default::default(),
+ horizontal_messages: Default::default(),
+ },
+ )
}
/// Starts a `ServiceBuilder` for a full service.
@@ -426,34 +426,26 @@
.await
.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
- // Aura is sybil-resistant, collator-selection is generally too.
- let block_announce_validator =
- cumulus_client_network::AssumeSybilResistance::allow_seconded_messages();
-
let validator = parachain_config.role.is_authority();
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
- sc_service::build_network(sc_service::BuildNetworkParams {
- config: ¶chain_config,
+ cumulus_client_service::build_network(cumulus_client_service::BuildNetworkParams {
+ parachain_config: ¶chain_config,
net_config,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
+ para_id,
spawn_handle: task_manager.spawn_handle(),
+ relay_chain_interface: relay_chain_interface.clone(),
import_queue: params.import_queue,
- block_announce_validator_builder: Some(Box::new(|_| {
- Box::new(block_announce_validator)
- })),
- warp_sync_params: None,
- block_relay: None,
- })?;
-
- let select_chain = params.select_chain.clone();
+ // Aura is sybil-resistant, collator-selection is generally too.
+ sybil_resistance_level: CollatorSybilResistance::Resistant,
+ })
+ .await?;
- let runtime_id = parachain_config.chain_spec.runtime_id();
-
// Frontier
let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));
let fee_history_limit = 2048;
@@ -505,9 +497,7 @@
fee_history_cache,
eth_block_data_cache,
network,
- runtime_id,
transaction_pool,
- select_chain,
overrides,
);
@@ -518,7 +508,6 @@
let full_deps = FullDeps {
client: client.clone(),
- runtime_id,
#[cfg(feature = "pov-estimate")]
exec_params: uc_rpc::pov_estimate::ExecutorParams {
@@ -533,10 +522,9 @@
deny_unsafe,
pool: transaction_pool.clone(),
- select_chain,
};
- create_full::<_, _, _, Runtime, _>(&mut rpc_handle, full_deps)?;
+ create_full::<_, _, Runtime, _>(&mut rpc_handle, full_deps)?;
let eth_deps = EthDeps {
client,
@@ -557,7 +545,7 @@
overrides,
sync: sync_service.clone(),
pending_create_inherent_data_providers: |_, ()| async move {
- Ok((ethereum_parachain_inherent(),))
+ Ok(ethereum_parachain_inherent())
},
};
@@ -1040,8 +1028,6 @@
#[cfg(feature = "pov-estimate")]
let rpc_backend = backend.clone();
-
- let runtime_id = config.chain_spec.runtime_id();
// Frontier
let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));
@@ -1094,9 +1080,7 @@
fee_history_cache,
eth_block_data_cache,
network,
- runtime_id,
transaction_pool,
- select_chain,
overrides,
);
@@ -1106,8 +1090,6 @@
let mut rpc_module = RpcModule::new(());
let full_deps = FullDeps {
- runtime_id,
-
#[cfg(feature = "pov-estimate")]
exec_params: uc_rpc::pov_estimate::ExecutorParams {
wasm_method: config.wasm_method,
@@ -1122,10 +1104,9 @@
deny_unsafe,
client: client.clone(),
pool: transaction_pool.clone(),
- select_chain,
};
- create_full::<_, _, _, Runtime, _>(&mut rpc_module, full_deps)?;
+ create_full::<_, _, Runtime, _>(&mut rpc_module, full_deps)?;
let eth_deps = EthDeps {
client,
@@ -1147,7 +1128,7 @@
sync: sync_service.clone(),
// We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.
pending_create_inherent_data_providers: |_, ()| async move {
- Ok((ethereum_parachain_inherent(),))
+ Ok(ethereum_parachain_inherent())
},
};
runtime/common/config/substrate.rsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617use frame_support::{17use frame_support::{18 derive_impl,18 dispatch::DispatchClass,19 dispatch::DispatchClass,19 ord_parameter_types, parameter_types,20 ord_parameter_types, parameter_types,20 traits::{21 traits::{424343use crate::{44use crate::{44 runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,45 runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,45 RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, SS58Prefix, System,46 RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, RuntimeTask, SS58Prefix,46 Treasury, Version,47 System, Treasury, Version,47};48};484972 .build_or_panic();73 .build_or_panic();73}74}747576#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]75impl frame_system::Config for Runtime {77impl frame_system::Config for Runtime {76 /// The data to be stored in an account.78 /// The data to be stored in an account.77 type AccountData = pallet_balances::AccountData<Balance>;79 type AccountData = pallet_balances::AccountData<Balance>;78 /// The identifier used to distinguish between accounts.80 /// The identifier used to distinguish between accounts.79 type AccountId = AccountId;81 type AccountId = AccountId;80 /// The basic call filter to use in dispatchable.81 type BaseCallFilter = Everything;82 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).82 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).83 type BlockHashCount = BlockHashCount;83 type BlockHashCount = BlockHashCount;84 /// The block type.84 /// The block type.87 type BlockLength = RuntimeBlockLength;87 type BlockLength = RuntimeBlockLength;88 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.88 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.89 type BlockWeights = RuntimeBlockWeights;89 type BlockWeights = RuntimeBlockWeights;90 /// The aggregated dispatch type that is available for extrinsics.91 type RuntimeCall = RuntimeCall;92 /// The weight of database operations that the runtime can invoke.90 /// The weight of database operations that the runtime can invoke.93 type DbWeight = RocksDbWeight;91 type DbWeight = RocksDbWeight;94 /// The ubiquitous event type.95 type RuntimeEvent = RuntimeEvent;96 /// The type for hashing blocks and tries.92 /// The type for hashing blocks and tries.97 type Hash = Hash;93 type Hash = Hash;98 /// The hashing algorithm used.94 /// The hashing algorithm used.101 type Nonce = Nonce;97 type Nonce = Nonce;102 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.98 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.103 type Lookup = AccountIdLookup<AccountId, ()>;99 type Lookup = AccountIdLookup<AccountId, ()>;104 /// What to do if an account is fully reaped from the system.105 type OnKilledAccount = ();106 /// What to do if a new account is created.107 type OnNewAccount = ();108 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;100 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;109 /// The ubiquitous origin type.101 /// The ubiquitous origin type.110 type RuntimeOrigin = RuntimeOrigin;102 type RuntimeOrigin = RuntimeOrigin;118 type Version = Version;110 type Version = Version;119 type MaxConsumers = ConstU32<16>;111 type MaxConsumers = ConstU32<16>;120121 type RuntimeTask = ();122123 type SingleBlockMigrations = ();124 type MultiBlockMigrator = ();125 type PreInherents = ();126 type PostInherents = ();127 type PostTransactions = ();128}112}129113130parameter_types! {114parameter_types! {