I have an my own Substrate node (not a parachain, based on the template-node, so Aura consensus is used) and I changed the block time to 6 seconds in the runtime/src/lib.rs
by setting
pub const MILLISECS_PER_BLOCK: u64 = 6000;
Though, when running the node locally with --dev configuration, it takes 12 seconds to produce blocks:
2022-09-01 12:50:36.010 INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: 🙌 Starting consensus session on top of parent 0x7b2d27b8c9d1bacda74bf281bcf1f3fa6fdc9e017490860e55356b695aec9d4d
2022-09-01 12:50:36.029 DEBUG tokio-runtime-worker runtime::system: [1] length: 11 (normal 0%, op: 0%, mandatory 0%) / normal weight: 0 (0%) / op weight 0 (0%) / mandatory weight 5921651000 (0%)
2022-09-01 12:50:36.030 INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: 🎁 Prepared block for proposing at 1 (3 ms) [hash: 0x017f1e5a02dcccb639a13c5fb9e5c5844b4efdfc596613db9da255000b89e414; parent_hash: 0x7b2d…9d4d; extrinsics (1): [0x7932…5556]]
2022-09-01 12:50:36.031 INFO tokio-runtime-worker aura: 🔖 Pre-sealed block for proposal at 1. Hash now 0xdd564786a31bceefd7b4468173234870866615cd9433b438e84214e9debb9a18, previously 0x017f1e5a02dcccb639a13c5fb9e5c5844b4efdfc596613db9da255000b89e414.
2022-09-01 12:50:36.032 INFO tokio-runtime-worker substrate: ✨ Imported #1 (0xdd56…9a18)
2022-09-01 12:50:39.100 INFO tokio-runtime-worker substrate: 💤 Idle (0 peers), best: #1 (0xdd56…9a18), finalized #0 (0x7b2d…9d4d), ⬇ 0 ⬆ 0
2022-09-01 12:50:44.101 INFO tokio-runtime-worker substrate: 💤 Idle (0 peers), best: #1 (0xdd56…9a18), finalized #0 (0x7b2d…9d4d), ⬇ 0 ⬆ 0
2022-09-01 12:50:48.001 INFO tokio-runtime-worker sc_basic_authorship::basic_authorship: 🙌 Starting consensus session on top of parent 0xdd564786a31bceefd7b4468173234870866615cd9433b438e84214e9debb9a18
Why is it taking 12 seconds to produce blocks?