Skip to content

perf(sync-service): overlap WASM compilation with Aura proof downloads #3220

@replghost

Description

@replghost

Summary

During parachain bootstrap, the sequence is:

  1. Download :code + :heappages storage proof
  2. Compile WASM runtime (~200-300ms)
  3. Download AuraApi_slot_duration call proof
  4. Download AuraApi_authorities call proof
  5. Execute Aura calls against compiled VM

Steps 3-4 don't depend on the compiled VM — only step 5 does. Start all three P2P requests (storage proof + both call proofs) in parallel. Compile while Aura proofs arrive. Then execute.

On cold start this saves 1-2 seconds because compilation and network fetches are no longer sequential.

Depends on

Parallelize Aura call proofs first (simpler change, same area of code).

Metadata

Metadata

Assignees

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