From df403ff05eeaf7d0143853bf9b97f18e7f2366c1 Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Tue, 25 Mar 2025 11:29:01 +0100 Subject: [PATCH 1/3] chore: Enable Arweave as experimental network --- commands/checker.js | 7 ++----- lib/zinnia.js | 21 +++++++++++++-------- test/checker.js | 15 +++++++-------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/commands/checker.js b/commands/checker.js index 3db4d281..27cb798e 100644 --- a/commands/checker.js +++ b/commands/checker.js @@ -95,10 +95,6 @@ export const checker = async ({ json, recreateCheckerIdOnError, experimental }) } }) - if (experimental) { - console.error('No experimental subnets available at this point') - } - const contracts = [] const fetchRequest = new ethers.FetchRequest( @@ -129,7 +125,8 @@ export const checker = async ({ json, recreateCheckerIdOnError, experimental }) source: activity.source || 'Zinnia' }) }, - onMetrics: m => metrics.submit('zinnia', m) + onMetrics: m => metrics.submit('zinnia', m), + experimental }), runPingLoop({ CHECKER_ID }), runMachinesLoop({ CHECKER_ID }), diff --git a/lib/zinnia.js b/lib/zinnia.js index 00938088..f2e1e0f9 100644 --- a/lib/zinnia.js +++ b/lib/zinnia.js @@ -11,12 +11,14 @@ const ZINNIA_DIST_TAG = 'v0.20.3' const SUBNETS = [ { subnet: 'spark', - ipnsKey: 'k51qzi5uqu5dlej5gtgal40sjbowuau5itwkr6mgyuxdsuhagjxtsfqjd6ym3g' + ipnsKey: 'k51qzi5uqu5dlej5gtgal40sjbowuau5itwkr6mgyuxdsuhagjxtsfqjd6ym3g', + experimental: false + }, + { + subnet: 'arweave', + ipnsKey: 'k51qzi5uqu5dgwm6tk4gibgfqbqjopwdtlphvyczrixay6oesadjdxt1eorimg', + experimental: true } - // , { - // subnet: 'arweave', - // ipnsKey: 'k51qzi5uqu5dgwm6tk4gibgfqbqjopwdtlphvyczrixay6oesadjdxt1eorimg' - // } ] const { TARGET_ARCH = os.arch(), @@ -231,7 +233,8 @@ export async function run ({ subnetSourcesDir, onActivity, onMetrics, - isUpdated = false + isUpdated = false, + experimental = false }) { const zinniadExe = getRuntimeExecutable({ runtime: 'zinnia', executable: 'zinniad' }) @@ -263,8 +266,9 @@ export async function run ({ const { signal } = controller const childProcesses = [] - for (const { subnet } of SUBNETS) { + for (const { subnet, experimental: subnetIsExperimental } of SUBNETS) { if (!matchesSubnetFilter(subnet)) continue + if (!experimental && subnetIsExperimental) continue // all paths are relative to `runtimeBinaries` const childProcess = execa( @@ -358,7 +362,8 @@ export async function run ({ subnetSourcesDir, onActivity, onMetrics, - isUpdated: true + isUpdated: true, + experimental }) } diff --git a/test/checker.js b/test/checker.js index 3a382fcb..90769671 100644 --- a/test/checker.js +++ b/test/checker.js @@ -19,14 +19,13 @@ describe('Checker', () => { assert.strictEqual(ps.exitCode, null) stopChecker() }) - // No experimental subnets available at this point - // it('runs experimental subnets', () => { - // it('runs Bacalhau', async () => { - // const ps = startChecker(['--experimental']) - // await streamMatch(ps.stdout, 'Bacalhau subnet started.') - // stopChecker() - // }) - // }) + it('runs experimental subnets', () => { + it('runs Arweave', async () => { + const ps = startChecker(['--experimental']) + await streamMatch(ps.stdout, 'Arweave subnet started.') + stopChecker() + }) + }) it('outputs events', async () => { const ps = startChecker() await Promise.all([ From b4c09f739abd518090f4b58e4e7936f78a127fda Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Tue, 25 Mar 2025 11:39:13 +0100 Subject: [PATCH 2/3] Reduce experimental filter to one if statement --- lib/zinnia.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zinnia.js b/lib/zinnia.js index f2e1e0f9..dff24d97 100644 --- a/lib/zinnia.js +++ b/lib/zinnia.js @@ -267,8 +267,8 @@ export async function run ({ const childProcesses = [] for (const { subnet, experimental: subnetIsExperimental } of SUBNETS) { - if (!matchesSubnetFilter(subnet)) continue - if (!experimental && subnetIsExperimental) continue + const skipExperimentalSubnet = !experimental && subnetIsExperimental + if (!matchesSubnetFilter(subnet) || skipExperimentalSubnet) continue // all paths are relative to `runtimeBinaries` const childProcess = execa( From 59e61e6683cd5154214d73e76de23efc8626f5c4 Mon Sep 17 00:00:00 2001 From: Srdjan S Date: Tue, 25 Mar 2025 12:03:10 +0100 Subject: [PATCH 3/3] Update README with list of experimental networks --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 53e78907..4423b4a9 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,9 @@ For the JSON output, the following event types exist: Set the flag `--experimental` to run subnets not yet considered safe for production use. _Run this at your own risk!_ -No subnets currently in experimental mode. +Checker Modules currently in experimental mode: + +- [Arweave](https://github.com/CheckerNetwork/arweave-checker/) ### `$ checker --help`