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` 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..dff24d97 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) { - if (!matchesSubnetFilter(subnet)) continue + for (const { subnet, experimental: subnetIsExperimental } of SUBNETS) { + const skipExperimentalSubnet = !experimental && subnetIsExperimental + if (!matchesSubnetFilter(subnet) || skipExperimentalSubnet) 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([