Skip to content

Instantly share code, notes, and snippets.

@replghost
replghost / smoldot-parachain-warm-start.md
Last active April 15, 2026 20:44
Smoldot parachain warm-start path — what it is, how to use it, benchmark results

Smoldot parachain warm-start path

What changed

PR paritytech/smoldot#3185 adds a parachain warm-start path to smoldot. Hosts that already save and restore databaseContent (browsers via IndexedDB, mobile/desktop apps via local storage) get a dramatically faster parachain restart without any code changes on the host side.

Before this PR, a restored parachain database had enough chain state to skip relay-chain warp sync, but smoldot still re-downloaded the full parachain runtime (~2.4 MiB) from a peer on every restart. That download dominated restart time: 30-75 seconds even when the host had a perfectly good saved database.

Now, smoldot persists the parachain runtime code and the Merkle proof material needed to verify it. On the next startup, the saved runtime bytes are verified against a fresh storage proof from a peer and compiled locally. If verification fails (runtime changed, data corrupted, block pruned), smoldot falls back to the existing netw

Linking my account replghost on GitHub with my address 5DRbX8VT6RDdDDnjkbjGGoqX1X7LsuHhyD8EbQT2LvQdMsoc on Substrate in mycryptoprofile.io, and the challenge code is: e140effef235354bc1cee06324f099bf. #LitentryVerifyMyAddress

@replghost
replghost / gist:0cc5e4afd1786a842ba3803e8f85e37b
Last active August 31, 2022 01:30
Dockerfile for crypto-wasm
FROM node:16-bullseye
ARG WASM_VERSION=v6.3.1
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends clang
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
WORKDIR /wasm
RUN curl -sLO "https://github.com/polkadot-js/wasm/archive/refs/tags/${WASM_VERSION}.tar.gz" && tar -xf "${WASM_VERSION}.tar.gz" --strip-components=1