Skip to content

consensus: Frontier Phase F-3 — real parallel apply (replace F-2 shadow) #618

@satyakwok

Description

@satyakwok

Currently apply_block_pass2 is sequential within a block. F-2 shadow scheduler (gated by SENTRIX_FRONTIER_F2_SHADOW=1) batches transactions to demonstrate the parallel-apply structure without committing state mutations. F-3 replaces F-2's shadow path with a production code path that actually parallelises tx execution while preserving determinism.

Why

Mainnet bt is currently 2-3 s/blk steady-state. Per-block apply profile (gated by SENTRIX_APPLY_PROFILE=1) shows trie update is the dominant chunk at ~340ms per block. Parallel apply across non-conflicting tx batches could amortise that.

Scope

  • F-3: real parallel apply across non-conflicting txs in the same block
  • F-4 through F-10: progressive enabling on testnet → mainnet
  • Cross-validator determinism tests (state_root match across 4 vals after parallel apply)

Constraints

  • Per CONTRIBUTING.md, consensus-protocol changes need discussion before submission and bug fixes need a regression test. Each F-N step ships as its own PR with a focused diff.
  • ~6-8 weeks calendar including testnet shadow-bake + mainnet activation

Acceptance

  • F-3 ships as a separate fork-gated activation height
  • Mainnet bt improvement measurable via apply-profile

Metadata

Metadata

Assignees

No one assigned

    Labels

    consensusBFT / PoA / consensus layerenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions