Update dependecies (#2277) (#2281)

* cargo update -p parachain-info

* flush

* it compiles

* clippy

* temporary add more logging to cargo deny

* Revert "temporary add more logging to cargo deny"

This reverts commit 20daa88bca6d9a01dbe933579b1d57ae5c3a7bd8.

* list installed Rust binaries before running cargo deny

* changed prev commit

* once again

* try cargo update?

* post-update fixes (nothing important)
This commit is contained in:
Svyatoslav Nikolsky
2023-07-19 18:18:05 +03:00
committed by Bastian Köcher
parent b4c7ffd3d3
commit 4d42bb22f3
69 changed files with 409 additions and 486 deletions
@@ -56,7 +56,7 @@ impl<H: HeaderT> GrandpaJustification<H> {
/// any precise calculations - that's just an estimation.
pub fn max_reasonable_size<C>(required_precommits: u32) -> u32
where
C: Chain<Header = H> + ChainWithGrandpa,
C: Chain + ChainWithGrandpa,
{
// we don't need precise results here - just estimations, so some details
// are removed from computations (e.g. bytes required to encode vector length)
@@ -144,10 +144,7 @@ pub fn verify_and_optimize_justification<Header: HeaderT>(
authorities_set_id: SetId,
authorities_set: &VoterSet<AuthorityId>,
justification: &mut GrandpaJustification<Header>,
) -> Result<(), Error>
where
Header::Number: finality_grandpa::BlockNumberOps,
{
) -> Result<(), Error> {
let mut optimizer = OptimizationCallbacks {
extra_precommits: vec![],
redundant_votes_ancestries: Default::default(),
@@ -170,10 +167,7 @@ pub fn verify_justification<Header: HeaderT>(
authorities_set_id: SetId,
authorities_set: &VoterSet<AuthorityId>,
justification: &GrandpaJustification<Header>,
) -> Result<(), Error>
where
Header::Number: finality_grandpa::BlockNumberOps,
{
) -> Result<(), Error> {
verify_justification_with_callbacks(
finalized_target,
authorities_set_id,
@@ -295,10 +289,7 @@ fn verify_justification_with_callbacks<Header: HeaderT, C: VerificationCallbacks
authorities_set: &VoterSet<AuthorityId>,
justification: &GrandpaJustification<Header>,
callbacks: &mut C,
) -> Result<(), Error>
where
Header::Number: finality_grandpa::BlockNumberOps,
{
) -> Result<(), Error> {
// ensure that it is justification for the expected header
if (justification.commit.target_hash, justification.commit.target_number) != finalized_target {
return Err(Error::InvalidJustificationTarget)
+3 -3
View File
@@ -27,7 +27,6 @@ use codec::{Codec, Decode, Encode, EncodeLike, MaxEncodedLen};
use core::{clone::Clone, cmp::Eq, default::Default, fmt::Debug};
use frame_support::PalletError;
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_consensus_grandpa::{AuthorityList, ConsensusLog, SetId, GRANDPA_ENGINE_ID};
use sp_runtime::{traits::Header as HeaderT, Digest, RuntimeDebug};
@@ -110,8 +109,9 @@ impl AuthoritySet {
/// Data required for initializing the GRANDPA bridge pallet.
///
/// The bridge needs to know where to start its sync from, and this provides that initial context.
#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, Clone, TypeInfo)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[derive(
Default, Encode, Decode, RuntimeDebug, PartialEq, Eq, Clone, TypeInfo, Serialize, Deserialize,
)]
pub struct InitializationData<H: HeaderT> {
/// The header from which we should start syncing.
pub header: Box<H>,