Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cc6820d
Increased tx pool from 20->40 MiB
bkontur Jan 29, 2026
a5833af
WIP: try without `--network host`
bkontur Jan 29, 2026
f1a0d91
WIP: big32 back
bkontur Jan 29, 2026
a47bd99
Wait finalized
bkontur Jan 29, 2026
f5213f8
Revert
bkontur Jan 29, 2026
754fbb8
Try 30MiB
bkontur Jan 29, 2026
3f9a21d
WIP: wrong ip causes disconnects?
bkontur Jan 29, 2026
4a8f219
Fix docker ipfs ips
bkontur Jan 29, 2026
6f94cc1
nit
bkontur Jan 29, 2026
2309753
revert back to host network with 127.0.0.1
bkontur Jan 29, 2026
638d63b
Run first
bkontur Jan 29, 2026
7941d15
Why this is doing difference for Kubo?
bkontur Jan 29, 2026
1434f43
Log connected peers
bkontur Jan 29, 2026
e372aa0
Disabled IPFS dht and discovery
bkontur Jan 29, 2026
4e51325
less logs
bkontur Jan 29, 2026
77451e6
WIP: temporary cache to speed to
bkontur Jan 29, 2026
1988543
wip
bkontur Jan 29, 2026
e410aea
Removed `ws` ?
bkontur Jan 29, 2026
bcc576f
Fix listen-addr
bkontur Jan 29, 2026
e2d5e29
nit
bkontur Jan 29, 2026
7d9a90c
Better IPFS?
bkontur Jan 29, 2026
5053ff0
Nit
bkontur Jan 29, 2026
18d3b9d
One more nit
bkontur Jan 29, 2026
42a7c48
omfg
bkontur Jan 29, 2026
441b705
Refactor DEFAULT_HTTP_IPFS_API and custom ports
bkontur Jan 29, 2026
017c150
Nit
bkontur Jan 29, 2026
e94f864
Very nit
bkontur Jan 29, 2026
509d973
Refactor
bkontur Jan 29, 2026
c31d1d2
Revert
bkontur Jan 29, 2026
5364c5f
Change pool
bkontur Jan 29, 2026
7071579
fmt + revert back to ws
bkontur Jan 29, 2026
20765ca
Restart IPFS?
bkontur Jan 29, 2026
62d465c
big96
bkontur Jan 29, 2026
8a74c5c
Parametrize image size
bkontur Jan 29, 2026
af8652f
Stats
bkontur Jan 29, 2026
fdb849f
Merge remote-tracking branch 'origin/parametrise_tests' into parametr…
bkontur Jan 29, 2026
14c453f
REvert
bkontur Jan 29, 2026
8b0420e
Removed comment
bkontur Jan 29, 2026
b4cd5cf
Last nits
bkontur Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:

- name: Test store-big-data (Westend parachain)
working-directory: examples
run: just run-test-store-big-data "${{ env.TEST_DIR }}"
run: just run-test-store-big-data "${{ env.TEST_DIR }}" "big32"

- name: Test authorize-preimage-and-store (Westend parachain)
working-directory: examples
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:

- name: Test store-big-data (Polkadot solochain)
working-directory: examples
run: just run-test-store-big-data "${{ env.TEST_DIR }}"
run: just run-test-store-big-data "${{ env.TEST_DIR }}" "big32"

- name: Test authorize-preimage-and-store (Polkadot solochain)
working-directory: examples
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ tar -xvzf kubo_v0.38.1_darwin-arm64.tar.gz

```shell
docker pull ipfs/kubo:latest
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs -p 4001:4001 -p 8080:8080 -p 5001:5001 ipfs/kubo:latest
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs -p 4011:4011 -p 8283:8283 -p 5011:5011 ipfs/kubo:latest
docker logs -f ipfs-node
```

Expand Down
4 changes: 2 additions & 2 deletions examples/authorize_and_store_papi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { authorizeAccount, fetchCid, store, TX_MODE_FINALIZED_BLOCK } from './api.js';
import { setupKeyringAndSigners } from './common.js';
import { setupKeyringAndSigners, DEFAULT_IPFS_GATEWAY_URL } from './common.js';
import { logHeader, logConnection, logSuccess, logError, logTestResult } from './logger.js';
import { cidFromBytes } from "./cid_dag_metadata.js";
import { bulletin } from './.papi/descriptors/dist/index.mjs';
Expand All @@ -12,7 +12,7 @@ import { bulletin } from './.papi/descriptors/dist/index.mjs';
const args = process.argv.slice(2);
const NODE_WS = args[0] || 'ws://localhost:10000';
const SEED = args[1] || '//Alice';
const HTTP_IPFS_API = args[2] || 'http://127.0.0.1:8080';
const HTTP_IPFS_API = args[2] || DEFAULT_IPFS_GATEWAY_URL;

async function main() {
await cryptoWaitReady();
Expand Down
4 changes: 2 additions & 2 deletions examples/authorize_and_store_papi_smoldot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createClient } from 'polkadot-api';
import { getSmProvider } from 'polkadot-api/sm-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { authorizeAccount, fetchCid, store } from './api.js';
import { setupKeyringAndSigners, waitForChainReady } from './common.js';
import { setupKeyringAndSigners, waitForChainReady, DEFAULT_IPFS_GATEWAY_URL } from './common.js';
import { logHeader, logConfig, logSuccess, logError, logTestResult } from './logger.js';
import { cidFromBytes } from "./cid_dag_metadata.js";
import { bulletin } from './.papi/descriptors/dist/index.mjs';
Expand Down Expand Up @@ -111,7 +111,7 @@ async function main() {
// Optional parachain chainspec path (only needed for parachains)
const parachainSpecPath = process.argv[3] || null;
// Optional IPFS API URL
const HTTP_IPFS_API = process.argv[4] || 'http://127.0.0.1:8080';
const HTTP_IPFS_API = process.argv[4] || DEFAULT_IPFS_GATEWAY_URL;

logConfig({
'Mode': 'Smoldot Light Client',
Expand Down
4 changes: 2 additions & 2 deletions examples/authorize_preimage_and_store_papi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws-provider';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { authorizeAccount, authorizePreimage, fetchCid, store, TX_MODE_IN_BLOCK, TX_MODE_FINALIZED_BLOCK } from './api.js';
import { setupKeyringAndSigners, getContentHash } from './common.js';
import { setupKeyringAndSigners, getContentHash, DEFAULT_IPFS_GATEWAY_URL } from './common.js';
import { logHeader, logConnection, logSection, logSuccess, logError, logInfo, logTestResult } from './logger.js';
import { cidFromBytes } from "./cid_dag_metadata.js";
import { bulletin } from './.papi/descriptors/dist/index.mjs';
Expand All @@ -12,7 +12,7 @@ import { bulletin } from './.papi/descriptors/dist/index.mjs';
const args = process.argv.slice(2);
const NODE_WS = args[0] || 'ws://localhost:10000';
const SEED = args[1] || '//Alice';
const HTTP_IPFS_API = args[2] || 'http://127.0.0.1:8080';
const HTTP_IPFS_API = args[2] || DEFAULT_IPFS_GATEWAY_URL;

/**
* Run a preimage authorization + store test.
Expand Down
18 changes: 14 additions & 4 deletions examples/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import fs from "fs";
import assert from "assert";

// ---- CONFIG ----
export const HTTP_IPFS_API = 'http://127.0.0.1:8080'; // Local IPFS HTTP gateway
export const DEFAULT_IPFS_API_URL = 'http://127.0.0.1:5011'; // IPFS HTTP API (for ipfs-http-client)
export const DEFAULT_IPFS_GATEWAY_URL = 'http://127.0.0.1:8283'; // IPFS HTTP Gateway (for /ipfs/CID requests)
export const CHUNK_SIZE = 1 * 1024 * 1024; // 1 MiB
// -----------------

Expand Down Expand Up @@ -47,7 +48,7 @@ export function newSigner(seed) {
*
* @param {string} file
* @param {string} text
* @param {"small" | "big32" | "big64"} size
* @param {"small" | "big32" | "big64" | "big96"} size
*/
export function generateTextImage(file, text, size = "small") {
console.log(`Generating ${size} image with text: ${text} to the file: ${file}...`);
Expand Down Expand Up @@ -77,6 +78,15 @@ export function generateTextImage(file, text, size = "small") {
noise: 50,
targetBytes: 65 * 1024 * 1024,
},
// ~96 MiB
big96: {
width: 9000,
height: 6500,
quality: 0.95,
shapes: 1000,
noise: 50,
targetBytes: 98 * 1024 * 1024,
},
};

const cfg = presets[size];
Expand Down Expand Up @@ -117,7 +127,7 @@ export function generateTextImage(file, text, size = "small") {

// 🔧 Big images: tune quality to hit target size
let imageBytes;
if ((size === "big32" || size === "big64") && cfg.targetBytes) {
if ((size === "big32" || size === "big64" || size === "big96") && cfg.targetBytes) {
let quality = cfg.quality;

do {
Expand Down Expand Up @@ -271,7 +281,7 @@ export function toHex(bytes) {
// console.error("Unknown command:", command);
// console.error("Usage:");
// console.error(
// ' node common.js generateTextImage "TEXT" [small|big32|big64]'
// ' node common.js generateTextImage "TEXT" [small|big32|big64|big96]'
// );
// process.exit(1);
// }
Loading
Loading