mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 10:47:55 +00:00
Update Substrate & Polkadot (#523)
This commit is contained in:
Generated
+373
-362
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ use sp_consensus::BlockStatus;
|
||||
use sp_core::traits::SpawnNamed;
|
||||
use sp_runtime::{
|
||||
generic::BlockId,
|
||||
traits::{Block as BlockT, Header as HeaderT, Zero, HashFor},
|
||||
traits::{Block as BlockT, HashFor, Header as HeaderT, Zero},
|
||||
};
|
||||
|
||||
use cumulus_client_consensus_common::ParachainConsensus;
|
||||
@@ -225,9 +225,10 @@ where
|
||||
|
||||
let (header, extrinsics) = candidate.block.deconstruct();
|
||||
|
||||
let compact_proof = match candidate.proof.into_compact_proof::<HashFor<Block>>(
|
||||
last_head.state_root().clone(),
|
||||
) {
|
||||
let compact_proof = match candidate
|
||||
.proof
|
||||
.into_compact_proof::<HashFor<Block>>(last_head.state_root().clone())
|
||||
{
|
||||
Ok(proof) => proof,
|
||||
Err(e) => {
|
||||
tracing::error!(target: "cumulus-collator", "Failed to compact proof: {:?}", e);
|
||||
@@ -235,7 +236,6 @@ where
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Create the parachain block data for the validators.
|
||||
let b = ParachainBlockData::<Block>::new(header, extrinsics, compact_proof);
|
||||
|
||||
@@ -322,11 +322,14 @@ pub async fn start_collator<Block, RA, BS, Spawner>(
|
||||
};
|
||||
|
||||
overseer_handler
|
||||
.send_msg(CollationGenerationMessage::Initialize(config))
|
||||
.send_msg(
|
||||
CollationGenerationMessage::Initialize(config),
|
||||
"StartCollator",
|
||||
)
|
||||
.await;
|
||||
|
||||
overseer_handler
|
||||
.send_msg(CollatorProtocolMessage::CollateOn(para_id))
|
||||
.send_msg(CollatorProtocolMessage::CollateOn(para_id), "StartCollator")
|
||||
.await;
|
||||
}
|
||||
|
||||
@@ -451,9 +454,11 @@ mod tests {
|
||||
assert_eq!(1, *block.header().number());
|
||||
|
||||
// Ensure that we did not include `:code` in the proof.
|
||||
let db = block.storage_proof()
|
||||
let db = block
|
||||
.storage_proof()
|
||||
.to_storage_proof::<BlakeTwo256>(Some(header.state_root()))
|
||||
.unwrap().0
|
||||
.unwrap()
|
||||
.0
|
||||
.into_memory_db();
|
||||
|
||||
let backend =
|
||||
|
||||
@@ -55,12 +55,15 @@ impl<Block: BlockT> ActiveCandidateRecovery<Block> {
|
||||
let (tx, rx) = oneshot::channel();
|
||||
|
||||
self.overseer_handler
|
||||
.send_msg(AvailabilityRecoveryMessage::RecoverAvailableData(
|
||||
pending_candidate.receipt,
|
||||
pending_candidate.session_index,
|
||||
None,
|
||||
tx,
|
||||
))
|
||||
.send_msg(
|
||||
AvailabilityRecoveryMessage::RecoverAvailableData(
|
||||
pending_candidate.receipt,
|
||||
pending_candidate.session_index,
|
||||
None,
|
||||
tx,
|
||||
),
|
||||
"ActiveCandidateRecovery",
|
||||
)
|
||||
.await;
|
||||
|
||||
self.candidates.insert(block_hash);
|
||||
|
||||
@@ -550,8 +550,9 @@ impl_runtime_apis! {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx)
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -341,8 +341,9 @@ impl_runtime_apis! {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx)
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -805,8 +805,9 @@ impl_runtime_apis! {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx)
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -735,8 +735,9 @@ impl_runtime_apis! {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx)
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -733,8 +733,9 @@ impl_runtime_apis! {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx)
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,6 @@ sp_api::decl_runtime_apis! {
|
||||
/// Runtime api to collect information about a collation.
|
||||
pub trait CollectCollationInfo {
|
||||
/// Collect information about a collation.
|
||||
#[skip_initialize_block]
|
||||
fn collect_collation_info() -> CollationInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,8 +387,9 @@ impl_runtime_apis! {
|
||||
fn validate_transaction(
|
||||
source: TransactionSource,
|
||||
tx: <Block as BlockT>::Extrinsic,
|
||||
block_hash: <Block as BlockT>::Hash,
|
||||
) -> TransactionValidity {
|
||||
Executive::validate_transaction(source, tx)
|
||||
Executive::validate_transaction(source, tx, block_hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ use cumulus_test_runtime::GetUpgradeDetection;
|
||||
use sp_runtime::generic::BlockId;
|
||||
|
||||
#[substrate_test_utils::test]
|
||||
#[ignore]
|
||||
async fn test_runtime_upgrade(task_executor: TaskExecutor) {
|
||||
let mut builder = sc_cli::LoggerBuilder::new("runtime=debug");
|
||||
builder.with_colors(false);
|
||||
|
||||
Reference in New Issue
Block a user