Select header that will be fully refunded in on-demand batch finality relay (#2729)

* select header that will be fully refunded for submission in on-demand **batch** finality relay

* added the only possible test

* spelling

* nl

* updated comment
This commit is contained in:
Svyatoslav Nikolsky
2023-12-06 15:16:02 +03:00
committed by Bastian Köcher
parent 6d35de23be
commit 6c31cdbe19
15 changed files with 222 additions and 115 deletions
@@ -42,9 +42,8 @@ use sp_runtime::{traits::DispatchInfoOf, transaction_validity::TransactionValidi
// This chain reuses most of Polkadot primitives.
pub use bp_polkadot_core::{
AccountAddress, AccountId, Balance, Block, BlockNumber, Hash, Hasher, Header, Nonce, Signature,
SignedBlock, UncheckedExtrinsic, AVERAGE_HEADER_SIZE_IN_JUSTIFICATION,
EXTRA_STORAGE_PROOF_SIZE, MAX_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY,
WORST_HEADER_SIZE_IN_JUSTIFICATION,
SignedBlock, UncheckedExtrinsic, AVERAGE_HEADER_SIZE, EXTRA_STORAGE_PROOF_SIZE,
MAX_MANDATORY_HEADER_SIZE, REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY,
};
/// Maximal number of GRANDPA authorities at Polkadot Bulletin chain.
@@ -208,9 +207,8 @@ impl ChainWithGrandpa for PolkadotBulletin {
const MAX_AUTHORITIES_COUNT: u32 = MAX_AUTHORITIES_COUNT;
const REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY: u32 =
REASONABLE_HEADERS_IN_JUSTIFICATON_ANCESTRY;
const MAX_HEADER_SIZE: u32 = MAX_HEADER_SIZE;
const AVERAGE_HEADER_SIZE_IN_JUSTIFICATION: u32 = AVERAGE_HEADER_SIZE_IN_JUSTIFICATION;
const WORST_HEADER_SIZE_IN_JUSTIFICATION: u32 = WORST_HEADER_SIZE_IN_JUSTIFICATION;
const MAX_MANDATORY_HEADER_SIZE: u32 = MAX_MANDATORY_HEADER_SIZE;
const AVERAGE_HEADER_SIZE: u32 = AVERAGE_HEADER_SIZE;
}
decl_bridge_finality_runtime_apis!(polkadot_bulletin, grandpa);