Skip to content

Reduce Heima parachain block time 6s → 2s via elastic scaling (3 coretime cores) #4041

Description

@hanwencheng

Summary

Drive Heima's parachain block time from ~6s to ~2s using elastic scaling on 3 coretime cores, giving latency-sensitive EVM applications Base-class responsiveness while keeping Heima's much cheaper gas.

Why

Per-op gas on Heima is already excellent — the historic heavy cost (the pure-Solidity P-256 passkey verify, ~1M gas) is gone now that RIP-7212 is live (runtime 9261): K11 verify is ~28k gas. The only axis where an L2 like Base still wins is latency: Base's sequencer produces ~2s blocks vs Heima's ~6s. For interactive flows a user-facing write costs ≈ one block of wait, so block time is the perceived latency.

Current state (please confirm)

Heima appears to run ~6s blocks, which suggests async backing is already enabled (the 12s→6s win is banked). Confirming this is step 1.

Mechanism

Heima is a Polkadot parachain (para_id 2013). The relay already ships async backing + elastic scaling + agile coretime (Polkadot SDK 2509, Oct 2025), so the capability is present — the remaining work is Heima-side (runtime + collator) plus acquiring cores.

A parachain block is capped at 2s of execution; the relay slot is 6s. Elastic scaling lets one parachain occupy multiple cores in parallel, one block per core per slot:

Cores Blocks / 6s relay slot Block time
1 (today) 1 ~6s
2 2 ~3s
3 3 ~2s

This also raises aggregate blockspace ~3× — throughput and latency both improve, it is not a trade.

Proposed change (runtime + collator)

Knob Today Target
MILLISECS_PER_BLOCK / SLOT_DURATION 6000 2000
BLOCK_PROCESSING_VELOCITY 1 3
UNINCLUDED_SEGMENT_CAPACITY ~2–3 raise to match velocity (≈ velocity · relay/para + 1)
RELAY_CHAIN_SLOT_DURATION_MILLIS 6000 6000 (fixed by relay)
Collator binary lookahead collator slot-based collator (required for >1 core)
Coretime (Agile Coretime) 1 core 3 cores on para 2013

The permissioned (Litentry-run) collator set qualifies for the elastic-scaling MVP (trusted-collator phase — no candidate-receipt change). Validate on Heima Paseo (para_id 2013 testnet) before mainnet.

Diagnostics requested

  1. Current mainnet MILLISECS_PER_BLOCK.
  2. Polkadot SDK / runtime version (slot-based collator needs ≥ the 2509 line).
  3. Collator type (lookahead vs slot-based).
  4. Cores currently assigned to para 2013.
  5. Budget appetite for 3 cores.

Costs / risks

  • ~3× recurring coretime spend (3 cores on Polkadot).
  • Collator hardware: 2s blocks at ~100% duty cycle need collators that import + author a 2s-weight block in < 2s wall-clock.
  • Coordinated runtime + collator upgrade, tested on Paseo first.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions