Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
7 changes: 2 additions & 5 deletions commands/checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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 }),
Expand Down
23 changes: 14 additions & 9 deletions lib/zinnia.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -231,7 +233,8 @@ export async function run ({
subnetSourcesDir,
onActivity,
onMetrics,
isUpdated = false
isUpdated = false,
experimental = false
}) {
const zinniadExe = getRuntimeExecutable({ runtime: 'zinnia', executable: 'zinniad' })

Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -358,7 +362,8 @@ export async function run ({
subnetSourcesDir,
onActivity,
onMetrics,
isUpdated: true
isUpdated: true,
experimental
})
}

Expand Down
15 changes: 7 additions & 8 deletions test/checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down