You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`--keep-blocks=100800` enables block pruning. The value here should be greater or equal than the storage period.
35
+
`--keep-blocks=100800` enables block pruning. The value here should be greater or equal than the retention period.
36
36
`--ipfs-server` enables serving stored content over IPFS.
37
37
38
38
Once the network is started, any other joining nodes need to sync with `--sync=fast`. Regular sync will fail because block pruning removes old blocks. The chain does not keep full block history.
// TODO: https://github.com/paritytech/polkadot-bulletin-chain/issues/139 - Clarify purpose of allocator limits and decide whether to remove or use these constants.
59
71
/// Maximum bytes that can be stored in one transaction.
60
72
// Setting higher limit also requires raising the allocator limit.
@@ -253,7 +265,7 @@ pub mod pallet {
253
265
// Drop obsolete roots. The proof for `obsolete` will be checked later
254
266
// in this block, so we drop `obsolete` - 1.
255
267
weight.saturating_accrue(db_weight.reads(1));
256
-
let period = StoragePeriod::<T>::get();
268
+
let period = Self::retention_period();
257
269
let obsolete = n.saturating_sub(period.saturating_add(One::one()));
258
270
if obsolete > Zero::zero(){
259
271
weight.saturating_accrue(db_weight.writes(2));
@@ -271,7 +283,7 @@ pub mod pallet {
271
283
<ProofChecked<T>>::take() || {
272
284
// Proof is not required for early or empty blocks.
273
285
let number = <frame_system::Pallet<T>>::block_number();
274
-
let period = StoragePeriod::<T>::get();
286
+
let period = Self::retention_period();
275
287
let target_number = number.saturating_sub(period);
276
288
277
289
target_number.is_zero() || {
@@ -300,11 +312,11 @@ pub mod pallet {
300
312
!T::MaxTransactionSize::get().is_zero(),
301
313
"MaxTransactionSize must be greater than zero"
302
314
);
303
-
let default_period = sp_transaction_storage_proof::DEFAULT_STORAGE_PERIOD.into();
0 commit comments