From 743415d9a6d8c19dc5b77867dfecf537dbc6e0e9 Mon Sep 17 00:00:00 2001 From: Ermal Kaleci Date: Thu, 25 Apr 2024 16:15:20 +0200 Subject: [PATCH] improve async backing slot (#743) --- .../blockchain/inherent/parachain/validation-data.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/core/src/blockchain/inherent/parachain/validation-data.ts b/packages/core/src/blockchain/inherent/parachain/validation-data.ts index 3d0753df..0ab47485 100644 --- a/packages/core/src/blockchain/inherent/parachain/validation-data.ts +++ b/packages/core/src/blockchain/inherent/parachain/validation-data.ts @@ -114,10 +114,14 @@ export class SetValidationData implements InherentProvider { ) const slotIncrease = Math.max( - 1, - (meta.consts.timestamp.minimumPeriod as any as BN) - .divn(3000) // relaychain min period - .toNumber(), + 1, // min + (meta.consts.timestamp?.minimumPeriod as any as BN) // legacy + ?.divn(3000) // relaychain min period + ?.toNumber() || + (meta.consts.aura?.slotDuration as any as BN) // async backing + ?.divn(6000) // relaychain block time + ?.toNumber() || + 1, ) for (const key of Object.values(WELL_KNOWN_KEYS)) {