From 55f107c437e1a85fcfab02ef08c2ccd63a95d85a Mon Sep 17 00:00:00 2001 From: Ilia Churin Date: Thu, 19 Nov 2026 13:38:55 +0900 Subject: [PATCH 1/4] Drop --storage-mode and --enable-checkpoint-coordinator from storage-provider-node --- config/ports.env | 9 +-------- packages/cli/src/commands/service.ts | 28 ++++++++++++---------------- packages/cli/src/lib/spawn-env.ts | 1 - 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/config/ports.env b/config/ports.env index f2375b2..932aed6 100644 --- a/config/ports.env +++ b/config/ports.env @@ -51,19 +51,12 @@ BOOTNODE_HOSTNAME=127.0.0.1 # webrtc-direct advertises what it binds, so a 127.0.0.1 listener is reachable by nobody else. P2P_LISTEN_IP=127.0.0.1 -# Storage-provider data dir (disk mode). Empty locally so the wrapper derives it +# Storage-provider data dir. Empty locally so the wrapper derives it # from DATA_DIR; a deployment patches this to an absolute path under the # persistent DATA_DIR, because zombie-cli does not forward env vars to # custom_processes (same reason BOOTNODE_HOSTNAME is patched here). WEB3_STORAGE_PROVIDER_DATA_DIR= -# Storage-provider storage mode: "disk" (persistent) or "inmemory" (ephemeral). -# Defaults to disk. zombie-cli does not forward env vars to custom_processes, so -# EPHEMERAL cannot reach the wrapper directly; for native runs `make start` -# regenerates config/ports.local.env (sourced after this file) to flip the mode -# to inmemory under EPHEMERAL=1. The server stays on the disk default. -WEB3_STORAGE_PROVIDER_STORAGE_MODE=disk - # Auxiliary service ports (defaults from binaries) ETH_RPC_PORT=8545 diff --git a/packages/cli/src/commands/service.ts b/packages/cli/src/commands/service.ts index c462997..db39c40 100644 --- a/packages/cli/src/commands/service.ts +++ b/packages/cli/src/commands/service.ts @@ -735,9 +735,10 @@ async function storageProviderNode(ctx: ServiceContext, _deps: ServiceDeps = {}) console.log(` using sibling build: ${binary}`); } - const keyfile = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'ppn-sp-')), 'key'); + const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ppn-sp-')); + process.on('exit', () => fs.rmSync(tempDir, { recursive: true, force: true })); + const keyfile = path.join(tempDir, 'key'); fs.writeFileSync(keyfile, '//Alice\n', { mode: 0o600 }); - process.on('exit', () => fs.rmSync(path.dirname(keyfile), { recursive: true, force: true })); const chainPort = ctx.ports.WEB3_STORAGE_PORT; console.log(`storage-provider-node: waiting for the web3-storage chain on 127.0.0.1:${chainPort}...`); @@ -749,27 +750,22 @@ async function storageProviderNode(ctx: ServiceContext, _deps: ServiceDeps = {}) publicMultiaddr = `/dns4/${hostname}/tcp/443/tls/http/http-path/web3-storage-provider`; } - const inMemory = (ctx.ports.WEB3_STORAGE_PROVIDER_STORAGE_MODE ?? 'disk') === 'inmemory'; - const storageArgs = ['--storage-mode', 'inmemory']; - if (!inMemory) { - const storagePath = - process.env.STORAGE_PATH || - ctx.ports.WEB3_STORAGE_PROVIDER_DATA_DIR || - path.join(ctx.dataDir, 'web3-storage-provider'); - fs.mkdirSync(storagePath, { recursive: true }); - storageArgs.length = 0; - storageArgs.push('--storage-mode', 'disk', '--storage-path', storagePath); - } + const storagePath = + ctx.ports.PPN_EPHEMERAL === '1' + ? path.join(tempDir, 'data') + : process.env.STORAGE_PATH || + ctx.ports.WEB3_STORAGE_PROVIDER_DATA_DIR || + path.join(ctx.dataDir, 'web3-storage-provider'); + fs.mkdirSync(storagePath, { recursive: true }); const args = [ '--keyfile', keyfile, - ...storageArgs, + '--storage-path', storagePath, '--bind-addr', `127.0.0.1:${ctx.ports.WEB3_STORAGE_PROVIDER_PORT}`, '--chain-rpc', `ws://127.0.0.1:${chainPort}`, ...(publicMultiaddr ? ['--public-multiaddr', publicMultiaddr] : []), - '--enable-checkpoint-coordinator', ]; - console.log(` storage: ${storageArgs.join(' ')}`); + console.log(` storage: ${storagePath}`); if (publicMultiaddr) console.log(` advertising: ${publicMultiaddr}`); // Replaces this process for the lifetime of the network, the way the wrapper's exec did. diff --git a/packages/cli/src/lib/spawn-env.ts b/packages/cli/src/lib/spawn-env.ts index ca48fdd..5a9c3b5 100644 --- a/packages/cli/src/lib/spawn-env.ts +++ b/packages/cli/src/lib/spawn-env.ts @@ -31,7 +31,6 @@ export interface LocalEnvFacts { export function localEnvContent(f: LocalEnvFacts): string { return ( '# Generated by `ppn start` — gitignored, do not edit.\n' + - `WEB3_STORAGE_PROVIDER_STORAGE_MODE=${f.ephemeral ? 'inmemory' : 'disk'}\n` + `DUB_POSTGRES_DATA_DIR=${f.identityDataDir}\n` + `PPN_NETWORK=${f.network}\n` + // The services load the network themselves, and see the overlay's nodes only through this. From 6874dd97d170f50d18a2691b7573cfa5e8abe9c3 Mon Sep 17 00:00:00 2001 From: Ilia Churin Date: Thu, 19 Nov 2026 21:05:16 +0900 Subject: [PATCH 2/4] Run the web3-storage collator with slot-based authoring --- packages/network-config/src/toml-generator.ts | 1 + packages/network-config/tests/toml-generator.test.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/packages/network-config/src/toml-generator.ts b/packages/network-config/src/toml-generator.ts index bd34995..7d79c8b 100644 --- a/packages/network-config/src/toml-generator.ts +++ b/packages/network-config/src/toml-generator.ts @@ -252,6 +252,7 @@ const CHAIN_ARGS: Record = { 'web3-storage': { required: [ '--collator', + '--authoring=slot-based', '--rpc-max-connections=500', '--unsafe-rpc-external', '--rpc-max-response-size=50', diff --git a/packages/network-config/tests/toml-generator.test.ts b/packages/network-config/tests/toml-generator.test.ts index 59f6dae..99e5455 100644 --- a/packages/network-config/tests/toml-generator.test.ts +++ b/packages/network-config/tests/toml-generator.test.ts @@ -331,6 +331,11 @@ describe('generateToml with custom log targets', () => { assert.ok(toml.includes('--force-authoring')); assert.ok(toml.includes('-lsync=info')); }); + + it('runs the web3-storage collator slot-based, the only authoring that sends the relay parent descendants its runtime requires', () => { + const toml = generateToml(['web3-storage']); + assert.ok(toml.includes('--authoring=slot-based')); + }); }); describe('generateToml with enableHop', () => { From a9a4b8b0d8afac1dd803a4a6075b7d03e032151e Mon Sep 17 00:00:00 2001 From: Ilia Churin Date: Thu, 19 Nov 2026 21:17:14 +0900 Subject: [PATCH 3/4] Pin web3-storage to v0.5.1-paseo --- .github/workflows/zombienet-tests.yml | 6 +----- networks/previewnet.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/zombienet-tests.yml b/.github/workflows/zombienet-tests.yml index a94399b..1f8463b 100644 --- a/.github/workflows/zombienet-tests.yml +++ b/.github/workflows/zombienet-tests.yml @@ -551,15 +551,11 @@ jobs: # Re-enable (drop continue-on-error) once the previewnet preset's # min_duration is lowered to match the demo (todo). continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} timeout-minutes: 15 run: | set -e source ./config/ports.env - W3S_TAG=$(curl -sL -H "Authorization: token $GITHUB_TOKEN" \ - "https://api.github.com/repos/paritytech/web3-storage/releases/latest" \ - | jq -r .tag_name) + W3S_TAG=$(jq -r '.releases["web3-storage"].tag' networks/previewnet.json) echo "Cloning paritytech/web3-storage @ $W3S_TAG" git clone --depth 1 --branch "$W3S_TAG" \ https://github.com/paritytech/web3-storage.git /tmp/w3s diff --git a/networks/previewnet.json b/networks/previewnet.json index e7b15eb..43f3b25 100644 --- a/networks/previewnet.json +++ b/networks/previewnet.json @@ -33,7 +33,7 @@ }, "web3-storage": { "repo": "paritytech/web3-storage", - "tag": "latest" + "tag": "v0.5.1-paseo" } }, "genesisConfig": { From a57a237dc8a986b5f3751edc4461ef5292783827 Mon Sep 17 00:00:00 2001 From: Ilia Churin Date: Thu, 19 Nov 2026 21:31:57 +0900 Subject: [PATCH 4/4] Regenerate local-dev.toml for the slot-based web3-storage collator --- zombienet-configs/local-dev.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zombienet-configs/local-dev.toml b/zombienet-configs/local-dev.toml index a36f075..ead6e39 100644 --- a/zombienet-configs/local-dev.toml +++ b/zombienet-configs/local-dev.toml @@ -117,7 +117,7 @@ rpc_port = 10040 p2p_port = 30337 prometheus_port = 20040 command = "{{SCRIPTS}}/omni-node.sh" -args = ["-lruntime=info", "--collator", "--rpc-max-connections=500", "--unsafe-rpc-external", "--rpc-max-response-size=50", "--listen-addr=/ip4/127.0.0.1/udp/30337/webrtc-direct"] +args = ["-lruntime=info", "--collator", "--authoring=slot-based", "--rpc-max-connections=500", "--unsafe-rpc-external", "--rpc-max-response-size=50", "--listen-addr=/ip4/127.0.0.1/udp/30337/webrtc-direct"] [[hrmp_channels]] sender = 1502