Skip to content
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

Changed the start-up file to launch daemon process #2309

Merged
merged 4 commits into from
Mar 22, 2024
Merged

Conversation

ChiaMineJP
Copy link
Contributor

@ChiaMineJP ChiaMineJP commented Mar 21, 2024

Summary

Changed the start-up file to launch daemon process.

Previously: .../app.asar.unpacked/daemon/daemon (for source install, python .../chia/daemon/server.py)
Now: .../app.asar.unpacked/daemon/chia start daemon (for source install, .../venv/bin/chia start daemon)

This PR makes use of chia start daemon command instead of daemon/server.py to launch a daemon process

Test

type OS version result Note
source m1 Mac 14.3.1 Sonoma OK
source Windows 10 OK
source Ubuntu 22.04 OK
source Fedora 39 Partially OK Need to set $PYTHONPATH env var to launch*1
package m1 Mac 14.3.1 Sonoma OK
package Windows 10 OK
package Ubuntu 22.04 OK
package Fedora 39 OK

(*1) About Fedora39 issue (source install)

This issue persistes from the previous releases so not a new issue.
In order to launch daemon from the GUI, you need to set values to PYTHONPATH.
The values should be source root directory where you clone chia-blockchain.
For example, if you clone chia-blockchain by

cd /home/user/dev
git clone https://github.com/Chia-Network/chia-blockchain
cd /home/user/dev/chia-blockchain
./install.sh

then you need to set PYTHONPATH like
PYTHONPATH=/home/user/dev/chia-blockchain:/home/user/dev/chia-blockchain/venv/lib/python-3.12/site-packages

@ChiaMineJP ChiaMineJP added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Mar 21, 2024
@ChiaMineJP ChiaMineJP self-assigned this Mar 21, 2024
@seeden seeden merged commit d4bca05 into main Mar 22, 2024
9 checks passed
@seeden seeden deleted the cmj.fix-daemon-launch branch March 22, 2024 13:09
pyProc = new Process(script, ['--wait-for-unlock'], processOptions);
}
const Process = childProcess.spawn;
pyProc = new Process(executablePath, PY_DIST_EXEC_ARGS);
} catch (e) {
console.info('Running python executable: Error: ');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't you print e here as well?
I suppose you're not changing this though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #2311

if (guessPackaged()) {
const executablePath = getExecutablePath(PY_DIST_EXECUTABLE);
console.info('Running python executable: ');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "python executable" accurate? afaict, the file ends with .exe on winows, and there's no python prefix to the command line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in Fixed in #2311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants