Skip to content

Rebrand to Checker. #2048 #2053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 120 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
cb805e4
checker (wip)
juliangruber Feb 11, 2025
618f696
"Filecoin Station" -> "Checker"
juliangruber Feb 11, 2025
ecde678
station -> checker (wip)
juliangruber Feb 11, 2025
e5c6b81
docs
juliangruber Feb 11, 2025
9499282
fix set config migration version
juliangruber Feb 11, 2025
b2971cf
clean up
juliangruber Feb 11, 2025
7d53f60
clean up
juliangruber Feb 11, 2025
63807db
clean up
juliangruber Feb 11, 2025
496d603
clean up
juliangruber Feb 11, 2025
fe3fff9
clean up
juliangruber Feb 11, 2025
91ea130
clean up
juliangruber Feb 11, 2025
7f4f6bd
clean up
juliangruber Feb 11, 2025
29c5e78
clean up
juliangruber Feb 11, 2025
49ec966
add migrate seed phrase
juliangruber Feb 11, 2025
2f500dd
fix old password key
juliangruber Feb 11, 2025
26be343
clean up
juliangruber Feb 11, 2025
df61100
clean up
juliangruber Feb 11, 2025
d735dcc
clean up
juliangruber Feb 11, 2025
403ef8d
clean up
juliangruber Feb 11, 2025
68b982d
module -> subnet
juliangruber Feb 11, 2025
692595c
save
juliangruber Feb 11, 2025
4c058c2
checker -> station
juliangruber Feb 11, 2025
c253b04
clean up
juliangruber Feb 11, 2025
5704adf
station -> checker
juliangruber Feb 11, 2025
fdd665f
clean up
juliangruber Feb 11, 2025
9df3c33
update package lock
juliangruber Feb 11, 2025
8903735
use checker logo in app
juliangruber Feb 11, 2025
f60abc3
"on" icon
juliangruber Feb 11, 2025
c0dec08
update icons off, update-macos*, update-*
juliangruber Feb 11, 2025
d0b96be
simplify icons
juliangruber Feb 11, 2025
5305a06
start with "ok" icon
juliangruber Feb 11, 2025
14c03a8
save
juliangruber Feb 11, 2025
34c3324
start in "online" state
juliangruber Feb 11, 2025
88d850f
update onboarding text
juliangruber Feb 12, 2025
9ce3d5d
update author
juliangruber Feb 12, 2025
378067a
update icons
juliangruber Feb 12, 2025
ba2f1bc
update more assets
juliangruber Feb 12, 2025
befe27c
update tray
juliangruber Feb 12, 2025
22967fc
docs.filstation.app -> docs.checker.network
juliangruber Feb 19, 2025
293c193
use brand blue
juliangruber Feb 23, 2025
10aed60
more blue
juliangruber Feb 23, 2025
e9203a2
clean up unused color
juliangruber Feb 23, 2025
427d2b5
remove unused orange
juliangruber Feb 23, 2025
052c1d2
clean up
juliangruber Feb 23, 2025
e22ebbf
use brand red / pink
juliangruber Feb 23, 2025
0b64f60
more brand blue
juliangruber Feb 23, 2025
f0aa5b5
use more brand blue
juliangruber Feb 23, 2025
99062f1
fonts: SpaceMono -> IBMPlexMono
juliangruber Feb 23, 2025
14323b7
fonts: SpaceGrotesk -> Lato
juliangruber Feb 23, 2025
b296069
use more brand blue
juliangruber Feb 24, 2025
4738e97
fix allow url
juliangruber Feb 24, 2025
cf5ea39
update ToS link
juliangruber Feb 25, 2025
d086eb6
Merge branch 'main' into checker
juliangruber Feb 25, 2025
ce85c70
Merge branch 'main' into checker
juliangruber Mar 31, 2025
0d26eaf
change title fontface
juliangruber Apr 4, 2025
0b85cbf
onboarding: refactor `<Title />`, update text size
juliangruber Apr 4, 2025
8ab4f2b
update title font size
juliangruber Apr 4, 2025
75a15a0
refactor `<Paragraph />`, update style
juliangruber Apr 4, 2025
8f19a03
update `title-l` and `body-m` font size and line height
juliangruber Apr 4, 2025
ad6fe16
style
juliangruber Apr 4, 2025
b8313b0
add checker network logo
juliangruber Apr 4, 2025
4b5ce64
refactor `<Page />`
juliangruber Apr 4, 2025
66aa263
blur (wip)
juliangruber Apr 4, 2025
9f41a92
remove underline
juliangruber Apr 4, 2025
3e5014e
new background
juliangruber Apr 7, 2025
5022bb1
more style updates
juliangruber Apr 7, 2025
8818cee
wallet widget
juliangruber Apr 8, 2025
5a8e3f8
text-black -> text-white
juliangruber Apr 8, 2025
103a383
more default white text
juliangruber Apr 8, 2025
eb81f75
fix remove weird border
juliangruber Apr 8, 2025
8d3fe2f
boxes
juliangruber Apr 8, 2025
c6db78a
chart
juliangruber Apr 8, 2025
1987f74
design
juliangruber Apr 8, 2025
38adcae
borders
juliangruber Apr 8, 2025
41487d8
subnet background
juliangruber Apr 8, 2025
8f70ea2
tags
juliangruber Apr 8, 2025
0ddfea1
filter
juliangruber Apr 9, 2025
5e731e5
style
juliangruber Apr 9, 2025
6e00929
style
juliangruber Apr 9, 2025
de5e870
switch illustration
juliangruber Apr 9, 2025
4b05f9b
style
juliangruber Apr 11, 2025
965d0b4
remove chart lines
juliangruber Apr 11, 2025
a953bb0
border
juliangruber Apr 11, 2025
c8e742f
chart
juliangruber Apr 11, 2025
6de6223
style onboarding
juliangruber Apr 14, 2025
b576c19
style home page
juliangruber Apr 14, 2025
25e06ca
remove slashes
juliangruber Apr 14, 2025
c85a5eb
subnets page
juliangruber Apr 14, 2025
745a571
settings page
juliangruber Apr 14, 2025
90b4f1c
wallet
juliangruber Apr 14, 2025
339bfd2
clean up
juliangruber Apr 14, 2025
623caa8
wallet
juliangruber Apr 15, 2025
1784833
wallet
juliangruber Apr 15, 2025
feefb96
wallet
juliangruber Apr 15, 2025
1b24eac
remove some unclear styles
juliangruber Apr 15, 2025
613be70
activity log
juliangruber Apr 15, 2025
1e64da8
fix subnet links
juliangruber Apr 15, 2025
7d47495
remove unnecessary loading screen
juliangruber Apr 15, 2025
be2dab9
fix lint
juliangruber Apr 15, 2025
2b2d7fc
revert config key change
juliangruber Apr 16, 2025
73065dc
remove obsolete test
juliangruber Apr 16, 2025
a8aceed
fix upper case file name
juliangruber Apr 16, 2025
9898997
fix asset search expression
juliangruber Apr 16, 2025
a18b998
fix log
juliangruber Apr 16, 2025
9b89c17
fix seed phrase migration
juliangruber Apr 16, 2025
bdc62d2
remove hover styles
juliangruber Apr 16, 2025
91d1954
Merge branch 'main' into checker
juliangruber Apr 16, 2025
9da551b
clean up dead code
juliangruber Apr 16, 2025
dda1235
add state root migration
juliangruber Apr 16, 2025
b878868
add migrate config
juliangruber Apr 22, 2025
e734133
fix loading error
juliangruber Apr 22, 2025
4909600
`console.log` -> `log.info`
juliangruber Apr 24, 2025
c8a833c
set up ipc listeners before ui
juliangruber Apr 24, 2025
3764222
chart: update total rewards bg
juliangruber Apr 24, 2025
24d7a9c
Merge branch 'main' into checker
juliangruber Apr 24, 2025
8c6a580
only show scrollbars when necessary
juliangruber Apr 24, 2025
f782179
update tooltip styles
juliangruber Apr 24, 2025
419635c
revert unintentional commit
juliangruber Apr 24, 2025
cc11d26
docs
juliangruber Apr 24, 2025
509662b
prettier
juliangruber Apr 28, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: dist/*tation*.*
path: dist/*hecker*.*
if-no-files-found: error

- name: Show Cache
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Filecoin Station
# Checker

[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai/)
[![](https://img.shields.io/badge/project-Filecoin-blue.svg?style=flat-square)](https://filecoin.io/)
[![ci](https://github.com/filecoin-station/desktop/actions/workflows/ci.yml/badge.svg)](https://github.com/filecoin-station/desktop/actions/workflows/ci.yml)
[![ci](https://github.com/CheckerNetwork/app/actions/workflows/ci.yml/badge.svg)](https://github.com/CheckerNetwork/app/actions/workflows/ci.yml)

Filecoin Station is a desktop app that connects your computer’s idle resources
to the Filecoin network and rewards you with Filecoin. Taking part is simple,
just launch the app and start earning. Learn more at
[filstation.app](https://filstation.app).
Checker is a desktop app that connects your computer’s idle resources to the
Filecoin network and rewards you with Filecoin. Taking part is simple, just
launch the app and start earning.
[Learn more](https://docs.checker.network/running-a-checker)

## Install

Release notes and all versions of Filecoin Station can be found on the
[releases page](https://github.com/filecoin-station/desktop/releases).
Release notes and all versions of Checker can be found on the
[releases page](https://github.com/CheckerNetwork/app/releases).

Each release has packages for desktop platforms:

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ as a security vulnerability, .
## Reporting a non security bug

For non-security bugs, please simply file a GitHub
[issue](https://github.com/filecoin-station/desktop/issues/new).
[issue](https://github.com/CheckerNetwork/app/issues/new).
Binary file modified assets/tray/off-macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/on-macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/update-macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/update-off-macos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/update-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tray/update-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build/after-pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.default = async function (context) {
{
cwd: join(
context.appOutDir,
'Filecoin Station.app',
'Checker.app',
'Contents',
'Resources',
'checker-node'
Expand Down
Binary file modified build/icon.icns
Binary file not shown.
Binary file modified build/icon.ico
Binary file not shown.
Binary file modified build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/installerSidebar.bmp
Binary file not shown.
Binary file modified build/installerSidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

```mermaid
graph
fil-stat-repo(github.com/filecoin-station/desktop) --> fil-stat-main(Station main process)
fil-stat-repo --> fil-stat-webui(Station WebUI)
fil-stat-repo(github.com/CheckerNetwork/app) --> fil-stat-main(Checker main process)
fil-stat-repo --> fil-stat-webui(Checker WebUI)

saturn-l2-repo(https://github.com/filecoin-project/saturn-l2)
--> saturn-l2-go(Saturn L2 Node binary)
Expand All @@ -23,7 +23,7 @@ graph

Repositories:

- https://github.com/filecoin-station/desktop
- https://github.com/CheckerNetwork/app
- https://github.com/filecoin-saturn/L2-node
- https://github.com/filecoin-project/saturn-webui

Expand All @@ -32,8 +32,8 @@ Repositories:
1. `filecoin-project/saturn-webui` publishes a new release with WebUI assets
2. `filecoin-saturn/L2-node` is updated to use the new `saturn-webui` version
3. `filecoin-saturn/L2-node` publishes a new release
4. `filecoin-station/desktop` is updated to use the new `L2-node` version
5. `filecoin-station/desktop` publishes a new release
4. `CheckerNetwork/app` is updated to use the new `L2-node` version
5. `CheckerNetwork/app` publishes a new release

## Development workflow

Expand Down
10 changes: 5 additions & 5 deletions docs/RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

Filecoin Station uses
Checker uses
[electron-build/auto-update](https://www.electron.build/auto-update) and a
modified flow from
[Electron Builder Action](https://github.com/samuelmeuli/action-electron-builder#electron-builder-action):
Expand Down Expand Up @@ -38,12 +38,12 @@ modified flow from
```

1. Wait for GitHub Actions CI to upload the binaries to a draft release
[here](https://github.com/filecoin-station/desktop/releases) (a new
[here](https://github.com/CheckerNetwork/app/releases) (a new
one will be created if you haven't drafted one).
1. Review and publish the release draft.
- Once a release is published, users will receive the app update
- The `latest.yml, latest-mac.yml, latest-linux.yml` files attached to
[/releases](https://github.com/filecoin-station/desktop/releases)
[/releases](https://github.com/CheckerNetwork/app/releases)
are used by the desktop app to determine when an app update is available.
1. Done!

Expand All @@ -56,12 +56,12 @@ modified flow from
4. Publish local changes and the tag to the GitHub repo:
`git push && git push origin vA.B.C`.
5. Wait for GitHub Actions CI to upload the binaries to a draft release
[here](https://github.com/filecoin-station/desktop/releases) (a new
[here](https://github.com/CheckerNetwork/app/releases) (a new
one will be created if you haven't drafted one).
6. Review and publish the release draft.
- Once a release is published, users will receive the app update
- The `latest.yml, latest-mac.yml, latest-linux.yml` files attached to
[/releases](https://github.com/filecoin-station/desktop/releases)
[/releases](https://github.com/CheckerNetwork/app/releases)
are used by the desktop app to determine when an app update is available.
7. Done!

Expand Down
42 changes: 21 additions & 21 deletions docs/MODULE_INTERFACE.md → docs/SUBNET_INTERFACE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Station module interface
# Checker subnet interface

1. A module itself is a long-running executable, which
1. A subnet itself is a long-running executable, which
- performs its business logic
- writes informative messages to `stdio`
- exposes stats via a builtin webserver

1. A module needs to have its __binaries hosted__ on HTTPS accessible URLs, so that Station can download updates. Path patterns are flexible, GitHub Releases would be nice.
1. A subnet needs to have its __binaries hosted__ on HTTPS accessible URLs, so that Checker can download updates. Path patterns are flexible, GitHub Releases would be nice.

Example:
```
https://github.com/filecoin-saturn/L2-node/releases
```

1. A module should run on as many operating systems as possible, without requiring any prior setup before executing its binary. On macOS, x86 is required, arm64 nice to have.
1. A subnet should run on as many operating systems as possible, without requiring any prior setup before executing its binary. On macOS, x86 is required, arm64 nice to have.

2. A module can provide a custom __command string__ for launching its executable. Ideally a module doesn't require any extra arguments when launching.
2. A subnet can provide a custom __command string__ for launching its executable. Ideally a subnet doesn't require any extra arguments when launching.

Example:
```bash
$ bacalhau # ideal
$ bacalhau --foo=bar
```

3. A module's executable gets passed the following environment variables:
3. A subnet's executable gets passed the following environment variables:
- `FIL_WALLET_ADDRESS` The user's Filecoin wallet address
- `STATE_ROOT` The long-lived working directory on disk. The module must store
- `STATE_ROOT` The long-lived working directory on disk. The subnet must store
all of its permanent files inside (subdirectories of) this directory. The directory
isn't expected to be backed up or shared across machines in any way.
- `CACHE_ROOT` The temporary working directory on disk. The module must store
- `CACHE_ROOT` The temporary working directory on disk. The subnet must store
all of its caches inside (subdirectories of) this directory. The directory
isn't expected to be backed up or shared across machines in any way.

Expand All @@ -36,17 +36,17 @@
$ FIL_WALLET_ADDRESS=f1... STATE_ROOT=~/.local/state/bacalhau CACHE_ROOT=~/.cache/bacalhau bacalhau
```

4. A module communicates activity by writing to its `stdout` stream:
- `API: $1` The module has launched and `$1` can be queried for fetching module stats (see below)
- `INFO: $1` `$1` will be displayed to the user inside Station's Activity Log
- `ERROR: $1` `$1` will be displayed to the user inside Station's Activity Log, with a warning icon
- `$1` all log lines will be stored in a module-specific log file, which can be submitted to Sentry for error handling
4. A subnet communicates activity by writing to its `stdout` stream:
- `API: $1` The subnet has launched and `$1` can be queried for fetching subnet stats (see below)
- `INFO: $1` `$1` will be displayed to the user inside Checker's Activity Log
- `ERROR: $1` `$1` will be displayed to the user inside Checker's Activity Log, with a warning icon
- `$1` all log lines will be stored in a subnet-specific log file, which can be submitted to Sentry for error handling

5. A module is expected to have provided its `API` URL in `<=500ms`
5. A subnet is expected to have provided its `API` URL in `<=500ms`

6. A module's `stderr` will be stored in the same module-specific log file as its `stdout`, to be used for post-mortem debugging.
6. A subnet's `stderr` will be stored in the same subnet-specific log file as its `stdout`, to be used for post-mortem debugging.

7. A module exposes its stats via HTTP(S), on an address communicated via
7. A subnet exposes its stats via HTTP(S), on an address communicated via
`stdout` (see above `API:`). The response will be a JSON object with at least
the following fields:

Expand All @@ -57,12 +57,12 @@ the following fields:
```

The number of jobs completed is expected to be a monotonically increasing
number. It's the responsibility of the module to persist this number across
number. It's the responsibility of the subnet to persist this number across
process restarts, somewhere in `ROOT_DIR`.

The module may include additional fields in the JSON response, although
these will be ignored by Station.
The subnet may include additional fields in the JSON response, although
these will be ignored by Checker.

7. A module can be told to shut down via signal `SIGTERM`
7. A subnet can be told to shut down via signal `SIGTERM`

8. A module can shut down at any time, which is always considered an error. Its exit will be shown in Station's UI, and the last 100 lines of its output streams forwarded to Sentry. The module won't automatically be restarted by Station (for now).
8. A subnet can shut down at any time, which is always considered an error. Its exit will be shown in Checker's UI, and the last 100 lines of its output streams forwarded to Sentry. The subnet won't automatically be restarted by Checker (for now).
6 changes: 3 additions & 3 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: io.filecoin.station
appId: network.checker.app
generateUpdatesFilesForAllChannels: true

extraMetadata:
Expand Down Expand Up @@ -58,8 +58,8 @@ nsis:

linux:
artifactName: ${name}-${os}-${arch}.${ext}
executableName: filecoin-station
icon: filecoin-station
executableName: checker
icon: checker
category: Network;FileTransfer;P2P
synopsis: A desktop client for Filecoin Retrieval Markets
maintainer: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion main/activities.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Activities {
/** @type {Activity[]} */
#activities = []
#online = {
spark: false,
spark: true,
voyager: false
}

Expand Down
6 changes: 3 additions & 3 deletions main/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function setupAppMenu (/** @type {import('./typings').Context} */ ctx) {

// File menu
menu.items[1].submenu?.insert(0, new MenuItem({
label: 'Save Module Logs As…',
click: () => { ctx.saveModuleLogsAs() }
label: 'Save Subnet Logs As…',
click: () => { ctx.saveSubnetLogsAs() }
}))

Menu.setApplicationMenu(menu)
Expand All @@ -37,7 +37,7 @@ function setupCheckForUpdatesMenuItem (ctx, menu) {
visible: false
})

// Filecoin Station menu
// Checker menu
menu.items[0].submenu?.insert(1, checkForUpdates)
menu.items[0].submenu?.insert(2, checkingForUpdates)
}
Expand Down
4 changes: 2 additions & 2 deletions main/station-config.js → main/checker-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ const configStore = new Store({
},
beforeEachMigration: (_, context) => {
log.info(
`Migrating station-config from ${context.fromVersion} → ` +
`Migrating checker-config from ${context.fromVersion} → ` +
context.toVersion
)
}
})

log.info('Loading Station configuration from', configStore.path)
log.info('Loading Checker configuration from', configStore.path)

let OnboardingCompleted =
/** @type {boolean} */
Expand Down
41 changes: 37 additions & 4 deletions main/checker-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ let totalJobsCompleted = 0
* @param {Context} ctx
*/
async function setup (ctx) {
ctx.saveModuleLogsAs = async () => {
ctx.saveSubnetLogsAs = async () => {
const opts = {
defaultPath: `station-modules-${(new Date()).getTime()}.log`
defaultPath: `checker-subnets-${(new Date()).getTime()}.log`
}
// The dialog might not show if the UI is hidden
ctx.showUI()
Expand Down Expand Up @@ -67,17 +67,50 @@ function maybeReportErrorToSentry (err, scopeFn) {
if (now - lastCrashReportedAt < 4 /* HOURS */ * 3600_000) return
lastCrashReportedAt = now
log.error(
'Reporting the problem to Sentry for inspection by the Station team.'
'Reporting the problem to Sentry for inspection by the Checker team.'
)
Sentry.captureException(err, scopeFn)
}

async function maybeMigrateStateRoot () {
try {
await fs.stat(consts.STATE_ROOT)
} catch (err) {
if (
typeof err === 'object' &&
err !== null &&
'code' in err &&
err.code !== 'ENOENT'
) {
throw err
}
try {
await fs.stat(consts.LEGACY_STATE_ROOT)
} catch (err) {
if (
typeof err === 'object' &&
err !== null &&
'code' in err &&
err.code !== 'ENOENT'
) {
throw err
}
return
}
log.info('Migrating Checker Node state folder from legacy location...')
await fs.cp(consts.LEGACY_STATE_ROOT, consts.STATE_ROOT, {
recursive: true
})
}
}

/**
* @param {Context} ctx
*/
async function start (ctx) {
log.info('Starting Checker Node...')

await maybeMigrateStateRoot()
const childProcess = fork(
checkerNodePath,
['--json', '--recreateCheckerIdOnError'],
Expand Down Expand Up @@ -139,7 +172,7 @@ async function start (ctx) {
}
default: {
const err = new Error(
`Unknown Station Checker Node event type "${event.type}": ${line}`
`Unknown Checker Node event type "${event.type}": ${line}`
)
log.error(format(err))
Sentry.captureException(err)
Expand Down
Loading